@visactor/vtable 0.17.9-alpha.7 → 0.17.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/cjs/PivotChart.d.ts +1 -0
  2. package/cjs/PivotChart.js +24 -0
  3. package/cjs/PivotChart.js.map +1 -1
  4. package/cjs/components/tooltip/TooltipHandler.js +1 -2
  5. package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
  6. package/cjs/core/BaseTable.d.ts +2 -2
  7. package/cjs/core/BaseTable.js +1 -1
  8. package/cjs/core/BaseTable.js.map +1 -1
  9. package/cjs/core/FouseInput.js +2 -1
  10. package/cjs/core/tableHelper.d.ts +1 -0
  11. package/cjs/core/tableHelper.js +13 -3
  12. package/cjs/core/tableHelper.js.map +1 -1
  13. package/cjs/dataset/dataset.js +5 -5
  14. package/cjs/dataset/dataset.js.map +1 -1
  15. package/cjs/event/listener/table-group.js +3 -3
  16. package/cjs/event/listener/table-group.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/layout/pivot-header-layout.js +2 -2
  21. package/cjs/layout/pivot-header-layout.js.map +1 -1
  22. package/cjs/layout/pivot-layout-helper.js +9 -3
  23. package/cjs/layout/pivot-layout-helper.js.map +1 -1
  24. package/cjs/render/jsx/index.d.ts +1 -2
  25. package/cjs/render/jsx/index.js.map +1 -1
  26. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +3 -2
  27. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  28. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
  29. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  30. package/cjs/scenegraph/group-creater/cell-helper.js +9 -6
  31. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  32. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
  33. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  34. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -1
  35. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +2 -1
  37. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  38. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -1
  39. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  40. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -1
  41. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  42. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +2 -1
  43. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/column-helper.js +1 -0
  45. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  46. package/cjs/scenegraph/group-creater/progress/proxy.js +1 -1
  47. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  48. package/cjs/scenegraph/scenegraph.js +5 -7
  49. package/cjs/scenegraph/scenegraph.js.map +1 -1
  50. package/cjs/scenegraph/style/frame-border.d.ts +3 -1
  51. package/cjs/scenegraph/style/frame-border.js +20 -2
  52. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  53. package/cjs/themes/BRIGHT.js +1 -2
  54. package/cjs/themes/DARK.js +2 -1
  55. package/cjs/ts-types/events.d.ts +2 -3
  56. package/cjs/ts-types/events.js.map +1 -1
  57. package/cjs/ts-types/table-engine.d.ts +4 -0
  58. package/cjs/ts-types/table-engine.js.map +1 -1
  59. package/dist/vtable.js +225 -65
  60. package/dist/vtable.min.js +2 -2
  61. package/es/PivotChart.d.ts +1 -0
  62. package/es/PivotChart.js +24 -0
  63. package/es/PivotChart.js.map +1 -1
  64. package/es/components/tooltip/TooltipHandler.js +1 -2
  65. package/es/components/tooltip/TooltipHandler.js.map +1 -1
  66. package/es/core/BaseTable.d.ts +2 -2
  67. package/es/core/BaseTable.js +1 -1
  68. package/es/core/BaseTable.js.map +1 -1
  69. package/es/core/FouseInput.js +2 -1
  70. package/es/core/tableHelper.d.ts +1 -0
  71. package/es/core/tableHelper.js +11 -1
  72. package/es/core/tableHelper.js.map +1 -1
  73. package/es/dataset/dataset.js +5 -5
  74. package/es/dataset/dataset.js.map +1 -1
  75. package/es/event/listener/table-group.js +3 -3
  76. package/es/event/listener/table-group.js.map +1 -1
  77. package/es/index.d.ts +1 -1
  78. package/es/index.js +1 -1
  79. package/es/index.js.map +1 -1
  80. package/es/layout/pivot-header-layout.js +1 -1
  81. package/es/layout/pivot-header-layout.js.map +1 -1
  82. package/es/layout/pivot-layout-helper.js +9 -3
  83. package/es/layout/pivot-layout-helper.js.map +1 -1
  84. package/es/render/jsx/index.d.ts +1 -2
  85. package/es/render/jsx/index.js.map +1 -1
  86. package/es/scenegraph/graphic/contributions/group-contribution-render.js +3 -3
  87. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  88. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
  89. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  90. package/es/scenegraph/group-creater/cell-helper.js +8 -6
  91. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  92. package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
  93. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  94. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -1
  95. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  96. package/es/scenegraph/group-creater/cell-type/image-cell.js +2 -1
  97. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  98. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -1
  99. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  100. package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -1
  101. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  102. package/es/scenegraph/group-creater/cell-type/video-cell.js +2 -1
  103. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  104. package/es/scenegraph/group-creater/column-helper.js +3 -2
  105. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  106. package/es/scenegraph/group-creater/progress/proxy.js +1 -1
  107. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  108. package/es/scenegraph/scenegraph.js +5 -4
  109. package/es/scenegraph/scenegraph.js.map +1 -1
  110. package/es/scenegraph/style/frame-border.d.ts +3 -1
  111. package/es/scenegraph/style/frame-border.js +17 -0
  112. package/es/scenegraph/style/frame-border.js.map +1 -1
  113. package/es/themes/BRIGHT.js +1 -2
  114. package/es/themes/DARK.js +2 -1
  115. package/es/ts-types/events.d.ts +2 -3
  116. package/es/ts-types/events.js.map +1 -1
  117. package/es/ts-types/table-engine.d.ts +4 -0
  118. package/es/ts-types/table-engine.js.map +1 -1
  119. package/package.json +5 -5
