@visactor/vtable 1.16.0-alpha.1 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/cjs/ListTable.js +2 -2
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/body-helper/body-helper.js +1 -1
  4. package/cjs/body-helper/style.js +1 -2
  5. package/cjs/core/BaseTable.js +3 -2
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/dataset/dataset-pivot-table.js +1 -2
  8. package/cjs/dataset/dataset.js +11 -11
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/dataset/flatDataToObject.js +2 -1
  11. package/cjs/event/event.js +4 -3
  12. package/cjs/event/event.js.map +1 -1
  13. package/cjs/event/listener/table-group.js +1 -0
  14. package/cjs/event/listener/table-group.js.map +1 -1
  15. package/cjs/event/media-click.js +21 -6
  16. package/cjs/event/media-click.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/index.js +1 -2
  21. package/cjs/layout/pivot-header-layout.js +35 -38
  22. package/cjs/layout/pivot-header-layout.js.map +1 -1
  23. package/cjs/layout/row-height-map.js +1 -1
  24. package/cjs/layout/simple-header-layout.js +2 -2
  25. package/cjs/layout/simple-header-layout.js.map +1 -1
  26. package/cjs/layout/tree-helper.js +1 -1
  27. package/cjs/plugins/custom-cell-style.js +1 -1
  28. package/cjs/plugins/icons.js +1 -1
  29. package/cjs/plugins/invert-highlight.js +1 -1
  30. package/cjs/plugins/list-tree-stick-cell.js +2 -1
  31. package/cjs/plugins/themes.js +1 -1
  32. package/cjs/scenegraph/group-creater/cell-helper.js +30 -14
  33. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  34. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +6 -3
  35. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +16 -2
  37. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  38. package/cjs/scenegraph/scenegraph.js +19 -8
  39. package/cjs/scenegraph/scenegraph.js.map +1 -1
  40. package/cjs/scenegraph/style/frame-border.js +4 -0
  41. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  42. package/cjs/scenegraph/utils/text-icon-layout.js +1 -0
  43. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  44. package/cjs/scenegraph/utils/text-measure.js +6 -2
  45. package/cjs/scenegraph/utils/text-measure.js.map +1 -1
  46. package/cjs/state/checkbox/checkbox.js +1 -1
  47. package/cjs/state/checkbox/checkbox.js.map +1 -1
  48. package/cjs/state/state.d.ts +1 -1
  49. package/cjs/state/state.js +4 -4
  50. package/cjs/state/state.js.map +1 -1
  51. package/cjs/themes/theme.js +4 -0
  52. package/cjs/themes/theme.js.map +1 -1
  53. package/cjs/ts-types/base-table.d.ts +1 -0
  54. package/cjs/ts-types/base-table.js.map +1 -1
  55. package/cjs/ts-types/dataset/aggregation.js +3 -1
  56. package/cjs/ts-types/dataset/aggregation.js.map +1 -1
  57. package/cjs/ts-types/list-table/define/link-define.d.ts +4 -4
  58. package/cjs/ts-types/list-table/define/link-define.js.map +1 -1
  59. package/cjs/ts-types/style-define.d.ts +1 -1
  60. package/cjs/ts-types/style-define.js.map +1 -1
  61. package/cjs/ts-types/table-engine.d.ts +2 -0
  62. package/cjs/ts-types/table-engine.js.map +1 -1
  63. package/cjs/ts-types/theme.d.ts +3 -2
  64. package/cjs/ts-types/theme.js.map +1 -1
  65. package/cjs/vrender.js.map +1 -1
  66. package/dist/vtable.js +202 -88
  67. package/dist/vtable.min.js +2 -2
  68. package/es/ListTable.js +2 -2
  69. package/es/ListTable.js.map +1 -1
  70. package/es/body-helper/body-helper.js +1 -1
  71. package/es/body-helper/style.js +1 -2
  72. package/es/core/BaseTable.js +3 -2
  73. package/es/core/BaseTable.js.map +1 -1
  74. package/es/dataset/dataset-pivot-table.js +1 -2
  75. package/es/dataset/dataset.js +11 -11
  76. package/es/dataset/dataset.js.map +1 -1
  77. package/es/dataset/flatDataToObject.js +2 -1
  78. package/es/event/event.js +4 -3
  79. package/es/event/event.js.map +1 -1
  80. package/es/event/listener/table-group.js +1 -0
  81. package/es/event/listener/table-group.js.map +1 -1
  82. package/es/event/media-click.js +22 -5
  83. package/es/event/media-click.js.map +1 -1
  84. package/es/index.d.ts +1 -1
  85. package/es/index.js +1 -1
  86. package/es/index.js.map +1 -1
  87. package/es/layout/index.js +1 -2
  88. package/es/layout/pivot-header-layout.js +35 -38
  89. package/es/layout/pivot-header-layout.js.map +1 -1
  90. package/es/layout/row-height-map.js +1 -1
  91. package/es/layout/simple-header-layout.js +2 -2
  92. package/es/layout/simple-header-layout.js.map +1 -1
  93. package/es/layout/tree-helper.js +1 -1
  94. package/es/plugins/custom-cell-style.js +1 -1
  95. package/es/plugins/icons.js +1 -1
  96. package/es/plugins/invert-highlight.js +1 -1
  97. package/es/plugins/list-tree-stick-cell.js +2 -1
  98. package/es/plugins/themes.js +1 -1
  99. package/es/scenegraph/group-creater/cell-helper.js +30 -15
  100. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  101. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +6 -3
  102. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  103. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +17 -1
  104. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  105. package/es/scenegraph/scenegraph.js +13 -9
  106. package/es/scenegraph/scenegraph.js.map +1 -1
  107. package/es/scenegraph/style/frame-border.js +4 -0
  108. package/es/scenegraph/style/frame-border.js.map +1 -1
  109. package/es/scenegraph/utils/text-icon-layout.js +1 -0
  110. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  111. package/es/scenegraph/utils/text-measure.js +7 -3
  112. package/es/scenegraph/utils/text-measure.js.map +1 -1
  113. package/es/state/checkbox/checkbox.js +2 -2
  114. package/es/state/checkbox/checkbox.js.map +1 -1
  115. package/es/state/state.d.ts +1 -1
  116. package/es/state/state.js +4 -4
  117. package/es/state/state.js.map +1 -1
  118. package/es/themes/theme.js +4 -0
  119. package/es/themes/theme.js.map +1 -1
  120. package/es/ts-types/base-table.d.ts +1 -0
  121. package/es/ts-types/base-table.js.map +1 -1
  122. package/es/ts-types/dataset/aggregation.js +3 -1
  123. package/es/ts-types/dataset/aggregation.js.map +1 -1
  124. package/es/ts-types/list-table/define/link-define.d.ts +4 -4
  125. package/es/ts-types/list-table/define/link-define.js.map +1 -1
  126. package/es/ts-types/style-define.d.ts +1 -1
  127. package/es/ts-types/style-define.js.map +1 -1
  128. package/es/ts-types/table-engine.d.ts +2 -0
  129. package/es/ts-types/table-engine.js.map +1 -1
  130. package/es/ts-types/theme.d.ts +3 -2
  131. package/es/ts-types/theme.js.map +1 -1
  132. package/es/vrender.js.map +1 -1
  133. package/package.json +3 -3
