k-vtable 1.0.7 → 1.0.9

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 (109) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +5 -0
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/core/BaseTable.js +1 -1
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/data/DataSource.js +2 -11
  7. package/cjs/data/DataSource.js.map +1 -1
  8. package/cjs/dataset/dataset.js +20 -18
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/event/helper.js +30 -22
  11. package/cjs/event/helper.js.map +1 -1
  12. package/cjs/index.d.ts +1 -1
  13. package/cjs/index.js +1 -1
  14. package/cjs/index.js.map +1 -1
  15. package/cjs/scenegraph/component/table-component.d.ts +4 -0
  16. package/cjs/scenegraph/component/table-component.js +72 -2
  17. package/cjs/scenegraph/component/table-component.js.map +1 -1
  18. package/cjs/scenegraph/component/util.d.ts +2 -0
  19. package/cjs/scenegraph/component/util.js +11 -1
  20. package/cjs/scenegraph/component/util.js.map +1 -1
  21. package/cjs/scenegraph/graphic/chart.js +7 -2
  22. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  23. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
  24. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -15
  25. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  26. package/cjs/scenegraph/graphic/contributions/index.js +2 -0
  27. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  28. package/cjs/scenegraph/group-creater/cell-helper.js +3 -2
  29. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  30. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  31. package/cjs/scenegraph/layout/frozen.js +2 -0
  32. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  33. package/cjs/scenegraph/layout/update-col.js +9 -4
  34. package/cjs/scenegraph/layout/update-col.js.map +1 -1
  35. package/cjs/scenegraph/layout/update-row.js +11 -4
  36. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  37. package/cjs/scenegraph/scenegraph.js +6 -3
  38. package/cjs/scenegraph/scenegraph.js.map +1 -1
  39. package/cjs/scenegraph/select/update-select-border.js +2 -2
  40. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  41. package/cjs/state/cell-move/index.js +13 -4
  42. package/cjs/state/cell-move/index.js.map +1 -1
  43. package/cjs/state/hover/update-position.js +2 -2
  44. package/cjs/state/hover/update-position.js.map +1 -1
  45. package/cjs/state/resize/update-resize-column.js +1 -0
  46. package/cjs/state/resize/update-resize-column.js.map +1 -1
  47. package/cjs/state/state.d.ts +2 -0
  48. package/cjs/state/state.js +4 -0
  49. package/cjs/state/state.js.map +1 -1
  50. package/cjs/tools/util.d.ts +2 -1
  51. package/cjs/tools/util.js +14 -3
  52. package/cjs/tools/util.js.map +1 -1
  53. package/cjs/vrender.js.map +1 -1
  54. package/dist/vtable.js +379 -185
  55. package/dist/vtable.min.js +2 -2
  56. package/es/ListTable.d.ts +1 -0
  57. package/es/ListTable.js +5 -0
  58. package/es/ListTable.js.map +1 -1
  59. package/es/core/BaseTable.js +1 -1
  60. package/es/core/BaseTable.js.map +1 -1
  61. package/es/data/DataSource.js +3 -12
  62. package/es/data/DataSource.js.map +1 -1
  63. package/es/dataset/dataset.js +20 -18
  64. package/es/dataset/dataset.js.map +1 -1
  65. package/es/event/helper.js +30 -22
  66. package/es/event/helper.js.map +1 -1
  67. package/es/index.d.ts +1 -1
  68. package/es/index.js +1 -1
  69. package/es/index.js.map +1 -1
  70. package/es/scenegraph/component/table-component.d.ts +4 -0
  71. package/es/scenegraph/component/table-component.js +73 -3
  72. package/es/scenegraph/component/table-component.js.map +1 -1
  73. package/es/scenegraph/component/util.d.ts +2 -0
  74. package/es/scenegraph/component/util.js +8 -0
  75. package/es/scenegraph/component/util.js.map +1 -1
  76. package/es/scenegraph/graphic/chart.js +8 -1
  77. package/es/scenegraph/graphic/chart.js.map +1 -1
  78. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -0
  79. package/es/scenegraph/graphic/contributions/group-contribution-render.js +47 -14
  80. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  81. package/es/scenegraph/graphic/contributions/index.js +2 -1
  82. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  83. package/es/scenegraph/group-creater/cell-helper.js +3 -2
  84. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  85. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  86. package/es/scenegraph/layout/frozen.js +2 -0
  87. package/es/scenegraph/layout/frozen.js.map +1 -1
  88. package/es/scenegraph/layout/update-col.js +8 -3
  89. package/es/scenegraph/layout/update-col.js.map +1 -1
  90. package/es/scenegraph/layout/update-row.js +9 -2
  91. package/es/scenegraph/layout/update-row.js.map +1 -1
  92. package/es/scenegraph/scenegraph.js +6 -3
  93. package/es/scenegraph/scenegraph.js.map +1 -1
  94. package/es/scenegraph/select/update-select-border.js +2 -2
  95. package/es/scenegraph/select/update-select-border.js.map +1 -1
  96. package/es/state/cell-move/index.js +14 -3
  97. package/es/state/cell-move/index.js.map +1 -1
  98. package/es/state/hover/update-position.js +2 -2
  99. package/es/state/hover/update-position.js.map +1 -1
  100. package/es/state/resize/update-resize-column.js +1 -0
  101. package/es/state/resize/update-resize-column.js.map +1 -1
  102. package/es/state/state.d.ts +2 -0
  103. package/es/state/state.js +4 -0
  104. package/es/state/state.js.map +1 -1
  105. package/es/tools/util.d.ts +2 -1
  106. package/es/tools/util.js +13 -0
  107. package/es/tools/util.js.map +1 -1
  108. package/es/vrender.js.map +1 -1
  109. package/package.json +5 -5
