@visactor/vtable 1.10.3 → 1.10.4

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 (149) hide show
  1. package/cjs/ListTable.d.ts +1 -1
  2. package/cjs/ListTable.js +1 -1
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/body-helper.js +1 -1
  5. package/cjs/body-helper/style.js +2 -1
  6. package/cjs/components/legend/discrete-legend/discrete-legend.js +2 -2
  7. package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  8. package/cjs/components/menu/dom/logic/MenuElement.js +5 -3
  9. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  10. package/cjs/core/BaseTable.js +1 -1
  11. package/cjs/core/BaseTable.js.map +1 -1
  12. package/cjs/core/FouseInput.js +1 -2
  13. package/cjs/core/record-helper.js +1 -1
  14. package/cjs/core/record-helper.js.map +1 -1
  15. package/cjs/core/utils/get-cell-position.js +1 -1
  16. package/cjs/core/utils/get-cell-position.js.map +1 -1
  17. package/cjs/data/DataSource.d.ts +2 -2
  18. package/cjs/data/DataSource.js +5 -2
  19. package/cjs/data/DataSource.js.map +1 -1
  20. package/cjs/dataset/dataset-pivot-table.js +2 -1
  21. package/cjs/dataset/statistics-helper.js +0 -1
  22. package/cjs/event/event.js +12 -5
  23. package/cjs/event/event.js.map +1 -1
  24. package/cjs/event/listener/container-dom.js +5 -5
  25. package/cjs/event/listener/container-dom.js.map +1 -1
  26. package/cjs/event/listener/table-group.js +2 -2
  27. package/cjs/event/listener/table-group.js.map +1 -1
  28. package/cjs/index.d.ts +1 -1
  29. package/cjs/index.js +1 -1
  30. package/cjs/index.js.map +1 -1
  31. package/cjs/layout/chart-helper/get-axis-config.js +3 -3
  32. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  33. package/cjs/layout/chart-helper/get-chart-spec.d.ts +1 -0
  34. package/cjs/layout/chart-helper/get-chart-spec.js +23 -8
  35. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  36. package/cjs/layout/index.js +2 -1
  37. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  38. package/cjs/layout/pivot-header-layout.js +3 -0
  39. package/cjs/layout/pivot-header-layout.js.map +1 -1
  40. package/cjs/layout/simple-header-layout.d.ts +1 -0
  41. package/cjs/layout/simple-header-layout.js +6 -2
  42. package/cjs/layout/simple-header-layout.js.map +1 -1
  43. package/cjs/layout/tree-helper.js +3 -1
  44. package/cjs/layout/tree-helper.js.map +1 -1
  45. package/cjs/plugins/custom-cell-style.js +1 -1
  46. package/cjs/plugins/icons.js +1 -1
  47. package/cjs/scenegraph/group-creater/cell-helper.js +3 -3
  48. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  49. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  50. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +24 -23
  51. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  52. package/cjs/scenegraph/group-creater/column-helper.d.ts +1 -2
  53. package/cjs/scenegraph/group-creater/column-helper.js +4 -3
  54. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  55. package/cjs/scenegraph/group-creater/column.js +1 -1
  56. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  57. package/cjs/scenegraph/group-creater/progress/proxy.js +6 -6
  58. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  59. package/cjs/scenegraph/layout/update-height.js +3 -3
  60. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  61. package/cjs/scenegraph/layout/update-row.js +5 -1
  62. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  63. package/cjs/scenegraph/layout/update-width.js +5 -5
  64. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  65. package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -0
  66. package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
  67. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -0
  68. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  69. package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -0
  70. package/cjs/ts-types/pivot-table/indicator/chart-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/vrender.js.map +1 -1
  74. package/dist/vtable.js +144 -76
  75. package/dist/vtable.min.js +2 -2
  76. package/es/ListTable.d.ts +1 -1
  77. package/es/ListTable.js +1 -1
  78. package/es/ListTable.js.map +1 -1
  79. package/es/body-helper/body-helper.js +1 -1
  80. package/es/body-helper/style.js +2 -1
  81. package/es/components/legend/discrete-legend/discrete-legend.js +2 -2
  82. package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  83. package/es/components/menu/dom/logic/MenuElement.js +5 -3
  84. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  85. package/es/core/BaseTable.js +1 -1
  86. package/es/core/BaseTable.js.map +1 -1
  87. package/es/core/FouseInput.js +1 -2
  88. package/es/core/record-helper.js +1 -1
  89. package/es/core/record-helper.js.map +1 -1
  90. package/es/core/utils/get-cell-position.js +1 -1
  91. package/es/core/utils/get-cell-position.js.map +1 -1
  92. package/es/data/DataSource.d.ts +2 -2
  93. package/es/data/DataSource.js +5 -2
  94. package/es/data/DataSource.js.map +1 -1
  95. package/es/dataset/dataset-pivot-table.js +2 -1
  96. package/es/dataset/statistics-helper.js +1 -2
  97. package/es/event/event.js +12 -5
  98. package/es/event/event.js.map +1 -1
  99. package/es/event/listener/container-dom.js +5 -5
  100. package/es/event/listener/container-dom.js.map +1 -1
  101. package/es/event/listener/table-group.js +2 -1
  102. package/es/event/listener/table-group.js.map +1 -1
  103. package/es/index.d.ts +1 -1
  104. package/es/index.js +1 -1
  105. package/es/index.js.map +1 -1
  106. package/es/layout/chart-helper/get-axis-config.js +3 -3
  107. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  108. package/es/layout/chart-helper/get-chart-spec.d.ts +1 -0
  109. package/es/layout/chart-helper/get-chart-spec.js +18 -4
  110. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  111. package/es/layout/index.js +2 -1
  112. package/es/layout/pivot-header-layout.d.ts +1 -0
  113. package/es/layout/pivot-header-layout.js +4 -1
  114. package/es/layout/pivot-header-layout.js.map +1 -1
  115. package/es/layout/simple-header-layout.d.ts +1 -0
  116. package/es/layout/simple-header-layout.js +6 -2
  117. package/es/layout/simple-header-layout.js.map +1 -1
  118. package/es/layout/tree-helper.js +3 -1
  119. package/es/layout/tree-helper.js.map +1 -1
  120. package/es/plugins/custom-cell-style.js +1 -1
  121. package/es/plugins/icons.js +1 -1
  122. package/es/scenegraph/group-creater/cell-helper.js +3 -3
  123. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  124. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  125. package/es/scenegraph/group-creater/cell-type/chart-cell.js +24 -23
  126. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  127. package/es/scenegraph/group-creater/column-helper.d.ts +1 -2
  128. package/es/scenegraph/group-creater/column-helper.js +4 -3
  129. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  130. package/es/scenegraph/group-creater/column.js +1 -1
  131. package/es/scenegraph/group-creater/column.js.map +1 -1
  132. package/es/scenegraph/group-creater/progress/proxy.js +6 -3
  133. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  134. package/es/scenegraph/layout/update-height.js +3 -3
  135. package/es/scenegraph/layout/update-height.js.map +1 -1
  136. package/es/scenegraph/layout/update-row.js +4 -1
  137. package/es/scenegraph/layout/update-row.js.map +1 -1
  138. package/es/scenegraph/layout/update-width.js +5 -5
  139. package/es/scenegraph/layout/update-width.js.map +1 -1
  140. package/es/ts-types/list-table/define/chart-define.d.ts +1 -0
  141. package/es/ts-types/list-table/define/chart-define.js.map +1 -1
  142. package/es/ts-types/list-table/layout-map/api.d.ts +1 -0
  143. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  144. package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -0
  145. package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  146. package/es/ts-types/table-engine.d.ts +1 -0
  147. package/es/ts-types/table-engine.js.map +1 -1
  148. package/es/vrender.js.map +1 -1
  149. package/package.json +2 -2
