@genesislcap/grid-pro 14.228.2-alpha-880fa6b.0 → 14.228.2-alpha-caa3483.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 +30 -6
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +7 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +62 -54
- package/dist/grid-pro.d.ts +7 -1
- package/package.json +13 -13
|
@@ -7488,12 +7488,12 @@
|
|
|
7488
7488
|
},
|
|
7489
7489
|
{
|
|
7490
7490
|
"kind": "field",
|
|
7491
|
-
"name": "
|
|
7491
|
+
"name": "cancelledTransactions",
|
|
7492
7492
|
"type": {
|
|
7493
|
-
"text": "
|
|
7493
|
+
"text": "Set<number>"
|
|
7494
7494
|
},
|
|
7495
7495
|
"privacy": "private",
|
|
7496
|
-
"default": "
|
|
7496
|
+
"default": "new Set()",
|
|
7497
7497
|
"inheritedFrom": {
|
|
7498
7498
|
"name": "GridProGenesisDatasource",
|
|
7499
7499
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
@@ -7663,6 +7663,12 @@
|
|
|
7663
7663
|
"type": {
|
|
7664
7664
|
"text": "RequestServerResult"
|
|
7665
7665
|
}
|
|
7666
|
+
},
|
|
7667
|
+
{
|
|
7668
|
+
"name": "transactionId",
|
|
7669
|
+
"type": {
|
|
7670
|
+
"text": "number"
|
|
7671
|
+
}
|
|
7666
7672
|
}
|
|
7667
7673
|
],
|
|
7668
7674
|
"inheritedFrom": {
|
|
@@ -7680,6 +7686,12 @@
|
|
|
7680
7686
|
"type": {
|
|
7681
7687
|
"text": "FilteredDataServerResult"
|
|
7682
7688
|
}
|
|
7689
|
+
},
|
|
7690
|
+
{
|
|
7691
|
+
"name": "transactionId",
|
|
7692
|
+
"type": {
|
|
7693
|
+
"text": "number"
|
|
7694
|
+
}
|
|
7683
7695
|
}
|
|
7684
7696
|
],
|
|
7685
7697
|
"inheritedFrom": {
|
|
@@ -11953,12 +11965,12 @@
|
|
|
11953
11965
|
},
|
|
11954
11966
|
{
|
|
11955
11967
|
"kind": "field",
|
|
11956
|
-
"name": "
|
|
11968
|
+
"name": "cancelledTransactions",
|
|
11957
11969
|
"type": {
|
|
11958
|
-
"text": "
|
|
11970
|
+
"text": "Set<number>"
|
|
11959
11971
|
},
|
|
11960
11972
|
"privacy": "private",
|
|
11961
|
-
"default": "
|
|
11973
|
+
"default": "new Set()"
|
|
11962
11974
|
},
|
|
11963
11975
|
{
|
|
11964
11976
|
"kind": "method",
|
|
@@ -12097,6 +12109,12 @@
|
|
|
12097
12109
|
"type": {
|
|
12098
12110
|
"text": "RequestServerResult"
|
|
12099
12111
|
}
|
|
12112
|
+
},
|
|
12113
|
+
{
|
|
12114
|
+
"name": "transactionId",
|
|
12115
|
+
"type": {
|
|
12116
|
+
"text": "number"
|
|
12117
|
+
}
|
|
12100
12118
|
}
|
|
12101
12119
|
]
|
|
12102
12120
|
},
|
|
@@ -12110,6 +12128,12 @@
|
|
|
12110
12128
|
"type": {
|
|
12111
12129
|
"text": "FilteredDataServerResult"
|
|
12112
12130
|
}
|
|
12131
|
+
},
|
|
12132
|
+
{
|
|
12133
|
+
"name": "transactionId",
|
|
12134
|
+
"type": {
|
|
12135
|
+
"text": "number"
|
|
12136
|
+
}
|
|
12113
12137
|
}
|
|
12114
12138
|
]
|
|
12115
12139
|
},
|
|
@@ -132,6 +132,12 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
132
132
|
isDefaultNamespace(namespace: string): boolean;
|
|
133
133
|
isEqualNode(otherNode: Node): boolean;
|
|
134
134
|
isSameNode(otherNode: Node): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
137
|
+
* Proxies to {@link @genesislcap/grid-pro#GridProGenesisDatasource.loadResourceData} but without the full init (no metadata fetch).
|
|
138
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
135
141
|
lookupNamespaceURI(prefix: string): string;
|
|
136
142
|
lookupPrefix(namespace: string): string;
|
|
137
143
|
normalize(): void;
|
|
@@ -342,7 +348,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
342
348
|
private updateSub;
|
|
343
349
|
private connectionSub;
|
|
344
350
|
private requiresFullRowDataAndColDefs;
|
|
345
|
-
private
|
|
351
|
+
private cancelledTransactions;
|
|
346
352
|
connectedCallback(): void;
|
|
347
353
|
disconnectedCallback(): void;
|
|
348
354
|
deepClone(): Node;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EAGX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAejC,OAAO,EAAqB,qBAAqB,EAAE,MAAM,+BAA+B,CAAC
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EAGX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAejC,OAAO,EAAqB,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+UvF;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1UL;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAqC;IACjF,aAAa,SAAsB;IACnC,kBAAkB,SAA2B;IAG7C,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASxD,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAQrD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKW,qBAAqB,UAAS;IAG/F,yBAAyB,UAAS;IAElC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,aAAa,CAAe;IAEpC,OAAO,CAAC,6BAA6B,CAAQ;IAG7C,OAAO,CAAC,qBAAqB,CAA0B;IAEvD,iBAAiB;IAuBjB,oBAAoB;IAWX,SAAS,IAAI,IAAI;IAqB1B,OAAO,CAAC,gBAAgB;IAgBxB;;;;;;OAMG;IACG,IAAI,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,WAAW,EAAE;IA0CrE;;;OAGG;IACH,OAAO;IAIP;;;;OAIG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IAiCL;;;OAGG;IACH,OAAO;IAYP;;OAEG;IACH,WAAW;IAIX;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAepB;;;;OAIG;YACW,UAAU;IAoDxB;;;;;OAKG;YACW,kBAAkB;IAyBhC;;;;;;OAMG;YACW,gBAAgB;IAiE9B,OAAO,CAAC,cAAc;IActB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE;IAyBnC,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,sBAAsB;IAuE9B,OAAO,CAAC,mBAAmB;YAgCb,eAAe;IActB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAK5B,gBAAgB,CACvB,aAAa,EAAE,kBAAkB,GAChC,kBAAkB,GAAG,IAAI,GAAG,SAAS;IAI/B,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAC3C,IAAI;IAIP,OAAO,CAAC,iBAAiB;CAO1B"}
|
|
@@ -3,8 +3,8 @@ import { Events, } from '@ag-grid-community/core';
|
|
|
3
3
|
import { MessageType, dataServerResultFilter, normaliseCriteria, } from '@genesislcap/foundation-comms';
|
|
4
4
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
5
5
|
import { DOM, attr, customElement } from '@microsoft/fast-element';
|
|
6
|
-
import { BehaviorSubject, EMPTY
|
|
7
|
-
import { catchError, debounceTime, skip,
|
|
6
|
+
import { BehaviorSubject, EMPTY } from 'rxjs';
|
|
7
|
+
import { catchError, debounceTime, skip, tap } from 'rxjs/operators';
|
|
8
8
|
import { criteriaDelimiter, GridProBaseDatasource } from '../datasource/base.datasource';
|
|
9
9
|
import { getClientSideFilterParamsByFieldType } from '../datasource/client-side.grid-definitions';
|
|
10
10
|
import { logger } from '../utils/logger';
|
|
@@ -24,7 +24,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
24
24
|
this.restartOnReconnection = false;
|
|
25
25
|
this.keepColDefsOnClearRowData = false;
|
|
26
26
|
this.requiresFullRowDataAndColDefs = true;
|
|
27
|
-
|
|
27
|
+
// Track cancelled transaction IDs
|
|
28
|
+
this.cancelledTransactions = new Set();
|
|
28
29
|
}
|
|
29
30
|
// DatasourceOptions
|
|
30
31
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
@@ -130,15 +131,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
130
131
|
}), { once: true });
|
|
131
132
|
const filterDebounceTime = 600;
|
|
132
133
|
this.updateSub = this.update
|
|
133
|
-
.pipe(skip(1),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
logger.error('[Filter Pipeline] Error during reload:', error);
|
|
137
|
-
return EMPTY;
|
|
138
|
-
}));
|
|
139
|
-
}))
|
|
140
|
-
.subscribe(() => {
|
|
141
|
-
logger.debug('[Filter Pipeline] Reload completed');
|
|
134
|
+
.pipe(skip(1), debounceTime(filterDebounceTime), tap((f) => logger.debug('filters (debounced): ', f)))
|
|
135
|
+
.subscribe((_) => {
|
|
136
|
+
this.reloadResourceData();
|
|
142
137
|
});
|
|
143
138
|
return;
|
|
144
139
|
}
|
|
@@ -218,6 +213,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
218
213
|
*/
|
|
219
214
|
clearRowData(withColumnDefs = true) {
|
|
220
215
|
var _a, _b, _c, _d;
|
|
216
|
+
// Cancel any in-flight transactions for this clear operation
|
|
217
|
+
const clearTransactionId = Date.now();
|
|
218
|
+
this.cancelledTransactions.add(clearTransactionId);
|
|
221
219
|
this.rowData = new Map();
|
|
222
220
|
this.agTransaction = undefined;
|
|
223
221
|
if (withColumnDefs && !this.keepColDefsOnClearRowData) {
|
|
@@ -231,12 +229,19 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
231
229
|
* @internal
|
|
232
230
|
*/
|
|
233
231
|
setRowData(rowData) {
|
|
234
|
-
var _a;
|
|
232
|
+
var _a, _b, _c, _d, _e;
|
|
235
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
-
const
|
|
234
|
+
const setDataId = Date.now();
|
|
235
|
+
logger.debug(`[SetData ${setDataId}] Starting setRowData`, {
|
|
236
|
+
rowCount: rowData === null || rowData === void 0 ? void 0 : rowData.length,
|
|
237
|
+
firstRowId: (_a = rowData === null || rowData === void 0 ? void 0 : rowData[0]) === null || _a === void 0 ? void 0 : _a[this.rowId],
|
|
238
|
+
lastRowId: (_b = rowData === null || rowData === void 0 ? void 0 : rowData[rowData.length - 1]) === null || _b === void 0 ? void 0 : _b[this.rowId],
|
|
239
|
+
});
|
|
240
|
+
const preSetColumnDefs = (_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.getColumnDefs();
|
|
237
241
|
if (!preSetColumnDefs || preSetColumnDefs.length === 0) {
|
|
238
242
|
const agColumnDefs = yield this.getAgColumnDefs(this.datasource.fieldMetadata);
|
|
239
243
|
if (agColumnDefs) {
|
|
244
|
+
logger.debug(`[SetData ${setDataId}] Setting column definitions`);
|
|
240
245
|
// AG's internals will check if group/pivot are NOT NULL to trigger module registration warning for `row-grouping`.
|
|
241
246
|
// When using gridApi to get the currentState to save, all boolean will return false when they were not set at all.
|
|
242
247
|
// ColDef type is `boolean` while ColumnState is `boolean | null`.
|
|
@@ -252,9 +257,18 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
252
257
|
}
|
|
253
258
|
}
|
|
254
259
|
const data = this.rowDataMapper ? this.rowDataMapper(rowData) : rowData;
|
|
260
|
+
logger.debug(`[SetData ${setDataId}] Preparing to set grid data`, {
|
|
261
|
+
mappedRowCount: data === null || data === void 0 ? void 0 : data.length,
|
|
262
|
+
firstMappedRowId: (_d = data === null || data === void 0 ? void 0 : data[0]) === null || _d === void 0 ? void 0 : _d[this.rowId],
|
|
263
|
+
lastMappedRowId: (_e = data === null || data === void 0 ? void 0 : data[data.length - 1]) === null || _e === void 0 ? void 0 : _e[this.rowId],
|
|
264
|
+
});
|
|
255
265
|
this.agGrid.restoreCachedFilterConfig();
|
|
256
266
|
this.agTransaction = { add: data ? [...data] : [], remove: [], update: [], addIndex: 0 };
|
|
267
|
+
logger.debug(`[SetData ${setDataId}] Created transaction`, {
|
|
268
|
+
addCount: this.agTransaction.add.length,
|
|
269
|
+
});
|
|
257
270
|
this.applyAllAgTransactions();
|
|
271
|
+
logger.debug(`[SetData ${setDataId}] Applied transactions`);
|
|
258
272
|
this.requiresFullRowDataAndColDefs = false;
|
|
259
273
|
});
|
|
260
274
|
}
|
|
@@ -265,8 +279,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
265
279
|
* @internal
|
|
266
280
|
*/
|
|
267
281
|
reloadResourceData() {
|
|
282
|
+
var _a, _b;
|
|
268
283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
-
const reloadId = Date.now();
|
|
284
|
+
const reloadId = Date.now();
|
|
270
285
|
logger.debug(`[Reload ${reloadId}] Starting reload`, {
|
|
271
286
|
resourceName: this.resourceName,
|
|
272
287
|
currentFilters: Object.fromEntries(this.criteriaFromFilters),
|
|
@@ -275,24 +290,15 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
275
290
|
logger.debug(`[Reload ${reloadId}] Cancelling existing subscription`);
|
|
276
291
|
this.dataSub.unsubscribe();
|
|
277
292
|
this.dataSub = undefined;
|
|
293
|
+
// Cancel any in-flight transactions for this reload
|
|
294
|
+
this.cancelledTransactions.add(reloadId);
|
|
278
295
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
logger.debug(`[Reload ${reloadId}] Loading resource data`);
|
|
286
|
-
yield this.loadResourceData(withoutFullInit);
|
|
287
|
-
logger.debug(`[Reload ${reloadId}] Resource data loaded`);
|
|
288
|
-
}))();
|
|
289
|
-
try {
|
|
290
|
-
yield this.reloadPromise;
|
|
291
|
-
logger.debug(`[Reload ${reloadId}] Completed successfully`);
|
|
292
|
-
}
|
|
293
|
-
catch (error) {
|
|
294
|
-
logger.error(`[Reload ${reloadId}] Failed:`, error);
|
|
295
|
-
}
|
|
296
|
+
logger.debug(`[Reload ${reloadId}] Clearing row data`);
|
|
297
|
+
this.clearRowData(withoutColumnDefs);
|
|
298
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.showLoadingOverlay();
|
|
299
|
+
this.agGrid.removeAttribute('ds-disconnected');
|
|
300
|
+
logger.debug(`[Reload ${reloadId}] Starting loadResourceData`);
|
|
301
|
+
this.loadResourceData(withoutFullInit);
|
|
296
302
|
});
|
|
297
303
|
}
|
|
298
304
|
/**
|
|
@@ -304,13 +310,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
304
310
|
*/
|
|
305
311
|
loadResourceData(withFullInit = true) {
|
|
306
312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
-
const
|
|
308
|
-
logger.debug(`[Load ${loadId}] Starting loadResourceData`, {
|
|
309
|
-
withFullInit,
|
|
310
|
-
requiresMetadataFetch: withFullInit || !this.datasource.initialized,
|
|
311
|
-
});
|
|
313
|
+
const requiresMetadataFetch = withFullInit || !this.datasource.initialized;
|
|
312
314
|
try {
|
|
313
|
-
const requiresMetadataFetch = withFullInit || !this.datasource.initialized;
|
|
314
315
|
const initOK = yield this.datasource.init(this.datasourceOptions(), requiresMetadataFetch);
|
|
315
316
|
if (!initOK) {
|
|
316
317
|
logger.debug(`Genesis Datasource init failed for ${this.resourceName}`);
|
|
@@ -319,24 +320,16 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
319
320
|
}
|
|
320
321
|
this.$emit(gridProGenesisDatasourceEventNames.dataInit);
|
|
321
322
|
if (this.isSnapshot) {
|
|
322
|
-
logger.debug(`[Load ${loadId}] Processing snapshot data`);
|
|
323
323
|
const result = yield this.datasource.snapshot();
|
|
324
324
|
if (result) {
|
|
325
325
|
const rowData = this.handleSnapshot(result);
|
|
326
|
-
logger.debug(`[Load ${loadId}] Setting row data from snapshot`, {
|
|
327
|
-
rowCount: rowData.length,
|
|
328
|
-
});
|
|
329
326
|
this.setRowData(rowData);
|
|
330
327
|
}
|
|
331
328
|
return;
|
|
332
329
|
}
|
|
333
|
-
logger.debug(`
|
|
330
|
+
logger.debug(`requesting stream for ${this.resourceName}`);
|
|
334
331
|
this.dataSub = this.datasource.stream
|
|
335
|
-
.pipe(
|
|
336
|
-
hasError: 'ERROR' in result && !!result.ERROR,
|
|
337
|
-
messageType: 'MESSAGE_TYPE' in result ? result.MESSAGE_TYPE : undefined,
|
|
338
|
-
hasRow: 'ROW' in result && !!result.ROW,
|
|
339
|
-
})), catchError((err) => {
|
|
332
|
+
.pipe(catchError((err) => {
|
|
340
333
|
var _a;
|
|
341
334
|
this.handleErrors((_a = err === null || err === void 0 ? void 0 : err.receivedMessage) === null || _a === void 0 ? void 0 : _a.ERROR);
|
|
342
335
|
return EMPTY;
|
|
@@ -362,7 +355,6 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
362
355
|
});
|
|
363
356
|
}
|
|
364
357
|
catch (error) {
|
|
365
|
-
logger.error(`[Load ${loadId}] Failed:`, error);
|
|
366
358
|
let { message } = error;
|
|
367
359
|
if (error.receivedMessage) {
|
|
368
360
|
message = error.receivedMessage.ERROR;
|
|
@@ -410,15 +402,26 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
410
402
|
handleStreamResult(result) {
|
|
411
403
|
if (!result)
|
|
412
404
|
return;
|
|
405
|
+
const transactionId = Date.now();
|
|
406
|
+
logger.debug(`[Stream ${transactionId}] Processing result:`, {
|
|
407
|
+
type: this.isRequestServer ? 'RequestServer' : 'DataServer',
|
|
408
|
+
hasData: !!result,
|
|
409
|
+
});
|
|
413
410
|
if (this.isRequestServer) {
|
|
414
|
-
this.applyRequestServerData(result);
|
|
411
|
+
this.applyRequestServerData(result, transactionId);
|
|
415
412
|
}
|
|
416
413
|
else {
|
|
417
|
-
this.applyDataserverData(result);
|
|
414
|
+
this.applyDataserverData(result, transactionId);
|
|
418
415
|
}
|
|
419
416
|
}
|
|
420
|
-
applyRequestServerData(requestServerResult) {
|
|
417
|
+
applyRequestServerData(requestServerResult, transactionId) {
|
|
421
418
|
var _a;
|
|
419
|
+
// Skip if this transaction was cancelled
|
|
420
|
+
if (this.cancelledTransactions.has(transactionId)) {
|
|
421
|
+
logger.debug(`[Stream ${transactionId}] Skipped - transaction was cancelled`);
|
|
422
|
+
this.cancelledTransactions.delete(transactionId); // Cleanup
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
422
425
|
const previousSize = this.rowData.size;
|
|
423
426
|
const requestServerData = requestServerResult.REPLY;
|
|
424
427
|
if (!Array.isArray(requestServerData) ||
|
|
@@ -466,8 +469,14 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
466
469
|
this.applyAllAgTransactions();
|
|
467
470
|
this.handleSizeChanged(previousSize, this.rowData.size);
|
|
468
471
|
}
|
|
469
|
-
applyDataserverData(dataServerResult) {
|
|
472
|
+
applyDataserverData(dataServerResult, transactionId) {
|
|
470
473
|
var _a;
|
|
474
|
+
// Skip if this transaction was cancelled
|
|
475
|
+
if (this.cancelledTransactions.has(transactionId)) {
|
|
476
|
+
logger.debug(`[Stream ${transactionId}] Skipped - transaction was cancelled`);
|
|
477
|
+
this.cancelledTransactions.delete(transactionId); // Cleanup
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
471
480
|
const previousSize = this.rowData.size;
|
|
472
481
|
if (this.requiresFullRowDataAndColDefs) {
|
|
473
482
|
(_a = dataServerResult.inserts) === null || _a === void 0 ? void 0 : _a.forEach((insertData) => {
|
|
@@ -494,7 +503,6 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
494
503
|
});
|
|
495
504
|
}
|
|
496
505
|
setFilter(fieldName, newFilter) {
|
|
497
|
-
logger.debug(`[Filter] Setting filter for ${fieldName}:`, newFilter);
|
|
498
506
|
this.criteriaFromFilters.set(fieldName, newFilter);
|
|
499
507
|
this.update.next(this.criteriaFromFilters);
|
|
500
508
|
}
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -2550,7 +2550,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
2550
2550
|
private updateSub;
|
|
2551
2551
|
private connectionSub;
|
|
2552
2552
|
private requiresFullRowDataAndColDefs;
|
|
2553
|
-
private
|
|
2553
|
+
private cancelledTransactions;
|
|
2554
2554
|
connectedCallback(): void;
|
|
2555
2555
|
disconnectedCallback(): void;
|
|
2556
2556
|
deepClone(): Node;
|
|
@@ -2762,6 +2762,12 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
2762
2762
|
isDefaultNamespace(namespace: string): boolean;
|
|
2763
2763
|
isEqualNode(otherNode: Node): boolean;
|
|
2764
2764
|
isSameNode(otherNode: Node): boolean;
|
|
2765
|
+
/**
|
|
2766
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2767
|
+
* Proxies to {@link @genesislcap/grid-pro#GridProGenesisDatasource.loadResourceData} but without the full init (no metadata fetch).
|
|
2768
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2769
|
+
* @internal
|
|
2770
|
+
*/
|
|
2765
2771
|
lookupNamespaceURI(prefix: string): string;
|
|
2766
2772
|
lookupPrefix(namespace: string): string;
|
|
2767
2773
|
normalize(): 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.228.2-alpha-
|
|
4
|
+
"version": "14.228.2-alpha-caa3483.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@genesislcap/foundation-testing": "14.228.2-alpha-
|
|
42
|
-
"@genesislcap/genx": "14.228.2-alpha-
|
|
43
|
-
"@genesislcap/rollup-builder": "14.228.2-alpha-
|
|
44
|
-
"@genesislcap/ts-builder": "14.228.2-alpha-
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "14.228.2-alpha-
|
|
46
|
-
"@genesislcap/vite-builder": "14.228.2-alpha-
|
|
47
|
-
"@genesislcap/webpack-builder": "14.228.2-alpha-
|
|
41
|
+
"@genesislcap/foundation-testing": "14.228.2-alpha-caa3483.0",
|
|
42
|
+
"@genesislcap/genx": "14.228.2-alpha-caa3483.0",
|
|
43
|
+
"@genesislcap/rollup-builder": "14.228.2-alpha-caa3483.0",
|
|
44
|
+
"@genesislcap/ts-builder": "14.228.2-alpha-caa3483.0",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "14.228.2-alpha-caa3483.0",
|
|
46
|
+
"@genesislcap/vite-builder": "14.228.2-alpha-caa3483.0",
|
|
47
|
+
"@genesislcap/webpack-builder": "14.228.2-alpha-caa3483.0",
|
|
48
48
|
"rimraf": "^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@genesislcap/foundation-comms": "14.228.2-alpha-
|
|
52
|
-
"@genesislcap/foundation-logger": "14.228.2-alpha-
|
|
53
|
-
"@genesislcap/foundation-ui": "14.228.2-alpha-
|
|
54
|
-
"@genesislcap/foundation-utils": "14.228.2-alpha-
|
|
51
|
+
"@genesislcap/foundation-comms": "14.228.2-alpha-caa3483.0",
|
|
52
|
+
"@genesislcap/foundation-logger": "14.228.2-alpha-caa3483.0",
|
|
53
|
+
"@genesislcap/foundation-ui": "14.228.2-alpha-caa3483.0",
|
|
54
|
+
"@genesislcap/foundation-utils": "14.228.2-alpha-caa3483.0",
|
|
55
55
|
"@microsoft/fast-colors": "5.3.1",
|
|
56
56
|
"@microsoft/fast-components": "2.30.6",
|
|
57
57
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
79
|
"customElements": "dist/custom-elements.json",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "6769dadb4b6162f0e5b44056786e7bc06efc8010"
|
|
81
81
|
}
|