k-vtable 1.0.34 → 1.0.35

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/helper.js +1 -1
  30. package/cjs/event/listener/container-dom.js +11 -6
  31. package/cjs/event/listener/container-dom.js.map +1 -1
  32. package/cjs/event/listener/scroll-bar.js +77 -6
  33. package/cjs/event/listener/scroll-bar.js.map +1 -1
  34. package/cjs/event/listener/table-group.js +53 -23
  35. package/cjs/event/listener/table-group.js.map +1 -1
  36. package/cjs/event/media-click.js +1 -1
  37. package/cjs/event/scroll.js +35 -12
  38. package/cjs/event/scroll.js.map +1 -1
  39. package/cjs/event/sparkline-event.js +1 -1
  40. package/cjs/event/util.d.ts +2 -0
  41. package/cjs/event/util.js +29 -4
  42. package/cjs/event/util.js.map +1 -1
  43. package/cjs/header-helper/header-helper.js +2 -2
  44. package/cjs/header-helper/header-helper.js.map +1 -1
  45. package/cjs/header-helper/style.js +2 -1
  46. package/cjs/index.d.ts +3 -3
  47. package/cjs/index.js +51 -12
  48. package/cjs/index.js.map +1 -1
  49. package/cjs/layout/cell-range/simple-cell-range.js +14 -5
  50. package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
  51. package/cjs/plugins/index.js +1 -1
  52. package/cjs/plugins/interface.js +1 -1
  53. package/cjs/plugins/invert-highlight.js +1 -1
  54. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  55. package/cjs/plugins/plugin-manager.js +1 -1
  56. package/cjs/scenegraph/component/table-component.d.ts +6 -1
  57. package/cjs/scenegraph/component/table-component.js +143 -17
  58. package/cjs/scenegraph/component/table-component.js.map +1 -1
  59. package/cjs/scenegraph/component/util.js +5 -2
  60. package/cjs/scenegraph/component/util.js.map +1 -1
  61. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  62. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  63. package/cjs/scenegraph/group-creater/cell-helper.js +7 -4
  64. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  65. package/cjs/scenegraph/group-creater/init-scenegraph.js +37 -7
  66. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  67. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  68. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  69. package/cjs/scenegraph/scenegraph.d.ts +13 -0
  70. package/cjs/scenegraph/scenegraph.js +194 -23
  71. package/cjs/scenegraph/scenegraph.js.map +1 -1
  72. package/cjs/scenegraph/select/create-select-border.js +9 -10
  73. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  74. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  75. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  76. package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
  77. package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
  78. package/cjs/scenegraph/select/update-select-border.js +27 -122
  79. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  80. package/cjs/scenegraph/select/update-select-style.js.map +1 -1
  81. package/cjs/state/select/update-position.js +2 -1
  82. package/cjs/state/select/update-position.js.map +1 -1
  83. package/cjs/state/state.d.ts +8 -1
  84. package/cjs/state/state.js +82 -40
  85. package/cjs/state/state.js.map +1 -1
  86. package/cjs/ts-types/base-table.d.ts +15 -0
  87. package/cjs/ts-types/base-table.js.map +1 -1
  88. package/cjs/ts-types/dataset/aggregation.js +94 -39
  89. package/cjs/ts-types/dataset/aggregation.js.map +1 -1
  90. package/cjs/ts-types/events.d.ts +16 -0
  91. package/cjs/ts-types/events.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 +2381 -733
  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/helper.js +1 -1
  125. package/es/event/listener/container-dom.js +10 -5
  126. package/es/event/listener/container-dom.js.map +1 -1
  127. package/es/event/listener/scroll-bar.js +75 -6
  128. package/es/event/listener/scroll-bar.js.map +1 -1
  129. package/es/event/listener/table-group.js +53 -24
  130. package/es/event/listener/table-group.js.map +1 -1
  131. package/es/event/media-click.js +1 -1
  132. package/es/event/scroll.js +35 -12
  133. package/es/event/scroll.js.map +1 -1
  134. package/es/event/sparkline-event.js +1 -1
  135. package/es/event/util.d.ts +2 -0
  136. package/es/event/util.js +25 -1
  137. package/es/event/util.js.map +1 -1
  138. package/es/header-helper/header-helper.js +2 -2
  139. package/es/header-helper/header-helper.js.map +1 -1
  140. package/es/header-helper/style.js +2 -1
  141. package/es/index.d.ts +3 -3
  142. package/es/index.js +5 -3
  143. package/es/index.js.map +1 -1
  144. package/es/layout/cell-range/simple-cell-range.js +14 -5
  145. package/es/layout/cell-range/simple-cell-range.js.map +1 -1
  146. package/es/plugins/index.js +1 -1
  147. package/es/plugins/interface.js +1 -1
  148. package/es/plugins/invert-highlight.js +1 -1
  149. package/es/plugins/list-tree-stick-cell.js +1 -1
  150. package/es/plugins/plugin-manager.js +1 -1
  151. package/es/scenegraph/component/table-component.d.ts +6 -1
  152. package/es/scenegraph/component/table-component.js +141 -17
  153. package/es/scenegraph/component/table-component.js.map +1 -1
  154. package/es/scenegraph/component/util.js +5 -2
  155. package/es/scenegraph/component/util.js.map +1 -1
  156. package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  157. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  158. package/es/scenegraph/group-creater/cell-helper.js +7 -4
  159. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  160. package/es/scenegraph/group-creater/init-scenegraph.js +37 -7
  161. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  162. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  163. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  164. package/es/scenegraph/scenegraph.d.ts +13 -0
  165. package/es/scenegraph/scenegraph.js +185 -18
  166. package/es/scenegraph/scenegraph.js.map +1 -1
  167. package/es/scenegraph/select/create-select-border.js +9 -10
  168. package/es/scenegraph/select/create-select-border.js.map +1 -1
  169. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  170. package/es/scenegraph/select/move-select-border.js.map +1 -1
  171. package/es/scenegraph/select/update-custom-select-border.js +9 -9
  172. package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
  173. package/es/scenegraph/select/update-select-border.js +25 -118
  174. package/es/scenegraph/select/update-select-border.js.map +1 -1
  175. package/es/scenegraph/select/update-select-style.js.map +1 -1
  176. package/es/state/select/update-position.js +3 -0
  177. package/es/state/select/update-position.js.map +1 -1
  178. package/es/state/state.d.ts +8 -1
  179. package/es/state/state.js +81 -40
  180. package/es/state/state.js.map +1 -1
  181. package/es/ts-types/base-table.d.ts +15 -0
  182. package/es/ts-types/base-table.js.map +1 -1
  183. package/es/ts-types/dataset/aggregation.js +68 -38
  184. package/es/ts-types/dataset/aggregation.js.map +1 -1
  185. package/es/ts-types/events.d.ts +16 -0
  186. package/es/ts-types/events.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();
