@visactor/vtable-calendar 1.17.3-alpha.3 → 1.17.3-alpha.4

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.
@@ -27715,7 +27715,6 @@
27715
27715
  RESIZE_COLUMN_END: "resize_column_end",
27716
27716
  RESIZE_ROW: "resize_row",
27717
27717
  RESIZE_ROW_END: "resize_row_end",
27718
- RESIZE_TABLE: "resize_table",
27719
27718
  CHANGE_HEADER_POSITION_START: "change_header_position_start",
27720
27719
  CHANGE_HEADER_POSITION: "change_header_position",
27721
27720
  CHANGING_HEADER_POSITION: "changing_header_position",
@@ -37407,12 +37406,12 @@
37407
37406
  isWidthNumber = !Array.isArray(strokeArrayWidth),
37408
37407
  isStrokeTrue = !Array.isArray(stroke),
37409
37408
  isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;
37410
- context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);
37409
+ context.stroke(), context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute);
37411
37410
  const {
37412
37411
  lineDash = groupAttribute.lineDash
37413
37412
  } = group.attribute;
37414
37413
  let isDash = !1;
37415
- lineDash.length && lineDash.some(dash => Array.isArray(dash)) && (isDash = !0), context.moveTo(x, y);
37414
+ lineDash.length && lineDash.some(dash => Array.isArray(dash)) && (isDash = !0), context.beginPath(), context.moveTo(x, y);
37416
37415
  const strokeTop = (isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0]),
37417
37416
  strokeRight = (isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1]),
37418
37417
  strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]),
@@ -37433,7 +37432,7 @@
37433
37432
  isWidthNumber ? widthInfo.width : strokeArrayWidth[3], isWidthNumber ? widthInfo.width : strokeArrayWidth[3];
37434
37433
  context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : strokeArrayColor && !strokeArrayColor[3] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
37435
37434
  } else 3 === i && context.moveTo(x, y);
37436
- isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.closePath();
37435
+ context.closePath(), isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.beginPath();
37437
37436
  }
37438
37437
 
37439
37438
  var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -39324,7 +39323,7 @@
39324
39323
  }
39325
39324
  isExtend && extendSelectRange();
39326
39325
  };
