@genesislcap/grid-pro 14.12.1 → 14.12.2-alpha-8f5bf34.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.
|
@@ -346,6 +346,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
346
346
|
isSnapshot: boolean;
|
|
347
347
|
maxRows: number;
|
|
348
348
|
maxView: number;
|
|
349
|
+
pollingInterval: number;
|
|
349
350
|
movingView: boolean;
|
|
350
351
|
orderBy: string;
|
|
351
352
|
request: any;
|
|
@@ -353,6 +354,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
353
354
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
354
355
|
reverse: boolean;
|
|
355
356
|
rowId: string;
|
|
357
|
+
datasourceKey: string;
|
|
356
358
|
restartOnReconnection: boolean;
|
|
357
359
|
private dataSub;
|
|
358
360
|
private updateSub;
|
|
@@ -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,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,UAAU,EAWX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AW,EAAE,MAAM;IASjD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;CAItC"}
|
|
@@ -17,6 +17,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
17
17
|
this.isSnapshot = false;
|
|
18
18
|
this.maxRows = DatasourceDefaults.MAX_ROWS_250;
|
|
19
19
|
this.maxView = DatasourceDefaults.MAX_VIEW_1000;
|
|
20
|
+
this.pollingInterval = DatasourceDefaults.REQ_REP_POLLING_INTERVAL_MS;
|
|
20
21
|
this.movingView = false;
|
|
21
22
|
this.reverse = false;
|
|
22
23
|
this.rowId = 'ROW_REF';
|
|
@@ -39,7 +40,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
39
40
|
return;
|
|
40
41
|
this.init();
|
|
41
42
|
});
|
|
42
|
-
this.connectionSub = this.connect.
|
|
43
|
+
this.connectionSub = this.connect.isConnected$.subscribe((isConnected) => {
|
|
43
44
|
if (isConnected && this.agGrid.attributes['ds-disconnected']) {
|
|
44
45
|
this.agGrid.removeAttribute('ds-disconnected');
|
|
45
46
|
if (this.restartOnReconnection) {
|
|
@@ -179,7 +180,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
179
180
|
if (Array.isArray(result))
|
|
180
181
|
return result;
|
|
181
182
|
if (result.REPLY) {
|
|
182
|
-
return result.REPLY
|
|
183
|
+
return this.datasourceKey && result.REPLY.length > 0
|
|
184
|
+
? result.REPLY[0][this.datasourceKey]
|
|
185
|
+
: result.REPLY;
|
|
183
186
|
}
|
|
184
187
|
if (result.ROW) {
|
|
185
188
|
return dataServerResultFilter(result).inserts;
|
|
@@ -197,6 +200,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
197
200
|
reverse: this.reverse,
|
|
198
201
|
maxRows: this.maxRows,
|
|
199
202
|
maxView: this.maxView,
|
|
203
|
+
pollingInterval: this.pollingInterval,
|
|
200
204
|
movingView: this.movingView,
|
|
201
205
|
};
|
|
202
206
|
}
|
|
@@ -212,25 +216,28 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
212
216
|
}
|
|
213
217
|
}
|
|
214
218
|
applyRequestServerData(requestServerResult) {
|
|
215
|
-
var _a
|
|
219
|
+
var _a;
|
|
216
220
|
if (!Array.isArray(requestServerResult.REPLY) ||
|
|
217
221
|
!((_a = requestServerResult.MESSAGE_TYPE) === null || _a === void 0 ? void 0 : _a.startsWith('REP_'))) {
|
|
218
222
|
logger.error('received invalid RequestServerResult', requestServerResult);
|
|
219
223
|
return;
|
|
220
224
|
}
|
|
225
|
+
const requestServerData = this.datasourceKey && requestServerResult.REPLY.length > 0
|
|
226
|
+
? requestServerResult.REPLY[0][this.datasourceKey]
|
|
227
|
+
: requestServerResult.REPLY;
|
|
221
228
|
if (this.requiresFullRowDataAndColDefs) {
|
|
222
229
|
if (this.rowId !== 'ROW_REF') {
|
|
223
|
-
|
|
230
|
+
requestServerData === null || requestServerData === void 0 ? void 0 : requestServerData.forEach((insertData) => {
|
|
224
231
|
this.rows.set(insertData[this.rowId], insertData);
|
|
225
232
|
});
|
|
226
233
|
}
|
|
227
|
-
const rowData = this.rows.size > 0 ? Array.from(this.rows.values()) :
|
|
234
|
+
const rowData = this.rows.size > 0 ? Array.from(this.rows.values()) : requestServerData;
|
|
228
235
|
this.updateRowData(rowData);
|
|
229
236
|
return;
|
|
230
237
|
}
|
|
231
238
|
this.agTransaction = { add: [], remove: [], update: [] };
|
|
232
|
-
this.handleStreamInserts(
|
|
233
|
-
const rowsToDelete = Array.from(this.rows.values()).filter((row) => !
|
|
239
|
+
this.handleStreamInserts(requestServerData);
|
|
240
|
+
const rowsToDelete = Array.from(this.rows.values()).filter((row) => !requestServerData.includes(row));
|
|
234
241
|
this.handleStreamDeletes(rowsToDelete);
|
|
235
242
|
this.agGrid.gridApi.applyTransactionAsync(this.agTransaction);
|
|
236
243
|
}
|
|
@@ -357,6 +364,9 @@ __decorate([
|
|
|
357
364
|
__decorate([
|
|
358
365
|
attr({ attribute: 'max-view' })
|
|
359
366
|
], GridProGenesisDatasource.prototype, "maxView", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
attr({ attribute: 'polling-interval' })
|
|
369
|
+
], GridProGenesisDatasource.prototype, "pollingInterval", void 0);
|
|
360
370
|
__decorate([
|
|
361
371
|
attr({ attribute: 'moving-view' })
|
|
362
372
|
], GridProGenesisDatasource.prototype, "movingView", void 0);
|
|
@@ -375,6 +385,9 @@ __decorate([
|
|
|
375
385
|
__decorate([
|
|
376
386
|
attr({ attribute: 'row-id' })
|
|
377
387
|
], GridProGenesisDatasource.prototype, "rowId", void 0);
|
|
388
|
+
__decorate([
|
|
389
|
+
attr({ attribute: 'datasoruce-key' })
|
|
390
|
+
], GridProGenesisDatasource.prototype, "datasourceKey", void 0);
|
|
378
391
|
__decorate([
|
|
379
392
|
attr({ mode: 'boolean', attribute: 'restart-on-reconnection' })
|
|
380
393
|
], GridProGenesisDatasource.prototype, "restartOnReconnection", void 0);
|
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.12.
|
|
4
|
+
"version": "14.12.2-alpha-8f5bf34.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"test": "echo \"Error: no test specified\""
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@genesislcap/foundation-testing": "
|
|
26
|
+
"@genesislcap/foundation-testing": "14.12.2-alpha-8f5bf34.0",
|
|
27
27
|
"@playwright/test": "^1.18.1",
|
|
28
28
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
29
29
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"webpack-merge": "^5.7.3"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@genesislcap/foundation-comms": "
|
|
78
|
-
"@genesislcap/foundation-ui": "
|
|
79
|
-
"@genesislcap/foundation-utils": "
|
|
77
|
+
"@genesislcap/foundation-comms": "14.12.2-alpha-8f5bf34.0",
|
|
78
|
+
"@genesislcap/foundation-ui": "14.12.2-alpha-8f5bf34.0",
|
|
79
|
+
"@genesislcap/foundation-utils": "14.12.2-alpha-8f5bf34.0",
|
|
80
80
|
"@microsoft/fast-colors": "^5.1.4",
|
|
81
81
|
"@microsoft/fast-components": "^2.21.3",
|
|
82
82
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "5eb79664c8e53af316db564dcfa2adb897f49545"
|
|
101
101
|
}
|