@visactor/vtable 1.22.11-alpha.8 → 1.22.11

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 (133) hide show
  1. package/cjs/PivotChart.d.ts +0 -3
  2. package/cjs/PivotChart.js +5 -12
  3. package/cjs/PivotChart.js.map +1 -1
  4. package/cjs/PivotTable-all.js.map +1 -1
  5. package/cjs/core/BaseTable.d.ts +3 -0
  6. package/cjs/core/BaseTable.js +22 -6
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/dataset/dataset.js +92 -84
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/edit/edit-manager.js +10 -9
  11. package/cjs/edit/edit-manager.js.map +1 -1
  12. package/cjs/event/listener/container-dom.js +1 -1
  13. package/cjs/event/listener/container-dom.js.map +1 -1
  14. package/cjs/event/listener/scroll-bar.js +2 -8
  15. package/cjs/event/listener/scroll-bar.js.map +1 -1
  16. package/cjs/event/listener/table-group.js +8 -14
  17. package/cjs/event/listener/table-group.js.map +1 -1
  18. package/cjs/event/media-click.js +1 -1
  19. package/cjs/event/scroll.js +1 -1
  20. package/cjs/event/sparkline-event.js +1 -1
  21. package/cjs/event/util.js +1 -1
  22. package/cjs/index.d.ts +1 -1
  23. package/cjs/index.js +1 -1
  24. package/cjs/index.js.map +1 -1
  25. package/cjs/layout/index.js +1 -2
  26. package/cjs/layout/pivot-header-layout.d.ts +0 -6
  27. package/cjs/layout/pivot-header-layout.js +21 -40
  28. package/cjs/layout/pivot-header-layout.js.map +1 -1
  29. package/cjs/plugins/custom-cell-style.d.ts +5 -0
  30. package/cjs/plugins/custom-cell-style.js +66 -18
  31. package/cjs/plugins/custom-cell-style.js.map +1 -1
  32. package/cjs/plugins/interface.js +1 -1
  33. package/cjs/plugins/invert-highlight.js +2 -1
  34. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  35. package/cjs/plugins/plugin-manager.js +1 -1
  36. package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
  37. package/cjs/scenegraph/graphic/active-cell-chart-list.js +75 -198
  38. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  39. package/cjs/scenegraph/graphic/chart.d.ts +1 -10
  40. package/cjs/scenegraph/graphic/chart.js +27 -61
  41. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  42. package/cjs/scenegraph/graphic/contributions/chart-render.js +4 -3
  43. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  45. package/cjs/scenegraph/layout/update-row.js +16 -1
  46. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  47. package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -1
  48. package/cjs/scenegraph/refresh-node/update-chart.js +1 -2
  49. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  50. package/cjs/scenegraph/scenegraph.d.ts +2 -2
  51. package/cjs/scenegraph/scenegraph.js +11 -44
  52. package/cjs/scenegraph/scenegraph.js.map +1 -1
  53. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  54. package/cjs/state/select/update-position.js +3 -3
  55. package/cjs/state/select/update-position.js.map +1 -1
  56. package/cjs/tools/util.d.ts +0 -5
  57. package/cjs/tools/util.js +4 -22
  58. package/cjs/tools/util.js.map +1 -1
  59. package/cjs/ts-types/base-table.d.ts +3 -0
  60. package/cjs/ts-types/base-table.js.map +1 -1
  61. package/cjs/ts-types/new-data-set.d.ts +1 -0
  62. package/cjs/ts-types/new-data-set.js.map +1 -1
  63. package/cjs/ts-types/table-engine.d.ts +0 -7
  64. package/cjs/ts-types/table-engine.js.map +1 -1
  65. package/cjs/vrender.js.map +1 -1
  66. package/dist/vtable.js +380 -596
  67. package/dist/vtable.min.js +2 -2
  68. package/es/PivotChart.d.ts +0 -3
  69. package/es/PivotChart.js +4 -13
  70. package/es/PivotChart.js.map +1 -1
  71. package/es/PivotTable-all.js.map +1 -1
  72. package/es/core/BaseTable.d.ts +3 -0
  73. package/es/core/BaseTable.js +22 -6
  74. package/es/core/BaseTable.js.map +1 -1
  75. package/es/dataset/dataset.js +92 -84
  76. package/es/dataset/dataset.js.map +1 -1
  77. package/es/edit/edit-manager.js +10 -9
  78. package/es/edit/edit-manager.js.map +1 -1
  79. package/es/event/listener/container-dom.js +1 -1
  80. package/es/event/listener/container-dom.js.map +1 -1
  81. package/es/event/listener/scroll-bar.js +2 -8
  82. package/es/event/listener/scroll-bar.js.map +1 -1
  83. package/es/event/listener/table-group.js +8 -13
  84. package/es/event/listener/table-group.js.map +1 -1
  85. package/es/event/media-click.js +1 -1
  86. package/es/event/scroll.js +1 -1
  87. package/es/event/sparkline-event.js +1 -1
  88. package/es/event/util.js +1 -1
  89. package/es/index.d.ts +1 -1
  90. package/es/index.js +1 -1
  91. package/es/index.js.map +1 -1
  92. package/es/layout/index.js +1 -2
  93. package/es/layout/pivot-header-layout.d.ts +0 -6
  94. package/es/layout/pivot-header-layout.js +21 -40
  95. package/es/layout/pivot-header-layout.js.map +1 -1
  96. package/es/plugins/custom-cell-style.d.ts +5 -0
  97. package/es/plugins/custom-cell-style.js +64 -18
  98. package/es/plugins/custom-cell-style.js.map +1 -1
  99. package/es/plugins/interface.js +1 -1
  100. package/es/plugins/invert-highlight.js +2 -1
  101. package/es/plugins/list-tree-stick-cell.js +1 -1
  102. package/es/plugins/plugin-manager.js +1 -1
  103. package/es/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
  104. package/es/scenegraph/graphic/active-cell-chart-list.js +68 -186
  105. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  106. package/es/scenegraph/graphic/chart.d.ts +1 -10
  107. package/es/scenegraph/graphic/chart.js +25 -58
  108. package/es/scenegraph/graphic/chart.js.map +1 -1
  109. package/es/scenegraph/graphic/contributions/chart-render.js +4 -3
  110. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  111. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  112. package/es/scenegraph/layout/update-row.js +16 -1
  113. package/es/scenegraph/layout/update-row.js.map +1 -1
  114. package/es/scenegraph/refresh-node/update-chart.d.ts +1 -1
  115. package/es/scenegraph/refresh-node/update-chart.js +1 -2
  116. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  117. package/es/scenegraph/scenegraph.d.ts +2 -2
  118. package/es/scenegraph/scenegraph.js +10 -43
  119. package/es/scenegraph/scenegraph.js.map +1 -1
  120. package/es/scenegraph/select/update-select-border.js.map +1 -1
  121. package/es/state/select/update-position.js +4 -2
  122. package/es/state/select/update-position.js.map +1 -1
  123. package/es/tools/util.d.ts +0 -5
  124. package/es/tools/util.js +0 -18
  125. package/es/tools/util.js.map +1 -1
  126. package/es/ts-types/base-table.d.ts +3 -0
  127. package/es/ts-types/base-table.js.map +1 -1
  128. package/es/ts-types/new-data-set.d.ts +1 -0
  129. package/es/ts-types/new-data-set.js.map +1 -1
  130. package/es/ts-types/table-engine.d.ts +0 -7
  131. package/es/ts-types/table-engine.js.map +1 -1
  132. package/es/vrender.js.map +1 -1
  133. package/package.json +5 -5
package/dist/vtable.js CHANGED
@@ -36018,47 +36018,6 @@
36018
36018
  }
36019
36019
  };
36020
36020
  }
36021
- function cancellableThrottle(func, delay) {
36022
- let timer = null;
36023
- let lastArgs = null;
36024
- let context = null;
36025
- const throttled = function (...args) {
36026
- lastArgs = args;
36027
- context = this;
36028
- if (!timer) {
36029
- timer = setTimeout(() => {
36030
- if (lastArgs) {
36031
- func.apply(context, lastArgs);
36032
- }
36033
- timer = null;
36034
- lastArgs = null;
36035
- context = null;
36036
- }, delay);
36037
- }
36038
- };
36039
- const cancel = () => {
36040
- if (timer) {
36041
- clearTimeout(timer);
36042
- timer = null;
36043
- lastArgs = null;
36044
- context = null;
36045
- }
36046
- };
36047
- const flush = () => {
36048
- if (timer && lastArgs) {
36049
- clearTimeout(timer);
36050
- func.apply(context, lastArgs);
36051
- timer = null;
36052
- lastArgs = null;
36053
- context = null;
36054
- }
36055
- };
36056
- return {
36057
- throttled,
36058
- cancel,
36059
- flush
36060
- };
36061
- }
36062
36021
  function pad(num, totalChars) {
36063
36022
  const pad = '0';
36064
36023
  num = `${num}`;
@@ -49015,27 +48974,9 @@
49015
48974
  return hoverMode;
49016
48975
  }
49017
48976
 
49018
- let brushingChartInstance;
49019
- let brushingChartInstanceCellPos = { col: -1, row: -1 };
49020
- function setBrushingChartInstance(chartInstance, col, row) {
49021
- brushingChartInstance = chartInstance;
49022
- brushingChartInstanceCellPos = { col, row };
49023
- }
49024
- function clearBrushingChartInstance() {
49025
- brushingChartInstance = undefined;
49026
- brushingChartInstanceCellPos = { col: -1, row: -1 };
49027
- }
49028
- function getBrushingChartInstance() {
49029
- return brushingChartInstance;
49030
- }
49031
- function getBrushingChartInstanceCellPos() {
49032
- return brushingChartInstanceCellPos;
49033
- }
49034
48977
  const chartInstanceListColumnByColumnDirection = {};