package/dist/vtable.js CHANGED
@@ -34605,6 +34605,21 @@
34605
34605
  obj[childrenProperty].forEach((child) => traverseObject(child, childrenProperty, callback));
34606
34606
  }
34607
34607
  }
34608
+ function computeChildrenNodeLength(indexKey, hierarchyState, nodeData) {
34609
+ let size = 0;
34610
+ if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
34611
+ return size;
34612
+ }
34613
+ const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
34614
+ if (children) {
34615
+ for (let i = 0; i < children.length; i++) {
34616
+ size += 1;
34617
+ const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
34618
+ size += computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
34619
+ }
34620
+ }
34621
+ return size;
34622
+ }
34608
34623
 
34609
34624
  const isNode = typeof window === 'undefined' || typeof window.window === 'undefined';
34610
34625
  let arrayFind;
@@ -37286,21 +37301,7 @@
37286
37301
  this.hasHierarchyStateExpand = true;
37287
37302
  }
37288
37303
  else if (state === HierarchyState.expand) {
37289
- let childrenLength = 0;
37290
- const computeChildrenNodeLength = (indexKey, hierarchyState, nodeData) => {
37291
- if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
37292
- return;
37293
- }
37294
- const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
37295
- if (children) {
37296
- for (let i = 0; i < children.length; i++) {
37297
- childrenLength += 1;
37298
- const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
37299
- computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
37300
- }
37301
- }
37302
- };
37303
- computeChildrenNodeLength(indexed, state, data);
37304
+ const childrenLength = computeChildrenNodeLength(indexed, state, data);
37304
37305
  this.currentIndexedData.splice(this.currentIndexedData.indexOf(indexed) + 1, childrenLength);
37305
37306
  data.hierarchyState = HierarchyState.collapse;
37306
37307
  }
@@ -43660,8 +43661,11 @@
43660
43661
  });
43661
43662
  const textMark = oldCellGroup.getChildByName('text');
43662
43663
  if (forceFastUpdate && textMark) {
43664
+ const textAlign = cellTheme.text.textAlign;
43665
+ const hierarchyOffset = getHierarchyOffset(col, row, table);
43663
43666
  const attribute = {
43664
- textBaseline: 'top'
43667
+ textBaseline: 'top',
43668
+ dx: textAlign === 'left' ? hierarchyOffset : 0
43665
43669
  };
43666
43670
  textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
43667
43671
  }
@@ -43722,8 +43726,8 @@
43722
43726
  const type = isVtableMerge || isCustomMerge
43723
43727
  ? 'text'
43724
43728
  : table.isHeader(col, row)
43725
- ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
43726
- : (table.getBodyColumnType(col, row) ?? 'text');
43729
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
43730
+ : table.getBodyColumnType(col, row) ?? 'text';
43727
43731
  const padding = cellTheme._vtable.padding;
43728
43732
  const textAlign = cellTheme.text.textAlign;
43729
43733
  const textBaseline = cellTheme.text.textBaseline;
@@ -46099,6 +46103,12 @@
46099
46103
  }
46100
46104
  return rowY;
46101
46105
  }
46106
+ function getRowBottomY(table) {
46107
+ return table.tableNoFrameHeight - table.getBottomFrozenRowsHeight();
46108
+ }
46109
+ function getRowTopY(table) {
46110
+ return table.getFrozenRowsHeight();
46111
+ }
46102
46112
 
46103
46113
  class TableComponent {
46104
46114
  table;
@@ -46114,6 +46124,8 @@
46114
46124
  hScrollBar;
46115
46125
  frozenShadowLine;
46116
46126
  rightFrozenShadowLine;
46127
+ topFrozenShadowLine;
46128
+ bottonFrozenShadowLine;
46117
46129
  drillIcon;
46118
46130
  cellMover;
46119
46131
  labelVisible;
@@ -46250,6 +46262,7 @@
46250
46262
  const shadowWidth = theme.frozenColumnLine?.shadow?.width;
46251
46263
  const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
46252
46264
  const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
46265
+ theme.cellBorder?.borderColor ?? 'red';
46253
46266
  const visible = theme.frozenColumnLine?.shadow?.visible;
46254
46267
  this.frozenShadowLine = createRect({
46255
46268
  visible: visible === 'always',
@@ -46289,12 +46302,52 @@
46289
46302
  ]
46290
46303
  }
46291
46304
  });