39327
- ifExtendSelectRange && (extendSelectRange(), selectRange.start.col > selectRange.end.col ? (selectRange.start.col = Math.max(startCol, endCol), selectRange.end.col = Math.min(startCol, endCol)) : (selectRange.start.col = Math.min(startCol, endCol), selectRange.end.col = Math.max(startCol, endCol)), selectRange.start.row > selectRange.end.row ? (selectRange.start.row = Math.max(startRow, endRow), selectRange.end.row = Math.min(startRow, endRow)) : (selectRange.start.row = Math.min(startRow, endRow), selectRange.end.row = Math.max(startRow, endRow))), scene.selectingRangeComponents.forEach((selectComp, key) => {
39326
+ ifExtendSelectRange && extendSelectRange(), scene.selectingRangeComponents.forEach((selectComp, key) => {
39328
39327
  var _a;
39329
39328
  selectComp.rect.delete(), null === (_a = selectComp.fillhandle) || void 0 === _a || _a.delete();
39330
39329
  }), scene.selectingRangeComponents = new Map();
@@ -39414,7 +39413,7 @@
39414
39413
  }
39415
39414
 
39416
39415
  function createCellSelectBorder(scene, start_Col, start_Row, end_Col, end_Row, selectRangeType, selectId, strokes) {
39417
- var _a, _b, _c, _d, _e, _f, _g, _h;
39416
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39418
39417
  let isHasFillHandleRect = !!(null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle);
39419
39418
  if ((null === (_b = scene.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) > 1) isHasFillHandleRect = !1, scene.removeFillHandleFromSelectComponents();else if (1 === (null === (_c = scene.table.stateManager.select.ranges) || void 0 === _c ? void 0 : _c.length)) {
39420
39419
  const maxRow = Math.max(scene.table.stateManager.select.ranges[0].start.row, scene.table.stateManager.select.ranges[0].end.row),
@@ -39440,7 +39439,8 @@
39440
39439
  y: firstCellBound.y1 - scene.tableGroup.attribute.y,
39441
39440
  width: 0,
39442
39441
  height: 0,
39443
- visible: !0
39442
+ visible: !0,
39443
+ cornerRadius: getCornerRadius(selectRangeType, null === (_j = scene.table.theme.frameStyle) || void 0 === _j ? void 0 : _j.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
39444
39444
  });
39445
39445
  let fillhandle;
39446
39446
  isHasFillHandleRect && (fillhandle = createRect({
@@ -39458,6 +39458,15 @@
39458
39458
  role: selectRangeType
39459
39459
  }), scene.tableGroup.insertAfter(rect, "body" === selectRangeType ? scene.bodyGroup : "columnHeader" === selectRangeType ? scene.colHeaderGroup : "rowHeader" === selectRangeType ? scene.rowHeaderGroup : "cornerHeader" === selectRangeType ? scene.cornerHeaderGroup : "rightTopCorner" === selectRangeType ? scene.rightTopCornerGroup : "rightFrozen" === selectRangeType ? scene.rightFrozenGroup : "leftBottomCorner" === selectRangeType ? scene.leftBottomCornerGroup : "bottomFrozen" === selectRangeType ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup), isHasFillHandleRect && scene.tableGroup.insertAfter(fillhandle, "body" === selectRangeType ? scene.bodyGroup : "columnHeader" === selectRangeType ? scene.colHeaderGroup : "rowHeader" === selectRangeType ? scene.rowHeaderGroup : "cornerHeader" === selectRangeType ? scene.cornerHeaderGroup : "rightTopCorner" === selectRangeType ? scene.rightTopCornerGroup : "rightFrozen" === selectRangeType ? scene.rightFrozenGroup : "leftBottomCorner" === selectRangeType ? scene.leftBottomCornerGroup : "bottomFrozen" === selectRangeType ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup);
39460
39460
  }
39461
+ function getCornerRadius(selectRangeType, cornerRadius, start_Col, start_Row, end_Col, end_Row, table) {
39462
+ if (!cornerRadius) return;
39463
+ const cornerRadiusArray = Array.isArray(cornerRadius) ? cornerRadius : [cornerRadius, cornerRadius, cornerRadius, cornerRadius],
39464
+ tableEndCol = table.colCount - 1,
39465
+ tableEndRow = table.rowCount - 1,
39466
+ result = [0, 0, 0, 0];
39467
+ let changed = !1;
39468
+ return 0 === start_Col && 0 === start_Row ? (result[0] = cornerRadiusArray[0], changed = !0) : end_Col === tableEndCol && end_Row === tableEndRow ? (result[2] = cornerRadiusArray[2], changed = !0) : 0 === start_Col && end_Row === tableEndRow ? (result[3] = cornerRadiusArray[3], changed = !0) : end_Col === tableEndCol && 0 === start_Row && (result[1] = cornerRadiusArray[1], changed = !0), changed ? result : void 0;
39469
+ }
39461
39470
 
39462
39471
  function moveSelectingRangeComponentsToSelectedRangeComponents(scene) {
39463
39472
  scene.selectingRangeComponents.forEach((rangeComponent, key) => {
@@ -41691,7 +41700,7 @@
41691
41700
  } : table.getCellRange(col, row);
41692
41701
  currentRange.start.col < cellRange.end.col ? currentRange.end.col = cellRange.end.col : currentRange.start.col > cellRange.start.col && (currentRange.end.col = cellRange.start.col), currentRange.start.row < cellRange.end.row ? currentRange.end.row = cellRange.end.row : currentRange.start.row > cellRange.start.row && (currentRange.end.row = cellRange.start.row), "body" === state.select.headerSelectMode && (table.isRowHeader(col, row) ? (currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, currentRange.end.col = table.colCount - 1) : table.isColumnHeader(col, row) ? (currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.row = table.rowCount - 1) : table.internalProps.layoutMap.isSeriesNumberInBody(col, row) ? (currentRange.start.col = table.leftRowSeriesNumberCount, currentRange.end.col = table.colCount - 1) : table.isCornerHeader(col, row) ? (currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.col = table.colCount - 1, currentRange.end.row = table.rowCount - 1) : table.isSeriesNumber(col, row) && (currentRange.start.col = table.leftRowSeriesNumberCount, currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.col = table.colCount - 1, currentRange.end.row = table.rowCount - 1)), skipBodyMerge && (currentRange.skipBodyMerge = !0);
41693
41702
  }
41694
- currentRange && currentRange.start.row <= table.rowCount - 1 && currentRange.end.row <= table.rowCount - 1 && currentRange.start.col <= table.colCount - 1 && currentRange.end.col <= table.colCount - 1 && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
41703
+ scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
41695
41704
  }
41696
41705
  }
41697
41706
  } else {
@@ -41889,7 +41898,7 @@
41889
41898
  }
41890
41899
  cellPos.col = col, cellPos.row = row;
41891
41900
  const currentRange = null === (_b = state.select.ranges) || void 0 === _b ? void 0 : _b[state.select.ranges.length - 1];
41892
- currentRange && currentRange.start.row <= table.rowCount - 1 && currentRange.end.row <= table.rowCount - 1 && currentRange.start.col <= table.colCount - 1 && currentRange.end.col <= table.colCount - 1 && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
41901
+ currentRange && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
41893
41902
  }