package/dist/vtable.js CHANGED
@@ -26687,6 +26687,8 @@
26687
26687
  this.fieldValue = undefined;
26688
26688
  }
26689
26689
  recalculate() {
26690
+ this.fieldValue = undefined;
26691
+ this._formatedValue = undefined;
26690
26692
  }
26691
26693
  }
26692
26694
  class RecalculateAggregator extends Aggregator {
@@ -30229,6 +30231,9 @@
30229
30231
  },
30230
30232
  get labelVisible() {
30231
30233
  return columnResize.labelVisible ?? true;
30234
+ },
30235
+ get visibleOnHover() {
30236
+ return columnResize.visibleOnHover ?? false;
30232
30237
  }
30233
30238
  };
30234
30239
  }
@@ -36132,6 +36137,7 @@
36132
36137
  : autoRowHeight && !table.options.customConfig?.multilinesForXTable
36133
36138
  ? -1
36134
36139
  : cellHeight - Math.floor(padding[0] + padding[2]),
36140
+ pickable: false,
36135
36141
  dx: (textAlign === 'left' ? hierarchyOffset : 0) + _contentOffset,
36136
36142
  whiteSpace: table.options.customConfig?.limitContentHeight === false
36137
36143
  ? 'normal'
@@ -37121,10 +37127,19 @@
37121
37127
  if (type === 'text' || type === 'link' || customResult) {
37122
37128
  if (type === 'link') {
37123
37129
  const cellValue = value;
37130
+ const cellOriginValue = table.getCellOriginValue(col, row);
37124
37131
  const headerStyle = table._getCellStyle(col, row);
37125
37132
  if (type === 'link' &&
37126
37133
  (('templateLink' in define && define.templateLink) ||
37127
- !('linkDetect' in define && define.linkDetect) ||
37134
+ !('linkDetect' in define &&
37135
+ getOrApply(define.linkDetect, {
37136
+ col,
37137
+ row,
37138
+ table,
37139
+ value: cellValue,
37140
+ dataValue: cellOriginValue,
37141
+ cellHeaderPaths: undefined
37142
+ })) ||
37128
37143
  regUrl.test(cellValue))) {
37129
37144
  if (cellTheme) {
37130
37145
  cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);
@@ -37142,30 +37157,7 @@
37142
37157
  }
37143
37158
  }
37144
37159
  }