46305
+ this.topFrozenShadowLine = createRect({
46306
+ visible: visible === 'always',
46307
+ pickable: false,
46308
+ x: 0,
46309
+ y: 0,
46310
+ width: 0,
46311
+ height: shadowWidth,
46312
+ fill: {
46313
+ gradient: 'linear',
46314
+ x0: 0,
46315
+ y0: 0,
46316
+ x1: 0,
46317
+ y1: 1,
46318
+ stops: [
46319
+ { color: shadowStartColor, offset: 0 },
46320
+ { color: shadowEndColor, offset: 1 }
46321
+ ]
46322
+ }
46323
+ });
46324
+ this.bottonFrozenShadowLine = createRect({
46325
+ visible: visible === 'always',
46326
+ pickable: false,
46327
+ x: 0,
46328
+ y: 0,
46329
+ width: 0,
46330
+ height: shadowWidth,
46331
+ fill: {
46332
+ gradient: 'linear',
46333
+ x0: 0,
46334
+ y0: 0,
46335
+ x1: 0,
46336
+ y1: 1,
46337
+ stops: [
46338
+ { color: shadowEndColor, offset: 0 },
46339
+ { color: shadowStartColor, offset: 1 }
46340
+ ]
46341
+ }
46342
+ });
46292
46343
  this.menu = new MenuHandler$1(this.table);
46293
46344
  this.drillIcon = new DrillIcon();
46294
46345
  }
46295
46346
  addToGroup(componentGroup) {
46296
46347
  componentGroup.addChild(this.frozenShadowLine);
46297
46348
  componentGroup.addChild(this.rightFrozenShadowLine);
46349
+ componentGroup.addChild(this.bottonFrozenShadowLine);
46350
+ componentGroup.addChild(this.topFrozenShadowLine);
46298
46351
  componentGroup.addChild(this.columnResizeBgLine);
46299
46352
  componentGroup.addChild(this.columnResizeLine);
46300
46353
  componentGroup.addChild(this.columnResizeLabel);
@@ -46622,6 +46675,40 @@
46622
46675
  });
46623
46676
  }
46624
46677
  }
46678
+ setBottonFrozenColumnShadow() {
46679
+ const rowY = getRowBottomY(this.table);
46680
+ if (this.table.bottomFrozenRowCount === 0 || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
46681
+ this.bottonFrozenShadowLine.setAttributes({
46682
+ visible: false,
46683
+ y: 0,
46684
+ width: 0
46685
+ });
46686
+ }
46687
+ else {
46688
+ this.bottonFrozenShadowLine.setAttributes({
46689
+ visible: true,
46690
+ y: rowY - (this.table.theme.frozenColumnLine?.shadow?.width ?? 2),
46691
+ width: this.table.getDrawRange().width
46692
+ });
46693
+ }
46694
+ }
46695
+ setTopFrozenColumnShadow() {
46696
+ const rowY = getRowTopY(this.table);
46697
+ if (this.table.columnHeaderLevelCount === this.table.frozenRowCount || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
46698
+ this.bottonFrozenShadowLine.setAttributes({
46699
+ visible: false,
46700
+ y: 0,
46701
+ width: 0
46702
+ });
46703
+ }
46704
+ else {
46705
+ this.topFrozenShadowLine.setAttributes({
46706
+ visible: true,
46707
+ y: rowY,
46708
+ width: this.table.getDrawRange().width
46709
+ });
46710
+ }
46711
+ }
46625
46712
  hideFrozenColumnShadow() {
46626
46713
  const visible1 = this.table.theme.frozenColumnLine?.shadow?.visible;
46627
46714
  const visible = this.table.theme.frozenColumnLine?.shadow?.visible ?? visible1;
@@ -47131,6 +47218,114 @@
47131
47218
  return c > 3 && r && Object.defineProperty(target, key, r), r;
47132
47219
  }
47133
47220
 
