@visactor/vtable 0.15.5 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/cjs/ListTable.d.ts +5 -2
  2. package/cjs/ListTable.js +161 -16
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -1
  5. package/cjs/PivotChart.js +1 -1
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +1 -1
  8. package/cjs/PivotTable.js +1 -1
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/components/menu/dom/logic/MenuElement.js +3 -3
  11. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  12. package/cjs/core/BaseTable.d.ts +1 -1
  13. package/cjs/core/BaseTable.js +4 -4
  14. package/cjs/core/BaseTable.js.map +1 -1
  15. package/cjs/core/tableHelper.d.ts +2 -0
  16. package/cjs/core/tableHelper.js +18 -3
  17. package/cjs/core/tableHelper.js.map +1 -1
  18. package/cjs/data/DataSource.d.ts +8 -1
  19. package/cjs/data/DataSource.js +59 -2
  20. package/cjs/data/DataSource.js.map +1 -1
  21. package/cjs/index.d.ts +1 -1
  22. package/cjs/index.js +1 -1
  23. package/cjs/index.js.map +1 -1
  24. package/cjs/scenegraph/group-creater/column.d.ts +0 -4
  25. package/cjs/scenegraph/group-creater/column.js +1 -19
  26. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  27. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  28. package/cjs/scenegraph/group-creater/progress/proxy.js +17 -3
  29. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  30. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +4 -0
  31. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  32. package/cjs/scenegraph/layout/auto-height.d.ts +1 -2
  33. package/cjs/scenegraph/layout/auto-height.js +1 -36
  34. package/cjs/scenegraph/layout/auto-height.js.map +1 -1
  35. package/cjs/scenegraph/layout/compute-col-width.js +1 -1
  36. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  37. package/cjs/scenegraph/layout/update-col.d.ts +3 -0
  38. package/cjs/scenegraph/layout/update-col.js +203 -0
  39. package/cjs/scenegraph/layout/update-col.js.map +1 -0
  40. package/cjs/scenegraph/layout/update-height.js +1 -1
  41. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  42. package/cjs/scenegraph/layout/update-row.js +94 -49
  43. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  44. package/cjs/scenegraph/scenegraph.d.ts +5 -0
  45. package/cjs/scenegraph/scenegraph.js +24 -3
  46. package/cjs/scenegraph/scenegraph.js.map +1 -1
  47. package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
  48. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  49. package/cjs/state/resize/update-resize-column.js +1 -1
  50. package/cjs/state/resize/update-resize-column.js.map +1 -1
  51. package/cjs/state/state.d.ts +2 -0
  52. package/cjs/state/state.js +47 -2
  53. package/cjs/state/state.js.map +1 -1
  54. package/cjs/themes/DARK.js.map +1 -1
  55. package/cjs/tools/diff-cell.js +1 -1
  56. package/cjs/tools/diff-cell.js.map +1 -1
  57. package/cjs/ts-types/base-table.d.ts +1 -1
  58. package/cjs/ts-types/base-table.js.map +1 -1
  59. package/cjs/ts-types/table-engine.d.ts +3 -0
  60. package/cjs/ts-types/table-engine.js.map +1 -1
  61. package/dist/vtable.js +981 -118
  62. package/dist/vtable.min.js +2 -2
  63. package/es/ListTable.d.ts +5 -2
  64. package/es/ListTable.js +161 -17
  65. package/es/ListTable.js.map +1 -1
  66. package/es/PivotChart.d.ts +1 -1
  67. package/es/PivotChart.js +1 -1
  68. package/es/PivotChart.js.map +1 -1
  69. package/es/PivotTable.d.ts +1 -1
  70. package/es/PivotTable.js +1 -1
  71. package/es/PivotTable.js.map +1 -1
  72. package/es/components/menu/dom/logic/MenuElement.js +3 -3
  73. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  74. package/es/core/BaseTable.d.ts +1 -1
  75. package/es/core/BaseTable.js +4 -4
  76. package/es/core/BaseTable.js.map +1 -1
  77. package/es/core/tableHelper.d.ts +2 -0
  78. package/es/core/tableHelper.js +16 -0
  79. package/es/core/tableHelper.js.map +1 -1
  80. package/es/data/DataSource.d.ts +8 -1
  81. package/es/data/DataSource.js +59 -2
  82. package/es/data/DataSource.js.map +1 -1
  83. package/es/index.d.ts +1 -1
  84. package/es/index.js +1 -1
  85. package/es/index.js.map +1 -1
  86. package/es/scenegraph/group-creater/column.d.ts +0 -4
  87. package/es/scenegraph/group-creater/column.js +0 -16
  88. package/es/scenegraph/group-creater/column.js.map +1 -1
  89. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  90. package/es/scenegraph/group-creater/progress/proxy.js +16 -2
  91. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  92. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +4 -0
  93. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  94. package/es/scenegraph/layout/auto-height.d.ts +1 -2
  95. package/es/scenegraph/layout/auto-height.js +0 -33
  96. package/es/scenegraph/layout/auto-height.js.map +1 -1
  97. package/es/scenegraph/layout/compute-col-width.js +1 -1
  98. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  99. package/es/scenegraph/layout/update-col.d.ts +3 -0
  100. package/es/scenegraph/layout/update-col.js +200 -0
  101. package/es/scenegraph/layout/update-col.js.map +1 -0
  102. package/es/scenegraph/layout/update-height.js +1 -1
  103. package/es/scenegraph/layout/update-height.js.map +1 -1
  104. package/es/scenegraph/layout/update-row.js +94 -49
  105. package/es/scenegraph/layout/update-row.js.map +1 -1
  106. package/es/scenegraph/scenegraph.d.ts +5 -0
  107. package/es/scenegraph/scenegraph.js +25 -2
  108. package/es/scenegraph/scenegraph.js.map +1 -1
  109. package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
  110. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  111. package/es/state/resize/update-resize-column.js +1 -1
  112. package/es/state/resize/update-resize-column.js.map +1 -1
  113. package/es/state/state.d.ts +2 -0
  114. package/es/state/state.js +47 -2
  115. package/es/state/state.js.map +1 -1
  116. package/es/themes/DARK.js.map +1 -1
  117. package/es/tools/diff-cell.js +1 -1
  118. package/es/tools/diff-cell.js.map +1 -1
  119. package/es/ts-types/base-table.d.ts +1 -1
  120. package/es/ts-types/base-table.js.map +1 -1
  121. package/es/ts-types/table-engine.d.ts +3 -0
  122. package/es/ts-types/table-engine.js.map +1 -1
  123. package/package.json +4 -4
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const vutils_1 = require("@visactor/vutils"), group_1 = require("../graphic/group"), cell_helper_1 = require("../group-creater/cell-helper"), get_cell_merge_1 = require("../utils/get-cell-merge");
8
8
 
