@visactor/vtable-sheet 1.26.2 → 1.26.3-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.
@@ -264,5 +264,4 @@ function createFormulaDetectionOptions(sheetDefine, options, vtableSheet) {
264
264
  };
265
265
  }
266
266
 
267
- exports.getTablePlugins = getTablePlugins, exports.createFormulaDetectionOptions = createFormulaDetectionOptions;
268
- //# sourceMappingURL=table-plugins.js.map
267
+ exports.getTablePlugins = getTablePlugins, exports.createFormulaDetectionOptions = createFormulaDetectionOptions;
@@ -72,4 +72,5 @@ class VTableSheetEventBus {
72
72
  }
73
73
  }
74
74
 
75
- exports.VTableSheetEventBus = VTableSheetEventBus;
75
+ exports.VTableSheetEventBus = VTableSheetEventBus;
76
+ //# sourceMappingURL=vtable-sheet-event-bus.js.map
@@ -142,5 +142,4 @@ class CellHighlightManager {
142
142
  }
143
143
  }
144
144
 
145
- exports.CellHighlightManager = CellHighlightManager;
146
- //# sourceMappingURL=cell-highlight-manager.js.map
145
+ exports.CellHighlightManager = CellHighlightManager;
@@ -74,4 +74,5 @@ Object.defineProperty(exports, "CrossSheetFormulaHandler", {
74
74
  get: function() {
75
75
  return cross_sheet_formula_handler_1.CrossSheetFormulaHandler;
76
76
  }
77
- });
77
+ });
78
+ //# sourceMappingURL=index.js.map
@@ -10,4 +10,5 @@ Object.defineProperty(exports, "__esModule", {
10
10
  }(SelectionMode = exports.SelectionMode || (exports.SelectionMode = {})), function(MainMenuItemKey) {
11
11
  MainMenuItemKey.IMPORT = "import", MainMenuItemKey.EXPORT_CURRENT_SHEET_CSV = "export-current-sheet-csv",
12
12
  MainMenuItemKey.EXPORT_CURRENT_SHEET_XLSX = "export-current-sheet-xlsx", MainMenuItemKey.EXPORT_ALL_SHEETS_XLSX = "export-all-sheets-xlsx";
13
- }(MainMenuItemKey = exports.MainMenuItemKey || (exports.MainMenuItemKey = {}));
13
+ }(MainMenuItemKey = exports.MainMenuItemKey || (exports.MainMenuItemKey = {}));
14
+ //# sourceMappingURL=base.js.map
@@ -12,5 +12,4 @@ Object.defineProperty(exports, "__esModule", {
12
12
  FilterOperator.LESS_THAN_OR_EQUAL = "lessThanOrEqual", FilterOperator.CONTAINS = "contains",
13
13
  FilterOperator.NOT_CONTAINS = "notContains", FilterOperator.STARTS_WITH = "startsWith",
14
14
  FilterOperator.ENDS_WITH = "endsWith", FilterOperator.BETWEEN = "between";
15
- }(FilterOperator = exports.FilterOperator || (exports.FilterOperator = {}));
16
- //# sourceMappingURL=filter.js.map
15
+ }(FilterOperator = exports.FilterOperator || (exports.FilterOperator = {}));
@@ -47525,6 +47525,17 @@
47525
47525
  }
47526
47526
  }
47527
47527
 