package/dist/vtable.js CHANGED
@@ -31767,6 +31767,24 @@
31767
31767
  }
31768
31768
  }
31769
31769
  }
31770
+ function getCellCornerRadius(col, row, table) {
31771
+ const tableCornerRadius = table.theme.frameStyle.cornerRadius;
31772
+ if (tableCornerRadius) {
31773
+ if (col === 0 && row === 0) {
31774
+ return [tableCornerRadius, 0, 0, 0];
31775
+ }
31776
+ else if (col === table.colCount - 1 && row === 0) {
31777
+ return [0, tableCornerRadius, 0, 0];
31778
+ }
31779
+ else if (col === 0 && row === table.rowCount - 1) {
31780
+ return [0, 0, 0, tableCornerRadius];
31781
+ }
31782
+ else if (col === table.colCount - 1 && row === table.rowCount - 1) {
31783
+ return [0, 0, tableCornerRadius, 0];
31784
+ }
31785
+ }
31786
+ return 0;
31787
+ }
31770
31788
 
31771
31789
  let Icon$1 = class Icon extends Image$2 {
31772
31790
  role;
@@ -32735,7 +32753,8 @@
32735
32753
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
32736
32754
  cursor: cellTheme?.group?.cursor ?? undefined,
32737
32755
  lineCap: 'square',
32738
- clip: true
32756
+ clip: true,
32757
+ cornerRadius: cellTheme.group.cornerRadius
32739
32758
  });
32740
32759
  cellGroup.role = 'cell';
32741
32760
  cellGroup.col = col;
@@ -33306,7 +33325,8 @@
33306
33325
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
33307
33326
  cursor: cellTheme?.group?.cursor ?? undefined,
33308
33327
  lineCap: 'square',
33309
- clip: true
33328
+ clip: true,
33329
+ cornerRadius: cellTheme.group.cornerRadius
33310
33330
  });
33311
33331
  cellGroup.role = 'cell';
33312
33332
  cellGroup.col = col;
@@ -33684,7 +33704,8 @@
33684
33704
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
33685
33705
  cursor: cellTheme?.group?.cursor ?? undefined,
33686
33706
  lineCap: 'square',
33687
- clip: true
33707
+ clip: true,
33708
+ cornerRadius: cellTheme.group.cornerRadius
33688
33709
  });
33689
33710
  cellGroup.role = 'cell';
33690
33711
  cellGroup.col = col;
@@ -34409,7 +34430,8 @@
34409
34430
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
34410
34431
  cursor: cellTheme?.group?.cursor ?? undefined,
34411
34432
  lineCap: 'square',
34412
- clip: true
34433
+ clip: true,
34434
+ cornerRadius: cellTheme.group.cornerRadius
34413
34435
  });
34414
34436
  cellGroup.role = 'cell';
34415
34437
  cellGroup.col = col;
@@ -34473,7 +34495,8 @@
34473
34495
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
34474
34496
  cursor: cellTheme?.group?.cursor ?? undefined,
