@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;
@@ -92,9 +92,19 @@ export class BaseTable extends EventTarget {
92
92
  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;
93
93
  if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
94
94
  this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
95
- this.version = "1.24.0", this.id = `VTable${Date.now()}`, this.isReleased = !1,
95
+ this.version = "1.25.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1,
96
96
  this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
97
- "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
97
+ "undefined" != typeof window) {
98
+ const g = window;
99
+ g[this.id] = this;
100
+ const registry = g.__vtable__ || (g.__vtable__ = {
101
+ byId: Object.create(null),
102
+ list: [],
103
+ last: null
104
+ });
105
+ registry.byId[this.id] = this, registry.list.push(this), registry.last = this, g.__vtable_last_id__ = this.id;
106
+ }
107
+ if ("node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
98
108
  container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
99
109
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
100
110
  options: options,
@@ -132,9 +142,13 @@ export class BaseTable extends EventTarget {
132
142
  void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
133
143
  this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement,
134
144
  internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element),
135
- internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding),
145
+ internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d"),
146
+ internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id,
147
+ internalProps.element && (internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id)) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding),
136
148
  internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"),
137
149
  internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"),
150
+ internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id,
151
+ internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id,
138
152
  (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)),
139
153
  internalProps.handler = new EventHandler, isNumber(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime),
140
154
  internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount,
@@ -299,7 +313,7 @@ export class BaseTable extends EventTarget {
299
313
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
300
314
  this.options.frozenColCount = frozenColCount;
301
315
  const maxFrozenWidth = this._getMaxFrozenWidth();
302
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
316
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
303
317
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
304
318
  this.internalProps.frozenColCount = computedFrozenColCount;
305
319
  }
@@ -309,7 +323,7 @@ export class BaseTable extends EventTarget {
309
323
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
310
324
  this.options.frozenColCount = frozenColCount;
311
325
  const maxFrozenWidth = this._getMaxFrozenWidth();
312
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
326
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
313
327
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
314
328
  this.internalProps.frozenColCount = computedFrozenColCount;
315
329
  }
@@ -464,6 +478,11 @@ export class BaseTable extends EventTarget {
464
478
  const maxFrozenWidth = null !== (_a = this.options.maxFrozenWidth) && void 0 !== _a ? _a : "80%";
465
479
  return _toPxWidth(this, maxFrozenWidth);
466
480
  }