37145
- let customElementsGroup;
37146
- let renderDefault = true;
37147
- if (customResult) {
37148
- customElementsGroup = customResult.elementsGroup;
37149
- renderDefault = customResult.renderDefault;
37150
- }
37151
- else {
37152
- let customRender;
37153
- let customLayout;
37154
- const cellLocation = table.getCellLocation(col, row);
37155
- if (cellLocation !== 'body') {
37156
- customRender = define?.headerCustomRender;
37157
- customLayout = define?.headerCustomLayout;
37158
- }
37159
- else {
37160
- customRender = define?.customRender || table.customRender;
37161
- customLayout = define?.customLayout;
37162
- }
37163
- if (customLayout || customRender) {
37164
- const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, false, table.isAutoRowHeight(row), padding, range, table);
37165
- customElementsGroup = customResult.elementsGroup;
37166
- renderDefault = customResult.renderDefault;
37167
- }
37168
- }
37160
+ const { customElementsGroup, renderDefault } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult);
37169
37161
  const createTextCellGroup = Factory.getFunction('createTextCellGroup');
37170
37162
  cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync);
37171
37163
  const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
@@ -37201,10 +37193,11 @@
37201
37193
  cellGroup = createChartCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, value, define.chartModule, table.internalProps.layoutMap.getChartSpec(col, row), chartInstance, table.internalProps.layoutMap.getChartDataId(col, row) ?? 'data', table, cellTheme, table.internalProps.layoutMap.isShareChartSpec(col, row), isAsync, table.internalProps.layoutMap.isNoChartDataRenderNothing(col, row));
37202
37194
  }
37203
37195
  else if (type === 'progressbar') {
37196
+ const { customElementsGroup, renderDefault } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult);
37204
37197
  const style = table._getCellStyle(col, row);
37205
37198
  const dataValue = table.getCellOriginValue(col, row);
37206
37199
  const createTextCellGroup = Factory.getFunction('createTextCellGroup');
37207
- cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, null, true, cellTheme, range, isAsync);
37200
+ cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, customElementsGroup, renderDefault, cellTheme, range, isAsync);
37208
37201
  const createProgressBarCell = Factory.getFunction('createProgressBarCell');
37209
37202
  const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table, range);
37210
37203
  if (cellGroup.firstChild) {
@@ -37229,6 +37222,36 @@
37229
37222
  cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight;
37230
37223
  return cellGroup;
37231
37224
  }
37225
+ function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
37226
+ let customElementsGroup;
37227
+ let renderDefault = true;
37228
+ if (customResult) {
37229
+ customElementsGroup = customResult.elementsGroup;
37230
+ renderDefault = customResult.renderDefault;
37231
+ }
37232
+ else {
37233
+ let customRender;
37234
+ let customLayout;
37235
+ const cellLocation = table.getCellLocation(col, row);
37236
+ if (cellLocation !== 'body') {
37237
+ customRender = define?.headerCustomRender;
37238
+ customLayout = define?.headerCustomLayout;
37239
+ }
37240
+ else {
37241
+ customRender = define?.customRender || table.customRender;
37242
+ customLayout = define?.customLayout;
37243
+ }
37244
+ if (customLayout || customRender) {
37245
+ const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, false, table.isAutoRowHeight(row), padding, range, table);
37246
+ customElementsGroup = customResult.elementsGroup;
37247
+ renderDefault = customResult.renderDefault;
37248
+ }
37249
+ }
37250
+ return {
37251
+ customElementsGroup,
37252
+ renderDefault
37253
+ };
37254
+ }
37232
37255
  function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
37233
37256
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
37234
37257
  const cellLocation = table.getCellLocation(col, row);
@@ -37794,6 +37817,11 @@
37794
37817
  const { fontSize, fontFamily = 'Arial,sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
37795
37818
  const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle);
37796
37819
  const textMeasure = fastTextMeasure.measure(text, textMeasureMode);
37820
+ if (!isValid$3(textMeasure.fontBoundingBoxAscent) && !isValid$3(textMeasure.fontBoundingBoxDescent)) {
37821
+ const { ascent, descent } = this.measureTextBoundADscentEstimate(options);
37822
+ textMeasure.fontBoundingBoxAscent = ascent;
37823
+ textMeasure.fontBoundingBoxDescent = descent;
37824
+ }
37797
37825
  return textMeasure;
37798
37826
  }
