@genesislcap/grid-pro 14.147.1-alpha-e3b7ca7.0 → 14.148.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 +5 -46
- package/dist/dts/datasource/server-side.datasource.d.ts +7 -10
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/esm/datasource/server-side.datasource.js +27 -82
- package/dist/grid-pro.d.ts +7 -10
- package/docs/api-report.md +2 -4
- package/package.json +13 -13
|
@@ -7934,7 +7934,8 @@
|
|
|
7934
7934
|
},
|
|
7935
7935
|
{
|
|
7936
7936
|
"kind": "method",
|
|
7937
|
-
"name": "dataLogoff"
|
|
7937
|
+
"name": "dataLogoff",
|
|
7938
|
+
"privacy": "private"
|
|
7938
7939
|
},
|
|
7939
7940
|
{
|
|
7940
7941
|
"kind": "method",
|
|
@@ -7954,42 +7955,6 @@
|
|
|
7954
7955
|
}
|
|
7955
7956
|
]
|
|
7956
7957
|
},
|
|
7957
|
-
{
|
|
7958
|
-
"kind": "method",
|
|
7959
|
-
"name": "getAvailableIndexes",
|
|
7960
|
-
"privacy": "private",
|
|
7961
|
-
"return": {
|
|
7962
|
-
"type": {
|
|
7963
|
-
"text": "string[]"
|
|
7964
|
-
}
|
|
7965
|
-
},
|
|
7966
|
-
"parameters": [
|
|
7967
|
-
{
|
|
7968
|
-
"name": "data",
|
|
7969
|
-
"type": {
|
|
7970
|
-
"text": "Map<string, [string]>"
|
|
7971
|
-
}
|
|
7972
|
-
}
|
|
7973
|
-
]
|
|
7974
|
-
},
|
|
7975
|
-
{
|
|
7976
|
-
"kind": "method",
|
|
7977
|
-
"name": "getAvailableIndexFields",
|
|
7978
|
-
"privacy": "private",
|
|
7979
|
-
"return": {
|
|
7980
|
-
"type": {
|
|
7981
|
-
"text": "string[]"
|
|
7982
|
-
}
|
|
7983
|
-
},
|
|
7984
|
-
"parameters": [
|
|
7985
|
-
{
|
|
7986
|
-
"name": "data",
|
|
7987
|
-
"type": {
|
|
7988
|
-
"text": "Map<string, [string]>"
|
|
7989
|
-
}
|
|
7990
|
-
}
|
|
7991
|
-
]
|
|
7992
|
-
},
|
|
7993
7958
|
{
|
|
7994
7959
|
"kind": "method",
|
|
7995
7960
|
"name": "handleCurrentStreamLoad",
|
|
@@ -8185,11 +8150,11 @@
|
|
|
8185
8150
|
},
|
|
8186
8151
|
{
|
|
8187
8152
|
"kind": "method",
|
|
8188
|
-
"name": "
|
|
8153
|
+
"name": "init"
|
|
8189
8154
|
},
|
|
8190
8155
|
{
|
|
8191
8156
|
"kind": "method",
|
|
8192
|
-
"name": "
|
|
8157
|
+
"name": "reset"
|
|
8193
8158
|
},
|
|
8194
8159
|
{
|
|
8195
8160
|
"kind": "method",
|
|
@@ -8198,13 +8163,7 @@
|
|
|
8198
8163
|
{
|
|
8199
8164
|
"kind": "method",
|
|
8200
8165
|
"name": "clearRowData",
|
|
8201
|
-
"privacy": "private"
|
|
8202
|
-
"parameters": [
|
|
8203
|
-
{
|
|
8204
|
-
"name": "withColumnDefs",
|
|
8205
|
-
"default": "true"
|
|
8206
|
-
}
|
|
8207
|
-
]
|
|
8166
|
+
"privacy": "private"
|
|
8208
8167
|
},
|
|
8209
8168
|
{
|
|
8210
8169
|
"kind": "method",
|
|
@@ -53,11 +53,9 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
53
53
|
constructor(options: StreamDatasourceOptions);
|
|
54
54
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
55
55
|
private sortMapByNumericKey;
|
|
56
|
-
dataLogoff
|
|
56
|
+
private dataLogoff;
|
|
57
57
|
private restartSubscription;
|
|
58
58
|
private getOrderByAndToBeSortedColIds;
|
|
59
|
-
private getAvailableIndexes;
|
|
60
|
-
private getAvailableIndexFields;
|
|
61
59
|
private handleCurrentStreamLoad;
|
|
62
60
|
private buildCriteriaMatchFromFilters;
|
|
63
61
|
private criteriaFromFilters;
|
|
@@ -214,6 +212,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
214
212
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
215
213
|
readonly ELEMENT_NODE: number;
|
|
216
214
|
readonly ENTITY_NODE: number;
|
|
215
|
+
/**
|
|
216
|
+
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
217
|
+
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
218
|
+
* @alpha
|
|
219
|
+
*/
|
|
217
220
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
218
221
|
readonly NOTATION_NODE: number;
|
|
219
222
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -397,12 +400,6 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
397
400
|
applyFuncName: string;
|
|
398
401
|
applyAsyncFuncName: string;
|
|
399
402
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
400
|
-
/**
|
|
401
|
-
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
402
|
-
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
private reloadResourceData;
|
|
406
403
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
407
404
|
pagination: boolean;
|
|
408
405
|
private indexes;
|
|
@@ -411,8 +408,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
411
408
|
connectedCallback(): void;
|
|
412
409
|
disconnectedCallback(): void;
|
|
413
410
|
deepClone(): Node;
|
|
414
|
-
deinit(): void;
|
|
415
411
|
init(): void;
|
|
412
|
+
reset(): void;
|
|
416
413
|
restart(): void;
|
|
417
414
|
private clearRowData;
|
|
418
415
|
private getResourceIndexes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":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iBAAiB,SAAK;IAEtB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,qBAAqB,CAAoB;IACjD,OAAO,CAAC,gBAAgB,CAAkB;gBAE9B,OAAO,EAAE,uBAAuB;IAiBtC,OAAO,CAAC,MAAM,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,OAAO,EAKP,wBAAwB,EAIxB,cAAc,EAGd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,oBAAqB,YAAW,qBAAqB;IACnF,IAAI,EAAG,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAJH;;;;GAIG;AACH,qBAGa,2BAA4B,SAAQ,gCAAqC;IACpF,aAAa,SAAgC;IAC7C,kBAAkB,SAAqC;IAEvD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAWxD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAK3B,UAAU,UAAS;IAE9C,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAmB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,iBAAiB;IASjB,oBAAoB;IASX,SAAS,IAAI,IAAI;IAO1B,IAAI;IAsEJ,KAAK;IAOL,OAAO;IAKP,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,kBAAkB;IAU1B,IAAI,MAAM,QA2BT;IAED,IAAI,QAAQ,IAAI,mBAAmB,CAElC;YAEa,sBAAsB;IAoCpC,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,eAAe;IA6Dd,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,GAAG,2BAA2B;IAIhF,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,2BAA2B,KAAK,IAAI;CAIxD"}
|
|
@@ -72,21 +72,12 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
72
72
|
const coldIdBeingSorted = this.currentSortModel[0].colId; // Not allowing multiple sorts by user
|
|
73
73
|
const sortTypeBeingApplied = this.currentSortModel[0].sort;
|
|
74
74
|
const orderByAndToBeSortedColIds = this.getOrderByAndToBeSortedColIds(this.resourceIndexes, coldIdBeingSorted);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
orderByAndToBeSortedColIds.toBeSorted.forEach((colId) => {
|
|
84
|
-
this.currentSortModel.push({ sort: sortTypeBeingApplied, colId });
|
|
85
|
-
});
|
|
86
|
-
this.resourceParams.ORDER_BY = orderByAndToBeSortedColIds.orderBy;
|
|
87
|
-
this.resourceParams.REVERSE = sortTypeBeingApplied === 'desc' ? true : false;
|
|
88
|
-
this.restartSubscription();
|
|
89
|
-
}
|
|
75
|
+
orderByAndToBeSortedColIds.toBeSorted.forEach((colId) => {
|
|
76
|
+
this.currentSortModel.push({ sort: sortTypeBeingApplied, colId });
|
|
77
|
+
});
|
|
78
|
+
this.resourceParams.ORDER_BY = orderByAndToBeSortedColIds.orderBy;
|
|
79
|
+
this.resourceParams.REVERSE = sortTypeBeingApplied === 'desc' ? true : false;
|
|
80
|
+
this.restartSubscription();
|
|
90
81
|
}
|
|
91
82
|
}
|
|
92
83
|
if (this.moreRows && params.request.startRow >= Number(this.maxRows)) {
|
|
@@ -126,9 +117,7 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
126
117
|
const successRowData = {
|
|
127
118
|
rowData: Array.from(this.sortMapByNumericKey(this.rowData).values()),
|
|
128
119
|
};
|
|
129
|
-
if (this.pagination
|
|
130
|
-
// TODO: Will add a PA for server team, we're at a stage where Criteria Match needs to affect ROWS_COUNT
|
|
131
|
-
// This will cause "pagination" scenarios to show "of more" instead of actual count, less misleading.
|
|
120
|
+
if (this.pagination) {
|
|
132
121
|
successRowData.rowCount = Math.min(this.server_ROWS_COUNT, this.maxView);
|
|
133
122
|
}
|
|
134
123
|
if (params.request.endRow > this.maxView ||
|
|
@@ -174,31 +163,6 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
174
163
|
}
|
|
175
164
|
}
|
|
176
165
|
}
|
|
177
|
-
getAvailableIndexes(data) {
|
|
178
|
-
const availabeIndexes = [];
|
|
179
|
-
for (const [key] of data) {
|
|
180
|
-
if (key) {
|
|
181
|
-
availabeIndexes.push(key);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return availabeIndexes;
|
|
185
|
-
}
|
|
186
|
-
getAvailableIndexFields(data) {
|
|
187
|
-
const innermostValues = [];
|
|
188
|
-
function traverse(items) {
|
|
189
|
-
for (const item of items) {
|
|
190
|
-
if (item !== null) {
|
|
191
|
-
innermostValues.push(item);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
for (const [key, value] of data) {
|
|
196
|
-
if (key !== null && value !== null) {
|
|
197
|
-
traverse(value);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return innermostValues;
|
|
201
|
-
}
|
|
202
166
|
handleCurrentStreamLoad(result) {
|
|
203
167
|
var _a;
|
|
204
168
|
if (!result)
|
|
@@ -289,7 +253,6 @@ __decorate([
|
|
|
289
253
|
Connect
|
|
290
254
|
], StreamDatasource.prototype, "connect", void 0);
|
|
291
255
|
const criteriaDelimiter = ';';
|
|
292
|
-
const withoutColumnDefs = null;
|
|
293
256
|
/**
|
|
294
257
|
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
295
258
|
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
@@ -303,27 +266,14 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
303
266
|
this.pagination = false;
|
|
304
267
|
}
|
|
305
268
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
269
|
+
const startingCriteria = !oldCriteria && newCriteria;
|
|
270
|
+
const criteriaNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);
|
|
271
|
+
// TODO: FUI-1323 - account for linked grid scenarios too.
|
|
272
|
+
// TODO: check grid-pro-genesis-datasource criteriaChanged
|
|
273
|
+
if (!startingCriteria && criteriaNotDuplicate) {
|
|
274
|
+
this.restart();
|
|
309
275
|
}
|
|
310
276
|
}
|
|
311
|
-
/**
|
|
312
|
-
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
313
|
-
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
314
|
-
* @internal
|
|
315
|
-
*/
|
|
316
|
-
reloadResourceData() {
|
|
317
|
-
var _a, _b, _c;
|
|
318
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
this.ssrmDatasource.dataLogoff();
|
|
320
|
-
this.clearRowData(withoutColumnDefs);
|
|
321
|
-
this.ssrmDatasource = undefined;
|
|
322
|
-
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
323
|
-
(_c = (_b = this.agGrid) === null || _b === void 0 ? void 0 : _b.gridApi) === null || _c === void 0 ? void 0 : _c.showLoadingOverlay();
|
|
324
|
-
this.init();
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
277
|
resourceNameChanged(oldValue, newValue) {
|
|
328
278
|
if (!oldValue || oldValue === newValue)
|
|
329
279
|
return;
|
|
@@ -344,7 +294,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
344
294
|
DOM.queueUpdate(() => {
|
|
345
295
|
if (!shouldRunDisconnect)
|
|
346
296
|
return;
|
|
347
|
-
this.
|
|
297
|
+
this.reset();
|
|
348
298
|
});
|
|
349
299
|
}
|
|
350
300
|
deepClone() {
|
|
@@ -353,13 +303,6 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
353
303
|
copy.deferredColumnStates = structuredClone(this.deferredColumnStates);
|
|
354
304
|
return copy;
|
|
355
305
|
}
|
|
356
|
-
deinit() {
|
|
357
|
-
var _a;
|
|
358
|
-
this.clearRowData();
|
|
359
|
-
this.ssrmDatasource = undefined;
|
|
360
|
-
this.originalFieldDef = undefined;
|
|
361
|
-
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
362
|
-
}
|
|
363
306
|
init() {
|
|
364
307
|
if (this.agGrid && this.resourceName && this.connect.isConnected) {
|
|
365
308
|
this.agGrid.gridOptions = Object.assign({ getRowId: (params) => {
|
|
@@ -406,22 +349,25 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
406
349
|
}
|
|
407
350
|
logger.warn(`Application not connected, falling back to local columnDefs/rowData`);
|
|
408
351
|
}
|
|
352
|
+
reset() {
|
|
353
|
+
var _a;
|
|
354
|
+
this.clearRowData();
|
|
355
|
+
this.ssrmDatasource = undefined;
|
|
356
|
+
this.originalFieldDef = undefined;
|
|
357
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
358
|
+
}
|
|
409
359
|
restart() {
|
|
410
|
-
this.
|
|
360
|
+
this.reset();
|
|
411
361
|
this.init();
|
|
412
362
|
}
|
|
413
|
-
clearRowData(
|
|
363
|
+
clearRowData() {
|
|
414
364
|
var _a, _b, _c, _d;
|
|
415
|
-
this.
|
|
416
|
-
|
|
417
|
-
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
|
|
418
|
-
}
|
|
419
|
-
this.agTransaction = { remove: [] };
|
|
365
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
|
|
366
|
+
const agTransaction = { remove: [] };
|
|
420
367
|
(_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.forEachNode((node) => {
|
|
421
|
-
|
|
368
|
+
agTransaction.remove.push(node.data);
|
|
422
369
|
});
|
|
423
|
-
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(
|
|
424
|
-
this.agTransaction = undefined;
|
|
370
|
+
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(agTransaction);
|
|
425
371
|
}
|
|
426
372
|
getResourceIndexes(avaialbleIndexes) {
|
|
427
373
|
const resourceIndexesMap = new Map();
|
|
@@ -473,7 +419,6 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
473
419
|
const updatedInfo = yield this.connect.snapshot(this.resourceName, {
|
|
474
420
|
MAX_ROWS: 1,
|
|
475
421
|
MAX_VIEW: 1,
|
|
476
|
-
CRITERIA_MATCH: this.criteria,
|
|
477
422
|
});
|
|
478
423
|
this.ssrmDatasource.server_ROWS_COUNT = updatedInfo.ROWS_COUNT;
|
|
479
424
|
}
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -2170,12 +2170,6 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2170
2170
|
applyFuncName: string;
|
|
2171
2171
|
applyAsyncFuncName: string;
|
|
2172
2172
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
2173
|
-
/**
|
|
2174
|
-
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2175
|
-
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2176
|
-
* @internal
|
|
2177
|
-
*/
|
|
2178
|
-
private reloadResourceData;
|
|
2179
2173
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
2180
2174
|
pagination: boolean;
|
|
2181
2175
|
private indexes;
|
|
@@ -2184,8 +2178,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2184
2178
|
connectedCallback(): void;
|
|
2185
2179
|
disconnectedCallback(): void;
|
|
2186
2180
|
deepClone(): Node;
|
|
2187
|
-
deinit(): void;
|
|
2188
2181
|
init(): void;
|
|
2182
|
+
reset(): void;
|
|
2189
2183
|
restart(): void;
|
|
2190
2184
|
private clearRowData;
|
|
2191
2185
|
private getResourceIndexes;
|
|
@@ -2349,6 +2343,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2349
2343
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
2350
2344
|
readonly ELEMENT_NODE: number;
|
|
2351
2345
|
readonly ENTITY_NODE: number;
|
|
2346
|
+
/**
|
|
2347
|
+
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
2348
|
+
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
2349
|
+
* @alpha
|
|
2350
|
+
*/
|
|
2352
2351
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
2353
2352
|
readonly NOTATION_NODE: number;
|
|
2354
2353
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -2707,11 +2706,9 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
2707
2706
|
constructor(options: StreamDatasourceOptions);
|
|
2708
2707
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
2709
2708
|
private sortMapByNumericKey;
|
|
2710
|
-
dataLogoff
|
|
2709
|
+
private dataLogoff;
|
|
2711
2710
|
private restartSubscription;
|
|
2712
2711
|
private getOrderByAndToBeSortedColIds;
|
|
2713
|
-
private getAvailableIndexes;
|
|
2714
|
-
private getAvailableIndexFields;
|
|
2715
2712
|
private handleCurrentStreamLoad;
|
|
2716
2713
|
private buildCriteriaMatchFromFilters;
|
|
2717
2714
|
private criteriaFromFilters;
|
package/docs/api-report.md
CHANGED
|
@@ -1015,8 +1015,6 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1015
1015
|
// (undocumented)
|
|
1016
1016
|
deepClone(): Node;
|
|
1017
1017
|
// (undocumented)
|
|
1018
|
-
deinit(): void;
|
|
1019
|
-
// (undocumented)
|
|
1020
1018
|
disconnectedCallback(): void;
|
|
1021
1019
|
// (undocumented)
|
|
1022
1020
|
init(): void;
|
|
@@ -1025,6 +1023,8 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1025
1023
|
// (undocumented)
|
|
1026
1024
|
get params(): any;
|
|
1027
1025
|
// (undocumented)
|
|
1026
|
+
reset(): void;
|
|
1027
|
+
// (undocumented)
|
|
1028
1028
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
1029
1029
|
// (undocumented)
|
|
1030
1030
|
restart(): void;
|
|
@@ -1199,8 +1199,6 @@ export class StreamDatasource extends StreamBaseDatasource implements IServerSid
|
|
|
1199
1199
|
// (undocumented)
|
|
1200
1200
|
connect: Connect;
|
|
1201
1201
|
// (undocumented)
|
|
1202
|
-
dataLogoff(): void;
|
|
1203
|
-
// (undocumented)
|
|
1204
1202
|
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
1205
1203
|
// (undocumented)
|
|
1206
1204
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
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.148.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"test:debug": "genx test --debug"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@genesislcap/foundation-testing": "14.
|
|
34
|
-
"@genesislcap/genx": "14.
|
|
35
|
-
"@genesislcap/rollup-builder": "14.
|
|
36
|
-
"@genesislcap/ts-builder": "14.
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
38
|
-
"@genesislcap/vite-builder": "14.
|
|
39
|
-
"@genesislcap/webpack-builder": "14.
|
|
33
|
+
"@genesislcap/foundation-testing": "14.148.0",
|
|
34
|
+
"@genesislcap/genx": "14.148.0",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.148.0",
|
|
36
|
+
"@genesislcap/ts-builder": "14.148.0",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.148.0",
|
|
38
|
+
"@genesislcap/vite-builder": "14.148.0",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.148.0",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.
|
|
44
|
-
"@genesislcap/foundation-logger": "14.
|
|
45
|
-
"@genesislcap/foundation-ui": "14.
|
|
46
|
-
"@genesislcap/foundation-utils": "14.
|
|
43
|
+
"@genesislcap/foundation-comms": "14.148.0",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.148.0",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.148.0",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.148.0",
|
|
47
47
|
"@microsoft/fast-colors": "^5.3.1",
|
|
48
48
|
"@microsoft/fast-components": "^2.30.6",
|
|
49
49
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"customElements": "dist/custom-elements.json",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "18e7851814a2c8025b486040224ff19b84fca29b"
|
|
72
72
|
}
|