47221
+ function getCellHoverColor(cellGroup, table) {
47222
+ let colorKey;
47223
+ if (cellGroup.role === 'cell' &&
47224
+ isValid$3(cellGroup.mergeStartCol) &&
47225
+ isValid$3(cellGroup.mergeStartRow) &&
47226
+ isValid$3(cellGroup.mergeEndCol) &&
47227
+ isValid$3(cellGroup.mergeEndRow)) {
47228
+ const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
47229
+ for (let col = colStart; col <= colEnd; col++) {
47230
+ for (let row = rowStart; row <= rowEnd; row++) {
47231
+ const key = isCellHover(table.stateManager, col, row, cellGroup);
47232
+ if (key && (!colorKey || key === 'cellBgColor')) {
47233
+ colorKey = key;
47234
+ }
47235
+ }
47236
+ }
47237
+ }
47238
+ else if (cellGroup.role === 'cell') {
47239
+ colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
47240
+ }
47241
+ if (!colorKey) {
47242
+ return undefined;
47243
+ }
47244
+ let hoverStyle;
47245
+ const layout = table.internalProps.layoutMap;
47246
+ if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
47247
+ hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
47248
+ }
47249
+ else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
47250
+ hoverStyle = table.theme.headerStyle?.hover;
47251
+ }
47252
+ else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
47253
+ hoverStyle = table.theme.rowHeaderStyle?.hover;
47254
+ }
47255
+ else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
47256
+ hoverStyle =
47257
+ table.theme.bottomFrozenStyle?.hover ||
47258
+ (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
47259
+ }
47260
+ else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
47261
+ hoverStyle =
47262
+ table.theme.rightFrozenStyle?.hover ||
47263
+ (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
47264
+ }
47265
+ else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
47266
+ hoverStyle = table.theme.bodyStyle?.hover;
47267
+ }
47268
+ const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
47269
+ return fillColor;
47270
+ }
47271
+ function isCellHover(state, col, row, cellGroup) {
47272
+ const { highlightScope, disableHeader, cellPos } = state.hover;
47273
+ const table = state.table;
47274
+ const isHeader = table.isHeader(col, row);
47275
+ if (isHeader && disableHeader) {
47276
+ return undefined;
47277
+ }
47278
+ let hoverMode;
47279
+ if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
47280
+ hoverMode = 'cellBgColor';
47281
+ }
47282
+ else if (highlightScope === HighlightScope.column && cellPos.col === col) {
47283
+ if (cellPos.col === col && cellPos.row === row) {
47284
+ hoverMode = 'cellBgColor';
47285
+ }
47286
+ else {
47287
+ hoverMode = 'inlineColumnBgColor';
47288
+ }
47289
+ }
47290
+ else if (highlightScope === HighlightScope.row && cellPos.row === row) {
47291
+ if (cellPos.col === col && cellPos.row === row) {
47292
+ hoverMode = 'cellBgColor';
47293
+ }
47294
+ else {
47295
+ hoverMode = 'inlineRowBgColor';
47296
+ }
47297
+ }
47298
+ else if (highlightScope === HighlightScope.cross) {
47299
+ if (cellPos.col === col && cellPos.row === row) {
47300
+ hoverMode = 'cellBgColor';
47301
+ }
47302
+ else if (cellPos.col === col) {
47303
+ hoverMode = 'inlineColumnBgColor';
47304
+ }
47305
+ else if (cellPos.row === row) {
47306
+ hoverMode = 'inlineRowBgColor';
47307
+ }
47308
+ }
47309
+ if (hoverMode) {
47310
+ let cellDisable;
47311
+ if (isHeader) {
47312
+ const define = table.getHeaderDefine(col, row);
47313
+ cellDisable = define?.disableHeaderHover;
47314
+ if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
47315
+ cellDisable = true;
47316
+ }
47317
+ }
47318
+ else {
47319
+ const define = table.getBodyColumnDefine(col, row);
47320
+ cellDisable = define?.disableHover;
47321
+ }
47322
+ if (cellDisable) {
47323
+ hoverMode = undefined;
47324
+ }
47325
+ }
47326
+ return hoverMode;
47327
+ }
47328
+
47134
47329
  const CHART_NUMBER_TYPE = genNumberType();
47135
47330
  class Chart extends Rect$2 {
47136
47331
  type = 'chart';
@@ -47166,6 +47361,7 @@
47166
47361
  activate(table) {
47167
47362
  this.active = true;
47168
47363
  const { col, row } = this.parent;
47364
+ const hoverColor = getCellHoverColor(this.parent, table);
47169
47365
  const { x1, y1, x2, y2 } = this.getViewBox();
47170
47366
  const tableBound = getTableBounds(col, row, table);
47171
47367
  const clipBound = tableBound.intersect({
@@ -47214,6 +47410,15 @@
47214
47410
  ctx.inuse = false;
47215
47411
  stage.needRender = false;
47216
47412
  chartStage.resumeRender();
47413
+ },
47414
+ afterClearScreen(drawParams) {
47415
+ const { context, layer, viewBox } = drawParams;
47416
+ if (layer.main) {
47417
+ context.beginPath();
47418
+ context.fillStyle = hoverColor;
47419
+ context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1);
47420
+ context.fill();
47421
+ }
47217
47422
  }
47218
47423
  }));
47219
47424
  const chartStage = this.activeChartInstance.getStage();
@@ -47684,114 +47889,6 @@
47684
47889
  injectable()
47685
47890
  ], AfterGifImageRenderContribution);
47686
47891
 
