k-vtable 1.0.34 → 1.0.36

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 (189) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +184 -25
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.js +3 -2
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/PivotTable.d.ts +1 -0
  7. package/cjs/PivotTable.js +95 -15
  8. package/cjs/PivotTable.js.map +1 -1
  9. package/cjs/core/BaseTable.d.ts +14 -0
  10. package/cjs/core/BaseTable.js +149 -41
  11. package/cjs/core/BaseTable.js.map +1 -1
  12. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  13. package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
  14. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  15. package/cjs/core/record-helper.js +83 -13
  16. package/cjs/core/record-helper.js.map +1 -1
  17. package/cjs/core/tableHelper.js +5 -3
  18. package/cjs/core/tableHelper.js.map +1 -1
  19. package/cjs/core/utils/get-cell-position.js +23 -12
  20. package/cjs/core/utils/get-cell-position.js.map +1 -1
  21. package/cjs/data/DataSource.js +3 -2
  22. package/cjs/data/DataSource.js.map +1 -1
  23. package/cjs/dataset/dataset.js +5 -1
  24. package/cjs/dataset/dataset.js.map +1 -1
  25. package/cjs/edit/edit-manager.js +24 -16
  26. package/cjs/edit/edit-manager.js.map +1 -1
  27. package/cjs/event/EventTarget.js +3 -1
  28. package/cjs/event/EventTarget.js.map +1 -1
  29. package/cjs/event/listener/container-dom.js +50 -32
  30. package/cjs/event/listener/container-dom.js.map +1 -1
  31. package/cjs/event/listener/scroll-bar.js +77 -6
  32. package/cjs/event/listener/scroll-bar.js.map +1 -1
  33. package/cjs/event/listener/table-group.js +54 -23
  34. package/cjs/event/listener/table-group.js.map +1 -1
  35. package/cjs/event/scroll.js +34 -11
  36. package/cjs/event/scroll.js.map +1 -1
  37. package/cjs/event/util.d.ts +2 -0
  38. package/cjs/event/util.js +28 -3
  39. package/cjs/event/util.js.map +1 -1
  40. package/cjs/header-helper/header-helper.js +1 -0
  41. package/cjs/header-helper/header-helper.js.map +1 -1
  42. package/cjs/index.d.ts +3 -3
  43. package/cjs/index.js +51 -12
  44. package/cjs/index.js.map +1 -1
  45. package/cjs/layout/cell-range/simple-cell-range.js +14 -5
  46. package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
  47. package/cjs/scenegraph/component/table-component.d.ts +6 -1
  48. package/cjs/scenegraph/component/table-component.js +143 -17
  49. package/cjs/scenegraph/component/table-component.js.map +1 -1
  50. package/cjs/scenegraph/component/util.js +5 -2
  51. package/cjs/scenegraph/component/util.js.map +1 -1
  52. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  53. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  54. package/cjs/scenegraph/group-creater/cell-helper.js +7 -4
  55. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/init-scenegraph.js +37 -7
  57. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  59. package/cjs/scenegraph/group-creater/progress/proxy.js +21 -3
  60. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  61. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
  62. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  63. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +2 -1
  64. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  65. package/cjs/scenegraph/layout/update-height.js +3 -1
  66. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  67. package/cjs/scenegraph/scenegraph.d.ts +13 -0
  68. package/cjs/scenegraph/scenegraph.js +201 -26
  69. package/cjs/scenegraph/scenegraph.js.map +1 -1
  70. package/cjs/scenegraph/select/create-select-border.js +9 -10
  71. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  72. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  73. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  74. package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
  75. package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
  76. package/cjs/scenegraph/select/update-select-border.js +27 -122
  77. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  78. package/cjs/scenegraph/select/update-select-style.js.map +1 -1
  79. package/cjs/state/select/update-position.js +4 -3
  80. package/cjs/state/select/update-position.js.map +1 -1
  81. package/cjs/state/state.d.ts +8 -1
  82. package/cjs/state/state.js +82 -40
  83. package/cjs/state/state.js.map +1 -1
  84. package/cjs/ts-types/base-table.d.ts +15 -0
  85. package/cjs/ts-types/base-table.js.map +1 -1
  86. package/cjs/ts-types/dataset/aggregation.js +94 -39
  87. package/cjs/ts-types/dataset/aggregation.js.map +1 -1
  88. package/cjs/ts-types/events.d.ts +16 -0
  89. package/cjs/ts-types/events.js.map +1 -1
  90. package/cjs/ts-types/icon.d.ts +2 -2
  91. package/cjs/ts-types/icon.js.map +1 -1
  92. package/cjs/ts-types/table-engine.js.map +1 -1
  93. package/cjs/vrender.js.map +1 -1
  94. package/dist/vtable.js +2471 -762
  95. package/dist/vtable.min.js +1 -15
  96. package/es/ListTable.d.ts +1 -0
  97. package/es/ListTable.js +178 -25
  98. package/es/ListTable.js.map +1 -1
  99. package/es/PivotChart.js +2 -2
  100. package/es/PivotChart.js.map +1 -1
  101. package/es/PivotTable.d.ts +1 -0
  102. package/es/PivotTable.js +93 -15
  103. package/es/PivotTable.js.map +1 -1
  104. package/es/core/BaseTable.d.ts +14 -0
  105. package/es/core/BaseTable.js +148 -40
  106. package/es/core/BaseTable.js.map +1 -1
  107. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  108. package/es/core/TABLE_EVENT_TYPE.js +2 -0
  109. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  110. package/es/core/record-helper.js +83 -12
  111. package/es/core/record-helper.js.map +1 -1
  112. package/es/core/tableHelper.js +5 -3
  113. package/es/core/tableHelper.js.map +1 -1
  114. package/es/core/utils/get-cell-position.js +23 -12
  115. package/es/core/utils/get-cell-position.js.map +1 -1
  116. package/es/data/DataSource.js +3 -2
  117. package/es/data/DataSource.js.map +1 -1
  118. package/es/dataset/dataset.js +5 -1
  119. package/es/dataset/dataset.js.map +1 -1
  120. package/es/edit/edit-manager.js +22 -16
  121. package/es/edit/edit-manager.js.map +1 -1
  122. package/es/event/EventTarget.js +3 -1
  123. package/es/event/EventTarget.js.map +1 -1
  124. package/es/event/listener/container-dom.js +49 -31
  125. package/es/event/listener/container-dom.js.map +1 -1
  126. package/es/event/listener/scroll-bar.js +75 -6
  127. package/es/event/listener/scroll-bar.js.map +1 -1
  128. package/es/event/listener/table-group.js +54 -24
  129. package/es/event/listener/table-group.js.map +1 -1
  130. package/es/event/scroll.js +34 -11
  131. package/es/event/scroll.js.map +1 -1
  132. package/es/event/util.d.ts +2 -0
  133. package/es/event/util.js +24 -0
  134. package/es/event/util.js.map +1 -1
  135. package/es/header-helper/header-helper.js +1 -0
  136. package/es/header-helper/header-helper.js.map +1 -1
  137. package/es/index.d.ts +3 -3
  138. package/es/index.js +5 -3
  139. package/es/index.js.map +1 -1
  140. package/es/layout/cell-range/simple-cell-range.js +14 -5
  141. package/es/layout/cell-range/simple-cell-range.js.map +1 -1
  142. package/es/scenegraph/component/table-component.d.ts +6 -1
  143. package/es/scenegraph/component/table-component.js +141 -17
  144. package/es/scenegraph/component/table-component.js.map +1 -1
  145. package/es/scenegraph/component/util.js +5 -2
  146. package/es/scenegraph/component/util.js.map +1 -1
  147. package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  148. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  149. package/es/scenegraph/group-creater/cell-helper.js +7 -4
  150. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  151. package/es/scenegraph/group-creater/init-scenegraph.js +37 -7
  152. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  153. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  154. package/es/scenegraph/group-creater/progress/proxy.js +21 -3
  155. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  156. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
  157. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  158. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +2 -1
  159. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  160. package/es/scenegraph/layout/update-height.js +4 -0
  161. package/es/scenegraph/layout/update-height.js.map +1 -1
  162. package/es/scenegraph/scenegraph.d.ts +13 -0
  163. package/es/scenegraph/scenegraph.js +192 -21
  164. package/es/scenegraph/scenegraph.js.map +1 -1
  165. package/es/scenegraph/select/create-select-border.js +9 -10
  166. package/es/scenegraph/select/create-select-border.js.map +1 -1
  167. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  168. package/es/scenegraph/select/move-select-border.js.map +1 -1
  169. package/es/scenegraph/select/update-custom-select-border.js +9 -9
  170. package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
  171. package/es/scenegraph/select/update-select-border.js +25 -118
  172. package/es/scenegraph/select/update-select-border.js.map +1 -1
  173. package/es/scenegraph/select/update-select-style.js.map +1 -1
  174. package/es/state/select/update-position.js +5 -2
  175. package/es/state/select/update-position.js.map +1 -1
  176. package/es/state/state.d.ts +8 -1
  177. package/es/state/state.js +81 -40
  178. package/es/state/state.js.map +1 -1
  179. package/es/ts-types/base-table.d.ts +15 -0
  180. package/es/ts-types/base-table.js.map +1 -1
  181. package/es/ts-types/dataset/aggregation.js +68 -38
  182. package/es/ts-types/dataset/aggregation.js.map +1 -1
  183. package/es/ts-types/events.d.ts +16 -0
  184. package/es/ts-types/events.js.map +1 -1
  185. package/es/ts-types/icon.d.ts +2 -2
  186. package/es/ts-types/icon.js.map +1 -1
  187. package/es/ts-types/table-engine.js.map +1 -1
  188. package/es/vrender.js.map +1 -1
  189. package/package.json +12 -11
