@visactor/vtable 0.23.1 → 0.23.2

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 (177) hide show
  1. package/cjs/ListTable.js +6 -5
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.js +61 -58
  4. package/cjs/PivotChart.js.map +1 -1
  5. package/cjs/PivotTable.js +5 -3
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/body-helper/body-helper.d.ts +1 -0
  8. package/cjs/body-helper/body-helper.js +3 -0
  9. package/cjs/body-helper/body-helper.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +1 -0
  11. package/cjs/core/BaseTable.js +13 -8
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/core/FouseInput.js +1 -2
  14. package/cjs/core/row-series-number-helper.js +2 -1
  15. package/cjs/core/tableHelper.d.ts +1 -0
  16. package/cjs/core/tableHelper.js +29 -2
  17. package/cjs/core/tableHelper.js.map +1 -1
  18. package/cjs/dataset/dataset.js +6 -2
  19. package/cjs/dataset/dataset.js.map +1 -1
  20. package/cjs/event/listener/container-dom.js +2 -2
  21. package/cjs/event/listener/container-dom.js.map +1 -1
  22. package/cjs/event/listener/table-group.js +7 -3
  23. package/cjs/event/listener/table-group.js.map +1 -1
  24. package/cjs/header-helper/header-helper.d.ts +1 -0
  25. package/cjs/header-helper/header-helper.js +3 -0
  26. package/cjs/header-helper/header-helper.js.map +1 -1
  27. package/cjs/index.d.ts +1 -1
  28. package/cjs/index.js +1 -1
  29. package/cjs/index.js.map +1 -1
  30. package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
  31. package/cjs/layout/chart-helper/get-axis-config.js +9 -6
  32. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  33. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  34. package/cjs/layout/pivot-header-layout.js +3 -2
  35. package/cjs/layout/pivot-header-layout.js.map +1 -1
  36. package/cjs/layout/simple-header-layout.d.ts +1 -0
  37. package/cjs/layout/simple-header-layout.js +1 -1
  38. package/cjs/layout/simple-header-layout.js.map +1 -1
  39. package/cjs/layout/tree-helper.js +0 -1
  40. package/cjs/plugins/themes.js +2 -1
  41. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  42. package/cjs/scenegraph/group-creater/cell-helper.js +6 -6
  43. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  45. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  46. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  47. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  48. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  49. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  50. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +13 -5
  51. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  52. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  53. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  54. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -2
  55. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  57. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  59. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  60. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +10 -6
  61. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  62. package/cjs/scenegraph/layout/update-height.js +2 -2
  63. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  64. package/cjs/scenegraph/layout/update-row.js +59 -14
  65. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  66. package/cjs/scenegraph/layout/update-width.js +12 -12
  67. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  68. package/cjs/scenegraph/scenegraph.js +3 -2
  69. package/cjs/scenegraph/scenegraph.js.map +1 -1
  70. package/cjs/scenegraph/style/corner-cell.js +1 -1
  71. package/cjs/scenegraph/style/corner-cell.js.map +1 -1
  72. package/cjs/scenegraph/style/frame-border.js +1 -1
  73. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  74. package/cjs/scenegraph/utils/get-hierarchy-offset.js +5 -3
  75. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  76. package/cjs/state/state.js +16 -14
  77. package/cjs/state/state.js.map +1 -1
  78. package/cjs/tools/global.d.ts +2 -2
  79. package/cjs/tools/global.js +2 -2
  80. package/cjs/tools/global.js.map +1 -1
  81. package/cjs/ts-types/base-table.d.ts +1 -0
  82. package/cjs/ts-types/base-table.js.map +1 -1
  83. package/cjs/ts-types/new-data-set.d.ts +1 -0
  84. package/cjs/ts-types/new-data-set.js.map +1 -1
  85. package/cjs/ts-types/table-engine.d.ts +2 -0
  86. package/cjs/ts-types/table-engine.js.map +1 -1
  87. package/cjs/vrender.js.map +1 -1
  88. package/dist/vtable.js +640 -785
  89. package/dist/vtable.min.js +2 -2
  90. package/es/ListTable.js +6 -5
  91. package/es/ListTable.js.map +1 -1
  92. package/es/PivotChart.js +63 -57
  93. package/es/PivotChart.js.map +1 -1
  94. package/es/PivotTable.js +5 -2
  95. package/es/PivotTable.js.map +1 -1
  96. package/es/body-helper/body-helper.d.ts +1 -0
  97. package/es/body-helper/body-helper.js +3 -0
  98. package/es/body-helper/body-helper.js.map +1 -1
  99. package/es/core/BaseTable.d.ts +1 -0
  100. package/es/core/BaseTable.js +13 -8
  101. package/es/core/BaseTable.js.map +1 -1
  102. package/es/core/FouseInput.js +1 -2
  103. package/es/core/row-series-number-helper.js +2 -1
  104. package/es/core/tableHelper.d.ts +1 -0
  105. package/es/core/tableHelper.js +26 -0
  106. package/es/core/tableHelper.js.map +1 -1
  107. package/es/dataset/dataset.js +6 -2
  108. package/es/dataset/dataset.js.map +1 -1
  109. package/es/event/listener/container-dom.js +2 -2
  110. package/es/event/listener/container-dom.js.map +1 -1
  111. package/es/event/listener/table-group.js +7 -3
  112. package/es/event/listener/table-group.js.map +1 -1
  113. package/es/header-helper/header-helper.d.ts +1 -0
  114. package/es/header-helper/header-helper.js +3 -0
  115. package/es/header-helper/header-helper.js.map +1 -1
  116. package/es/index.d.ts +1 -1
  117. package/es/index.js +1 -1
  118. package/es/index.js.map +1 -1
  119. package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
  120. package/es/layout/chart-helper/get-axis-config.js +9 -6
  121. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  122. package/es/layout/pivot-header-layout.d.ts +1 -0
  123. package/es/layout/pivot-header-layout.js +3 -2
  124. package/es/layout/pivot-header-layout.js.map +1 -1
  125. package/es/layout/simple-header-layout.d.ts +1 -0
  126. package/es/layout/simple-header-layout.js +1 -1
  127. package/es/layout/simple-header-layout.js.map +1 -1
  128. package/es/layout/tree-helper.js +1 -2
  129. package/es/plugins/themes.js +2 -1
  130. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  131. package/es/scenegraph/group-creater/cell-helper.js +6 -6
  132. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  133. package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  134. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  135. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  136. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  137. package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  138. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  139. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +13 -4
  140. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  141. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  142. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  143. package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -2
  144. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  145. package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  146. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  147. package/es/scenegraph/group-creater/column-helper.js +1 -1
  148. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  149. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +5 -3
  150. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  151. package/es/scenegraph/layout/update-height.js +2 -2
  152. package/es/scenegraph/layout/update-height.js.map +1 -1
  153. package/es/scenegraph/layout/update-row.js +59 -15
  154. package/es/scenegraph/layout/update-row.js.map +1 -1
  155. package/es/scenegraph/layout/update-width.js +12 -12
  156. package/es/scenegraph/layout/update-width.js.map +1 -1
  157. package/es/scenegraph/scenegraph.js +3 -2
  158. package/es/scenegraph/scenegraph.js.map +1 -1
  159. package/es/scenegraph/style/corner-cell.js +1 -1
  160. package/es/scenegraph/style/corner-cell.js.map +1 -1
  161. package/es/scenegraph/style/frame-border.js +1 -1
  162. package/es/scenegraph/style/frame-border.js.map +1 -1
  163. package/es/scenegraph/utils/get-hierarchy-offset.js +6 -2
  164. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  165. package/es/state/state.js +16 -14
  166. package/es/state/state.js.map +1 -1
  167. package/es/tools/global.d.ts +2 -2
  168. package/es/tools/global.js +2 -2
  169. package/es/tools/global.js.map +1 -1
  170. package/es/ts-types/base-table.d.ts +1 -0
  171. package/es/ts-types/base-table.js.map +1 -1
  172. package/es/ts-types/new-data-set.d.ts +1 -0
  173. package/es/ts-types/new-data-set.js.map +1 -1
  174. package/es/ts-types/table-engine.d.ts +2 -0
  175. package/es/ts-types/table-engine.js.map +1 -1
  176. package/es/vrender.js.map +1 -1
  177. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { isNumber } from "@visactor/vutils";