49035
48978
  const chartInstanceListRowByRowDirection = {};
49036
- const delayRunDimensionHoverTimer = [];
49037
48979
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
49038
- clearDelayRunDimensionHoverTimers();
49039
48980
  if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
49040
48981
  chartInstanceListColumnByColumnDirection[col] = {};
49041
48982
  }
@@ -49045,9 +48986,9 @@
49045
48986
  for (let i = rowStart; i <= rowEnd; i++) {
49046
48987
  const cellGroup = table.scenegraph.getCell(col, i);
49047
48988
  const chartNode = cellGroup?.getChildren()?.[0];
48989
+ chartNode.addUpdateShapeAndBoundsTag();
49048
48990
  if (chartInstanceListColumnByColumnDirection[col][i]) ;
49049
48991
  else if (isValid$1(chartNode)) {
49050
- chartNode.addUpdateShapeAndBoundsTag();
49051
48992
  if (chartNode.activeChartInstance) {
49052
48993
  chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
49053
48994
  }
@@ -49056,13 +48997,44 @@
49056
48997
  chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
49057
48998
  }
49058
48999
  }
49059
- const timer = setTimeout(() => {
49000
+ setTimeout(() => {
49060
49001
  if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
49061
49002
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
49062
49003
  let isShowTooltip = !isScatter;
49063
49004
  if (!isScatter && typeof chartDimensionLinkage === 'object') {
49064
49005
  isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49065
- isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table);
49006
+ if (i === rowEnd && isShowTooltip) {
49007
+ const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49008
+ const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
49009
+ if (rowEnd1 === rowEnd) {
49010
+ isShowTooltip = true;
49011
+ }
49012
+ else {
49013
+ const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
49014
+ if (rowEnd2 !== rowEnd) {
49015
+ isShowTooltip = true;
49016
+ }
49017
+ else {
49018
+ isShowTooltip = false;
49019
+ }
49020
+ }
49021
+ }
49022
+ else if (i === rowStart && isShowTooltip) {
49023
+ const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49024
+ const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
49025
+ if (rowStart1 === rowStart) {
49026
+ isShowTooltip = true;
49027
+ }
49028
+ else {
49029
+ const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
49030
+ if (rowStart2 !== rowStart) {
49031
+ isShowTooltip = true;
49032
+ }
49033
+ else {
49034
+ isShowTooltip = false;
49035
+ }
49036
+ }
49037
+ }
49066
49038
  }
49067
49039
  if (isScatter) {
49068
49040
  if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
@@ -49075,7 +49047,6 @@
49075
49047
  }
49076
49048
  }
49077
49049
  else {
49078
- const cellBoundry = table.getCellRelativeRect(col, i);
49079
49050
  const bodyBoundryTop = table.frozenRowCount
49080
49051
  ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom
49081
49052
  : 0;
@@ -49086,32 +49057,43 @@
49086
49057
  }
49087
49058
  chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49088
49059
  tooltip: false,
49089
- showTooltipOption: {
49090
- x: canvasXY.x - cellBoundry.left,
49091
- y: absolutePositionTop - cellBoundry.top,
49092
- activeType: 'dimension'
49093
- }
49060
+ showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
49094
49061
  });
49095
49062
  }
49096
49063
  else {
49097
49064
  chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49098
49065
  tooltip: isShowTooltip,
49099
- showTooltipOption: {
49100
- x: canvasXY.x - cellBoundry.left,
49101
- y: absolutePositionTop - cellBoundry.top,
49102
- activeType: 'dimension'
49103
- }
49066
+ showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
49104
49067
  });
49105
49068
  }
49106
49069
  }
49107
49070
  }
49108
49071
  }, 0);
49109
- delayRunDimensionHoverTimer.push(timer);
49110
49072
  table.scenegraph.updateNextFrame();
49111
49073
  }
49112
49074
  }
49075
+ function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
49076
+ if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
49077
+ for (const i in chartInstanceListColumnByColumnDirection[col]) {
49078
+ if (isValid$1(excludedRow) && Number(i) === excludedRow) {
49079
+ continue;
49080
+ }
49081
+ const cellGroup = table.scenegraph.getCell(col, Number(i));
49082
+ const chartNode = cellGroup?.getChildren()?.[0];
49083
+ chartNode.addUpdateShapeAndBoundsTag();
49084
+ if (isValid$1(chartNode)) {
49085
+ chartNode.deactivate(table, {
49086
+ releaseChartInstance: true,
49087
+ releaseColumnChartInstance: false,
49088
+ releaseRowChartInstance: false
49089
+ });
49090
+ chartInstanceListColumnByColumnDirection[col][i] = null;
49091
+ }
49092
+ }
49093
+ delete chartInstanceListColumnByColumnDirection[col];
49094
+ }
49095
+ }
49113
49096
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
49114
- clearDelayRunDimensionHoverTimers();
49115
49097
  if (!isValid$1(chartInstanceListRowByRowDirection[row])) {
49116
49098
  chartInstanceListRowByRowDirection[row] = {};
49117
49099
  }
@@ -49121,9 +49103,9 @@
49121
49103
  for (let i = colStart; i <= colEnd; i++) {
49122
49104
  const cellGroup = table.scenegraph.getCell(i, row);
49123
49105
  const chartNode = cellGroup?.getChildren()?.[0];
49106
+ chartNode.addUpdateShapeAndBoundsTag();
49124
49107
  if (chartInstanceListRowByRowDirection[row][i]) ;
49125
49108
  else if (isValid$1(chartNode)) {
49126
- chartNode.addUpdateShapeAndBoundsTag();
49127
49109
  if (chartNode.activeChartInstance) {
49128
49110
  chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
49129
49111
  }
@@ -49132,13 +49114,44 @@
49132
49114
  chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
49133
49115
  }
49134
49116
  }
49135
- const timer = setTimeout(() => {
49117
+ setTimeout(() => {
49136
49118
  if (chartInstanceListRowByRowDirection[row]?.[i]) {
49137
49119
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
49138
49120
  let isShowTooltip = !isScatter;
49139
49121
  if (!isScatter && typeof chartDimensionLinkage === 'object') {
49140
49122
  isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49141
- isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table);
49123
+ if (i === colEnd && isShowTooltip) {
49124
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49125
+ const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
49126
+ if (colEnd1 === colEnd) {
49127
+ isShowTooltip = true;
49128
+ }
49129
+ else {
49130
+ const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
49131
+ if (colEnd2 !== colEnd) {
49132
+ isShowTooltip = true;
49133
+ }
49134
+ else {
49135
+ isShowTooltip = false;
49136
+ }
49137
+ }
49138
+ }
49139
+ else if (i === colStart && isShowTooltip) {
49140
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49141
+ const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
49142
+ if (colStart1 === colStart) {
49143
+ isShowTooltip = true;
49144
+ }
49145
+ else {
49146
+ const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
49147
+ if (colStart2 !== colStart) {
49148
+ isShowTooltip = true;
49149
+ }
49150
+ else {
49151
+ isShowTooltip = false;
49152
+ }
49153
+ }
49154
+ }
49142
49155
  }
49143
49156
  if (isScatter) {
49144
49157
  if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
@@ -49151,7 +49164,6 @@
49151
49164
  }
49152
49165
  }
49153
49166
  else {
49154
- const cellBoundry = table.getCellRelativeRect(i, row);
49155
49167
  const bodyBoundryLeft = table.frozenColCount
49156
49168
  ? table.getCellRelativeRect(table.frozenColCount - 1, row).right
49157
49169
  : 0;
@@ -49162,188 +49174,22 @@
49162
49174
  }
49163
49175
  chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49164
49176
  tooltip: false,
49165
- showTooltipOption: {
49166
- x: absolutePositionLeft - cellBoundry.left,
49167
- y: canvasXY.y - cellBoundry.top,
49168
- activeType: 'dimension'
49169
- }
49177
+ showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
49170
49178
  });
49171
49179
  }
49172
49180
  else {
49173
49181
  chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49174
49182
  tooltip: isShowTooltip,
49175
- showTooltipOption: {
49176
- x: absolutePositionLeft - cellBoundry.left,
49177
- y: canvasXY.y - cellBoundry.top,
49178
- activeType: 'dimension'
49179
- }
49183
+ showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
49180
49184
  });
49181
49185
  }
49182
49186
  }
49183
49187
  }
49184
49188
  }, 0);
49185
- delayRunDimensionHoverTimer.push(timer);
49186
49189
  table.scenegraph.updateNextFrame();
49187
49190
  }
49188
49191
  }