package/dist/vtable.js CHANGED
@@ -30224,7 +30224,7 @@
30224
30224
  return EVENT_TYPE$1;
30225
30225
  }
30226
30226
  hasHierarchyStateExpand = false;
30227
- beforeChangedRecordsMap = [];
30227
+ beforeChangedRecordsMap = {};
30228
30228
  registedAggregators = {};
30229
30229
  rowHierarchyType;
30230
30230
  fieldAggregators = [];
@@ -30781,15 +30781,27 @@
30781
30781
  const realDeletedRecordIndexs = [];
30782
30782
  for (let index = 0; index < recordIndexs.length; index++) {
30783
30783
  const recordIndex = recordIndexs[index];
30784
- if (recordIndex >= this._sourceLength || recordIndex < 0) {
30785
- continue;
30784
+ if (Array.isArray(recordIndex)) {
30785
+ delete this.beforeChangedRecordsMap[recordIndex.join(',')];
30786
+ realDeletedRecordIndexs.push(recordIndex);
30787
+ recordIndex.slice(0, -1).reduce((acc, key) => {
30788
+ if (acc[key] === undefined) {
30789
+ acc[key] = {};
30790
+ }
30791
+ return acc[key].children;
30792
+ }, this.records)[recordIndex[recordIndex.length - 1]] = records[index];
30786
30793
  }
30787
- delete this.beforeChangedRecordsMap[recordIndex];
30788
- realDeletedRecordIndexs.push(recordIndex);
30789
- for (let i = 0; i < this.fieldAggregators.length; i++) {
30790
- this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
30794
+ else {
30795
+ if (recordIndex >= this._sourceLength || recordIndex < 0) {
30796
+ continue;
30797
+ }
30798
+ delete this.beforeChangedRecordsMap[recordIndex];
30799
+ realDeletedRecordIndexs.push(recordIndex);
30800
+ for (let i = 0; i < this.fieldAggregators.length; i++) {
30801
+ this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
30802
+ }
30803
+ this.records[recordIndex] = records[index];
30791
30804
  }
30792
- this.records[recordIndex] = records[index];
30793
30805
  }
30794
30806
  if (this.userPagination) {
30795
30807
  this.updatePagerData();
@@ -34993,7 +35005,7 @@
34993
35005
  else if (type === 'chart') {
34994
35006
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
34995
35007
  const createChartCellGroup = Factory.getFunction('createChartCellGroup');
34996
- 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);
35008
+ 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));
34997
35009
  }