1
+ import { isNumber, isValid } from "@visactor/vutils";
2
2
 
3
3
  import { Group } from "../graphic/group";
4
4
 
@@ -10,6 +10,18 @@ import { deduplication } from "../../tools/util";
10
10
 
11
11
  export function updateRow(removeCells, addCells, updateCells, table) {
12
12
  const scene = table.scenegraph, removeRows = deduplication(removeCells.map((cell => cell.row))).sort(((a, b) => b - a)), addRows = deduplication(addCells.map((cell => cell.row))).sort(((a, b) => a - b)), updateRows = deduplication(updateCells.map((cell => cell.row))).sort(((a, b) => a - b));
13
+ let rowUpdatePos;
14
+ if (updateRows.length) {
15
+ rowUpdatePos = _getUpdateRowIndexUseCellNode(updateRows[0] - 1, updateRows[updateRows.length - 1] + 1, scene);
16
+ }
17
+ if (addRows.length) {
18
+ const pos = _getUpdateRowIndexUseCellNode(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
19
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
20
+ }
21
+ if (removeRows.length) {
22
+ const pos = _getUpdateRowIndexUseCellNode(removeRows[0] - 1, removeRows[removeRows.length - 1] + 1, scene);
23
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
24
+ }
13
25
  removeRows.forEach((row => {
14
26
  removeRow(row, scene);
15
27
  }));
@@ -18,33 +30,34 @@ export function updateRow(removeCells, addCells, updateCells, table) {
18
30
  rowHeightsMap.delete(row);
19
31
  })), removeRows.length) {
20
32
  resetRowNumber(scene);
21
- const rowUpdatePos = updateMergeCellGroup(removeRows[removeRows.length - 1] - 1, removeRows[0] - removeRows.length + 1, scene);
22
- isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
33
+ const pos = _getUpdateRowIndex(removeRows[removeRows.length - 1] - 1, removeRows[0] - removeRows.length + 1, scene);
34
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
23
35
  }
24
36
  let updateAfter;