@@ -129,7 +129,7 @@ class Scenegraph {
129
129
  }));
130
130
  }
131
131
  clearCells() {
132
- var _a, _b;
132
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
133
133
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
134
134
  plugin.deactivate(this.stage.pluginService);
135
135
  })), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
@@ -138,7 +138,12 @@ class Scenegraph {
138
138
  delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border,
139
139
  this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(),
140
140
  delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border,
141
- this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
141
+ this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(),
142
+ null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(),
143
+ null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(),
144
+ null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(),
145
+ null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(),
146
+ null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
142
147
  x: 0,
143
148
  y: 0,
144
149
  width: 0,
@@ -186,14 +191,64 @@ class Scenegraph {
186
191
  width: 0,
187
192
  height: 0,
188
193
  visible: !1
194
+ }), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
195
+ x: 0,
196
+ y: 0,
197
+ width: 0,
198
+ height: 0
199
+ }), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
200
+ x: 0,
201
+ y: 0,
202
+ width: 0,
203
+ height: 0
204
+ }), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
205
+ x: 0,
206
+ y: 0,
207
+ width: 0,
208
+ height: 0,
209
+ visible: !1
210
+ }), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
211
+ x: 0,
212
+ y: 0,
213
+ width: 0,
214
+ height: 0
215
+ }), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
216
+ x: 0,
217
+ y: 0,
218
+ width: 0,
219
+ height: 0,
220
+ visible: !1
221
+ }), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
222
+ x: 0,
223
+ y: 0,
224
+ width: 0,
225
+ height: 0,
226
+ visible: !1
227
+ }), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
228
+ x: 0,
229
+ y: 0,
230
+ width: 0,
231
+ height: 0,
232
+ visible: !1
233
+ }), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
234
+ x: 0,
235
+ y: 0,
236
+ width: 0,
237
+ height: 0,
238
+ visible: !1
239
+ }), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
240
+ x: 0,
241
+ y: 0,
242
+ width: 0,
243
+ height: 0
189
244
  }), this.tableGroup.setAttributes({
190
245
  x: this.table.tableX,
191
246
  y: this.table.tableY,
192
247
  width: 0,
193
248
  height: 0
194
249
  }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
195
- delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release(),
196
- null === (_b = this.table.reactCustomLayout) || void 0 === _b || _b.clearCache();
250
+ delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
251
+ null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
197
252
  }