34998
35010
  else if (type === 'progressbar') {
34999
35011
  const style = table._getCellStyle(col, row);
@@ -35164,8 +35176,8 @@
35164
35176
  const type = isVtableMerge || isCustomMerge
35165
35177
  ? 'text'
35166
35178
  : table.isHeader(col, row)
35167
- ? table._getHeaderLayoutMap(col, row).headerType
35168
- : table.getBodyColumnType(col, row);
35179
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
35180
+ : table.getBodyColumnType(col, row) ?? 'text';
35169
35181
  const padding = cellTheme._vtable.padding;
35170
35182
  const textAlign = cellTheme.text.textAlign;
35171
35183
  const textBaseline = cellTheme.text.textBaseline;
@@ -36362,8 +36374,8 @@
36362
36374
  const type = isVtableMerge || isCustomMerge
36363
36375
  ? 'text'
36364
36376
  : scene.table.isHeader(col, row)
36365
- ? scene.table._getHeaderLayoutMap(col, row).headerType
36366
- : scene.table.getBodyColumnType(col, row);
36377
+ ? scene.table._getHeaderLayoutMap(col, row).headerType ?? 'text'
36378
+ : scene.table.getBodyColumnType(col, row) ?? 'text';
36367
36379
  if (type === 'progressbar') {
36368
36380
  const columnDefine = scene.table.getBodyColumnDefine(col, row);
36369
36381
  const style = scene.table._getCellStyle(col, row);
@@ -36700,8 +36712,8 @@
36700
36712
  const type = isVtableMerge || isCustomMerge
36701
36713
  ? 'text'
36702
36714
  : scene.table.isHeader(col, row)
36703
- ? scene.table._getHeaderLayoutMap(col, row).headerType
36704
- : scene.table.getBodyColumnType(col, row);
36715
+ ? scene.table._getHeaderLayoutMap(col, row).headerType ?? 'text'
36716
+ : scene.table.getBodyColumnType(col, row) ?? 'text';
36705
36717
  let isHeightChange = false;
36706
36718
  if (type === 'progressbar') {
36707
36719
  const columnDefine = scene.table.getBodyColumnDefine(col, row);
@@ -40719,7 +40731,7 @@
40719
40731
  const emptyGroup = new Group$1({});
40720
40732
  emptyGroup.role = 'empty';
40721
40733
 
40722
- function createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, mergeMap, defaultRowHeight, table, cellLocation, rowLimit) {
40734
+ function createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, mergeMap, defaultRowHeight, table, rowLimit) {
40723
40735
  let padding;
40724
40736
  let textAlign;
40725
40737
  let textBaseline;
@@ -40732,6 +40744,7 @@
40732
40744
  }
40733
40745
  for (let j = rowStart; j <= rowEnd; j++) {
40734
40746
  const row = j;
40747
+ let cellLocation = table.getCellLocation(col, row);
40735
40748
  let value = table.getCellValue(col, row);
40736
40749
  let cellWidth = colWidth;
40737
40750
  let cellHeight = table.getRowHeight(row);
@@ -40813,8 +40826,8 @@
40813
40826
  const type = isVtableMerge || isCustomMerge
40814
40827
  ? 'text'
40815
40828
  : (table.isHeader(col, row)
40816
- ? table._getHeaderLayoutMap(col, row).headerType
40817
- : table.getBodyColumnType(col, row)) || 'text';
40829
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
40830
+ : table.getBodyColumnType(col, row)) ?? 'text';
40818
40831
  if (isPromise(value)) {
40819
40832
  createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
40820
40833
  dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
@@ -40970,7 +40983,7 @@
40970
40983
  columnGroup.role = 'column';
40971
40984
  columnGroup.col = i;
40972
40985
  containerGroup.addChild(columnGroup);
40973
- const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$2(defaultHeaderRowHeight) ? defaultHeaderRowHeight : defaultRowHeight, table, cellLocation, rowLimit);
40986
+ const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$2(defaultHeaderRowHeight) ? defaultHeaderRowHeight : defaultRowHeight, table, rowLimit);
40974
40987
  x += default2Width;
40975
40988
  heightMax = Math.max(heightMax, default2Height);
40976
40989
  }
