@visactor/vtable 1.19.1 → 1.19.2

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.
Files changed (77) hide show
  1. package/cjs/ListTable.js +1 -1
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotTable.js +4 -0
  4. package/cjs/PivotTable.js.map +1 -1
  5. package/cjs/core/BaseTable.js +1 -1
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/data/DataSource.js +14 -5
  8. package/cjs/data/DataSource.js.map +1 -1
  9. package/cjs/dataset/dataset.d.ts +1 -0
  10. package/cjs/dataset/dataset.js +66 -2
  11. package/cjs/dataset/dataset.js.map +1 -1
  12. package/cjs/edit/edit-manager.js +8 -5
  13. package/cjs/edit/edit-manager.js.map +1 -1
  14. package/cjs/index.d.ts +2 -1
  15. package/cjs/index.js +11 -2
  16. package/cjs/index.js.map +1 -1
  17. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  18. package/cjs/layout/pivot-header-layout.js +18 -7
  19. package/cjs/layout/pivot-header-layout.js.map +1 -1
  20. package/cjs/layout/simple-header-layout.d.ts +2 -0
  21. package/cjs/layout/simple-header-layout.js +25 -9
  22. package/cjs/layout/simple-header-layout.js.map +1 -1
  23. package/cjs/scenegraph/graphic/icon.js.map +1 -1
  24. package/cjs/scenegraph/group-creater/cell-helper.js +3 -3
  25. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  26. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  27. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  28. package/cjs/scenegraph/layout/compute-col-width.js +11 -1
  29. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  30. package/cjs/ts-types/dataset/aggregation.d.ts +8 -6
  31. package/cjs/ts-types/dataset/aggregation.js +109 -54
  32. package/cjs/ts-types/dataset/aggregation.js.map +1 -1
  33. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -0
  34. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  35. package/cjs/ts-types/new-data-set.d.ts +1 -0
  36. package/cjs/ts-types/new-data-set.js.map +1 -1
  37. package/cjs/vrender.js.map +1 -1
  38. package/dist/vtable.js +500 -44
  39. package/dist/vtable.min.js +2 -2
  40. package/es/ListTable.js +1 -1
  41. package/es/ListTable.js.map +1 -1
  42. package/es/PivotTable.js +4 -0
  43. package/es/PivotTable.js.map +1 -1
  44. package/es/core/BaseTable.js +1 -1
  45. package/es/core/BaseTable.js.map +1 -1
  46. package/es/data/DataSource.js +14 -5
  47. package/es/data/DataSource.js.map +1 -1
  48. package/es/dataset/dataset.d.ts +1 -0
  49. package/es/dataset/dataset.js +66 -2
  50. package/es/dataset/dataset.js.map +1 -1
  51. package/es/edit/edit-manager.js +8 -5
  52. package/es/edit/edit-manager.js.map +1 -1
  53. package/es/index.d.ts +2 -1
  54. package/es/index.js +3 -1
  55. package/es/index.js.map +1 -1
  56. package/es/layout/pivot-header-layout.d.ts +1 -0
  57. package/es/layout/pivot-header-layout.js +18 -7
  58. package/es/layout/pivot-header-layout.js.map +1 -1
  59. package/es/layout/simple-header-layout.d.ts +2 -0
  60. package/es/layout/simple-header-layout.js +25 -9
  61. package/es/layout/simple-header-layout.js.map +1 -1
  62. package/es/scenegraph/graphic/icon.js.map +1 -1
  63. package/es/scenegraph/group-creater/cell-helper.js +3 -3
  64. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  65. package/es/scenegraph/group-creater/column-helper.js +1 -1
  66. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  67. package/es/scenegraph/layout/compute-col-width.js +11 -1
  68. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  69. package/es/ts-types/dataset/aggregation.d.ts +8 -6
  70. package/es/ts-types/dataset/aggregation.js +109 -54
  71. package/es/ts-types/dataset/aggregation.js.map +1 -1
  72. package/es/ts-types/list-table/define/basic-define.d.ts +1 -0
  73. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  74. package/es/ts-types/new-data-set.d.ts +1 -0
  75. package/es/ts-types/new-data-set.js.map +1 -1
  76. package/es/vrender.js.map +1 -1
  77. package/package.json +4 -4
package/dist/vtable.js CHANGED
@@ -29070,6 +29070,8 @@
29070
29070
  key;
29071
29071
  field;
29072
29072
  formatFun;
29073
+ changedValue;
29074
+ children = [];
29073
29075
  _formatedValue;
29074
29076
  constructor(config) {
29075
29077
  this.key = config.key;
@@ -29093,6 +29095,8 @@
29093
29095
  }
29094
29096
  reset() {
29095
29097
  this.records = [];
29098
+ this.changedValue = undefined;
29099
+ this.children = [];
29096
29100
  this.clearCacheValue();
29097
29101
  }
29098
29102
  }
@@ -29108,6 +29112,9 @@
29108
29112
  this.records.push(record);
29109
29113
  }
29110
29114
  }
29115
+ if (record.isAggregator && this.children) {
29116
+ this.children.push(record);
29117
+ }
29111
29118
  this.clearCacheValue();
29112
29119
  }
29113
29120
  deleteRecord(record) {
@@ -29115,6 +29122,9 @@
29115
29122
  if (this.isRecord && this.records) {
29116
29123
  this.records = this.records.filter(item => item !== record);
29117
29124
  }
29125
+ if (record.isAggregator && this.children) {
29126
+ this.children = this.children.filter(item => item !== record);
29127
+ }
29118
29128
  }
29119
29129
  this.clearCacheValue();
29120
29130
  }
@@ -29128,13 +29138,23 @@
29128
29138
  return item;
29129
29139
  });
29130
29140
  }
29141
+ if (oldRecord.isAggregator && newRecord.isAggregator && this.children) {
29142
+ this.children = this.children.map(item => {
29143
+ if (item === oldRecord) {
29144
+ return newRecord;
29145
+ }
29146
+ return item;
29147
+ });
29148
+ }
29131
29149
  this.clearCacheValue();
29132
29150
  }
29133
29151
  }
29134
29152
  value() {
29135
- return this.records;
29153
+ return this.changedValue ?? this.records;
29136
29154
  }