49189
- function generateChartInstanceListByViewRange(datum, table, deactivate = false) {
49190
- clearDelayRunDimensionHoverTimers();
49191
- const { rowStart } = table.getBodyVisibleRowRange();
49192
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
49193
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
49194
- const { colStart } = table.getBodyVisibleColRange();
49195
- let colEnd = table.getBodyVisibleColRange().colEnd;
49196
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
49197
- for (let col = colStart; col <= colEnd; col++) {
49198
- if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
49199
- chartInstanceListColumnByColumnDirection[col] = {};
49200
- }
49201
- for (let i = rowStart; i <= rowEnd; i++) {
49202
- const cellGroup = table.scenegraph.getCell(col, i);
49203
- const chartNode = cellGroup?.getChildren()?.[0];
49204
- if (chartInstanceListColumnByColumnDirection[col][i]) ;
49205
- else if (isValid$1(chartNode)) {
49206
- chartNode.addUpdateShapeAndBoundsTag();
49207
- if (chartNode.activeChartInstance) {
49208
- chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
49209
- }
49210
- else {
49211
- if (chartNode.attribute.spec.type === 'pie') {
49212
- chartNode.activate(table);
49213
- chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
49214
- }
49215
- }
49216
- }
49217
- const timer = setTimeout(() => {
49218
- if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
49219
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
49220
- let isShowTooltip = true;
49221
- if (typeof chartDimensionLinkage === 'object') {
49222
- if (deactivate) {
49223
- chartInstanceListColumnByColumnDirection[col][i].setHovered();
49224
- chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
49225
- }
49226
- else {
49227
- isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49228
- isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table);
49229
- isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table);
49230
- chartInstanceListColumnByColumnDirection[col][i].setHovered(datum);
49231
- isShowTooltip &&
49232
- chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
49233
- activeType: 'mark'
49234
- });
49235
- }
49236
- }
49237
- }
49238
- }, 0);
49239
- delayRunDimensionHoverTimer.push(timer);
49240
- table.scenegraph.updateNextFrame();
49241
- }
49242
- }
49243
- }
49244
- function checkIsShowTooltipForEdgeRow(row, table) {
49245
- let isShowTooltip = true;
49246
- const { rowStart } = table.getBodyVisibleRowRange();
49247
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
49248
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
49249
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
49250
- if (row === rowEnd && isShowTooltip) {
49251
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49252
- const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
49253
- if (rowEnd1 === rowEnd) {
49254
- isShowTooltip = true;
49255
- }
49256
- else {
49257
- const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
49258
- if (rowEnd2 !== rowEnd) {
49259
- isShowTooltip = true;
49260
- }
49261
- else {
49262
- isShowTooltip = false;
49263
- }
49264
- }
49265
- }
49266
- else if (row === rowStart && isShowTooltip) {
49267
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49268
- const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
49269
- if (rowStart1 === rowStart) {
49270
- isShowTooltip = true;
49271
- }
49272
- else {
49273
- const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
49274
- if (rowStart2 !== rowStart) {
49275
- isShowTooltip = true;
49276
- }
49277
- else {
49278
- isShowTooltip = false;
49279
- }
49280
- }
49281
- }
49282
- return isShowTooltip;
49283
- }
49284
- function checkIsShowTooltipForEdgeColumn(col, table) {
49285
- let isShowTooltip = true;
49286
- const { colStart } = table.getBodyVisibleColRange();
49287
- let colEnd = table.getBodyVisibleColRange().colEnd;
49288
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
49289
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
49290
- if (col === colEnd && isShowTooltip) {
49291
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49292
- const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
49293
- if (colEnd1 === colEnd) {
49294
- isShowTooltip = true;
49295
- }
49296
- else {
49297
- const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
49298
- if (colEnd2 !== colEnd) {
49299
- isShowTooltip = true;
49300
- }
49301
- else {
49302
- isShowTooltip = false;
49303
- }
49304
- }
49305
- }
49306
- else if (col === colStart && isShowTooltip) {
49307
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49308
- const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
49309
- if (colStart1 === colStart) {
49310
- isShowTooltip = true;
49311
- }
49312
- else {
49313
- const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
49314
- if (colStart2 !== colStart) {
49315
- isShowTooltip = true;
49316
- }
49317
- else {
49318
- isShowTooltip = false;
49319
- }
49320
- }
49321
- }
49322
- return isShowTooltip;
49323
- }
49324
- function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = false) {
49325
- if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
49326
- for (const i in chartInstanceListColumnByColumnDirection[col]) {
49327
- if (isValid$1(excludedRow) && Number(i) === excludedRow) {
49328
- continue;
49329
- }
49330
- const cellGroup = table.scenegraph.getCell(col, Number(i));
49331
- const chartNode = cellGroup?.getChildren()?.[0];
49332
- if (isValid$1(chartNode)) {
49333
- chartNode.addUpdateShapeAndBoundsTag();
49334
- chartNode.deactivate(table, {
49335
- forceRelease: forceRelease,
49336
- releaseChartInstance: true,
49337
- releaseColumnChartInstance: false,
49338
- releaseRowChartInstance: false
49339
- });
49340
- chartInstanceListColumnByColumnDirection[col][i] = null;
49341
- }
49342
- }
49343
- delete chartInstanceListColumnByColumnDirection[col];
49344
- }
49345
- }
49346
- function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = false) {
49192
+ function clearChartInstanceListByRowDirection(row, excludedCol, table) {
49347
49193
  if (isValid$1(chartInstanceListRowByRowDirection[row])) {
49348
49194
  for (const i in chartInstanceListRowByRowDirection[row]) {
49349
49195
  if (isValid$1(excludedCol) && Number(i) === excludedCol) {
@@ -49351,10 +49197,9 @@
49351
49197
  }
49352
49198
  const cellGroup = table.scenegraph.getCell(Number(i), row);
49353
49199
  const chartNode = cellGroup?.getChildren()?.[0];
49200
+ chartNode.addUpdateShapeAndBoundsTag();
49354
49201
  if (isValid$1(chartNode)) {
49355
- chartNode.addUpdateShapeAndBoundsTag();
49356
49202
  chartNode.deactivate(table, {
49357
- forceRelease: forceRelease,
49358
49203
  releaseChartInstance: true,
49359
49204
  releaseColumnChartInstance: false,
49360
49205
  releaseRowChartInstance: false
@@ -49365,54 +49210,6 @@
49365
49210
  }
49366
49211
  delete chartInstanceListRowByRowDirection[row];
49367
49212
  }
49368
- function clearDelayRunDimensionHoverTimers() {
49369
- for (const timer of delayRunDimensionHoverTimer) {
49370
- clearTimeout(timer);
49371
- }
49372
- delayRunDimensionHoverTimer.length = 0;
49373
- }
49374
- function clearAllChartInstanceList(table, forceRelease = false) {
49375
- clearDelayRunDimensionHoverTimers();
49376
- for (const col in chartInstanceListColumnByColumnDirection) {
49377
- clearChartInstanceListByColumnDirection(Number(col), undefined, table, forceRelease);
49378
- }
49379
- for (const row in chartInstanceListRowByRowDirection) {
49380
- clearChartInstanceListByRowDirection(Number(row), undefined, table, forceRelease);
49381
- }
49382
- }
49383
- let disabledShowTooltipToAllChartInstances = false;
49384
- function isDisabledShowTooltipToAllChartInstances() {
49385
- return disabledShowTooltipToAllChartInstances;
49386
- }
49387
- function disableTooltipToAllChartInstances() {
49388
- disabledShowTooltipToAllChartInstances = true;
49389
- clearDelayRunDimensionHoverTimers();
49390
- for (const col in chartInstanceListColumnByColumnDirection) {
49391
- for (const row in chartInstanceListColumnByColumnDirection[col]) {
49392
- chartInstanceListColumnByColumnDirection[col][row].disableTooltip(true);
49393
- chartInstanceListColumnByColumnDirection[col][row].hideTooltip();
49394
- }
49395
- }
49396
- for (const row in chartInstanceListRowByRowDirection) {
49397
- for (const col in chartInstanceListRowByRowDirection[row]) {
49398
- chartInstanceListRowByRowDirection[row][col].disableTooltip(true);
49399
- chartInstanceListRowByRowDirection[row][col].hideTooltip();
49400
- }
49401
- }
49402
- }
49403
- function enableTooltipToAllChartInstances() {
49404
- disabledShowTooltipToAllChartInstances = false;
49405
- for (const col in chartInstanceListColumnByColumnDirection) {
49406
- for (const row in chartInstanceListColumnByColumnDirection[col]) {
49407
- chartInstanceListColumnByColumnDirection[col][row].disableTooltip(false);
49408
- }
49409
- }
49410
- for (const row in chartInstanceListRowByRowDirection) {
49411
- for (const col in chartInstanceListRowByRowDirection[row]) {
49412
- chartInstanceListRowByRowDirection[row][col].disableTooltip(false);
49413
- }
49414
- }
49415
- }
49416
49213
 
49417
49214
  function isValidAlignDomain(domain) {
49418
49215
  return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -50372,7 +50169,6 @@
50372
50169
  type = 'chart';
50373
50170
  chartInstance;
50374
50171
  activeChartInstance;
50375
- activeChartInstanceLastViewBox = null;
50376
50172
  activeChartInstanceHoverOnMark = null;
50377
50173
  justShowMarkTooltip = undefined;
50378
50174
  justShowMarkTooltipTimer = Date.now();
@@ -50417,6 +50213,7 @@
50417
50213
  y1: y1 - table.scrollTop,
50418
50214
  y2: y2 - table.scrollTop
50419
50215
  });
50216
+ this.activeChartInstance?.release();
50420
50217
  this.attribute.ClassType.globalConfig.uniqueTooltip = false;
50421
50218
  this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
50422
50219
  renderCanvas: this.attribute.canvas,
@@ -50469,7 +50266,7 @@
50469
50266
  }
50470
50267
  }
50471
50268
  },
50472
- componentShowContent: table.options.chartDimensionLinkage?.showTooltip &&
50269
+ componentShowContent: table.options.chartDimensionLinkage &&
50473
50270
  this.attribute.spec.type !== 'scatter'
50474
50271
  ? {
50475
50272
  tooltip: {
@@ -50490,54 +50287,21 @@
50490
50287
  table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
50491
50288
  this.activeChartInstance.on('click', (params) => {
50492
50289
  if (this.attribute.spec.select?.enable === false) {
50493
- table.scenegraph.updateChartState(null, undefined);
50290
+ table.scenegraph.updateChartState(null);
50494
50291
  }
50495
50292
  else if (Chart.temp) {
50496
- table.scenegraph.updateChartState(params?.datum, 'click');
50497
- }
50498
- });
50499
- let brushChangeThrottle;
50500
- if (table.options.chartDimensionLinkage?.listenBrushChange) {
50501
- brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), table.options.chartDimensionLinkage?.brushChangeDelay ?? 100);
50502
- this.activeChartInstance.on('brushChange', (params) => {
50503
- brushChangeThrottle.throttled(params?.value?.inBrushData, 'brush');
50504
- });
50505
- }
50506
- this.activeChartInstance.on('brushStart', (params) => {
50507
- const brushingChartInstance = getBrushingChartInstance();
50508
- if (brushingChartInstance !== this.activeChartInstance) {
50509
- if (brushingChartInstance) {
50510
- brushingChartInstance.getChart().getComponentsByKey('brush')[0].clearBrushStateAndMask();
50511
- }
50512
- setBrushingChartInstance(this.activeChartInstance, col, row);
50293
+ table.scenegraph.updateChartState(params?.datum);
50513
50294
  }
50514
50295
  });
50515
50296
  this.activeChartInstance.on('brushEnd', (params) => {
50516
- brushChangeThrottle?.cancel();
50517
- table.scenegraph.updateChartState(params?.value?.inBrushData, 'brush');
50297
+ table.scenegraph.updateChartState(params?.value?.inBrushData);
50518
50298
  Chart.temp = 0;
50519
50299
  setTimeout(() => {
50520
50300
  Chart.temp = 1;
50521
50301
  }, 0);
50522
50302
  });
50523
- if (table.options.chartDimensionLinkage?.showTooltip) {
50524
- if (this.attribute.spec.type === 'pie') {
50525
- this.activeChartInstance.on('pointerover', { markName: 'pie' }, (params) => {
50526
- const categoryField = this.attribute.spec.categoryField;
50527
- const datum = { [categoryField]: params?.datum?.[categoryField] };
50528
- generateChartInstanceListByViewRange(datum, table, false);
50529
- });
50530
- this.activeChartInstance.on('pointerout', { markName: 'pie' }, (params) => {
50531
- const categoryField = this.attribute.spec.categoryField;
50532
- const datum = { [categoryField]: params?.datum?.[categoryField] };
50533
- generateChartInstanceListByViewRange(datum, table, true);
50534
- });
50535
- }
50303
+ if (table.options.chartDimensionLinkage) {
50536
50304
  this.activeChartInstance.on('dimensionHover', (params) => {
50537
- if (isDisabledShowTooltipToAllChartInstances()) {
50538
- return;
50539
- }
50540
- this.activeChartInstance.disableTooltip(false);
50541
50305
  const dimensionInfo = params?.dimensionInfo[0];
50542
50306
  const canvasXY = params?.event?.canvas;
50543
50307
  const viewport = params?.event?.viewport;
@@ -50588,11 +50352,13 @@
50588
50352
  }
50589
50353
  else if (prev_justShowMarkTooltip === false && justShowMarkTooltip === true) {
50590
50354
  delayRunDimensionHover = false;
50591
- this.clearDelayRunDimensionHoverTimer();
50355
+ clearTimeout(this.delayRunDimensionHoverTimer);
50356
+ this.delayRunDimensionHoverTimer = undefined;
50592
50357
  }
50593
50358
  else if (prev_justShowMarkTooltip === true && justShowMarkTooltip === true) {
50594
50359
  delayRunDimensionHover = false;
50595
- this.clearDelayRunDimensionHoverTimer();
50360
+ clearTimeout(this.delayRunDimensionHoverTimer);
50361
+ this.delayRunDimensionHoverTimer = undefined;
50596
50362
  }
50597
50363
  if (params.action === 'enter' ||
50598
50364
  params.action === 'move' ||
@@ -50608,11 +50374,8 @@
50608
50374
  }
50609
50375
  }
50610
50376
  else {
50611
- this.clearDelayRunDimensionHoverTimer();
50377
+ clearTimeout(this.delayRunDimensionHoverTimer);
50612
50378
  this.delayRunDimensionHoverTimer = setTimeout(() => {
50613
- if (isDisabledShowTooltipToAllChartInstances()) {
50614
- return;
50615
- }
50616
50379
  if (indicatorsAsCol) {
50617
50380
  generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
50618
50381
  }
@@ -50673,31 +50436,23 @@
50673
50436
  });
50674
50437
  }
50675
50438
  table._bindChartEvent?.(this.activeChartInstance);
50676
- if (isDisabledShowTooltipToAllChartInstances()) {
50677
- this.activeChartInstance.disableTooltip(true);
50678
- }
50679
50439
  }
50680
50440
  static temp = 1;
50681
- clearDelayRunDimensionHoverTimer() {
50682
- clearTimeout(this.delayRunDimensionHoverTimer);
50683
- this.delayRunDimensionHoverTimer = undefined;
50684
- }
50685
- deactivate(table, { forceRelease = false, releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true, releaseAllChartInstance = false } = {}) {
50441
+ deactivate(table, { releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true } = {}) {
50686
50442
  this.activeChartInstanceHoverOnMark = null;
50687
50443
  this.justShowMarkTooltip = undefined;
50688
50444
  this.justShowMarkTooltipTimer = Date.now();
50689
- this.clearDelayRunDimensionHoverTimer();
50445
+ clearTimeout(this.delayRunDimensionHoverTimer);
50446
+ this.delayRunDimensionHoverTimer = undefined;
50690
50447
  if (releaseChartInstance) {
50691
- if (forceRelease || !getBrushingChartInstance() || getBrushingChartInstance() !== this.activeChartInstance) {
50692
- this.activeChartInstance?.updateViewBox({
50693
- x1: -1000,
50694
- x2: -800,
50695
- y1: -1000,
50696
- y2: -800
50697
- }, false, false);
50698
- this.activeChartInstance?.release();
50699
- this.activeChartInstance = null;
50700
- }
50448
+ this.activeChartInstance?.updateViewBox({
50449
+ x1: -1000,
50450
+ x2: -800,
50451
+ y1: -1000,
50452
+ y2: -800
50453
+ }, false, false);
50454
+ this.activeChartInstance?.release();
50455
+ this.activeChartInstance = null;
50701
50456
  const { col, row } = this.parent;
50702
50457
  table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) &&
50703
50458
  table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
@@ -50717,16 +50472,11 @@
50717
50472
  table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
50718
50473
  }
50719
50474
  }
50720
- if (releaseAllChartInstance) {
50721
- clearAllChartInstanceList(table, forceRelease);
50475
+ if (releaseColumnChartInstance) {
50476
+ clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table);
50722
50477
  }
50723
- else {
50724
- if (releaseColumnChartInstance) {
50725
- clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table, forceRelease);
50726
- }
50727
- if (releaseRowChartInstance) {
50728
- clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table, forceRelease);
50729
- }
50478
+ if (releaseRowChartInstance) {
50479
+ clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table);
50730
50480
  }
