@visactor/vtable 0.17.9-alpha.8 → 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 (105) 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/tableHelper.d.ts +1 -0
  10. package/cjs/core/tableHelper.js +13 -2
  11. package/cjs/core/tableHelper.js.map +1 -1
  12. package/cjs/dataset/dataset.js +5 -5
  13. package/cjs/dataset/dataset.js.map +1 -1
  14. package/cjs/event/listener/table-group.js +3 -3
  15. package/cjs/event/listener/table-group.js.map +1 -1
  16. package/cjs/index.d.ts +1 -1
  17. package/cjs/index.js +1 -1
  18. package/cjs/index.js.map +1 -1
  19. package/cjs/layout/pivot-header-layout.js +2 -2
  20. package/cjs/layout/pivot-header-layout.js.map +1 -1
  21. package/cjs/render/jsx/index.d.ts +1 -2
  22. package/cjs/render/jsx/index.js.map +1 -1
  23. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +3 -2
  24. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  25. package/cjs/scenegraph/group-creater/cell-helper.js +9 -6
  26. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  27. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
  28. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  29. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -1
  30. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +2 -1
  32. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -1
  34. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  35. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -1
  36. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  37. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +2 -1
  38. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  39. package/cjs/scenegraph/group-creater/column-helper.js +1 -0
  40. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  41. package/cjs/scenegraph/group-creater/progress/proxy.js +1 -1
  42. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  43. package/cjs/scenegraph/scenegraph.js +5 -7
  44. package/cjs/scenegraph/scenegraph.js.map +1 -1
  45. package/cjs/scenegraph/style/frame-border.d.ts +3 -1
  46. package/cjs/scenegraph/style/frame-border.js +20 -2
  47. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  48. package/cjs/ts-types/events.d.ts +2 -3
  49. package/cjs/ts-types/events.js.map +1 -1
  50. package/cjs/ts-types/table-engine.d.ts +4 -0
  51. package/cjs/ts-types/table-engine.js.map +1 -1
  52. package/dist/vtable.js +211 -63
  53. package/dist/vtable.min.js +2 -2
  54. package/es/PivotChart.d.ts +1 -0
  55. package/es/PivotChart.js +24 -0
  56. package/es/PivotChart.js.map +1 -1
  57. package/es/components/tooltip/TooltipHandler.js +1 -2
  58. package/es/components/tooltip/TooltipHandler.js.map +1 -1
  59. package/es/core/BaseTable.d.ts +2 -2
  60. package/es/core/BaseTable.js +1 -1
  61. package/es/core/BaseTable.js.map +1 -1
  62. package/es/core/tableHelper.d.ts +1 -0
  63. package/es/core/tableHelper.js +11 -0
  64. package/es/core/tableHelper.js.map +1 -1
  65. package/es/dataset/dataset.js +5 -5
  66. package/es/dataset/dataset.js.map +1 -1
  67. package/es/event/listener/table-group.js +3 -3
  68. package/es/event/listener/table-group.js.map +1 -1
  69. package/es/index.d.ts +1 -1
  70. package/es/index.js +1 -1
  71. package/es/index.js.map +1 -1
  72. package/es/layout/pivot-header-layout.js +1 -1
  73. package/es/layout/pivot-header-layout.js.map +1 -1
  74. package/es/render/jsx/index.d.ts +1 -2
  75. package/es/render/jsx/index.js.map +1 -1
  76. package/es/scenegraph/graphic/contributions/group-contribution-render.js +3 -3
  77. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  78. package/es/scenegraph/group-creater/cell-helper.js +8 -6
  79. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  80. package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
  81. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  82. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -1
  83. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  84. package/es/scenegraph/group-creater/cell-type/image-cell.js +2 -1
  85. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  86. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -1
  87. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  88. package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -1
  89. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  90. package/es/scenegraph/group-creater/cell-type/video-cell.js +2 -1
  91. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  92. package/es/scenegraph/group-creater/column-helper.js +3 -2
  93. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  94. package/es/scenegraph/group-creater/progress/proxy.js +1 -1
  95. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  96. package/es/scenegraph/scenegraph.js +5 -4
  97. package/es/scenegraph/scenegraph.js.map +1 -1
  98. package/es/scenegraph/style/frame-border.d.ts +3 -1
  99. package/es/scenegraph/style/frame-border.js +17 -0
  100. package/es/scenegraph/style/frame-border.js.map +1 -1
  101. package/es/ts-types/events.d.ts +2 -3
  102. package/es/ts-types/events.js.map +1 -1
  103. package/es/ts-types/table-engine.d.ts +4 -0
  104. package/es/ts-types/table-engine.js.map +1 -1
  105. package/package.json +3 -3
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
  }
