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
@@ -175,7 +175,7 @@ export class Scenegraph {
175
175
  }));
176
176
  }
177
177
  clearCells() {
178
- var _a, _b;
178
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
179
179
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
180
180
  plugin.deactivate(this.stage.pluginService);
181
181
  })), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
@@ -184,7 +184,12 @@ export class Scenegraph {
184
184
  delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border,
185
185
  this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(),
186
186
  delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border,
187
- this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
187
+ this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(),
188
+ null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(),
189
+ null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(),
190
+ null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(),
191
+ null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(),
192
+ null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
188
193
  x: 0,
189
194
  y: 0,
190
195
  width: 0,
@@ -232,14 +237,64 @@ export class Scenegraph {
232
237
  width: 0,
233
238
  height: 0,
234
239
  visible: !1
240
+ }), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
241
+ x: 0,
242
+ y: 0,
243
+ width: 0,
244
+ height: 0
245
+ }), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
246
+ x: 0,
247
+ y: 0,
248
+ width: 0,
249
+ height: 0
250
+ }), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
251
+ x: 0,
252
+ y: 0,
253
+ width: 0,
254
+ height: 0,
255
+ visible: !1
256
+ }), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
257
+ x: 0,
258
+ y: 0,
259
+ width: 0,
260
+ height: 0
261
+ }), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
262
+ x: 0,
263
+ y: 0,
264
+ width: 0,
265
+ height: 0,
266
+ visible: !1
267
+ }), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
268
+ x: 0,
269
+ y: 0,
270
+ width: 0,
271
+ height: 0,
272
+ visible: !1
273
+ }), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
274
+ x: 0,
275
+ y: 0,
276
+ width: 0,
277
+ height: 0,
278
+ visible: !1
279
+ }), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
280
+ x: 0,
281
+ y: 0,
282
+ width: 0,
283
+ height: 0,
284
+ visible: !1
285
+ }), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
286
+ x: 0,
287
+ y: 0,
288
+ width: 0,
289
+ height: 0
235
290
  }), this.tableGroup.setAttributes({
236
291
  x: this.table.tableX,
237
292
  y: this.table.tableY,
238
293
  width: 0,
239
294
  height: 0
240
295
  }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
241
- delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release(),
242
- null === (_b = this.table.reactCustomLayout) || void 0 === _b || _b.clearCache();
296
+ delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
297
+ null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
243
298
  }
244
299
  updateStageBackground() {
245
300
  this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
@@ -639,29 +694,49 @@ export class Scenegraph {
639
694
  this.table.scenegraph.proxy.setY(-y, isEnd);
640
695
  }
641
696
  setBodyAndRowHeaderY(y) {
642
- var _a, _b, _c, _d, _e, _f;
643
- 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;
697
+ var _a, _b;
698
+ 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;
699
+ let lastBodyCell = null !== (_b = null == firstBodyColGroup ? void 0 : firstBodyColGroup.lastChild) && void 0 !== _b ? _b : null == firstRowHeaderColGroup ? void 0 : firstRowHeaderColGroup.lastChild;
700
+ lastBodyCell && "group" !== lastBodyCell.type && (lastBodyCell = lastBodyCell._prev),
644
701
  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)),
645
702
  this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
646
703
  this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
647
- this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
704
+ this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
705
+ this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
706
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
707
+ this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
708
+ this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
709
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
710
+ this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
711
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
648
712
  this.updateNextFrame());
649
713
  }
650
714
  setBodyAndColHeaderX(x) {
651
- const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
715
+ const firstBodyCol = this.bodyGroup.firstChild;
716
+ let lastBodyCol = this.bodyGroup.lastChild;
717
+ lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev),
652
718
  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),
653
719
  this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
654
- this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
720
+ this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
721
+ this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
722
+ this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
723
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
724
+ this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
725
+ this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
726
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
727
+ this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
728
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
655
729
  this.updateNextFrame());
656
730
  }
657
731
  afterScenegraphCreated() {
658
- var _a;
732
+ var _a, _b;
659
733
  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),
660
734
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount),
661
735
  this.component.setBottomFrozenColumnShadow(), this.component.setTopFrozenColumnShadow()),
662
736
  this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
663
737
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table),
664
738
  this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
739
+ (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
665
740
  this.updateNextFrame();
666
741
  }
667
742
  dealWidthMode() {
@@ -781,23 +856,36 @@ export class Scenegraph {
781
856
  moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
782
857
  }
783
858
  updateContainerAttrWidthAndX() {
784
- var _a, _b, _c;
785
- const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0), rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0), colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? 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 ? 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 = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
786
- this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && 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),
787
- updateContainerChildrenX(this.leftBottomCornerGroup, 0), updateContainerChildrenX(this.rightTopCornerGroup, 0),
788
- updateContainerChildrenX(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
789
- this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width),
859
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
860
+ 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();
861
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
862
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? 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 ? 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;
863
+ this.rightFrozenGroup.childrenCount > 0 && updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX),
864
+ this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && 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),
865
+ updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX),
866
+ updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX), this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
867
+ this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
790
868
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
791
- this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
869
+ this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
792
870
  this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width),
793
- this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width),
794
- this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width),
795
- this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width),
871
+ this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
872
+ this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
873
+ this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
796
874
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
797
875
  this.colHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.cornerHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop),