47528
+ function getBodyHorizontalScrollRange(table) {
47529
+ var _a, _b, _c, _d;
47530
+ const totalWidth = table.getAllColsWidth(),
47531
+ frozenColsWidth = table.getFrozenColsWidth(),
47532
+ rightFrozenColsWidth = table.getRightFrozenColsWidth(),
47533
+ frozenColsContentWidth = null !== (_b = null === (_a = table.getFrozenColsContentWidth) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : frozenColsWidth,
47534
+ rightFrozenColsContentWidth = null !== (_d = null === (_c = table.getRightFrozenColsContentWidth) || void 0 === _c ? void 0 : _c.call(table)) && void 0 !== _d ? _d : rightFrozenColsWidth,
47535
+ bodyViewportWidth = table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth,
47536
+ bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth;
47537
+ return Math.max(0, bodyContentWidth - bodyViewportWidth);
47538
+ }
47528
47539
  function getColX(col, table, isRightFrozen) {
47529
47540
  var _a, _b, _c, _d, _e, _f;
47530
47541
  if (isRightFrozen) return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1) + (null !== (_b = null === (_a = table.getRightFrozenColsScrollLeft) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : 0);
@@ -47817,17 +47828,18 @@
47817
47828
  rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
47818
47829
  rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth,
47819
47830
  hoverOn = this.table.theme.scrollStyle.hoverOn,
47820
- sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0;
47821
- if (totalWidth > tableWidth + sizeTolerance) {
47822
- const y = Math.min(tableHeight, totalHeight),
47823
- bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth,
47824
- bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth,
47831
+ sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0,
47832
+ bodyScrollRange = getBodyHorizontalScrollRange(this.table),
47833
+ y = Math.min(tableHeight, totalHeight);
47834
+ let attrY = 0;
47835
+ attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
47836
+ const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
47837
+ if (bodyScrollRange > sizeTolerance) {
47838
+ const bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth,
47839
+ bodyContentWidth = bodyViewportWidth + bodyScrollRange,
47825
47840
  rangeEnd = bodyContentWidth > 0 ? Math.max(.05, bodyViewportWidth / bodyContentWidth) : 1;
47826
- let attrY = 0;
47827
- attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
47828
47841
  let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
47829
47842
  hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
47830
- const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
47831
47843
  ignoreFrozenCols ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x, hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
47832
47844
  x: hScrollBarx,
47833
47845
  y: attrY,
@@ -47840,61 +47852,51 @@
47840
47852
  x: bounds.x1,
47841
47853
  y: bounds.y1
47842
47854
  }, "always" === horizontalVisible && this.hScrollBar.showAll();
47843
- const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
47844
- if (!ignoreFrozenCols && frozenScrollable) {
47845
- const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
47846
- x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
47847
- this.frozenHScrollBar.setAttributes({
47848
- x: x,
47849
- y: attrY,
47850
- width: frozenColsWidth,
47851
- range: [0, frozenRangeEnd],
47852
- visible: "always" === horizontalVisible
47853
- });
47854
- const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
47855
- this.frozenHScrollBar._viewPosition = {
47856
- x: bounds.x1,
47857
- y: bounds.y1
47858
- }, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
47859
- } else this.frozenHScrollBar.setAttributes({
47860
- x: 2 * -this.table.tableNoFrameWidth,
47861
- y: 2 * -this.table.tableNoFrameHeight,
47862
- width: 0,
47863
- visible: !1
47864
- });
47865
- const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
47866
- if (!ignoreFrozenCols && rightFrozenScrollable) {
47867
- const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
47868
- x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
47869
- this.rightFrozenHScrollBar.setAttributes({
47870
- x: x,
47871
- y: attrY,
47872
- width: rightFrozenColsWidth,
47873
- range: [0, rightFrozenRangeEnd],
47874
- visible: "always" === horizontalVisible
47875
- });
47876
- const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
47877
- this.rightFrozenHScrollBar._viewPosition = {
47878
- x: bounds.x1,
47879
- y: bounds.y1
47880
- }, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
47881
- } else this.rightFrozenHScrollBar.setAttributes({
47882
- x: 2 * -this.table.tableNoFrameWidth,
47883
- y: 2 * -this.table.tableNoFrameHeight,
47884
- width: 0,
47885
- visible: !1
47886
- });
47887
47855
  } else this.hScrollBar.setAttributes({
47888
47856
  x: 2 * -this.table.tableNoFrameWidth,
47889
47857
  y: 2 * -this.table.tableNoFrameHeight,
47890
47858
  width: 0,
47891
47859
  visible: !1
47892
- }), this.frozenHScrollBar.setAttributes({
47860
+ });
47861
+ const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
47862
+ if (!ignoreFrozenCols && frozenScrollable) {
47863
+ const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
47864
+ x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
47865
+ this.frozenHScrollBar.setAttributes({
47866
+ x: x,
47867
+ y: attrY,
47868
+ width: frozenColsWidth,
47869
+ range: [0, frozenRangeEnd],
47870
+ visible: "always" === horizontalVisible
47871
+ });
47872
+ const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
47873
+ this.frozenHScrollBar._viewPosition = {
47874
+ x: bounds.x1,
47875
+ y: bounds.y1
47876
+ }, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
47877
+ } else this.frozenHScrollBar.setAttributes({
47893
47878
  x: 2 * -this.table.tableNoFrameWidth,
47894
47879
  y: 2 * -this.table.tableNoFrameHeight,
47895
47880
  width: 0,
47896
47881
  visible: !1
47897
- }), this.rightFrozenHScrollBar.setAttributes({
47882
+ });
47883
+ const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
47884
+ if (!ignoreFrozenCols && rightFrozenScrollable) {
47885
+ const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
47886
+ x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
47887
+ this.rightFrozenHScrollBar.setAttributes({
47888
+ x: x,
47889
+ y: attrY,
47890
+ width: rightFrozenColsWidth,
47891
+ range: [0, rightFrozenRangeEnd],
47892
+ visible: "always" === horizontalVisible
47893
+ });
47894
+ const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
47895
+ this.rightFrozenHScrollBar._viewPosition = {
47896
+ x: bounds.x1,
47897
+ y: bounds.y1
47898
+ }, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
47899
+ } else this.rightFrozenHScrollBar.setAttributes({
47898
47900
  x: 2 * -this.table.tableNoFrameWidth,
47899
47901
  y: 2 * -this.table.tableNoFrameHeight,
47900
47902
  width: 0,
@@ -54447,7 +54449,7 @@
54447
54449
  setBodyAndColHeaderX(x) {
54448
54450
  const firstBodyCol = this.bodyGroup.firstChild;
54449
54451
  let lastBodyCol = this.bodyGroup.lastChild;
54450
- lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev), 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), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x), this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x), this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x), this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x), this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x), this.updateNextFrame());
54452
+ lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev), 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), this.table.options.scrollFrozenCols && x > 0 && (x = 0), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x), this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x), this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x), this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x), this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x), this.updateNextFrame());
54451
54453
  }