50731
50481
  }
50732
50482
  updateData(data) {
@@ -50737,19 +50487,12 @@
50737
50487
  const padding = this.attribute.cellPadding;
50738
50488
  const table = this.stage.table;
50739
50489
  const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
50740
- const viewBox = {
50490
+ return {
50741
50491
  x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
50742
50492
  x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
50743
50493
  y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
50744
50494
  y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
50745
50495
  };
50746
- if (this.activeChartInstance) {
50747
- this.activeChartInstanceLastViewBox = viewBox;
50748
- }
50749
- else {
50750
- this.activeChartInstanceLastViewBox = null;
50751
- }
50752
- return viewBox;
50753
50496
  }
50754
50497
  }
50755
50498
  function getTableBounds(col, row, table) {
@@ -51018,6 +50761,7 @@
51018
50761
  drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
51019
50762
  const groupAttribute = getTheme(chart, params?.theme).group;
51020
50763
  const { dataId, data, spec } = chart.attribute;
50764
+ chart.getViewBox();
51021
50765
  const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
51022
50766
  const { table } = chart.getRootNode();
51023
50767
  const { cacheCanvas, activeChartInstance } = chart;
@@ -51040,20 +50784,13 @@
51040
50784
  activeChartInstance.updateSpecSync(spec, false, { reuse: false, morph: false });
51041
50785
  }
51042
50786
  }
51043
- const lastViewBox = chart.activeChartInstanceLastViewBox;
51044
50787
  const viewBox = chart.getViewBox();
51045
- if (!(lastViewBox &&
51046
- viewBox.x1 === lastViewBox.x1 &&
51047
- viewBox.x2 === lastViewBox.x2 &&
51048
- viewBox.y1 === lastViewBox.y1 &&
51049
- viewBox.y2 === lastViewBox.y2)) {
51050
- activeChartInstance.updateViewBox({
51051
- x1: 0,
51052
- x2: viewBox.x2 - viewBox.x1,
51053
- y1: 0,
51054
- y2: viewBox.y2 - viewBox.y1
51055
- }, false, false);
51056
- }
50788
+ activeChartInstance.updateViewBox({
50789
+ x1: 0,
50790
+ x2: viewBox.x2 - viewBox.x1,
50791
+ y1: 0,
50792
+ y2: viewBox.y2 - viewBox.y1
50793
+ }, false, false);
51057
50794
  const chartStage = activeChartInstance.getStage();