198
253
  updateStageBackground() {
199
254
  this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
@@ -600,23 +655,42 @@ class Scenegraph {
600
655
  this.table.scenegraph.proxy.setY(-y, isEnd);
601
656
  }
602
657
  setBodyAndRowHeaderY(y) {
603
- var _a, _b, _c, _d, _e, _f;
604
- const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild, lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
658
+ var _a, _b;
659
+ const firstBodyColGroup = this.bodyGroup.firstChild, firstRowHeaderColGroup = this.rowHeaderGroup.firstChild, firstBodyCell = null !== (_a = null == firstBodyColGroup ? void 0 : firstBodyColGroup.firstChild) && void 0 !== _a ? _a : null == firstRowHeaderColGroup ? void 0 : firstRowHeaderColGroup.firstChild;
660
+ let lastBodyCell = null !== (_b = null == firstBodyColGroup ? void 0 : firstBodyColGroup.lastChild) && void 0 !== _b ? _b : null == firstRowHeaderColGroup ? void 0 : firstRowHeaderColGroup.lastChild;
661
+ lastBodyCell && "group" !== lastBodyCell.type && (lastBodyCell = lastBodyCell._prev),
605
662
  0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)),
606
663
  this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
607
664
  this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
608
- this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
665
+ this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
666
+ this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
667
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
668
+ this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
669
+ this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
670
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
671
+ this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
672
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
609
673
  this.updateNextFrame());