47687
- function getCellHoverColor(cellGroup, table) {
47688
- let colorKey;
47689
- if (cellGroup.role === 'cell' &&
47690
- isValid$3(cellGroup.mergeStartCol) &&
47691
- isValid$3(cellGroup.mergeStartRow) &&
47692
- isValid$3(cellGroup.mergeEndCol) &&
47693
- isValid$3(cellGroup.mergeEndRow)) {
47694
- const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
47695
- for (let col = colStart; col <= colEnd; col++) {
47696
- for (let row = rowStart; row <= rowEnd; row++) {
47697
- const key = isCellHover(table.stateManager, col, row, cellGroup);
47698
- if (key && (!colorKey || key === 'cellBgColor')) {
47699
- colorKey = key;
47700
- }
47701
- }
47702
- }
47703
- }
47704
- else if (cellGroup.role === 'cell') {
47705
- colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
47706
- }
47707
- if (!colorKey) {
47708
- return undefined;
47709
- }
47710
- let hoverStyle;
47711
- const layout = table.internalProps.layoutMap;
47712
- if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
47713
- hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
47714
- }
47715
- else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
47716
- hoverStyle = table.theme.headerStyle?.hover;
47717
- }
47718
- else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
47719
- hoverStyle = table.theme.rowHeaderStyle?.hover;
47720
- }
47721
- else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
47722
- hoverStyle =
47723
- table.theme.bottomFrozenStyle?.hover ||
47724
- (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
47725
- }
47726
- else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
47727
- hoverStyle =
47728
- table.theme.rightFrozenStyle?.hover ||
47729
- (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
47730
- }
47731
- else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
47732
- hoverStyle = table.theme.bodyStyle?.hover;
47733
- }
47734
- const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
47735
- return fillColor;
47736
- }
47737
- function isCellHover(state, col, row, cellGroup) {
47738
- const { highlightScope, disableHeader, cellPos } = state.hover;
47739
- const table = state.table;
47740
- const isHeader = table.isHeader(col, row);
47741
- if (isHeader && disableHeader) {
47742
- return undefined;
47743
- }
47744
- let hoverMode;
47745
- if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
47746
- hoverMode = 'cellBgColor';
47747
- }
47748
- else if (highlightScope === HighlightScope.column && cellPos.col === col) {
47749
- if (cellPos.col === col && cellPos.row === row) {
47750
- hoverMode = 'cellBgColor';
47751
- }
47752
- else {
47753
- hoverMode = 'inlineColumnBgColor';
47754
- }
47755
- }
47756
- else if (highlightScope === HighlightScope.row && cellPos.row === row) {
47757
- if (cellPos.col === col && cellPos.row === row) {
47758
- hoverMode = 'cellBgColor';
47759
- }
47760
- else {
47761
- hoverMode = 'inlineRowBgColor';
47762
- }
47763
- }
47764
- else if (highlightScope === HighlightScope.cross) {
47765
- if (cellPos.col === col && cellPos.row === row) {
47766
- hoverMode = 'cellBgColor';
47767
- }
47768
- else if (cellPos.col === col) {
47769
- hoverMode = 'inlineColumnBgColor';
47770
- }
47771
- else if (cellPos.row === row) {
47772
- hoverMode = 'inlineRowBgColor';
47773
- }
47774
- }
47775
- if (hoverMode) {
47776
- let cellDisable;
47777
- if (isHeader) {
47778
- const define = table.getHeaderDefine(col, row);
47779
- cellDisable = define?.disableHeaderHover;
47780
- if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
47781
- cellDisable = true;
47782
- }
47783
- }
47784
- else {
47785
- const define = table.getBodyColumnDefine(col, row);
47786
- cellDisable = define?.disableHover;
47787
- }
47788
- if (cellDisable) {
47789
- hoverMode = undefined;
47790
- }
47791
- }
47792
- return hoverMode;
47793
- }
47794
-
47795
47892
  function getCellSelectColor(cellGroup, table) {
47796
47893
  let colorKey;
47797
47894
  if (cellGroup.role === 'cell' &&
@@ -48486,26 +48583,59 @@
48486
48583
  AdjustColorGroupAfterRenderContribution = __decorate([
48487
48584
  injectable()
48488
48585
  ], AdjustColorGroupAfterRenderContribution);
48586
+ let AdjustInfoGroupBeforeRenderContribution = class AdjustInfoGroupBeforeRenderContribution {
48587
+ time = BaseRenderContributionTime.beforeFillStroke;
48588
+ useStyle = true;
48589
+ order = 0;
48590
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
48591
+ if (group.__customInfoBefore) {
48592
+ const table = group.stage.table;
48593
+ if (table && table.stateManager.interactionState !== InteractionState.scrolling) {
48594
+ group.__customInfoBefore({
48595
+ group,
48596
+ context,
48597
+ x,
48598
+ y,
48599
+ doFill,
48600
+ doStroke,
48601
+ fVisible,
48602
+ sVisible,
48603
+ groupAttribute,
48604
+ drawContext,
48605
+ fillCb,
48606
+ strokeCb,
48607
+ doFillOrStroke
48608
+ });
48609
+ }
48610
+ }
48611
+ }
48612
+ };
48613
+ AdjustInfoGroupBeforeRenderContribution = __decorate([
48614
+ injectable()
48615
+ ], AdjustInfoGroupBeforeRenderContribution);
48489
48616
  let AdjustInfoGroupAfterRenderContribution = class AdjustInfoGroupAfterRenderContribution {
48490
48617
  time = BaseRenderContributionTime.afterFillStroke;
48491
48618
  useStyle = true;
48492
48619
  order = 0;
48493
48620
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
48494
48621
  if (group.__customInfo) {
48495
- group.__customInfo({
48496
- group,
48497
- context,
48498
- x,
48499
- y,
48500
- doFill,
48501
- doStroke,
48502
- fVisible,
48503
- sVisible,
48504
- groupAttribute,
48505
- drawContext,
48506
- fillCb,
48507
- strokeCb,
48508
- });
48622
+ const table = group.stage.table;
48623
+ if (table && table.stateManager.interactionState !== InteractionState.scrolling) {
48624
+ group.__customInfo({
48625
+ group,
48626
+ context,
48627
+ x,
48628
+ y,
48629
+ doFill,
48630
+ doStroke,
48631
+ fVisible,
48632
+ sVisible,
48633
+ groupAttribute,
48634
+ drawContext,
48635
+ fillCb,
48636
+ strokeCb
48637
+ });
48638
+ }
48509
48639
  }
48510
48640
  }
48511
48641
  };
@@ -49076,6 +49206,8 @@
49076
49206
  bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution);
49077
49207
  bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope();
49078
49208
  bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution);