41894
41903
  }
41895
41904
  } else cellPos.col = -1, cellPos.row = -1, state.select.ranges = [], scenegraph.deleteAllSelectBorder();
@@ -42952,76 +42961,108 @@
42952
42961
  var _a, _b;
42953
42962
  const totalHeight = this.table.getAllRowsHeight(),
42954
42963
  oldVerticalBarPos = this.scroll.verticalBarPos;
42955
- this.scroll.verticalBarPos = Math.ceil(yRatio * (totalHeight - this.table.scenegraph.height)), isValid$3(this.scroll.verticalBarPos) && !isNaN(this.scroll.verticalBarPos) || (this.scroll.verticalBarPos = 0), this.table.scenegraph.setY(-this.scroll.verticalBarPos, 1 === yRatio), this.scroll.verticalBarPos -= this.table.scenegraph.proxy.deltaY, this.table.scenegraph.proxy.deltaY = 0, this.updateHoverPos(-1, -1), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
42964
+ let verticalBarPos = Math.ceil(yRatio * (totalHeight - this.table.scenegraph.height));
42965
+ isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
42966
+ const dy = verticalBarPos - this.table.scenegraph.proxy.deltaY - oldVerticalBarPos;
42967
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
42956
42968
  event: void 0,
42957
- scrollTop: this.scroll.verticalBarPos,
42969
+ scrollTop: verticalBarPos - this.table.scenegraph.proxy.deltaY,
42958
42970
  scrollLeft: this.scroll.horizontalBarPos,
42959
42971
  scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
42960
42972
  scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
42961
42973
  viewHeight: this.table.tableNoFrameHeight,
42962
42974
  viewWidth: this.table.tableNoFrameWidth,
42963
42975
  scrollDirection: "vertical",
42964
- scrollRatioY: yRatio
42965
- }), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
42976
+ scrollRatioY: yRatio,
42977
+ dy: dy
42978
+ }).some(value => !1 === value)) {
42979
+ const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
42980
+ this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
42981
+ } else this.scroll.verticalBarPos = verticalBarPos, this.table.scenegraph.setY(-this.scroll.verticalBarPos, 1 === yRatio), this.scroll.verticalBarPos -= this.table.scenegraph.proxy.deltaY, this.table.scenegraph.proxy.deltaY = 0, this.updateHoverPos(-1, -1), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
42966
42982
  }
42967
42983
  updateHorizontalScrollBar(xRatio) {
42968
42984
  var _a, _b;
42969
42985
  const totalWidth = this.table.getAllColsWidth(),
42970
42986
  oldHorizontalBarPos = this.scroll.horizontalBarPos;
42971
- this.scroll.horizontalBarPos = Math.ceil(xRatio * (totalWidth - this.table.scenegraph.width)), isValid$3(this.scroll.horizontalBarPos) && !isNaN(this.scroll.horizontalBarPos) || (this.scroll.horizontalBarPos = 0), this.table.scenegraph.setX(-this.scroll.horizontalBarPos, 1 === xRatio), this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX, this.table.scenegraph.proxy.deltaX = 0, this.updateHoverPos(-1, -1), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
42987
+ let horizontalBarPos = Math.ceil(xRatio * (totalWidth - this.table.scenegraph.width));
42988
+ isValid$3(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
42989
+ const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
42990
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
42972
42991
  event: void 0,
42973
42992
  scrollTop: this.scroll.verticalBarPos,
42974
- scrollLeft: this.scroll.horizontalBarPos,
42993
+ scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
42975
42994
  scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
42976
42995
  scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
42977
42996
  viewHeight: this.table.tableNoFrameHeight,
42978
42997
  viewWidth: this.table.tableNoFrameWidth,
42979
42998
  scrollDirection: "horizontal",
42980
- scrollRatioX: xRatio
42981
- }), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
42999
+ scrollRatioX: xRatio,
43000
+ dx: dx
43001
+ }).some(value => !1 === value)) {
43002
+ const xRatio = this.scroll.horizontalBarPos / (totalWidth - this.table.scenegraph.width);
43003
+ this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
43004
+ } else this.scroll.horizontalBarPos = horizontalBarPos, this.table.scenegraph.setX(-this.scroll.horizontalBarPos, 1 === xRatio), this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX, this.table.scenegraph.proxy.deltaX = 0, this.updateHoverPos(-1, -1), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
42982
43005
  }