9
9
  function updateRow(removeCells, addCells, updateCells, table) {
10
- 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));
10
+ 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));
11
11
  let updateAfter;
12
- if (removeRows.forEach((row => {
12
+ removeRows.forEach((row => {
13
13
  removeRow(row, scene);
14
14
  })), removeRows.forEach((row => {
15
15
  scene.table.rowHeightsMap.adjustOrder(row + 1, row, scene.table.rowHeightsMap.count() - row - 1),
@@ -17,15 +17,17 @@ function updateRow(removeCells, addCells, updateCells, table) {
17
17
  })), removeRows.length && resetRowNumber(scene), scene.table._clearRowRangeHeightsMap(),
18
18
  addRows.forEach((row => {
19
19
  const needUpdateAfter = addRow(row, scene);
20
- updateAfter = updateAfter || needUpdateAfter, scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);
21
- })), resetRowNumberAndY(scene), updateCells.forEach((cell => {
22
- if (!cell) return;
23
- const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cell.col, cell.row);
20
+ updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);
21
+ })), resetRowNumberAndY(scene);
22
+ for (let col = 0; col < table.colCount; col++) updateRows.forEach((r => {
23
+ const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, r);
24
24
  if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) (0,
25
- cell_helper_1.updateCell)(col, row, scene.table, !1); else (0, cell_helper_1.updateCell)(cell.col, cell.row, scene.table, !1);
26
- })), (0, vutils_1.isNumber)(updateAfter)) {
25
+ cell_helper_1.updateCell)(col, row, scene.table, !1); else (0, cell_helper_1.updateCell)(col, r, scene.table, !1);
26
+ }));
27
+ if ((0, vutils_1.isNumber)(updateAfter)) {
27
28
  for (let col = 0; col < table.colCount; col++) for (let row = updateAfter; row < table.rowCount; row++) {
28
- scene.highPerformanceGetCell(col, row, !0).needUpdate = !0;
29
+ const cellGroup = scene.highPerformanceGetCell(col, row, !0);
30
+ cellGroup && (cellGroup.needUpdate = !0);
29
31
  }
30
32
  scene.proxy.rowUpdatePos = updateAfter;
31
33
  }