49209
+ bind(AdjustInfoGroupBeforeRenderContribution).toSelf().inSingletonScope();
49210
+ bind(GroupRenderContribution).toService(AdjustInfoGroupBeforeRenderContribution);
49079
49211
  bind(AdjustInfoGroupAfterRenderContribution).toSelf().inSingletonScope();
49080
49212
  bind(GroupRenderContribution).toService(AdjustInfoGroupAfterRenderContribution);
49081
49213
  bind(SplitGroupAfterRenderContribution).toSelf().inSingletonScope();
@@ -49765,9 +49897,9 @@
49765
49897
  }
49766
49898
  const type = isVtableMerge || isCustomMerge
49767
49899
  ? 'text'
49768
- : ((table.isHeader(col, row)
49769
- ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
49770
- : table.getBodyColumnType(col, row)) ?? 'text');
49900
+ : (table.isHeader(col, row)
49901
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
49902
+ : table.getBodyColumnType(col, row)) ?? 'text';
49771
49903
  if (isPromise(value)) {
49772
49904
  createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
49773
49905
  dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
@@ -51755,8 +51887,8 @@
51755
51887
  selectComp.rect.setAttributes({
51756
51888
  x: firstCellBound.x1 - scene.tableGroup.attribute.x,
51757
51889
  y: firstCellBound.y1 - scene.tableGroup.attribute.y,
51758
- width: colsWidth,
51759
- height: rowsHeight,
51890
+ width: colsWidth - 1,
51891
+ height: rowsHeight - 1,
51760
51892
  visible: true
51761
51893
  });
51762
51894
  if (selectComp.fillhandle) {
@@ -52423,6 +52555,7 @@
52423
52555
  const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);
52424
52556
  rowUpdatePos = isValid$3(rowUpdatePos) ? (isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
52425
52557
  }
52558
+ const batchMergePos = new Set();
52426
52559
  for (let col = 0; col < table.colCount; col++) {
52427
52560
  updateRows.forEach(row => {
52428
52561
  if (row < table.frozenRowCount) {
@@ -52430,7 +52563,11 @@
52430
52563
  if (mergeInfo) {
52431
52564
  for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
52432
52565
  for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
52433
- updateCell$1(col, row, scene.table, false);
52566
+ const key = `${col}-${row}`;
52567
+ if (!batchMergePos.has(key)) {
52568
+ updateCell$1(col, row, scene.table, false);
52569
+ batchMergePos.add(key);
52570
+ }
52434
52571
  }
52435
52572
  }
52436
52573
  }
@@ -52448,7 +52585,11 @@
52448
52585
  if (mergeInfo) {
52449
52586
  for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
52450
52587
  for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
52451
- updateCell$1(col, row, scene.table, false);
52588
+ const key = `${col}-${row}`;
52589
+ if (!batchMergePos.has(key)) {
52590
+ updateCell$1(col, row, scene.table, false);
52591
+ batchMergePos.add(key);
52592
+ }
52452
52593
  }
52453
52594
  }
52454
52595
  }
@@ -53045,6 +53186,8 @@
53045
53186
  else if (scene.table.options.frozenColCount) {
53046
53187
  scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
53047
53188
  }
53189
+ scene.component.setBottonFrozenColumnShadow();
53190
+ scene.component.setTopFrozenColumnShadow();
53048
53191
  scene.hasFrozen = true;
53049
53192
  scene.frozenColCount = scene.table.frozenColCount;
53050
53193
  scene.frozenRowCount =
@@ -53095,6 +53238,8 @@
53095
53238
  else if (scene.table.options.rightFrozenColCount) {
53096
53239
  scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
53097
53240
  }
53241
+ scene.component.setBottonFrozenColumnShadow();
53242
+ scene.component.setTopFrozenColumnShadow();
53098
53243
  scene.hasFrozen = true;
53099
53244
  }
53100
53245
  function moveColumnFromBodyToRowHeader(scene) {
@@ -54198,13 +54343,18 @@
54198
54343
  colWidthsMap.addAndReorder(col);
54199
54344
  });
54200
54345
  resetColNumberAndX(scene);