@@ -605,18 +660,33 @@ class Scenegraph {
605
660
  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
661
  this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
607
662
  this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
608
- this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
663
+ this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
664
+ this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
665
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
666
+ this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
667
+ this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
668
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
669
+ this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
670
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
609
671
  this.updateNextFrame());
610
672
  }
611
673
  setBodyAndColHeaderX(x) {
612
674
  const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
613
675
  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
676
  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),
677
+ this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
678
+ this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
679
+ this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
680
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
681
+ this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
682
+ this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
683
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
684
+ this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
685
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
616
686
  this.updateNextFrame());
617
687
  }
618
688
  afterScenegraphCreated() {
619
- var _a;
689
+ var _a, _b;
620
690
  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
691
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount),
622
692
  this.component.setBottomFrozenColumnShadow(), this.component.setTopFrozenColumnShadow()),
@@ -624,6 +694,7 @@ class Scenegraph {
624
694
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), (0, stick_text_1.handleTextStick)(this.table),
625
695
  this.table.options.animationAppear && (0, appear_1.dealWithAnimationAppear)(this.table),
626
696
  !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
697
+ (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
627
698
  this.updateNextFrame();
628
699
  }
629
700
  dealWidthMode() {
@@ -744,29 +815,46 @@ class Scenegraph {
744
815
  (0, move_cell_1.moveHeaderPosition)(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
745
816
  }
746
817
  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);
818
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
819
+ 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();
820
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
821
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX);
822
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? (0,
823
+ 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,
824
+ 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;
825
+ this.rightFrozenGroup.childrenCount > 0 && (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightFrozenStartX),
753
826
  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),
827
+ 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),
828
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
829
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightFrozenStartX),
830
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightFrozenStartX),
831
+ this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
832
+ this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
759
833
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
760
- this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
834
+ this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
761
835
  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),
836
+ this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
837
+ this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
838
+ this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
765
839
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
766
840
  this.colHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.cornerHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop),
767
841
  this.rightTopCornerGroup.setAttribute("y", this.table.stateManager.stickyTop), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()),
768
842
  this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
769
843
  }
844
+ setFrozenColsScrollLeft(left) {
845
+ const frozenStartX = -left;
846
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
847
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX),
848
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
849
+ this.updateNextFrame();
850
+ }
851
+ setRightFrozenColsScrollLeft(left) {
852
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
853
+ (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightStartX),
854
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightStartX),
855
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightStartX),
856
+ this.updateNextFrame();
857
+ }
770
858
  updateContainerAttrHeightAndY() {
771
859
  var _a, _b, _c;
772
860
  for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) (0, update_container_1.updateContainerChildrenY)(this.cornerHeaderGroup.children[i], 0);
