@visactor/vtable 1.24.0 → 1.25.1-alpha.0

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 (103) hide show
  1. package/cjs/core/BaseTable.d.ts +7 -0
  2. package/cjs/core/BaseTable.js +100 -34
  3. package/cjs/core/BaseTable.js.map +1 -1
  4. package/cjs/core/tableHelper.js +5 -3
  5. package/cjs/core/tableHelper.js.map +1 -1
  6. package/cjs/core/utils/get-cell-position.js +23 -12
  7. package/cjs/core/utils/get-cell-position.js.map +1 -1
  8. package/cjs/event/listener/container-dom.js +7 -5
  9. package/cjs/event/listener/container-dom.js.map +1 -1
  10. package/cjs/event/listener/scroll-bar.js +77 -6
  11. package/cjs/event/listener/scroll-bar.js.map +1 -1
  12. package/cjs/event/listener/table-group.js +29 -20
  13. package/cjs/event/listener/table-group.js.map +1 -1
  14. package/cjs/event/scroll.js +34 -11
  15. package/cjs/event/scroll.js.map +1 -1
  16. package/cjs/event/util.d.ts +2 -0
  17. package/cjs/event/util.js +28 -3
  18. package/cjs/event/util.js.map +1 -1
  19. package/cjs/index.d.ts +1 -1
  20. package/cjs/index.js +1 -1
  21. package/cjs/index.js.map +1 -1
  22. package/cjs/scenegraph/component/table-component.d.ts +6 -1
  23. package/cjs/scenegraph/component/table-component.js +143 -16
  24. package/cjs/scenegraph/component/table-component.js.map +1 -1
  25. package/cjs/scenegraph/component/util.js +5 -2
  26. package/cjs/scenegraph/component/util.js.map +1 -1
  27. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  28. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  29. package/cjs/scenegraph/group-creater/init-scenegraph.js +36 -6
  30. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  32. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  33. package/cjs/scenegraph/scenegraph.d.ts +13 -0
  34. package/cjs/scenegraph/scenegraph.js +194 -23
  35. package/cjs/scenegraph/scenegraph.js.map +1 -1
  36. package/cjs/scenegraph/select/create-select-border.js +9 -10
  37. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  38. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  39. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  40. package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
  41. package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
  42. package/cjs/scenegraph/select/update-select-border.js +14 -73
  43. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  44. package/cjs/scenegraph/select/update-select-style.js.map +1 -1
  45. package/cjs/state/state.d.ts +7 -1
  46. package/cjs/state/state.js +61 -28
  47. package/cjs/state/state.js.map +1 -1
  48. package/cjs/ts-types/base-table.d.ts +10 -0
  49. package/cjs/ts-types/base-table.js.map +1 -1
  50. package/cjs/vrender.js.map +1 -1
  51. package/dist/vtable.js +1148 -327
  52. package/dist/vtable.min.js +2 -2
  53. package/es/core/BaseTable.d.ts +7 -0
  54. package/es/core/BaseTable.js +99 -33
  55. package/es/core/BaseTable.js.map +1 -1
  56. package/es/core/tableHelper.js +5 -3
  57. package/es/core/tableHelper.js.map +1 -1
  58. package/es/core/utils/get-cell-position.js +23 -12
  59. package/es/core/utils/get-cell-position.js.map +1 -1
  60. package/es/event/listener/container-dom.js +7 -5
  61. package/es/event/listener/container-dom.js.map +1 -1
  62. package/es/event/listener/scroll-bar.js +75 -6
  63. package/es/event/listener/scroll-bar.js.map +1 -1
  64. package/es/event/listener/table-group.js +29 -21
  65. package/es/event/listener/table-group.js.map +1 -1
  66. package/es/event/scroll.js +34 -11
  67. package/es/event/scroll.js.map +1 -1
  68. package/es/event/util.d.ts +2 -0
  69. package/es/event/util.js +24 -0
  70. package/es/event/util.js.map +1 -1
  71. package/es/index.d.ts +1 -1
  72. package/es/index.js +1 -1
  73. package/es/index.js.map +1 -1
  74. package/es/scenegraph/component/table-component.d.ts +6 -1
  75. package/es/scenegraph/component/table-component.js +141 -16
  76. package/es/scenegraph/component/table-component.js.map +1 -1
  77. package/es/scenegraph/component/util.js +5 -2
  78. package/es/scenegraph/component/util.js.map +1 -1
  79. package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  80. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  81. package/es/scenegraph/group-creater/init-scenegraph.js +36 -6
  82. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  83. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  84. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  85. package/es/scenegraph/scenegraph.d.ts +13 -0
  86. package/es/scenegraph/scenegraph.js +185 -18
  87. package/es/scenegraph/scenegraph.js.map +1 -1
  88. package/es/scenegraph/select/create-select-border.js +9 -10
  89. package/es/scenegraph/select/create-select-border.js.map +1 -1
  90. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  91. package/es/scenegraph/select/move-select-border.js.map +1 -1
  92. package/es/scenegraph/select/update-custom-select-border.js +9 -9
  93. package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
  94. package/es/scenegraph/select/update-select-border.js +14 -73
  95. package/es/scenegraph/select/update-select-border.js.map +1 -1
  96. package/es/scenegraph/select/update-select-style.js.map +1 -1
  97. package/es/state/state.d.ts +7 -1
  98. package/es/state/state.js +61 -28
  99. package/es/state/state.js.map +1 -1
  100. package/es/ts-types/base-table.d.ts +10 -0
  101. package/es/ts-types/base-table.js.map +1 -1
  102. package/es/vrender.js.map +1 -1
  103. package/package.json +9 -9