481
+ _getMaxRightFrozenWidth() {
482
+ var _a, _b;
483
+ const maxRightFrozenWidth = null !== (_b = null !== (_a = this.options.maxRightFrozenWidth) && void 0 !== _a ? _a : this.options.maxFrozenWidth) && void 0 !== _b ? _b : "80%";
484
+ return _toPxWidth(this, maxRightFrozenWidth);
485
+ }
467
486
  _getComputedFrozenColCount(frozenColCount) {
468
487
  const maxFrozenWidth = this._getMaxFrozenWidth();
469
488
  let computedfrozenColCount = frozenColCount;
@@ -786,22 +805,27 @@ export class BaseTable extends EventTarget {
786
805
  let relativeX = !0, relativeY = !0;
787
806
  (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
788
807
  relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
789
- const cellRect = this.getCellRect(col, row);
790
- return this._toRelativeRect(cellRect, relativeX, relativeY);
808
+ const cellRect = this.getCellRect(col, row), rect = this._toRelativeRect(cellRect, relativeX, relativeY);
809
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(col, row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
810
+ rect;
791
811
  }
792
812
  getCellRangeRelativeRect(range) {
793
813
  if (range.start) {
794
814
  const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
795
815
  let relativeX = !0, relativeY = !0;
796
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
797
- relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1),
798
- this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
816
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
817
+ relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
818
+ const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
819
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.start.col, range.start.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
820
+ rect;
799
821
  }
800
822
  const cellRange = this.getCellRange(range.col, range.row), isFrozenCell = this.isFrozenCell(range.col, range.row);
801
823
  let relativeX = !0, relativeY = !0;
802
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
803
- relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1),
804
- this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
824
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
825
+ relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
826
+ const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
827
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.col, range.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
828
+ rect;
805
829
  }
806
830
  getVisibleCellRangeRelativeRect(range) {
807
831
  let cellRange;
@@ -903,7 +927,7 @@ export class BaseTable extends EventTarget {
903
927
  }
904
928
  getVisibleRect() {
905
929
  const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, width = this.tableNoFrameWidth, height = this.tableNoFrameHeight;
906
- return new Rect(scrollLeft, scrollTop, width, height);
930
+ return new Rect(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
907
931
  }
908
932
  get visibleRowCount() {
909
933
  const {frozenRowCount: frozenRowCount} = this, visibleRect = this.getVisibleRect(), visibleTop = frozenRowCount > 0 ? visibleRect.top + this.getRowsHeight(0, frozenRowCount - 1) : visibleRect.top, initRow = this.getTargetRowAt(visibleTop);
@@ -919,7 +943,7 @@ export class BaseTable extends EventTarget {
919
943
  return count;
920
944
  }
921
945
  getBodyVisibleCellRange() {
922
- 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;
946
+ 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;
923
947
  return colEnd < 0 || rowEnd < 0 ? null : {
924
948
  rowStart: rowStart,
925
949
  colStart: colStart,
@@ -935,14 +959,14 @@ export class BaseTable extends EventTarget {
935
959
  };
936
960
  }
937
961
  getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
938
- 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;
962
+ 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;
939
963
  return colEnd < 0 ? null : {
940
964
  colStart: colStart,
941
965
  colEnd: colEnd
942
966
  };
943
967
  }
944
968
  get visibleColCount() {
945
- const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getColsWidth(0, frozenColCount - 1) : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
969
+ const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
946
970
  if (!initCol) return 0;
947
971
  const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
948
972
  let absoluteLeft = this.getColsWidth(0, startCol - 1), count = 0;
@@ -992,29 +1016,43 @@ export class BaseTable extends EventTarget {
992
1016
  this._scrollToRowCorrectTimer && (clearTimeout(this._scrollToRowCorrectTimer), this._scrollToRowCorrectTimer = null);
993
1017
  }
994
1018
  release() {
995
- 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;
996
- 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(),
997
- 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(),
998
- 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();
999
- const internalProps = this.internalProps;
1019
+ 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;
1020
+ if ("undefined" != typeof window) {
1021
+ const g = window;
1022
+ (null == g ? void 0 : g[this.id]) === this ? delete g[this.id] : (null == g ? void 0 : g[this.id]) && (g[this.id] = null);
1023
+ const registry = null == g ? void 0 : g.__vtable__;
1024
+ (null === (_a = null == registry ? void 0 : registry.byId) || void 0 === _a ? void 0 : _a[this.id]) === this && delete registry.byId[this.id];
1025
+ const list = null == registry ? void 0 : registry.list;
1026
+ if (Array.isArray(list) && list.length) for (let i = list.length - 1; i >= 0; i--) list[i] === this && list.splice(i, 1);
1027
+ (null == registry ? void 0 : registry.last) === this && (registry.last = Array.isArray(list) && list.length ? list[list.length - 1] : null),
1028
+ (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);
1029
+ }
1000
1030
  if (this.isReleased) return;
1001
- this.clearCorrectTimer(), null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k),
1002
- null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m),
1003
- null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(),
1004
- null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q),
1005
- this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s),
1006
- null === (_u = internalProps.legends) || void 0 === _u || _u.forEach((legend => {
1031
+ 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(),
1032
+ 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(),
1033
+ 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();
1034
+ const internalProps = this.internalProps, canvas = null == internalProps ? void 0 : internalProps.canvas;
1035
+ (null == canvas ? void 0 : canvas.__vtable__) === this && (delete canvas.__vtable__,
1036
+ delete canvas.__vtable_id__);
1037
+ const element = null == internalProps ? void 0 : internalProps.element;
1038
+ (null == element ? void 0 : element.__vtable__) === this && (delete element.__vtable__,
1039
+ 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),
1040
+ null === (_r = null === (_q = internalProps.menuHandler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q),
1041
+ null === (_s = super.release) || void 0 === _s || _s.call(this), this.pluginManager.release(),
1042
+ null === (_u = null === (_t = internalProps.handler) || void 0 === _t ? void 0 : _t.release) || void 0 === _u || _u.call(_t),
1043
+ this.eventManager.release(), null === (_w = null === (_v = internalProps.focusControl) || void 0 === _v ? void 0 : _v.release) || void 0 === _w || _w.call(_v),
1044
+ null === (_x = internalProps.legends) || void 0 === _x || _x.forEach((legend => {
1007
1045
  null == legend || legend.release();
1008
- })), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null,
1009
- null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null,
1046
+ })), null === (_y = internalProps.title) || void 0 === _y || _y.release(), internalProps.title = null,
1047
+ null === (_z = internalProps.emptyTip) || void 0 === _z || _z.release(), internalProps.emptyTip = null,
1010
1048
  internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
1011
1049
  var _a;
1012
1050
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
1013
1051
  })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
1014
- const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
1052
+ const parentElement = null === (_0 = internalProps.element) || void 0 === _0 ? void 0 : _0.parentElement;
1015
1053
  parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
1016
- 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),
1017
- this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(),
1054
+ 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),
1055
+ this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_4 = this.reactCustomLayout) || void 0 === _4 || _4.clearCache(),
1018
1056
  clearChartRenderQueue();
