@visactor/vtable 1.6.3-alpha.3 → 1.6.3

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 (153) hide show
  1. package/cjs/ListTable.js +11 -7
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/components/tooltip/logic/BubbleTooltipElement.js +4 -4
  4. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  5. package/cjs/core/BaseTable.d.ts +1 -1
  6. package/cjs/core/BaseTable.js +6 -3
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/core/record-helper.js +1 -1
  9. package/cjs/core/record-helper.js.map +1 -1
  10. package/cjs/dataset/dataset-pivot-table.js +1 -0
  11. package/cjs/dataset/dataset-pivot-table.js.map +1 -1
  12. package/cjs/dataset/dataset.js +2 -0
  13. package/cjs/dataset/dataset.js.map +1 -1
  14. package/cjs/event/event.js +1 -1
  15. package/cjs/event/event.js.map +1 -1
  16. package/cjs/event/listener/container-dom.js +0 -4
  17. package/cjs/event/listener/container-dom.js.map +1 -1
  18. package/cjs/event/listener/table-group.js +16 -12
  19. package/cjs/event/listener/table-group.js.map +1 -1
  20. package/cjs/event/media-click.js +2 -1
  21. package/cjs/event/media-click.js.map +1 -1
  22. package/cjs/event/scroll.d.ts +2 -1
  23. package/cjs/event/scroll.js +2 -2
  24. package/cjs/event/scroll.js.map +1 -1
  25. package/cjs/index.d.ts +1 -1
  26. package/cjs/index.js +1 -1
  27. package/cjs/index.js.map +1 -1
  28. package/cjs/layout/pivot-header-layout.js +17 -7
  29. package/cjs/layout/pivot-header-layout.js.map +1 -1
  30. package/cjs/layout/simple-header-layout.js +12 -3
  31. package/cjs/layout/simple-header-layout.js.map +1 -1
  32. package/cjs/layout/tree-helper.js +45 -20
  33. package/cjs/layout/tree-helper.js.map +1 -1
  34. package/cjs/scenegraph/component/table-component.d.ts +1 -0
  35. package/cjs/scenegraph/component/table-component.js +24 -22
  36. package/cjs/scenegraph/component/table-component.js.map +1 -1
  37. package/cjs/scenegraph/group-creater/cell-helper.js +4 -3
  38. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  39. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +2 -2
  40. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +3 -2
  41. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  42. package/cjs/scenegraph/group-creater/column-helper.js +2 -2
  43. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  44. package/cjs/scenegraph/layout/update-height.js +6 -3
  45. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  46. package/cjs/scenegraph/layout/update-width.js +7 -2
  47. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  48. package/cjs/scenegraph/scenegraph.js +1 -1
  49. package/cjs/scenegraph/scenegraph.js.map +1 -1
  50. package/cjs/state/cell-move/index.js +1 -1
  51. package/cjs/state/cell-move/index.js.map +1 -1
  52. package/cjs/state/state.d.ts +4 -4
  53. package/cjs/state/state.js +7 -3
  54. package/cjs/state/state.js.map +1 -1
  55. package/cjs/themes/theme.js +12 -0
  56. package/cjs/themes/theme.js.map +1 -1
  57. package/cjs/ts-types/base-table.d.ts +4 -1
  58. package/cjs/ts-types/base-table.js.map +1 -1
  59. package/cjs/ts-types/events.d.ts +1 -0
  60. package/cjs/ts-types/events.js.map +1 -1
  61. package/cjs/ts-types/list-table/define/Composite-define.d.ts +2 -0
  62. package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
  63. package/cjs/ts-types/list-table/define/link-define.d.ts +4 -0
  64. package/cjs/ts-types/list-table/define/link-define.js.map +1 -1
  65. package/cjs/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -0
  66. package/cjs/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
  67. package/cjs/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -0
  68. package/cjs/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
  69. package/cjs/ts-types/pivot-table/indicator/link-indicator.d.ts +4 -0
  70. package/cjs/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
  71. package/cjs/ts-types/table-engine.d.ts +1 -0
  72. package/cjs/ts-types/table-engine.js.map +1 -1
  73. package/cjs/ts-types/theme.d.ts +3 -0
  74. package/cjs/ts-types/theme.js.map +1 -1
  75. package/cjs/vrender.js.map +1 -1
  76. package/dist/vtable.js +341 -209
  77. package/dist/vtable.min.js +2 -2
  78. package/es/ListTable.js +10 -6
  79. package/es/ListTable.js.map +1 -1
  80. package/es/components/tooltip/logic/BubbleTooltipElement.js +4 -4
  81. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  82. package/es/core/BaseTable.d.ts +1 -1
  83. package/es/core/BaseTable.js +6 -3
  84. package/es/core/BaseTable.js.map +1 -1
  85. package/es/core/record-helper.js +1 -1
  86. package/es/core/record-helper.js.map +1 -1
  87. package/es/dataset/dataset-pivot-table.js +1 -0
  88. package/es/dataset/dataset-pivot-table.js.map +1 -1
  89. package/es/dataset/dataset.js +2 -0
  90. package/es/dataset/dataset.js.map +1 -1
  91. package/es/event/event.js +1 -1
  92. package/es/event/event.js.map +1 -1
  93. package/es/event/listener/container-dom.js +0 -3
  94. package/es/event/listener/container-dom.js.map +1 -1
  95. package/es/event/listener/table-group.js +16 -11
  96. package/es/event/listener/table-group.js.map +1 -1
  97. package/es/event/media-click.js +2 -1
  98. package/es/event/media-click.js.map +1 -1
  99. package/es/event/scroll.d.ts +2 -1
  100. package/es/event/scroll.js +2 -2
  101. package/es/event/scroll.js.map +1 -1
  102. package/es/index.d.ts +1 -1
  103. package/es/index.js +1 -1
  104. package/es/index.js.map +1 -1
  105. package/es/layout/pivot-header-layout.js +17 -7
  106. package/es/layout/pivot-header-layout.js.map +1 -1
  107. package/es/layout/simple-header-layout.js +12 -3
  108. package/es/layout/simple-header-layout.js.map +1 -1
  109. package/es/layout/tree-helper.js +45 -20
  110. package/es/layout/tree-helper.js.map +1 -1
  111. package/es/scenegraph/component/table-component.d.ts +1 -0
  112. package/es/scenegraph/component/table-component.js +24 -22
  113. package/es/scenegraph/component/table-component.js.map +1 -1
  114. package/es/scenegraph/group-creater/cell-helper.js +4 -3
  115. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  116. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +2 -2
  117. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +3 -2
  118. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  119. package/es/scenegraph/group-creater/column-helper.js +2 -2
  120. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  121. package/es/scenegraph/layout/update-height.js +6 -3
  122. package/es/scenegraph/layout/update-height.js.map +1 -1
  123. package/es/scenegraph/layout/update-width.js +7 -2
  124. package/es/scenegraph/layout/update-width.js.map +1 -1
  125. package/es/scenegraph/scenegraph.js +1 -1
  126. package/es/scenegraph/scenegraph.js.map +1 -1
  127. package/es/state/cell-move/index.js +1 -1
  128. package/es/state/cell-move/index.js.map +1 -1
  129. package/es/state/state.d.ts +4 -4
  130. package/es/state/state.js +7 -3
  131. package/es/state/state.js.map +1 -1
  132. package/es/themes/theme.js +12 -0
  133. package/es/themes/theme.js.map +1 -1
  134. package/es/ts-types/base-table.d.ts +4 -1
  135. package/es/ts-types/base-table.js.map +1 -1
  136. package/es/ts-types/events.d.ts +1 -0
  137. package/es/ts-types/events.js.map +1 -1
  138. package/es/ts-types/list-table/define/Composite-define.d.ts +2 -0
  139. package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
  140. package/es/ts-types/list-table/define/link-define.d.ts +4 -0
  141. package/es/ts-types/list-table/define/link-define.js.map +1 -1
  142. package/es/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -0
  143. package/es/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
  144. package/es/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -0
  145. package/es/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
  146. package/es/ts-types/pivot-table/indicator/link-indicator.d.ts +4 -0
  147. package/es/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
  148. package/es/ts-types/table-engine.d.ts +1 -0
  149. package/es/ts-types/table-engine.js.map +1 -1
  150. package/es/ts-types/theme.d.ts +3 -0
  151. package/es/ts-types/theme.js.map +1 -1
  152. package/es/vrender.js.map +1 -1
  153. package/package.json +6 -6