42983
43006
  setScrollTop(top, event) {
42984
43007
  let triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
42985
- var _a, _b, _c;
43008
+ var _a, _b, _c, _d, _e;
42986
43009
  const totalHeight = this.table.getAllRowsHeight(),
42987
43010
  sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
42988
- top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), ((top = Math.ceil(top)) !== this.scroll.verticalBarPos || this.table.isPivotChart()) && this.updateHoverPos(-1, -1);
42989
- const oldVerticalBarPos = this.scroll.verticalBarPos;
42990
- this.scroll.verticalBarPos = top, isValid$3(this.scroll.verticalBarPos) && !isNaN(this.scroll.verticalBarPos) || (this.scroll.verticalBarPos = 0), this.table.scenegraph.setY(-top);
42991
- const yRatio = top / (totalHeight - this.table.scenegraph.height);
42992
- this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio), oldVerticalBarPos !== top && triggerEvent && (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
42993
- event: null == event ? void 0 : event.nativeEvent,
42994
- scrollTop: this.scroll.verticalBarPos,
42995
- scrollLeft: this.scroll.horizontalBarPos,
42996
- scrollHeight: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
42997
- scrollWidth: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
42998
- viewHeight: this.table.tableNoFrameHeight,
42999
- viewWidth: this.table.tableNoFrameWidth,
43000
- scrollDirection: "vertical",
43001
- scrollRatioY: yRatio
43002
- }), this.checkVerticalScrollBarEnd());
43011
+ top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), top = Math.ceil(top);
43012
+ const oldVerticalBarPos = this.scroll.verticalBarPos,
43013
+ yRatio = top / (totalHeight - this.table.scenegraph.height);
43014
+ if ((oldVerticalBarPos !== top || !0 === (null === (_c = null === (_b = this.table.options) || void 0 === _b ? void 0 : _b.customConfig) || void 0 === _c ? void 0 : _c.scrollEventAlwaysTrigger)) && triggerEvent) {
43015
+ let verticalBarPos = top;
43016
+ isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
43017
+ const dy = verticalBarPos - oldVerticalBarPos;
43018
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
43019
+ event: null == event ? void 0 : event.nativeEvent,
43020
+ scrollTop: verticalBarPos,
43021
+ scrollLeft: this.scroll.horizontalBarPos,
43022
+ scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
43023
+ scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
43024
+ viewHeight: this.table.tableNoFrameHeight,
43025
+ viewWidth: this.table.tableNoFrameWidth,
43026
+ scrollDirection: "vertical",
43027
+ scrollRatioY: yRatio,
43028
+ dy: dy
43029
+ }).some(value => !1 === value)) {
43030
+ const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
43031
+ return void this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
43032
+ }
43033
+ }
43034
+ (top !== this.scroll.verticalBarPos || this.table.isPivotChart()) && this.updateHoverPos(-1, -1), this.scroll.verticalBarPos = top, isValid$3(this.scroll.verticalBarPos) && !isNaN(this.scroll.verticalBarPos) || (this.scroll.verticalBarPos = 0), this.table.scenegraph.setY(-top), this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
43003
43035
  }