1019
1057
  }
1020
1058
  fireListeners(type, event) {
@@ -1143,8 +1181,22 @@ export class BaseTable extends EventTarget {
1143
1181
  return this.getRowsHeight(0, this.frozenRowCount - 1);
1144
1182
  }
1145
1183
  getFrozenColsWidth() {
1184
+ const contentWidth = this.getFrozenColsContentWidth();
1185
+ if (!this.options.scrollFrozenCols) return contentWidth;
1186
+ const maxFrozenWidth = this._getMaxFrozenWidth();
1187
+ return Math.min(contentWidth, maxFrozenWidth);
1188
+ }
1189
+ getFrozenColsContentWidth() {
1146
1190
  return this.getColsWidth(0, this.frozenColCount - 1);
1147
1191
  }
1192
+ getFrozenColsOffset() {
1193
+ const contentWidth = this.getFrozenColsContentWidth(), viewportWidth = this.getFrozenColsWidth();
1194
+ return Math.max(0, contentWidth - viewportWidth);
1195
+ }
1196
+ getFrozenColsScrollLeft() {
1197
+ var _a;
1198
+ return null !== (_a = this.stateManager.scroll.frozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
1199
+ }
1148
1200
  getBottomFrozenRowsHeight() {
1149
1201
  if (this.bottomFrozenRowCount > 0) {
1150
1202
  let height = 0;
@@ -1154,6 +1206,12 @@ export class BaseTable extends EventTarget {
1154
1206
  return 0;
1155
1207
  }
1156
1208
  getRightFrozenColsWidth() {
1209
+ const contentWidth = this.getRightFrozenColsContentWidth();
1210
+ if (!this.options.scrollRightFrozenCols) return contentWidth;
1211
+ const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
1212
+ return Math.min(contentWidth, maxRightFrozenWidth);
1213
+ }
1214
+ getRightFrozenColsContentWidth() {
1157
1215
  if (this.rightFrozenColCount > 0) {
1158
1216
  let width = 0;
1159
1217
  for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) width += this.getColWidth(col);
@@ -1161,6 +1219,14 @@ export class BaseTable extends EventTarget {
1161
1219
  }
1162
1220
  return 0;
1163
1221
  }
1222
+ getRightFrozenColsOffset() {
1223
+ const contentWidth = this.getRightFrozenColsContentWidth(), viewportWidth = this.getRightFrozenColsWidth();
1224
+ return Math.max(0, contentWidth - viewportWidth);
1225
+ }
1226
+ getRightFrozenColsScrollLeft() {
1227
+ var _a;
1228
+ return null !== (_a = this.stateManager.scroll.rightFrozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
1229
+ }
1164
1230
  getDrawRange() {
1165
1231
  var _a, _b;
1166
1232
  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());