@@ -35,10 +37,19 @@ function updateRow(removeCells, addCells, updateCells, table) {
35
37
  scene.proxy.rowUpdatePos = minRow;
36
38
  }
37
39
  scene.proxy.rowUpdateDirection = "up", scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount),
38
- scene.proxy.progress();
40
+ updateBottomFrozeCellGroups(), scene.proxy.progress();
39
41
  } else removeRows.length && (scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount),
40
- scene.proxy.progress());
42
+ updateBottomFrozeCellGroups(), scene.proxy.progress());
41
43
  const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);
44
+ function updateBottomFrozeCellGroups() {
45
+ if ((null == addRows ? void 0 : addRows[(null == addRows ? void 0 : addRows.length) - 1]) >= table.rowCount - table.bottomFrozenRowCount || (null == updateRows ? void 0 : updateRows[(null == updateRows ? void 0 : updateRows.length) - 1]) >= table.rowCount - table.bottomFrozenRowCount || (null == removeRows ? void 0 : removeRows[0]) >= table.rowCount - table.bottomFrozenRowCount) {
46
+ for (let col = 0; col < table.colCount; col++) for (let row = table.rowCount - table.bottomFrozenRowCount; row < table.rowCount; row++) {
47
+ const cellGroup = scene.highPerformanceGetCell(col, row, !0);
48
+ cellGroup && (cellGroup.needUpdate = !0);
49
+ }
50
+ scene.proxy.updateBottomFrozenCellGroups();
51
+ }
52
+ }
42
53
  scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);
43
54
  }
44
55
 
@@ -68,49 +79,83 @@ function deduplication(array) {
68
79
  }
69
80
 
70
81
  function resetRowNumber(scene) {
71
- var _a, _b;
72
- for (let col = 0; col < scene.table.colCount; col++) {
73
- const headerColGroup = scene.getColGroup(col, !0), colGroup = scene.getColGroup(col, !1);
74
- if (!headerColGroup || !colGroup) continue;
75
- let rowIndex = null === (_a = headerColGroup.firstChild) || void 0 === _a ? void 0 : _a.row;
76
- headerColGroup.forEachChildren((cellGroup => {
77
- cellGroup.row = rowIndex;
78
- const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
79
- merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartRow = merge.start.row,
80
- cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndRow = merge.end.row), rowIndex++;
81
- })), rowIndex = null === (_b = colGroup.firstChild) || void 0 === _b ? void 0 : _b.row,
82
- colGroup.forEachChildren((cellGroup => {
83
- cellGroup.row = rowIndex;
84
- const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
85
- merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartRow = merge.start.row,
86
- cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndRow = merge.end.row), rowIndex++;
87
- }));
82
+ function processCell(cellGroup, rowIndex) {
83
+ cellGroup.row = rowIndex;
84
+ const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
85
+ merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartCol = merge.start.col,
86
+ cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndCol = merge.end.col);
88
87
  }