@@ -42247,8 +42260,8 @@
42247
42260
  let maxHeight = 0;
42248
42261
  for (let col = 0; col < this.table.frozenColCount; col++) {
42249
42262
  const colGroup = this.table.scenegraph.getColGroup(col);
42250
- const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';
42251
- const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellLocation);
42263
+ this.table.isListTable() ? 'body' : 'rowHeader';
42264
+ const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table);
42252
42265
  maxHeight = Math.max(maxHeight, height);
42253
42266
  this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);
42254
42267
  }
@@ -42257,8 +42270,8 @@
42257
42270
  let maxHeight = 0;
42258
42271
  for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
42259
42272
  const colGroup = this.table.scenegraph.getColGroup(col);
42260
- const cellLocation = this.table.isPivotChart() ? 'rowHeader' : 'body';
42261
- const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellLocation);
42273
+ this.table.isPivotChart() ? 'rowHeader' : 'body';
42274
+ const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table);
42262
42275
  maxHeight = Math.max(maxHeight, height);
42263
42276
  this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);
42264
42277
  }
@@ -42269,8 +42282,8 @@
42269
42282
  if (!colGroup) {
42270
42283
  continue;
42271
42284
  }
42272
- const cellLocation = col < this.table.rowHeaderLevelCount ? 'rowHeader' : 'body';
42273
- const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellLocation);
42285
+ col < this.table.rowHeaderLevelCount ? 'rowHeader' : 'body';
42286
+ const { height } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table);
42274
42287
  maxHeight = Math.max(maxHeight, height);
42275
42288
  }
42276
42289
  this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);
@@ -43311,8 +43324,20 @@
43311
43324
  }
43312
43325
  for (let col = 0; col < table.colCount; col++) {
43313
43326
  updateRows.forEach(row => {
43314
- if (row < table.frozenRowCount ||
43315
- row > table.rowCount - 1 ||
43327
+ if (row < table.frozenRowCount) {
43328
+ const mergeInfo = getCellMergeInfo(scene.table, col, row);
43329
+ if (mergeInfo) {
43330
+ for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
43331
+ for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
43332
+ updateCell$1(col, row, scene.table, false);
43333
+ }
43334
+ }
43335
+ }
43336
+ else {
43337
+ updateCell$1(col, row, scene.table, false);
43338
+ }
43339
+ }
43340
+ else if (row > table.rowCount - 1 ||
43316
43341
  (row < scene.table.rowCount - scene.table.bottomFrozenRowCount &&
43317
43342
  (row < scene.proxy.rowStart || row > scene.proxy.rowEnd))) {
43318
43343
  removeCellGroup(row, scene);
@@ -50442,9 +50467,12 @@
50442
50467
  table.scenegraph.updateNextFrame();
50443
50468
  });
50444
50469
  table.scenegraph.stage.addEventListener('wheel', (e) => {
50445
- table.editorManager?.completeEdit();
50446
- if (table.eventManager._enableTableScroll) {
50447
- handleWhell(e, stateManager);
50470
+ const tableGroup = e.path.find(node => node.role === 'table');
50471
+ if (tableGroup) {
50472
+ table.editorManager?.completeEdit();
50473
+ if (table.eventManager._enableTableScroll) {
50474
+ handleWhell(e, stateManager);
50475
+ }
50448
50476
  }
50449
50477
  });
50450
50478
  }
@@ -50762,6 +50790,7 @@
50762
50790
  }