29137
29155
  reset() {
29156
+ this.children = [];
29157
+ this.changedValue = undefined;
29138
29158
  this.records = [];
29139
29159
  }
29140
29160
  recalculate() {
@@ -29149,6 +29169,9 @@
29149
29169
  if (this.isRecord) {
29150
29170
  this.records = [record];
29151
29171
  }
29172
+ if (record.isAggregator && this.children) {
29173
+ this.children = [record];
29174
+ }
29152
29175
  if (this.field) {
29153
29176
  this.fieldValue = record[this.field];
29154
29177
  }
@@ -29160,6 +29183,9 @@
29160
29183
  if (this.isRecord && this.records) {
29161
29184
  this.records = this.records.filter(item => item !== record);
29162
29185
  }
29186
+ if (record.isAggregator && this.children) {
29187
+ this.children = this.children.filter(item => item !== record);
29188
+ }
29163
29189
  if (this.field && this.records.length) {
29164
29190
  this.fieldValue = this.records[this.records.length - 1][this.field];
29165
29191
  }
@@ -29176,6 +29202,14 @@
29176
29202
  return item;
29177
29203
  });
29178
29204
  }
29205
+ if (oldRecord.isAggregator && newRecord.isAggregator && this.children) {
29206
+ this.children = this.children.map(item => {
29207
+ if (item === oldRecord) {
29208
+ return newRecord;
29209
+ }
29210
+ return item;
29211
+ });
29212
+ }
29179
29213
  if (this.field && this.records.length) {
29180
29214
  this.fieldValue = this.records[this.records.length - 1][this.field];
29181
29215
  }
@@ -29183,9 +29217,11 @@
29183
29217
  }
29184
29218
  }
29185
29219
  value() {
29186
- return this.fieldValue;
29220
+ return this.changedValue ?? this.fieldValue;
29187
29221
  }
29188
29222
  reset() {
29223
+ this.children = [];
29224
+ this.changedValue = undefined;
29189
29225
  this.records = [];
29190
29226
  this.fieldValue = undefined;
29191
29227
  }
@@ -29212,6 +29248,9 @@
29212
29248
  this.records.push(record);
29213
29249
  }
29214
29250
  }
29251
+ if (record.isAggregator && this.children) {
29252
+ this.children.push(record);
29253
+ }
29215
29254
  if (this.field) {
29216
29255
  this.values.push(record[this.field]);
29217
29256
  }
@@ -29228,6 +29267,14 @@
29228
29267
  return item;
29229
29268
  });
29230
29269
  }
29270
+ if (oldRecord.isAggregator && newRecord.isAggregator && this.children) {
29271
+ this.children = this.children.map(item => {
29272
+ if (item === oldRecord) {
29273
+ return newRecord;
29274
+ }
29275
+ return item;
29276
+ });
29277
+ }
29231
29278
  if (this.field && this.records.length) {
29232
29279
  this.values = this.records.map(item => item[this.field]);
29233
29280
  }
@@ -29239,6 +29286,9 @@
29239
29286
  if (this.isRecord && this.records) {
29240
29287
  this.records = this.records.filter(item => item !== record);
29241
29288
  }
29289
+ if (record.isAggregator && this.children) {
29290
+ this.children = this.children.filter(item => item !== record);
29291
+ }
29242
29292
  if (this.field && this.records.length) {
29243
29293
  this.values = this.records.map(item => item[this.field]);
29244
29294
  }
@@ -29249,10 +29299,12 @@
29249
29299
  if (!this.fieldValue) {
29250
29300
  this.fieldValue = this.aggregationFun?.(this.values, this.records, this.field);
29251
29301
  }
29252
- return this.fieldValue;
29302
+ return this.changedValue ?? this.fieldValue;
29253
29303
  }
29254
29304
  reset() {
29255
29305
  this.records = [];
29306
+ this.children = [];
29307
+ this.changedValue = undefined;
29256
29308
  this.fieldValue = undefined;
29257
29309
  }
29258
29310
  recalculate() {
@@ -29282,6 +29334,9 @@
29282
29334
  this.records.push(record);
29283
29335
  }
29284
29336
  }
29337
+ if (this.children && record.isAggregator) {
29338
+ this.children.push(record);
29339
+ }
29285
29340
  this.clearCacheValue();
29286
29341
  }
29287
29342
  deleteRecord(record) {
@@ -29289,6 +29344,9 @@
29289
29344
  if (this.isRecord && this.records) {
29290
29345
  this.records = this.records.filter(item => item !== record);
29291
29346
  }
29347
+ if (record.isAggregator && this.children) {
29348
+ this.children = this.children.filter(item => item !== record);
29349
+ }
29292
29350
  }
29293
29351
  this.clearCacheValue();
29294
29352
  }
@@ -29302,6 +29360,14 @@
29302
29360
  return item;
29303
29361
  });
29304
29362
  }
29363
+ if (oldRecord.isAggregator && newRecord.isAggregator && this.children) {
29364
+ this.children = this.children.map(item => {
29365
+ if (item === oldRecord) {
29366
+ return newRecord;
29367
+ }
29368
+ return item;
29369
+ });
29370
+ }
29305
29371
  this.clearCacheValue();
29306
29372
  }
29307
29373
  }
@@ -29310,10 +29376,12 @@
29310
29376
  const aggregatorValue = _getDependAggregatorValues(this.dependAggregators, this.dependIndicatorKeys);
29311
29377
  this.fieldValue = this.calculateFun?.(aggregatorValue, this.records, this.field);
29312
29378
  }
29313
- return this.fieldValue;
29379
+ return this.changedValue ?? this.fieldValue;
29314
29380
  }
29315
29381
  reset() {
29316
29382
  this.records = [];
29383
+ this.children = [];
29384
+ this.changedValue = undefined;
29317
29385
  this.fieldValue = undefined;
29318
29386
  }
29319
29387
  recalculate() {
@@ -29339,7 +29407,8 @@
29339
29407
  this.records.push(record);
29340
29408
  }
29341
29409
  }