@@ -164,6 +164,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
164
164
  set heightAdaptiveMode(heightAdaptiveMode: HeightAdaptiveModeDef);
165
165
  _colWidthDefineToPxWidth(width: string | number): number;
166
166
  _getMaxFrozenWidth(): number;
167
+ _getMaxRightFrozenWidth(): number;
167
168
  _getComputedFrozenColCount(frozenColCount: number): number;
168
169
  private _getColWidthLimits;
169
170
  _adjustColWidth(col: number, orgWidth: number): number;
@@ -275,8 +276,14 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
275
276
  renderWithRecreateCells(): void;
276
277
  getFrozenRowsHeight(): number;
277
278
  getFrozenColsWidth(): number;
279
+ getFrozenColsContentWidth(): number;
280
+ getFrozenColsOffset(): number;
281
+ getFrozenColsScrollLeft(): number;
278
282
  getBottomFrozenRowsHeight(): number;
279
283
  getRightFrozenColsWidth(): number;
284
+ getRightFrozenColsContentWidth(): number;
285
+ getRightFrozenColsOffset(): number;
286
+ getRightFrozenColsScrollLeft(): number;
280
287
  getDrawRange(): Rect;
281
288
  _getMouseAbstractPoint(evt: TouchEvent | MouseEvent | undefined): {
282
289
  x: number;
@@ -45,9 +45,19 @@ class BaseTable extends EventTarget_1.EventTarget {
45
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
46
46
  if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
47
47
  this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
48
- this.version = "1.24.0", this.id = `VTable${Date.now()}`, this.isReleased = !1,
48
+ this.version = "1.25.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1,
49
49
  this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
50
- "node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
50
+ "undefined" != typeof window) {
51
+ const g = window;
52
+ g[this.id] = this;
53
+ const registry = g.__vtable__ || (g.__vtable__ = {
54
+ byId: Object.create(null),
55
+ list: [],
56
+ last: null
57
+ });
58
+ registry.byId[this.id] = this, registry.list.push(this), registry.last = this, g.__vtable_last_id__ = this.id;
59
+ }
60
+ if ("node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
51
61
  container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
52
62
  this.pluginManager = new plugin_manager_1.PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.BEFORE_INIT, {
53
63
  options: options,
@@ -87,10 +97,14 @@ class BaseTable extends EventTarget_1.EventTarget {
87
97
  void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
88
98
  this.options.canvas ? ("node" !== env_1.Env.mode && (internalProps.element = this.options.canvas.parentElement,
89
99
  internalProps.element.style.position = "relative"), internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
90
- internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== env_1.Env.mode && (internalProps.element = (0,
100
+ internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d"),
101
+ internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id,
102
+ internalProps.element && (internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id)) : "node" !== env_1.Env.mode && (internalProps.element = (0,
91
103
  tableHelper_1.createRootElement)(this.padding), internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
92
104
  internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
93
- internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && (0,
105
+ internalProps.context = internalProps.canvas.getContext("2d"), internalProps.canvas.__vtable__ = this,
106
+ internalProps.canvas.__vtable_id__ = this.id, internalProps.element.__vtable__ = this,
107
+ internalProps.element.__vtable_id__ = this.id, (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && (0,
94
108
  frozen_react_1.createReactContainer)(this)), internalProps.handler = new EventHandler_1.EventHandler,
95
109
  (0, vutils_1.isNumber)(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime),
96
110
  internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount,
@@ -255,7 +269,7 @@ class BaseTable extends EventTarget_1.EventTarget {
255
269
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
256
270
  this.options.frozenColCount = frozenColCount;
257
271
  const maxFrozenWidth = this._getMaxFrozenWidth();
258
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
272
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
259
273
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
260
274
  this.internalProps.frozenColCount = computedFrozenColCount;
261
275
  }
@@ -265,7 +279,7 @@ class BaseTable extends EventTarget_1.EventTarget {
265
279
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
266
280
  this.options.frozenColCount = frozenColCount;
267
281
  const maxFrozenWidth = this._getMaxFrozenWidth();
268
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
282
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
269
283
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
270
284
  this.internalProps.frozenColCount = computedFrozenColCount;
271
285
  }
@@ -420,6 +434,11 @@ class BaseTable extends EventTarget_1.EventTarget {
420
434
  const maxFrozenWidth = null !== (_a = this.options.maxFrozenWidth) && void 0 !== _a ? _a : "80%";
421
435
  return (0, tableHelper_1._toPxWidth)(this, maxFrozenWidth);
422
436
  }
437
+ _getMaxRightFrozenWidth() {
438
+ var _a, _b;
439
+ const maxRightFrozenWidth = null !== (_b = null !== (_a = this.options.maxRightFrozenWidth) && void 0 !== _a ? _a : this.options.maxFrozenWidth) && void 0 !== _b ? _b : "80%";
440
+ return (0, tableHelper_1._toPxWidth)(this, maxRightFrozenWidth);
441
+ }
423
442
  _getComputedFrozenColCount(frozenColCount) {
424
443
  const maxFrozenWidth = this._getMaxFrozenWidth();
425
444
  let computedfrozenColCount = frozenColCount;
@@ -744,22 +763,27 @@ class BaseTable extends EventTarget_1.EventTarget {
744
763
  let relativeX = !0, relativeY = !0;
745
764
  (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
746
765
  relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
747
- const cellRect = this.getCellRect(col, row);
748
- return this._toRelativeRect(cellRect, relativeX, relativeY);
766
+ const cellRect = this.getCellRect(col, row), rect = this._toRelativeRect(cellRect, relativeX, relativeY);
767
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(col, row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
768
+ rect;
749
769
  }
750
770
  getCellRangeRelativeRect(range) {
751
771
  if (range.start) {
752
772
  const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
753
773
  let relativeX = !0, relativeY = !0;
754
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
755
- relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1),
756
- this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
774
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
775
+ relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
776
+ const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
777
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.start.col, range.start.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
778
+ rect;
757
779
  }
758
780
  const cellRange = this.getCellRange(range.col, range.row), isFrozenCell = this.isFrozenCell(range.col, range.row);
759
781
  let relativeX = !0, relativeY = !0;
760
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
761
- relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1),
762
- this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
782
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
783
+ relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
784
+ const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
785
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.col, range.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
786
+ rect;
763
787
  }
764
788
  getVisibleCellRangeRelativeRect(range) {
765
789
  let cellRange;
@@ -861,7 +885,7 @@ class BaseTable extends EventTarget_1.EventTarget {
861
885
  }
862
886
  getVisibleRect() {
863
887
  const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, width = this.tableNoFrameWidth, height = this.tableNoFrameHeight;
864
- return new Rect_1.Rect(scrollLeft, scrollTop, width, height);
888
+ return new Rect_1.Rect(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
865
889
  }
866
890
  get visibleRowCount() {
867
891
  const {frozenRowCount: frozenRowCount} = this, visibleRect = this.getVisibleRect(), visibleTop = frozenRowCount > 0 ? visibleRect.top + this.getRowsHeight(0, frozenRowCount - 1) : visibleRect.top, initRow = this.getTargetRowAt(visibleTop);
@@ -877,7 +901,7 @@ class BaseTable extends EventTarget_1.EventTarget {
877
901
  return count;
878
902
  }
879
903
  getBodyVisibleCellRange() {
880
- const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, frozenRowsHeight = this.getFrozenRowsHeight(), frozenColsWidth = this.getFrozenColsWidth(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1, colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
904
+ const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, frozenRowsHeight = this.getFrozenRowsHeight(), frozenColsContentWidth = this.getFrozenColsContentWidth(), frozenColsOffset = this.getFrozenColsOffset(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1), {col: colStart} = this.getColAt(scrollLeft + frozenColsContentWidth + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1, colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
881
905
  return colEnd < 0 || rowEnd < 0 ? null : {
882
906
  rowStart: rowStart,
883
907
  colStart: colStart,
@@ -893,14 +917,14 @@ class BaseTable extends EventTarget_1.EventTarget {
893
917
  };
894
918
  }
895
919
  getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
896
- const {scrollLeft: scrollLeft} = this, frozenColsWidth = this.getFrozenColsWidth(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
920
+ const {scrollLeft: scrollLeft} = this, frozenColsContentWidth = this.getFrozenColsContentWidth(), frozenColsOffset = this.getFrozenColsOffset(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsContentWidth + 1 + start_deltaX), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
897
921
  return colEnd < 0 ? null : {
898
922
  colStart: colStart,
899
923
  colEnd: colEnd
900
924
  };
901
925
  }
902
926
  get visibleColCount() {
903
- const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getColsWidth(0, frozenColCount - 1) : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
927
+ const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
904
928
  if (!initCol) return 0;
905
929
  const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
906
930
  let absoluteLeft = this.getColsWidth(0, startCol - 1), count = 0;
@@ -950,29 +974,43 @@ class BaseTable extends EventTarget_1.EventTarget {
950
974
  this._scrollToRowCorrectTimer && (clearTimeout(this._scrollToRowCorrectTimer), this._scrollToRowCorrectTimer = null);
951
975
  }
952
976
  release() {
953
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
954
- null === (_c = null === (_b = null === (_a = this.scenegraph) || void 0 === _a ? void 0 : _a.component) || void 0 === _b ? void 0 : _b.vScrollBar) || void 0 === _c || _c.release(),
955
- null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.hScrollBar) || void 0 === _f || _f.release(),
956
- this.animationManager.clear(), this.animationManager.ticker.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.stage) || void 0 === _h ? void 0 : _h.ticker) || void 0 === _j || _j.release();
957
- const internalProps = this.internalProps;
977
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
978
+ if ("undefined" != typeof window) {
979
+ const g = window;
980
+ (null == g ? void 0 : g[this.id]) === this ? delete g[this.id] : (null == g ? void 0 : g[this.id]) && (g[this.id] = null);
981
+ const registry = null == g ? void 0 : g.__vtable__;
982
+ (null === (_a = null == registry ? void 0 : registry.byId) || void 0 === _a ? void 0 : _a[this.id]) === this && delete registry.byId[this.id];
983
+ const list = null == registry ? void 0 : registry.list;
984
+ if (Array.isArray(list) && list.length) for (let i = list.length - 1; i >= 0; i--) list[i] === this && list.splice(i, 1);
985
+ (null == registry ? void 0 : registry.last) === this && (registry.last = Array.isArray(list) && list.length ? list[list.length - 1] : null),
986
+ (null == g ? void 0 : g.__vtable_last_id__) === this.id && (g.__vtable_last_id__ = null !== (_c = null === (_b = null == registry ? void 0 : registry.last) || void 0 === _b ? void 0 : _b.id) && void 0 !== _c ? _c : null);
987
+ }
958
988
  if (this.isReleased) return;
959
- this.clearCorrectTimer(), null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k),
960
- null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m),
961
- null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(),
962
- null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q),
963
- this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s),
964
- null === (_u = internalProps.legends) || void 0 === _u || _u.forEach((legend => {
989
+ null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.vScrollBar) || void 0 === _f || _f.release(),
990
+ null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.component) || void 0 === _h ? void 0 : _h.hScrollBar) || void 0 === _j || _j.release(),
991
+ this.animationManager.clear(), this.animationManager.ticker.release(), null === (_m = null === (_l = null === (_k = this.scenegraph) || void 0 === _k ? void 0 : _k.stage) || void 0 === _l ? void 0 : _l.ticker) || void 0 === _m || _m.release();
992
+ const internalProps = this.internalProps, canvas = null == internalProps ? void 0 : internalProps.canvas;
993
+ (null == canvas ? void 0 : canvas.__vtable__) === this && (delete canvas.__vtable__,
994
+ delete canvas.__vtable_id__);
995
+ const element = null == internalProps ? void 0 : internalProps.element;
996
+ (null == element ? void 0 : element.__vtable__) === this && (delete element.__vtable__,
997
+ delete element.__vtable_id__), this.clearCorrectTimer(), null === (_p = null === (_o = internalProps.tooltipHandler) || void 0 === _o ? void 0 : _o.release) || void 0 === _p || _p.call(_o),
998
+ null === (_r = null === (_q = internalProps.menuHandler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q),
999
+ null === (_s = super.release) || void 0 === _s || _s.call(this), this.pluginManager.release(),
1000
+ null === (_u = null === (_t = internalProps.handler) || void 0 === _t ? void 0 : _t.release) || void 0 === _u || _u.call(_t),
1001
+ this.eventManager.release(), null === (_w = null === (_v = internalProps.focusControl) || void 0 === _v ? void 0 : _v.release) || void 0 === _w || _w.call(_v),
1002
+ null === (_x = internalProps.legends) || void 0 === _x || _x.forEach((legend => {
965
1003
  null == legend || legend.release();
966
- })), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null,
967
- null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null,
1004
+ })), null === (_y = internalProps.title) || void 0 === _y || _y.release(), internalProps.title = null,
1005
+ null === (_z = internalProps.emptyTip) || void 0 === _z || _z.release(), internalProps.emptyTip = null,
968
1006
  internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
969
1007
  var _a;
970
1008
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
971
1009
  })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
972
- const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
1010
+ const parentElement = null === (_0 = internalProps.element) || void 0 === _0 ? void 0 : _0.parentElement;
973
1011
  parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
974
- null === (_0 = null === (_z = null === (_y = this.editorManager) || void 0 === _y ? void 0 : _y.editingEditor) || void 0 === _z ? void 0 : _z.onEnd) || void 0 === _0 || _0.call(_z),
975
- this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(),
1012
+ null === (_3 = null === (_2 = null === (_1 = this.editorManager) || void 0 === _1 ? void 0 : _1.editingEditor) || void 0 === _2 ? void 0 : _2.onEnd) || void 0 === _3 || _3.call(_2),
1013
+ this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_4 = this.reactCustomLayout) || void 0 === _4 || _4.clearCache(),
976
1014
  (0, chart_render_helper_1.clearChartRenderQueue)();
977
1015
  }
978
1016
  fireListeners(type, event) {
@@ -1102,8 +1140,22 @@ class BaseTable extends EventTarget_1.EventTarget {
1102
1140
  return this.getRowsHeight(0, this.frozenRowCount - 1);
1103
1141
  }
1104
1142
  getFrozenColsWidth() {
1143
+ const contentWidth = this.getFrozenColsContentWidth();
1144
+ if (!this.options.scrollFrozenCols) return contentWidth;
1145
+ const maxFrozenWidth = this._getMaxFrozenWidth();
1146
+ return Math.min(contentWidth, maxFrozenWidth);
1147
+ }
1148
+ getFrozenColsContentWidth() {
1105
1149
  return this.getColsWidth(0, this.frozenColCount - 1);
1106
1150
  }
1151
+ getFrozenColsOffset() {
1152
+ const contentWidth = this.getFrozenColsContentWidth(), viewportWidth = this.getFrozenColsWidth();
1153
+ return Math.max(0, contentWidth - viewportWidth);
1154
+ }
1155
+ getFrozenColsScrollLeft() {
1156
+ var _a;
1157
+ return null !== (_a = this.stateManager.scroll.frozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
1158
+ }
1107
1159
  getBottomFrozenRowsHeight() {
1108
1160
  if (this.bottomFrozenRowCount > 0) {
1109
1161
  let height = 0;
@@ -1113,6 +1165,12 @@ class BaseTable extends EventTarget_1.EventTarget {
1113
1165
  return 0;
1114
1166
  }
1115
1167
  getRightFrozenColsWidth() {
1168
+ const contentWidth = this.getRightFrozenColsContentWidth();
1169
+ if (!this.options.scrollRightFrozenCols) return contentWidth;
1170
+ const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
1171
+ return Math.min(contentWidth, maxRightFrozenWidth);
1172
+ }
1173
+ getRightFrozenColsContentWidth() {
1116
1174
  if (this.rightFrozenColCount > 0) {
1117
1175
  let width = 0;
1118
1176
  for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) width += this.getColWidth(col);
@@ -1120,6 +1178,14 @@ class BaseTable extends EventTarget_1.EventTarget {
1120
1178
  }
1121
1179
  return 0;
1122
1180
  }
1181
+ getRightFrozenColsOffset() {
1182
+ const contentWidth = this.getRightFrozenColsContentWidth(), viewportWidth = this.getRightFrozenColsWidth();
1183
+ return Math.max(0, contentWidth - viewportWidth);
1184
+ }
1185
+ getRightFrozenColsScrollLeft() {
1186
+ var _a;
1187
+ return null !== (_a = this.stateManager.scroll.rightFrozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
1188
+ }
1123
1189
  getDrawRange() {
1124
1190
  var _a, _b;
1125
1191
  const width = (null === (_a = this.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.tableNoFrameWidth : Math.min(this.tableNoFrameWidth, this.getAllColsWidth()), height = (null === (_b = this.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.tableNoFrameHeight : Math.min(this.tableNoFrameHeight, this.getAllRowsHeight());