88
+ scene.bodyGroup.forEachChildren((colGroup => {
89
+ let rowIndex = scene.bodyRowStart;
90
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
91
+ processCell(cellGroup, rowIndex), rowIndex++;
92
+ }));
93
+ })), scene.rowHeaderGroup.forEachChildren((colGroup => {
94
+ let rowIndex = scene.bodyRowStart;
95
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
96
+ processCell(cellGroup, rowIndex), rowIndex++;
97
+ }));
98
+ })), scene.rightFrozenGroup.forEachChildren((colGroup => {
99
+ let rowIndex = scene.bodyRowStart;
100
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
101
+ processCell(cellGroup, rowIndex), rowIndex++;
102
+ }));
103
+ })), scene.bottomFrozenGroup.forEachChildren((colGroup => {
104
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;
105
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
106
+ processCell(cellGroup, rowIndex), rowIndex++;
107
+ }));
108
+ })), scene.leftBottomCornerGroup.forEachChildren((colGroup => {
109
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;
110
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
111
+ processCell(cellGroup, rowIndex), rowIndex++;
112
+ }));
113
+ })), scene.rightBottomCornerGroup.forEachChildren((colGroup => {
114
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;
115
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
116
+ processCell(cellGroup, rowIndex), rowIndex++;
117
+ }));
118
+ }));
89
119
  }
90
120
 
91
121
  function resetRowNumberAndY(scene) {
92
- var _a, _b;
93
- scene.table;
94
- let newTotalHeight = 0;
95
- for (let col = 0; col < scene.table.colCount; col++) {
96
- const headerColGroup = scene.getColGroup(col, !0), colGroup = scene.getColGroup(col, !1), bottomGroup = scene.getColGroupInBottom(col) || scene.getColGroupInLeftBottomCorner(col) || scene.getColGroupInRightTopCorner(col);
97
- if (!headerColGroup || !colGroup) continue;
98
- let rowIndex = null === (_a = headerColGroup.firstChild) || void 0 === _a ? void 0 : _a.row, y = 0;
99
- rowIndex = null === (_b = colGroup.firstChild) || void 0 === _b ? void 0 : _b.row;
100
- y = scene.getCellGroupY(rowIndex), colGroup.forEachChildren((cellGroup => {
101
- cellGroup.row = rowIndex;
102
- const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
103
- merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartRow = merge.start.row,
104
- cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndRow = merge.end.row), rowIndex++,
105
- "cell" === cellGroup.role && (cellGroup.setAttribute("y", y), y += cellGroup.attribute.height);
106
- })), newTotalHeight = y, null == bottomGroup || bottomGroup.forEachChildren((cellGroup => {
107
- cellGroup.row = rowIndex;
108
- const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
109
- merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartRow = merge.start.row,
110
- cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndRow = merge.end.row), rowIndex++;
111
- }));
122
+ function processCell(cellGroup, rowIndex, y) {
123
+ cellGroup.row = rowIndex, cellGroup.setAttribute("y", y);
124
+ const merge = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cellGroup.col, cellGroup.row);
125
+ merge && (cellGroup.mergeStartCol = merge.start.col, cellGroup.mergeStartCol = merge.start.col,
126
+ cellGroup.mergeEndCol = merge.end.col, cellGroup.mergeEndCol = merge.end.col);
112
127
  }
113
- return newTotalHeight;
128
+ scene.bodyGroup.forEachChildren((colGroup => {
129
+ let rowIndex = scene.bodyRowStart, y = scene.getCellGroupY(rowIndex);
130
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
131
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
132
+ }));
133
+ })), scene.rowHeaderGroup.forEachChildren((colGroup => {
134
+ let rowIndex = scene.bodyRowStart, y = scene.getCellGroupY(rowIndex);
135
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
136
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
137
+ }));
138
+ })), scene.rightFrozenGroup.forEachChildren((colGroup => {
139
+ let rowIndex = scene.bodyRowStart, y = scene.getCellGroupY(rowIndex);
140
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
141
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
142
+ }));
143
+ })), scene.bottomFrozenGroup.forEachChildren((colGroup => {
144
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount, y = 0;
145
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
146
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
147
+ }));
148
+ })), scene.leftBottomCornerGroup.forEachChildren((colGroup => {
149
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount, y = 0;
150
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
151
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
152
+ }));
153
+ })), scene.rightBottomCornerGroup.forEachChildren((colGroup => {
154
+ let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount, y = 0;
155
+ null == colGroup || colGroup.forEachChildren((cellGroup => {
156
+ processCell(cellGroup, rowIndex, y), rowIndex++, y += cellGroup.attribute.height;
157
+ }));
158
+ }));
114
159
  }