29342
- if (record.isAggregator) {
29410
+ if (record.isAggregator && this.children) {
29411
+ this.children.push(record);
29343
29412
  const value = record.value();
29344
29413
  this.sum += value ?? 0;
29345
29414
  if (this.needSplitPositiveAndNegativeForSum) {
@@ -29371,7 +29440,8 @@
29371
29440
  if (this.isRecord && this.records) {
29372
29441
  this.records = this.records.filter(item => item !== record);
29373
29442
  }
29374
- if (record.isAggregator) {
29443
+ if (record.isAggregator && this.children) {
29444
+ this.children = this.children.filter(item => item !== record);
29375
29445
  const value = record.value();
29376
29446
  this.sum -= value ?? 0;
29377
29447
  if (this.needSplitPositiveAndNegativeForSum) {
@@ -29408,9 +29478,11 @@
29408
29478
  return item;
29409
29479
  });
29410
29480
  }
29411
- if (oldRecord.isAggregator) {
29481
+ if (oldRecord.isAggregator && this.children) {
29412
29482
  const oldValue = oldRecord.value();
29483
+ this.children = this.children.filter(item => item !== oldRecord);
29413
29484
  const newValue = newRecord.value();
29485
+ this.children.push(newRecord);
29414
29486
  this.sum += newValue - oldValue;
29415
29487
  if (this.needSplitPositiveAndNegativeForSum) {
29416
29488
  if (oldValue > 0) {
@@ -29450,7 +29522,7 @@
29450
29522
  }
29451
29523
  }
29452
29524
  value() {
29453
- return this.records?.length >= 1 ? this.sum : undefined;
29525
+ return this.changedValue ?? (this.records?.length >= 1 ? this.sum : undefined);
29454
29526
  }
29455
29527
  positiveValue() {
29456
29528
  return this.positiveSum;
@@ -29466,7 +29538,24 @@
29466
29538
  recalculate() {
29467
29539
  this.sum = 0;
29468
29540
  this._formatedValue = undefined;
29469
- if (this.records) {
29541
+ if (this.children && this.children.length > 0) {
29542
+ for (let i = 0; i < this.children.length; i++) {
29543
+ const child = this.children[i];
29544
+ if (child.isAggregator) {
29545
+ const value = child.value();
29546
+ this.sum += value ?? 0;
29547
+ if (this.needSplitPositiveAndNegativeForSum) {
29548
+ if (value > 0) {
29549
+ this.positiveSum += value;
29550
+ }
29551
+ else if (value < 0) {
29552
+ this.nagetiveSum += value;
29553
+ }
29554
+ }
29555
+ }
29556
+ }
29557
+ }
29558
+ else if (this.records) {
29470
29559
  for (let i = 0; i < this.records.length; i++) {
29471
29560
  const record = this.records[i];
29472
29561
  if (record.isAggregator) {
@@ -29511,6 +29600,9 @@
29511
29600
  }
29512
29601
  }
29513
29602
  if (record.isAggregator) {
29603
+ if (this.children) {
29604
+ this.children.push(record);
29605
+ }
29514
29606
  this.count += record.value();
29515
29607
  }
29516
29608
  else {
@@ -29525,6 +29617,9 @@
29525
29617
  this.records = this.records.filter(item => item !== record);
29526
29618
  }
29527
29619
  if (record.isAggregator) {
29620
+ if (this.children) {
29621
+ this.children = this.children.filter(item => item !== record);
29622
+ }
29528
29623
  this.count -= record.value();
29529
29624
  }
29530
29625
  else {
@@ -29546,19 +29641,41 @@
29546
29641
  if (oldRecord.isAggregator) {
29547
29642
  this.count += newRecord.value() - oldRecord.value();
29548
29643
  }
29644
+ if (oldRecord.isAggregator && newRecord.isAggregator && this.children) {
29645
+ this.children = this.children.map(item => {
29646
+ if (item === oldRecord) {
29647
+ return newRecord;
29648
+ }
29649
+ return item;
29650
+ });
29651
+ }
29549
29652
  }
29550
29653
  }
29551
29654
  value() {
29552
- return this.count;
29655
+ return this.changedValue ?? this.count;
29553
29656
  }
29554
29657
  reset() {
29658
+ this.changedValue = undefined;
29659
+ this.children = [];
29555
29660
  this.records = [];
29556
29661
  this.count = 0;
29557
29662
  }
29558
29663
  recalculate() {
29559
29664
  this.count = 0;
29560
29665
  this._formatedValue = undefined;
29561
- if (this.records) {
29666
+ if (this.children && this.children.length > 0) {
29667
+ for (let i = 0; i < this.children.length; i++) {
29668
+ const child = this.children[i];
29669
+ if (child.isAggregator) {
29670
+ const value = child.value();
29671
+ this.count += value ?? 0;
29672
+ }
29673
+ else {
29674
+ this.count++;
29675
+ }
29676
+ }
29677
+ }
29678
+ else if (this.records) {
29562
29679
  for (let i = 0; i < this.records.length; i++) {
29563
29680
  const record = this.records[i];
29564
29681
  if (record.isAggregator) {
@@ -29586,6 +29703,9 @@
29586
29703
  }
29587
29704
  }
29588
29705
  if (record.isAggregator && record.type === AggregationType.AVG) {
29706
+ if (this.children) {
29707
+ this.children.push(record);
29708
+ }
29589
29709
  this.sum += record.sum;
29590
29710
  this.count += record.count;
29591
29711
  }
@@ -29602,6 +29722,9 @@
29602
29722
  this.records = this.records.filter(item => item !== record);
29603
29723
  }
29604
29724
  if (record.isAggregator && record.type === AggregationType.AVG) {
29725
+ if (this.children) {
29726
+ this.children = this.children.filter(item => item !== record);
29727
+ }
29605
29728
  this.sum -= record.sum;
29606
29729
  this.count -= record.count;
29607
29730
  }
@@ -29623,6 +29746,14 @@
29623
29746
  });
29624
29747
  }
29625
29748
  if (oldRecord.isAggregator && oldRecord.type === AggregationType.AVG) {
29749
+ if (this.children && newRecord.isAggregator) {
29750
+ this.children = this.children.map(item => {
29751
+ if (item === oldRecord) {
29752
+ return newRecord;
29753
+ }
29754
+ return item;
29755
+ });
29756
+ }
29626
29757
  this.sum += newRecord.sum - oldRecord.sum;
29627
29758
  this.count += newRecord.count - oldRecord.count;
29628
29759
  }
@@ -29633,9 +29764,11 @@
29633
29764
  }
29634
29765
  }
29635
29766
  value() {
29636
- return this.records?.length >= 1 ? this.sum / this.count : undefined;
29767
+ return this.changedValue ?? (this.records?.length >= 1 ? this.sum / this.count : undefined);
29637
29768
  }
29638
29769
  reset() {
29770
+ this.changedValue = undefined;
29771
+ this.children = [];
29639
29772
  this.records = [];
29640
29773
  this.sum = 0;
29641
29774
  this.count = 0;
@@ -29644,7 +29777,17 @@
29644
29777
  this.sum = 0;
29645
29778
  this.count = 0;
29646
29779
  this._formatedValue = undefined;
29647
- if (this.records) {
29780
+ if (this.children && this.children.length > 0) {
29781
+ for (let i = 0; i < this.children.length; i++) {
29782
+ const child = this.children[i];
29783
+ if (child.isAggregator && child.type === AggregationType.AVG) {
29784
+ const childValue = child.value();
29785
+ this.sum += childValue * child.count;
29786
+ this.count += child.count;
29787
+ }
29788
+ }
29789
+ }
29790
+ else if (this.records) {
29648
29791
  for (let i = 0; i < this.records.length; i++) {
29649
29792
  const record = this.records[i];
29650
29793
  if (record.isAggregator && record.type === AggregationType.AVG) {
@@ -29673,6 +29816,9 @@
29673
29816
  }
29674
29817
  }
29675
29818
  if (record.isAggregator) {
29819
+ if (this.children) {
29820
+ this.children.push(record);
29821
+ }
29676
29822
  this.max = record.max > this.max ? record.max : this.max;
29677
29823
  }
29678
29824
  else if (typeof record === 'number') {
@@ -29692,6 +29838,11 @@
29692
29838
  if (this.isRecord && this.records) {
29693
29839
  this.records = this.records.filter(item => item !== record);
29694
29840
  }
29841
+ if (record.isAggregator) {
29842
+ if (this.children) {
29843
+ this.children = this.children.filter(item => item !== record);
29844
+ }
29845
+ }
29695
29846
  this.recalculate();
29696
29847
  }
29697
29848
  }
@@ -29705,20 +29856,41 @@
29705
29856
  return item;
29706
29857
  });
29707
29858
  }
29859
+ if (oldRecord.isAggregator && newRecord.isAggregator) {
29860
+ if (this.children) {
29861
+ this.children = this.children.map(item => {
29862
+ if (item === oldRecord) {
29863
+ return newRecord;
29864
+ }
29865
+ return item;
29866
+ });
29867
+ }
29868
+ }
29708
29869
  this.recalculate();
29709
29870
  }
29710
29871
  }
29711
29872
  value() {
29712
- return this.records?.length >= 1 ? this.max : undefined;
29873
+ return this.changedValue ?? (this.records?.length >= 1 ? this.max : undefined);
29713
29874
  }
29714
29875
  reset() {
29715
29876
  this.records = [];
29877
+ this.changedValue = undefined;
29878
+ this.children = [];
29716
29879
  this.max = Number.MIN_SAFE_INTEGER;
29717
29880
  }
29718
29881
  recalculate() {
29719
29882
  this.max = Number.MIN_SAFE_INTEGER;
29720
29883
  this._formatedValue = undefined;
29721
- if (this.records) {
29884
+ if (this.children && this.children.length > 0) {
29885
+ for (let i = 0; i < this.children.length; i++) {
29886
+ const child = this.children[i];
29887
+ if (child.isAggregator) {
29888
+ const childValue = child.value();
29889
+ this.max = Math.max(this.max, childValue);
29890
+ }
29891
+ }
29892
+ }
29893
+ else if (this.records) {
29722
29894
  for (let i = 0; i < this.records.length; i++) {
29723
29895
  const record = this.records[i];
29724
29896
  if (record.isAggregator) {
@@ -29751,6 +29923,9 @@
29751
29923
  }
29752
29924
  }
29753
29925
  if (record.isAggregator) {
29926
+ if (this.children) {
29927
+ this.children.push(record);
29928
+ }
29754
29929
  this.min = record.min < this.min ? record.min : this.min;
29755
29930
  }
29756
29931
  else if (typeof record === 'number') {
@@ -29770,6 +29945,11 @@
29770
29945
  if (this.isRecord && this.records) {
29771
29946
  this.records = this.records.filter(item => item !== record);
29772
29947
  }
29948
+ if (record.isAggregator) {
29949
+ if (this.children) {
29950
+ this.children = this.children.filter(item => item !== record);
29951
+ }
29952
+ }
29773
29953
  this.recalculate();
29774
29954
  }
29775
29955
  }
@@ -29783,20 +29963,41 @@
29783
29963
  return item;
29784
29964
  });
29785
29965
  }
29966
+ if (oldRecord.isAggregator && newRecord.isAggregator) {
29967
+ if (this.children) {
29968
+ this.children = this.children.map(item => {
29969
+ if (item === oldRecord) {
29970
+ return newRecord;
29971
+ }
29972
+ return item;
29973
+ });
29974
+ }
29975
+ }
29786
29976
  this.recalculate();
29787
29977
  }