51058
50795
  chartStage.needRender = true;
51059
50796
  const matrix = chart.globalTransMatrix.clone();
@@ -55839,6 +55576,7 @@
55839
55576
  rowUpdatePos = isValid$1(rowUpdatePos) ? (isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
55840
55577
  }
55841
55578
  scene.table._clearRowRangeHeightsMap();
55579
+ verifyProxyRowStatus(scene);
55842
55580
  let updateAfter;
55843
55581
  addRows.forEach(row => {
55844
55582
  const needUpdateAfter = addRow(row, scene, skipUpdateProxy);
@@ -56257,6 +55995,31 @@
56257
55995
  }
56258
55996
  }
56259
55997
  }
55998
+ function verifyProxyRowStatus(scene) {
55999
+ const proxy = scene.proxy;
56000
+ const { rowStart, rowEnd, rowLimit, totalRow } = proxy;
56001
+ if (rowStart > rowEnd) {
56002
+ proxy.rowStart = scene.table.columnHeaderLevelCount;
56003
+ proxy.rowEnd = Math.min(totalRow, proxy.rowStart + rowLimit - 1);
56004
+ proxy.currentRow = 0;
56005
+ return;
56006
+ }
56007
+ if (rowStart + rowLimit - 1 > totalRow) {
56008
+ const oldRowStart = proxy.rowStart;
56009
+ const newRowStart = Math.max(scene.table.columnHeaderLevelCount, totalRow - rowLimit + 1);
56010
+ if (newRowStart === oldRowStart) {
56011
+ return;
56012
+ }
56013
+ proxy.rowStart = newRowStart;
56014
+ proxy.rowEnd = Math.min(totalRow, newRowStart + rowLimit - 1);
56015
+ proxy.currentRow = proxy.rowEnd + 1;
56016
+ const addRowCount = oldRowStart - proxy.rowStart;
56017
+ for (let i = 0; i < addRowCount; i++) {
56018
+ addRowCellGroup(proxy.rowStart + i, scene);
56019
+ }
56020
+ proxy.rowUpdatePos = proxy.rowStart;
56021
+ }
56022
+ }
56260
56023
 
56261
56024
  function createReactContainer(table) {
56262
56025
  const { internalProps } = table;
@@ -57169,10 +56932,9 @@
57169
56932
  updateTableAxes(scenegraph.rightFrozenGroup, scenegraph.table);
57170
56933
  updateTableAxes(scenegraph.bottomFrozenGroup, scenegraph.table);
57171
56934
  }
57172
- function updateChartState(scenegraph, datum, selectedDataMode) {
56935
+ function updateChartState(scenegraph, datum) {
57173
56936
  const table = scenegraph.table;
57174
56937
  if (table.isPivotChart()) {
57175
- table._selectedDataMode = selectedDataMode;
57176
56938
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
57177
56939
  if ((datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) &&
57178
56940
  preSelectItemsCount === 0) {
@@ -58439,73 +58201,38 @@
58439
58201
  resetResidentHoverIcon(col, row) {
58440
58202
  resetResidentHoverIcon(col, row, this);
58441
58203
  }
58442
- deactivateChart(col, row, forceRelease = false) {
58204
+ deactivateChart(col, row) {
58443
58205
  if (col === -1 || row === -1) {
58444
- if (forceRelease) {
58445
- const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos();
58446
- const brushingChartInstance = getBrushingChartInstance();
58447
- if (brushingChartInstanceCellPos && brushingChartInstance) {
58448
- const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
58449
- if (cellGroup?.firstChild?.deactivate) {
58450
- clearBrushingChartInstance();
58451
- cellGroup?.firstChild?.deactivate?.(this.table, {
58452
- forceRelease: true,
58453
- releaseChartInstance: true,
58454
- releaseColumnChartInstance: true,
58455
- releaseRowChartInstance: true,
58456
- releaseAllChartInstance: true
58457
- });
58458
- }
58459
- }
58460
- }
58461
58206
  return;
58462
58207
  }
58463
58208
  const cellGroup = this.getCell(col, row);
58464
58209
  if (cellGroup?.firstChild?.deactivate) {
58465
- if (forceRelease) {
58466
- clearBrushingChartInstance();
58467
- cellGroup?.firstChild?.deactivate?.(this.table, {
58468
- forceRelease: true,
58469
- releaseChartInstance: true,
58470
- releaseColumnChartInstance: true,
58471
- releaseRowChartInstance: true,
58472
- releaseAllChartInstance: true
58473
- });
58474
- return;
58475
- }
58476
58210
  const chartNode = cellGroup?.firstChild;
58477
58211
  const chartType = chartNode.attribute.spec.type;
58478
- cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage?.showTooltip
58212
+ cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage
58479
58213
  ? {
58480
- releaseChartInstance: chartType === 'pie'
58481
- ? false
58482
- : chartType === 'scatter'
58483
- ? (col !== this.table.stateManager.hover.cellPos.col &&
58484
- row !== this.table.stateManager.hover.cellPos.row) ||
58485
- this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
58486
- this.table.stateManager.hover.cellPos.row >
58487
- this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
58488
- this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
58489
- this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
58490
- : this.table.options.indicatorsAsCol
58491
- ? row !== this.table.stateManager.hover.cellPos.row ||
58492
- this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
58493
- this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
58494
- : col !== this.table.stateManager.hover.cellPos.col ||
58495
- this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
58496
- this.table.stateManager.hover.cellPos.row >
58497
- this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
58498
- releaseColumnChartInstance: chartType === 'pie'
58499
- ? false
58500
- : col !== this.table.stateManager.hover.cellPos.col ||
58214
+ releaseChartInstance: chartType === 'scatter'
58215
+ ? (col !== this.table.stateManager.hover.cellPos.col &&
58216
+ row !== this.table.stateManager.hover.cellPos.row) ||
58501
58217
  this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
58502
58218
  this.table.stateManager.hover.cellPos.row >
58503
- this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
58504
- releaseRowChartInstance: chartType === 'pie'
58505
- ? false
58506
- : row !== this.table.stateManager.hover.cellPos.row ||
58219
+ this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
58507
58220
  this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
58508
58221
  this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
58222
+ : this.table.options.indicatorsAsCol
58223
+ ? row !== this.table.stateManager.hover.cellPos.row ||
58224
+ this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
58225
+ this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
58226
+ : col !== this.table.stateManager.hover.cellPos.col ||
58227
+ this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
58228
+ this.table.stateManager.hover.cellPos.row >
58229
+ this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
58230
+ releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col ||
58231
+ this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
58232
+ this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
58233
+ releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row ||
58234
+ this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
58235
+ this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
58509
58236
  }
58510
58237
  : undefined);
58511
58238
  }
@@ -58562,17 +58289,8 @@
58562
58289
  updateChartSizeForResizeRowHeight(row) {
58563
58290
  updateChartSizeForResizeRowHeight(this, row);
58564
58291
  }
58565
- updateChartState(datum, selectedDataMode) {
58566
- if (this.table.isPivotChart()) {
58567
- if (datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) {
58568
- const brushingChartInstance = getBrushingChartInstance();
58569
- if (brushingChartInstance) {
58570
- brushingChartInstance.getChart().getComponentsByKey('brush')[0].clearBrushStateAndMask();
58571
- }
58572
- this.table.options.chartDimensionLinkage?.clearChartState?.();
58573
- }
58574
- updateChartState(this, datum, selectedDataMode);
58575
- }
58292
+ updateChartState(datum) {
58293
+ this.table.isPivotChart() && updateChartState(this, datum);
58576
58294
  }
58577
58295
  updateCheckboxCellState(col, row, checked) {
58578
58296
  if (this.table.transpose) {
@@ -60104,7 +59822,7 @@
60104
59822
  scenegraph.updateCellSelectBorder(currentRange);
60105
59823
  }
60106
59824
  else {
60107
- let extendSelectRange = true;
59825
+ let extendSelectRange = isValid$1(skipBodyMerge) ? !skipBodyMerge : true;
60108
59826
  if (cellPos.col !== -1 && cellPos.row !== -1 && !enableCtrlSelectMode) {
60109
59827
  state.select.ranges = [];
60110
59828
  scenegraph.deleteAllSelectBorder();
@@ -60272,7 +59990,7 @@
60272
59990
  }
60273
59991
  else if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) &&
60274
59992
  !table.stateManager.isResizeCol()) {
60275
- let extendSelectRange = true;
59993
+ let extendSelectRange = isValid$1(skipBodyMerge) ? !skipBodyMerge : true;
60276
59994
  if (cellPos.col === -1) {
60277
59995
  cellPos.col = col;
60278
59996
  }
@@ -63859,8 +63577,7 @@
63859
63577
  return;
63860
63578
  }
63861
63579
  if (table.isPivotChart() && eventArgsSet?.eventArgs?.target.type !== 'chart') {
63862
- table.scenegraph.updateChartState(null, undefined);
63863
- table.scenegraph.deactivateChart(-1, -1, true);
63580
+ table.scenegraph.updateChartState(null);
63864
63581
  }
63865
63582
  if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
63866
63583
  stateManager.hideMenu();
@@ -63929,8 +63646,7 @@
63929
63646
  else {
63930
63647
  if (!eventManager.checkCellFillhandle(eventArgsSet) &&
63931
63648
  (eventManager.checkColumnResize(eventArgsSet, true) || eventManager.checkRowResize(eventArgsSet, true))) {
63932
- table.scenegraph.updateChartState(null, undefined);
63933
- table.scenegraph.deactivateChart(-1, -1, true);
63649
+ table.scenegraph.updateChartState(null);
63934
63650
  stateManager.updateInteractionState(InteractionState.grabing);
63935
63651
  return;
63936
63652
  }
@@ -64175,8 +63891,7 @@
64175
63891
  !eventManager.checkCellFillhandle(eventArgsSet) &&
64176
63892
  !stateManager.columnResize.resizing &&
64177
63893
  eventManager.checkColumnResize(eventArgsSet, true)) {
64178
- table.scenegraph.updateChartState(null, undefined);
64179
- table.scenegraph.deactivateChart(-1, -1, true);
63894
+ table.scenegraph.updateChartState(null);
64180
63895
  stateManager.updateInteractionState(InteractionState.grabing);
64181
63896
  const { eventArgs } = eventArgsSet;
64182
63897
  if (!eventArgs?.targetCell) {
@@ -64223,8 +63938,7 @@
64223
63938
  }
64224
63939
  stateManager.endSelectCells(true, isHasSelected);
64225
63940
  stateManager.updateCursor();
64226
- table.scenegraph.updateChartState(null, undefined);
64227
- table.scenegraph.deactivateChart(-1, -1, true);
63941
+ table.scenegraph.updateChartState(null);
64228
63942
  }
64229
63943
  else if (table.eventManager.isDraging && stateManager.isSelecting()) {
64230
63944
  stateManager.endSelectCells();
@@ -64415,10 +64129,6 @@
64415
64129
  const legend = e.path.find(node => node.name === 'legend');
64416
64130
  if (!legend) {
64417
64131
  table.editorManager?.completeEdit();
64418
- const { cellPos } = table.stateManager.hover;
64419
- const prevHoverCellCol = cellPos.col;
64420
- const prevHoverCellRow = cellPos.row;
64421
- table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, true);
64422
64132
  if (table.eventManager._enableTableScroll) {
64423
64133
  handleWhell(e, stateManager);
64424
64134
  }
@@ -64612,9 +64322,6 @@
64612
64322
  if (stateManager.interactionState !== InteractionState.scrolling) {
64613
64323
  stateManager.updateInteractionState(InteractionState.scrolling);
64614
64324
  }
64615
- scenegraph.table.stateManager.hideMenu();
64616
- scenegraph.table.editorManager?.completeEdit();
64617
- table.scenegraph.deactivateChart(-1, -1, true);
64618
64325
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
64619
64326
  throttleVerticalWheel(ratio, e);
64620
64327
  });
@@ -64626,9 +64333,6 @@
64626
64333
  if (stateManager.interactionState !== InteractionState.scrolling) {
64627
64334
  stateManager.updateInteractionState(InteractionState.scrolling);
64628
64335
  }
64629
- scenegraph.table.stateManager.hideMenu();
64630
- scenegraph.table.editorManager?.completeEdit();
64631
- table.scenegraph.deactivateChart(-1, -1, true);
64632
64336
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
64633
64337
  throttleHorizontalWheel(ratio);
64634
64338
  });
@@ -64934,8 +64638,6 @@
64934
64638
  stateManager.endSelectCells(true, isHasSelected);
64935
64639
  }
64936
64640
  });