37799
37827
  measureTextWidth(text, options) {
@@ -40595,6 +40623,10 @@
40595
40623
  ? group.border.attribute.strokeArrayWidth[3]
40596
40624
  : group.border.attribute.lineWidth ?? 0;
40597
40625
  group.border.setAttributes({
40626
+ borderLeft,
40627
+ borderTop,
40628
+ borderRight,
40629
+ borderBottom,
40598
40630
  width: group.attribute.width - borderLeft / 2 - borderRight / 2,
40599
40631
  height: group.attribute.height - borderTop / 2 - borderBottom / 2
40600
40632
  });
@@ -43799,7 +43831,13 @@
43799
43831
  return;
43800
43832
  }
43801
43833
  containerGroup.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
43802
- containerGroup.border?.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
43834
+ if (containerGroup.border) {
43835
+ const border = containerGroup.border;
43836
+ border.setAttribute('width', lastColGroup.attribute.x +
43837
+ lastColGroup.attribute.width -
43838
+ (border.attribute.borderLeft ?? 0) / 2 -
43839
+ (border.attribute.borderRight ?? 0) / 2);
43840
+ }
43803
43841
  }
43804
43842
 
43805
43843
  function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table, direction = 'up', part) {
@@ -44119,9 +44157,30 @@
44119
44157
  proxy.updateCellGroupContent(cellGroup);
44120
44158
  }
44121
44159
  }
44160
+ updateColumnContainerHeight(proxy.table.scenegraph.rowHeaderGroup);
44161
+ updateColumnContainerHeight(proxy.table.scenegraph.rightFrozenGroup);
44162
+ updateColumnContainerHeight(proxy.table.scenegraph.bodyGroup);
44122
44163
  proxy.table.scenegraph.updateNextFrame();
44123
44164
  return sync;
44124
44165
  }
44166
+ function updateColumnContainerHeight(containerGroup) {
44167
+ const lastColGroup = getLastChild(containerGroup);
44168
+ if (!lastColGroup) {
44169
+ return;
44170
+ }
44171
+ const lastCellGroup = getLastChild(lastColGroup);
44172
+ if (!lastCellGroup) {
44173
+ return;
44174
+ }
44175
+ containerGroup.setAttribute('height', lastCellGroup.attribute.y + lastCellGroup.attribute.height);
44176
+ if (containerGroup.border) {
44177
+ const border = containerGroup.border;
44178
+ border.setAttribute('height', lastCellGroup.attribute.y +
44179
+ lastCellGroup.attribute.height -
44180
+ (border.attribute.borderTop ?? 0) / 2 -
44181
+ (border.attribute.borderBottom ?? 0) / 2);
44182
+ }
44183
+ }
44125
44184
 
44126
44185
  async function sortVertical(proxy) {
44127
44186
  proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
@@ -49001,6 +49060,16 @@
49001
49060
  : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
49002
49061
  createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [true, true, true, false] : undefined);
49003
49062
  createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
49063
+ this.table.theme.cornerLeftBottomCellStyle?.frameStyle &&
49064
+ createFrameBorder(this.leftBottomCornerGroup, this.table.theme.cornerLeftBottomCellStyle.frameStyle, this.leftBottomCornerGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
49065
+ this.table.theme.bottomFrozenStyle?.frameStyle &&
49066
+ createFrameBorder(this.bottomFrozenGroup, this.table.theme.bottomFrozenStyle.frameStyle, this.bottomFrozenGroup.role, isListTableWithFrozen ? [true, true, true, false] : undefined);
49067
+ this.table.theme.rightFrozenStyle?.frameStyle &&
49068
+ createFrameBorder(this.rightFrozenGroup, this.table.theme.rightFrozenStyle.frameStyle, this.rightFrozenGroup.role, undefined);
49069
+ this.table.theme.cornerRightTopCellStyle?.frameStyle &&
49070
+ createFrameBorder(this.rightTopCornerGroup, this.table.theme.cornerRightTopCellStyle.frameStyle, this.rightTopCornerGroup.role, undefined);
49071
+ this.table.theme.cornerRightBottomCellStyle?.frameStyle &&
49072
+ createFrameBorder(this.rightBottomCornerGroup, this.table.theme.cornerRightBottomCellStyle.frameStyle, this.rightBottomCornerGroup.role, undefined);
49004
49073
  createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined);
49005
49074
  }
49006
49075
  getResizeColAt(abstractX, abstractY, cellGroup) {
@@ -49126,6 +49195,26 @@
49126
49195
  this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border);
49127
49196
  updateFrameBorderSize(this.cornerHeaderGroup);
49128
49197
  }