54346
+ const batchMergePos = new Set();
54201
54347
  updateCols.forEach(col => {
54202
54348
  for (let row = 0; row < table.rowCount; row++) {
54203
54349
  const mergeInfo = getCellMergeInfo(scene.table, col, row);
54204
54350
  if (mergeInfo) {
54205
54351
  for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
54206
54352
  for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
54207
- updateCell$1(col, row, scene.table, false);
54353
+ const key = `${col}-${row}`;
54354
+ if (!batchMergePos.has(key)) {
54355
+ updateCell$1(col, row, scene.table, false);
54356
+ batchMergePos.add(key);
54357
+ }
54208
54358
  }
54209
54359
  }
54210
54360
  }
@@ -55504,6 +55654,8 @@
55504
55654
  if (!this.isPivot && !this.table.transpose) {
55505
55655
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
55506
55656
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
55657
+ this.component.setBottonFrozenColumnShadow();
55658
+ this.component.setTopFrozenColumnShadow();
55507
55659
  }
55508
55660
  else if (this.table.options.frozenColCount) {
55509
55661
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
@@ -56018,6 +56170,8 @@
56018
56170
  if (!this.isPivot && !this.table.transpose) {
56019
56171
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
56020
56172
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
56173
+ this.component.setBottonFrozenColumnShadow();
56174
+ this.component.setTopFrozenColumnShadow();
56021
56175
  }
56022
56176
  else if (this.table.options.frozenColCount) {
56023
56177
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
@@ -56036,6 +56190,8 @@
56036
56190
  if (!this.isPivot && !this.table.transpose) {
56037
56191
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
56038
56192
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
56193
+ this.component.setBottonFrozenColumnShadow();
56194
+ this.component.setTopFrozenColumnShadow();
56039
56195
  }
56040
56196
  else if (this.table.options.frozenColCount) {
56041
56197
  this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
@@ -56234,6 +56390,8 @@
56234
56390
  if (prevHoverCellCol === col && prevHoverCellRow === row) {
56235
56391
  return;
56236
56392
  }
56393
+ cellPos.col = col;
56394
+ cellPos.row = row;
56237
56395
  if (!state.table.options.customConfig?.disableBuildInChartActive) {
56238
56396
  scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow);
56239
56397
  scenegraph.activateChart(col, row);
@@ -56274,8 +56432,6 @@
56274
56432
  if (highlightScope !== HighlightScope.none && !disableHeader) {
56275
56433
  scenegraph.showHoverIcon(col, row);
56276
56434
  }
56277
- cellPos.col = col;
56278
- cellPos.row = row;
56279
56435
  if (updateScenegraph) {
56280
56436
  state.table.scenegraph.updateNextFrame();
56281
56437
  }
@@ -57023,6 +57179,12 @@
57023
57179
  state.columnMove.moving = true;
57024
57180
  state.columnMove.colSource = col;
57025
57181
  state.columnMove.rowSource = row;
57182
+ if (state.table.isListTable()) {
57183
+ const nodeIndex = state.table.getRecordIndexByCell(col, row);
57184
+ const nodeData = state.table.getRecordByCell(col, row);
57185
+ const hierarchyState = state.table.getRecordHierarchyState(col, row);
57186
+ state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
57187
+ }
57026
57188
  state.columnMove.x = x - state.table.tableX;
57027
57189
  state.columnMove.y = y - state.table.tableY;
57028
57190
  const cellLocation = state.table.getCellLocation(col, row);
@@ -57065,6 +57227,12 @@
57065
57227
  state.columnMove.y = y - state.table.tableY;
57066
57228
  state.columnMove.colTarget = targetCell.col;
57067
57229
  state.columnMove.rowTarget = targetCell.row;
57230
+ if (state.table.isListTable()) {
57231
+ const nodeIndex = state.table.getRecordIndexByCell(targetCell.col, targetCell.row);
57232
+ const nodeData = state.table.getRecordByCell(targetCell.col, targetCell.row);
57233
+ const hierarchyState = state.table.getRecordHierarchyState(targetCell.col, targetCell.row);
57234
+ state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
57235
+ }
57068
57236
  state.updateCursor('grabbing');
57069
57237
  let lineX;
57070
57238
  let backX;
@@ -57238,6 +57406,8 @@
57238
57406
  else if (state.table.options.rightFrozenColCount) {
57239
57407
  state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
57240
57408
  }
57409
+ state.table.scenegraph.component.setBottonFrozenColumnShadow();
57410
+ state.table.scenegraph.component.setTopFrozenColumnShadow();
57241
57411
  state.table.scenegraph.updateNextFrame();
57242
57412
  if (state.table.options.customConfig?.notUpdateInColumnRowMove === true) {
57243
57413
  return true;
@@ -57377,6 +57547,8 @@
57377
57547
  else if (state.table.options.rightFrozenColCount) {
57378
57548
  state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
57379
57549
  }
57550
+ state.table.scenegraph.component.setBottonFrozenColumnShadow();
57551
+ state.table.scenegraph.component.setTopFrozenColumnShadow();
57380
57552
  state.table.scenegraph.updateNextFrame();
57381
57553
  }
57382
57554
  function updateResizeColForColumn(detaX, state) {
@@ -58188,6 +58360,8 @@
58188
58360
  colTarget: -1,
58189
58361
  rowSource: -1,
58190
58362
  rowTarget: -1,
58363
+ rowSourceSize: 0,
58364
+ rowTargetSize: 0,
58191
58365
  x: 0,
58192
58366
  y: 0,
58193
58367
  moving: false
@@ -58268,6 +58442,8 @@
58268
58442
  colTarget: -1,
58269
58443
  rowSource: -1,
58270
58444
  rowTarget: -1,
58445
+ rowSourceSize: 0,
58446
+ rowTargetSize: 0,
58271
58447
  x: 0,
58272
58448
  y: 0,
58273
58449
  moving: false
@@ -59697,11 +59873,14 @@
59697
59873
  table.stateManager.columnMove?.colTarget !== -1 &&
59698
59874
  table.stateManager.columnMove?.rowTarget !== -1) {
59699
59875
  if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
59876
+ const { colSource, rowSource, colTarget, rowTarget } = table.stateManager.columnMove;
59877
+ const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
59878
+ const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
59700
59879
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
59701
- target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
59880
+ target: { col: colTarget, row: rowTarget + rowTargetSize - rowSourceSize },
59702
59881
  source: {
59703
- col: table.stateManager.columnMove.colSource,
59704
- row: table.stateManager.columnMove.rowSource
59882
+ col: colSource,
59883
+ row: rowSource
59705
59884
  },
59706
59885
  event: e
59707
59886
  });
@@ -59709,8 +59888,13 @@
59709
59888
  }
59710
59889
  else if (!endMoveColSuccess) {
59711
59890
  if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL)) {
59891
+ const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
59892
+ const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
59712
59893
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL, {
59713
- target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
59894
+ target: {
59895
+ col: table.stateManager.columnMove.colTarget,
59896
+ row: table.stateManager.columnMove.rowTarget + rowTargetSize - rowSourceSize
59897
+ },
59714
59898
  source: {
59715
59899
  col: table.stateManager.columnMove.colSource,
59716
59900
  row: table.stateManager.columnMove.rowSource
@@ -67047,7 +67231,7 @@
67047
67231
  return TABLE_EVENT_TYPE;
67048
67232
  }
67049
67233
  options;
67050
- version = "1.0.7";
67234
+ version = "1.0.9";
67051
67235
  pagination;
67052
67236
  id = `VTable${Date.now()}`;
67053
67237
  headerStyleCache;
@@ -74825,6 +75009,16 @@
74825
75009
  const index = this.getRecordShowIndexByCell(col, row);
74826
75010
  return this.dataSource.getHierarchyState(index);
74827
75011
  }
75012
+ getRecordHierarchyState(col, row) {
75013
+ let recordIndex;
75014
+ if (this.transpose) {
75015
+ this.getRecordShowIndexByCell(col, 0);
75016
+ }
75017
+ else {
75018
+ recordIndex = this.getRecordShowIndexByCell(0, row);
75019
+ }
75020
+ return this.dataSource.getHierarchyState(recordIndex);
75021
+ }
74828
75022
  toggleHierarchyState(col, row, recalculateColWidths = true) {
74829
75023
  this.stateManager.updateHoverIcon(col, row, undefined, undefined);
74830
75024
  const hierarchyState = this.getHierarchyState(col, row);
@@ -87029,7 +87223,7 @@
87029
87223
  const newCellAggregator = new SumAggregator({
87030
87224
  key: indicator,
87031
87225
  field: indicator,
87032
- isRecord: true,
87226
+ isRecord: true
87033
87227
  });
87034
87228
  newCellAggregator.changedValue = newValue;
87035
87229
  this.recalculateTotals(rowKey, colKey, indicator, newCellAggregator);
@@ -87102,6 +87296,25 @@
87102
87296
  if (this.totals?.row?.showGrandTotals) {
87103
87297
  if (this.tree[this.rowGrandTotalLabel]?.[flatColKey]?.[indicatorIndex]) {
87104
87298
  addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey);
87299
+ if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87300
+ for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
87301
+ const colDimension = this.totals.column.subTotalsDimensions[j];
87302
+ const colDimensionIndex = this.columns.indexOf(colDimension);
87303
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
87304
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87305
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
87306
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87307
+ if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87308
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
87309
+ }
87310
+ }
87311
+ }
87312
+ }
87313
+ if (this.totals?.column?.showGrandTotals) {
87314
+ if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87315
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
87316
+ }
87317
+ }
87105
87318
  }