43004
43036
  setScrollLeft(left, event) {
43005
43037
  let triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
43006
- var _a, _b, _c;
43038
+ var _a, _b, _c, _d, _e;
43007
43039
  this.table.scrollLeft;
43008
43040
  const totalWidth = this.table.getAllColsWidth(),
43009
43041
  sizeTolerance = (this.table.getFrozenColsWidth(), (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0);
43010
- left = Math.max(0, Math.min(left, totalWidth - this.table.scenegraph.width - sizeTolerance)), (left = Math.ceil(left)) !== this.scroll.horizontalBarPos && this.updateHoverPos(-1, -1);
43011
- const oldHorizontalBarPos = this.scroll.horizontalBarPos;
43012
- this.scroll.horizontalBarPos = left, isValid$3(this.scroll.horizontalBarPos) && !isNaN(this.scroll.horizontalBarPos) || (this.scroll.horizontalBarPos = 0), this.table.scenegraph.setX(-left);
43013
- const xRatio = left / (totalWidth - this.table.scenegraph.width);
43014
- this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio), oldHorizontalBarPos !== left && triggerEvent && (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
43015
- event: null == event ? void 0 : event.nativeEvent,
43016
- scrollTop: this.scroll.verticalBarPos,
43017
- scrollLeft: this.scroll.horizontalBarPos,
43018
- scrollHeight: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
43019
- scrollWidth: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
43020
- viewHeight: this.table.tableNoFrameHeight,
43021
- viewWidth: this.table.tableNoFrameWidth,
43022
- scrollDirection: "horizontal",
43023
- scrollRatioX: xRatio
43024
- }), this.checkHorizontalScrollBarEnd());
43042
+ left = Math.max(0, Math.min(left, totalWidth - this.table.scenegraph.width - sizeTolerance)), left = Math.ceil(left);
43043
+ const oldHorizontalBarPos = this.scroll.horizontalBarPos,
43044
+ xRatio = left / (totalWidth - this.table.scenegraph.width);
43045
+ 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) {
43046
+ let horizontalBarPos = left;
43047
+ isValid$3(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
43048
+ const dx = horizontalBarPos - oldHorizontalBarPos;
43049
+ if (this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
43050
+ event: null == event ? void 0 : event.nativeEvent,
43051
+ scrollTop: this.scroll.verticalBarPos,
43052
+ scrollLeft: horizontalBarPos,
43053
+ scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
43054
+ scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
43055
+ viewHeight: this.table.tableNoFrameHeight,
43056
+ viewWidth: this.table.tableNoFrameWidth,
43057
+ scrollDirection: "horizontal",
43058
+ scrollRatioX: xRatio,
43059
+ dx: dx
43060
+ }).some(value => !1 === value)) {
43061
+ const xRatio = this.scroll.horizontalBarPos / (totalWidth - this.table.scenegraph.width);
43062
+ return void this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
43063
+ }
43064
+ }
43065
+ left !== this.scroll.horizontalBarPos && this.updateHoverPos(-1, -1), this.scroll.horizontalBarPos = left, isValid$3(this.scroll.horizontalBarPos) && !isNaN(this.scroll.horizontalBarPos) || (this.scroll.horizontalBarPos = 0), this.table.scenegraph.setX(-left), this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio), oldHorizontalBarPos !== left && triggerEvent && this.checkHorizontalScrollBarEnd();
43025
43066
  }
43026
43067
  hideVerticalScrollBar() {
43027
43068
  this.table.scenegraph.component.hideVerticalScrollBar();
@@ -47482,7 +47523,7 @@
47482
47523
  constructor(container) {
47483
47524
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47484
47525
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47485
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47526
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.4", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47486
47527
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47487
47528
  const {
47488
47529
  frozenColCount = 0,
@@ -47621,14 +47662,7 @@
47621
47662
  var _a;
47622
47663
  this._updateSize(), null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
47623
47664
  null == legend || legend.resize();
47624
- }), this.internalProps.title && this.internalProps.title.resize(), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize(), setTimeout(() => {
47625
- this.fireListeners(TABLE_EVENT_TYPE.RESIZE_TABLE, {
47626
- tableX: this.tableX,
47627
- tableY: this.tableY,
47628
- tableWidth: this.tableNoFrameWidth,
47629
- tableHeight: this.tableNoFrameHeight
47630
- });
47631
- }, 0);
47665
+ }), this.internalProps.title && this.internalProps.title.resize(), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize();
47632
47666
  }
47633
47667
  get rowCount() {
47634
47668
  return this.internalProps.rowCount;
@@ -47844,7 +47878,7 @@
47844
47878
  }
47845
47879
  }
47846
47880
  _updateSize() {
47847
- 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;
47881
+ 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, _5;
47848
47882
  const {
47849
47883
  padding: padding
47850
47884
  } = this;
@@ -47862,20 +47896,20 @@
47862
47896
  const {
47863
47897
  canvas: canvas
47864
47898
  } = this.internalProps;
47865
- widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`);
47899
+ widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox) && !(null === (_h = this.options) || void 0 === _h ? void 0 : _h.canvas) && this.scenegraph.stage.resize(widthP, heightP, !1) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`), (null === (_j = this.options) || void 0 === _j ? void 0 : _j.viewBox) && (widthP = this.options.viewBox.x2 - this.options.viewBox.x1, heightP = this.options.viewBox.y2 - this.options.viewBox.y1), (null === (_k = null == this ? void 0 : this.scenegraph) || void 0 === _k ? void 0 : _k.stage) && (this.options.viewBox ? this.scenegraph.stage.setViewBox(this.options.viewBox, !1) : this.scenegraph.stage.resize(widthP, heightP));
47866
47900
  } else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