package/dist/vtable.js CHANGED
@@ -29244,6 +29244,12 @@
29244
29244
  },
29245
29245
  get barToSide() {
29246
29246
  return scroll.barToSide ?? false;
29247
+ },
29248
+ get horizontalPadding() {
29249
+ return scroll.horizontalPadding ?? 0;
29250
+ },
29251
+ get verticalPadding() {
29252
+ return scroll.verticalPadding ?? 0;
29247
29253
  }
29248
29254
  };
29249
29255
  }
@@ -29310,6 +29316,9 @@
29310
29316
  },
29311
29317
  get labelBackgroundCornerRadius() {
29312
29318
  return columnResize.labelBackgroundCornerRadius ?? 5;
29319
+ },
29320
+ get labelVisible() {
29321
+ return columnResize.labelVisible ?? true;
29313
29322
  }
29314
29323
  };
29315
29324
  }
@@ -34978,7 +34987,7 @@
34978
34987
  const createTextCellGroup = Factory.getFunction('createTextCellGroup');
34979
34988
  cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, null, true, cellTheme, range, isAsync);
34980
34989
  const createProgressBarCell = Factory.getFunction('createProgressBarCell');
34981
- const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table);
34990
+ const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table, range);
34982
34991
  if (cellGroup.firstChild) {
34983
34992
  cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);
34984
34993
  }
@@ -35002,8 +35011,6 @@
35002
35011
  }
35003
35012
  function updateCell$1(col, row, table, addNew, isShadow) {
35004
35013
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
35005
- const cellStyle = table._getCellStyle(col, row);
35006
- const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
35007
35014
  const cellLocation = table.getCellLocation(col, row);
35008
35015
  let value = table.getCellValue(col, row);
35009
35016
  let isMerge;
@@ -35057,13 +35064,15 @@
35057
35064
  value = vtableMergeName;
35058
35065
  }
35059
35066
  }
35067
+ const cellStyle = table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
35068
+ const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
35060
35069
  if (!cellTheme) {
35061
35070
  cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
35062
35071
  }
35063
35072
  cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
35064
35073
  if (!addNew &&
35065
35074
  !isMerge &&
35066
- !(define.customLayout || define.customRender || define.headerCustomLayout || define.headerCustomRender) &&
35075
+ !(define?.customLayout || define?.customRender || define?.headerCustomLayout || define?.headerCustomRender) &&
35067
35076
  canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table)) {
35068
35077
  const cellWidth = table.getColWidth(col);
35069
35078
  const cellHeight = table.getRowHeight(row);
@@ -36315,13 +36324,18 @@
36315
36324
  const value = scene.table.getCellValue(col, row);
36316
36325
  const dataValue = scene.table.getCellOriginValue(col, row);
36317
36326
  const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
36327
+ let range;
36328
+ if (columnDefine?.mergeCell) {
36329
+ range = scene.table.getCellRange(col, row);
36330
+ }
36318
36331
  const createProgressBarCell = Factory.getFunction('createProgressBarCell');
36319
- const newBarCell = createProgressBarCell(columnDefine, style, cell.attribute.width, value, dataValue, col, row, padding, scene.table);
36332
+ const newBarCell = createProgressBarCell(columnDefine, style, cell.attribute.width, value, dataValue, col, row, padding, scene.table, range);
36320
36333
  const oldBarCell = cell.getChildByName('progress-bar');
36321
36334
  cell.insertBefore(newBarCell, oldBarCell);
36322
36335
  cell.removeChild(oldBarCell);
36323
36336
  oldBarCell.removeAllChild();
36324
36337
  oldBarCell.release();
36338
+ updateMergeCellContentHeight(cell, distHeight, detaY, scene.table.isAutoRowHeight(row), true, scene.table);
36325
36339
  }
36326
36340
  else if (type === 'sparkline') {
36327
36341
  cell.removeAllChild();
@@ -36434,7 +36448,7 @@
36434
36448
  });
36435
36449
  });
36436
36450
  if (renderDefault) {
36437
- const style = table._getCellStyle(col, row);
36451
+ const style = table._getCellStyle(colStart, rowStart);
36438
36452
  updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
36439
36453
  }
36440
36454
  const rangeHeight = table.getRowHeight(row);
@@ -36649,13 +36663,19 @@
36649
36663
  const value = scene.table.getCellValue(col, row);
36650
36664
  const dataValue = scene.table.getCellOriginValue(col, row);
36651
36665
  const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
36666
+ let range;
36667
+ if (columnDefine?.mergeCell) {
36668
+ range = scene.table.getCellRange(col, row);
36669
+ }
36652
36670
  const createProgressBarCell = Factory.getFunction('createProgressBarCell');
36653
- const newBarCell = createProgressBarCell(columnDefine, style, cellGroup.attribute.width, value, dataValue, col, row, padding, scene.table);
36671
+ const newBarCell = createProgressBarCell(columnDefine, style, cellGroup.attribute.width, value, dataValue, col, row, padding, scene.table, range);
36654
36672
  const oldBarCell = cellGroup.getChildByName('progress-bar');
36655
36673
  cellGroup.insertBefore(newBarCell, oldBarCell);
36656
36674
  cellGroup.removeChild(oldBarCell);
36657
36675
  oldBarCell.removeAllChild();
36658
36676
  oldBarCell.release();
36677
+ const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);
36678
+ isHeightChange = isHeightChange || cellChange;
36659
36679
  }
36660
36680
  else if (type === 'sparkline') {
36661
36681
  cellGroup.removeAllChild();
@@ -36796,7 +36816,7 @@
36796
36816
  });
36797
36817
  let changed = false;