25
37
  if (scene.table._clearRowRangeHeightsMap(), addRows.forEach((row => {
26
38
  const needUpdateAfter = addRow(row, scene);
27
39
  updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, rowHeightsMap.insert(row);
28
40
  })), resetRowNumberAndY(scene), addRows.length) {
29
- const rowUpdatePos = updateMergeCellGroup(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
30
- isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
41
+ const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
42
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
31
43
  }
32
44
  for (let col = 0; col < table.colCount; col++) updateRows.forEach((r => {
33
45
  const mergeInfo = getCellMergeInfo(scene.table, col, r);
34
46
  if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) updateCell(col, row, scene.table, !1); else updateCell(col, r, scene.table, !1);
35
47
  }));
36
48
  if (updateRows.length) {
37
- const rowUpdatePos = updateMergeCellGroup(updateRows[0] - 1, updateRows[updateRows.length - 1] + 1, scene);
38
- isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
49
+ const pos = _getUpdateRowIndex(updateRows[0] - 1, updateRows[updateRows.length - 1] + 1, scene);
50
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
39
51
  }
40
52
  if (isNumber(updateAfter)) {
41
53
  for (let col = 0; col < table.colCount; col++) for (let row = updateAfter; row < table.rowCount; row++) {
42
54
  const cellGroup = scene.highPerformanceGetCell(col, row, !0);
43
55
  cellGroup && (cellGroup.needUpdate = !0);
44
56
  }
45
- scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);
57
+ rowUpdatePos = isValid(rowUpdatePos) ? isValid(updateAfter) ? Math.min(rowUpdatePos, updateAfter) : rowUpdatePos : updateAfter;
46
58
  }