49198
+ if (this.leftBottomCornerGroup.border) {
49199
+ this.leftBottomCornerGroup.appendChild(this.leftBottomCornerGroup.border);
49200
+ updateFrameBorderSize(this.leftBottomCornerGroup);
49201
+ }
49202
+ if (this.bottomFrozenGroup.border) {
49203
+ this.bottomFrozenGroup.appendChild(this.bottomFrozenGroup.border);
49204
+ updateFrameBorderSize(this.bottomFrozenGroup);
49205
+ }
49206
+ if (this.rightFrozenGroup.border) {
49207
+ this.rightFrozenGroup.appendChild(this.rightFrozenGroup.border);
49208
+ updateFrameBorderSize(this.rightFrozenGroup);
49209
+ }
49210
+ if (this.rightTopCornerGroup.border) {
49211
+ this.rightTopCornerGroup.appendChild(this.rightTopCornerGroup.border);
49212
+ updateFrameBorderSize(this.rightTopCornerGroup);
49213
+ }
49214
+ if (this.rightBottomCornerGroup.border) {
49215
+ this.rightBottomCornerGroup.appendChild(this.rightBottomCornerGroup.border);
49216
+ updateFrameBorderSize(this.rightBottomCornerGroup);
49217
+ }
49129
49218
  updateCornerRadius(this.table);
49130
49219
  }
49131
49220
  sortCell() {
@@ -49144,19 +49233,7 @@
49144
49233
  if (text.attribute.moreThanMaxCharacters) {
49145
49234
  return this.table.getCellValue(col, row);
49146
49235
  }
49147
- const textAttributeStr = isArray$7(text.attribute.text)
49148
- ? text.attribute.text.join('')
49149
- : text.attribute.text;
49150
- let cacheStr = '';
49151
- if (isString$4(text.cache.clipedText)) {
49152
- cacheStr = text.cache.clipedText;
49153
- }
49154
- else {
49155
- text.cache.layoutData?.lines?.forEach((line) => {
49156
- cacheStr += line.str;
49157
- });
49158
- }
49159
- if (cacheStr !== textAttributeStr) {
49236
+ if (text.cliped) {
49160
49237
  return this.table.getCellValue(col, row);
49161
49238
  }
49162
49239
  }
@@ -50822,7 +50899,7 @@
50822
50899
  else {
50823
50900
  state.headerCheckedState[hd.field] = headerChecked;
50824
50901
  }
50825
- if (hd.define.cellType === 'checkbox' && !hd.fieldFormat) {
50902
+ if ((hd.define.cellType === 'checkbox' || isFunction$5(hd.define.cellType)) && !hd.fieldFormat) {
50826
50903
  state._checkboxCellTypeFields.push(hd.field);
50827
50904
  }
50828
50905
  }
@@ -52048,10 +52125,10 @@
52048
52125
  }
52049
52126
  }
52050
52127
  }