115
160
 
116
161
  function addRowCellGroup(row, scene) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAK3D,SAAgB,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;IAIpF,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QACjG,KAAK,CAAC,KAAK,CAAC,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B,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACpE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SACjC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { CellAddress } 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';\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 removeRows.forEach(row => {\n scene.table.rowHeightsMap.adjustOrder(row + 1, row, scene.table.rowHeightsMap.count() - row - 1);\n scene.table.rowHeightsMap.del(scene.table.rowHeightsMap.count() - 1);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\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 scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n // add cells\n updateCells.forEach(cell => {\n // updateRowAttr(row, scene);\n if (!cell) {\n return;\n }\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\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(cell.col, cell.row, scene.table, false);\n }\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.needUpdate = true;\n }\n }\n scene.proxy.rowUpdatePos = updateAfter;\n }\n\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = minRow;\n }\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n scene.proxy.progress();\n } else if (removeRows.length) {\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n scene.proxy.progress();\n }\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\nfunction removeRow(row: number, scene: Scenegraph) {\n removeCellGroup(row, scene);\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\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 // 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}\n\n// array deduplication\nfunction deduplication(array: number[]) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n if (result.indexOf(array[i]) === -1) {\n result.push(array[i]);\n }\n }\n return result;\n}\n\nfunction resetRowNumber(scene: Scenegraph) {\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 (!headerColGroup || !colGroup) {\n continue;\n }\n // reset row number\n let rowIndex = (headerColGroup.firstChild as Group)?.row;\n headerColGroup.forEachChildren((cellGroup: Group) => {\n // const oldRow = cellGroup.row;\n // if (isNumber(cellGroup.mergeStartRow)) {\n // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n // }\n // if (isNumber(cellGroup.mergeEndRow)) {\n // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n // }\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.mergeStartRow = merge.start.row;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndRow = merge.end.row;\n }\n rowIndex++;\n });\n rowIndex = (colGroup.firstChild as Group)?.row;\n colGroup.forEachChildren((cellGroup: Group) => {\n // const oldRow = cellGroup.row;\n // if (isNumber(cellGroup.mergeStartRow)) {\n // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n // }\n // if (isNumber(cellGroup.mergeEndRow)) {\n // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n // }\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.mergeStartRow = merge.start.row;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndRow = merge.end.row;\n }\n rowIndex++;\n });\n }\n}\n\nfunction resetRowNumberAndY(scene: Scenegraph) {\n const table = scene.table;\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const headerColGroup = scene.getColGroup(col, true);\n const colGroup = scene.getColGroup(col, false); // body, row header, right frozen\n const bottomGroup =\n scene.getColGroupInBottom(col) ||\n scene.getColGroupInLeftBottomCorner(col) ||\n scene.getColGroupInRightTopCorner(col);\n if (!headerColGroup || !colGroup) {\n continue;\n }\n // reset row number\n let rowIndex = (headerColGroup.firstChild as Group)?.row;\n let y = 0;\n rowIndex = (colGroup.firstChild as Group)?.row;\n const rowStart = rowIndex;\n y = scene.getCellGroupY(rowIndex);\n colGroup.forEachChildren((cellGroup: Group) => {\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.mergeStartRow = merge.start.row;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndRow = merge.end.row;\n }\n rowIndex++;\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n\n // update bottom frozen cell row index\n bottomGroup?.forEachChildren((cellGroup: Group) => {\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.mergeStartRow = merge.start.row;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndRow = merge.end.row;\n }\n rowIndex++;\n });\n }\n return newTotalHeight;\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 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 // // remove cellGroup in headerColGroup\n // let headerCellGroup;\n // headerColGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // headerCellGroup = cellGroup;\n // return true;\n // }\n // return false;\n // });\n // if (headerCellGroup) {\n // headerColGroup.removeChild(headerCellGroup);\n // }\n\n // remove cellGroup in colGroup\n let cellGroup;\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 }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2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CAAC;iBAQnG;aACF;SACF;KAQF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,GAAW,EAAE,KAAiB;IACrD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QAEnD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ,EAAE;YACb,SAAS;SACV;QAeD,IAAI,SAAS,CAAC;QACd,QAAQ,CAAC,eAAe,CAAC,CAAC,IAAW,EAAE,EAAE;YACvC,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,EAAE;gBACpB,SAAS,GAAG,IAAI,CAAC;gBACjB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,IAAI,SAAS,EAAE;YACb,QAAQ,CAAC,kBAAkB,CAAC,CAAE,SAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACpE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SACjC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { CellAddress } 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 type { IGraphic } from '@visactor/vrender';\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 removeRows.forEach(row => {\n scene.table.rowHeightsMap.adjustOrder(row + 1, row, scene.table.rowHeightsMap.count() - row - 1);\n scene.table.rowHeightsMap.del(scene.table.rowHeightsMap.count() - 1);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\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 scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\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 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 = updateAfter;\n }\n\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = minRow;\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 scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n }\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 removeCellGroup(row, scene);\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\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 // 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}\n\n// array deduplication\nfunction deduplication(array: number[]) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n if (result.indexOf(array[i]) === -1) {\n result.push(array[i]);\n }\n }\n return result;\n}\n\n// function resetRowNumber(scene: Scenegraph) {\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 (!headerColGroup && !colGroup) {\n// continue;\n// }\n// // reset row number\n// let rowIndex = 0; //(headerColGroup.firstChild as Group)?.row;\n// headerColGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// // rowIndex = (colGroup.firstChild as Group)?.row;\n// // rowIndex = scene.table.columnHeaderLevelCount;\n// rowIndex = scene.bodyRowStart;\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// }\n\n// function resetRowNumberAndY(scene: Scenegraph) {\n// const table = scene.table;\n// let newTotalHeight = 0;\n// for (let col = 0; col < scene.table.colCount; col++) {\n// const headerColGroup = scene.getColGroup(col, true);\n// const colGroup = scene.getColGroup(col, false); // body, row header, right frozen\n// const bottomGroup =\n// scene.getColGroupInBottom(col) ||\n// scene.getColGroupInLeftBottomCorner(col) ||\n// scene.getColGroupInRightTopCorner(col);\n// if (!headerColGroup && !colGroup && !bottomGroup) {\n// continue;\n// }\n// let y = 0;\n// // reset row number\n// // let rowIndex = (headerColGroup.firstChild as Group)?.row;\n// // headerColGroup.forEachChildren((cellGroup: Group) => {\n// // cellGroup.row = rowIndex;\n// // rowIndex++;\n// // if (cellGroup.role !== 'cell') {\n// // return;\n// // }\n// // cellGroup.setAttribute('y', y);\n// // y+= cellGroup.attribute.height;\n// // });\n// // let rowIndex = (colGroup.firstChild as Group)?.row;\n// let rowIndex = scene.bodyRowStart;\n// y = scene.getCellGroupY(rowIndex);\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// if (cellGroup.role !== 'cell') {\n// return;\n// }\n// cellGroup.setAttribute('y', y);\n// y += cellGroup.attribute.height;\n// });\n// newTotalHeight = y;\n\n// rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n// // update bottom frozen cell row index\n// bottomGroup?.forEachChildren((cellGroup: Group) => {\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// return newTotalHeight;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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 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 // // remove cellGroup in headerColGroup\n // let headerCellGroup;\n // headerColGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // headerCellGroup = cellGroup;\n // return true;\n // }\n // return false;\n // });\n // if (headerCellGroup) {\n // headerColGroup.removeChild(headerCellGroup);\n // }\n\n // remove cellGroup in colGroup\n let cellGroup;\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 }\n }\n}\n"]}