798
876
  this.rightTopCornerGroup.setAttribute("y", this.table.stateManager.stickyTop), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()),
799
877
  this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
800
878
  }
879
+ setFrozenColsScrollLeft(left) {
880
+ const frozenStartX = -left;
881
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX),
882
+ updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), this.updateNextFrame();
883
+ }
884
+ setRightFrozenColsScrollLeft(left) {
885
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
886
+ updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX),
887
+ updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
888
+ }
801
889
  updateContainerAttrHeightAndY() {
802
890
  var _a, _b, _c;
803
891
  for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
@@ -824,7 +912,90 @@ export class Scenegraph {
824
912
  updateContainerSync(needUpdateCellY = !1) {
825
913
  this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
826
914
  needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
827
- this.component.updateScrollBar(), this.updateNextFrame());
915
+ this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
916
+ }
917
+ syncSelectOverlayGroups() {
918
+ this.bodySelectGroup.setAttributes({
919
+ x: this.bodyGroup.attribute.x,
920
+ y: this.bodyGroup.attribute.y,
921
+ width: this.bodyGroup.attribute.width,
922
+ height: this.bodyGroup.attribute.height
923
+ }), this.rowHeaderSelectGroup.setAttributes({
924
+ x: this.rowHeaderGroup.attribute.x,
925
+ y: this.rowHeaderGroup.attribute.y,
926
+ width: this.rowHeaderGroup.attribute.width,
927
+ height: this.rowHeaderGroup.attribute.height
928
+ }), this.colHeaderSelectGroup.setAttributes({
929
+ x: this.colHeaderGroup.attribute.x,
930
+ y: this.colHeaderGroup.attribute.y,
931
+ width: this.colHeaderGroup.attribute.width,
932
+ height: this.colHeaderGroup.attribute.height
933
+ }), this.cornerHeaderSelectGroup.setAttributes({
934
+ x: this.cornerHeaderGroup.attribute.x,
935
+ y: this.cornerHeaderGroup.attribute.y,
936
+ width: this.cornerHeaderGroup.attribute.width,
937
+ height: this.cornerHeaderGroup.attribute.height
938
+ }), this.rightFrozenSelectGroup.setAttributes({
939
+ x: this.rightFrozenGroup.attribute.x,
940
+ y: this.rightFrozenGroup.attribute.y,
941
+ width: this.rightFrozenGroup.attribute.width,
942
+ height: this.rightFrozenGroup.attribute.height,
943
+ visible: this.rightFrozenGroup.attribute.visible
944
+ }), this.bottomFrozenSelectGroup.setAttributes({
945
+ x: this.bottomFrozenGroup.attribute.x,
946
+ y: this.bottomFrozenGroup.attribute.y,
947
+ width: this.bottomFrozenGroup.attribute.width,
948
+ height: this.bottomFrozenGroup.attribute.height,
949
+ visible: this.bottomFrozenGroup.attribute.visible
950
+ }), this.rightTopCornerSelectGroup.setAttributes({
951
+ x: this.rightTopCornerGroup.attribute.x,
952
+ y: this.rightTopCornerGroup.attribute.y,
953
+ width: this.rightTopCornerGroup.attribute.width,
954
+ height: this.rightTopCornerGroup.attribute.height,
955
+ visible: this.rightTopCornerGroup.attribute.visible
956
+ }), this.leftBottomCornerSelectGroup.setAttributes({
957
+ x: this.leftBottomCornerGroup.attribute.x,
958
+ y: this.leftBottomCornerGroup.attribute.y,
959
+ width: this.leftBottomCornerGroup.attribute.width,
960
+ height: this.leftBottomCornerGroup.attribute.height,
961
+ visible: this.leftBottomCornerGroup.attribute.visible
962
+ }), this.rightBottomCornerSelectGroup.setAttributes({
963
+ x: this.rightBottomCornerGroup.attribute.x,
964
+ y: this.rightBottomCornerGroup.attribute.y,
965
+ width: this.rightBottomCornerGroup.attribute.width,
966
+ height: this.rightBottomCornerGroup.attribute.height,
967
+ visible: this.rightBottomCornerGroup.attribute.visible
968
+ });
969
+ }
970
+ getSelectOverlayGroup(selectRangeType) {
971
+ switch (selectRangeType) {
972
+ case "body":
973
+ return this.bodySelectGroup;
974
+
975
+ case "rowHeader":
976
+ return this.rowHeaderSelectGroup;
977
+
978
+ case "bottomFrozen":
979
+ return this.bottomFrozenSelectGroup;
980
+
981
+ case "columnHeader":
982
+ return this.colHeaderSelectGroup;
983
+
984
+ case "rightFrozen":
985
+ return this.rightFrozenSelectGroup;
986
+
987
+ case "rightTopCorner":
988
+ return this.rightTopCornerSelectGroup;
989
+
990
+ case "leftBottomCorner":
991
+ return this.leftBottomCornerSelectGroup;
992
+
993
+ case "rightBottomCorner":
994
+ return this.rightBottomCornerSelectGroup;
995
+
996
+ default:
997
+ return this.cornerHeaderSelectGroup;
998
+ }
828
999
  }
829
1000
  updateCellContentWhileResize(col, row) {
830
1001
  var _a;