@@ -40324,7 +40427,7 @@
40324
40427
  let maxHeight = 0;
40325
40428
  for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
40326
40429
  const colGroup = this.table.scenegraph.getColGroup(col);
40327
- const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';
40430
+ const cellLocation = this.table.isPivotChart() ? 'rowHeader' : 'body';
40328
40431
  const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellLocation);
40329
40432
  maxHeight = Math.max(maxHeight, height);
40330
40433
  this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);
@@ -43892,20 +43995,20 @@
43892
43995
  this.bodyGroup.appendChild(this.bodyGroup.border);
43893
43996
  updateFrameBorderSize(this.bodyGroup);
43894
43997
  if (this.rowHeaderGroup.attribute.width === 0) {
43895
- updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [true, true, true, true]);
43998
+ updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle);
43896
43999
  }
43897
44000
  else {
43898
- updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [true, true, true, false]);
44001
+ updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle);
43899
44002
  }
43900
44003
  }
43901
44004
  if (this.colHeaderGroup.border) {
43902
44005
  this.colHeaderGroup.appendChild(this.colHeaderGroup.border);
43903
44006
  updateFrameBorderSize(this.colHeaderGroup);
43904
44007
  if (this.cornerHeaderGroup.attribute.width === 0) {
43905
- updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, [true, true, true, true]);
44008
+ updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle);
43906
44009
  }
43907
44010
  else {
43908
- updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, [true, true, true, false]);
44011
+ updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle);
43909
44012
  }
43910
44013
  }
43911
44014
  if (this.rowHeaderGroup.border) {
@@ -43916,6 +44019,7 @@
43916
44019
  this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border);
43917
44020
  updateFrameBorderSize(this.cornerHeaderGroup);
43918
44021
  }
44022
+ updateCornerRadius(this.table);
43919
44023
  }
43920
44024
  sortCell() {
43921
44025
  if (this.isPivot) ;
@@ -46349,7 +46453,7 @@
46349
46453
  if (!eventArgsSet?.eventArgs) {
46350
46454
  return;
46351
46455
  }
46352
- if (eventManager.touchSetTimeout || e.pointerType !== 'touch') {
46456
+ if (eventManager.touchSetTimeout) {
46353
46457
  if (e.pointerType === 'touch') {
46354
46458
  const eventArgsSet = getCellEventArgsSet(e);
46355
46459
  if (eventManager.touchSetTimeout) {
@@ -46359,34 +46463,34 @@
46359
46463
  eventManager.touchSetTimeout = undefined;
46360
46464
  }
46361
46465
  }
46362
- if (table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
46363
- const { col, row } = eventArgsSet.eventArgs;
46364
- const cellInfo = table.getCellInfo(col, row);
46365
- let icon;
46366
- let position;
46367
- if (eventArgsSet.eventArgs?.target) {
46368
- const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
46369
- if (iconInfo) {
46370
- icon = iconInfo.icon;
46371
- position = iconInfo.position;
46372
- }
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;
46373
46477
  }
46374
- const cellsEvent = {
46375
- ...cellInfo,
46376
- event: e.nativeEvent,
46377
- federatedEvent: e,
46378
- cells: [],
46379
- targetIcon: icon
46380
- ? {
46381
- name: icon.name,
46382
- position: position,
46383
- funcType: icon.attribute.funcType
46384
- }
46385
- : undefined,
46386
- target: eventArgsSet?.eventArgs?.target
46387
- };
46388
- table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
46389
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);
46390
46494
  }
46391
46495
  });