@@ -49,6 +49,8 @@ export declare class Scenegraph {
49
49
  get y(): number;
50
50
  get bodyRowStart(): number;
51
51
  get bodyRowEnd(): number;
52
+ get bodyColStart(): number;
53
+ get bodyColEnd(): number;
52
54
  initSceneGraph(): void;
53
55
  clearCells(): void;
54
56
  updateStageBackground(): void;
@@ -86,6 +88,7 @@ export declare class Scenegraph {
86
88
  deleteLastSelectedRangeComponents(): void;
87
89
  deleteAllSelectBorder(): void;
88
90
  updateCellSelectBorder(newStartCol: number, newStartRow: number, newEndCol: number, newEndRow: number): void;
91
+ recreateAllSelectRangeComponents(): void;
89
92
  updateColWidth(col: number, detaX: number, skipUpdateContainer?: boolean): void;
90
93
  updateChartSize(col: number): void;
91
94
  updateChartState(datum: any): void;
@@ -132,6 +135,8 @@ export declare class Scenegraph {
132
135
  updateCellContent(col: number, row: number): Group;
133
136
  setPixelRatio(pixelRatio: number): void;
134
137
  updateRow(removeCells: CellAddress[], addCells: CellAddress[], updateCells?: CellAddress[]): void;
138
+ updateCol(removeCells: CellAddress[], addCells: CellAddress[], updateCells?: CellAddress[]): void;
135
139
  getColumnGroupX(col: number): number;
136
140
  getCellGroupY(row: number): number;
141
+ getCellGroupX(col: number): number;
137
142
  }
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", {
10
10
  value: !0
11
11
  }), exports.Scenegraph = void 0;