610
674
  }
611
675
  setBodyAndColHeaderX(x) {
612
- const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
676
+ const firstBodyCol = this.bodyGroup.firstChild;
677
+ let lastBodyCol = this.bodyGroup.lastChild;
678
+ lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev),
613
679
  0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width),
614
680
  this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
615
- this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
681
+ this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
682
+ this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
683
+ this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
684
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
685
+ this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
686
+ this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
687
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
688
+ this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
689
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
616
690
  this.updateNextFrame());
617
691
  }
618
692
  afterScenegraphCreated() {
619
- var _a;
693
+ var _a, _b;
620
694
  this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
621
695
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount),
622
696
  this.component.setBottomFrozenColumnShadow(), this.component.setTopFrozenColumnShadow()),
@@ -624,6 +698,7 @@ class Scenegraph {
624
698
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), (0, stick_text_1.handleTextStick)(this.table),
625
699
  this.table.options.animationAppear && (0, appear_1.dealWithAnimationAppear)(this.table),
626
700
  !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
701
+ (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
627
702
  this.updateNextFrame();
628
703
  }
629
704
  dealWidthMode() {
@@ -744,29 +819,46 @@ class Scenegraph {
744
819
  (0, move_cell_1.moveHeaderPosition)(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
745
820
  }
746
821
  updateContainerAttrWidthAndX() {
747
- var _a, _b, _c;
748
- const cornerX = (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, 0), rowHeaderX = (0,
749
- update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, 0), colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? (0,
750
- update_container_1.updateContainerChildrenX)(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_a = this.table.frozenColCount) && void 0 !== _a ? _a : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? (0,
751
- update_container_1.updateContainerChildrenX)(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_b = this.table.frozenColCount) && void 0 !== _b ? _b : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0, rightX = (0,
752
- update_container_1.updateContainerChildrenX)(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
823
+ const frozenStartX = -(null !== (_c = null === (_b = (_a = this.table).getFrozenColsScrollLeft) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0), frozenViewportWidth = this.table.getFrozenColsWidth(), rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0), rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
824
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
825
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX);
826
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? (0,
827
+ update_container_1.updateContainerChildrenX)(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_g = this.table.frozenColCount) && void 0 !== _g ? _g : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? (0,
828
+ update_container_1.updateContainerChildrenX)(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_h = this.table.frozenColCount) && void 0 !== _h ? _h : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0;
829
+ this.rightFrozenGroup.childrenCount > 0 && (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightFrozenStartX),
753
830
  this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && (0,
754
- update_container_1.updateContainerChildrenX)(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
755
- (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, 0),
756
- (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, 0), (0,
757
- update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
758
- this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width),
831
+ update_container_1.updateContainerChildrenX)(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_j = this.table.frozenColCount) && void 0 !== _j ? _j : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
832
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
833
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightFrozenStartX),
834
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightFrozenStartX),
835
+ this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
836
+ this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
759
837
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
760
- this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
838
+ this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
761
839
  this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width),
762
- this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width),
763
- this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width),
764
- this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width),
840
+ this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
841
+ this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
842
+ this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
765
843
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
766
844
  this.colHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.cornerHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop),
767
845
  this.rightTopCornerGroup.setAttribute("y", this.table.stateManager.stickyTop), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()),
768
846
  this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
769
847
  }
848
+ setFrozenColsScrollLeft(left) {
849
+ const frozenStartX = -left;
850
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
851
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX),
852
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
853
+ this.updateNextFrame();
854
+ }
855
+ setRightFrozenColsScrollLeft(left) {
856
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
857
+ (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightStartX),
858
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightStartX),
859
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightStartX),
860
+ this.updateNextFrame();
861
+ }
770
862
  updateContainerAttrHeightAndY() {
771
863
  var _a, _b, _c;
772
864
  for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) (0, update_container_1.updateContainerChildrenY)(this.cornerHeaderGroup.children[i], 0);
