@genesislcap/grid-pro 14.464.0 → 14.464.1-alpha-9b6067d.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.
@@ -12139,6 +12139,24 @@
12139
12139
  }
12140
12140
  ]
12141
12141
  },
12142
+ {
12143
+ "kind": "method",
12144
+ "name": "applyLiveServerSideUpdate",
12145
+ "privacy": "private",
12146
+ "return": {
12147
+ "type": {
12148
+ "text": "void"
12149
+ }
12150
+ },
12151
+ "parameters": [
12152
+ {
12153
+ "name": "nextMessage",
12154
+ "type": {
12155
+ "text": "FilteredDataServerResult"
12156
+ }
12157
+ }
12158
+ ]
12159
+ },
12142
12160
  {
12143
12161
  "kind": "method",
12144
12162
  "name": "createDataserverStream",
@@ -12150,7 +12168,7 @@
12150
12168
  },
12151
12169
  "parameters": [
12152
12170
  {
12153
- "name": "existingParams",
12171
+ "name": "_existingParams",
12154
12172
  "default": "null"
12155
12173
  }
12156
12174
  ]
@@ -506,6 +506,7 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
506
506
  * @internal
507
507
  */
508
508
  private applyReqRepPollingUpdate;
509
+ private applyLiveServerSideUpdate;
509
510
  private createDataserverStream;
510
511
  private getAgColumnDefs;
511
512
  applyTransaction(transaction: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,iBAAiB,EAWlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,cAAc,EAEf,MAAM,+BAA+B,CAAC;AAUvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;;;;;;;kBAyDxC,CAAC;;;;;;;;8BAoBI,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAiBP,CAAC;4IAEiE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;IAOtD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAaxD,iBAAiB;IAUjB,oBAAoB;IAUX,SAAS,IAAI,IAAI;IAO1B;;;;OAIG;IACG,kBAAkB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCnE;;;OAGG;IACH,OAAO,CAAC,mCAAmC;IAc3C;;;OAGG;IACH,OAAO,CAAC,oCAAoC;IAWtC,IAAI;IAuIV,mBAAmB,CAAC,KAAK,EAAE,GAAG;IAMf,OAAO;IAmBP,OAAO;IAKtB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,kBAAkB;YAgDZ,mBAAmB;IAKjC;;;;;;;;;;;;OAYG;YACW,kBAAkB;IA+BhC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB,CAA+B;IAEzD;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B,CAAS;IAE3C;;;;;;OAMG;IACI,uBAAuB;IAM9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,wBAAwB;IAsEhC,OAAO,CAAC,yBAAyB;YAyCnB,sBAAsB;YA6CtB,eAAe;IAmBpB,gBAAgB,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG;IAIvC,QAAQ;CAGlB"}
@@ -536,31 +536,65 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
536
536
  });
537
537
  }
538
538
  }