50763
50791
  else if (e.key === 'Escape') {
50764
50792
  table.editorManager?.cancelEdit();
50793
+ table.getElement().focus();
50765
50794
  }
50766
50795
  else if (e.key === 'Enter') {
50767
50796
  if (table.editorManager?.editingEditor) {
@@ -50801,18 +50830,19 @@
50801
50830
  }
50802
50831
  else if (e.key === 'Tab') {
50803
50832
  if (table.options.keyboardOptions?.moveFocusCellOnTab ?? true) {
50804
- e.preventDefault();
50805
50833
  if (stateManager.select.cellPos.col >= 0 && stateManager.select.cellPos.row >= 0) {
50834
+ const isLastCell = stateManager.select.cellPos.col === table.colCount - 1 &&
50835
+ stateManager.select.cellPos.row === table.rowCount - 1;
50836
+ if (isLastCell) {
50837
+ return;
50838
+ }
50839
+ e.preventDefault();
50806
50840
  let targetCol;
50807
50841
  let targetRow;
50808
50842
  if (stateManager.select.cellPos.col === table.colCount - 1) {
50809
50843
  targetRow = Math.min(table.rowCount - 1, stateManager.select.cellPos.row + 1);
50810
50844
  targetCol = table.rowHeaderLevelCount;
50811
50845
  }
50812
- else if (stateManager.select.cellPos.row === table.rowCount - 1) {
50813
- targetRow = table.rowCount - 1;
50814
- targetCol = table.rowHeaderLevelCount;
50815
- }
50816
50846
  else {
50817
50847
  targetRow = stateManager.select.cellPos.row;
50818
50848
  targetCol = stateManager.select.cellPos.col + 1;
@@ -51756,7 +51786,11 @@
51756
51786
  }
51757
51787
  else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
51758
51788
  if (!isSelectMoving) {
51789
+ const isHasSelected = !!this.table.stateManager.select.ranges?.length;
51759
51790
  this.table.stateManager.updateSelectPos(-1, -1);
51791
+ if (isHasSelected) {
51792
+ this.table.stateManager.endSelectCells(true, isHasSelected);
51793
+ }
51760
51794
  }
51761
51795
  return false;
51762
51796
  }
@@ -52743,8 +52777,11 @@
52743
52777
  rootElementLeft = referencePosition.rect.right - rootElementWidth;
52744
52778
  rootElementTop = referencePosition.rect.bottom;
52745
52779
  }
52746
- if (rootElementTop + rootElementHeight > containerHeight) {
52747
- rootElementTop = containerHeight - rootElementHeight;
52780
+ const rect = element.getBoundingClientRect();
52781
+ const scaleX = rect.width / element.offsetWidth;
52782
+ const scaleY = rect.height / element.offsetHeight;
52783
+ if (rootElementTop * scaleY + rootElementHeight > containerHeight) {
52784
+ rootElementTop = (containerHeight - rootElementHeight) / scaleY;
52748
52785
  }
52749
52786
  if (rootElementTop < 0) {
52750
52787
  rootElementTop = rootElementTop / 2;
@@ -52753,8 +52790,8 @@
52753
52790
  if (rootElementLeft < 0) {
52754
52791
  rootElementLeft = 0;
52755
52792
  }
52756
- else if (rootElementLeft + rootElementWidth > containerWidth) {
52757
- rootElementLeft = containerWidth - rootElementWidth;
52793
+ else if (rootElementLeft * scaleX + rootElementWidth > containerWidth) {
52794
+ rootElementLeft = (containerWidth - rootElementWidth) / scaleX;
52758
52795
  }
52759
52796
  rootElement.style.left = `${rootElementLeft}px`;
52760
52797
  return true;
@@ -54378,7 +54415,7 @@
54378
54415
  if (hd.indicatorKey) {
54379
54416
  return indicator.indicatorKey === hd.indicatorKey;
54380
54417
  }
54381
- return indicator.title === hd.value;
54418
+ return indicator.title === hd.value && !hd.dimensionKey;
54382
54419
  });
54383
54420
  const cell = {
54384
54421
  id,
@@ -54417,6 +54454,7 @@
54417
54454
  cellType: indicatorInfo?.cellType ?? indicatorInfo?.columnType ?? 'text',
54418
54455
  chartModule: 'chartModule' in indicatorInfo ? indicatorInfo.chartModule : null,
54419
54456
  chartSpec: 'chartSpec' in indicatorInfo ? indicatorInfo.chartSpec : null,
54457
+ noDataRenderNothing: 'noDataRenderNothing' in indicatorInfo ? indicatorInfo.noDataRenderNothing : false,
54420
54458
  sparklineSpec: 'sparklineSpec' in indicatorInfo ? indicatorInfo.sparklineSpec : null,
54421
54459
  style: indicatorInfo?.style,
54422
54460
  icon: indicatorInfo?.icon,
@@ -54529,6 +54567,7 @@
54529
54567
  cellType: indicatorInfo?.cellType ?? indicatorInfo?.columnType ?? 'text',
54530
54568
  chartModule: 'chartModule' in indicatorInfo ? indicatorInfo.chartModule : null,
54531
54569
  chartSpec: 'chartSpec' in indicatorInfo ? indicatorInfo.chartSpec : null,
54570
+ noDataRenderNothing: 'noDataRenderNothing' in indicatorInfo ? indicatorInfo.noDataRenderNothing : false,
54532
54571
  sparklineSpec: 'sparklineSpec' in indicatorInfo ? indicatorInfo.sparklineSpec : null,
54533
54572
  style: indicatorInfo?.style,
54534
54573
  icon: indicatorInfo?.icon,
@@ -55011,6 +55050,7 @@
55011
55050
  if (absoluteY === 0) {
55012
55051
  return { top: 0, row: 0, bottom: 0, height: 0 };
55013
55052
  }
55053
+ absoluteY = absoluteY - _this.tableY;
55014
55054
  if (isConsider &&
55015
55055
  absoluteY > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() &&
55016
55056
  absoluteY < _this.tableNoFrameHeight) {
@@ -55354,7 +55394,7 @@
55354
55394
  else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
55355
55395
  col >= layout.rowHeaderLevelCount &&
55356
55396
  col < layout.colCount - layout.rightFrozenColCount) {
55357
- const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
55397
+ const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
55358
55398
  let indicatorInfo = null;
55359
55399
  indicatorKeys?.forEach(key => {
55360
55400
  const info = layout.getIndicatorInfo(key);
@@ -55445,7 +55485,7 @@
55445
55485
  if (col === layout.rowHeaderLevelCount - 1 &&
55446
55486
  row >= layout.columnHeaderLevelCount &&
55447
55487
  row < layout.rowCount - layout.bottomFrozenRowCount) {
55448
- const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
55488
+ const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
55449
55489
  let indicatorInfo = null;
55450
55490
  indicatorKeys?.forEach(key => {
55451
55491
  const info = layout.getIndicatorInfo(key);
@@ -55712,7 +55752,7 @@
55712
55752
  if (axisOption?.visible === false) {
55713
55753
  return undefined;
55714
55754
  }
55715
- const indicatorKeys = layout.getIndicatorKeyInChartSpec(colForIndicatorKey, rowForIndicatorKey);
55755
+ const indicatorKeys = layout.getIndicatorKeyInChartSpec(colForIndicatorKey, rowForIndicatorKey).slice(0, 2);
55716
55756
  let path;
55717
55757
  if (position === 'top' || position === 'bottom') {
55718
55758
  path = layout.getColKeysPath(col, row);
@@ -56114,7 +56154,7 @@
56114
56154
  return TABLE_EVENT_TYPE;
56115
56155
  }
56116
56156
  options;
56117
- version = "1.10.3";
56157
+ version = "1.10.4";
56118
56158
  pagination;
56119
56159
  id = `VTable${Date.now()}`;
56120
56160
  headerStyleCache;
@@ -59529,6 +59569,20 @@
59529
59569
  }
59530
59570
  return true;
59531
59571
  }
59572
+ function isNoChartDataRenderNothing(col, row, layout) {
59573
+ const paths = layout.getCellHeaderPaths(col, row);
59574
+ let indicatorObj;
59575
+ if (layout.indicatorsAsCol) {
59576
+ const indicatorKey = paths.colHeaderPaths.find(colPath => colPath.indicatorKey)?.indicatorKey;
59577
+ indicatorObj = layout.columnObjects.find(indicator => indicator.indicatorKey === indicatorKey);
59578
+ }
59579
+ else {
59580
+ const indicatorKey = paths.rowHeaderPaths.find(rowPath => rowPath.indicatorKey)?.indicatorKey;
59581
+ indicatorObj = layout.columnObjects.find(indicator => indicator.indicatorKey === indicatorKey);
59582
+ }
59583
+ const noDataRenderNothing = indicatorObj?.noDataRenderNothing;
59584
+ return noDataRenderNothing;
59585
+ }
59532
59586
  function checkHasCartesianChart(indicatorsDefine) {
59533
59587
  let isHasCartesianChart = false;
59534
59588
  for (let i = 0; i < indicatorsDefine.length; i++) {
@@ -59626,7 +59680,7 @@
59626
59680
  function getChartAxes(col, row, layout) {
59627
59681
  const axes = [];
59628
59682
  if (layout.indicatorsAsCol) {
59629
- const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
59683
+ const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
59630
59684
  const colPath = layout.getColKeysPath(col, row);
59631
59685
  indicatorKeys.forEach((key, index) => {
59632
59686
  const { range, isZeroAlign, axisOption } = getRange(col, row, index, index === 0 ? 'bottom' : 'top', indicatorKeys, colPath, layout);
@@ -59656,7 +59710,7 @@
59656
59710
  label: { visible: false, flush: true },
59657
59711
  title: { visible: false },
59658
59712
  domainLine: { visible: false },
59659
- seriesIndex: index,
59713
+ seriesIndex: axisOption?.seriesId ? undefined : index,
59660
59714
  sync: { axisId: NO_AXISID_FRO_VTABLE }
59661
59715
  }));
59662
59716
  });
@@ -59685,7 +59739,7 @@
59685
59739
  }));
59686
59740
  }
59687
59741
  else {
59688
- const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
59742
+ const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
59689
59743
  const rowPath = layout.getRowKeysPath(col, row);
59690
59744
  indicatorKeys.forEach((key, index) => {
59691
59745
  const { range, isZeroAlign, axisOption } = getRange(col, row, index, index === 0 ? 'left' : 'right', indicatorKeys, rowPath, layout);
@@ -59715,7 +59769,7 @@
59715
59769
  label: { visible: false, flush: true },
59716
59770
  title: { visible: false },
59717
59771
  domainLine: { visible: false },
59718
- seriesIndex: index,
59772
+ seriesIndex: axisOption?.seriesId ? undefined : index,
59719
59773
  sync: { axisId: NO_AXISID_FRO_VTABLE }
59720
59774
  }));
59721
59775
  });
@@ -61028,10 +61082,10 @@
61028
61082
  }
61029
61083
  toggleHierarchyState(diffDataIndices) {
61030
61084
  const addCellPositions = diffDataIndices.add.map(index => {
61031
- return { col: 0, row: this._table.frozenRowCount + index };
61085
+ return { col: 0, row: this._table.columnHeaderLevelCount + index };
61032
61086
  });
61033
61087
  const removeCellPositions = diffDataIndices.remove.map(index => {
61034
- return { col: 0, row: this._table.frozenRowCount + index };
61088
+ return { col: 0, row: this._table.columnHeaderLevelCount + index };
61035
61089
  });
61036
61090
  return {
61037
61091
  addCellPositions,
@@ -61072,6 +61126,11 @@
61072
61126
  }
61073
61127
  return true;
61074
61128
  }
61129
+ isNoChartDataRenderNothing(col, row) {
61130
+ const body = this.getBody(col, row);
61131
+ const noDataRenderNothing = (body?.define).noDataRenderNothing;
61132
+ return noDataRenderNothing;
61133
+ }
61075
61134
  getChartSpec(col, row) {
61076
61135
  return this.getRawChartSpec(col, row);
61077
61136
  }
@@ -61869,7 +61928,8 @@
61869
61928
  if (updateRecordIndexs.length === 0) {
61870
61929
  return;
61871
61930
  }
61872
- const recordIndexsMinToMax = updateRecordIndexs.sort((a, b) => a - b);
61931
+ const bodyRowIndex = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index));
61932
+ const recordIndexsMinToMax = bodyRowIndex.sort((a, b) => a - b);
61873
61933
  if (table.pagination) {
61874
61934
  const { perPageCount, currentPage } = table.pagination;
61875
61935
  const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
@@ -62903,6 +62963,9 @@
62903
62963
  return indexArrLngth;
62904
62964
  }