87106
87319
  if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87107
87320
  for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
@@ -87111,43 +87324,24 @@
87111
87324
  const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87112
87325
  colSubTotalKeyParts.push(this.colSubTotalLabel);
87113
87326
  const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87114
- if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87115
- addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
87327
+ if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87328
+ addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
87116
87329
  }
87117
87330
  }
87118
87331
  }
87119
87332
  }
87120
87333
  if (this.totals?.column?.showGrandTotals) {
87121
- if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87122
- addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
87334
+ if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87335
+ addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
87123
87336
  }
87124
87337
  }
87125
- }
87126
- if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87127
- for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
87128
- const colDimension = this.totals.column.subTotalsDimensions[j];
87129
- const colDimensionIndex = this.columns.indexOf(colDimension);
87130
- if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
87131
- const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87132
- colSubTotalKeyParts.push(this.colSubTotalLabel);
87133
- const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87134
- if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87135
- addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
87136
- }
87338
+ aggregatorsToReset.forEach(agg => {
87339
+ if (newCellAggregator && subTotalAggregators.has(agg)) {
87340
+ agg.push(newCellAggregator);
87137
87341
  }
87138
- }
87139
- }
87140
- if (this.totals?.column?.showGrandTotals) {
87141
- if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87142
- addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
87143
- }
87342
+ agg.recalculate();
87343
+ });
87144
87344
  }
87145
- aggregatorsToReset.forEach(agg => {
87146
- if (newCellAggregator && subTotalAggregators.has(agg)) {
87147
- agg.push(newCellAggregator);
87148
- }
87149
- agg.recalculate();
87150
- });
87151
87345
  }
87152
87346
  changeRecordFieldValue(fieldName, oldValue, value) {
87153
87347
  let isIndicatorName = false;
@@ -90720,7 +90914,7 @@
90720
90914
  }
90721
90915
 
90722
90916
  registerForVrender();
90723
- const version = "1.0.7";
90917
+ const version = "1.0.9";
90724
90918
  function getIcons() {
90725
90919
  return get$2();
90726
90920
  }