47
- if (addRows.length) {
59
+ if (isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos)),
60
+ addRows.length) {
48
61
  if (!isNumber(updateAfter)) {
49
62
  const minRow = Math.min(...addRows);
50
63
  scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
@@ -198,20 +211,51 @@ function removeCellGroup(row, scene) {
198
211
  }
199
212
  }
200
213
 
201
- function updateMergeCellGroup(beforeRow, afterRow, scene) {
214
+ function _getUpdateRowIndex(beforeRow, afterRow, scene) {
202
215
  let updateRow;
203
216
  for (let col = 0; col < scene.table.colCount; col++) {
204
217
  const rangeBefore = scene.table.getCellRange(col, beforeRow);
205
- rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1 && (updateCellGroup(rangeBefore, scene),
206
- updateRow = rangeBefore.start.row);
218
+ let row;
219
+ rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1 && (addNeedUpdateTag(rangeBefore, scene),
220
+ row = rangeBefore.start.row);
207
221
  const rangeAfter = scene.table.getCellRange(col, afterRow);
208
- rangeAfter.start.row <= afterRow - 1 && rangeAfter.end.row >= afterRow - 1 && (updateCellGroup(rangeAfter, scene),
209
- updateRow = rangeBefore.start.row);
222
+ rangeAfter.start.row <= afterRow + 1 && rangeAfter.end.row >= afterRow + 1 && (addNeedUpdateTag(rangeAfter, scene),
223
+ row = rangeAfter.start.row), isValid(row) && (updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row);
224
+ }
225
+ return updateRow;
226
+ }
227
+
228
+ function _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene) {
229
+ let updateRow;
230
+ for (let col = 0; col < scene.table.colCount; col++) {
231
+ let row;
232
+ const beforeCell = scene.highPerformanceGetCell(col, beforeRow);
233
+ beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow && (addNeedUpdateTag({
234
+ start: {
235
+ row: beforeCell.mergeStartRow,
236
+ col: "autoHeight" === scene.table.heightMode ? 0 : beforeCell.mergeStartCol
237
+ },
238
+ end: {
239
+ row: beforeCell.mergeEndRow,
240
+ col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : beforeCell.mergeEndCol
241
+ }
242
+ }, scene), row = beforeCell.mergeStartRow);
243
+ const afterCell = scene.highPerformanceGetCell(col, afterRow);
244
+ afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow && (addNeedUpdateTag({
245
+ start: {
246
+ row: afterCell.mergeStartRow,
247
+ col: "autoHeight" === scene.table.heightMode ? 0 : afterCell.mergeStartCol
248
+ },
249
+ end: {
250
+ row: afterCell.mergeEndRow,
251
+ col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : afterCell.mergeEndCol
252
+ }
253
+ }, scene), row = afterCell.mergeStartRow), isValid(row) && (updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row);
210
254
  }
211
255
  return updateRow;
212
256
  }
213
257
 
214
- function updateCellGroup(range, scene) {
258
+ function addNeedUpdateTag(range, scene) {
215
259
  const {start: start, end: end} = range;
216
260
  for (let col = start.col; col <= end.col; col++) for (let row = start.row; row <= end.row; row++) {
217
261
  const cellGroup = scene.highPerformanceGetCell(col, row, !0);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EA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,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;YACrE,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACxC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber, isValid } from '@visactor/vutils';\nimport type { CellAddress, CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { deduplication } from '../../tools/util';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateRow(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI\n) {\n const scene = table.scenegraph;\n // deduplication\n const removeRows = deduplication(removeCells.map(cell => cell.row)).sort((a, b) => b - a);\n const addRows = deduplication(addCells.map(cell => cell.row)).sort((a, b) => a - b);\n const updateRows = deduplication(updateCells.map(cell => cell.row)).sort((a, b) => a - b);\n\n // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene);\n });\n\n const rowHeightsMap = table.rowHeightsMap;\n removeRows.forEach(row => {\n rowHeightsMap.delete(row);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n const beforeRow = removeRows[removeRows.length - 1] - 1;\n const afterRow = removeRows[0] - removeRows.length + 1;\n const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n rowHeightsMap.insert(row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n }\n\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(r => {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, r);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n updateCell(col, row, scene.table, false);\n }\n }\n } else {\n updateCell(col, r, scene.table, false);\n }\n });\n }\n\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n }\n\n if (isNumber(updateAfter)) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = updateAfter; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);\n }\n\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);\n }\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n } else if (removeRows.length) {\n setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene);\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n }\n scene.proxy.progress();\n\n // update table size\n const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n\n function updateBottomFrozeCellGroups() {\n if (\n addRows?.[addRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n updateRows?.[updateRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n removeRows?.[0] >= table.rowCount - table.bottomFrozenRowCount\n ) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = table.rowCount - table.bottomFrozenRowCount; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateBottomFrozenCellGroups();\n }\n }\n}\nfunction removeRow(row: number, scene: Scenegraph) {\n // const infectCellRange = removeCellGroup(row, scene);\n // for (let i = 0; i < infectCellRange.length; i++) {\n // const { mergeStartCol, mergeEndCol, mergeStartRow, mergeEndRow } = infectCellRange[i];\n // for (let col = mergeStartCol; col <= mergeEndCol; col++) {\n // for (let row = mergeStartRow; row <= mergeEndRow; row++) {\n // const cellGroup = scene.getCell(col, row, true);\n // if (cellGroup) {\n // cellGroup.needUpdate = true;\n // }\n // }\n // }\n // }\n\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n removeCellGroup(row, scene);\n proxy.rowEnd--;\n proxy.currentRow--;\n }\n proxy.bodyBottomRow--;\n // proxy.totalRow--;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n}\n\nfunction addRow(row: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n proxy.bodyBottomRow++;\n // proxy.totalRow++;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n\n if (row < proxy.rowStart) {\n return undefined;\n } else if (row > proxy.rowEnd) {\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n return undefined;\n }\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n\n // update rows after\n return row;\n\n // return undefined;\n\n // // TODO 需要整体更新proxy的状态\n // scene.proxy.bodyBottomRow++;\n // scene.proxy.totalRow++;\n // scene.proxy.rowEnd++;\n // scene.proxy.currentRow++;\n}\nfunction resetRowNumber(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number) {\n cellGroup.row = rowIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\n\nfunction resetRowNumberAndY(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number, y: number) {\n cellGroup.row = rowIndex;\n cellGroup.setAttribute('y', y);\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\nfunction addRowCellGroup(row: number, scene: Scenegraph) {\n for (let col = 0; col < scene.table.colCount; col++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n\n if (!cellGroup) {\n // TODO: deal with data promise situation\n continue;\n }\n\n // insert cellGroup in colGroup\n const colGroup = scene.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n\n if (colGroup.firstChild && row < (colGroup.firstChild as Group).row) {\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n (colGroup.firstChild as Group).row = (colGroup.firstChild as Group).row + 1;\n // if (\n // isNumber((colGroup.firstChild as Group).mergeStartRow) &&\n // isNumber((colGroup.firstChild as Group).mergeEndRow)\n // ) {\n // (colGroup.firstChild as Group).mergeStartRow = (colGroup.firstChild as Group).mergeStartRow + 1;\n // (colGroup.firstChild as Group).mergeEndRow = (colGroup.firstChild as Group).mergeEndRow + 1;\n // }\n } else if (colGroup.lastChild && row > (colGroup.lastChild as Group).row) {\n colGroup.appendChild(cellGroup);\n } else {\n // let cellBefore: Group;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // cellBefore = cellGroup;\n // return true;\n // }\n // return false;\n // });\n\n const cellBefore = scene.highPerformanceGetCell(col, row, true);\n if (cellBefore !== cellGroup) {\n colGroup.insertBefore(cellGroup, cellBefore);\n cellBefore && (cellBefore.row = cellBefore.row + 1);\n // if (isNumber(cellBefore.mergeStartRow) && isNumber(cellBefore.mergeEndRow)) {\n // cellBefore.mergeStartRow = cellBefore.mergeStartRow + 1;\n // cellBefore.mergeEndRow = cellBefore.mergeEndRow + 1;\n // }\n if (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\n // if (\n // isNumber((colGroup.lastChild as Group).mergeStartRow) &&\n // isNumber((colGroup.lastChild as Group).mergeEndRow)\n // ) {\n // (colGroup.lastChild as Group).mergeStartRow = (colGroup.lastChild as Group).mergeStartRow + 1;\n // (colGroup.lastChild as Group).mergeEndRow = (colGroup.lastChild as Group).mergeEndRow + 1;\n // }\n }\n }\n }\n\n // // reset row number\n // let rowIndex = (colGroup.firstChild as Group)?.row;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // cellGroup.row = rowIndex;\n // rowIndex++;\n // });\n }\n}\n\nfunction removeCellGroup(row: number, scene: Scenegraph) {\n // const infectCellRange = [];\n for (let col = 0; col < scene.table.colCount; col++) {\n // const headerColGroup = scene.getColGroup(col, true);\n const colGroup = scene.getColGroup(col, false);\n if (!colGroup) {\n continue;\n }\n\n // remove cellGroup in colGroup\n let cellGroup: Group;\n colGroup.forEachChildren((cell: Group) => {\n if (cell.row === row) {\n cellGroup = cell;\n return true;\n }\n return false;\n });\n if (cellGroup) {\n colGroup.updateColumnHeight(-(cellGroup as Group).attribute.height);\n colGroup.removeChild(cellGroup);\n // if (\n // isValid(cellGroup.mergeStartCol) &&\n // isValid(cellGroup.mergeEndCol) &&\n // isValid(cellGroup.mergeStartRow) &&\n // isValid(cellGroup.mergeEndRow)\n // ) {\n // infectCellRange.push({\n // col: cellGroup.col,\n // row: cellGroup.row,\n // mergeStartCol: cellGroup.mergeStartCol,\n // mergeEndCol: cellGroup.mergeEndCol,\n // mergeStartRow: cellGroup.mergeStartRow,\n // mergeEndRow: cellGroup.mergeEndRow\n // });\n // }\n }\n }\n // return infectCellRange;\n}\n\nfunction updateMergeCellGroup(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n const rangeBefore = scene.table.getCellRange(col, beforeRow);\n if (rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1) {\n updateCellGroup(rangeBefore, scene);\n updateRow = rangeBefore.start.row;\n }\n\n const rangeAfter = scene.table.getCellRange(col, afterRow);\n if (rangeAfter.start.row <= afterRow - 1 && rangeAfter.end.row >= afterRow - 1) {\n updateCellGroup(rangeAfter, scene);\n updateRow = rangeBefore.start.row;\n }\n }\n return updateRow;\n}\n\nfunction updateCellGroup(range: CellRange, scene: Scenegraph) {\n const { start, end } = range;\n for (let col = start.col; col <= end.col; col++) {\n for (let row = start.row; row <= end.row; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n if (!cellGroup) {\n continue;\n }\n cellGroup.needUpdate = true;\n }\n }\n}\n\nfunction setRowSeriesNumberCellNeedUpdate(startUpdateRow: number, scene: Scenegraph) {\n if (scene.table.isHasSeriesNumber()) {\n for (let row = startUpdateRow; row <= scene.table.rowCount - 1; row++) {\n updateCell(0, row, scene.table, false);\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,MAAM,UAAU,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IAE/B,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpF,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IA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AAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC/C,MAAM,SAAS,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAC/D,IAAI,CAAC,SAAS,EAAE;gBACd,SAAS;aACV;YACD,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;SAC7B;KACF;AACH,CAAC;AAED,SAAS,gCAAgC,CAAC,cAAsB,EAAE,KAAiB;IACjF,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;QACnC,KAAK,IAAI,GAAG,GAAG,cAAc,EAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;YACrE,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACxC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber, isValid } from '@visactor/vutils';\nimport type { CellAddress, CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { deduplication } from '../../tools/util';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateRow(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI\n) {\n const scene = table.scenegraph;\n // deduplication\n const removeRows = deduplication(removeCells.map(cell => cell.row)).sort((a, b) => b - a);\n const addRows = deduplication(addCells.map(cell => cell.row)).sort((a, b) => a - b);\n const updateRows = deduplication(updateCells.map(cell => cell.row)).sort((a, b) => a - b);\n\n let rowUpdatePos;\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n rowUpdatePos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n }\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n if (removeRows.length) {\n const beforeRow = removeRows[0] - 1;\n const afterRow = removeRows[removeRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene);\n });\n\n const rowHeightsMap = table.rowHeightsMap;\n removeRows.forEach(row => {\n rowHeightsMap.delete(row);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n const beforeRow = removeRows[removeRows.length - 1] - 1;\n const afterRow = removeRows[0] - removeRows.length + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n // isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n rowHeightsMap.insert(row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(r => {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, r);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n updateCell(col, row, scene.table, false);\n }\n }\n } else {\n updateCell(col, r, scene.table, false);\n }\n });\n }\n\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n if (isNumber(updateAfter)) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = updateAfter; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n rowUpdatePos = isValid(rowUpdatePos)\n ? isValid(updateAfter)\n ? Math.min(rowUpdatePos, updateAfter)\n : rowUpdatePos\n : updateAfter;\n // scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);\n }\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);\n }\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n } else if (removeRows.length) {\n setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene);\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n }\n scene.proxy.progress();\n\n // update table size\n const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n\n function updateBottomFrozeCellGroups() {\n if (\n addRows?.[addRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n updateRows?.[updateRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n removeRows?.[0] >= table.rowCount - table.bottomFrozenRowCount\n ) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = table.rowCount - table.bottomFrozenRowCount; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateBottomFrozenCellGroups();\n }\n }\n}\nfunction removeRow(row: number, scene: Scenegraph) {\n // const infectCellRange = removeCellGroup(row, scene);\n // for (let i = 0; i < infectCellRange.length; i++) {\n // const { mergeStartCol, mergeEndCol, mergeStartRow, mergeEndRow } = infectCellRange[i];\n // for (let col = mergeStartCol; col <= mergeEndCol; col++) {\n // for (let row = mergeStartRow; row <= mergeEndRow; row++) {\n // const cellGroup = scene.getCell(col, row, true);\n // if (cellGroup) {\n // cellGroup.needUpdate = true;\n // }\n // }\n // }\n // }\n\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n removeCellGroup(row, scene);\n proxy.rowEnd--;\n proxy.currentRow--;\n }\n proxy.bodyBottomRow--;\n // proxy.totalRow--;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n}\n\nfunction addRow(row: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n proxy.bodyBottomRow++;\n // proxy.totalRow++;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n\n if (row < proxy.rowStart) {\n return undefined;\n } else if (row > proxy.rowEnd) {\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n return undefined;\n }\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n\n // update rows after\n return row;\n\n // return undefined;\n\n // // TODO 需要整体更新proxy的状态\n // scene.proxy.bodyBottomRow++;\n // scene.proxy.totalRow++;\n // scene.proxy.rowEnd++;\n // scene.proxy.currentRow++;\n}\nfunction resetRowNumber(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number) {\n cellGroup.row = rowIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\n\nfunction resetRowNumberAndY(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number, y: number) {\n cellGroup.row = rowIndex;\n cellGroup.setAttribute('y', y);\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\nfunction addRowCellGroup(row: number, scene: Scenegraph) {\n for (let col = 0; col < scene.table.colCount; col++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n\n if (!cellGroup) {\n // TODO: deal with data promise situation\n continue;\n }\n\n // insert cellGroup in colGroup\n const colGroup = scene.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n\n if (colGroup.firstChild && row < (colGroup.firstChild as Group).row) {\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n (colGroup.firstChild as Group).row = (colGroup.firstChild as Group).row + 1;\n // if (\n // isNumber((colGroup.firstChild as Group).mergeStartRow) &&\n // isNumber((colGroup.firstChild as Group).mergeEndRow)\n // ) {\n // (colGroup.firstChild as Group).mergeStartRow = (colGroup.firstChild as Group).mergeStartRow + 1;\n // (colGroup.firstChild as Group).mergeEndRow = (colGroup.firstChild as Group).mergeEndRow + 1;\n // }\n } else if (colGroup.lastChild && row > (colGroup.lastChild as Group).row) {\n colGroup.appendChild(cellGroup);\n } else {\n // let cellBefore: Group;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // cellBefore = cellGroup;\n // return true;\n // }\n // return false;\n // });\n\n const cellBefore = scene.highPerformanceGetCell(col, row, true);\n if (cellBefore !== cellGroup) {\n colGroup.insertBefore(cellGroup, cellBefore);\n cellBefore && (cellBefore.row = cellBefore.row + 1);\n // if (isNumber(cellBefore.mergeStartRow) && isNumber(cellBefore.mergeEndRow)) {\n // cellBefore.mergeStartRow = cellBefore.mergeStartRow + 1;\n // cellBefore.mergeEndRow = cellBefore.mergeEndRow + 1;\n // }\n if (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\n // if (\n // isNumber((colGroup.lastChild as Group).mergeStartRow) &&\n // isNumber((colGroup.lastChild as Group).mergeEndRow)\n // ) {\n // (colGroup.lastChild as Group).mergeStartRow = (colGroup.lastChild as Group).mergeStartRow + 1;\n // (colGroup.lastChild as Group).mergeEndRow = (colGroup.lastChild as Group).mergeEndRow + 1;\n // }\n }\n }\n }\n\n // // reset row number\n // let rowIndex = (colGroup.firstChild as Group)?.row;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // cellGroup.row = rowIndex;\n // rowIndex++;\n // });\n }\n}\n\nfunction removeCellGroup(row: number, scene: Scenegraph) {\n // const infectCellRange = [];\n for (let col = 0; col < scene.table.colCount; col++) {\n // const headerColGroup = scene.getColGroup(col, true);\n const colGroup = scene.getColGroup(col, false);\n if (!colGroup) {\n continue;\n }\n\n // remove cellGroup in colGroup\n let cellGroup: Group;\n colGroup.forEachChildren((cell: Group) => {\n if (cell.row === row) {\n cellGroup = cell;\n return true;\n }\n return false;\n });\n if (cellGroup) {\n colGroup.updateColumnHeight(-(cellGroup as Group).attribute.height);\n colGroup.removeChild(cellGroup);\n // if (\n // isValid(cellGroup.mergeStartCol) &&\n // isValid(cellGroup.mergeEndCol) &&\n // isValid(cellGroup.mergeStartRow) &&\n // isValid(cellGroup.mergeEndRow)\n // ) {\n // infectCellRange.push({\n // col: cellGroup.col,\n // row: cellGroup.row,\n // mergeStartCol: cellGroup.mergeStartCol,\n // mergeEndCol: cellGroup.mergeEndCol,\n // mergeStartRow: cellGroup.mergeStartRow,\n // mergeEndRow: cellGroup.mergeEndRow\n // });\n // }\n }\n }\n // return infectCellRange;\n}\n\nfunction _getUpdateRowIndex(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n const rangeBefore = scene.table.getCellRange(col, beforeRow);\n let row;\n if (rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1) {\n addNeedUpdateTag(rangeBefore, scene);\n row = rangeBefore.start.row;\n }\n\n const rangeAfter = scene.table.getCellRange(col, afterRow);\n if (rangeAfter.start.row <= afterRow + 1 && rangeAfter.end.row >= afterRow + 1) {\n addNeedUpdateTag(rangeAfter, scene);\n row = rangeAfter.start.row;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\nfunction _getUpdateRowIndexUseCellNode(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n let row;\n const beforeCell = scene.highPerformanceGetCell(col, beforeRow);\n if (beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow) {\n addNeedUpdateTag(\n {\n start: {\n row: beforeCell.mergeStartRow,\n col: scene.table.heightMode === 'autoHeight' ? 0 : beforeCell.mergeStartCol\n },\n end: {\n row: beforeCell.mergeEndRow,\n col: scene.table.heightMode === 'autoHeight' ? scene.table.colCount - 1 : beforeCell.mergeEndCol\n }\n },\n scene\n );\n row = beforeCell.mergeStartRow;\n }\n\n const afterCell = scene.highPerformanceGetCell(col, afterRow);\n if (afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow) {\n addNeedUpdateTag(\n {\n start: {\n row: afterCell.mergeStartRow,\n col: scene.table.heightMode === 'autoHeight' ? 0 : afterCell.mergeStartCol\n },\n end: {\n row: afterCell.mergeEndRow,\n col: scene.table.heightMode === 'autoHeight' ? scene.table.colCount - 1 : afterCell.mergeEndCol\n }\n },\n scene\n );\n row = afterCell.mergeStartRow;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\n\nfunction addNeedUpdateTag(range: CellRange, scene: Scenegraph) {\n const { start, end } = range;\n for (let col = start.col; col <= end.col; col++) {\n for (let row = start.row; row <= end.row; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n if (!cellGroup) {\n continue;\n }\n cellGroup.needUpdate = true;\n }\n }\n}\n\nfunction setRowSeriesNumberCellNeedUpdate(startUpdateRow: number, scene: Scenegraph) {\n if (scene.table.isHasSeriesNumber()) {\n for (let row = startUpdateRow; row <= scene.table.rowCount - 1; row++) {\n updateCell(0, row, scene.table, false);\n }\n }\n}\n"]}
@@ -32,17 +32,17 @@ import { getCellMergeRange } from "../../tools/merge-range";
32
32
 
33
33
  export function updateColWidth(scene, col, detaX, skipTableWidthMap) {
34
34
  skipTableWidthMap || scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, !0);
35
- const autoRowHeight = "autoHeight" === scene.table.heightMode, colOrCornerHeaderColumn = scene.getColGroup(col, !0), rightTopColumn = scene.getColGroupInRightTopCorner(col);
36
- colOrCornerHeaderColumn && !rightTopColumn && updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, "col-corner", scene),
37
- rightTopColumn && updateColunmWidth(rightTopColumn, detaX, autoRowHeight, "right-top", scene);
35
+ const colOrCornerHeaderColumn = scene.getColGroup(col, !0), rightTopColumn = scene.getColGroupInRightTopCorner(col);
36
+ colOrCornerHeaderColumn && !rightTopColumn && updateColunmWidth(colOrCornerHeaderColumn, detaX, "col-corner", scene),
37
+ rightTopColumn && updateColunmWidth(rightTopColumn, detaX, "right-top", scene);
38
38
  const rowHeaderOrBodyColumn = scene.getColGroup(col);
39
- rowHeaderOrBodyColumn && updateColunmWidth(rowHeaderOrBodyColumn, detaX, autoRowHeight, "row-body", scene);
39
+ rowHeaderOrBodyColumn && updateColunmWidth(rowHeaderOrBodyColumn, detaX, "row-body", scene);
40
40
  const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);
41
- leftBottomColumn && updateColunmWidth(leftBottomColumn, detaX, autoRowHeight, "left-bottom", scene);
41
+ leftBottomColumn && updateColunmWidth(leftBottomColumn, detaX, "left-bottom", scene);
42
42
  const bottomColumn = scene.getColGroupInBottom(col);
43
- bottomColumn && updateColunmWidth(bottomColumn, detaX, autoRowHeight, "bottom", scene);
43
+ bottomColumn && updateColunmWidth(bottomColumn, detaX, "bottom", scene);
44
44
  const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);
45
- rightBottomColumn && updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, "right-bottom", scene),
45
+ rightBottomColumn && updateColunmWidth(rightBottomColumn, detaX, "right-bottom", scene),
46
46
  col < scene.frozenColCount ? (scene.cornerHeaderGroup.forEachChildrenSkipChild(((column, index) => {
47
47
  column.col > col && column.setAttribute("x", column.attribute.x + detaX);
48
48
  })), scene.rowHeaderGroup.forEachChildrenSkipChild(((column, index) => {
@@ -60,13 +60,13 @@ export function updateColWidth(scene, col, detaX, skipTableWidthMap) {
60
60
  }));
61
61
  }
62
62
 
63
- function updateColunmWidth(columnGroup, detaX, autoRowHeight, mode, scene) {
63
+ function updateColunmWidth(columnGroup, detaX, mode, scene) {
64
64
  var _a, _b, _c, _d, _e, _f, _g;
65
65
  let needRerangeRow = !1;
66
66
  const oldColumnWidth = null !== (_a = null == columnGroup ? void 0 : columnGroup.attribute.width) && void 0 !== _a ? _a : 0;
67
67
  if (null == columnGroup || columnGroup.setAttribute("width", oldColumnWidth + detaX),
68
68
  null == columnGroup || columnGroup.forEachChildren(((cell, index) => {
69
- if (updateCellWidth(scene, cell, cell.col, cell.row, oldColumnWidth, oldColumnWidth + detaX, detaX, "row-body" !== mode || cell.col < scene.table.rowHeaderLevelCount, autoRowHeight, scene.table.internalProps.autoWrapText)) {
69
+ if (updateCellWidth(scene, cell, cell.col, cell.row, oldColumnWidth, oldColumnWidth + detaX, detaX, "row-body" !== mode || cell.col < scene.table.rowHeaderLevelCount, scene.table.internalProps.autoWrapText)) {
70
70
  const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);
71
71
  if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) resetRowHeight(scene, row); else resetRowHeight(scene, cell.row);
72
72
  needRerangeRow = !0;
@@ -112,13 +112,13 @@ function updateColunmWidth(columnGroup, detaX, autoRowHeight, mode, scene) {
112
112
  }
113
113
  }
114
114
 
115
- function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHeader, autoRowHeight, autoWrapText) {
115
+ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHeader, autoWrapText) {
116
116
  var _a, _b, _c;
117
117
  if (cell.attribute.width === distWidth && !cell.needUpdateWidth) return !1;
118
118
  cell.needUpdateWidth = !1, cell.setAttribute("width", distWidth);
119
119
  const cellGroup = cell;
120
120
  if (!cellGroup) return !1;
121
- const type = scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
121
+ const autoRowHeight = scene.table.isAutoRowHeight(row), type = scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
122
122
  let isHeightChange = !1;
123
123
  if ("progressbar" === type) {
124
124
  const columnDefine = scene.table.getBodyColumnDefine(col, row), style = scene.table._getCellStyle(col, row), value = scene.table.getCellValue(col, row), dataValue = scene.table.getCellOriginValue(col, row), padding = getQuadProps(getProp("padding", style, col, row, scene.table)), newBarCell = createProgressBarCell(columnDefine, style, cellGroup.attribute.width, value, dataValue, col, row, padding, scene.table), oldBarCell = cellGroup.getChildByName("progress-bar");
@@ -154,7 +154,7 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
154
154
  let width = cellGroup.attribute.width, height = cellGroup.attribute.height;
155
155
  isMergeCellGroup(cellGroup) && (width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol),
156
156
  height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow));
157
- const customResult = dealWithCustom(customLayout, customRender, col, row, width, height, !1, "autoHeight" === scene.table.heightMode, padding, scene.table);
157
+ const customResult = dealWithCustom(customLayout, customRender, col, row, width, height, !1, scene.table.isAutoRowHeight(row), padding, scene.table);
158
158
  customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault,
159
159
  isHeightChange = !0;
160
160
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,O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ent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n const autoRowHeight = scene.table.heightMode === 'autoHeight';\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, autoRowHeight, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, autoRowHeight, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, autoRowHeight, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, autoRowHeight, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n autoRowHeight,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n if (!getCustomCellMergeCustom(col, row, cell, scene.table)) {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n width,\n height,\n false,\n scene.table.heightMode === 'autoHeight',\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n const style = table._getCellStyle(col, row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,M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AK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,sBAAsB,CACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n // autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n const autoRowHeight = scene.table.isAutoRowHeight(row);\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n if (!getCustomCellMergeCustom(col, row, cell, scene.table)) {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n const style = table._getCellStyle(col, row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
@@ -666,9 +666,9 @@ export class Scenegraph {
666
666
  }
667
667
  createFrameBorder() {
668
668
  this.updateTableSize();
669
- const isListTableWithFrozen = !this.isPivot;
669
+ const isListTableWithFrozen = !this.isPivot && !this.table.internalProps.transpose;
670
670
  createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [ !0, !0, !0, !1 ] : void 0),
671
- createFrameBorder(this.rowHeaderGroup, this.isPivot ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
671
+ createFrameBorder(this.rowHeaderGroup, this.isPivot || this.table.internalProps.transpose ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
672
672
  createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [ !0, !0, !0, !1 ] : void 0),
673
673
  createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
674
674
  createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
@@ -742,6 +742,7 @@ export class Scenegraph {
742
742
  this.stage.enableDirtyBounds();
743
743
  }
744
744
  updateRow(removeCells, addCells, updateCells = []) {
745
+ this.table.internalProps.layoutMap.clearCellRangeMap();
745
746
  const addRows = deduplication(addCells.map((cell => cell.row))).sort(((a, b) => a - b)), updateRows = deduplication(updateCells.map((cell => cell.row))).sort(((a, b) => a - b)), isNotFillHeight = this.table.getAllRowsHeight() - [ ...addRows, ...updateRows ].reduce(((tolHeight, rowNumber) => tolHeight + this.table.getRowHeight(rowNumber)), 0) <= this.table.tableNoFrameHeight;
746
747
  if (updateRow(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(),
747
748
  "adaptive" === this.table.heightMode || this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight)) this.table.scenegraph.recalculateRowHeights(); else if ("autoHeight" === this.table.heightMode) for (let i = 0; i < updateRows.length; i++) {