539
+ applyLiveServerSideUpdate(nextMessage) {
540
+ var _a, _b, _c;
541
+ const inserts = (_a = nextMessage.inserts) !== null && _a !== void 0 ? _a : [];
542
+ const updates = (_b = nextMessage.updates) !== null && _b !== void 0 ? _b : [];
543
+ const deletes = (_c = nextMessage.deletes) !== null && _c !== void 0 ? _c : [];
544
+ if (!inserts.length && !updates.length && !deletes.length) {
545
+ return;
546
+ }
547
+ const netRowChange = inserts.length - deletes.length;
548
+ if (this.ssrmDatasource) {
549
+ this.ssrmDatasource.serverRowsCount += netRowChange;
550
+ this.ssrmDatasource.clientRowsCount += netRowChange;
551
+ }
552
+ this.transactionData = { add: [], remove: [], update: [] };
553
+ this.handleStreamInserts(inserts);
554
+ this.handleStreamUpdates(updates);
555
+ this.handleStreamDeletes(deletes);
556
+ if (this.transactionData.add.length > 0) {
557
+ this.$emit(datasourceEventNames.applyServerSideTransaction, {
558
+ transaction: {
559
+ route: [],
560
+ add: this.transactionData.add,
561
+ addIndex: this.reverse ? 0 : this.transactionData.addIndex,
562
+ },
563
+ });
564
+ }
565
+ if (this.transactionData.update.length > 0 || this.transactionData.remove.length > 0) {
566
+ this.$emit(datasourceEventNames.applyServerSideTransaction, {
567
+ transaction: {
568
+ route: [],
569
+ update: this.transactionData.update,
570
+ remove: this.transactionData.remove,
571
+ },
572
+ });
573
+ }
574
+ }
539
575
  createDataserverStream() {
540
- return __awaiter(this, arguments, void 0, function* (existingParams = null) {
576
+ return __awaiter(this, arguments, void 0, function* (_existingParams = null) {
541
577
  if (this.liveUpdates) {
542
578
  const streamOnMessage = (message) => __awaiter(this, void 0, void 0, function* () {
543
- var _a, _b, _c, _d, _e, _f, _g, _h;
579
+ var _a, _b;
544
580
  const messageType = message.MESSAGE_TYPE;
545
- if (messageType === MessageType.QUERY_UPDATE && message.ROW) {
546
- if (!this.ssrmDatasource) {
547
- return;
548
- }
549
- const nextMessage = dataServerResultFilter(message);
550
- this.transactionData = { add: [], remove: [], update: [] };
551
- this.handleStreamInserts(nextMessage.inserts);
552
- this.handleStreamUpdates(nextMessage.updates);
553
- this.handleStreamDeletes(nextMessage.deletes);
554
- if (message.SEQUENCE_ID > 1) {
555
- // Calculate net row count change (inserts - deletes)
556
- const netRowChange = ((_b = (_a = nextMessage.inserts) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = nextMessage.deletes) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0);
557
- this.ssrmDatasource.serverRowsCount += netRowChange;
558
- // Calculate net row count change for client (inserts - loaded deletes)
559
- const clientNetRowChange = ((_f = (_e = nextMessage.inserts) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0) - ((_h = (_g = nextMessage.deletes) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0);
560
- this.ssrmDatasource.clientRowsCount += clientNetRowChange;
561
- this.applyAllTransactions();
562
- }
581
+ if (messageType !== MessageType.QUERY_UPDATE || !message.ROW) {
582
+ return;
583
+ }
584
+ if (!((_a = this.ssrmDatasource) === null || _a === void 0 ? void 0 : _a.sourceRef)) {
585
+ return;
586
+ }
587
+ if (((_b = message.SEQUENCE_ID) !== null && _b !== void 0 ? _b : 0) <= 1) {
588
+ return;
563
589
  }
590
+ const rawMessage = message;
591
+ const normalizedMessage = Object.assign(Object.assign({}, rawMessage), { ROW: Array.isArray(rawMessage.ROW)
592
+ ? rawMessage.ROW
593
+ : rawMessage.ROW
594
+ ? [rawMessage.ROW]
595
+ : [] });
596
+ const nextMessage = dataServerResultFilter(normalizedMessage, this.rowId);
597
+ this.applyLiveServerSideUpdate(nextMessage);
564
598
  });
565
599
  const onError = (error) => {
566
600
  var _a;
@@ -568,7 +602,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
568
602
  this.handleErrors(((_a = error.receivedMessage) === null || _a === void 0 ? void 0 : _a.ERROR) || error.message, 'stream');
569
603
  };
570
604
  this.liveUpdatesStream = this.connect
571
- .stream(this.resourceName, () => { }, onError, existingParams !== null && existingParams !== void 0 ? existingParams : this.datasource.dataserverOnlyParams)
605
+ .stream(this.resourceName, () => { }, onError, this.datasource.dataserverOnlyParams)
572
606
  .subscribe((message) => streamOnMessage(message));
573
607
  }
574
608
  yield this.datasource.startStream();
@@ -5057,6 +5057,7 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
5057
5057
  * @internal
5058
5058
  */
5059
5059
  private applyReqRepPollingUpdate;
5060
+ private applyLiveServerSideUpdate;
5060
5061
  private createDataserverStream;
5061
5062
  private getAgColumnDefs;
5062
5063
  applyTransaction(transaction: any): any;
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.464.0",
4
+ "version": "14.464.1-alpha-9b6067d.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.464.0",
44
- "@genesislcap/genx": "14.464.0",
45
- "@genesislcap/rollup-builder": "14.464.0",
46
- "@genesislcap/ts-builder": "14.464.0",
47
- "@genesislcap/uvu-playwright-builder": "14.464.0",
48
- "@genesislcap/vite-builder": "14.464.0",
49
- "@genesislcap/webpack-builder": "14.464.0"
43
+ "@genesislcap/foundation-testing": "14.464.1-alpha-9b6067d.0",
44
+ "@genesislcap/genx": "14.464.1-alpha-9b6067d.0",
45
+ "@genesislcap/rollup-builder": "14.464.1-alpha-9b6067d.0",
46
+ "@genesislcap/ts-builder": "14.464.1-alpha-9b6067d.0",
47
+ "@genesislcap/uvu-playwright-builder": "14.464.1-alpha-9b6067d.0",
48
+ "@genesislcap/vite-builder": "14.464.1-alpha-9b6067d.0",
49
+ "@genesislcap/webpack-builder": "14.464.1-alpha-9b6067d.0"
50
50
  },
51
51
  "dependencies": {
52
- "@genesislcap/foundation-comms": "14.464.0",
53
- "@genesislcap/foundation-criteria": "14.464.0",
54
- "@genesislcap/foundation-logger": "14.464.0",
55
- "@genesislcap/foundation-ui": "14.464.0",
56
- "@genesislcap/foundation-utils": "14.464.0",
52
+ "@genesislcap/foundation-comms": "14.464.1-alpha-9b6067d.0",
53
+ "@genesislcap/foundation-criteria": "14.464.1-alpha-9b6067d.0",
54
+ "@genesislcap/foundation-logger": "14.464.1-alpha-9b6067d.0",
55
+ "@genesislcap/foundation-ui": "14.464.1-alpha-9b6067d.0",
56
+ "@genesislcap/foundation-utils": "14.464.1-alpha-9b6067d.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": "48f6879adc2477efcd9f984712bcc26a1e8e0544"
94
+ "gitHead": "539e61596ad92ac2c1a8d529864b1db263867cee"
95
95
  }