54452
54454
  afterScenegraphCreated() {
54453
54455
  var _a, _b;
@@ -54494,11 +54496,11 @@
54494
54496
  let rowHeaderWidth = 0;
54495
54497
  this.rowHeaderGroup.forEachChildrenSkipChild(column => {
54496
54498
  rowHeaderWidth += column.attribute.width;
54497
- }), this.rowHeaderGroup.setAttribute("width", rowHeaderWidth);
54499
+ }), table.options.scrollFrozenCols && (rowHeaderWidth = table.getFrozenColsWidth()), this.rowHeaderGroup.setAttribute("width", rowHeaderWidth);
54498
54500
  let cornerHeaderWidth = 0;
54499
54501
  this.cornerHeaderGroup.forEachChildrenSkipChild(column => {
54500
54502
  cornerHeaderWidth += column.attribute.width;
54501
- }), this.cornerHeaderGroup.setAttribute("width", cornerHeaderWidth), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height), this.bodyGroup.setAttributes({
54503
+ }), table.options.scrollFrozenCols && (cornerHeaderWidth = table.getFrozenColsWidth()), this.cornerHeaderGroup.setAttribute("width", cornerHeaderWidth), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height), this.bodyGroup.setAttributes({
54502
54504
  x: this.rowHeaderGroup.attribute.width,
54503
54505
  y: this.colHeaderGroup.attribute.height
54504
54506
  });
@@ -56677,12 +56679,9 @@
56677
56679
  }), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
56678
56680
  }