47867
47901
  const width = Math.floor(widthP - getVerticalScrollBarSize(this.getTheme().scrollStyle)),
47868
47902
  height = Math.floor(heightP - getHorizontalScrollBarSize(this.getTheme().scrollStyle));
47869
- if (null === (_g = this.internalProps.theme) || void 0 === _g ? void 0 : _g.frameStyle) {
47870
- const lineWidths = toBoxArray(null !== (_j = null === (_h = this.internalProps.theme.frameStyle) || void 0 === _h ? void 0 : _h.borderLineWidth) && void 0 !== _j ? _j : [null]),
47871
- shadowWidths = toBoxArray(null !== (_l = null === (_k = this.internalProps.theme.frameStyle) || void 0 === _k ? void 0 : _k.shadowBlur) && void 0 !== _l ? _l : [0]);
47872
- (null === (_m = this.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_o = shadowWidths[1]) && void 0 !== _o ? _o : 0), this.tableNoFrameHeight = height - (null !== (_p = shadowWidths[2]) && void 0 !== _p ? _p : 0)) : (this.tableX = (null !== (_q = lineWidths[3]) && void 0 !== _q ? _q : 0) + (null !== (_r = shadowWidths[3]) && void 0 !== _r ? _r : 0), this.tableY = (null !== (_s = lineWidths[0]) && void 0 !== _s ? _s : 0) + (null !== (_t = shadowWidths[0]) && void 0 !== _t ? _t : 0), this.tableNoFrameWidth = width - ((null !== (_u = lineWidths[1]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[1]) && void 0 !== _v ? _v : 0)) - ((null !== (_w = lineWidths[3]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[3]) && void 0 !== _x ? _x : 0)), this.tableNoFrameHeight = height - ((null !== (_y = lineWidths[0]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[0]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[2]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[2]) && void 0 !== _1 ? _1 : 0)));
47903
+ if (null === (_l = this.internalProps.theme) || void 0 === _l ? void 0 : _l.frameStyle) {
47904
+ const lineWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : [null]),
47905
+ shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
47906
+ (null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
47873
47907
  }
47874
47908
  }
47875
47909
  updateViewBox(newViewBox) {
47876
- var _a, _b, _c, _d, _e, _f, _g, _h;
47877
- const oldWidth = null !== (_d = null !== (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox.x2) && void 0 !== _b ? _b : 0 - (null === (_c = this.options) || void 0 === _c ? void 0 : _c.viewBox.x1)) && void 0 !== _d ? _d : 0,
47878
- oldHeight = null !== (_h = null !== (_f = null === (_e = this.options) || void 0 === _e ? void 0 : _e.viewBox.y2) && void 0 !== _f ? _f : 0 - (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox.y1)) && void 0 !== _h ? _h : 0,
47910
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
47911
+ const oldWidth = (null !== (_c = null === (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox) || void 0 === _b ? void 0 : _b.x2) && void 0 !== _c ? _c : 0) - (null !== (_f = null === (_e = null === (_d = this.options) || void 0 === _d ? void 0 : _d.viewBox) || void 0 === _e ? void 0 : _e.x1) && void 0 !== _f ? _f : 0),
47912
+ oldHeight = (null !== (_j = null === (_h = null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox) || void 0 === _h ? void 0 : _h.y2) && void 0 !== _j ? _j : 0) - (null !== (_m = null === (_l = null === (_k = this.options) || void 0 === _k ? void 0 : _k.viewBox) || void 0 === _l ? void 0 : _l.y1) && void 0 !== _m ? _m : 0),
47879
47913
  newWidth = newViewBox.x2 - newViewBox.x1,
47880
47914
  newHeight = newViewBox.y2 - newViewBox.y1;
47881
47915
  this.options.viewBox = newViewBox, oldWidth !== newWidth || oldHeight !== newHeight ? this.resize() : this.scenegraph.stage.setViewBox(this.options.viewBox, !0);