62905
62965
  getBodyRowIndexByRecordIndex(index) {
62966
+ if (Array.isArray(index) && index.length === 1) {
62967
+ index = index[0];
62968
+ }
62906
62969
  return this.dataSource.getTableIndex(index);
62907
62970
  }
62908
62971
  }
@@ -64048,8 +64111,8 @@
64048
64111
  return;
64049
64112
  }
64050
64113
  this.legendComponent.setAttributes({
64051
- width: this.table.tableNoFrameWidth,
64052
- height: this.table.tableNoFrameHeight
64114
+ maxWidth: this.table.tableNoFrameWidth,
64115
+ maxHeight: this.table.tableNoFrameHeight
64053
64116
  });
64054
64117
  this.adjustTableSize(this.legendComponent.attribute);
64055
64118
  }
@@ -65909,7 +65972,7 @@
65909
65972
  return extend(builtin, chartTypes);
65910
65973
  }
65911
65974
 
65912
- function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue, chartModule, chartSpec, chartInstance, dataId, table, cellTheme, isShareChartSpec, isAsync) {
65975
+ function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue, chartModule, chartSpec, chartInstance, dataId, table, cellTheme, isShareChartSpec, isAsync, isNoChartDataRenderNothing) {
65913
65976
  const registerCharts = get();
65914
65977
  const ClassType = registerCharts[chartModule];
65915
65978
  const headerStyle = table._getCellStyle(col, row);
@@ -65964,27 +66027,29 @@
65964
66027
  }