46392
46496
  table.scenegraph.stage.addEventListener('pointerdown', (e) => {
@@ -49068,11 +49172,6 @@
49068
49172
  return;
49069
49173
  }
49070
49174
  const { col, row } = e;
49071
- if (e.related) {
49072
- if (this._isBindCell(col, row)) {
49073
- return;
49074
- }
49075
- }
49076
49175
  let tooltipOption;
49077
49176
  const headerDescription = table.getHeaderDescription(col, row);
49078
49177
  if (headerDescription) {
@@ -49129,11 +49228,6 @@
49129
49228
  }
49130
49229
  });
49131
49230
  table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
49132
- if (e.related) {
49133
- if (this._isBindCell(e.related.col, e.related.row)) {
49134
- return;
49135
- }
49136
- }
49137
49231
  this._unbindFromCell();
49138
49232
  });
49139
49233
  table.on(TABLE_EVENT_TYPE.SELECTED_CELL, e => {
@@ -50206,7 +50300,7 @@
50206
50300
  return TABLE_EVENT_TYPE;
50207
50301
  }
50208
50302
  options;
50209
- version = "0.17.9-alpha.8";
50303
+ version = "0.17.9";
50210
50304
  pagination;
50211
50305
  id = `VTable${Date.now()}`;
50212
50306
  headerStyleCache;
@@ -56879,11 +56973,12 @@
56879
56973
  const rowDimension = rowHeaderPaths[i];
56880
56974
  for (let j = 0; j < rowArr.length; j++) {
56881
56975
  const dimension = rowArr[j];
56882
- if (((!isValid$1(rowDimension.indicatorKey) &&
56976
+ if ((!isValid$1(rowDimension.indicatorKey) &&
56883
56977
  dimension.dimensionKey === rowDimension.dimensionKey &&
56884
56978
  dimension.value === rowDimension.value) ||
56885
- (isValid$1(rowDimension.indicatorKey) && dimension.indicatorKey === rowDimension.indicatorKey)) &&
56886
- dimension.value === rowDimension.value) {
56979
+ (isValid$1(rowDimension.indicatorKey) &&
56980
+ dimension.indicatorKey === rowDimension.indicatorKey &&
56981
+ (!rowDimension.value || dimension.value === rowDimension.value))) {
56887
56982
  rowArr = dimension.children;
56888
56983
  if (needLowestLevel && !rowArr) {
56889
56984
  rowDimensionFinded = dimension;
@@ -57966,15 +58061,19 @@
57966
58061
  this.needSplitPositiveAndNegative = needSplitPositiveAndNegative ?? false;
57967
58062
  this.rowsIsTotal = new Array(this.rows?.length ?? 0).fill(false);
57968
58063
  this.colsIsTotal = new Array(this.columns?.length ?? 0).fill(false);
57969
- for (let i = 0, len = this.totals?.row?.subTotalsDimensions?.length; i < len; i++) {
57970
- const dimension = this.totals.row.subTotalsDimensions[i];
57971
- const dimensionIndex = this.rows.indexOf(dimension);
57972
- 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
+ }
57973
58070
  }
57974
- for (let i = 0, len = this.totals?.column?.subTotalsDimensions?.length; i < len; i++) {
57975
- const dimension = this.totals.column.subTotalsDimensions[i];
57976
- const dimensionIndex = this.columns.indexOf(dimension);
57977
- 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
+ }
57978
58077
  }
57979
58078
  this.setRecords(records);
57980
58079
  }
@@ -60493,6 +60592,55 @@
60493
60592
  }
60494
60593
  return null;
60495
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
+ }
60496
60644
  getChartInstance(cellHeaderPaths) {
60497
60645
  const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
60498
60646
  if (cellAddr) {
@@ -61125,7 +61273,7 @@
61125
61273
  return new Tag$1(params ? params.attribute : {});
61126
61274
  }
61127
61275
 
61128
- const version = "0.17.9-alpha.8";
61276
+ const version = "0.17.9";
61129
61277
  function getIcons() {
61130
61278
  return get$2();
61131
61279
  }