12
12
 
13
- const vrender_1 = require("@visactor/vrender"), vutils_1 = require("@visactor/vutils"), get_cell_merge_1 = require("./utils/get-cell-merge"), update_width_1 = require("./layout/update-width"), table_component_1 = require("./component/table-component"), update_height_1 = require("./layout/update-height"), image_cell_1 = require("./group-creater/cell-type/image-cell"), padding_1 = require("./utils/padding"), frame_border_1 = require("./style/frame-border"), global_1 = require("../tools/global"), contributions_1 = __importDefault(require("./graphic/contributions")), get_prop_1 = require("./utils/get-prop"), proxy_1 = require("./group-creater/progress/proxy"), compute_col_width_1 = require("./layout/compute-col-width"), move_cell_1 = require("./layout/move-cell"), cell_helper_1 = require("./group-creater/cell-helper"), update_select_border_1 = require("./select/update-select-border"), create_select_border_1 = require("./select/create-select-border"), move_select_border_1 = require("./select/move-select-border"), delete_select_border_1 = require("./select/delete-select-border"), update_row_1 = require("./layout/update-row"), stick_text_1 = require("./stick-text"), compute_row_height_1 = require("./layout/compute-row-height"), empty_group_1 = require("./utils/empty-group"), frozen_1 = require("./layout/frozen"), update_chart_1 = require("./refresh-node/update-chart"), init_scenegraph_1 = require("./group-creater/init-scenegraph"), update_container_1 = require("./utils/update-container"), vrender_components_1 = require("@visactor/vrender-components"), text_measure_1 = __importDefault(require("./utils/text-measure")), icon_update_1 = require("./icon/icon-update"), env_1 = require("../tools/env"), corner_cell_1 = require("./style/corner-cell");
13
+ const vrender_1 = require("@visactor/vrender"), vutils_1 = require("@visactor/vutils"), get_cell_merge_1 = require("./utils/get-cell-merge"), update_width_1 = require("./layout/update-width"), table_component_1 = require("./component/table-component"), update_height_1 = require("./layout/update-height"), image_cell_1 = require("./group-creater/cell-type/image-cell"), padding_1 = require("./utils/padding"), frame_border_1 = require("./style/frame-border"), global_1 = require("../tools/global"), contributions_1 = __importDefault(require("./graphic/contributions")), get_prop_1 = require("./utils/get-prop"), proxy_1 = require("./group-creater/progress/proxy"), compute_col_width_1 = require("./layout/compute-col-width"), move_cell_1 = require("./layout/move-cell"), cell_helper_1 = require("./group-creater/cell-helper"), update_select_border_1 = require("./select/update-select-border"), create_select_border_1 = require("./select/create-select-border"), move_select_border_1 = require("./select/move-select-border"), delete_select_border_1 = require("./select/delete-select-border"), update_row_1 = require("./layout/update-row"), stick_text_1 = require("./stick-text"), compute_row_height_1 = require("./layout/compute-row-height"), empty_group_1 = require("./utils/empty-group"), frozen_1 = require("./layout/frozen"), update_chart_1 = require("./refresh-node/update-chart"), init_scenegraph_1 = require("./group-creater/init-scenegraph"), update_container_1 = require("./utils/update-container"), vrender_components_1 = require("@visactor/vrender-components"), text_measure_1 = __importDefault(require("./utils/text-measure")), icon_update_1 = require("./icon/icon-update"), env_1 = require("../tools/env"), corner_cell_1 = require("./style/corner-cell"), update_col_1 = require("./layout/update-col");
14
14
 