34475
34497
  lineCap: 'square',
34476
- clip: true
34498
+ clip: true,
34499
+ cornerRadius: cellTheme.group.cornerRadius
34477
34500
  });
34478
34501
  cellGroup.role = 'cell';
34479
34502
  cellGroup.col = col;
@@ -34564,7 +34587,8 @@
34564
34587
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
34565
34588
  cursor: cellTheme?.group?.cursor ?? undefined,
34566
34589
  lineCap: 'square',
34567
- clip: true
34590
+ clip: true,
34591
+ cornerRadius: cellTheme.group.cornerRadius
34568
34592
  });
34569
34593
  cellGroup.role = 'cell';
34570
34594
  cellGroup.col = col;
@@ -34838,6 +34862,7 @@
34838
34862
  isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
34839
34863
  }
34840
34864
  let cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
34865
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
34841
34866
  if (!addNew && !isMerge && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {
34842
34867
  const cellWidth = table.getColWidth(col);
34843
34868
  const cellHeight = table.getRowHeight(row);
@@ -34850,6 +34875,7 @@
34850
34875
  strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
34851
34876
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
34852
34877
  cursor: cellTheme?.group?.cursor ?? undefined,
34878
+ cornerRadius: cellTheme?.group?.cornerRadius ?? 0,
34853
34879
  y: table.scenegraph.getCellGroupY(row)
34854
34880
  });
34855
34881
  const textMark = oldCellGroup.getChildByName('text');
@@ -34922,6 +34948,7 @@
34922
34948
  customStyle = customMergeStyle;
34923
34949
  if (customStyle) {
34924
34950
  cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;
34951
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
34925
34952
  }
34926
34953
  }
34927
34954
  }
@@ -35059,6 +35086,7 @@
35059
35086
  }
35060
35087
  const cellStyle = customStyle || table._getCellStyle(col, row);
35061
35088
  const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
35089
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
35062
35090
  cellTheme.group.width = colWidth;
35063
35091
  cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;
35064
35092
  if (cellTheme._vtable.padding) {
@@ -38116,6 +38144,76 @@
38116
38144
  });
38117
38145
  }
38118
38146
  }