64937
- table.scenegraph.updateChartState(null, undefined);
64938
- table.scenegraph.deactivateChart(-1, -1, true);
64939
64641
  }
64940
64642
  };
64941
64643
  eventManager.globalEventListeners.push({
@@ -69966,10 +69668,56 @@
69966
69668
  table;
69967
69669
  customCellStyle;
69968
69670
  customCellStyleArrangement;
69671
+ _customCellStyleArrangementIndex;
69672
+ _customCellStyleArrangementTombstoneCount;
69969
69673
  constructor(table, customCellStyle, customCellStyleArrangement) {
69970
69674
  this.table = table;
69971
69675
  this.customCellStyle = customCellStyle;
69972
69676
  this.customCellStyleArrangement = customCellStyleArrangement;
69677
+ this._customCellStyleArrangementIndex = new Map();
69678
+ this._customCellStyleArrangementTombstoneCount = 0;
69679
+ this._rebuildCustomCellStyleArrangementIndex();
69680
+ }
69681
+ _getCustomCellStyleArrangementKey(cellPos) {
69682
+ if (cellPos.range) {
69683
+ const { start, end } = cellPos.range;
69684
+ return `range:${start.col},${start.row},${end.col},${end.row}`;
69685
+ }
69686
+ if (cellPos.col === undefined || cellPos.row === undefined) {
69687
+ return undefined;
69688
+ }
69689
+ return `cell:${cellPos.col},${cellPos.row}`;
69690
+ }
69691
+ _rebuildCustomCellStyleArrangementIndex() {
69692
+ this._customCellStyleArrangementIndex.clear();
69693
+ this._customCellStyleArrangementTombstoneCount = 0;
69694
+ for (let i = 0; i < this.customCellStyleArrangement.length; i++) {
69695
+ if (!isValid$1(this.customCellStyleArrangement[i].customStyleId)) {
69696
+ this._customCellStyleArrangementTombstoneCount++;
69697
+ continue;
69698
+ }
69699
+ const key = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[i].cellPosition);
69700
+ if (key) {
69701
+ this._customCellStyleArrangementIndex.set(key, i);
69702
+ }
69703
+ }
69704
+ }
69705
+ _compactCustomCellStyleArrangementIfNeeded() {
69706
+ const length = this.customCellStyleArrangement.length;
69707
+ if (this._customCellStyleArrangementTombstoneCount < 2048) {
69708
+ return;
69709
+ }
69710
+ if (this._customCellStyleArrangementTombstoneCount * 4 < length) {
69711
+ return;
69712
+ }
69713
+ const compacted = this.customCellStyleArrangement.filter(style => isValid$1(style.customStyleId));
69714
+ if (compacted.length === this.customCellStyleArrangement.length) {
69715
+ this._customCellStyleArrangementTombstoneCount = 0;
69716
+ return;
69717
+ }
69718
+ this.customCellStyleArrangement.length = 0;
69719
+ this.customCellStyleArrangement.push(...compacted);
69720
+ this._rebuildCustomCellStyleArrangementIndex();
69973
69721
  }
69974
69722
  getCustomCellStyle(col, row) {
69975
69723
  const customStyleIds = this.getCustomCellStyleIds(col, row);
@@ -69992,6 +69740,9 @@
69992
69740
  styles.push(styleOption.style);
69993
69741
  }
69994
69742
  });
69743
+ if (!styles.length) {
69744
+ return undefined;
69745
+ }
69995
69746
  return merge({}, ...styles);
69996
69747
  }
69997
69748
  return undefined;
@@ -70002,6 +69753,9 @@
70002
69753
  for (let c = range.start.col; c <= range.end.col; c++) {
70003
69754
  for (let r = range.start.row; r <= range.end.row; r++) {
70004
69755
  this.customCellStyleArrangement.forEach(style => {
69756
+ if (!isValid$1(style.customStyleId)) {
69757
+ return;
69758
+ }
70005
69759
  if (style.cellPosition.range) {
70006
69760
  if (style.cellPosition.range.start.col <= c &&
70007
69761
  style.cellPosition.range.end.col >= c &&
@@ -70053,15 +69807,40 @@
70053
69807
  this.table.scenegraph.updateNextFrame();
70054
69808
  }
70055
69809
  arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
70056
- const index = this.customCellStyleArrangement.findIndex(style => {
70057
- if (style.cellPosition.range && cellPos.range) {
70058
- return (style.cellPosition.range.start.col === cellPos.range.start.col &&
70059
- style.cellPosition.range.start.row === cellPos.range.start.row &&
70060
- style.cellPosition.range.end.col === cellPos.range.end.col &&
70061
- style.cellPosition.range.end.row === cellPos.range.end.row);
70062
- }
70063
- return style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row;
70064
- });
69810
+ const inputKey = this._getCustomCellStyleArrangementKey(cellPos);
69811
+ let index = inputKey ? this._customCellStyleArrangementIndex.get(inputKey) ?? -1 : -1;
69812
+ if (inputKey && index !== -1) {
69813
+ const item = this.customCellStyleArrangement[index];
69814
+ const itemKey = item ? this._getCustomCellStyleArrangementKey(item.cellPosition) : undefined;
69815
+ if (!item || !isValid$1(item.customStyleId) || itemKey !== inputKey) {
69816
+ index = this.customCellStyleArrangement.findIndex(style => {
69817
+ if (!isValid$1(style.customStyleId)) {
69818
+ return false;
69819
+ }
69820
+ return this._getCustomCellStyleArrangementKey(style.cellPosition) === inputKey;
69821
+ });
69822
+ if (index !== -1) {
69823
+ this._customCellStyleArrangementIndex.set(inputKey, index);
69824
+ }
69825
+ else {
69826
+ this._customCellStyleArrangementIndex.delete(inputKey);
69827
+ }
69828
+ }
69829
+ }
69830
+ if (index === -1 && !inputKey) {
69831
+ index = this.customCellStyleArrangement.findIndex(style => {
69832
+ if (!isValid$1(style.customStyleId)) {
69833
+ return false;
69834
+ }
69835
+ if (style.cellPosition.range && cellPos.range) {
69836
+ return (style.cellPosition.range.start.col === cellPos.range.start.col &&
69837
+ style.cellPosition.range.start.row === cellPos.range.start.row &&
69838
+ style.cellPosition.range.end.col === cellPos.range.end.col &&
69839
+ style.cellPosition.range.end.row === cellPos.range.end.row);
69840
+ }
69841
+ return style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row;
69842
+ });
69843
+ }
70065
69844
  if (index === -1 && !customStyleId) {
70066
69845
  return;
70067
69846
  }
@@ -70074,6 +69853,11 @@
70074
69853
  },
70075
69854
  customStyleId: customStyleId
70076
69855
  });
69856
+ const pushedIndex = this.customCellStyleArrangement.length - 1;
69857
+ const pushedKey = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[pushedIndex].cellPosition);
69858
+ if (pushedKey) {
69859
+ this._customCellStyleArrangementIndex.set(pushedKey, pushedIndex);
69860
+ }
70077
69861
  }