36798
36818
  if (renderDefault) {
36799
- const style = table._getCellStyle(col, row);
36819
+ const style = table._getCellStyle(colStart, rowStart);
36800
36820
  const padding = getQuadProps(style.padding);
36801
36821
  const textAlign = style.textAlign;
36802
36822
  const textBaseline = style.textBaseline;
@@ -37364,6 +37384,7 @@
37364
37384
  rightFrozenShadowLine;
37365
37385
  drillIcon;
37366
37386
  cellMover;
37387
+ labelVisible;
37367
37388
  constructor(table) {
37368
37389
  this.table = table;
37369
37390
  const theme = this.table.theme;
@@ -37372,11 +37393,13 @@
37372
37393
  const columnResizeWidth = theme.columnResize?.lineWidth;
37373
37394
  const columnResizeBgColor = theme.columnResize?.bgColor;
37374
37395
  const columnResizeBgWidth = theme.columnResize?.width;
37396
+ const labelVisible = theme.columnResize?.labelVisible ?? true;
37375
37397
  const labelColor = theme.columnResize?.labelColor;
37376
37398
  const labelFontSize = theme.columnResize?.labelFontSize;
37377
37399
  const labelFontFamily = theme.columnResize?.labelFontFamily;
37378
37400
  const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;
37379
37401
  const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;
37402
+ this.labelVisible = labelVisible;
37380
37403
  this.columnResizeLine = createLine({
37381
37404
  visible: false,
37382
37405
  pickable: false,
@@ -37564,6 +37587,8 @@
37564
37587
  const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
37565
37588
  const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
37566
37589
  const width = theme.scrollStyle?.width;
37590
+ const horizontalPadding = theme.scrollStyle?.horizontalPadding;
37591
+ const verticalPadding = theme.scrollStyle?.verticalPadding;
37567
37592
  let sliderStyle;
37568
37593
  if (isValid$3(scrollSliderCornerRadius)) {
37569
37594
  sliderStyle = {
@@ -37582,7 +37607,7 @@
37582
37607
  y: -this.table.tableNoFrameHeight * 2,
37583
37608
  width: this.table.tableNoFrameWidth,
37584
37609
  height: width,
37585
- padding: 0,
37610
+ padding: horizontalPadding,
37586
37611
  railStyle: {
37587
37612
  fill: scrollRailColor
37588
37613
  },
@@ -37598,7 +37623,7 @@
37598
37623
  y: -this.table.tableNoFrameHeight * 2,
37599
37624
  width,
37600
37625
  height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),
37601
- padding: 0,
37626
+ padding: verticalPadding,
37602
37627
  railStyle: {
37603
37628
  fill: scrollRailColor
37604
37629
  },
@@ -37727,13 +37752,15 @@
37727
37752
  { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }
37728
37753
  ]
37729
37754
  });
37730
- this.columnResizeLabel.showAll();
37731
- this.columnResizeLabel.setAttributes({
37732
- visible: true,
37733
- x: colX,
37734
- y
37735
- });
37736
- this.columnResizeLabel.lastChild.setAttribute('text', `${this.table.getColWidth(col)}px`);
37755
+ if (this.labelVisible) {
37756
+ this.columnResizeLabel.showAll();
37757
+ this.columnResizeLabel.setAttributes({
37758
+ visible: true,
37759
+ x: colX,
37760
+ y
37761
+ });
37762
+ this.columnResizeLabel.lastChild.setAttribute('text', `${this.table.getColWidth(col)}px`);
37763
+ }
37737
37764
  }
37738
37765
  updateResizeCol(col, y, isRightFrozen) {
37739
37766
  const colX = getColX(col, this.table, isRightFrozen);
@@ -37751,11 +37778,13 @@
37751
37778
  { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }
37752
37779
  ]
37753
37780
  });
37754
- this.columnResizeLabel.setAttributes({
37755
- x: colX,
37756
- y
37757
- });
37758
- this.columnResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);
37781
+ if (this.labelVisible) {
37782
+ this.columnResizeLabel.setAttributes({
37783
+ x: colX,
37784
+ y
37785
+ });
37786
+ this.columnResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);
37787
+ }
37759
37788
  }
37760
37789
  hideResizeRow() {
37761
37790
  this.rowResizeLine.setAttribute('visible', false);
@@ -37781,13 +37810,15 @@
37781
37810
  { y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
37782
37811
  ]
37783
37812
  });
37784
- this.rowResizeLabel.showAll();
37785
- this.rowResizeLabel.setAttributes({
37786
- visible: true,
37787
- y: rowY,
37788
- x
37789
- });
37790
- this.rowResizeLabel.lastChild.setAttribute('text', `${this.table.getRowHeight(row)}px`);
37813
+ if (this.labelVisible) {
37814
+ this.rowResizeLabel.showAll();
37815
+ this.rowResizeLabel.setAttributes({
37816
+ visible: true,
37817
+ y: rowY,
37818
+ x
37819
+ });
37820
+ this.rowResizeLabel.lastChild.setAttribute('text', `${this.table.getRowHeight(row)}px`);
37821
+ }
37791
37822
  }
37792
37823
  updateResizeRow(row, x, isBottomFrozen) {
37793
37824
  const rowY = getRowY(row, this.table, isBottomFrozen);
@@ -37805,11 +37836,13 @@
37805
37836
  { y: 0, x: this.table.getColsWidth(0, this.table.colCount - 1) }
37806
37837
  ]
37807
37838
  });