38147
+ function updateCornerRadius(table) {
38148
+ if (!table.theme.frameStyle.cornerRadius) {
38149
+ return;
38150
+ }
38151
+ const cornerRadius = table.theme.frameStyle.cornerRadius;
38152
+ const { cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, bodyGroup, rightTopCornerGroup, leftBottomCornerGroup, rightBottomCornerGroup, rightFrozenGroup, bottomFrozenGroup } = table.scenegraph;
38153
+ cornerHeaderGroup.setAttribute('cornerRadius', 0);
38154
+ colHeaderGroup.setAttribute('cornerRadius', 0);
38155
+ rowHeaderGroup.setAttribute('cornerRadius', 0);
38156
+ bodyGroup.setAttribute('cornerRadius', 0);
38157
+ rightTopCornerGroup.setAttribute('cornerRadius', 0);
38158
+ leftBottomCornerGroup.setAttribute('cornerRadius', 0);
38159
+ rightBottomCornerGroup.setAttribute('cornerRadius', 0);
38160
+ rightFrozenGroup.setAttribute('cornerRadius', 0);
38161
+ bottomFrozenGroup.setAttribute('cornerRadius', 0);
38162
+ if (cornerHeaderGroup.attribute.width > 0 && cornerHeaderGroup.attribute.height > 0) {
38163
+ setCornerRadius(cornerHeaderGroup, [cornerRadius, 0, 0, 0]);
38164
+ }
38165
+ else if (colHeaderGroup.attribute.height > 0) {
38166
+ setCornerRadius(colHeaderGroup, [cornerRadius, 0, 0, 0]);
38167
+ }
38168
+ else if (rowHeaderGroup.attribute.width > 0) {
38169
+ setCornerRadius(rowHeaderGroup, [cornerRadius, 0, 0, 0]);
38170
+ }
38171
+ else {
38172
+ setCornerRadius(bodyGroup, [cornerRadius, 0, 0, 0]);
38173
+ }
38174
+ if (leftBottomCornerGroup.attribute.width > 0 && leftBottomCornerGroup.attribute.height > 0) {
38175
+ setCornerRadius(leftBottomCornerGroup, [0, 0, 0, cornerRadius]);
38176
+ }
38177
+ else if (bottomFrozenGroup.attribute.height > 0) {
38178
+ setCornerRadius(bottomFrozenGroup, [0, 0, 0, cornerRadius]);
38179
+ }
38180
+ else if (rowHeaderGroup.attribute.width > 0) {
38181
+ setCornerRadius(rowHeaderGroup, [0, 0, 0, cornerRadius]);
38182
+ }
38183
+ else {
38184
+ setCornerRadius(bodyGroup, [0, 0, 0, cornerRadius]);
38185
+ }
38186
+ if (rightTopCornerGroup.attribute.width > 0 && rightTopCornerGroup.attribute.height > 0) {
38187
+ setCornerRadius(rightTopCornerGroup, [0, cornerRadius, 0, 0]);
38188
+ }
38189
+ else if (colHeaderGroup.attribute.height > 0) {
38190
+ setCornerRadius(colHeaderGroup, [0, cornerRadius, 0, 0]);
38191
+ }
38192
+ else if (rightFrozenGroup.attribute.width > 0) {
38193
+ setCornerRadius(rightFrozenGroup, [0, cornerRadius, 0, 0]);
38194
+ }
38195
+ else {
38196
+ setCornerRadius(bodyGroup, [0, cornerRadius, 0, 0]);
38197
+ }
38198
+ if (rightBottomCornerGroup.attribute.width > 0 && rightBottomCornerGroup.attribute.height > 0) {
38199
+ setCornerRadius(rightBottomCornerGroup, [0, 0, cornerRadius, 0]);
38200
+ }
38201
+ else if (rightFrozenGroup.attribute.width > 0) {
38202
+ setCornerRadius(rightFrozenGroup, [0, 0, cornerRadius, 0]);
38203
+ }
38204
+ else if (bottomFrozenGroup.attribute.height > 0) {
38205
+ setCornerRadius(bottomFrozenGroup, [0, 0, cornerRadius, 0]);
38206
+ }
38207
+ else {
38208
+ setCornerRadius(bodyGroup, [0, 0, cornerRadius, 0]);
38209
+ }
38210
+ }
38211
+ function setCornerRadius(group, cornerRadius) {
38212
+ group.setAttribute('cornerRadius', cornerRadius);
38213
+ if (group.border) {
38214
+ group.border.setAttribute('cornerRadius', cornerRadius);
38215
+ }
38216
+ }
38119
38217
 
