@genesislcap/grid-pro 14.486.2-alpha-686dcaf.0 → 14.488.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 +645 -442
- package/dist/dts/column/utils/grid-pro-columns.d.ts +19 -0
- package/dist/dts/column/utils/grid-pro-columns.d.ts.map +1 -1
- package/dist/dts/datasource/base.datasource.d.ts +8 -0
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro-beta.d.ts +7 -0
- package/dist/dts/grid-pro-beta.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +43 -0
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +7 -0
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +9 -9
- package/dist/esm/column/utils/grid-pro-columns.js +26 -0
- package/dist/esm/datasource/base.datasource.js +8 -0
- package/dist/esm/grid-pro-beta.js +54 -3
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +91 -0
- package/dist/esm/grid-pro.js +49 -2
- package/dist/grid-pro.api.json +192 -0
- package/dist/grid-pro.d.ts +84 -0
- package/dist/react.cjs +6 -6
- package/dist/react.mjs +5 -5
- package/package.json +14 -14
package/dist/esm/grid-pro.js
CHANGED
|
@@ -12,7 +12,7 @@ import debounce from 'lodash.debounce';
|
|
|
12
12
|
import { GridProCell } from './cell';
|
|
13
13
|
import { DateEditor, MultiselectEditor, NumberEditor, SelectEditor, StringEditor, } from './cell-editors';
|
|
14
14
|
import { ActionRenderer, ActionsMenuRenderer, BooleanRenderer, EditableRenderer, IconRenderer, SelectRenderer, StatusPillRenderer, } from './cell-renderers';
|
|
15
|
-
import { GridProColumn } from './column';
|
|
15
|
+
import { GridProColumn, resolveVisibleColumnFields } from './column';
|
|
16
16
|
import { GridProClientSideDatasource, GridProServerSideDatasource } from './datasource';
|
|
17
17
|
import { baseDatasourceEventNames } from './datasource/base.types';
|
|
18
18
|
import { agThemeFontFaceMap, defaultAgGridFontFace } from './external';
|
|
@@ -84,6 +84,9 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
84
84
|
this.disposed = false;
|
|
85
85
|
this.debouncedSaveColumnState = debounce(this.saveColumnState.bind(this), DEBOUNCE_TIME);
|
|
86
86
|
this.debouncedSaveFilterModel = debounce(this.cacheFilterConfig.bind(this), DEBOUNCE_TIME);
|
|
87
|
+
// Coalesces bursts of column-visibility events (e.g. a "hide all" tool-panel toggle fires one
|
|
88
|
+
// per column) into a single datasource notification + reload.
|
|
89
|
+
this.debouncedNotifyDatasourceVisibleColumns = debounce(this.notifyDatasourceVisibleColumns.bind(this), DEBOUNCE_TIME);
|
|
87
90
|
// Genesis-specific attrs
|
|
88
91
|
this.autoCellRendererByType = false;
|
|
89
92
|
this.onlyTemplateColDefs = false;
|
|
@@ -922,10 +925,30 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
922
925
|
this.querySelector('grid-pro-client-side-datasource') ||
|
|
923
926
|
this.querySelector('grid-pro-server-side-datasource'));
|
|
924
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* Reports the currently visible columns to the datasource. The datasource decides what to do with
|
|
930
|
+
* them (e.g. narrowing the server request); the grid stays agnostic of that behaviour.
|
|
931
|
+
* @internal
|
|
932
|
+
*/
|
|
933
|
+
notifyDatasourceVisibleColumns() {
|
|
934
|
+
var _a, _b, _c, _d;
|
|
935
|
+
const datasource = this.gridProDatasource;
|
|
936
|
+
if (!datasource)
|
|
937
|
+
return;
|
|
938
|
+
const visibleFields = resolveVisibleColumnFields((_b = (_a = this.columnApi) === null || _a === void 0 ? void 0 : _a.getAllDisplayedColumns) === null || _b === void 0 ? void 0 : _b.call(_a), (_d = (_c = this.gridApi) === null || _c === void 0 ? void 0 : _c.getColumnDefs) === null || _d === void 0 ? void 0 : _d.call(_c));
|
|
939
|
+
// Skip empty results so we never overwrite a known visible set with nothing (e.g. when the
|
|
940
|
+
// column API/defs aren't populated yet during early lifecycle).
|
|
941
|
+
if (!visibleFields.length)
|
|
942
|
+
return;
|
|
943
|
+
datasource.setVisibleColumns(visibleFields);
|
|
944
|
+
}
|
|
925
945
|
set gridOptions(options) {
|
|
926
946
|
if (!this.applyingDatasourceGridOptions && options) {
|
|
927
947
|
this.userProvidedGridOptions = Object.assign({}, options);
|
|
928
948
|
}
|
|
949
|
+
// Column move/resize/pin/sort don't change which fields are visible, so they only need the
|
|
950
|
+
// column-state/autosize bookkeeping below; visibility notification is wired separately (via
|
|
951
|
+
// onColumnVisible/onDisplayedColumnsChanged) so it isn't tied to unrelated grid interactions.
|
|
929
952
|
const gridOnChangeCallback = () => {
|
|
930
953
|
if (this.disposed || !this.isConnected)
|
|
931
954
|
return;
|
|
@@ -933,6 +956,11 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
933
956
|
this.debouncedColumnAutosize();
|
|
934
957
|
this.invalidateColumnWidthCache();
|
|
935
958
|
};
|
|
959
|
+
const notifyVisibilityChanged = () => {
|
|
960
|
+
if (this.disposed || !this.isConnected)
|
|
961
|
+
return;
|
|
962
|
+
this.debouncedNotifyDatasourceVisibleColumns();
|
|
963
|
+
};
|
|
936
964
|
Array.from(this.attributes).forEach((attribute) => {
|
|
937
965
|
const attrName = this.agPropertiesMap[attribute.name];
|
|
938
966
|
if (!attrName)
|
|
@@ -971,6 +999,9 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
971
999
|
event,
|
|
972
1000
|
gridId: this.id,
|
|
973
1001
|
});
|
|
1002
|
+
// Seed the datasource with the initially visible columns before the load is kicked off, so
|
|
1003
|
+
// a datasource that scopes its request to visible columns can narrow the first request.
|
|
1004
|
+
this.notifyDatasourceVisibleColumns();
|
|
974
1005
|
// Emit datasource ready event, signals that the datasource is ready to be used
|
|
975
1006
|
// TODO: prevent rendering datasource slot until grid is ready
|
|
976
1007
|
// so there is no need for this even and handling it in datasources
|
|
@@ -983,11 +1014,27 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
983
1014
|
}, onFirstDataRendered: (event) => {
|
|
984
1015
|
// Handle column sizing
|
|
985
1016
|
this.handleColumnSizing();
|
|
1017
|
+
// Safety net: by now the column API is populated, so (re)seed the datasource's visible
|
|
1018
|
+
// columns in case the initial grid-ready seed ran before columns were available.
|
|
1019
|
+
this.notifyDatasourceVisibleColumns();
|
|
986
1020
|
// Call the original onFirstDataRendered if provided
|
|
987
1021
|
if (onFirstDataRendered) {
|
|
988
1022
|
onFirstDataRendered(event);
|
|
989
1023
|
}
|
|
990
|
-
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback,
|
|
1024
|
+
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback,
|
|
1025
|
+
// Primary visibility trigger: fires per-column on show/hide, from the tool panel, header
|
|
1026
|
+
// menu, or API calls alike.
|
|
1027
|
+
onColumnVisible: () => {
|
|
1028
|
+
gridOnChangeCallback();
|
|
1029
|
+
notifyVisibilityChanged();
|
|
1030
|
+
},
|
|
1031
|
+
// Fallback for bulk tool-panel operations (e.g. "select all") that may not cleanly emit one
|
|
1032
|
+
// onColumnVisible per column across entry points; debounced alongside it so a burst still
|
|
1033
|
+
// collapses into a single datasource reload.
|
|
1034
|
+
onDisplayedColumnsChanged: () => {
|
|
1035
|
+
gridOnChangeCallback();
|
|
1036
|
+
notifyVisibilityChanged();
|
|
1037
|
+
}, onFilterChanged: (filterChangedEvent) => {
|
|
991
1038
|
if (this.disposed || !this.isConnected)
|
|
992
1039
|
return;
|
|
993
1040
|
this.debouncedSaveFilterModel();
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -14999,6 +14999,54 @@
|
|
|
14999
14999
|
"isAbstract": false,
|
|
15000
15000
|
"name": "setDisconnected"
|
|
15001
15001
|
},
|
|
15002
|
+
{
|
|
15003
|
+
"kind": "Method",
|
|
15004
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#setVisibleColumns:member(1)",
|
|
15005
|
+
"docComment": "/**\n * Notifies the datasource of the field names of the currently visible columns.\n *\n * @remarks\n *\n * No-op by default. Datasources that support column-scoped requests override this to narrow the server query and reload data when the visible column set changes.\n *\n * @param visibleFields - Field names of the currently visible columns.\n *\n * @public\n */\n",
|
|
15006
|
+
"excerptTokens": [
|
|
15007
|
+
{
|
|
15008
|
+
"kind": "Content",
|
|
15009
|
+
"text": "setVisibleColumns(visibleFields: "
|
|
15010
|
+
},
|
|
15011
|
+
{
|
|
15012
|
+
"kind": "Content",
|
|
15013
|
+
"text": "string[]"
|
|
15014
|
+
},
|
|
15015
|
+
{
|
|
15016
|
+
"kind": "Content",
|
|
15017
|
+
"text": "): "
|
|
15018
|
+
},
|
|
15019
|
+
{
|
|
15020
|
+
"kind": "Content",
|
|
15021
|
+
"text": "void"
|
|
15022
|
+
},
|
|
15023
|
+
{
|
|
15024
|
+
"kind": "Content",
|
|
15025
|
+
"text": ";"
|
|
15026
|
+
}
|
|
15027
|
+
],
|
|
15028
|
+
"isStatic": false,
|
|
15029
|
+
"returnTypeTokenRange": {
|
|
15030
|
+
"startIndex": 3,
|
|
15031
|
+
"endIndex": 4
|
|
15032
|
+
},
|
|
15033
|
+
"releaseTag": "Public",
|
|
15034
|
+
"isProtected": false,
|
|
15035
|
+
"overloadIndex": 1,
|
|
15036
|
+
"parameters": [
|
|
15037
|
+
{
|
|
15038
|
+
"parameterName": "visibleFields",
|
|
15039
|
+
"parameterTypeTokenRange": {
|
|
15040
|
+
"startIndex": 1,
|
|
15041
|
+
"endIndex": 2
|
|
15042
|
+
},
|
|
15043
|
+
"isOptional": false
|
|
15044
|
+
}
|
|
15045
|
+
],
|
|
15046
|
+
"isOptional": false,
|
|
15047
|
+
"isAbstract": false,
|
|
15048
|
+
"name": "setVisibleColumns"
|
|
15049
|
+
},
|
|
15002
15050
|
{
|
|
15003
15051
|
"kind": "Method",
|
|
15004
15052
|
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#subscribeToConnection:member(1)",
|
|
@@ -20192,6 +20240,36 @@
|
|
|
20192
20240
|
"isAbstract": false,
|
|
20193
20241
|
"name": "requestChanged"
|
|
20194
20242
|
},
|
|
20243
|
+
{
|
|
20244
|
+
"kind": "Property",
|
|
20245
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#requestVisibleColumnsOnly:member",
|
|
20246
|
+
"docComment": "/**\n * When enabled and column definitions are provided, the datasource requests data only for the columns that are currently visible. The visible set is seeded from the column config (columns not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data is reloaded whenever that set changes.\n *\n * @remarks\n *\n * DATASERVER only. @default false\n */\n",
|
|
20247
|
+
"excerptTokens": [
|
|
20248
|
+
{
|
|
20249
|
+
"kind": "Content",
|
|
20250
|
+
"text": "requestVisibleColumnsOnly: "
|
|
20251
|
+
},
|
|
20252
|
+
{
|
|
20253
|
+
"kind": "Content",
|
|
20254
|
+
"text": "boolean"
|
|
20255
|
+
},
|
|
20256
|
+
{
|
|
20257
|
+
"kind": "Content",
|
|
20258
|
+
"text": ";"
|
|
20259
|
+
}
|
|
20260
|
+
],
|
|
20261
|
+
"isReadonly": false,
|
|
20262
|
+
"isOptional": false,
|
|
20263
|
+
"releaseTag": "Public",
|
|
20264
|
+
"name": "requestVisibleColumnsOnly",
|
|
20265
|
+
"propertyTypeTokenRange": {
|
|
20266
|
+
"startIndex": 1,
|
|
20267
|
+
"endIndex": 2
|
|
20268
|
+
},
|
|
20269
|
+
"isStatic": false,
|
|
20270
|
+
"isProtected": false,
|
|
20271
|
+
"isAbstract": false
|
|
20272
|
+
},
|
|
20195
20273
|
{
|
|
20196
20274
|
"kind": "Method",
|
|
20197
20275
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#reset:member(1)",
|
|
@@ -20387,6 +20465,54 @@
|
|
|
20387
20465
|
"isAbstract": false,
|
|
20388
20466
|
"name": "setFilter"
|
|
20389
20467
|
},
|
|
20468
|
+
{
|
|
20469
|
+
"kind": "Method",
|
|
20470
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#setVisibleColumns:member(1)",
|
|
20471
|
+
"docComment": "/**\n * Updates the set of visible columns and reloads the data when the set changes.\n *\n * @remarks\n *\n * Called by the host grid on column visibility changes; no-ops unless `requestVisibleColumnsOnly` is enabled. DATASERVER only; no-ops for other resource types.\n *\n * @param visibleFields - Field names of the currently visible columns.\n *\n * @public\n */\n",
|
|
20472
|
+
"excerptTokens": [
|
|
20473
|
+
{
|
|
20474
|
+
"kind": "Content",
|
|
20475
|
+
"text": "setVisibleColumns(visibleFields: "
|
|
20476
|
+
},
|
|
20477
|
+
{
|
|
20478
|
+
"kind": "Content",
|
|
20479
|
+
"text": "string[]"
|
|
20480
|
+
},
|
|
20481
|
+
{
|
|
20482
|
+
"kind": "Content",
|
|
20483
|
+
"text": "): "
|
|
20484
|
+
},
|
|
20485
|
+
{
|
|
20486
|
+
"kind": "Content",
|
|
20487
|
+
"text": "void"
|
|
20488
|
+
},
|
|
20489
|
+
{
|
|
20490
|
+
"kind": "Content",
|
|
20491
|
+
"text": ";"
|
|
20492
|
+
}
|
|
20493
|
+
],
|
|
20494
|
+
"isStatic": false,
|
|
20495
|
+
"returnTypeTokenRange": {
|
|
20496
|
+
"startIndex": 3,
|
|
20497
|
+
"endIndex": 4
|
|
20498
|
+
},
|
|
20499
|
+
"releaseTag": "Public",
|
|
20500
|
+
"isProtected": false,
|
|
20501
|
+
"overloadIndex": 1,
|
|
20502
|
+
"parameters": [
|
|
20503
|
+
{
|
|
20504
|
+
"parameterName": "visibleFields",
|
|
20505
|
+
"parameterTypeTokenRange": {
|
|
20506
|
+
"startIndex": 1,
|
|
20507
|
+
"endIndex": 2
|
|
20508
|
+
},
|
|
20509
|
+
"isOptional": false
|
|
20510
|
+
}
|
|
20511
|
+
],
|
|
20512
|
+
"isOptional": false,
|
|
20513
|
+
"isAbstract": false,
|
|
20514
|
+
"name": "setVisibleColumns"
|
|
20515
|
+
},
|
|
20390
20516
|
{
|
|
20391
20517
|
"kind": "Property",
|
|
20392
20518
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#transactionData:member",
|
|
@@ -26989,6 +27115,72 @@
|
|
|
26989
27115
|
"endIndex": 2
|
|
26990
27116
|
}
|
|
26991
27117
|
},
|
|
27118
|
+
{
|
|
27119
|
+
"kind": "Function",
|
|
27120
|
+
"canonicalReference": "@genesislcap/grid-pro!resolveVisibleColumnFields:function(1)",
|
|
27121
|
+
"docComment": "/**\n * Resolves the field names of the currently visible columns.\n *\n * @remarks\n *\n * Prefers the grid's displayed columns (`getAllDisplayedColumns()` — already excludes hidden columns and children of collapsed groups, so no extra visibility check is needed); falls back to the current column defs (available earlier in the lifecycle than the columns), treating `hide` as not visible. Shared by the host grids to report the visible set to the datasource. Typed structurally so it works across the differing AG Grid type packages the grids depend on.\n *\n * @param displayedColumns - The grid's currently displayed columns, when available.\n *\n * @param colDefs - The current column defs, used as a fallback before the columns are populated.\n *\n * @public\n */\n",
|
|
27122
|
+
"excerptTokens": [
|
|
27123
|
+
{
|
|
27124
|
+
"kind": "Content",
|
|
27125
|
+
"text": "export declare function resolveVisibleColumnFields(displayedColumns: "
|
|
27126
|
+
},
|
|
27127
|
+
{
|
|
27128
|
+
"kind": "Reference",
|
|
27129
|
+
"text": "DisplayedColumnLike",
|
|
27130
|
+
"canonicalReference": "@genesislcap/grid-pro!~DisplayedColumnLike:interface"
|
|
27131
|
+
},
|
|
27132
|
+
{
|
|
27133
|
+
"kind": "Content",
|
|
27134
|
+
"text": "[] | null | undefined"
|
|
27135
|
+
},
|
|
27136
|
+
{
|
|
27137
|
+
"kind": "Content",
|
|
27138
|
+
"text": ", colDefs: "
|
|
27139
|
+
},
|
|
27140
|
+
{
|
|
27141
|
+
"kind": "Content",
|
|
27142
|
+
"text": "readonly unknown[] | null | undefined"
|
|
27143
|
+
},
|
|
27144
|
+
{
|
|
27145
|
+
"kind": "Content",
|
|
27146
|
+
"text": "): "
|
|
27147
|
+
},
|
|
27148
|
+
{
|
|
27149
|
+
"kind": "Content",
|
|
27150
|
+
"text": "string[]"
|
|
27151
|
+
},
|
|
27152
|
+
{
|
|
27153
|
+
"kind": "Content",
|
|
27154
|
+
"text": ";"
|
|
27155
|
+
}
|
|
27156
|
+
],
|
|
27157
|
+
"fileUrlPath": "src/column/utils/grid-pro-columns.ts",
|
|
27158
|
+
"returnTypeTokenRange": {
|
|
27159
|
+
"startIndex": 6,
|
|
27160
|
+
"endIndex": 7
|
|
27161
|
+
},
|
|
27162
|
+
"releaseTag": "Public",
|
|
27163
|
+
"overloadIndex": 1,
|
|
27164
|
+
"parameters": [
|
|
27165
|
+
{
|
|
27166
|
+
"parameterName": "displayedColumns",
|
|
27167
|
+
"parameterTypeTokenRange": {
|
|
27168
|
+
"startIndex": 1,
|
|
27169
|
+
"endIndex": 3
|
|
27170
|
+
},
|
|
27171
|
+
"isOptional": false
|
|
27172
|
+
},
|
|
27173
|
+
{
|
|
27174
|
+
"parameterName": "colDefs",
|
|
27175
|
+
"parameterTypeTokenRange": {
|
|
27176
|
+
"startIndex": 4,
|
|
27177
|
+
"endIndex": 5
|
|
27178
|
+
},
|
|
27179
|
+
"isOptional": false
|
|
27180
|
+
}
|
|
27181
|
+
],
|
|
27182
|
+
"name": "resolveVisibleColumnFields"
|
|
27183
|
+
},
|
|
26992
27184
|
{
|
|
26993
27185
|
"kind": "Class",
|
|
26994
27186
|
"canonicalReference": "@genesislcap/grid-pro!RowCountStatusBarComponent:class",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -847,6 +847,13 @@ export declare const defaultGridProConfig: {
|
|
|
847
847
|
/** Class name used to hide elements with display:none */
|
|
848
848
|
export declare const DISPLAY_NONE_CLASS = "dnone";
|
|
849
849
|
|
|
850
|
+
/** Minimal shape of a displayed AG Grid column needed to resolve its field (package-agnostic). */
|
|
851
|
+
declare interface DisplayedColumnLike {
|
|
852
|
+
getColDef(): {
|
|
853
|
+
field?: string | null;
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
|
|
850
857
|
/** The CSS variable to use for specifying the dropdown's width */
|
|
851
858
|
export declare const dropdownWidthVar = "--dropdown-width";
|
|
852
859
|
|
|
@@ -2120,6 +2127,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
2120
2127
|
private disposed;
|
|
2121
2128
|
private readonly debouncedSaveColumnState;
|
|
2122
2129
|
private readonly debouncedSaveFilterModel;
|
|
2130
|
+
private readonly debouncedNotifyDatasourceVisibleColumns;
|
|
2123
2131
|
autoCellRendererByType: boolean;
|
|
2124
2132
|
onlyTemplateColDefs: boolean;
|
|
2125
2133
|
/**
|
|
@@ -2485,6 +2493,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
2485
2493
|
* @public
|
|
2486
2494
|
*/
|
|
2487
2495
|
get gridProDatasource(): GridProBaseDatasource;
|
|
2496
|
+
/**
|
|
2497
|
+
* Reports the currently visible columns to the datasource. The datasource decides what to do with
|
|
2498
|
+
* them (e.g. narrowing the server request); the grid stays agnostic of that behaviour.
|
|
2499
|
+
* @internal
|
|
2500
|
+
*/
|
|
2501
|
+
private notifyDatasourceVisibleColumns;
|
|
2488
2502
|
set gridOptions(options: GridOptionsConfig);
|
|
2489
2503
|
private setLocalGridOptions;
|
|
2490
2504
|
/**
|
|
@@ -2954,6 +2968,14 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
|
|
|
2954
2968
|
private mapTransaction;
|
|
2955
2969
|
protected pagination: boolean;
|
|
2956
2970
|
loadMore(): void;
|
|
2971
|
+
/**
|
|
2972
|
+
* Notifies the datasource of the field names of the currently visible columns.
|
|
2973
|
+
* @remarks No-op by default. Datasources that support column-scoped requests override this to
|
|
2974
|
+
* narrow the server query and reload data when the visible column set changes.
|
|
2975
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
2976
|
+
* @public
|
|
2977
|
+
*/
|
|
2978
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
2957
2979
|
restart(): void;
|
|
2958
2980
|
reloadResourceData(): void;
|
|
2959
2981
|
destroy(): void;
|
|
@@ -3006,6 +3028,7 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
3006
3028
|
private disposed;
|
|
3007
3029
|
private readonly debouncedSaveColumnState;
|
|
3008
3030
|
private readonly debouncedSaveFilterModel;
|
|
3031
|
+
private readonly debouncedNotifyDatasourceVisibleColumns;
|
|
3009
3032
|
autoCellRendererByType: boolean;
|
|
3010
3033
|
onlyTemplateColDefs: boolean;
|
|
3011
3034
|
/**
|
|
@@ -3325,6 +3348,12 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
3325
3348
|
* @public
|
|
3326
3349
|
*/
|
|
3327
3350
|
get gridProDatasource(): GridProBaseDatasource;
|
|
3351
|
+
/**
|
|
3352
|
+
* Reports the currently visible columns to the datasource. The datasource decides what to do with
|
|
3353
|
+
* them (e.g. narrowing the server request); the grid stays agnostic of that behaviour.
|
|
3354
|
+
* @internal
|
|
3355
|
+
*/
|
|
3356
|
+
private notifyDatasourceVisibleColumns;
|
|
3328
3357
|
set gridOptions(options: GridOptions_2);
|
|
3329
3358
|
private setLocalGridOptions;
|
|
3330
3359
|
/**
|
|
@@ -4420,6 +4449,16 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4420
4449
|
requestChanged(oldRequest: string, newRequest: string): void;
|
|
4421
4450
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
4422
4451
|
keepColDefsOnClearRowData: boolean;
|
|
4452
|
+
/**
|
|
4453
|
+
* When enabled and column definitions are provided, the datasource requests data only for the
|
|
4454
|
+
* columns that are currently visible. The visible set is seeded from the column config (columns
|
|
4455
|
+
* not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data
|
|
4456
|
+
* is reloaded whenever that set changes.
|
|
4457
|
+
* @remarks DATASERVER only.
|
|
4458
|
+
* @default false
|
|
4459
|
+
*/
|
|
4460
|
+
requestVisibleColumnsOnly: boolean;
|
|
4461
|
+
private _visibleColumns;
|
|
4423
4462
|
private dataSub;
|
|
4424
4463
|
private updateSub;
|
|
4425
4464
|
private requiresFullRowDataAndColDefs;
|
|
@@ -4536,6 +4575,38 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4536
4575
|
* @param deletes - List of records to remove from the grid stream
|
|
4537
4576
|
*/
|
|
4538
4577
|
handleStreamDeletes(deletes?: any[]): void;
|
|
4578
|
+
/**
|
|
4579
|
+
* Extends the base options to constrain the requested fields to the visible columns when
|
|
4580
|
+
* `requestVisibleColumnsOnly` is enabled.
|
|
4581
|
+
* @remarks DATASERVER only; for other resource types the derived `fields` are ignored.
|
|
4582
|
+
* @internal
|
|
4583
|
+
*/
|
|
4584
|
+
protected datasourceOptions(): DatasourceOptions;
|
|
4585
|
+
/**
|
|
4586
|
+
* Builds the DATASERVER `FIELDS` string (space-separated) from the visible columns, always
|
|
4587
|
+
* including the `rowId` so rows can be tracked.
|
|
4588
|
+
* @internal
|
|
4589
|
+
*/
|
|
4590
|
+
private getRequestedFields;
|
|
4591
|
+
/**
|
|
4592
|
+
* Returns the field names of the configured columns that are not hidden, used to seed the visible
|
|
4593
|
+
* set before the host grid reports runtime visibility.
|
|
4594
|
+
* @internal
|
|
4595
|
+
*/
|
|
4596
|
+
private getConfiguredVisibleColumns;
|
|
4597
|
+
/**
|
|
4598
|
+
* Updates the set of visible columns and reloads the data when the set changes.
|
|
4599
|
+
* @remarks Called by the host grid on column visibility changes; no-ops unless
|
|
4600
|
+
* `requestVisibleColumnsOnly` is enabled. DATASERVER only; no-ops for other resource types.
|
|
4601
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
4602
|
+
* @public
|
|
4603
|
+
*/
|
|
4604
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
4605
|
+
/**
|
|
4606
|
+
* Compares two column field lists irrespective of order.
|
|
4607
|
+
* @internal
|
|
4608
|
+
*/
|
|
4609
|
+
private columnsChanged;
|
|
4539
4610
|
loadMore(): void;
|
|
4540
4611
|
}
|
|
4541
4612
|
|
|
@@ -6494,6 +6565,19 @@ export declare type ReloadStatusBarParams = {
|
|
|
6494
6565
|
tooltip?: string;
|
|
6495
6566
|
};
|
|
6496
6567
|
|
|
6568
|
+
/**
|
|
6569
|
+
* Resolves the field names of the currently visible columns.
|
|
6570
|
+
* @remarks Prefers the grid's displayed columns (`getAllDisplayedColumns()` — already excludes
|
|
6571
|
+
* hidden columns and children of collapsed groups, so no extra visibility check is needed); falls
|
|
6572
|
+
* back to the current column defs (available earlier in the lifecycle than the columns), treating
|
|
6573
|
+
* `hide` as not visible. Shared by the host grids to report the visible set to the datasource.
|
|
6574
|
+
* Typed structurally so it works across the differing AG Grid type packages the grids depend on.
|
|
6575
|
+
* @param displayedColumns - The grid's currently displayed columns, when available.
|
|
6576
|
+
* @param colDefs - The current column defs, used as a fallback before the columns are populated.
|
|
6577
|
+
* @public
|
|
6578
|
+
*/
|
|
6579
|
+
export declare function resolveVisibleColumnFields(displayedColumns: DisplayedColumnLike[] | null | undefined, colDefs: readonly unknown[] | null | undefined): string[];
|
|
6580
|
+
|
|
6497
6581
|
/**
|
|
6498
6582
|
* Row Count Status Bar Component for Server-Side Infinite Scroll
|
|
6499
6583
|
* Displays current row count information for server-side grids without pagination.
|
package/dist/react.cjs
CHANGED
|
@@ -121,11 +121,6 @@ const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
121
121
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
125
|
-
const { children, ...rest } = props;
|
|
126
|
-
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
124
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
130
125
|
const { children, ...rest } = props;
|
|
131
126
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -166,6 +161,11 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
|
|
|
166
161
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
167
162
|
});
|
|
168
163
|
|
|
164
|
+
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
165
|
+
const { children, ...rest } = props;
|
|
166
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
167
|
+
});
|
|
168
|
+
|
|
169
169
|
const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
170
170
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
171
171
|
const _innerRef = React.useRef(null);
|
|
@@ -491,7 +491,6 @@ module.exports = {
|
|
|
491
491
|
NumberEditor,
|
|
492
492
|
SelectEditor,
|
|
493
493
|
StringEditor,
|
|
494
|
-
GridProColumn,
|
|
495
494
|
ActionRenderer,
|
|
496
495
|
ActionsMenuRenderer,
|
|
497
496
|
BooleanRenderer,
|
|
@@ -500,6 +499,7 @@ module.exports = {
|
|
|
500
499
|
StatusPillRenderer,
|
|
501
500
|
AgTextFieldRenderer,
|
|
502
501
|
AgTextRenderer,
|
|
502
|
+
GridProColumn,
|
|
503
503
|
GridProClientSideDatasource,
|
|
504
504
|
GridProServerSideDatasource,
|
|
505
505
|
GridProGenesisDatasource,
|
package/dist/react.mjs
CHANGED
|
@@ -119,11 +119,6 @@ export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
119
119
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
123
|
-
const { children, ...rest } = props;
|
|
124
|
-
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
122
|
export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
128
123
|
const { children, ...rest } = props;
|
|
129
124
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -164,6 +159,11 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
|
|
|
164
159
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
165
160
|
});
|
|
166
161
|
|
|
162
|
+
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
163
|
+
const { children, ...rest } = props;
|
|
164
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
167
|
export const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
168
168
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
169
169
|
const _innerRef = React.useRef(null);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-pro",
|
|
3
3
|
"description": "Genesis Foundation AG Grid",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.488.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@genesislcap/foundation-testing": "14.
|
|
44
|
-
"@genesislcap/genx": "14.
|
|
45
|
-
"@genesislcap/rollup-builder": "14.
|
|
46
|
-
"@genesislcap/ts-builder": "14.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
48
|
-
"@genesislcap/vite-builder": "14.
|
|
49
|
-
"@genesislcap/webpack-builder": "14.
|
|
43
|
+
"@genesislcap/foundation-testing": "14.488.0",
|
|
44
|
+
"@genesislcap/genx": "14.488.0",
|
|
45
|
+
"@genesislcap/rollup-builder": "14.488.0",
|
|
46
|
+
"@genesislcap/ts-builder": "14.488.0",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "14.488.0",
|
|
48
|
+
"@genesislcap/vite-builder": "14.488.0",
|
|
49
|
+
"@genesislcap/webpack-builder": "14.488.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@genesislcap/foundation-comms": "14.
|
|
53
|
-
"@genesislcap/foundation-criteria": "14.
|
|
54
|
-
"@genesislcap/foundation-logger": "14.
|
|
55
|
-
"@genesislcap/foundation-ui": "14.
|
|
56
|
-
"@genesislcap/foundation-utils": "14.
|
|
52
|
+
"@genesislcap/foundation-comms": "14.488.0",
|
|
53
|
+
"@genesislcap/foundation-criteria": "14.488.0",
|
|
54
|
+
"@genesislcap/foundation-logger": "14.488.0",
|
|
55
|
+
"@genesislcap/foundation-ui": "14.488.0",
|
|
56
|
+
"@genesislcap/foundation-utils": "14.488.0",
|
|
57
57
|
"@microsoft/fast-colors": "5.3.1",
|
|
58
58
|
"@microsoft/fast-components": "2.30.6",
|
|
59
59
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"require": "./dist/react.cjs"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "621daeb7e3612007d300f8510bb6d12b80a5cb53"
|
|
95
95
|
}
|