65965
66028
  }
65966
66029
  cellGroup.AABBBounds.width();
65967
- const chartGroup = new Chart(isShareChartSpec, {
65968
- stroke: false,
65969
- x: padding[3],
65970
- y: padding[0],
65971
- canvas: table.canvas ?? table.scenegraph.stage.window.getContext().canvas,
65972
- mode: table.options.mode,
65973
- modeParams: table.options.modeParams,
65974
- spec: chartSpec,
65975
- ClassType,
65976
- width: width - padding[3] - padding[1],
65977
- height: height - padding[2] - padding[0],
65978
- chartInstance,
65979
- dataId,
65980
- data: table.getCellValue(col, row),
65981
- cellPadding: padding,
65982
- dpr: table.internalProps.pixelRatio,
65983
- axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
65984
- tableChartOption: table.options.chartOption
65985
- });
65986
- cellGroup.appendChild(chartGroup);
65987
- table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
66030
+ if ((isNoChartDataRenderNothing && Array.isArray(table.getCellValue(col, row))) || !isNoChartDataRenderNothing) {
66031
+ const chartGroup = new Chart(isShareChartSpec, {
66032
+ stroke: false,
66033
+ x: padding[3],
66034
+ y: padding[0],
66035
+ canvas: table.canvas ?? table.scenegraph.stage.window.getContext().canvas,
66036
+ mode: table.options.mode,
66037
+ modeParams: table.options.modeParams,
66038
+ spec: chartSpec,
66039
+ ClassType,
66040
+ width: width - padding[3] - padding[1],
66041
+ height: height - padding[2] - padding[0],
66042
+ chartInstance,
66043
+ dataId,
66044
+ data: table.getCellValue(col, row) || [],
66045
+ cellPadding: padding,
66046
+ dpr: table.internalProps.pixelRatio,
66047
+ axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
66048
+ tableChartOption: table.options.chartOption
66049
+ });
66050
+ cellGroup.appendChild(chartGroup);
66051
+ table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
66052
+ }
65988
66053
  return cellGroup;
65989
66054
  }
65990
66055
 
@@ -69884,6 +69949,9 @@
69884
69949
  getChartDataId(col, row) {
69885
69950
  return getChartDataId(col, row, this);
69886
69951
  }
69952
+ isNoChartDataRenderNothing(col, row) {
69953
+ return isNoChartDataRenderNothing(col, row, this);
69954
+ }
69887
69955
  setPagination(pagination) {
69888
69956
  this.clearCellRangeMap();
69889
69957
  this._table.internalProps.useOneRowHeightFillAll = false;
@@ -75436,7 +75504,7 @@
75436
75504
  }
75437
75505
 
75438
75506
  registerForVrender();
75439
- const version = "1.10.3";
75507
+ const version = "1.10.4";
75440
75508
  function getIcons() {
75441
75509
  return get$2();
75442
75510
  }