15
15
  (0, vrender_components_1.loadPoptip)(), vrender_1.container.load(contributions_1.default),
16
16
  vrender_1.container.load(text_measure_1.default);
@@ -91,11 +91,19 @@ class Scenegraph {
91
91
  }
92
92
  get bodyRowStart() {
93
93
  var _a;
94
- return this.transpose || this.isPivot ? this.table.columnHeaderLevelCount : null !== (_a = this.proxy.rowStart) && void 0 !== _a ? _a : 0;
94
+ return null !== (_a = this.proxy.rowStart) && void 0 !== _a ? _a : 0;
95
95
  }
96
96
  get bodyRowEnd() {
97
97
  var _a;
98
- return this.transpose || this.isPivot ? this.table.rowCount - 1 : null !== (_a = this.proxy.rowEnd) && void 0 !== _a ? _a : 0;
98
+ return null !== (_a = this.proxy.rowEnd) && void 0 !== _a ? _a : this.table.rowCount - 1;
99
+ }
100
+ get bodyColStart() {
101
+ var _a;
102
+ return null !== (_a = this.proxy.colStart) && void 0 !== _a ? _a : 0;
103
+ }
104
+ get bodyColEnd() {
105
+ var _a;
106
+ return null !== (_a = this.proxy.colEnd) && void 0 !== _a ? _a : this.table.colCount - 1;
99
107
  }
100
108
  initSceneGraph() {
101
109
  this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose,
@@ -290,6 +298,11 @@ class Scenegraph {
290
298
  updateCellSelectBorder(newStartCol, newStartRow, newEndCol, newEndRow) {
291
299
  (0, update_select_border_1.updateCellSelectBorder)(this, newStartCol, newStartRow, newEndCol, newEndRow);
292
300
  }
301
+ recreateAllSelectRangeComponents() {
302
+ (0, delete_select_border_1.deleteAllSelectBorder)(this), this.table.stateManager.select.ranges.forEach((cellRange => {
303
+ (0, update_select_border_1.updateCellSelectBorder)(this, cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row);
304
+ })), (0, move_select_border_1.moveSelectingRangeComponentsToSelectedRangeComponents)(this);
305
+ }
293
306
  updateColWidth(col, detaX, skipUpdateContainer) {
294
307
  (0, update_width_1.updateColWidth)(this, col, Math.round(detaX)), skipUpdateContainer || this.updateContainer();
295
308
  }
@@ -667,12 +680,20 @@ class Scenegraph {
667
680
  this.recalculateRowHeights(), this.table.stateManager.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
668
681
  this.component.updateScrollBar(), this.updateNextFrame();
669
682
  }
683
+ updateCol(removeCells, addCells, updateCells = []) {
684
+ (0, update_col_1.updateCol)(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(),
685
+ this.recalculateRowHeights(), this.table.stateManager.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
686
+ this.component.updateScrollBar(), this.updateNextFrame();
687
+ }
670
688
  getColumnGroupX(col) {
671
689
  return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.bottomFrozenRowCount, col - 1) : 0;
672
690
  }
673
691
  getCellGroupY(row) {
674
692
  return row < this.table.columnHeaderLevelCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.columnHeaderLevelCount, row - 1) : row < this.table.rowCount ? this.table.getRowsHeight(this.table.rowCount - this.table.bottomFrozenRowCount, row - 1) : 0;
675
693
  }
694
+ getCellGroupX(col) {
695
+ return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.rightFrozenColCount, col - 1) : 0;
696
+ }
676
697
  }
677
698
 
678
699
  exports.Scenegraph = Scenegraph;