29788
29978
  }
29789
29979
  value() {
29790
- return this.records?.length >= 1 ? this.min : undefined;
29980
+ return this.changedValue ?? (this.records?.length >= 1 ? this.min : undefined);
29791
29981
  }
29792
29982
  reset() {
29793
29983
  this.records = [];
29984
+ this.changedValue = undefined;
29985
+ this.children = [];
29794
29986
  this.min = Number.MAX_SAFE_INTEGER;
29795
29987
  }
29796
29988
  recalculate() {
29797
29989
  this.min = Number.MAX_SAFE_INTEGER;
29798
29990
  this._formatedValue = undefined;
29799
- if (this.records) {
29991
+ if (this.children && this.children.length > 0) {
29992
+ for (let i = 0; i < this.children.length; i++) {
29993
+ const child = this.children[i];
29994
+ if (child.isAggregator) {
29995
+ const childValue = child.value();
29996
+ this.min = Math.min(this.min, childValue);
29997
+ }
29998
+ }
29999
+ }
30000
+ else if (this.records) {
29800
30001
  for (let i = 0; i < this.records.length; i++) {
29801
30002
  const record = this.records[i];
29802
30003
  if (record.isAggregator) {
@@ -33628,11 +33829,15 @@
33628
33829
  this.updatePagerData();
33629
33830
  }
33630
33831
  initTreeHierarchyState() {
33832
+ this._sourceLength = this._source?.length || 0;
33631
33833
  this.currentIndexedData = Array.from({ length: this._sourceLength }, (_, i) => i);
33632
33834
  let nodeLength = this._sourceLength;
33633
33835
  for (let i = 0; i < nodeLength; i++) {
33634
33836
  const indexKey = this.currentIndexedData[i];
33635
33837
  const nodeData = this.getOriginalRecord(indexKey);
33838
+ if (!nodeData) {
33839
+ continue;
33840
+ }
33636
33841
  const children = nodeData.filteredChildren ?? nodeData.children;
33637
33842
  if (children?.length > 0) {
33638
33843
  if (this.hierarchyExpandLevel > 1) {
@@ -34591,11 +34796,13 @@
34591
34796
  targetI = targetIndexs.splice(targetIndexs.length - 1, 1)[0];
34592
34797
  if (sourceIndexs.length >= 1) {
34593
34798
  const parent = this.getOriginalRecord(sourceIndexs);
34594
- const sourceIds = parent.filteredChildren
34595
- ? parent.filteredChildren.splice(sourceI, 1)
34596
- : parent.children.splice(sourceI, 1);
34597
- sourceIds.unshift(targetI, 0);
34598
- Array.prototype.splice.apply(parent.filteredChildren ?? parent.children, sourceIds);
34799
+ if (parent) {
34800
+ const sourceIds = parent.filteredChildren
34801
+ ? parent.filteredChildren.splice(sourceI, 1)
34802
+ : parent.children.splice(sourceI, 1);
34803
+ sourceIds.unshift(targetI, 0);
34804
+ Array.prototype.splice.apply(parent.filteredChildren ?? parent.children, sourceIds);
34805
+ }
34599
34806
  }
34600
34807
  else {
34601
34808
  const sourceIds = this.records.splice(sourceI, 1);
@@ -34624,6 +34831,9 @@
34624
34831
  if (this.hierarchyExpandLevel) {
34625
34832
  for (let i = 0; i < this._sourceLength; i++) {
34626
34833
  const nodeData = this.getOriginalRecord(i);
34834
+ if (!nodeData) {
34835
+ continue;
34836
+ }
34627
34837
  const children = nodeData.filteredChildren ?? nodeData.children;
34628
34838
  children && !nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.collapse);
34629
34839
  }
@@ -34632,6 +34842,9 @@
34632
34842
  for (let i = 0; i < nodeLength; i++) {
34633
34843
  const indexKey = this.currentIndexedData[i];
34634
34844
  const nodeData = this.getOriginalRecord(indexKey);
34845
+ if (!nodeData) {
34846
+ continue;
34847
+ }
34635
34848
  const children = nodeData.filteredChildren ?? nodeData.children;
34636
34849
  if (children?.length > 0 && nodeData.hierarchyState === HierarchyState.expand) {
34637
34850
  this.hasHierarchyStateExpand = true;
@@ -40195,7 +40408,7 @@
40195
40408
  if (table.options.groupTitleFieldFormat) {
40196
40409
  value = table.options.groupTitleFieldFormat(rawRecord, col, row, table);
40197
40410
  }
40198
- else if (vtableMergeName) {
40411
+ else if (vtableMergeName !== undefined) {
40199
40412
  value = vtableMergeName;
40200
40413
  }
40201
40414
  }
@@ -40294,8 +40507,8 @@
40294
40507
  const type = isVtableMerge || isCustomMerge
40295
40508
  ? 'text'
40296
40509
  : table.isHeader(col, row)
40297
- ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
40298
- : table.getBodyColumnType(col, row) ?? 'text';
40510
+ ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
40511
+ : (table.getBodyColumnType(col, row) ?? 'text');
40299
40512
  const padding = cellTheme._vtable.padding;
40300
40513
  const textAlign = cellTheme.text.textAlign;
40301
40514
  const textBaseline = cellTheme.text.textBaseline;
@@ -40457,8 +40670,8 @@
40457
40670
  child.skipMergeUpdate = false;
40458
40671
  }
40459
40672
  else {
40460
- child.skipMergeUpdate = true;
40461
40673
  child._dx = child.attribute.dx ?? 0;
40674
+ child.skipMergeUpdate = true;
40462
40675
  child.setAttributes({
40463
40676
  dx: (child.attribute.dx ?? 0) + dx
40464
40677
  });
@@ -46116,16 +46329,19 @@
46116
46329
  const adaptiveColumns = [];
46117
46330
  const sparklineColumns = [];
46118
46331
  let totalSparklineAbleWidth = 0;
46332
+ const maxWidthColumnMap = new Map();
46333
+ const minWidthColumnMap = new Map();
46119
46334
  for (let col = startCol; col < endColPlus1; col++) {
46120
46335
  const width = update ? newWidths[col] ?? table.getColWidth(col) : table.getColWidth(col);
46121
46336
  const maxWidth = table.getMaxColWidth(col);
46122
46337
  const minWidth = table.getMinColWidth(col);
46123
- if (width !== maxWidth && width !== minWidth) {
46124
- actualWidth += width;
46125
- adaptiveColumns.push(col);
46338
+ actualWidth += width;
46339
+ adaptiveColumns.push(col);
46340
+ if (maxWidth === width) {
46341
+ maxWidthColumnMap.set(col, width);
46126
46342
  }
46127
- else {
46128
- totalDrawWidth -= width;
46343
+ else if (minWidth === width) {
46344
+ minWidthColumnMap.set(col, width);
46129
46345
  }
46130
46346
  if (table.options.customConfig?.shrinkSparklineFirst) {
46131
46347
  const bodyCellType = table.getBodyColumnType(col, 0);
@@ -46135,6 +46351,26 @@
46135
46351
  }
46136
46352
  }
46137
46353
  }
46354
+ if (actualWidth > totalDrawWidth) {
46355
+ for (const [col, width] of minWidthColumnMap) {
46356
+ totalDrawWidth -= width;
46357
+ actualWidth -= width;
46358
+ const index = adaptiveColumns.indexOf(col);
46359
+ if (index !== -1) {
46360
+ adaptiveColumns.splice(index, 1);
46361
+ }
46362
+ }
46363
+ }
46364
+ else if (actualWidth < totalDrawWidth) {
46365
+ for (const [col, width] of maxWidthColumnMap) {
46366
+ totalDrawWidth -= width;
46367
+ actualWidth -= width;
46368
+ const index = adaptiveColumns.indexOf(col);
46369
+ if (index !== -1) {
46370
+ adaptiveColumns.splice(index, 1);
46371
+ }
46372
+ }
46373
+ }
46138
46374
  const factor = totalDrawWidth / actualWidth;
46139
46375
  if (table.options.customConfig?.shrinkSparklineFirst &&
46140
46376
  factor < 1 &&
@@ -46279,16 +46515,16 @@
46279
46515
  if (table.options.groupTitleFieldFormat) {
46280
46516
  value = table.options.groupTitleFieldFormat(rawRecord, col, row, table);
46281
46517
  }
46282
- else if (vtableMergeName) {
46518
+ else if (vtableMergeName !== undefined) {
46283
46519
  value = vtableMergeName;
46284
46520
  }
46285
46521
  }
46286
46522
  }
46287
46523
  const type = isVtableMerge || isCustomMerge
46288
46524
  ? 'text'
46289
- : (table.isHeader(col, row)
46290
- ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
46291
- : table.getBodyColumnType(col, row)) ?? 'text';
46525
+ : ((table.isHeader(col, row)
46526
+ ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
46527
+ : table.getBodyColumnType(col, row)) ?? 'text');
46292
46528
  if (isPromise(value)) {
46293
46529
  createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
46294
46530
  dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
@@ -63537,7 +63773,7 @@
63537
63773
  return TABLE_EVENT_TYPE;
63538
63774
  }
63539
63775
  options;
63540
- version = "1.19.1";
63776
+ version = "1.19.2";
63541
63777
  pagination;
63542
63778
  id = `VTable${Date.now()}`;
63543
63779
  headerStyleCache;
@@ -68486,6 +68722,7 @@
68486
68722
  _headerCellIds;
68487
68723
  _columns;
68488
68724
  _columnsIncludeHided;
68725
+ _columnMaxDepth = 0;
68489
68726
  rowSeriesNumberColumn;
68490
68727
  leftRowSeriesNumberColumn;
68491
68728
  rightRowSeriesNumberColumn;
@@ -68513,6 +68750,7 @@
68513
68750
  this._columns = [];
68514
68751
  this._columnsIncludeHided = [];
68515
68752
  this._headerCellIds = [];
68753
+ this._columnMaxDepth = this._calculateMaxDepth(columns);
68516
68754
  this.hierarchyIndent = hierarchyIndent ?? 20;
68517
68755
  this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment;
68518
68756
  this.columnHierarchyType = table.options.headerHierarchyType;
@@ -69298,7 +69536,19 @@
69298
69536
  const skipRowCount = this.hasAggregationOnTopCount ? this.headerLevelCount + 1 : this.headerLevelCount;
69299
69537
  return skipRowCount + index;
69300
69538
  }
69301
- _addHeaders(row, column, roots, hideColumnsSubHeader) {
69539
+ _calculateMaxDepth(columns, currentDepth = 0) {
69540
+ let maxDepth = currentDepth;
69541
+ columns.forEach(col => {
69542
+ if (col.columns && col.columns.length > 0) {
69543
+ const childDepth = this._calculateMaxDepth(col.columns, currentDepth + 1);
69544
+ if (childDepth > maxDepth) {
69545
+ maxDepth = childDepth;
69546
+ }
69547
+ }
69548
+ });
69549
+ return maxDepth;
69550
+ }
69551
+ _addHeaders(row, column, roots, hideColumnsSubHeader, lastLevelSpan) {
69302
69552
  const results = [];
69303
69553
  const rowCells = this._newRow(row, hideColumnsSubHeader);
69304
69554
  column.forEach((hd) => {
@@ -69317,20 +69567,45 @@
69317
69567
  columnWidthComputeMode: hd.columnWidthComputeMode
69318
69568
  };
69319
69569
  results[id] = cell;
69320
- for (let r = row - 1; r >= 0; r--) {
69321
- this._headerCellIds[r] && (this._headerCellIds[r][col] = roots[r]);
69570
+ let maxRow = row;
69571
+ if (hd.levelSpan) {
69572
+ maxRow = Math.min(row + hd.levelSpan - 1, this._columnMaxDepth - 1);
69573
+ for (let r = row; r <= maxRow; r++) {
69574
+ if (!this._headerCellIds[r]) {
69575
+ this._headerCellIds[r] = [];
69576
+ }
69577
+ if (this._headerCellIds[r][col] === undefined) {
69578
+ this._headerCellIds[r][col] = id;
69579
+ }
69580
+ }
69581
+ }
69582
+ if (lastLevelSpan) {
69583
+ for (let r = maxRow - 1; r >= 0; r--) {
69584
+ if (this._headerCellIds[r] &&
69585
+ this._headerCellIds[r][col] === undefined &&
69586
+ roots[maxRow - lastLevelSpan] !== undefined) {
69587
+ this._headerCellIds[r][col] = roots[maxRow - lastLevelSpan];
69588
+ }
69589
+ }
69590
+ }
69591
+ else {
69592
+ for (let r = maxRow - 1; r >= 0; r--) {
69593
+ if (this._headerCellIds[r] && this._headerCellIds[r][col] === undefined && roots[r] !== undefined) {
69594
+ this._headerCellIds[r][col] = roots[r];
69595
+ }
69596
+ }
69322
69597
  }
69323
69598
  if (!hideColumnsSubHeader) {
69324
69599
  rowCells[col] = id;
69325
69600
  }
69326
- else if (this._headerCellIds[row - 1]) {
69601
+ else if (this._headerCellIds[row - 1] && this._headerCellIds[row - 1][col] !== undefined) {
69327
69602
  rowCells[col] = this._headerCellIds[row - 1][col];
69328
69603
  }
69329
69604
  const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
69330
69605
  if (!!hd.columns && !!expand) {
69331
69606
  const isAllHided = hd.columns.every((c) => c.hide);
69332
69607
  !isAllHided &&
69333
- this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
69608
+ this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
69334
69609
  }
69335
69610
  else {
69336
69611
  const colDef = {
@@ -69733,7 +70008,13 @@
69733
70008
  const editor = this.table.getEditor(col, row);
69734
70009
  if (editor) {
69735
70010
  if (this.table.internalProps.layoutMap?.isAggregation?.(col, row)) {
69736
- return;
70011
+ const isPivotTable = this.table.isPivotTable?.();
70012
+ const updateAggregationOnEditCell = isPivotTable
70013
+ ? this.table.internalProps?.dataConfig?.updateAggregationOnEditCell
70014
+ : false;
70015
+ if (!isPivotTable || (isPivotTable && updateAggregationOnEditCell)) {
70016
+ return;
70017
+ }
69737
70018
  }
69738
70019
  const record = this.table.getCellRawRecord(col, row);
69739
70020
  if (record?.vtableMerge) {
@@ -70781,7 +71062,7 @@
70781
71062
  this._hasAutoImageColumn = undefined;
70782
71063
  this.refreshHeader();
70783
71064
  this.dataSource.updateColumns?.(this.internalProps.columns);
70784
- if (this.records && checkHasAggregationOnColumnDefine(columns)) {
71065
+ if (this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns)) {
70785
71066
  this.dataSource.processRecords(this.dataSource.dataSourceObj?.records ?? this.dataSource.dataSourceObj);
70786
71067
  }
70787
71068
  this.internalProps.useOneRowHeightFillAll = false;
@@ -80135,6 +80416,12 @@
80135
80416
  this.fullRowDimensionKeys = [];
80136
80417
  this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys);
80137
80418
  if (this.rowHierarchyType === 'tree') {
80419
+ if (this.extensionRows?.length > 0) {
80420
+ this.extensionRows.forEach(extensionRow => {
80421
+ const extensionRowDimensionKeys = extensionRow.rows?.map(row => (typeof row === 'string' ? row : row.dimensionKey)) || [];
80422
+ this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(extensionRowDimensionKeys);
80423
+ });
80424
+ }
80138
80425
  this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine, this.rowHeaderObjs);
80139
80426
  }
80140
80427
  else if (this.rowHierarchyType === 'grid-tree') {
@@ -81561,6 +81848,23 @@
81561
81848
  this._colHeaderPathCache.clear();
81562
81849
  this._rowHeaderPathCache.clear();
81563
81850
  }
81851
+ isAggregation(col, row) {
81852
+ if (this.isHeader(col, row)) {
81853
+ return false;
81854
+ }
81855
+ const cellHeaderPaths = this.getCellHeaderPaths(col, row);
81856
+ for (const path of cellHeaderPaths.colHeaderPaths) {
81857
+ if (path.role === 'sub-total' || path.role === 'grand-total') {
81858
+ return true;
81859
+ }
81860
+ }
81861
+ for (const path of cellHeaderPaths.rowHeaderPaths) {
81862
+ if (path.role === 'sub-total' || path.role === 'grand-total') {
81863
+ return true;
81864
+ }
81865
+ }
81866
+ return false;
81867
+ }
81564
81868
  }
81565
81869
  function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
81566
81870
  if (paddingInner === 1) {
@@ -83230,6 +83534,11 @@
83230
83534
  else {
83231
83535
  flatColKey = colKey.join(this.stringJoinChar);
83232
83536
  }
83537
+ if (typeof newValue === 'string') {
83538
+ if (!isNaN(parseFloat(newValue))) {
83539
+ newValue = parseFloat(newValue);
83540
+ }
83541
+ }
83233
83542
  if (this.changedTree[flatRowKey]?.[flatColKey]) {
83234
83543
  this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
83235
83544
  }
@@ -83246,6 +83555,134 @@
83246
83555
  if (cellAggregator?.records.length === 1) {
83247
83556
  cellAggregator.records[0][this.indicatorKeys[indicatorIndex]] = newValue;
83248
83557
  }
83558
+ if (this.dataConfig?.updateAggregationOnEditCell ?? false) {
83559
+ if (cellAggregator) {
83560
+ cellAggregator.changedValue = newValue;
83561
+ this.recalculateTotals(rowKey, colKey, indicator);
83562
+ }
83563
+ else {
83564
+ const newCellAggregator = new SumAggregator({
83565
+ key: indicator,
83566
+ field: indicator,
83567
+ isRecord: true,
83568
+ });
83569
+ newCellAggregator.changedValue = newValue;
83570
+ this.recalculateTotals(rowKey, colKey, indicator, newCellAggregator);
83571
+ }
83572
+ }
83573
+ }
83574
+ recalculateTotals(rowKey = [], colKey = [], indicator, newCellAggregator) {
83575
+ if (!this.totals ||
83576
+ Object.keys(this.tree).length === 0 ||
83577
+ (!(this.totals.row?.showGrandTotals ||
83578
+ (this.totals.row?.subTotalsDimensions &&
83579
+ this.totals.row.subTotalsDimensions.length > 0 &&
83580
+ this.totals.row.showSubTotals !== false)) &&
83581
+ !(this.totals.column?.showGrandTotals ||
83582
+ (this.totals.column?.subTotalsDimensions &&
83583
+ this.totals.column.subTotalsDimensions.length > 0 &&
83584
+ this.totals.column.showSubTotals !== false)))) {
83585
+ return;
83586
+ }
83587
+ const flatRowKey = Array.isArray(rowKey) ? rowKey.join(this.stringJoinChar) : rowKey;
83588
+ const flatColKey = Array.isArray(colKey) ? colKey.join(this.stringJoinChar) : colKey;
83589
+ const indicatorIndex = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.indexOf(indicator);
83590
+ const aggregatorsToReset = new Set();
83591
+ const subTotalAggregators = new Set();
83592
+ const rowKeyParts = flatRowKey.split(this.stringJoinChar);
83593
+ const colKeyParts = flatColKey.split(this.stringJoinChar);
83594
+ const addAggregatorToResetSet = (agg, rowKey, colKey) => {
83595
+ if (agg && !(rowKey === flatRowKey && colKey === flatColKey)) {
83596
+ aggregatorsToReset.add(agg);
83597
+ if (rowKey === flatRowKey || colKey === flatColKey) {
83598
+ subTotalAggregators.add(agg);
83599
+ }
83600
+ }
83601
+ };
83602
+ if (this.totals?.row?.subTotalsDimensions && this.totals.row.showSubTotals !== false) {
83603
+ for (let i = 0; i < this.totals.row.subTotalsDimensions.length; i++) {
83604
+ const dimension = this.totals.row.subTotalsDimensions[i];
83605
+ const dimensionIndex = this.rows.indexOf(dimension);
83606
+ if (dimensionIndex >= 0 && dimensionIndex < rowKeyParts.length) {
83607
+ const rowSubTotalKeyParts = rowKeyParts.slice(0, dimensionIndex + 1);
83608
+ if (this.rowHierarchyType !== 'tree') {
83609
+ rowSubTotalKeyParts.push(this.rowSubTotalLabel);
83610
+ }
83611
+ const flatRowSubTotalKey = rowSubTotalKeyParts.join(this.stringJoinChar);
83612
+ if (this.tree[flatRowSubTotalKey]?.[flatColKey]?.[indicatorIndex]) {
83613
+ addAggregatorToResetSet(this.tree[flatRowSubTotalKey][flatColKey][indicatorIndex], flatRowSubTotalKey, flatColKey);
83614
+ }
83615
+ if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
83616
+ for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
83617
+ const colDimension = this.totals.column.subTotalsDimensions[j];
83618
+ const colDimensionIndex = this.columns.indexOf(colDimension);
83619
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
83620
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
83621
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
83622
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
83623
+ if (this.tree[flatRowSubTotalKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
83624
+ addAggregatorToResetSet(this.tree[flatRowSubTotalKey][flatColSubTotalKey][indicatorIndex], flatRowSubTotalKey, flatColSubTotalKey);
83625
+ }
83626
+ }
83627
+ }
83628
+ }
83629
+ if (this.totals?.column?.showGrandTotals) {
83630
+ if (this.tree[flatRowSubTotalKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
83631
+ addAggregatorToResetSet(this.tree[flatRowSubTotalKey][this.colGrandTotalLabel][indicatorIndex], flatRowSubTotalKey, this.colGrandTotalLabel);
83632
+ }
83633
+ }
83634
+ }
83635
+ }
83636
+ }
83637
+ if (this.totals?.row?.showGrandTotals) {
83638
+ if (this.tree[this.rowGrandTotalLabel]?.[flatColKey]?.[indicatorIndex]) {
83639
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey);
83640
+ }
83641
+ if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
83642
+ for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
83643
+ const colDimension = this.totals.column.subTotalsDimensions[j];
83644
+ const colDimensionIndex = this.columns.indexOf(colDimension);
83645
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
83646
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
83647
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
83648
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
83649
+ if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
83650
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
83651
+ }
83652
+ }
83653
+ }
83654
+ }
83655
+ if (this.totals?.column?.showGrandTotals) {
83656
+ if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
83657
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
83658
+ }
83659
+ }
83660
+ }
83661
+ if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
83662
+ for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
83663
+ const colDimension = this.totals.column.subTotalsDimensions[j];
83664
+ const colDimensionIndex = this.columns.indexOf(colDimension);
83665
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
83666
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
83667
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
83668
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
83669
+ if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
83670
+ addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
83671
+ }
83672
+ }
83673
+ }
83674
+ }
83675
+ if (this.totals?.column?.showGrandTotals) {
83676
+ if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
83677
+ addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
83678
+ }
83679
+ }
83680
+ aggregatorsToReset.forEach(agg => {
83681
+ if (newCellAggregator && subTotalAggregators.has(agg)) {
83682
+ agg.push(newCellAggregator);
83683
+ }
83684
+ agg.recalculate();
83685
+ });
83249
83686
  }
83250
83687
  changeRecordFieldValue(fieldName, oldValue, value) {
83251
83688
  let isIndicatorName = false;
@@ -84708,6 +85145,15 @@
84708
85145
  this.scenegraph.updateCellContent(sCol, sRow);
84709
85146
  }
84710
85147
  }
85148
+ if (this.options.dataConfig?.updateAggregationOnEditCell ?? false) {
85149
+ for (let col = 0; col < this.colCount; col++) {
85150
+ for (let row = 0; row < this.rowCount; row++) {
85151
+ if (this.internalProps.layoutMap.isAggregation(col, row)) {
85152
+ this.scenegraph.updateCellContent(col, row);
85153
+ }
85154
+ }
85155
+ }
85156
+ }
84711
85157
  if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
84712
85158
  if (this.internalProps._widthResizedColMap.size === 0) {
84713
85159
  this.scenegraph.recalculateColWidths();
@@ -84810,6 +85256,15 @@
84810
85256
  this.scenegraph.updateCellContent(sCol, sRow);
84811
85257
  }
84812
85258
  }
85259
+ if (this.options.dataConfig?.updateAggregationOnEditCell ?? false) {
85260
+ for (let col = 0; col < this.colCount; col++) {
85261
+ for (let row = 0; row < this.rowCount; row++) {
85262
+ if (this.internalProps.layoutMap.isAggregation(col, row)) {
85263
+ this.scenegraph.updateCellContent(col, row);
85264
+ }
85265
+ }
85266
+ }
85267
+ }
84813
85268
  if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
84814
85269
  if (this.internalProps._widthResizedColMap.size === 0) {
84815
85270
  this.scenegraph.recalculateColWidths();
@@ -86735,7 +87190,7 @@
86735
87190
  }
86736
87191
 
86737
87192
  registerForVrender();
86738
- const version = "1.19.1";
87193
+ const version = "1.19.2";
86739
87194
  function getIcons() {
86740
87195
  return get$2();
86741
87196
  }
@@ -86802,6 +87257,7 @@
86802
87257
  exports.setCustomAlphabetCharSet = setCustomAlphabetCharSet;
86803
87258
  exports.textMeasure = textMeasure;
86804
87259
  exports.themes = themes$1;
87260
+ exports.toBoxArray = toBoxArray$1;
86805
87261
  exports.updateCell = updateCell$1;
86806
87262
  exports.version = version;
86807
87263