70078
69862
  else if (this.customCellStyleArrangement[index].customStyleId === customStyleId) {
70079
69863
  return;
@@ -70082,9 +69866,17 @@
70082
69866
  this.customCellStyleArrangement[index].customStyleId = customStyleId;
70083
69867
  }
70084
69868
  else {
70085
- this.customCellStyleArrangement.splice(index, 1);
69869
+ const existedKey = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[index].cellPosition);
69870
+ if (isValid$1(this.customCellStyleArrangement[index].customStyleId)) {
69871
+ this._customCellStyleArrangementTombstoneCount++;
69872
+ }
69873
+ this.customCellStyleArrangement[index].customStyleId = null;
69874
+ if (existedKey) {
69875
+ this._customCellStyleArrangementIndex.delete(existedKey);
69876
+ }
69877
+ this._compactCustomCellStyleArrangementIfNeeded();
70086
69878
  }
70087
- const style = this.getCustomCellStyleOption(customStyleId)?.style;
69879
+ const style = customStyleId ? this.getCustomCellStyleOption(customStyleId)?.style : undefined;
70088
69880
  if (style) {
70089
69881
  forceFastUpdate = true;
70090
69882
  for (const key in style) {
@@ -70114,6 +69906,8 @@
70114
69906
  updateCustomCell(customCellStyle, customCellStyleArrangement) {
70115
69907
  this.customCellStyle.length = 0;
70116
69908
  this.customCellStyleArrangement.length = 0;
69909
+ this._customCellStyleArrangementIndex.clear();
69910
+ this._customCellStyleArrangementTombstoneCount = 0;
70117
69911
  customCellStyle.forEach((cellStyle) => {
70118
69912
  this.registerCustomCellStyle(cellStyle.id, cellStyle.style);
70119
69913
  });
@@ -70499,7 +70293,7 @@
70499
70293
  return TABLE_EVENT_TYPE;
70500
70294
  }
70501
70295
  options;
70502
- version = "1.22.11-alpha.8";
70296
+ version = "1.22.11";
70503
70297
  pagination;
70504
70298
  id = `VTable${Date.now()}`;
70505
70299
  headerStyleCache;
@@ -72495,6 +72289,7 @@
72495
72289
  this.stateManager.updateSelectPos(startCol, startRow, enableShiftSelectMode, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
72496
72290
  this.stateManager.updateInteractionState(InteractionState.grabing);
72497
72291
  this.stateManager.updateSelectPos(endCol, endRow, enableShiftSelectMode, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
72292
+ this.stateManager.select.selecting = false;
72498
72293
  }
72499
72294
  dragSelectCol(colIndex, enableCtrlSelectMode) {
72500
72295
  const currentSelectRanges = this.stateManager.select.ranges;
@@ -72503,10 +72298,10 @@
72503
72298
  lastSelectRange.end.col = colIndex;
72504
72299
  }
72505
72300
  this.stateManager.updateSelectPos(colIndex, this.rowCount - 1, false, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
72301
+ this.stateManager.select.selecting = false;
72506
72302
  }
72507
72303
  endDragSelect() {
72508
72304
  this.stateManager.updateInteractionState(InteractionState.default);
72509
- this.stateManager.endSelectCells(false, false);
72510
72305
  }
72511
72306
  startDragSelectRow(rowIndex, enableCtrlSelectMode, isShift) {
72512
72307
  const lastSelectRange = this.stateManager.select.ranges[this.stateManager.select.ranges.length - 1];
@@ -72517,6 +72312,7 @@
72517
72312
  this.stateManager.updateSelectPos(startCol, startRow, isShift, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
72518
72313
  this.stateManager.updateInteractionState(InteractionState.grabing);
72519
72314
  this.stateManager.updateSelectPos(endCol, endRow, isShift, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
72315
+ this.stateManager.select.selecting = false;
72520
72316
  }
72521
72317
  dragSelectRow(rowIndex, isCtrl) {
72522
72318
  const currentSelectRanges = this.stateManager.select.ranges;
@@ -72525,6 +72321,7 @@
72525
72321
  lastSelectRange.end.row = rowIndex;
72526
72322
  }
72527
72323
  this.stateManager.updateSelectPos(this.colCount - 1, rowIndex, false, isCtrl, false, this.options.select?.makeSelectCellVisible ?? true, true);
72324
+ this.stateManager.select.selecting = false;
72528
72325
  }
72529
72326
  get recordsCount() {
72530
72327
  return this.records?.length;
@@ -73738,6 +73535,22 @@
73738
73535
  }
73739
73536
  return false;
73740
73537
  }
73538
+ updateCellContent(col, row) {
73539
+ this.scenegraph.updateCellContent(col, row);
73540
+ }
73541
+ updateCellContentRange(startCol, startRow, endCol, endRow) {
73542
+ for (let i = startCol; i <= endCol; i++) {
73543
+ for (let j = startRow; j <= endRow; j++) {
73544
+ this.scenegraph.updateCellContent(i, j);
73545
+ }
73546
+ }
73547
+ }
73548
+ updateCellContentRanges(ranges) {
73549
+ for (let i = 0; i < ranges.length; i++) {
73550
+ const range = ranges[i];
73551
+ this.updateCellContentRange(range.start.col, range.start.row, range.end.col, range.end.row);
73552
+ }
73553
+ }
73741
73554
  }
73742
73555
 
73743
73556
  var core = /*#__PURE__*/Object.freeze({
@@ -76357,7 +76170,7 @@
76357
76170
  }
76358
76171
  const editor = this.table.getEditor(col, row);
76359
76172
  if (editor) {
76360
- editElement && editor.setElement(editElement);
76173
+ editElement && editor.setElement?.(editElement);
76361
76174
  if (this.table.internalProps.layoutMap.isSeriesNumber(col, row)) {
76362
76175
  return;
76363
76176
  }
@@ -86402,7 +86215,11 @@
86402
86215
  const colHeaderPath = {};
86403
86216
  colHeaderPath.dimensionKey = colHeader.dimensionKey;
86404
86217
  colHeaderPath.indicatorKey = colHeader.indicatorKey;
86405
- colHeaderPath.value = colHeader.value ?? this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)?.title ?? '';
86218
+ colHeaderPath.value =
86219
+ colHeader.value ??
86220
+ (colHeader.indicatorKey
86221
+ ? this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)?.title ?? ''
86222
+ : colHeader.value);
86406
86223
  colHeaderPath.virtual = colHeader.virtual;
86407
86224
  colHeaderPath.role = colHeader.role;
86408
86225
  headerPaths.colHeaderPaths.push(colHeaderPath);
@@ -87577,93 +87394,53 @@
87577
87394
  return null;
87578
87395
  }
87579
87396
  _generateChartState() {
87580
- const select_filter = (datum) => {
87581
- if (this._table._selectedDataItemsInChart.length >= 1) {
87582
- const match = this._table._selectedDataItemsInChart.find(item => {
87583
- for (const itemKey in item) {
87584
- if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
87585
- return false;
87586
- }
87587
- }
87588
- return true;
87589
- });
87590
- return !!match;
87591
- }
87592
- else if (this._table._selectedDimensionInChart?.length) {
87593
- const match = this._table._selectedDimensionInChart.every(item => {
87594
- if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
87595
- return false;
87596
- }
87597
- return true;
87598
- });
87599
- return !!match;
87600
- }
87601
- return false;
87602
- };
87603
- const selected_reverse = (datum) => {
87604
- if (this._table._selectedDataItemsInChart.length >= 1) {
87605
- const match = this._table._selectedDataItemsInChart.find(item => {
87606
- for (const itemKey in item) {
87607
- if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
87608
- return false;
87609
- }
87610
- }
87611
- return true;
87612
- });
87613
- return !match;
87614
- }
87615
- else if (this._table._selectedDimensionInChart?.length) {
87616
- const match = this._table._selectedDimensionInChart.every(item => {
87617
- if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
87618
- return false;
87619
- }
87620
- return true;
87621
- });
87622
- return !match;
87623
- }
87624
- return false;
87625
- };
87626
87397
  const state = {
87627
87398
  vtable_selected: {
87628
87399
  filter: (datum) => {
87629
- if (this._table.options.chartDimensionLinkage?.selectedStateFilter) {
87630
- return this._table.options.chartDimensionLinkage.selectedStateFilter(datum);
87400
+ if (this._table._selectedDataItemsInChart.length >= 1) {
87401
+ const match = this._table._selectedDataItemsInChart.find(item => {
87402
+ for (const itemKey in item) {
87403
+ if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
87404
+ return false;
87405
+ }
87406
+ }
87407
+ return true;
87408
+ });
87409
+ return !!match;
87631
87410
  }
87632
- if (this._table._selectedDataMode === 'click') {
87633
- return select_filter(datum);
87411
+ else if (this._table._selectedDimensionInChart?.length) {
87412
+ const match = this._table._selectedDimensionInChart.every(item => {
87413
+ if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
87414
+ return false;
87415
+ }
87416
+ return true;
87417
+ });
87418
+ return !!match;
87634
87419
  }
87635
87420
  return false;
87636
87421
  }
87637
87422
  },
87638
87423
  vtable_selected_reverse: {
87639
87424
  filter: (datum) => {
87640
- if (this._table.options.chartDimensionLinkage?.selectedReverseStateFilter) {
87641
- return this._table.options.chartDimensionLinkage.selectedReverseStateFilter(datum);
87642
- }
87643
- if (this._table._selectedDataMode === 'click') {
87644
- return selected_reverse(datum);
87645
- }
87646
- return false;
87647
- }
87648
- },
87649
- inBrush: {
87650
- filter: (datum) => {
87651
- if (this._table.options.chartDimensionLinkage?.inBrushStateFilter) {
87652
- return this._table.options.chartDimensionLinkage.inBrushStateFilter(datum);
87653
- }
87654
- if (this._table._selectedDataMode === 'brush') {
87655
- return select_filter(datum);
87656
- }
87657
- return false;
87658
- }
87659
- },
87660
- outOfBrush: {
87661
- filter: (datum) => {
87662
- if (this._table.options.chartDimensionLinkage?.outOfBrushStateFilter) {
87663
- return this._table.options.chartDimensionLinkage.outOfBrushStateFilter(datum);
87425
+ if (this._table._selectedDataItemsInChart.length >= 1) {
87426
+ const match = this._table._selectedDataItemsInChart.find(item => {
87427
+ for (const itemKey in item) {
87428
+ if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
87429
+ return false;
87430
+ }
87431
+ }
87432
+ return true;
87433
+ });
87434
+ return !match;
87664
87435
  }
87665
- if (this._table._selectedDataMode === 'brush') {
87666
- return selected_reverse(datum);
87436
+ else if (this._table._selectedDimensionInChart?.length) {
87437
+ const match = this._table._selectedDimensionInChart.every(item => {
87438
+ if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
87439
+ return false;
87440
+ }
87441
+ return true;
87442
+ });
87443
+ return !match;
87667
87444
  }
87668
87445
  return false;
87669
87446
  }
@@ -89266,10 +89043,11 @@
89266
89043
  }
89267
89044
  if (rowKey.length < this.rows.length && this.rowHierarchyType === 'grid-tree') {
89268
89045
  if (rowKey[0] === this.rowGrandTotalLabel) ;
89269
- else if (this.totals?.row?.subTotalsDimensions &&
89046
+ else if (((this.totals?.row?.subTotalsDimensions &&
89270
89047
  this.totals?.row?.subTotalsDimensions?.length >= 1 &&
89271
- rowKey[rowKey.length - 1] !== this.rowSubTotalLabel &&
89272
- this.totals.row.subTotalsDimensions.find((dimension) => dimension === rowDimensionKey)) {
89048
+ this.totals.row.subTotalsDimensions.find((dimension) => dimension === rowDimensionKey)) ||
89049
+ this.totals?.row?.showSubTotalsOnTreeNode) &&
89050
+ rowKey[rowKey.length - 1] !== this.rowSubTotalLabel) {
89273
89051
  rowKey.push(this.rowSubTotalLabel);
89274
89052
  }
89275
89053
  }
@@ -89288,10 +89066,11 @@
89288
89066
  }
89289
89067
  if (colKey.length < this.columns.length && this.columnHierarchyType === 'grid-tree') {
89290
89068
  if (colKey[0] === this.colGrandTotalLabel) ;
89291
- else if (this.totals?.column?.subTotalsDimensions &&
89069
+ else if (((this.totals?.column?.subTotalsDimensions &&
89292
89070
  this.totals?.column?.subTotalsDimensions?.length >= 1 &&
89293
- colKey[colKey.length - 1] !== this.colSubTotalLabel &&
89294
- this.totals.column.subTotalsDimensions.find((dimension) => dimension === colDimensionKey)) {
89071
+ this.totals.column.subTotalsDimensions.find((dimension) => dimension === colDimensionKey)) ||
89072
+ this.totals?.column?.showSubTotalsOnTreeNode) &&
89073
+ colKey[colKey.length - 1] !== this.colSubTotalLabel) {
89295
89074
  colKey.push(this.colSubTotalLabel);
89296
89075
  }
89297
89076
  }
@@ -89485,11 +89264,16 @@
89485
89264
  return;
89486
89265
  }
89487
89266
  const colKey = flatColKey.split(this.stringJoinChar);
89488
- if (that.totals?.column?.subTotalsDimensions &&
89267
+ if ((that.totals?.column?.subTotalsDimensions &&
89489
89268
  that.totals?.column?.subTotalsDimensions?.length > 0 &&
89490
- that.totals.column.showSubTotals !== false) {
89491
- for (let i = 0, len = that.totals?.column?.subTotalsDimensions?.length; i < len; i++) {
89492
- const dimension = that.totals.column.subTotalsDimensions[i];
89269
+ (that.totals?.column?.showSubTotals !== false || that.totals?.column?.showSubTotalsOnTreeNode)) ||
89270
+ (that.totals?.column?.showSubTotalsOnTreeNode && that.columns.length > 0)) {
89271
+ let colSubTotalDimensions = that.totals?.column?.subTotalsDimensions || [];
89272
+ if (that.totals?.column?.showSubTotalsOnTreeNode && colSubTotalDimensions.length === 0) {
89273
+ colSubTotalDimensions = that.columns.map(col => col);
89274
+ }
89275
+ for (let i = 0, len = colSubTotalDimensions.length; i < len; i++) {
89276
+ const dimension = colSubTotalDimensions[i];
89493
89277
  const dimensionIndex = that.columns.indexOf(dimension);
89494
89278
  if (dimensionIndex >= 0) {
89495
89279
  const colTotalKey = colKey.slice(0, dimensionIndex + 1);
@@ -89608,16 +89392,23 @@
89608
89392
  if ((that?.totals?.column?.subTotalsDimensions && that?.totals?.column?.subTotalsDimensions?.length >= 1) ||
89609
89393
  (that?.totals?.row?.subTotalsDimensions && that?.totals?.row?.subTotalsDimensions?.length >= 1) ||
89610
89394
  that?.totals?.column?.showGrandTotals ||
89611
- that?.totals?.row?.showGrandTotals) {
89395
+ that?.totals?.row?.showGrandTotals ||
89396
+ that?.totals?.row?.showSubTotalsOnTreeNode ||
89397
+ that?.totals?.column?.showSubTotalsOnTreeNode) {
89612
89398
  const rowTotalKeys = [];
89613
89399
  Object.keys(that.tree).forEach(flatRowKey => {
89614
89400
  const rowKey = flatRowKey.split(this.stringJoinChar);
89615
89401
  Object.keys(that.tree[flatRowKey]).forEach(flatColKey => {
89616
- if (that.totals?.row?.subTotalsDimensions &&
89402
+ if ((that.totals?.row?.subTotalsDimensions &&
89617
89403
  that.totals?.row?.subTotalsDimensions?.length > 0 &&
89618
- that.totals.row.showSubTotals !== false) {
89619
- for (let i = 0, len = that.totals?.row?.subTotalsDimensions?.length; i < len; i++) {
89620
- const dimension = that.totals.row.subTotalsDimensions[i];
89404
+ (that.totals?.row?.showSubTotals !== false || that.totals?.row?.showSubTotalsOnTreeNode)) ||
89405
+ (that.totals?.row?.showSubTotalsOnTreeNode && that.rows.length > 0)) {
89406
+ let rowSubTotalDimensions = that.totals?.row?.subTotalsDimensions || [];
89407
+ if (that.totals?.row?.showSubTotalsOnTreeNode && rowSubTotalDimensions.length === 0) {
89408
+ rowSubTotalDimensions = that.rows.map(row => row);
89409
+ }
89410
+ for (let i = 0, len = rowSubTotalDimensions.length; i < len; i++) {
89411
+ const dimension = rowSubTotalDimensions[i];
89621
89412
  const dimensionIndex = that.rows.indexOf(dimension);
89622
89413
  if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
89623
89414
  const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
@@ -91935,7 +91726,6 @@
91935
91726
  pivotSortState;
91936
91727
  dataset;
91937
91728
  _selectedDataItemsInChart = [];
91938
- _selectedDataMode = 'click';
91939
91729
  _selectedDimensionInChart = [];
91940
91730
  _chartEventMap = {};
91941
91731
  _axes;
@@ -93125,12 +92915,6 @@
93125
92915
  const headerNodes = layoutMap.getCellHeaderPathsWithTreeNode(col, row);
93126
92916
  return headerNodes;
93127
92917
  }
93128
- disableTooltipToAllChartInstances() {
93129
- disableTooltipToAllChartInstances();
93130
- }
93131
- enableTooltipToAllChartInstances() {
93132
- enableTooltipToAllChartInstances();
93133
- }
93134
92918
  }
93135
92919
 
93136
92920
  class Circle extends Circle$1 {
@@ -93692,7 +93476,7 @@
93692
93476
  }
93693
93477
 
93694
93478
  registerForVrender();
93695
- const version = "1.22.11-alpha.8";
93479
+ const version = "1.22.11";
93696
93480
  function getIcons() {
93697
93481
  return get$2();
93698
93482
  }