@@ -796,7 +888,90 @@ class Scenegraph {
796
888
  updateContainerSync(needUpdateCellY = !1) {
797
889
  this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
798
890
  needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
799
- this.component.updateScrollBar(), this.updateNextFrame());
891
+ this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
892
+ }
893
+ syncSelectOverlayGroups() {
894
+ this.bodySelectGroup.setAttributes({
895
+ x: this.bodyGroup.attribute.x,
896
+ y: this.bodyGroup.attribute.y,
897
+ width: this.bodyGroup.attribute.width,
898
+ height: this.bodyGroup.attribute.height
899
+ }), this.rowHeaderSelectGroup.setAttributes({
900
+ x: this.rowHeaderGroup.attribute.x,
901
+ y: this.rowHeaderGroup.attribute.y,
902
+ width: this.rowHeaderGroup.attribute.width,
903
+ height: this.rowHeaderGroup.attribute.height
904
+ }), this.colHeaderSelectGroup.setAttributes({
905
+ x: this.colHeaderGroup.attribute.x,
906
+ y: this.colHeaderGroup.attribute.y,
907
+ width: this.colHeaderGroup.attribute.width,
908
+ height: this.colHeaderGroup.attribute.height
909
+ }), this.cornerHeaderSelectGroup.setAttributes({
910
+ x: this.cornerHeaderGroup.attribute.x,
911
+ y: this.cornerHeaderGroup.attribute.y,
912
+ width: this.cornerHeaderGroup.attribute.width,
913
+ height: this.cornerHeaderGroup.attribute.height
914
+ }), this.rightFrozenSelectGroup.setAttributes({
915
+ x: this.rightFrozenGroup.attribute.x,
916
+ y: this.rightFrozenGroup.attribute.y,
917
+ width: this.rightFrozenGroup.attribute.width,
918
+ height: this.rightFrozenGroup.attribute.height,
919
+ visible: this.rightFrozenGroup.attribute.visible
920
+ }), this.bottomFrozenSelectGroup.setAttributes({
921
+ x: this.bottomFrozenGroup.attribute.x,
922
+ y: this.bottomFrozenGroup.attribute.y,
923
+ width: this.bottomFrozenGroup.attribute.width,
924
+ height: this.bottomFrozenGroup.attribute.height,
925
+ visible: this.bottomFrozenGroup.attribute.visible
926
+ }), this.rightTopCornerSelectGroup.setAttributes({
927
+ x: this.rightTopCornerGroup.attribute.x,
928
+ y: this.rightTopCornerGroup.attribute.y,
929
+ width: this.rightTopCornerGroup.attribute.width,
930
+ height: this.rightTopCornerGroup.attribute.height,
931
+ visible: this.rightTopCornerGroup.attribute.visible
932
+ }), this.leftBottomCornerSelectGroup.setAttributes({
933
+ x: this.leftBottomCornerGroup.attribute.x,
934
+ y: this.leftBottomCornerGroup.attribute.y,
935
+ width: this.leftBottomCornerGroup.attribute.width,
936
+ height: this.leftBottomCornerGroup.attribute.height,
937
+ visible: this.leftBottomCornerGroup.attribute.visible
938
+ }), this.rightBottomCornerSelectGroup.setAttributes({
939
+ x: this.rightBottomCornerGroup.attribute.x,
940
+ y: this.rightBottomCornerGroup.attribute.y,
941
+ width: this.rightBottomCornerGroup.attribute.width,
942
+ height: this.rightBottomCornerGroup.attribute.height,
943
+ visible: this.rightBottomCornerGroup.attribute.visible
944
+ });
945
+ }
946
+ getSelectOverlayGroup(selectRangeType) {
947
+ switch (selectRangeType) {
948
+ case "body":
949
+ return this.bodySelectGroup;
950
+
951
+ case "rowHeader":
952
+ return this.rowHeaderSelectGroup;
953
+
954
+ case "bottomFrozen":
955
+ return this.bottomFrozenSelectGroup;
956
+
957
+ case "columnHeader":
958
+ return this.colHeaderSelectGroup;
959
+
960
+ case "rightFrozen":
961
+ return this.rightFrozenSelectGroup;
962
+
963
+ case "rightTopCorner":
964
+ return this.rightTopCornerSelectGroup;
965
+
966
+ case "leftBottomCorner":
967
+ return this.leftBottomCornerSelectGroup;
968
+
969
+ case "rightBottomCorner":
970
+ return this.rightBottomCornerSelectGroup;
971
+
972
+ default:
973
+ return this.cornerHeaderSelectGroup;
974
+ }
800
975
  }
801
976
  updateCellContentWhileResize(col, row) {
802
977
  var _a;