37808
- this.rowResizeLabel.setAttributes({
37809
- y: rowY,
37810
- x
37811
- });
37812
- this.rowResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getRowHeight(row))}px`);
37839
+ if (this.labelVisible) {
37840
+ this.rowResizeLabel.setAttributes({
37841
+ y: rowY,
37842
+ x
37843
+ });
37844
+ this.rowResizeLabel.lastChild.setAttribute('text', `${Math.floor(this.table.getRowHeight(row))}px`);
37845
+ }
37813
37846
  }
37814
37847
  hideMoveCol() {
37815
37848
  this.cellMover.hide();
@@ -37914,6 +37947,8 @@
37914
37947
  const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
37915
37948
  const scrollSliderCornerRadius = theme.scrollStyle?.scrollSliderCornerRadius;
37916
37949
  const width = theme.scrollStyle?.width;
37950
+ const horizontalPadding = theme.scrollStyle?.horizontalPadding;
37951
+ const verticalPadding = theme.scrollStyle?.verticalPadding;
37917
37952
  let sliderStyle;
37918
37953
  if (isValid$3(scrollSliderCornerRadius)) {
37919
37954
  sliderStyle = {
@@ -37928,6 +37963,7 @@
37928
37963
  }
37929
37964
  this.hScrollBar.setAttributes({
37930
37965
  height: width,
37966
+ padding: horizontalPadding,
37931
37967
  railStyle: {
37932
37968
  fill: scrollRailColor
37933
37969
  },
@@ -37935,6 +37971,7 @@
37935
37971
  });
37936
37972
  this.vScrollBar.setAttributes({
37937
37973
  width,
37974
+ padding: verticalPadding,
37938
37975
  railStyle: {
37939
37976
  fill: scrollRailColor
37940
37977
  },
@@ -37957,6 +37994,8 @@
37957
37994
  const labelFontFamily = theme.columnResize?.labelFontFamily;
37958
37995
  const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;
37959
37996
  const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;
37997
+ const labelVisible = theme.columnResize?.labelVisible ?? true;
37998
+ this.labelVisible = labelVisible;
37960
37999
  this.columnResizeLabel.lastChild.setAttributes({
37961
38000
  fontSize: labelFontSize,
37962
38001
  fill: labelColor,
@@ -40624,6 +40663,9 @@
40624
40663
  colForDefine = range.start.col;
40625
40664
  rowForDefine = range.start.row;
40626
40665
  }
40666
+ if ((cellLocation === 'columnHeader' || cellLocation === 'cornerHeader') && row >= table.columnHeaderLevelCount) {
40667
+ cellLocation = 'body';
40668
+ }
40627
40669
  const define = cellLocation !== 'body'
40628
40670
  ? table.getHeaderDefine(colForDefine, rowForDefine)
40629
40671
  : table.getBodyColumnDefine(colForDefine, rowForDefine);
@@ -40653,7 +40695,7 @@
40653
40695
  value = vtableMergeName;
40654
40696
  }
40655
40697
  }
40656
- const cellStyle = customStyle || table._getCellStyle(col, row);
40698
+ const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
40657
40699
  const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
40658
40700
  cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
40659
40701
  cellTheme.group.width = colWidth;
@@ -45838,7 +45880,7 @@
45838
45880
  ? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
45839
45881
  : 0)
45840
45882
  : 0;
45841
- const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
45883
+ const rightX = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
45842
45884
  this.bottomFrozenGroup.hasChildNodes() &&
45843
45885
  this.bottomFrozenGroup.firstChild &&
45844
45886
  updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
@@ -47051,6 +47093,7 @@
47051
47093
  delete state.columnMove.colTarget;
47052
47094
  delete state.columnMove.rowTarget;
47053
47095
  state.table.scenegraph.component.hideMoveCol();
47096
+ state.table.scenegraph.updateNextFrame();
47054
47097
  return false;
47055
47098
  }
47056
47099
  }
@@ -48035,7 +48078,7 @@
48035
48078
  checkCellRangeInSelect(cellPosStart, cellPosEnd) {
48036
48079
  return checkMultiCellInSelect(cellPosStart, cellPosEnd, this.select.ranges, this.select.highlightScope);
48037
48080
  }
48038
- updateHoverIcon(col, row, target, cellGroup, event) {
48081
+ updateHoverIcon(col, row, target, cellGroup) {
48039
48082
  if (this.residentHoverIcon?.icon && target === this.residentHoverIcon?.icon) {
48040
48083
  return;
48041
48084
  }
@@ -48306,6 +48349,7 @@
48306
48349
  this.table.scenegraph.proxy.deltaY = 0;
48307
48350
  this.updateHoverPos(-1, -1);
48308
48351
  this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
48352
+ event: undefined,
48309
48353
  scrollTop: this.scroll.verticalBarPos,
48310
48354
  scrollLeft: this.scroll.horizontalBarPos,
48311
48355
  scrollHeight: this.table.theme.scrollStyle?.width,
@@ -48331,6 +48375,7 @@
48331
48375
  this.table.scenegraph.proxy.deltaX = 0;
48332
48376
  this.updateHoverPos(-1, -1);
48333
48377
  this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
48378
+ event: undefined,
48334
48379
  scrollTop: this.scroll.verticalBarPos,
48335
48380
  scrollLeft: this.scroll.horizontalBarPos,
48336
48381
  scrollHeight: this.table.theme.scrollStyle?.width,
@@ -48344,7 +48389,7 @@
48344
48389
  this.checkHorizontalScrollBarEnd();
48345
48390
  }
48346
48391
  }
48347
- setScrollTop(top) {
48392
+ setScrollTop(top, event) {
48348
48393
  const totalHeight = this.table.getAllRowsHeight();
48349
48394
  const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
48350
48395
  top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
@@ -48362,6 +48407,7 @@
48362
48407
  this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
48363
48408
  if (oldVerticalBarPos !== top) {
48364
48409
  this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
48410
+ event: event?.nativeEvent,
48365
48411
  scrollTop: this.scroll.verticalBarPos,
48366
48412
  scrollLeft: this.scroll.horizontalBarPos,
48367
48413
  scrollHeight: this.table.theme.scrollStyle?.width,
@@ -48374,7 +48420,7 @@
48374
48420
  this.checkVerticalScrollBarEnd();
48375
48421
  }
48376
48422
  }
48377
- setScrollLeft(left) {
48423
+ setScrollLeft(left, event) {
48378
48424
  this.table.scrollLeft;
48379
48425
  const totalWidth = this.table.getAllColsWidth();
48380
48426
  this.table.getFrozenColsWidth();
@@ -48394,6 +48440,7 @@
48394
48440
  this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
48395
48441
  if (oldHorizontalBarPos !== left) {
48396
48442
  this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
48443
+ event: event?.nativeEvent,
48397
48444
  scrollTop: this.scroll.verticalBarPos,
48398
48445
  scrollLeft: this.scroll.horizontalBarPos,
48399
48446
  scrollHeight: this.table.theme.scrollStyle?.width,
@@ -48727,7 +48774,9 @@
48727
48774
  else {
48728
48775
  return;
48729
48776
  }
48730
- window.open(url);
48777
+ const linkTarget = columnDefine.linkTarget;
48778
+ const linkWindowFeatures = columnDefine.linkWindowFeatures;
48779
+ window.open(url, linkTarget, linkWindowFeatures);
48731
48780
  }
48732
48781
  else if (cellType === 'image') {
48733
48782
  const { clickToPreview } = columnDefine;
@@ -48866,6 +48915,132 @@
48866
48915
  });
48867
48916
  }
48868
48917
 
48918
+ function handleWhell(event, state, isWheelEvent = true) {
48919
+ let { deltaX, deltaY } = event;
48920
+ if (event.shiftKey && event.deltaY) {
48921
+ deltaX = deltaY;
48922
+ deltaY = 0;
48923
+ }
48924
+ const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY(deltaX, deltaY, { horizontal: 1, vertical: 1 });
48925
+ if (optimizedDeltaX || optimizedDeltaY) {
48926
+ if (state.interactionState !== InteractionState.scrolling) {
48927
+ state.updateInteractionState(InteractionState.scrolling);
48928
+ }
48929
+ }
48930
+ if (optimizedDeltaX) {
48931
+ state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
48932
+ state.showHorizontalScrollBar(true);
48933
+ }
48934
+ if (optimizedDeltaY) {
48935
+ state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event);
48936
+ state.showVerticalScrollBar(true);
48937
+ }
48938
+ isWheelEvent && state.resetInteractionState();
48939
+ if (event.cancelable &&
48940
+ (state.table.internalProps.overscrollBehavior === 'none' ||
48941
+ (Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
48942
+ (Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
48943
+ event.preventDefault();
48944
+ }
48945
+ }
48946
+ function optimizeScrollXY(x, y, ratio) {
48947
+ const ANGLE = 2;
48948
+ const angle = Math.abs(x / y);
48949
+ const deltaX = angle <= 1 / ANGLE ? 0 : x;
48950
+ const deltaY = angle > ANGLE ? 0 : y;
48951
+ return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
48952
+ }
48953
+ function isVerticalScrollable(deltaY, state) {
48954
+ const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
48955
+ if (totalHeight === 0) {
48956
+ return false;
48957
+ }
48958
+ return !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
48959
+ }
48960
+ function isHorizontalScrollable(deltaX, state) {
48961
+ const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
48962
+ if (totalWidth === 0) {
48963
+ return false;
48964
+ }
48965
+ return !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
48966
+ }
48967
+ function isScrollToTop(deltaY, state) {
48968
+ const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
48969
+ return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
48970
+ }
48971
+ function isScrollToBottom(deltaY, state) {
48972
+ const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
48973
+ const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
48974
+ return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
48975
+ }
48976
+ function isScrollToLeft(deltaX, state) {
48977
+ const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
48978
+ return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
48979
+ }
48980
+ function isScrollToRight(deltaX, state) {
48981
+ const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
48982
+ const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
48983
+ return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
48984
+ }
48985
+ class InertiaScroll {
48986
+ friction;
48987
+ lastTime;
48988
+ speedX;
48989
+ speedY;
48990
+ stateManager;
48991
+ runingId;
48992
+ scrollHandle;
48993
+ constructor(stateManager) {
48994
+ this.stateManager = stateManager;
48995
+ }
48996
+ setScrollHandle(scrollHandle) {
48997
+ this.scrollHandle = scrollHandle;
48998
+ }
48999
+ startInertia(speedX, speedY, friction) {
49000
+ this.lastTime = Date.now();
49001
+ this.speedX = speedX;
49002
+ this.speedY = speedY;
49003
+ this.friction = friction;
49004
+ if (!this.runingId) {
49005
+ this.runingId = requestAnimationFrame(this.inertia.bind(this));
49006
+ }
49007
+ }
49008
+ inertia() {
49009
+ const now = Date.now();
49010
+ const dffTime = now - this.lastTime;
49011
+ let stopped = true;
49012
+ const f = Math.pow(this.friction, dffTime / 16);
49013
+ const newSpeedX = f * this.speedX;
49014
+ const newSpeedY = f * this.speedY;
49015
+ let dx = 0;
49016
+ let dy = 0;
49017
+ if (Math.abs(newSpeedX) > 0.05) {
49018
+ stopped = false;
49019
+ dx = ((this.speedX + newSpeedX) / 2) * dffTime;
49020
+ }
49021
+ if (Math.abs(newSpeedY) > 0.05) {
49022
+ stopped = false;
49023
+ dy = ((this.speedY + newSpeedY) / 2) * dffTime;
49024
+ }
49025
+ this.scrollHandle?.(dx, dy);
49026
+ if (stopped) {
49027
+ this.runingId = null;
49028
+ return;
49029
+ }
49030
+ this.lastTime = now;
49031
+ this.speedX = newSpeedX;
49032
+ this.speedY = newSpeedY;
49033
+ this.runingId = requestAnimationFrame(this.inertia.bind(this));
49034
+ }
49035
+ endInertia() {
49036
+ cancelAnimationFrame(this.runingId);
49037
+ this.runingId = null;
49038
+ }
49039
+ isInertiaScrolling() {
49040
+ return !!this.runingId;
49041
+ }
49042
+ }
49043
+
48869
49044
  function bindTableGroupListener(eventManager) {
48870
49045
  const table = eventManager.table;
48871
49046
  const stateManager = table.stateManager;
@@ -48889,7 +49064,7 @@
48889
49064
  eventManager.dealFillSelect(eventArgsSet, true);
48890
49065
  }
48891
49066
  else {
48892
- eventManager.dealTableSelect(eventArgsSet, true);
49067
+ table.options.select?.disableDragSelect || eventManager.dealTableSelect(eventArgsSet, true);
48893
49068
  }
48894
49069
  }
48895
49070
  return;
@@ -49569,6 +49744,12 @@
49569
49744
  table.fireListeners(TABLE_EVENT_TYPE.RADIO_STATE_CHANGE, cellsEvent);
49570
49745
  table.scenegraph.updateNextFrame();
49571
49746
  });
49747
+ table.scenegraph.stage.addEventListener('wheel', (e) => {
49748
+ table.editorManager?.completeEdit();
49749
+ if (table.eventManager._enableTableScroll) {
49750
+ handleWhell(e, stateManager);
49751
+ }
49752
+ });
49572
49753
  }
49573
49754
  function bindGesture(eventManager) {
49574
49755
  const table = eventManager.table;
@@ -49773,132 +49954,6 @@
49773
49954
  });
49774
49955
  }
49775
49956
 
49776
- function handleWhell(event, state, isWheelEvent = true) {
49777
- let { deltaX, deltaY } = event;
49778
- if (event.shiftKey && event.deltaY) {
49779
- deltaX = deltaY;
49780
- deltaY = 0;
49781
- }
49782
- const [optimizedDeltaX, optimizedDeltaY] = optimizeScrollXY(deltaX, deltaY, { horizontal: 1, vertical: 1 });
49783
- if (optimizedDeltaX || optimizedDeltaY) {
49784
- if (state.interactionState !== InteractionState.scrolling) {
49785
- state.updateInteractionState(InteractionState.scrolling);
49786
- }
49787
- }
49788
- if (optimizedDeltaX) {
49789
- state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
49790
- state.showHorizontalScrollBar(true);
49791
- }
49792
- if (optimizedDeltaY) {
49793
- state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
49794
- state.showVerticalScrollBar(true);
49795
- }
49796
- isWheelEvent && state.resetInteractionState();
49797
- if (event.cancelable &&
49798
- (state.table.internalProps.overscrollBehavior === 'none' ||
49799
- (Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
49800
- (Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
49801
- event.preventDefault();
49802
- }
49803
- }
49804
- function optimizeScrollXY(x, y, ratio) {
49805
- const ANGLE = 2;
49806
- const angle = Math.abs(x / y);
49807
- const deltaX = angle <= 1 / ANGLE ? 0 : x;
49808
- const deltaY = angle > ANGLE ? 0 : y;
49809
- return [Math.ceil(deltaX * (ratio.horizontal ?? 0)), Math.ceil(deltaY * (ratio.vertical ?? 0))];
49810
- }
49811
- function isVerticalScrollable(deltaY, state) {
49812
- const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
49813
- if (totalHeight === 0) {
49814
- return false;
49815
- }
49816
- return !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
49817
- }
49818
- function isHorizontalScrollable(deltaX, state) {
49819
- const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
49820
- if (totalWidth === 0) {
49821
- return false;
49822
- }
49823
- return !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
49824
- }
49825
- function isScrollToTop(deltaY, state) {
49826
- const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
49827
- return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
49828
- }
49829
- function isScrollToBottom(deltaY, state) {
49830
- const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
49831
- const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
49832
- return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
49833
- }
49834
- function isScrollToLeft(deltaX, state) {
49835
- const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
49836
- return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
49837
- }
49838
- function isScrollToRight(deltaX, state) {
49839
- const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
49840
- const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
49841
- return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
49842
- }
49843
- class InertiaScroll {
49844
- friction;
49845
- lastTime;
49846
- speedX;
49847
- speedY;
49848
- stateManager;
49849
- runingId;
49850
- scrollHandle;
49851
- constructor(stateManager) {
49852
- this.stateManager = stateManager;
49853
- }
49854
- setScrollHandle(scrollHandle) {
49855
- this.scrollHandle = scrollHandle;
49856
- }
49857
- startInertia(speedX, speedY, friction) {
49858
- this.lastTime = Date.now();
49859
- this.speedX = speedX;
49860
- this.speedY = speedY;
49861
- this.friction = friction;
49862
- if (!this.runingId) {
49863
- this.runingId = requestAnimationFrame(this.inertia.bind(this));
49864
- }
49865
- }
49866
- inertia() {
49867
- const now = Date.now();
49868
- const dffTime = now - this.lastTime;
49869
- let stopped = true;
49870
- const f = Math.pow(this.friction, dffTime / 16);
49871
- const newSpeedX = f * this.speedX;
49872
- const newSpeedY = f * this.speedY;
49873
- let dx = 0;
49874
- let dy = 0;
49875
- if (Math.abs(newSpeedX) > 0.05) {
49876
- stopped = false;
49877
- dx = ((this.speedX + newSpeedX) / 2) * dffTime;
49878
- }
49879
- if (Math.abs(newSpeedY) > 0.05) {
49880
- stopped = false;
49881
- dy = ((this.speedY + newSpeedY) / 2) * dffTime;
49882
- }
49883
- this.scrollHandle?.(dx, dy);
49884
- if (stopped) {
49885
- this.runingId = null;
49886
- return;
49887
- }
49888
- this.lastTime = now;
49889
- this.speedX = newSpeedX;
49890
- this.speedY = newSpeedY;
49891
- this.runingId = requestAnimationFrame(this.inertia.bind(this));
49892
- }
49893
- endInertia() {
49894
- cancelAnimationFrame(this.runingId);
49895
- this.runingId = null;
49896
- }
49897
- isInertiaScrolling() {
49898
- return !!this.runingId;
49899
- }
49900
- }
49901
-
49902
49957
  let defaultPixelRatio = 1;
49903
49958
  function getPixelRatio() {
49904
49959
  if (isNode) {
@@ -49921,12 +49976,6 @@
49921
49976
  handler.on(table.getElement(), 'blur', (e) => {
49922
49977
  eventManager.dealTableHover();
49923
49978
  });
49924
- handler.on(table.getElement(), 'wheel', (e) => {
49925
- table.editorManager?.completeEdit();
49926
- if (table.eventManager._enableTableScroll) {
49927
- handleWhell(e, stateManager);
49928
- }
49929
- });
49930
49979
  handler.on(table.getElement(), 'keydown', (e) => {
49931
49980
  if (e.key === 'a' && (e.ctrlKey || e.metaKey)) {
49932
49981
  if (table.keyboardOptions?.selectAllOnCtrlA) {
@@ -50922,7 +50971,7 @@
50922
50971
  dealIconHover(eventArgsSet) {
50923
50972
  const { eventArgs } = eventArgsSet;
50924
50973
  if (eventArgs) {
50925
- this.table.stateManager.updateHoverIcon(eventArgs.col, eventArgs.row, eventArgs.target, eventArgs.targetCell, eventArgs.event);
50974
+ this.table.stateManager.updateHoverIcon(eventArgs.col, eventArgs.row, eventArgs.target, eventArgs.targetCell);
50926
50975
  }
50927
50976
  else {
50928
50977
  this.table.stateManager.updateHoverIcon(-1, -1, undefined, undefined);
@@ -53645,29 +53694,38 @@
53645
53694
  function dealHeaderForTreeMode(hd, _headerCellIds, results, roots, row, totalLevel, show, dimensions, layoutMap) {
53646
53695
  const id = hd.id;
53647
53696
  const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === hd.dimensionKey);
53697
+ const indicatorInfo = layoutMap.indicatorsDefine?.find(indicator => {
53698
+ if (typeof indicator === 'string') {
53699
+ return false;
53700
+ }
53701
+ if (hd.indicatorKey) {
53702
+ return indicator.indicatorKey === hd.indicatorKey;
53703
+ }
53704
+ return indicator.title === hd.value;
53705
+ });
53648
53706
  const cell = {
53649
53707
  id,
53650
- title: hd.value,
53708
+ title: hd.value ?? indicatorInfo.title,
53651
53709
  field: hd.dimensionKey,
53652
- style: hd.level + 1 === totalLevel || typeof dimensionInfo?.headerStyle === 'function'
53653
- ? dimensionInfo?.headerStyle
53654
- : Object.assign({}, dimensionInfo?.headerStyle, { textAlign: 'left' }),
53655
- headerType: dimensionInfo?.headerType ?? 'text',
53656
- headerIcon: dimensionInfo?.headerIcon,
53710
+ style: hd.level + 1 === totalLevel || typeof (indicatorInfo ?? dimensionInfo)?.headerStyle === 'function'
53711
+ ? (indicatorInfo ?? dimensionInfo)?.headerStyle
53712
+ : Object.assign({}, (indicatorInfo ?? dimensionInfo)?.headerStyle, { textAlign: 'left' }),
53713
+ headerType: indicatorInfo?.headerType ?? dimensionInfo?.headerType ?? 'text',
53714
+ headerIcon: indicatorInfo?.headerIcon ?? dimensionInfo?.headerIcon,
53657
53715
  define: Object.assign(hd, {
53658
- linkJump: dimensionInfo?.linkJump,
53659
- linkDetect: dimensionInfo?.linkDetect,
53660
- templateLink: dimensionInfo?.templateLink,
53661
- keepAspectRatio: dimensionInfo?.keepAspectRatio ?? false,
53662
- imageAutoSizing: dimensionInfo?.imageAutoSizing,
53663
- headerCustomRender: dimensionInfo?.headerCustomRender,
53664
- headerCustomLayout: dimensionInfo?.headerCustomLayout,
53716
+ linkJump: (indicatorInfo ?? dimensionInfo)?.linkJump,
53717
+ linkDetect: (indicatorInfo ?? dimensionInfo)?.linkDetect,
53718
+ templateLink: (indicatorInfo ?? dimensionInfo)?.templateLink,
53719
+ keepAspectRatio: (indicatorInfo ?? dimensionInfo)?.keepAspectRatio ?? false,
53720
+ imageAutoSizing: (indicatorInfo ?? dimensionInfo)?.imageAutoSizing,
53721
+ headerCustomRender: (indicatorInfo ?? dimensionInfo)?.headerCustomRender,
53722
+ headerCustomLayout: (indicatorInfo ?? dimensionInfo)?.headerCustomLayout,
53665
53723
  dragHeader: dimensionInfo?.dragHeader,
53666
- disableHeaderHover: !!dimensionInfo?.disableHeaderHover,
53667
- disableHeaderSelect: !!dimensionInfo?.disableHeaderSelect
53724
+ disableHeaderHover: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderHover,
53725
+ disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect
53668
53726
  }),
53669
- fieldFormat: dimensionInfo?.headerFormat,
53670
- dropDownMenu: dimensionInfo?.dropDownMenu,
53727
+ fieldFormat: indicatorInfo?.headerFormat ?? dimensionInfo?.headerFormat,
53728
+ dropDownMenu: indicatorInfo?.dropDownMenu ?? dimensionInfo?.dropDownMenu,
53671
53729
  pivotInfo: {
53672
53730
  value: hd.value,
53673
53731
  dimensionKey: hd.dimensionKey,
@@ -53681,6 +53739,43 @@
53681
53739
  maxWidth: dimensionInfo?.maxWidth,
53682
53740
  parentCellId: roots[roots.length - 1]
53683
53741
  };
53742
+ if (indicatorInfo) {
53743
+ if (indicatorInfo.customRender) {
53744
+ hd.customRender = indicatorInfo.customRender;
53745
+ }
53746
+ if (!isValid$3(layoutMap._indicators?.find(indicator => indicator.indicatorKey === indicatorInfo.indicatorKey))) {
53747
+ layoutMap._indicators?.push({
53748
+ id: ++layoutMap.sharedVar.seqId,
53749
+ indicatorKey: indicatorInfo.indicatorKey,
53750
+ field: indicatorInfo.indicatorKey,
53751
+ fieldFormat: indicatorInfo?.format,
53752
+ cellType: indicatorInfo?.cellType ?? indicatorInfo?.columnType ?? 'text',
53753
+ chartModule: 'chartModule' in indicatorInfo ? indicatorInfo.chartModule : null,
53754
+ chartSpec: 'chartSpec' in indicatorInfo ? indicatorInfo.chartSpec : null,
53755
+ sparklineSpec: 'sparklineSpec' in indicatorInfo ? indicatorInfo.sparklineSpec : null,
53756
+ style: indicatorInfo?.style,
53757
+ icon: indicatorInfo?.icon,
53758
+ define: Object.assign({}, hd, indicatorInfo, {
53759
+ dragHeader: dimensionInfo?.dragHeader
53760
+ }),
53761
+ width: indicatorInfo?.width,
53762
+ minWidth: indicatorInfo?.minWidth,
53763
+ maxWidth: indicatorInfo?.maxWidth,
53764
+ disableColumnResize: indicatorInfo?.disableColumnResize
53765
+ });
53766
+ }
53767
+ }
53768
+ else if (hd.indicatorKey) {
53769
+ if (!isValid$3(layoutMap._indicators?.find(indicator => indicator.indicatorKey === hd.indicatorKey))) {
53770
+ layoutMap._indicators?.push({
53771
+ id: ++layoutMap.sharedVar.seqId,
53772
+ indicatorKey: hd.indicatorKey,
53773
+ field: hd.indicatorKey,
53774
+ cellType: 'text',
53775
+ define: Object.assign({}, hd)
53776
+ });
53777
+ }
53778
+ }
53684
53779
  results[id] = cell;
53685
53780
  layoutMap._headerObjects[id] = cell;
53686
53781
  _headerCellIds[row][layoutMap.colIndex] = id;
@@ -55172,7 +55267,7 @@
55172
55267
  return TABLE_EVENT_TYPE;
55173
55268
  }
55174
55269
  options;
55175
- version = "1.6.3-alpha.3";
55270
+ version = "1.6.3";
55176
55271
  pagination;
55177
55272
  id = `VTable${Date.now()}`;
55178
55273
  headerStyleCache;
@@ -55349,6 +55444,7 @@
55349
55444
  }
55350
55445
  }
55351
55446
  internalProps.tooltip = Object.assign({
55447
+ parentElement: this.getElement(),
55352
55448
  renderMode: 'html',
55353
55449
  isShowOverflowTextTooltip: false,
55354
55450
  confine: true
@@ -56559,6 +56655,7 @@
56559
56655
  }
56560
56656
  }
56561
56657
  internalProps.tooltip = Object.assign({
56658
+ parentElement: this.getElement(),
56562
56659
  renderMode: 'html',
56563
56660
  isShowOverflowTextTooltip: false,
56564
56661
  confine: true
@@ -56682,9 +56779,9 @@
56682
56779
  clearSelected() {
56683
56780
  this.stateManager.updateSelectPos(-1, -1);
56684
56781
  }
56685
- selectCell(col, row, isShift, isCtrl) {
56782
+ selectCell(col, row, isShift, isCtrl, makeSelectCellVisible = true) {
56686
56783
  const isHasSelected = !!this.stateManager.select.ranges?.length;
56687
- this.stateManager.updateSelectPos(col, row, isShift, isCtrl);
56784
+ this.stateManager.updateSelectPos(col, row, isShift, isCtrl, false, !makeSelectCellVisible);
56688
56785
  this.stateManager.endSelectCells(true, isHasSelected);
56689
56786
  }
56690
56787
  selectCells(cellRanges) {
@@ -60417,7 +60514,7 @@
60417
60514
  }
60418
60515
  getHeaderCellAddressByField(field) {
60419
60516
  const hd = this.headerObjects.find((col) => col && col.field === field);
60420
- return this.getHeaderCellAdressById(hd.id);
60517
+ return hd && this.getHeaderCellAdressById(hd.id);
60421
60518
  }
60422
60519
  getBody(col, _row) {
60423
60520
  if (this.isSeriesNumber(col, _row)) {
@@ -60437,7 +60534,7 @@
60437
60534
  }
60438
60535
  }
60439
60536
  else {
60440
- for (let col = 0; col < (this.colCount ?? 0); col++) {
60537
+ for (let col = this.leftRowSeriesNumberColumnCount; col < (this.colCount ?? 0); col++) {
60441
60538
  if (id === this._columns[col - this.leftRowSeriesNumberColumnCount].id) {
60442
60539
  return {
60443
60540
  start: { col, row: 0 },
@@ -60446,7 +60543,10 @@
60446
60543
  }
60447
60544
  }
60448
60545
  }
60449
- throw new Error(`can not found body layout @id=${id}`);
60546
+ return {
60547
+ start: { col: -1, row: -1 },
60548
+ end: { col: -1, row: -1 }
60549
+ };
60450
60550
  }
60451
60551
  getCellRange(col, row) {
60452
60552
  return getCellRange(col, row, this);
@@ -61251,7 +61351,7 @@
61251
61351
  if (order && field && order !== 'normal') {
61252
61352
  const sortFunc = table._getSortFuncFromHeaderOption(undefined, field);
61253
61353
  const hd = table.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
61254
- table.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
61354
+ hd && table.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
61255
61355
  }
61256
61356
  }
61257
61357
  }
@@ -61805,6 +61905,9 @@
61805
61905
  }
61806
61906
  getTableIndexByField(field) {
61807
61907
  const colObj = this.internalProps.layoutMap.columnObjects.find((col) => col.field === field);
61908
+ if (!colObj) {
61909
+ return -1;
61910
+ }
61808
61911
  const layoutRange = this.internalProps.layoutMap.getBodyLayoutRangeById(colObj.id);
61809
61912
  if (this.transpose) {
61810
61913
  return layoutRange.start.row;
@@ -61862,6 +61965,7 @@
61862
61965
  : options.header
61863
61966
  ? cloneDeepSpec(options.header, ['children'])
61864
61967
  : [];
61968
+ internalProps.enableTreeNodeMerge = options.enableTreeNodeMerge ?? isValid$3(options.groupBy) ?? false;
61865
61969
  this.internalProps.headerHelper.setTableColumnsEditor();
61866
61970
  this.transpose = options.transpose ?? false;
61867
61971
  this.refreshHeader();
@@ -62217,7 +62321,7 @@
62217
62321
  if (field && executeSort) {
62218
62322
  const sortFunc = this._getSortFuncFromHeaderOption(this.internalProps.columns, field);
62219
62323
  const hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
62220
- if (hd.define.sort !== false) {
62324
+ if (hd && hd.define.sort !== false) {
62221
62325
  this.dataSource.sort(hd.field, order, sortFunc);
62222
62326
  this.internalProps.layoutMap.clearCellRangeMap();
62223
62327
  this.internalProps.useOneRowHeightFillAll = false;
@@ -62313,7 +62417,7 @@
62313
62417
  if (order && field && order !== 'normal') {
62314
62418
  const sortFunc = this._getSortFuncFromHeaderOption(undefined, field);
62315
62419
  const hd = this.internalProps.layoutMap.headerObjectsIncludeHided.find((col) => col && col.field === field);
62316
- if (hd.define.sort !== false) {
62420
+ if (hd && hd.define.sort !== false) {
62317
62421
  this.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
62318
62422
  }
62319
62423
  }
@@ -65818,7 +65922,7 @@
65818
65922
  _bindToCell(table, col, row, position, referencePosition, confine, arrowMark) {
65819
65923
  const rootElement = this._rootElement;
65820
65924
  const rect = table.getCellRangeRelativeRect({ col, row });
65821
- const element = table.getElement();
65925
+ const element = table.internalProps.tooltip.parentElement;
65822
65926
  const containerWidth = table.internalProps.element.offsetWidth;
65823
65927
  const { width } = rect;
65824
65928
  if (rootElement) {
@@ -65864,7 +65968,8 @@
65864
65968
  getComputedPosition(table, col, row, position, referencePosition, confine, arrowMark) {
65865
65969
  const rootElement = this._rootElement;
65866
65970
  const rect = table.getCellRangeRelativeRect({ col, row });
65867
- const { width: containerWidth, height: containerHeight } = table.internalProps.element.getBoundingClientRect();
65971
+ const { x: parentX, y: parentY } = table.internalProps.tooltip.parentElement.getBoundingClientRect();
65972
+ const { width: containerWidth, height: containerHeight, x, y } = table.internalProps.element.getBoundingClientRect();
65868
65973
  const { width } = rect;
65869
65974
  let tooltipY;
65870
65975
  let tooltipX;
@@ -65951,8 +66056,8 @@
65951
66056
  }
65952
66057
  }
65953
66058
  return {
65954
- x: tooltipX,
65955
- y: tooltipY
66059
+ x: tooltipX + x - parentX,
66060
+ y: tooltipY + y - parentY
65956
66061
  };
65957
66062
  }
65958
66063
  removeStyleFromTriangle() {
@@ -67458,7 +67563,7 @@
67458
67563
  return cellGroup;
67459
67564
  }
67460
67565
 
67461
- function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table) {
67566
+ function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
67462
67567
  if (progressBarDefine.dependField) {
67463
67568
  dataValue = table.getCellOriginRecord(col, row)?.[progressBarDefine.dependField] ?? dataValue;
67464
67569
  }
@@ -67481,7 +67586,13 @@
67481
67586
  dataValue,
67482
67587
  cellHeaderPaths: undefined
67483
67588
  }) ?? progressBarDefine.min + 100;
67484
- const height = table.getRowHeight(row);
67589
+ let height = 0;
67590
+ if (range) {
67591
+ height = table.getRowsHeight(range.start.row, range.end.row);
67592
+ }
67593
+ else {
67594
+ height = table.getRowHeight(row);
67595
+ }
67485
67596
  let contentWidth = width;
67486
67597
  let contentHeight = height;
67487
67598
  let _contentOffset = 0;
@@ -69412,7 +69523,7 @@
69412
69523
  }
69413
69524
  getHeaderCellAddressByField(field) {
69414
69525
  const hd = this.headerObjects.find((col) => col && col.field === field);
69415
- return this.getHeaderCellAdressById(hd.id);
69526
+ return hd && this.getHeaderCellAdressById(hd.id);
69416
69527
  }
69417
69528
  getBody(_col, _row) {
69418
69529
  const cache = this.getBodyWidthCache(_col, _row);
@@ -70122,7 +70233,24 @@
70122
70233
  }
70123
70234
  });
70124
70235
  if (isCornerCell) {
70125
- if (this.cornerSetting.titleOnDimension === 'row') {
70236
+ if (this.cornerSetting.titleOnDimension === 'all' && this.indicatorsAsCol && colHeaderPaths.length === 0) {
70237
+ for (let i = 0; i < this.rowDimensionKeys.length; i++) {
70238
+ if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
70239
+ return { col: i + this.leftRowSeriesNumberColumnCount, row: this.columnHeaderLevelCount - 1 };
70240
+ }
70241
+ }
70242
+ }
70243
+ else if (this.cornerSetting.titleOnDimension === 'all' &&
70244
+ !this.indicatorsAsCol &&
70245
+ rowHeaderPaths.length === 0) {
70246
+ for (let i = 0; i < this.colDimensionKeys.length; i++) {
70247
+ if (colHeaderPaths[0]?.dimensionKey === this.colDimensionKeys[i]) {
70248
+ return { col: this.rowHeaderLevelCount - 1, row: i };
70249
+ }
70250
+ }
70251
+ }
70252
+ else if (this.cornerSetting.titleOnDimension === 'row' ||
70253
+ (this.cornerSetting.titleOnDimension === 'all' && !this.indicatorsAsCol)) {
70126
70254
  for (let i = 0; i < this.rowDimensionKeys.length; i++) {
70127
70255
  if (rowHeaderPaths[0]?.dimensionKey === this.rowDimensionKeys[i]) {
70128
70256
  return { col: i + this.leftRowSeriesNumberColumnCount, row: 0 };
@@ -72540,6 +72668,10 @@
72540
72668
  this.changedTree[flatRowKey][flatColKey] = [];
72541
72669
  this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
72542
72670
  }
72671
+ const cellAggregator = this.tree[flatRowKey][flatColKey][indicatorIndex];
72672
+ if (cellAggregator.records.length === 1) {
72673
+ cellAggregator.records[0][this.indicatorKeys[indicatorIndex]] = newValue;
72674
+ }
72543
72675
  }
72544
72676
  changeRecordFieldValue(fieldName, oldValue, value) {
72545
72677
  let isIndicatorName = false;
@@ -75670,7 +75802,7 @@
75670
75802
  }
75671
75803
 
75672
75804
  registerForVrender();
75673
- const version = "1.6.3-alpha.3";
75805
+ const version = "1.6.3";
75674
75806
  function getIcons() {
75675
75807
  return get$2();
75676
75808
  }