@@ -796,7 +884,90 @@ class Scenegraph {
796
884
  updateContainerSync(needUpdateCellY = !1) {
797
885
  this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
798
886
  needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
799
- this.component.updateScrollBar(), this.updateNextFrame());
887
+ this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
888
+ }
889
+ syncSelectOverlayGroups() {
890
+ this.bodySelectGroup.setAttributes({
891
+ x: this.bodyGroup.attribute.x,
892
+ y: this.bodyGroup.attribute.y,
893
+ width: this.bodyGroup.attribute.width,
894
+ height: this.bodyGroup.attribute.height
895
+ }), this.rowHeaderSelectGroup.setAttributes({
896
+ x: this.rowHeaderGroup.attribute.x,
897
+ y: this.rowHeaderGroup.attribute.y,
898
+ width: this.rowHeaderGroup.attribute.width,
899
+ height: this.rowHeaderGroup.attribute.height
900
+ }), this.colHeaderSelectGroup.setAttributes({
901
+ x: this.colHeaderGroup.attribute.x,
902
+ y: this.colHeaderGroup.attribute.y,
903
+ width: this.colHeaderGroup.attribute.width,
904
+ height: this.colHeaderGroup.attribute.height
905
+ }), this.cornerHeaderSelectGroup.setAttributes({
906
+ x: this.cornerHeaderGroup.attribute.x,
907
+ y: this.cornerHeaderGroup.attribute.y,
908
+ width: this.cornerHeaderGroup.attribute.width,
909
+ height: this.cornerHeaderGroup.attribute.height
910
+ }), this.rightFrozenSelectGroup.setAttributes({
911
+ x: this.rightFrozenGroup.attribute.x,
912
+ y: this.rightFrozenGroup.attribute.y,
913
+ width: this.rightFrozenGroup.attribute.width,
914
+ height: this.rightFrozenGroup.attribute.height,
915
+ visible: this.rightFrozenGroup.attribute.visible
916
+ }), this.bottomFrozenSelectGroup.setAttributes({
917
+ x: this.bottomFrozenGroup.attribute.x,
918
+ y: this.bottomFrozenGroup.attribute.y,
919
+ width: this.bottomFrozenGroup.attribute.width,
920
+ height: this.bottomFrozenGroup.attribute.height,
921
+ visible: this.bottomFrozenGroup.attribute.visible
922
+ }), this.rightTopCornerSelectGroup.setAttributes({
923
+ x: this.rightTopCornerGroup.attribute.x,
924
+ y: this.rightTopCornerGroup.attribute.y,
925
+ width: this.rightTopCornerGroup.attribute.width,
926
+ height: this.rightTopCornerGroup.attribute.height,
927
+ visible: this.rightTopCornerGroup.attribute.visible
928
+ }), this.leftBottomCornerSelectGroup.setAttributes({
929
+ x: this.leftBottomCornerGroup.attribute.x,
930
+ y: this.leftBottomCornerGroup.attribute.y,
931
+ width: this.leftBottomCornerGroup.attribute.width,
932
+ height: this.leftBottomCornerGroup.attribute.height,
933
+ visible: this.leftBottomCornerGroup.attribute.visible
934
+ }), this.rightBottomCornerSelectGroup.setAttributes({
935
+ x: this.rightBottomCornerGroup.attribute.x,
936
+ y: this.rightBottomCornerGroup.attribute.y,
937
+ width: this.rightBottomCornerGroup.attribute.width,
938
+ height: this.rightBottomCornerGroup.attribute.height,
939
+ visible: this.rightBottomCornerGroup.attribute.visible
940
+ });
941
+ }
942
+ getSelectOverlayGroup(selectRangeType) {
943
+ switch (selectRangeType) {
944
+ case "body":
945
+ return this.bodySelectGroup;
946
+
947
+ case "rowHeader":
948
+ return this.rowHeaderSelectGroup;
949
+
950
+ case "bottomFrozen":
951
+ return this.bottomFrozenSelectGroup;
952
+
953
+ case "columnHeader":
954
+ return this.colHeaderSelectGroup;
955
+
956
+ case "rightFrozen":
957
+ return this.rightFrozenSelectGroup;
958
+
959
+ case "rightTopCorner":
960
+ return this.rightTopCornerSelectGroup;
961
+
962
+ case "leftBottomCorner":
963
+ return this.leftBottomCornerSelectGroup;
964
+
965
+ case "rightBottomCorner":
966
+ return this.rightBottomCornerSelectGroup;
967
+
968
+ default:
969
+ return this.cornerHeaderSelectGroup;
970
+ }
800
971
  }
801
972
  updateCellContentWhileResize(col, row) {
802
973
  var _a;