56679
56681
  updateHorizontalScrollBar(xRatio) {
56680
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56681
- const totalWidth = this.table.getAllColsWidth(),
56682
- oldHorizontalBarPos = this.scroll.horizontalBarPos,
56683
- frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56684
- rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
56685
- scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
56682
+ var _a, _b, _c, _d;
56683
+ const oldHorizontalBarPos = this.scroll.horizontalBarPos,
56684
+ scrollRange = getBodyHorizontalScrollRange(this.table);
56686
56685
  let horizontalBarPos = Math.ceil(xRatio * scrollRange);
56687
56686
  isValid$2(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
56688
56687
  const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
@@ -56690,8 +56689,8 @@
56690
56689
  event: void 0,
56691
56690
  scrollTop: this.scroll.verticalBarPos,
56692
56691
  scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
56693
- scrollHeight: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
56694
- scrollWidth: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
56692
+ scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
56693
+ scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
56695
56694
  viewHeight: this.table.tableNoFrameHeight,
56696
56695
  viewWidth: this.table.tableNoFrameWidth,
56697
56696
  scrollDirection: "horizontal",
@@ -56704,8 +56703,8 @@
56704
56703
  event: void 0,
56705
56704
  scrollTop: this.scroll.verticalBarPos,
56706
56705
  scrollLeft: this.scroll.horizontalBarPos,
56707
- scrollHeight: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
56708
- scrollWidth: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
56706
+ scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
56707
+ scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
56709
56708
  viewHeight: this.table.tableNoFrameHeight,
56710
56709
  viewWidth: this.table.tableNoFrameWidth,
56711
56710
  scrollDirection: "horizontal",
@@ -56757,18 +56756,15 @@
56757
56756
  }), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
56758
56757
  }
56759
56758
  setScrollLeft(left, event, triggerEvent = !0) {
56760
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
56759
+ var _a, _b, _c, _d, _e, _f, _g;
56761
56760
  if (!this.table || !this.table.scenegraph) return;
56762
56761
  this.table.scrollLeft;
56763
- const totalWidth = this.table.getAllColsWidth(),
56764
- frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56765
- rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
56766
- scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset),
56767
- sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
56762
+ const scrollRange = getBodyHorizontalScrollRange(this.table),
56763
+ sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
56768
56764
  left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
56769
56765
  const oldHorizontalBarPos = this.scroll.horizontalBarPos,
56770
56766
  xRatio = scrollRange ? left / scrollRange : 0;
56771
- if ((oldHorizontalBarPos !== left || !0 === (null === (_j = null === (_h = this.table.options) || void 0 === _h ? void 0 : _h.customConfig) || void 0 === _j ? void 0 : _j.scrollEventAlwaysTrigger)) && triggerEvent) {
56767
+ if ((oldHorizontalBarPos !== left || !0 === (null === (_c = null === (_b = this.table.options) || void 0 === _b ? void 0 : _b.customConfig) || void 0 === _c ? void 0 : _c.scrollEventAlwaysTrigger)) && triggerEvent) {
56772
56768
  let horizontalBarPos = left;
56773
56769
  isValid$2(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
56774
56770
  const dx = horizontalBarPos - oldHorizontalBarPos;
@@ -56776,8 +56772,8 @@
56776
56772
  event: null == event ? void 0 : event.nativeEvent,
56777
56773
  scrollTop: this.scroll.verticalBarPos,
56778
56774
  scrollLeft: horizontalBarPos,
56779
- scrollHeight: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
56780
- scrollWidth: null === (_l = this.table.theme.scrollStyle) || void 0 === _l ? void 0 : _l.width,
56775
+ scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
56776
+ scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
56781
56777
  viewHeight: this.table.tableNoFrameHeight,
56782
56778
  viewWidth: this.table.tableNoFrameWidth,
56783
56779
  scrollDirection: "horizontal",
@@ -56794,8 +56790,8 @@
56794
56790
  event: null == event ? void 0 : event.nativeEvent,
56795
56791
  scrollTop: this.scroll.verticalBarPos,
56796
56792
  scrollLeft: this.scroll.horizontalBarPos,
56797
- scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
56798
- scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
56793
+ scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
56794
+ scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
56799
56795
  viewHeight: this.table.tableNoFrameHeight,
56800
56796
  viewWidth: this.table.tableNoFrameWidth,
56801
56797
  scrollDirection: "horizontal",