52051
- setDropDownMenuHighlight(cells) {
52052
- this.menu.dropDownMenuHighlight = cells;
52053
- for (let i = 0; i < cells.length; i++) {
52054
- const { col, row } = cells[i];
52128
+ setDropDownMenuHighlight(dropDownMenuInfo) {
52129
+ this.menu.dropDownMenuHighlight = dropDownMenuInfo;
52130
+ for (let i = 0; i < dropDownMenuInfo.length; i++) {
52131
+ const { col, row } = dropDownMenuInfo[i];
52055
52132
  const range = this.table.getCellRange(col, row);
52056
52133
  if (!range) {
52057
52134
  continue;
@@ -52326,16 +52403,32 @@
52326
52403
  const cellValue = table.getCellValue(col, row);
52327
52404
  const cellOriginValue = table.getCellOriginValue(col, row);
52328
52405
  if (cellType === 'link') {
52329
- const linkJump = columnDefine.linkJump !== false;
52406
+ let linkJump = getOrApply(columnDefine.linkJump, {
52407
+ col,
52408
+ row,
52409
+ table,
52410
+ value: cellValue,
52411
+ dataValue: cellOriginValue,
52412
+ cellHeaderPaths: undefined
52413
+ });
52414
+ linkJump = linkJump !== false;
52330
52415
  if (!linkJump) {
52331
52416
  return;
52332
52417
  }
52333
52418
  const templateLink = columnDefine.templateLink;
52334
- const linkDetect = columnDefine.linkDetect !== false;
52419
+ let linkDetect = getOrApply(columnDefine.linkDetect, {
52420
+ col,
52421
+ row,
52422
+ table,
52423
+ value: cellValue,
52424
+ dataValue: cellOriginValue,
52425
+ cellHeaderPaths: undefined
52426
+ });
52427
+ linkDetect = linkDetect !== false;
52335
52428
  let url;
52336
52429
  if (templateLink) {
52337
52430
  const rowData = table.getCellOriginRecord(col, row);
52338
- if (rowData.vtableMerge) {
52431
+ if (rowData && rowData.vtableMerge) {
52339
52432
  return;
52340
52433
  }
52341
52434
  const data = Object.assign({
@@ -52750,6 +52843,9 @@
52750
52843
  }
52751
52844
  eventManager.dealIconHover(eventArgsSet);
52752
52845
  eventManager.dealTableHover(eventArgsSet);
52846
+ if (table.theme.columnResize.visibleOnHover) {
52847
+ eventManager.checkColumnResize(eventArgsSet, true);
52848
+ }
52753
52849
  if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_CELL)) {
52754
52850
  let icon;
52755
52851
  let position;
@@ -54730,7 +54826,9 @@
54730
54826
  if (this.table.eventManager.checkCellFillhandle(eventArgsSet)) {
54731
54827
  this.table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});
54732
54828
  }
54733
- else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
54829
+ else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) &&
54830
+ resizeCol.col >= 0 &&
54831
+ !this.table.options.disableDblclickAutoResizeColWidth) {
54734
54832
  this.table.scenegraph.updateAutoColWidth(resizeCol.col);
54735
54833
  this.table.internalProps._widthResizedColMap.add(resizeCol.col);
54736
54834
  this.table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
@@ -54895,6 +54993,9 @@
54895
54993
  }
54896
54994
  return true;
54897
54995
  }
54996
+ if (this.table.stateManager.isResizeCol()) {
54997
+ this.table.stateManager.endResizeCol();
54998
+ }
54898
54999
  return false;
54899
55000
  }
54900
55001
  checkRowResize(eventArgsSet, update) {
@@ -59498,7 +59599,7 @@
59498
59599
  return TABLE_EVENT_TYPE;
59499
59600
  }
59500
59601
  options;
59501
- version = "1.16.0-alpha.1";
59602
+ version = "1.16.1";
59502
59603
  pagination;
59503
59604
  id = `VTable${Date.now()}`;
59504
59605
  headerStyleCache;
@@ -64438,7 +64539,9 @@
64438
64539
  }
64439
64540
  if (row < this.headerLevelCount) {
64440
64541
  return Object.assign({}, this.leftRowSeriesNumberColumn[col], {
64441
- style: this._table.internalProps.rowSeriesNumber.headerStyle
64542
+ style: Object.assign({}, this._table.transpose
64543
+ ? this._table.internalProps.theme.rowHeaderStyle
64544
+ : this._table.internalProps.theme.headerStyle, this._table.internalProps.rowSeriesNumber.headerStyle)
64442
64545
  });
64443
64546
  }
64444
64547
  }
@@ -66968,7 +67071,7 @@
66968
67071
  return null;
66969
67072
  }