38120
38218
  /*! *****************************************************************************
38121
38219
  Copyright (c) Microsoft Corporation.
@@ -38779,7 +38877,7 @@
38779
38877
  useStyle = true;
38780
38878
  order = 0;
38781
38879
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
38782
- const { lineWidth = groupAttribute.lineWidth, stroke = groupAttribute.stroke, lineDash = groupAttribute.lineDash, strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor = groupAttribute.strokeArrayColor, notAdjustPos } = group.attribute;
38880
+ const { lineWidth = groupAttribute.lineWidth, stroke = groupAttribute.stroke, lineDash = groupAttribute.lineDash, strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor = groupAttribute.strokeArrayColor, notAdjustPos, cornerRadius = groupAttribute.cornerRadius } = group.attribute;
38783
38881
  const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;
38784
38882
  if (notAdjustPos !== true &&
38785
38883
  stroke &&
@@ -38792,7 +38890,12 @@
38792
38890
  context.beginPath();
38793
38891
  x = Math.floor(x) + 0.5;
38794
38892
  y = Math.floor(y) + 0.5;
38795
- context.rect(x, y, widthFroDraw, heightFroDraw);
38893
+ if (cornerRadius) {
38894
+ createRectPath(context, x, y, widthFroDraw, heightFroDraw, cornerRadius);
38895
+ }
38896
+ else {
38897
+ context.rect(x, y, widthFroDraw, heightFroDraw);
38898
+ }
38796
38899
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);
38797
38900
  context.stroke();
38798
38901
  }
@@ -38993,8 +39096,10 @@
38993
39096
  return;
38994
39097
  }
38995
39098
  if (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {
38996
- if ((typeof lineWidth === 'number' && lineWidth & 1) ||
38997
- (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))) {
39099
+ if (rect.name !== 'border-rect' &&
39100
+ rect.name !== 'table-border-rect' &&
39101
+ ((typeof lineWidth === 'number' && lineWidth & 1) ||
39102
+ (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1)))) {
38998
39103
  x = Math.floor(x) + 0.5;
38999
39104
  y = Math.floor(y) + 0.5;
39000
39105
  }
@@ -40322,7 +40427,7 @@
40322
40427
  let maxHeight = 0;
40323
40428
  for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
40324
40429
  const colGroup = this.table.scenegraph.getColGroup(col);
40325
- const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';
40430
+ const cellLocation = this.table.isPivotChart() ? 'rowHeader' : 'body';
40326
40431
  const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellLocation);
40327
40432
  maxHeight = Math.max(maxHeight, height);
40328
40433
  this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);
@@ -43890,20 +43995,20 @@
43890
43995
  this.bodyGroup.appendChild(this.bodyGroup.border);
43891
43996
  updateFrameBorderSize(this.bodyGroup);
43892
43997
  if (this.rowHeaderGroup.attribute.width === 0) {
43893
- updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [true, true, true, true]);
43998
+ updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle);
43894
43999
  }
43895
44000
  else {
43896
- updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [true, true, true, false]);
44001
+ updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle);
43897
44002
  }
43898
44003
  }
43899
44004
  if (this.colHeaderGroup.border) {
43900
44005
  this.colHeaderGroup.appendChild(this.colHeaderGroup.border);
43901
44006
  updateFrameBorderSize(this.colHeaderGroup);
43902
44007
  if (this.cornerHeaderGroup.attribute.width === 0) {
43903
- updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, [true, true, true, true]);
44008
+ updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle);
43904
44009
  }
43905
44010
  else {
43906
- updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, [true, true, true, false]);
44011
+ updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle);
43907
44012
  }
43908
44013
  }
43909
44014
  if (this.rowHeaderGroup.border) {
@@ -43914,6 +44019,7 @@
43914
44019
  this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border);
43915
44020
  updateFrameBorderSize(this.cornerHeaderGroup);
43916
44021
  }
44022
+ updateCornerRadius(this.table);
43917
44023
  }
43918
44024
  sortCell() {
43919
44025
  if (this.isPivot) ;
@@ -46347,7 +46453,7 @@
46347
46453
  if (!eventArgsSet?.eventArgs) {
46348
46454
  return;
46349
46455
  }
46350
- if (eventManager.touchSetTimeout || e.pointerType !== 'touch') {
46456
+ if (eventManager.touchSetTimeout) {
46351
46457
  if (e.pointerType === 'touch') {
46352
46458
  const eventArgsSet = getCellEventArgsSet(e);
46353
46459
  if (eventManager.touchSetTimeout) {
@@ -46357,34 +46463,34 @@
46357
46463
  eventManager.touchSetTimeout = undefined;
46358
46464
  }
46359
46465
  }
46360
- if (table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
46361
- const { col, row } = eventArgsSet.eventArgs;
46362
- const cellInfo = table.getCellInfo(col, row);
46363
- let icon;
46364
- let position;
46365
- if (eventArgsSet.eventArgs?.target) {
46366
- const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
46367
- if (iconInfo) {
46368
- icon = iconInfo.icon;
46369
- position = iconInfo.position;
46370
- }
46466
+ }
46467
+ if (!eventManager.touchMove && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
46468
+ const { col, row } = eventArgsSet.eventArgs;
46469
+ const cellInfo = table.getCellInfo(col, row);
46470
+ let icon;
46471
+ let position;
46472
+ if (eventArgsSet.eventArgs?.target) {
46473
+ const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
46474
+ if (iconInfo) {
46475
+ icon = iconInfo.icon;
46476
+ position = iconInfo.position;
46371
46477
  }
46372
- const cellsEvent = {
46373
- ...cellInfo,
46374
- event: e.nativeEvent,
46375
- federatedEvent: e,
46376
- cells: [],
46377
- targetIcon: icon
46378
- ? {
46379
- name: icon.name,
46380
- position: position,
46381
- funcType: icon.attribute.funcType
46382
- }
46383
- : undefined,
46384
- target: eventArgsSet?.eventArgs?.target
46385
- };
46386
- table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
46387
46478
  }
46479
+ const cellsEvent = {
46480
+ ...cellInfo,
46481
+ event: e.nativeEvent,
46482
+ federatedEvent: e,
46483
+ cells: [],
46484
+ targetIcon: icon
46485
+ ? {
46486
+ name: icon.name,
46487
+ position: position,
46488
+ funcType: icon.attribute.funcType
46489
+ }
46490
+ : undefined,
46491
+ target: eventArgsSet?.eventArgs?.target
46492
+ };
46493
+ table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
46388
46494
  }
46389
46495
  });
46390
46496
  table.scenegraph.stage.addEventListener('pointerdown', (e) => {
@@ -49066,11 +49172,6 @@
49066
49172
  return;
49067
49173
  }
49068
49174
  const { col, row } = e;
49069
- if (e.related) {
49070
- if (this._isBindCell(col, row)) {
49071
- return;
49072
- }
49073
- }
49074
49175
  let tooltipOption;
49075
49176
  const headerDescription = table.getHeaderDescription(col, row);
49076
49177
  if (headerDescription) {
@@ -49127,11 +49228,6 @@
49127
49228
  }
49128
49229
  });
49129
49230
  table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
49130
- if (e.related) {
49131
- if (this._isBindCell(e.related.col, e.related.row)) {
49132
- return;
49133
- }
49134
- }
49135
49231
  this._unbindFromCell();
49136
49232
  });
49137
49233
  table.on(TABLE_EVENT_TYPE.SELECTED_CELL, e => {
@@ -50204,7 +50300,7 @@
50204
50300
  return TABLE_EVENT_TYPE;
50205
50301
  }
50206
50302
  options;
50207
- version = "0.17.9-alpha.7";
50303
+ version = "0.17.9";
50208
50304
  pagination;
50209
50305
  id = `VTable${Date.now()}`;
50210
50306
  headerStyleCache;
@@ -54906,6 +55002,7 @@
54906
55002
  this.reset(tree);
54907
55003
  }
54908
55004
  reset(tree, updateTreeNode = false) {
55005
+ this.cache.clear();
54909
55006
  this.dimensionKeys = new NumberMap();
54910
55007
  this.tree.children = tree;
54911
55008
  this.setTreeNode(this.tree, 0, this.tree);
@@ -55019,6 +55116,15 @@
55019
55116
  const element = node.children[middle];
55020
55117
  if (cIndex >= element.startIndex && cIndex < element.startIndex + element.size) {
55021
55118
  this.cache.set(element.level, element);
55119
+ const deleteLevels = [];
55120
+ this.cache.forEach((node, key) => {
55121
+ if (key > element.level) {
55122
+ deleteLevels.push(key);
55123
+ }
55124
+ });
55125
+ deleteLevels.forEach(key => {
55126
+ this.cache.delete(key);
55127
+ });
55022
55128
  this.searchPath(cIndex, element, path, maxDeep);
55023
55129
  break;
55024
55130
  }
@@ -56867,11 +56973,12 @@
56867
56973
  const rowDimension = rowHeaderPaths[i];
56868
56974
  for (let j = 0; j < rowArr.length; j++) {
56869
56975
  const dimension = rowArr[j];
56870
- if (((!isValid$1(rowDimension.indicatorKey) &&
56976
+ if ((!isValid$1(rowDimension.indicatorKey) &&
56871
56977
  dimension.dimensionKey === rowDimension.dimensionKey &&
56872
56978
  dimension.value === rowDimension.value) ||
56873
- (isValid$1(rowDimension.indicatorKey) && dimension.indicatorKey === rowDimension.indicatorKey)) &&
56874
- dimension.value === rowDimension.value) {
56979
+ (isValid$1(rowDimension.indicatorKey) &&
56980
+ dimension.indicatorKey === rowDimension.indicatorKey &&
56981
+ (!rowDimension.value || dimension.value === rowDimension.value))) {
56875
56982
  rowArr = dimension.children;
56876
56983
  if (needLowestLevel && !rowArr) {
56877
56984
  rowDimensionFinded = dimension;
@@ -57954,15 +58061,19 @@
57954
58061
  this.needSplitPositiveAndNegative = needSplitPositiveAndNegative ?? false;
57955
58062
  this.rowsIsTotal = new Array(this.rows?.length ?? 0).fill(false);
57956
58063
  this.colsIsTotal = new Array(this.columns?.length ?? 0).fill(false);
57957
- for (let i = 0, len = this.totals?.row?.subTotalsDimensions?.length; i < len; i++) {
57958
- const dimension = this.totals.row.subTotalsDimensions[i];
57959
- const dimensionIndex = this.rows.indexOf(dimension);
57960
- this.rowsIsTotal[dimensionIndex] = true;
58064
+ if (this.totals?.row?.showSubTotals) {
58065
+ for (let i = 0, len = this.totals?.row?.subTotalsDimensions?.length; i < len; i++) {
58066
+ const dimension = this.totals.row.subTotalsDimensions[i];
58067
+ const dimensionIndex = this.rows.indexOf(dimension);
58068
+ this.rowsIsTotal[dimensionIndex] = true;
58069
+ }
57961
58070
  }
57962
- for (let i = 0, len = this.totals?.column?.subTotalsDimensions?.length; i < len; i++) {
57963
- const dimension = this.totals.column.subTotalsDimensions[i];
57964
- const dimensionIndex = this.columns.indexOf(dimension);
57965
- this.colsIsTotal[dimensionIndex] = true;
58071
+ if (this.totals?.column?.showSubTotals) {
58072
+ for (let i = 0, len = this.totals?.column?.subTotalsDimensions?.length; i < len; i++) {
58073
+ const dimension = this.totals.column.subTotalsDimensions[i];
58074
+ const dimensionIndex = this.columns.indexOf(dimension);
58075
+ this.colsIsTotal[dimensionIndex] = true;
58076
+ }
57966
58077
  }
57967
58078
  this.setRecords(records);
57968
58079
  }
@@ -60481,6 +60592,55 @@
60481
60592
  }
60482
60593
  return null;
60483
60594
  }
60595
+ getCellAddressByRecord(record) {
60596
+ const rowHeaderPaths = [];
60597
+ const colHeaderPaths = [];
60598
+ const recordKeyMapToIndicatorKeys = {};
60599
+ const indicatorRecordKeys = [];
60600
+ this.dataset.dataConfig.aggregationRules.forEach(aggregationRule => {
60601
+ if (typeof aggregationRule.field === 'string') {
60602
+ recordKeyMapToIndicatorKeys[aggregationRule.field] = aggregationRule.indicatorKey;
60603
+ indicatorRecordKeys.push(aggregationRule.field);
60604
+ }
60605
+ else {
60606
+ for (let i = 0; i < aggregationRule.field.length; i++) {
60607
+ recordKeyMapToIndicatorKeys[aggregationRule.field[i]] = aggregationRule.indicatorKey;
60608
+ indicatorRecordKeys.push(aggregationRule.field[i]);
60609
+ }
60610
+ }
60611
+ });
60612
+ for (const key in record) {
60613
+ if (this.dataset.rows.indexOf(key) >= 0) {
60614
+ rowHeaderPaths.push({
60615
+ dimensionKey: key,
60616
+ value: record[key]
60617
+ });
60618
+ }
60619
+ if (this.dataset.columns.indexOf(key) >= 0) {
60620
+ colHeaderPaths.push({
60621
+ dimensionKey: key,
60622
+ value: record[key]
60623
+ });
60624
+ }
60625
+ if (indicatorRecordKeys.indexOf(key) >= 0) {
60626
+ if (this.dataset.indicatorsAsCol) {
60627
+ colHeaderPaths.push({
60628
+ indicatorKey: recordKeyMapToIndicatorKeys[key]
60629
+ });
60630
+ }
60631
+ else {
60632
+ rowHeaderPaths.push({
60633
+ indicatorKey: recordKeyMapToIndicatorKeys[key]
60634
+ });
60635
+ }
60636
+ }
60637
+ }
60638
+ return this.getCellAddressByHeaderPaths({
60639
+ rowHeaderPaths,
60640
+ colHeaderPaths,
60641
+ cellLocation: 'body'
60642
+ });
60643
+ }
60484
60644
  getChartInstance(cellHeaderPaths) {
60485
60645
  const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
60486
60646
  if (cellAddr) {
@@ -61113,7 +61273,7 @@
61113
61273
  return new Tag$1(params ? params.attribute : {});
61114
61274
  }
61115
61275
 
61116
- const version = "0.17.9-alpha.7";
61276
+ const version = "0.17.9";
61117
61277
  function getIcons() {
61118
61278
  return get$2();
61119
61279
  }