66970
67073
  getHierarchyState(col, row) {
66971
- if (!this.options.groupBy) {
67074
+ if (!this.options.groupBy || (isArray$7(this.options.groupBy) && this.options.groupBy.length === 0)) {
66972
67075
  const define = this.getBodyColumnDefine(col, row);
66973
67076
  if (!define.tree) {
66974
67077
  return HierarchyState.none;
@@ -67134,7 +67237,8 @@
67134
67237
  this.stateManager.initLeftRecordsCheckState(this.records);
67135
67238
  }
67136
67239
  if (isValid$3(field)) {
67137
- let stateArr = this.stateManager.checkedState.values();
67240
+ const keys = Array.from(this.stateManager.checkedState.keys()).sort();
67241
+ let stateArr = keys.map(key => this.stateManager.checkedState.get(key));
67138
67242
  if (this.options.groupBy) {
67139
67243
  stateArr = getGroupCheckboxState(this);
67140
67244
  }
@@ -73717,15 +73821,19 @@
73717
73821
  }
73718
73822
  }
73719
73823
  _addCornerHeaders(colDimensionKeys, rowDimensionKeys, dimensions) {
73824
+ this._cornerHeaderCellFullPathIds = [];
73720
73825
  const results = [];
73826
+ const colLevelCount = this.columnHierarchyType === 'grid-tree'
73827
+ ? this._getColumnHeaderTreeExpandedMaxLevelCount() || this.columnHeaderLevelCount
73828
+ : this.columnHeaderLevelCount;
73829
+ const rowLevelCount = this.rowHierarchyType === 'grid-tree'
73830
+ ? this._getRowHeaderTreeExpandedMaxLevelCount() || this.rowHeaderLevelCount
73831
+ : this.rowHeaderLevelCount;
73721
73832
  if (this.cornerSetting.titleOnDimension === 'all') {
73722
73833
  if (this.indicatorsAsCol) {
73723
- let indicatorAtIndex = -1;
73724
73834
  if (colDimensionKeys) {
73725
- colDimensionKeys.forEach((dimensionKey, key) => {
73726
- if (dimensionKey === this.indicatorDimensionKey) {
73727
- indicatorAtIndex = key;
73728
- }
73835
+ for (let i = 0; i < colLevelCount; i++) {
73836
+ const dimensionKey = colDimensionKeys[i];
73729
73837
  const id = ++this.sharedVar.seqId;
73730
73838
  const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
73731
73839
  const cell = {
@@ -73763,16 +73871,17 @@
73763
73871
  };
73764
73872
  results[id] = cell;
73765
73873
  this._headerObjects[id] = cell;
73766
- if (!this._cornerHeaderCellFullPathIds[key]) {
73767
- this._cornerHeaderCellFullPathIds[key] = [];
73874
+ if (!this._cornerHeaderCellFullPathIds[i]) {
73875
+ this._cornerHeaderCellFullPathIds[i] = [];
73768
73876
  }
73769
- for (let r = 0; r < this.rowHeaderLevelCount; r++) {
73770
- this._cornerHeaderCellFullPathIds[key][r] = id;
73877
+ for (let r = 0; r < rowLevelCount; r++) {
73878
+ this._cornerHeaderCellFullPathIds[i][r] = id;
73771
73879
  }
73772
- });
73880
+ }
73773
73881
  }
73774
73882
  if (rowDimensionKeys) {
73775
- rowDimensionKeys.forEach((dimensionKey, key) => {
73883
+ for (let i = 0; i < rowLevelCount; i++) {
73884
+ const dimensionKey = rowDimensionKeys[i];
73776
73885
  const id = ++this.sharedVar.seqId;
73777
73886
  const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
73778
73887
  const cell = {
@@ -73810,20 +73919,17 @@
73810
73919
  };
73811
73920
  results[id] = cell;
73812
73921
  this._headerObjects[id] = cell;
73813
- if (!this._cornerHeaderCellFullPathIds[indicatorAtIndex]) {
73814
- this._cornerHeaderCellFullPathIds[indicatorAtIndex] = [];
73922
+ if (!this._cornerHeaderCellFullPathIds[this._cornerHeaderCellFullPathIds.length - 1]) {
73923
+ this._cornerHeaderCellFullPathIds[this._cornerHeaderCellFullPathIds.length - 1] = [];
73815
73924
  }
73816
- this._cornerHeaderCellFullPathIds[indicatorAtIndex][key] = id;
73817
- });
73925
+ this._cornerHeaderCellFullPathIds[this._cornerHeaderCellFullPathIds.length - 1][i] = id;
73926
+ }
73818
73927
  }
73819
73928
  }
73820
73929
  else {
73821
- let indicatorAtIndex = -1;
73822
73930
  if (rowDimensionKeys) {
73823
- rowDimensionKeys.forEach((dimensionKey, key) => {
73824
- if (dimensionKey === this.indicatorDimensionKey) {
73825
- indicatorAtIndex = key;
73826
- }
73931
+ for (let i = 0; i < rowLevelCount; i++) {
73932
+ const dimensionKey = rowDimensionKeys[i];
73827
73933
  const id = ++this.sharedVar.seqId;
73828
73934
  const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
73829
73935
  const cell = {
@@ -73861,16 +73967,17 @@
73861
73967
  };
73862
73968
  results[id] = cell;
73863
73969
  this._headerObjects[id] = cell;
73864
- for (let r = 0; r < this.columnHeaderLevelCount; r++) {
73970
+ for (let r = 0; r < colLevelCount; r++) {
73865
73971
  if (!this._cornerHeaderCellFullPathIds[r]) {
73866
73972
  this._cornerHeaderCellFullPathIds[r] = [];
73867
73973
  }
73868
- this._cornerHeaderCellFullPathIds[r][key] = id;
73974
+ this._cornerHeaderCellFullPathIds[r][i] = id;
73869
73975
  }
73870
- });
73976
+ }
73871
73977
  }
73872
73978
  if (colDimensionKeys) {
73873
- colDimensionKeys.forEach((dimensionKey, key) => {
73979
+ for (let c = 0; c < colLevelCount; c++) {
73980
+ const dimensionKey = colDimensionKeys[c];
73874
73981
  const id = ++this.sharedVar.seqId;
73875
73982
  const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
73876
73983
  const cell = {
@@ -73908,8 +74015,8 @@
73908
74015
  };
73909
74016
  results[id] = cell;
73910
74017
  this._headerObjects[id] = cell;
73911
- this._cornerHeaderCellFullPathIds[key][indicatorAtIndex] = id;
73912
- });
74018
+ this._cornerHeaderCellFullPathIds[c][this._cornerHeaderCellFullPathIds[c].length - 1] = id;
74019
+ }
73913
74020
  }
73914
74021
  }
73915
74022
  }
@@ -75002,6 +75109,7 @@
75002
75109
  else if (this.rowHierarchyType === 'grid-tree') {
75003
75110
  const startRow = 0;
75004
75111
  this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), true, this.rowsDefine, this.rowHeaderObjs, true);
75112
+ this.cornerHeaderObjs = this._addCornerHeaders(this.colDimensionKeys, this.rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine));
75005
75113
  }
75006
75114
  if (this.rowHeaderTitle) {
75007
75115
  const id = ++this.sharedVar.seqId;
@@ -75075,6 +75183,7 @@
75075
75183
  if (this.columnHierarchyType === 'grid-tree') {
75076
75184
  const startRow = 0;
75077
75185
  this._addHeadersForGridTreeMode(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnDimensionTree.totalLevel, this._getColumnHeaderTreeExpandedMaxLevelCount(), true, this.columnsDefine, this.columnHeaderObjs, false);
75186
+ this.cornerHeaderObjs = this._addCornerHeaders(this.colDimensionKeys, this.rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine));
75078
75187
  }
75079
75188
  if (this.columnHeaderTitle) {
75080
75189
  const id = ++this.sharedVar.seqId;
@@ -76197,7 +76306,7 @@
76197
76306
  if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && col < this.leftRowSeriesNumberColumnCount) {
76198
76307
  if (row < this.headerLevelCount) {
76199
76308
  return Object.assign({}, this.leftRowSeriesNumberColumn[col], {
76200
- style: this._table.internalProps.rowSeriesNumber.headerStyle
76309
+ style: Object.assign({}, this._table.internalProps.theme.cornerHeaderStyle, this._table.internalProps.rowSeriesNumber.headerStyle)
76201
76310
  });
76202
76311
  }
76203
76312
  }
@@ -76822,7 +76931,7 @@
76822
76931
  return this.rowsHasValue[index];
76823
76932
  }), this.indicatorsAsCol ? undefined : this.indicators, this.totals?.row?.showGrandTotals ||
76824
76933
  (!this.indicatorsAsCol && this.columns.length === 0) ||
76825
- (this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
76934
+ (this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.totals?.row?.showGrandTotalsOnTop ?? false);
76826
76935
  }
76827
76936
  else {
76828
76937
  this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows.filter((key, index) => {
@@ -77346,7 +77455,7 @@
77346
77455
  return this.rowsHasValue[index];
77347
77456
  }), this.indicatorsAsCol ? undefined : this.indicators, this.totals?.row?.showGrandTotals ||
77348
77457
  (!this.indicatorsAsCol && this.columns.length === 0) ||
77349
- (this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
77458
+ (this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.totals?.row?.showGrandTotalsOnTop ?? false);
77350
77459
  }
77351
77460
  else {
77352
77461
  this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows.filter((key, index) => {
@@ -77870,11 +77979,11 @@
77870
77979
  }
77871
77980
  }
77872
77981
  }
77873
- ArrToTree1(arr, rows, indicators, isGrandTotal, grandTotalLabel) {
77982
+ ArrToTree1(arr, rows, indicators, isGrandTotal, grandTotalLabel, showGrandTotalsOnTop) {
77874
77983
  const result = [];
77875
77984
  const concatStr = this.stringJoinChar;
77876
77985
  const map = new Map();
77877
- function addList(list) {
77986
+ function addList(list, isGrandTotal) {
77878
77987
  const path = [];
77879
77988
  let node;
77880
77989
  list.forEach((value, index) => {
@@ -77905,15 +78014,20 @@
77905
78014
  node.children.push(item);
77906
78015
  }
77907
78016
  else {
77908
- result.push(item);
78017
+ if (showGrandTotalsOnTop && isGrandTotal) {
78018
+ result.unshift(item);
78019
+ }
78020
+ else {
78021
+ result.push(item);
78022
+ }
77909
78023
  }
77910
78024
  }
77911
78025
  node = item;
77912
78026
  });
77913
78027
  }
77914
- arr.forEach(item => addList(item));
78028
+ arr.forEach(item => addList(item, false));
77915
78029
  if (isGrandTotal) {
77916
- addList([grandTotalLabel]);
78030
+ addList([grandTotalLabel], isGrandTotal);
77917
78031
  }
77918
78032
  return result;
77919
78033
  }
@@ -81458,7 +81572,7 @@
81458
81572
  }
81459
81573
 
81460
81574
  registerForVrender();
81461
- const version = "1.16.0-alpha.1";
81575
+ const version = "1.16.1";
81462
81576
  function getIcons() {
81463
81577
  return get$2();
81464
81578
  }