@visactor/vtable-gantt 1.24.0 → 1.25.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.
@@ -36255,6 +36255,7 @@
36255
36255
  gantt.parsedOptions.baselineEndDateField = options.taskBar?.baselineEndDateField;
36256
36256
  gantt.parsedOptions.baselinePosition = options.taskBar?.baselinePosition ?? 'bottom';
36257
36257
  gantt.parsedOptions.taskBarClip = options?.taskBar?.clip ?? true;
36258
+ gantt.parsedOptions.taskBarLocateIcon = options?.taskBar?.locateIcon ?? false;
36258
36259
  gantt.parsedOptions.projectSubTasksExpandable = options?.projectSubTasksExpandable ?? true;
36259
36260
  const { unit: minTimeUnit, startOfWeek, step } = gantt.parsedOptions.reverseSortedTimelineScales[0];
36260
36261
  gantt.parsedOptions.minDate = options?.minDate
@@ -43420,12 +43421,14 @@
43420
43421
  return limits ? limits.min && limits.min > orgWidth ? limits.min : limits.max && limits.max < orgWidth ? limits.max : orgWidth : orgWidth;
43421
43422
  }
43422
43423
  function _getScrollableVisibleRect(table) {
43424
+ var _a, _b;
43423
43425
  let frozenColsWidth = 0,
43426
+ frozenColsContentWidth = 0,
43424
43427
  rightFrozenColsWidth = 0;
43425
- table.frozenColCount > 0 && (frozenColsWidth = table.getFrozenColsWidth()), table.rightFrozenColCount > 0 && (rightFrozenColsWidth = table.getRightFrozenColsWidth());
43428
+ table.frozenColCount > 0 && (frozenColsWidth = table.getFrozenColsWidth(), frozenColsContentWidth = null !== (_b = null === (_a = table.getFrozenColsContentWidth) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : frozenColsWidth), table.rightFrozenColCount > 0 && (rightFrozenColsWidth = table.getRightFrozenColsWidth());
43426
43429
  let frozenRowsHeight = 0,
43427
43430
  bottomFrozenRowsHeight = 0;
43428
- return table.frozenRowCount > 0 && (frozenRowsHeight = table.getFrozenRowsHeight()), table.bottomFrozenRowCount > 0 && (bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight()), new Rect$1(table.scrollLeft + frozenColsWidth, table.scrollTop + frozenRowsHeight, table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth, table.tableNoFrameHeight - frozenRowsHeight - bottomFrozenRowsHeight);
43431
+ return table.frozenRowCount > 0 && (frozenRowsHeight = table.getFrozenRowsHeight()), table.bottomFrozenRowCount > 0 && (bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight()), new Rect$1(table.scrollLeft + frozenColsContentWidth, table.scrollTop + frozenRowsHeight, table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth, table.tableNoFrameHeight - frozenRowsHeight - bottomFrozenRowsHeight);
43429
43432
  }
43430
43433
  function getStyleTheme(headerStyle, table, col, row, getProp, needGetTheme = !0) {
43431
43434
  const padding = getQuadProps(getProp("padding", headerStyle, col, row, table)),
@@ -44076,6 +44079,32 @@
44076
44079
  target: e.target
44077
44080
  }), tableEvent;
44078
44081
  }
44082
+ function getCellEventArgsSetWithTable(e, table) {
44083
+ var _a;
44084
+ const eventArgsSet = getCellEventArgsSet(e);
44085
+ if (!eventArgsSet.eventArgs) return eventArgsSet;
44086
+ if (!table.options.scrollFrozenCols || 0 === (null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table))) return eventArgsSet;
44087
+ const xInTable = e.x - table.tableX,
44088
+ yInTable = e.y - table.tableY;
44089
+ if (xInTable < 0 || yInTable < 0 || xInTable > table.tableNoFrameWidth || yInTable > table.tableNoFrameHeight) return eventArgsSet;
44090
+ const frozenViewportWidth = table.getFrozenColsWidth(),
44091
+ pickedCol = eventArgsSet.eventArgs.col,
44092
+ pickedRow = eventArgsSet.eventArgs.row;
44093
+ if (pickedCol >= 0 && pickedCol < table.frozenColCount && !table.isRightFrozenColumn(pickedCol, pickedRow) && xInTable >= frozenViewportWidth) {
44094
+ const cell = table.getCellAtRelativePosition(e.x, e.y);
44095
+ if (-1 === cell.col || -1 === cell.row) return eventArgsSet;
44096
+ const targetCell = table.scenegraph.getCell(cell.col, cell.row);
44097
+ eventArgsSet.eventArgs = {
44098
+ col: cell.col,
44099
+ row: cell.row,
44100
+ event: e,
44101
+ targetCell: targetCell,
44102
+ mergeInfo: getMergeCellInfo(targetCell),
44103
+ target: targetCell
44104
+ };
44105
+ }
44106
+ return eventArgsSet;
44107
+ }
44079
44108
  function getTargetCell(target) {
44080
44109
  for (; target && target.parent;) {
44081
44110
  if ("cell" === target.role) return target;
@@ -47041,9 +47070,12 @@
47041
47070
  }
47042
47071
 
47043
47072
  function getColX(col, table, isRightFrozen) {
47044
- if (isRightFrozen) return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1);
47073
+ var _a, _b, _c, _d, _e, _f;
47074
+ 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);
47075
+ const frozenOffset = null !== (_d = null === (_c = table.getFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(table)) && void 0 !== _d ? _d : 0,
47076
+ frozenScrollLeft = null !== (_f = null === (_e = table.getFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(table)) && void 0 !== _f ? _f : 0;
47045
47077
  let colX = table.getColsWidth(0, col);
47046
- return col >= table.frozenColCount && (colX -= table.scrollLeft), colX;
47078
+ return col >= table.frozenColCount ? colX -= table.scrollLeft + frozenOffset : colX -= frozenScrollLeft, colX;
47047
47079
  }
47048
47080
  function getRowY(row, table, isBottomFrozen) {
47049
47081
  if (isBottomFrozen) return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);
@@ -47236,7 +47268,7 @@
47236
47268
  }
47237
47269
  addToGroup(componentGroup) {
47238
47270
  componentGroup.addChild(this.frozenShadowLine), componentGroup.addChild(this.rightFrozenShadowLine), componentGroup.addChild(this.columnResizeBgLine), componentGroup.addChild(this.columnResizeLine), componentGroup.addChild(this.columnResizeLabel), componentGroup.addChild(this.rowResizeBgLine), componentGroup.addChild(this.rowResizeLine), componentGroup.addChild(this.rowResizeLabel);
47239
- this.table.theme.scrollStyle.hoverOn && !this.table.theme.scrollStyle.barToSide ? (componentGroup.addChild(this.hScrollBar), componentGroup.addChild(this.vScrollBar)) : (componentGroup.stage.defaultLayer.addChild(this.hScrollBar), componentGroup.stage.defaultLayer.addChild(this.vScrollBar)), this.menu.bindTableComponent(componentGroup), this.drillIcon.appand(componentGroup), this.cellMover.appand(componentGroup);
47271
+ this.table.theme.scrollStyle.hoverOn && !this.table.theme.scrollStyle.barToSide ? (componentGroup.addChild(this.hScrollBar), componentGroup.addChild(this.frozenHScrollBar), componentGroup.addChild(this.rightFrozenHScrollBar), componentGroup.addChild(this.vScrollBar)) : (componentGroup.stage.defaultLayer.addChild(this.hScrollBar), componentGroup.stage.defaultLayer.addChild(this.frozenHScrollBar), componentGroup.stage.defaultLayer.addChild(this.rightFrozenHScrollBar), componentGroup.stage.defaultLayer.addChild(this.vScrollBar)), this.menu.bindTableComponent(componentGroup), this.drillIcon.appand(componentGroup), this.cellMover.appand(componentGroup);
47240
47272
  }
47241
47273
  createScrollBar() {
47242
47274
  var _a, _b, _c, _d, _e, _f;
@@ -47266,7 +47298,33 @@
47266
47298
  sliderStyle: sliderStyle,
47267
47299
  range: [0, .1],
47268
47300
  visible: !1
47269
- }), this.hScrollBar.render(), this.hScrollBar.hideAll(), this.vScrollBar = new ScrollBar({
47301
+ }), this.hScrollBar.render(), this.hScrollBar.hideAll(), this.frozenHScrollBar = new ScrollBar({
47302
+ direction: "horizontal",
47303
+ x: 2 * -this.table.tableNoFrameWidth,
47304
+ y: 2 * -this.table.tableNoFrameHeight,
47305
+ width: this.table.tableNoFrameWidth,
47306
+ height: width,
47307
+ padding: horizontalPadding,
47308
+ railStyle: {
47309
+ fill: scrollRailColor
47310
+ },
47311
+ sliderStyle: sliderStyle,
47312
+ range: [0, .1],
47313
+ visible: !1
47314
+ }), this.frozenHScrollBar.render(), this.frozenHScrollBar.hideAll(), this.rightFrozenHScrollBar = new ScrollBar({
47315
+ direction: "horizontal",
47316
+ x: 2 * -this.table.tableNoFrameWidth,
47317
+ y: 2 * -this.table.tableNoFrameHeight,
47318
+ width: this.table.tableNoFrameWidth,
47319
+ height: width,
47320
+ padding: horizontalPadding,
47321
+ railStyle: {
47322
+ fill: scrollRailColor
47323
+ },
47324
+ sliderStyle: sliderStyle,
47325
+ range: [0, .1],
47326
+ visible: !1
47327
+ }), this.rightFrozenHScrollBar.render(), this.rightFrozenHScrollBar.hideAll(), this.vScrollBar = new ScrollBar({
47270
47328
  direction: "vertical",
47271
47329
  x: 2 * -this.table.tableNoFrameWidth,
47272
47330
  y: 2 * -this.table.tableNoFrameHeight,
@@ -47282,9 +47340,11 @@
47282
47340
  }), this.vScrollBar.render(), this.vScrollBar.hideAll();
47283
47341
  }
47284
47342
  updateScrollBar() {
47285
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47343
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
47286
47344
  const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos,
47287
47345
  oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos,
47346
+ oldFrozenHorizontalBarPos = this.table.stateManager.scroll.frozenHorizontalBarPos,
47347
+ oldRightFrozenHorizontalBarPos = this.table.stateManager.scroll.rightFrozenHorizontalBarPos,
47288
47348
  theme = this.table.theme,
47289
47349
  width = null === (_a = theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
47290
47350
  visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible,
@@ -47296,18 +47356,23 @@
47296
47356
  totalWidth = this.table.getAllColsWidth(),
47297
47357
  frozenRowsHeight = this.table.getFrozenRowsHeight(),
47298
47358
  frozenColsWidth = this.table.getFrozenColsWidth(),
47359
+ frozenColsContentWidth = null !== (_j = null === (_h = (_g = this.table).getFrozenColsContentWidth) || void 0 === _h ? void 0 : _h.call(_g)) && void 0 !== _j ? _j : frozenColsWidth,
47299
47360
  bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(),
47300
47361
  rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
47362
+ rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth,
47301
47363
  hoverOn = this.table.theme.scrollStyle.hoverOn,
47302
- sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
47364
+ sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0;
47303
47365
  if (totalWidth > tableWidth + sizeTolerance) {
47304
47366
  const y = Math.min(tableHeight, totalHeight),
47305
- rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
47367
+ bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth,
47368
+ bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth,
47369
+ rangeEnd = bodyContentWidth > 0 ? Math.max(.05, bodyViewportWidth / bodyContentWidth) : 1;
47306
47370
  let attrY = 0;
47307
47371
  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);
47308
47372
  let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
47309
47373
  hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
47310
- null !== (_j = null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.ignoreFrozenCols) && void 0 !== _j && _j ? (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({
47374
+ const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
47375
+ 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({
47311
47376
  x: hScrollBarx,
47312
47377
  y: attrY,
47313
47378
  width: hScrollBarWidth,
@@ -47319,11 +47384,65 @@
47319
47384
  x: bounds.x1,
47320
47385
  y: bounds.y1
47321
47386
  }, "always" === horizontalVisible && this.hScrollBar.showAll();
47387
+ const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
47388
+ if (!ignoreFrozenCols && frozenScrollable) {
47389
+ const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
47390
+ x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
47391
+ this.frozenHScrollBar.setAttributes({
47392
+ x: x,
47393
+ y: attrY,
47394
+ width: frozenColsWidth,
47395
+ range: [0, frozenRangeEnd],
47396
+ visible: "always" === horizontalVisible
47397
+ });
47398
+ const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
47399
+ this.frozenHScrollBar._viewPosition = {
47400
+ x: bounds.x1,
47401
+ y: bounds.y1
47402
+ }, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
47403
+ } else this.frozenHScrollBar.setAttributes({
47404
+ x: 2 * -this.table.tableNoFrameWidth,
47405
+ y: 2 * -this.table.tableNoFrameHeight,
47406
+ width: 0,
47407
+ visible: !1
47408
+ });
47409
+ const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
47410
+ if (!ignoreFrozenCols && rightFrozenScrollable) {
47411
+ const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
47412
+ x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
47413
+ this.rightFrozenHScrollBar.setAttributes({
47414
+ x: x,
47415
+ y: attrY,
47416
+ width: rightFrozenColsWidth,
47417
+ range: [0, rightFrozenRangeEnd],
47418
+ visible: "always" === horizontalVisible
47419
+ });
47420
+ const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
47421
+ this.rightFrozenHScrollBar._viewPosition = {
47422
+ x: bounds.x1,
47423
+ y: bounds.y1
47424
+ }, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
47425
+ } else this.rightFrozenHScrollBar.setAttributes({
47426
+ x: 2 * -this.table.tableNoFrameWidth,
47427
+ y: 2 * -this.table.tableNoFrameHeight,
47428
+ width: 0,
47429
+ visible: !1
47430
+ });
47322
47431
  } else this.hScrollBar.setAttributes({
47323
47432
  x: 2 * -this.table.tableNoFrameWidth,
47324
47433
  y: 2 * -this.table.tableNoFrameHeight,
47325
47434
  width: 0,
47326
47435
  visible: !1
47436
+ }), this.frozenHScrollBar.setAttributes({
47437
+ x: 2 * -this.table.tableNoFrameWidth,
47438
+ y: 2 * -this.table.tableNoFrameHeight,
47439
+ width: 0,
47440
+ visible: !1
47441
+ }), this.rightFrozenHScrollBar.setAttributes({
47442
+ x: 2 * -this.table.tableNoFrameWidth,
47443
+ y: 2 * -this.table.tableNoFrameHeight,
47444
+ width: 0,
47445
+ visible: !1
47327
47446
  });
47328
47447
  if (totalHeight > tableHeight + sizeTolerance) {
47329
47448
  const x = Math.min(tableWidth, totalWidth),
@@ -47347,7 +47466,7 @@
47347
47466
  height: 0,
47348
47467
  visible: !1
47349
47468
  });
47350
- this.table.stateManager.setScrollLeft(oldHorizontalBarPos), this.table.stateManager.setScrollTop(oldVerticalBarPos);
47469
+ this.table.stateManager.setScrollLeft(oldHorizontalBarPos), this.table.stateManager.setFrozenColsScrollLeft(oldFrozenHorizontalBarPos, !1), this.table.stateManager.setRightFrozenColsScrollLeft(oldRightFrozenHorizontalBarPos, !1), this.table.stateManager.setScrollTop(oldVerticalBarPos);
47351
47470
  }
47352
47471
  hideResizeCol() {
47353
47472
  this.columnResizeLine.setAttribute("visible", !1), this.columnResizeBgLine.setAttribute("visible", !1), this.columnResizeLabel.setAttribute("visible", !1), this.columnResizeLabel.hideAll();
@@ -47471,9 +47590,9 @@
47471
47590
  this.cellMover.update(backX, lineX, backY, lineY);
47472
47591
  }
47473
47592
  setFrozenColumnShadow(col, isRightFrozen) {
47474
- var _a, _b;
47475
- const colX = getColX(col, this.table, isRightFrozen);
47476
- col < 0 || "always" !== (null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible) ? this.frozenShadowLine.setAttributes({
47593
+ var _a, _b, _c, _d, _e;
47594
+ const colX = !isRightFrozen && col === this.table.frozenColCount - 1 && (null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0) > 0 ? this.table.getFrozenColsWidth() : getColX(col, this.table, isRightFrozen);
47595
+ col < 0 || "always" !== (null === (_e = null === (_d = this.table.theme.frozenColumnLine) || void 0 === _d ? void 0 : _d.shadow) || void 0 === _e ? void 0 : _e.visible) ? this.frozenShadowLine.setAttributes({
47477
47596
  visible: !1,
47478
47597
  x: colX,
47479
47598
  height: this.table.getDrawRange().height
@@ -47484,9 +47603,9 @@
47484
47603
  });
47485
47604
  }
47486
47605
  setRightFrozenColumnShadow(col) {
47487
- var _a, _b;
47488
- const colX = getColX(col, this.table, !0);
47489
- col >= this.table.colCount || "always" !== (null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible) ? this.rightFrozenShadowLine.setAttributes({
47606
+ var _a, _b, _c, _d, _e;
47607
+ const colX = this.table.options.scrollRightFrozenCols && (null !== (_c = null === (_b = (_a = this.table).getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0) > 0 ? this.table.tableNoFrameWidth - this.table.getRightFrozenColsWidth() : getColX(col, this.table, !0);
47608
+ col >= this.table.colCount || "always" !== (null === (_e = null === (_d = this.table.theme.frozenColumnLine) || void 0 === _d ? void 0 : _d.shadow) || void 0 === _e ? void 0 : _e.visible) ? this.rightFrozenShadowLine.setAttributes({
47490
47609
  visible: !1,
47491
47610
  x: colX - this.rightFrozenShadowLine.attribute.width,
47492
47611
  height: this.table.getDrawRange().height
@@ -47522,13 +47641,23 @@
47522
47641
  var _a;
47523
47642
  const visible1 = this.table.theme.scrollStyle.visible,
47524
47643
  horizontalVisible = null !== (_a = this.table.theme.scrollStyle.horizontalVisible) && void 0 !== _a ? _a : visible1;
47525
- "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || (this.hScrollBar.setAttribute("visible", !1), this.hScrollBar.hideAll(), this.table.scenegraph.updateNextFrame());
47644
+ "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || (this.hScrollBar.setAttribute("visible", !1), this.hScrollBar.hideAll(), this.frozenHScrollBar.setAttribute("visible", !1), this.frozenHScrollBar.hideAll(), this.rightFrozenHScrollBar.setAttribute("visible", !1), this.rightFrozenHScrollBar.hideAll(), this._horizontalScrollBarTarget = void 0, this.table.scenegraph.updateNextFrame());
47526
47645
  }
47527
- showHorizontalScrollBar() {
47646
+ showHorizontalScrollBar(target = "all") {
47528
47647
  var _a;
47529
47648
  const visible1 = this.table.theme.scrollStyle.visible,
47530
47649
  horizontalVisible = null !== (_a = this.table.theme.scrollStyle.horizontalVisible) && void 0 !== _a ? _a : visible1;
47531
- "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || (this.hScrollBar.setAttribute("visible", !0), this.hScrollBar.showAll(), this.table.scenegraph.updateNextFrame());
47650
+ if ("focus" !== horizontalVisible && "scrolling" !== horizontalVisible) return;
47651
+ if (this._horizontalScrollBarTarget === target) return;
47652
+ this._horizontalScrollBarTarget = target;
47653
+ const showFrozen = "all" === target || "frozen" === target,
47654
+ showRightFrozen = "all" === target || "rightFrozen" === target,
47655
+ bodyVisible = ("all" === target || "body" === target) && this.hScrollBar.attribute.width > 0;
47656
+ this.hScrollBar.setAttribute("visible", bodyVisible), bodyVisible ? this.hScrollBar.showAll() : this.hScrollBar.hideAll();
47657
+ const frozenVisible = showFrozen && this.frozenHScrollBar.attribute.width > 0;
47658
+ this.frozenHScrollBar.setAttribute("visible", frozenVisible), frozenVisible ? this.frozenHScrollBar.showAll() : this.frozenHScrollBar.hideAll();
47659
+ const rightFrozenVisible = showRightFrozen && this.rightFrozenHScrollBar.attribute.width > 0;
47660
+ this.rightFrozenHScrollBar.setAttribute("visible", rightFrozenVisible), rightFrozenVisible ? this.rightFrozenHScrollBar.showAll() : this.rightFrozenHScrollBar.hideAll(), this.table.scenegraph.updateNextFrame();
47532
47661
  }
47533
47662
  updateVerticalScrollBarPos(topRatio) {
47534
47663
  const range = this.vScrollBar.attribute.range,
@@ -47552,6 +47681,28 @@
47552
47681
  y: bounds.y1
47553
47682
  };
47554
47683
  }
47684
+ updateFrozenHorizontalScrollBarPos(leftRatio) {
47685
+ const range = this.frozenHScrollBar.attribute.range,
47686
+ size = range[1] - range[0],
47687
+ range0 = leftRatio * (1 - size);
47688
+ this.frozenHScrollBar.setAttribute("range", [range0, range0 + size]);
47689
+ const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
47690
+ this.frozenHScrollBar._viewPosition = {
47691
+ x: bounds.x1,
47692
+ y: bounds.y1
47693
+ };
47694
+ }
47695
+ updateRightFrozenHorizontalScrollBarPos(leftRatio) {
47696
+ const range = this.rightFrozenHScrollBar.attribute.range,
47697
+ size = range[1] - range[0],
47698
+ range0 = leftRatio * (1 - size);
47699
+ this.rightFrozenHScrollBar.setAttribute("range", [range0, range0 + size]);
47700
+ const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
47701
+ this.rightFrozenHScrollBar._viewPosition = {
47702
+ x: bounds.x1,
47703
+ y: bounds.y1
47704
+ };
47705
+ }
47555
47706
  updateStyle() {
47556
47707
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
47557
47708
  const theme = this.table.theme,
@@ -47581,6 +47732,20 @@
47581
47732
  fill: scrollRailColor
47582
47733
  },
47583
47734
  sliderStyle: sliderStyle
47735
+ }), this.frozenHScrollBar.setAttributes({
47736
+ height: width,
47737
+ padding: horizontalPadding,
47738
+ railStyle: {
47739
+ fill: scrollRailColor
47740
+ },
47741
+ sliderStyle: sliderStyle
47742
+ }), this.rightFrozenHScrollBar.setAttributes({
47743
+ height: width,
47744
+ padding: horizontalPadding,
47745
+ railStyle: {
47746
+ fill: scrollRailColor
47747
+ },
47748
+ sliderStyle: sliderStyle
47584
47749
  });
47585
47750
  const columnResizeColor = null === (_g = theme.columnResize) || void 0 === _g ? void 0 : _g.lineColor,
47586
47751
  columnResizeWidth = null === (_h = theme.columnResize) || void 0 === _h ? void 0 : _h.lineWidth,
@@ -49694,29 +49859,50 @@
49694
49859
  drawShape(group, context, xOrigin, yOrigin, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
49695
49860
  var _a, _b, _c, _d, _e, _f;
49696
49861
  const table = group.stage.table;
49697
- if (table) if ("body" === group.role) {
49698
- drawClipRect(context, -(null !== (_a = group.attribute.x) && void 0 !== _a ? _a : 0) + table.getFrozenColsWidth(), -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight(), group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
49862
+ if (!table) return;
49863
+ const clipInflate = getSelectOverlayClipInflate(group, table);
49864
+ if ("body" === group.role) {
49865
+ drawClipRect(context, -(null !== (_a = group.attribute.x) && void 0 !== _a ? _a : 0) + table.getFrozenColsWidth() - clipInflate.left, -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight() - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49699
49866
  } else if ("row-header" === group.role) {
49700
- drawClipRect(context, 0, -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight(), table.getFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
49867
+ drawClipRect(context, 0 - clipInflate.left, -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight() - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49701
49868
  } else if ("col-header" === group.role) {
49702
- drawClipRect(context, -(null !== (_d = group.attribute.x) && void 0 !== _d ? _d : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
49869
+ drawClipRect(context, -(null !== (_d = group.attribute.x) && void 0 !== _d ? _d : 0) + table.getFrozenColsWidth() - clipInflate.left, 0 - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49703
49870
  } else if ("right-frozen" === group.role) {
49704
- drawClipRect(context, 0, -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight(), table.getRightFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
49871
+ drawClipRect(context, 0 - clipInflate.left, -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight() - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49705
49872
  } else if ("bottom-frozen" === group.role) {
49706
- drawClipRect(context, -(null !== (_f = group.attribute.x) && void 0 !== _f ? _f : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
49873
+ drawClipRect(context, -(null !== (_f = group.attribute.x) && void 0 !== _f ? _f : 0) + table.getFrozenColsWidth() - clipInflate.left, 0 - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49707
49874
  } else if ("corner-header" === group.role) {
49708
- drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getFrozenRowsHeight());
49875
+ drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49709
49876
  } else if ("corner-right-top-header" === group.role) {
49710
- drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
49877
+ drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49711
49878
  } else if ("corner-right-bottom-header" === group.role) {
49712
- drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
49879
+ drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49713
49880
  } else if ("corner-left-bottom-header" === group.role) {
49714
- drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getBottomFrozenRowsHeight());
49881
+ drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
49715
49882
  }
49716
49883
  }
49717
49884
  };
49718
49885
  ClipBodyGroupBeforeRenderContribution = __decorate$5([injectable()], ClipBodyGroupBeforeRenderContribution);
49719
49886
  const precision = Math.pow(2, 24);
49887
+ function getSelectOverlayClipInflate(group, table) {
49888
+ var _a, _b, _c;
49889
+ if (!("select-overlay" === group.name)) return {
49890
+ left: 0,
49891
+ top: 0,
49892
+ right: 0,
49893
+ bottom: 0
49894
+ };
49895
+ const lineWidth = null === (_a = table.theme.selectionStyle) || void 0 === _a ? void 0 : _a.cellBorderLineWidth,
49896
+ maxLineWidth = Array.isArray(lineWidth) ? Math.max(...lineWidth.filter(v => "number" == typeof v)) : "number" == typeof lineWidth ? lineWidth : 0,
49897
+ baseInflate = Math.max(1, Math.ceil(maxLineWidth / 2) + 1),
49898
+ handleInflate = !!(null === (_b = table.options.excelOptions) || void 0 === _b ? void 0 : _b.fillHandle) && 1 === (null === (_c = table.stateManager.select.ranges) || void 0 === _c ? void 0 : _c.length) ? 3 : 0;
49899
+ return {
49900
+ left: baseInflate,
49901
+ top: baseInflate,
49902
+ right: Math.max(baseInflate, handleInflate),
49903
+ bottom: Math.max(baseInflate, handleInflate)
49904
+ };
49905
+ }
49720
49906
  function drawClipRect(context, x, y, width, height) {
49721
49907
  context.beginPath();
49722
49908
  const matrix = context.applyedMatrix;
@@ -51441,10 +51627,11 @@
51441
51627
  });
51442
51628
  }
51443
51629
  setX(x, isEnd = !1) {
51630
+ var _a, _b, _c;
51444
51631
  return __awaiter$3(this, void 0, void 0, function* () {
51445
51632
  const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2,
51446
51633
  xLimitRight = this.table.getAllColsWidth() - xLimitLeft,
51447
- screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);
51634
+ screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width + (null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0));
51448
51635
  screenLeft && (this.screenLeftCol = screenLeft.col), x < xLimitLeft && this.colStart === this.bodyLeftCol || x > xLimitRight && this.colEnd === this.bodyRightCol || this.table.scenegraph.bodyGroup.firstChild && "group" === this.table.scenegraph.bodyGroup.firstChild.type && 0 === this.table.scenegraph.bodyGroup.firstChild.childrenCount ? (this.updateDeltaX(x), this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX)) : this.dynamicSetX(x, screenLeft, isEnd);
51449
51636
  });
51450
51637
  }
@@ -51546,6 +51733,7 @@
51546
51733
  }
51547
51734
  }
51548
51735
  updateDeltaX(x, screenLeftX, screenLeftCol) {
51736
+ var _a, _b, _c, _d, _e, _f;
51549
51737
  if (this.colStart === this.bodyLeftCol) {
51550
51738
  const colGroup = this.table.scenegraph.getColGroup(this.colStart);
51551
51739
  if (colGroup) {
@@ -51555,7 +51743,7 @@
51555
51743
  } else if (this.colEnd === this.bodyRightCol) {
51556
51744
  const colGroup = this.table.scenegraph.getColGroup(this.colEnd);
51557
51745
  if (colGroup) {
51558
- const deltaX = colGroup.attribute.x + colGroup.attribute.width - (this.table.getAllColsWidth() - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth());
51746
+ const deltaX = colGroup.attribute.x + colGroup.attribute.width - (this.table.getAllColsWidth() - (null !== (_c = null === (_b = (_a = this.table).getFrozenColsContentWidth) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : this.table.getFrozenColsWidth()) - (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsContentWidth) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : this.table.getRightFrozenColsWidth()));
51559
51747
  this.deltaX = -deltaX;
51560
51748
  }
51561
51749
  } else if (isValid$1(screenLeftX) && isValid$1(screenLeftCol)) {
@@ -51634,7 +51822,7 @@
51634
51822
  });
51635
51823
  }
51636
51824
  function updateComponent(selectComp, key, scene) {
51637
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
51825
+ var _a, _b, _c, _d, _e, _f, _g, _h;
51638
51826
  const table = scene.table,
51639
51827
  [startColStr, startRowStr, endColStr, endRowStr] = key.split("-"),
51640
51828
  startCol = parseInt(startColStr, 10),
@@ -51667,10 +51855,13 @@
51667
51855
  }
51668
51856
  const colsWidth = table.getColsWidth(computeRectCellRangeStartCol, computeRectCellRangeEndCol),
51669
51857
  rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow),
51858
+ overlayGroup = scene.getSelectOverlayGroup(selectComp.role),
51859
+ offsetX = scene.tableGroup.attribute.x + (null !== (_a = overlayGroup.attribute.x) && void 0 !== _a ? _a : 0),
51860
+ offsetY = scene.tableGroup.attribute.y + (null !== (_b = overlayGroup.attribute.y) && void 0 !== _b ? _b : 0),
51670
51861
  firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
51671
51862
  if (selectComp.rect.setAttributes({
51672
- x: firstCellBound.x1 - scene.tableGroup.attribute.x,
51673
- y: firstCellBound.y1 - scene.tableGroup.attribute.y,
51863
+ x: firstCellBound.x1 - offsetX,
51864
+ y: firstCellBound.y1 - offsetY,
51674
51865
  width: colsWidth,
51675
51866
  height: rowsHeight,
51676
51867
  visible: !0
@@ -51680,16 +51871,16 @@
51680
51871
  currentHeight: rowsHeight,
51681
51872
  selectComp: selectComp
51682
51873
  }), selectComp.fillhandle) {
51683
- const fillHandle = null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle;
51874
+ const fillHandle = null === (_c = scene.table.options.excelOptions) || void 0 === _c ? void 0 : _c.fillHandle;
51684
51875
  let lastCellBound,
51685
51876
  handlerX,
51686
51877
  visible = !0;
51687
51878
  "function" == typeof fillHandle && (visible = fillHandle({
51688
51879
  selectRanges: scene.table.stateManager.select.ranges,
51689
51880
  table: scene.table
51690
- })), endCol < table.colCount - 1 ? (lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3) : 0 === startCol ? (lastCellBound = scene.highPerformanceGetCell(0, endRow).globalAABBBounds, handlerX = lastCellBound.x1 - scene.tableGroup.attribute.x) : (lastCellBound = scene.highPerformanceGetCell(startCol - 1, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3), lastCellBound = endRow < table.rowCount - 1 ? scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds : scene.highPerformanceGetCell(endCol, startRow - 1).globalAABBBounds;
51691
- const handlerY = lastCellBound.y2 - scene.tableGroup.attribute.y - 3;
51692
- null === (_b = selectComp.fillhandle) || void 0 === _b || _b.setAttributes({
51881
+ })), endCol < table.colCount - 1 ? (lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - offsetX - 3) : 0 === startCol ? (lastCellBound = scene.highPerformanceGetCell(0, endRow).globalAABBBounds, handlerX = lastCellBound.x1 - offsetX) : (lastCellBound = scene.highPerformanceGetCell(startCol - 1, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - offsetX - 3), lastCellBound = endRow < table.rowCount - 1 ? scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds : scene.highPerformanceGetCell(endCol, startRow - 1).globalAABBBounds;
51882
+ const handlerY = lastCellBound.y2 - offsetY - 3;
51883
+ null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
51693
51884
  x: handlerX,
51694
51885
  y: handlerY,
51695
51886
  width: 6,
@@ -51697,72 +51888,15 @@
51697
51888
  visible: visible
51698
51889
  });
51699
51890
  }
51700
- let isNearRowHeader = !!table.frozenColCount && startCol === table.frozenColCount;
51701
- if (!isNearRowHeader && table.frozenColCount && table.scrollLeft > 0 && startCol >= table.frozenColCount) {
51702
- table.getColsWidth(0, startCol - 1) - table.scrollLeft < table.getFrozenColsWidth() && (isNearRowHeader = !0);
51703
- }
51704
- let isNearRightRowHeader = !!table.rightFrozenColCount && table.rightFrozenColCount > 0 && endCol === table.colCount - table.rightFrozenColCount - 1;
51705
- if (!isNearRightRowHeader && table.rightFrozenColCount && endCol < table.colCount - table.rightFrozenColCount) {
51706
- table.getColsWidth(0, endCol) - table.scrollLeft > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && (isNearRightRowHeader = !0);
51707
- }
51708
- let isNearColHeader = !table.frozenRowCount || startRow === table.frozenRowCount;
51709
- if (!isNearColHeader && table.frozenRowCount && table.scrollTop > 0 && startRow >= table.frozenRowCount) {
51710
- table.getRowsHeight(0, startRow - 1) - table.scrollTop < table.getFrozenRowsHeight() && (isNearColHeader = !0);
51711
- }
51712
- let isNearBottomColHeader = !!table.bottomFrozenRowCount && endRow === table.rowCount - table.bottomFrozenRowCount - 1;
51713
- if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
51714
- table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
51715
- }
51716
- const {
51717
- dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
51718
- } = table.theme.selectionStyle;
51719
- if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
51720
- if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
51721
- const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
51722
- selectComp.rect.setAttributes({
51723
- x: selectComp.rect.attribute.x + (table.getFrozenColsWidth() - selectComp.rect.attribute.x),
51724
- width: width > 0 ? width : 0
51725
- }), null === (_c = selectComp.fillhandle) || void 0 === _c || _c.setAttributes({
51726
- visible: width > 0
51727
- });
51728
- }
51729
- if (table.getRightFrozenColsWidth() > 0 && scene.rightFrozenGroup.attribute.height > 0 && selectComp.rect.attribute.x + selectComp.rect.attribute.width > scene.rightFrozenGroup.attribute.x && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
51730
- const width = scene.rightFrozenGroup.attribute.x - selectComp.rect.attribute.x;
51731
- selectComp.rect.setAttributes({
51732
- x: selectComp.rect.attribute.x,
51733
- width: width > 0 ? width : 0
51734
- }), null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
51735
- visible: width - colsWidth > 0
51736
- });
51737
- }
51738
- if (selectComp.rect.attribute.y < scene.colHeaderGroup.attribute.height && table.scrollTop > 0 && ("body" === selectComp.role || "rowHeader" === selectComp.role || "rightFrozen" === selectComp.role)) {
51739
- const height = selectComp.rect.attribute.height - (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y);
51740
- selectComp.rect.setAttributes({
51741
- y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
51742
- height: height > 0 ? height : 0
51743
- }), null === (_e = selectComp.fillhandle) || void 0 === _e || _e.setAttributes({
51744
- visible: height > 0
51745
- });
51746
- }
51747
- if (scene.bottomFrozenGroup.attribute.width > 0 && scene.bottomFrozenGroup.attribute.height > 0 && selectComp.rect.attribute.y + selectComp.rect.attribute.height > scene.bottomFrozenGroup.attribute.y && ("body" === selectComp.role || "rowHeader" === selectComp.role || "rightFrozen" === selectComp.role)) {
51748
- const height = scene.bottomFrozenGroup.attribute.y - selectComp.rect.attribute.y;
51749
- selectComp.rect.setAttributes({
51750
- y: selectComp.rect.attribute.y,
51751
- height: height > 0 ? height : 0
51752
- }), null === (_f = selectComp.fillhandle) || void 0 === _f || _f.setAttributes({
51753
- visible: height - rowsHeight > 0
51754
- });
51755
- }
51756
- } else scene.tableGroup.insertAfter(selectComp.rect, "body" === selectComp.role ? scene.bodyGroup : "columnHeader" === selectComp.role ? scene.colHeaderGroup : "rowHeader" === selectComp.role ? scene.rowHeaderGroup : "cornerHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightTopCorner" === selectComp.role ? scene.rightTopCornerGroup : "rightFrozen" === selectComp.role ? scene.rightFrozenGroup : "leftBottomCorner" === selectComp.role ? scene.leftBottomCornerGroup : "bottomFrozen" === selectComp.role ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup);
51757
51891
  let diffSize = 0;
51758
- "number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
51892
+ "number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_e = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _e ? _e : 0) / 2)), selectComp.rect.setAttributes({
51759
51893
  width: selectComp.rect.attribute.width - diffSize
51760
- })), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
51894
+ })), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_f = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _f ? _f : 0) / 2)), selectComp.rect.setAttributes({
51761
51895
  x: selectComp.rect.attribute.x + diffSize,
51762
51896
  width: selectComp.rect.attribute.width - diffSize
51763
- })), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_j = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _j ? _j : 0) / 2)), selectComp.rect.setAttributes({
51897
+ })), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
51764
51898
  height: selectComp.rect.attribute.height - diffSize
51765
- })), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_k = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _k ? _k : 0) / 2)), selectComp.rect.setAttributes({
51899
+ })), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
51766
51900
  y: selectComp.rect.attribute.y + diffSize,
51767
51901
  height: selectComp.rect.attribute.height - diffSize
51768
51902
  }));
@@ -51912,7 +52046,7 @@
51912
52046
  }
51913
52047
 
51914
52048
  function createCellSelectBorder(scene, start_Col, start_Row, end_Col, end_Row, selectRangeType, selectId, strokes) {
51915
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
52049
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51916
52050
  let isHasFillHandleRect = !!(null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle);
51917
52051
  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)) {
51918
52052
  const maxRow = Math.max(scene.table.stateManager.select.ranges[0].start.row, scene.table.stateManager.select.ranges[0].end.row),
@@ -51924,30 +52058,33 @@
51924
52058
  startRow = Math.min(start_Row, end_Row),
51925
52059
  endCol = Math.max(start_Col, end_Col),
51926
52060
  endRow = Math.max(start_Row, end_Row),
52061
+ overlayGroup = scene.getSelectOverlayGroup(selectRangeType),
52062
+ offsetX = scene.tableGroup.attribute.x + (null !== (_d = overlayGroup.attribute.x) && void 0 !== _d ? _d : 0),
52063
+ offsetY = scene.tableGroup.attribute.y + (null !== (_e = overlayGroup.attribute.y) && void 0 !== _e ? _e : 0),
51927
52064
  firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds,
51928
52065
  lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds,
51929
52066
  theme = scene.table.theme,
51930
- bodyClickBorderColor = null === (_d = theme.selectionStyle) || void 0 === _d ? void 0 : _d.cellBorderColor,
51931
- bodyClickLineWidth = null === (_e = theme.selectionStyle) || void 0 === _e ? void 0 : _e.cellBorderLineWidth,
52067
+ bodyClickBorderColor = null === (_f = theme.selectionStyle) || void 0 === _f ? void 0 : _f.cellBorderColor,
52068
+ bodyClickLineWidth = null === (_g = theme.selectionStyle) || void 0 === _g ? void 0 : _g.cellBorderLineWidth,
51932
52069
  rect = createRect({
51933
52070
  pickable: !1,
51934
- fill: "replace" !== (null === (_f = theme.selectionStyle) || void 0 === _f ? void 0 : _f.selectionFillMode) && (null !== (_h = null === (_g = theme.selectionStyle) || void 0 === _g ? void 0 : _g.cellBgColor) && void 0 !== _h ? _h : "rgba(0, 0, 255,0.1)"),
52071
+ fill: "replace" !== (null === (_h = theme.selectionStyle) || void 0 === _h ? void 0 : _h.selectionFillMode) && (null !== (_k = null === (_j = theme.selectionStyle) || void 0 === _j ? void 0 : _j.cellBgColor) && void 0 !== _k ? _k : "rgba(0, 0, 255,0.1)"),
51935
52072
  lineWidth: bodyClickLineWidth,
51936
52073
  stroke: strokes.map(stroke => !!stroke && bodyClickBorderColor),
51937
- x: firstCellBound.x1 - scene.tableGroup.attribute.x,
51938
- y: firstCellBound.y1 - scene.tableGroup.attribute.y,
52074
+ x: firstCellBound.x1 - offsetX,
52075
+ y: firstCellBound.y1 - offsetY,
51939
52076
  width: 0,
51940
52077
  height: 0,
51941
52078
  visible: !0,
51942
- 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)
52079
+ cornerRadius: getCornerRadius(selectRangeType, null === (_l = scene.table.theme.frameStyle) || void 0 === _l ? void 0 : _l.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
51943
52080
  });
51944
52081
  let fillhandle;
51945
52082
  isHasFillHandleRect && (fillhandle = createRect({
51946
52083
  pickable: !1,
51947
52084
  fill: bodyClickBorderColor,
51948
52085
  stroke: bodyClickBorderColor,
51949
- x: lastCellBound.x2 - 3,
51950
- y: lastCellBound.y2 - 3,
52086
+ x: lastCellBound.x2 - offsetX - 3,
52087
+ y: lastCellBound.y2 - offsetY - 3,
51951
52088
  width: 6,
51952
52089
  height: 6,
51953
52090
  visible: !0
@@ -51955,7 +52092,7 @@
51955
52092
  rect: rect,
51956
52093
  fillhandle: fillhandle,
51957
52094
  role: selectRangeType
51958
- }), 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);
52095
+ }), overlayGroup.addChild(rect), isHasFillHandleRect && overlayGroup.addChild(fillhandle);
51959
52096
  }
51960
52097
  function getCornerRadius(selectRangeType, cornerRadius, start_Col, start_Row, end_Col, end_Row, table) {
51961
52098
  if (!cornerRadius) return;
@@ -52836,7 +52973,25 @@
52836
52973
  const rightBottomCornerGroup = createContainerGroup(0, 0, !0);
52837
52974
  rightBottomCornerGroup.role = "corner-right-bottom-header", scene.rightBottomCornerGroup = rightBottomCornerGroup;
52838
52975
  const leftBottomCornerGroup = createContainerGroup(0, 0, !0);
52839
- leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup, scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rowHeaderGroup), scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(colHeaderGroup), scene.tableGroup.addChild(rightFrozenGroup), scene.tableGroup.addChild(rightBottomCornerGroup), scene.tableGroup.addChild(rightTopCornerGroup), scene.tableGroup.addChild(leftBottomCornerGroup), scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(componentGroup);
52976
+ leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup;
52977
+ const bodySelectGroup = createContainerGroup(width, 0, !0);
52978
+ bodySelectGroup.role = "body", bodySelectGroup.name = "select-overlay", scene.bodySelectGroup = bodySelectGroup;
52979
+ const rowHeaderSelectGroup = createContainerGroup(0, 0, !0);
52980
+ rowHeaderSelectGroup.role = "row-header", rowHeaderSelectGroup.name = "select-overlay", scene.rowHeaderSelectGroup = rowHeaderSelectGroup;
52981
+ const bottomFrozenSelectGroup = createContainerGroup(0, 0, !0);
52982
+ bottomFrozenSelectGroup.role = "bottom-frozen", bottomFrozenSelectGroup.name = "select-overlay", scene.bottomFrozenSelectGroup = bottomFrozenSelectGroup;
52983
+ const colHeaderSelectGroup = createContainerGroup(0, 0, !0);
52984
+ colHeaderSelectGroup.role = "col-header", colHeaderSelectGroup.name = "select-overlay", scene.colHeaderSelectGroup = colHeaderSelectGroup;
52985
+ const rightFrozenSelectGroup = createContainerGroup(0, 0, !0);
52986
+ rightFrozenSelectGroup.role = "right-frozen", rightFrozenSelectGroup.name = "select-overlay", scene.rightFrozenSelectGroup = rightFrozenSelectGroup;
52987
+ const rightTopCornerSelectGroup = createContainerGroup(0, 0, !0);
52988
+ rightTopCornerSelectGroup.role = "corner-right-top-header", rightTopCornerSelectGroup.name = "select-overlay", scene.rightTopCornerSelectGroup = rightTopCornerSelectGroup;
52989
+ const rightBottomCornerSelectGroup = createContainerGroup(0, 0, !0);
52990
+ rightBottomCornerSelectGroup.role = "corner-right-bottom-header", rightBottomCornerSelectGroup.name = "select-overlay", scene.rightBottomCornerSelectGroup = rightBottomCornerSelectGroup;
52991
+ const leftBottomCornerSelectGroup = createContainerGroup(0, 0, !0);
52992
+ leftBottomCornerSelectGroup.role = "corner-left-bottom-header", leftBottomCornerSelectGroup.name = "select-overlay", scene.leftBottomCornerSelectGroup = leftBottomCornerSelectGroup;
52993
+ const cornerHeaderSelectGroup = createContainerGroup(0, 0, !0);
52994
+ cornerHeaderSelectGroup.role = "corner-header", cornerHeaderSelectGroup.name = "select-overlay", scene.cornerHeaderSelectGroup = cornerHeaderSelectGroup, scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rowHeaderGroup), scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(colHeaderGroup), scene.tableGroup.addChild(rightFrozenGroup), scene.tableGroup.addChild(rightBottomCornerGroup), scene.tableGroup.addChild(rightTopCornerGroup), scene.tableGroup.addChild(leftBottomCornerGroup), scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(bodySelectGroup), scene.tableGroup.addChild(rowHeaderSelectGroup), scene.tableGroup.addChild(bottomFrozenSelectGroup), scene.tableGroup.addChild(colHeaderSelectGroup), scene.tableGroup.addChild(rightFrozenSelectGroup), scene.tableGroup.addChild(rightBottomCornerSelectGroup), scene.tableGroup.addChild(rightTopCornerSelectGroup), scene.tableGroup.addChild(leftBottomCornerSelectGroup), scene.tableGroup.addChild(cornerHeaderSelectGroup), scene.tableGroup.addChild(componentGroup);
52840
52995
  }
52841
52996
  function createContainerGroup(width, height, clip) {
52842
52997
  return new Group$1({
@@ -53351,10 +53506,10 @@
53351
53506
  });
53352
53507
  }
53353
53508
  clearCells() {
53354
- var _a, _b;
53509
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
53355
53510
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
53356
53511
  plugin.deactivate(this.stage.pluginService);
53357
- }), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
53512
+ }), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(), null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(), null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(), null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(), null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(), null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
53358
53513
  x: 0,
53359
53514
  y: 0,
53360
53515
  width: 0,
@@ -53402,12 +53557,62 @@
53402
53557
  width: 0,
53403
53558
  height: 0,
53404
53559
  visible: !1
53560
+ }), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
53561
+ x: 0,
53562
+ y: 0,
53563
+ width: 0,
53564
+ height: 0
53565
+ }), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
53566
+ x: 0,
53567
+ y: 0,
53568
+ width: 0,
53569
+ height: 0
53570
+ }), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
53571
+ x: 0,
53572
+ y: 0,
53573
+ width: 0,
53574
+ height: 0,
53575
+ visible: !1
53576
+ }), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
53577
+ x: 0,
53578
+ y: 0,
53579
+ width: 0,
53580
+ height: 0
53581
+ }), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
53582
+ x: 0,
53583
+ y: 0,
53584
+ width: 0,
53585
+ height: 0,
53586
+ visible: !1
53587
+ }), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
53588
+ x: 0,
53589
+ y: 0,
53590
+ width: 0,
53591
+ height: 0,
53592
+ visible: !1
53593
+ }), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
53594
+ x: 0,
53595
+ y: 0,
53596
+ width: 0,
53597
+ height: 0,
53598
+ visible: !1
53599
+ }), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
53600
+ x: 0,
53601
+ y: 0,
53602
+ width: 0,
53603
+ height: 0,
53604
+ visible: !1
53605
+ }), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
53606
+ x: 0,
53607
+ y: 0,
53608
+ width: 0,
53609
+ height: 0
53405
53610
  }), this.tableGroup.setAttributes({
53406
53611
  x: this.table.tableX,
53407
53612
  y: this.table.tableY,
53408
53613
  width: 0,
53409
53614
  height: 0
53410
- }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border), delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release(), null === (_b = this.table.reactCustomLayout) || void 0 === _b || _b.clearCache();
53615
+ }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border), delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(), null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
53411
53616
  }
53412
53617
  updateStageBackground() {
53413
53618
  this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
@@ -53763,16 +53968,16 @@
53763
53968
  var _a, _b, _c, _d, _e, _f;
53764
53969
  const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild,
53765
53970
  lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
53766
- 0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
53971
+ 0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y), this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y), this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y), this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y), this.updateNextFrame());
53767
53972
  }
53768
53973
  setBodyAndColHeaderX(x) {
53769
53974
  const firstBodyCol = this.bodyGroup.firstChild,
53770
53975
  lastBodyCol = this.bodyGroup.lastChild;
53771
- 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.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.updateNextFrame());
53976
+ 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());
53772
53977
  }
53773
53978
  afterScenegraphCreated() {
53774
- var _a;
53775
- this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), this.updateNextFrame();
53979
+ var _a, _b;
53980
+ this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(), this.updateNextFrame();
53776
53981
  }
53777
53982
  dealWidthMode() {
53778
53983
  const table = this.table;
@@ -53894,13 +54099,23 @@
53894
54099
  moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
53895
54100
  }
53896
54101
  updateContainerAttrWidthAndX() {
53897
- var _a, _b, _c;
53898
- const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0),
53899
- rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0),
53900
- colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_a = this.table.frozenColCount) && void 0 !== _a ? _a : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0,
53901
- bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_b = this.table.frozenColCount) && void 0 !== _b ? _b : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0,
53902
- rightX = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
53903
- this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0), updateContainerChildrenX(this.leftBottomCornerGroup, 0), updateContainerChildrenX(this.rightTopCornerGroup, 0), updateContainerChildrenX(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width), this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width), this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width), this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width), this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width), this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width), this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width), this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width), this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
54102
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
54103
+ const frozenStartX = -(null !== (_c = null === (_b = (_a = this.table).getFrozenColsScrollLeft) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0),
54104
+ frozenViewportWidth = this.table.getFrozenColsWidth(),
54105
+ rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0),
54106
+ rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
54107
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
54108
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_g = this.table.frozenColCount) && void 0 !== _g ? _g : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0,
54109
+ bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_h = this.table.frozenColCount) && void 0 !== _h ? _h : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0;
54110
+ this.rightFrozenGroup.childrenCount > 0 && updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX), this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_j = this.table.frozenColCount) && void 0 !== _j ? _j : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0), updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX), updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX), this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width), this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width), this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width), this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width), this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width), this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width), this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width), this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width), this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
54111
+ }
54112
+ setFrozenColsScrollLeft(left) {
54113
+ const frozenStartX = -left;
54114
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX), updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), this.updateNextFrame();
54115
+ }
54116
+ setRightFrozenColsScrollLeft(left) {
54117
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
54118
+ updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX), updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
53904
54119
  }
53905
54120
  updateContainerAttrHeightAndY() {
53906
54121
  var _a, _b, _c;
@@ -53925,7 +54140,82 @@
53925
54140
  }, 0)) : (this._needUpdateContainer = !0, this.updateContainerSync(null !== (_a = updateConfig.needUpdateCellY) && void 0 !== _a && _a));
53926
54141
  }
53927
54142
  updateContainerSync(needUpdateCellY = !1) {
53928
- this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(), this.component.updateScrollBar(), this.updateNextFrame());
54143
+ this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(), this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
54144
+ }
54145
+ syncSelectOverlayGroups() {
54146
+ this.bodySelectGroup.setAttributes({
54147
+ x: this.bodyGroup.attribute.x,
54148
+ y: this.bodyGroup.attribute.y,
54149
+ width: this.bodyGroup.attribute.width,
54150
+ height: this.bodyGroup.attribute.height
54151
+ }), this.rowHeaderSelectGroup.setAttributes({
54152
+ x: this.rowHeaderGroup.attribute.x,
54153
+ y: this.rowHeaderGroup.attribute.y,
54154
+ width: this.rowHeaderGroup.attribute.width,
54155
+ height: this.rowHeaderGroup.attribute.height
54156
+ }), this.colHeaderSelectGroup.setAttributes({
54157
+ x: this.colHeaderGroup.attribute.x,
54158
+ y: this.colHeaderGroup.attribute.y,
54159
+ width: this.colHeaderGroup.attribute.width,
54160
+ height: this.colHeaderGroup.attribute.height
54161
+ }), this.cornerHeaderSelectGroup.setAttributes({
54162
+ x: this.cornerHeaderGroup.attribute.x,
54163
+ y: this.cornerHeaderGroup.attribute.y,
54164
+ width: this.cornerHeaderGroup.attribute.width,
54165
+ height: this.cornerHeaderGroup.attribute.height
54166
+ }), this.rightFrozenSelectGroup.setAttributes({
54167
+ x: this.rightFrozenGroup.attribute.x,
54168
+ y: this.rightFrozenGroup.attribute.y,
54169
+ width: this.rightFrozenGroup.attribute.width,
54170
+ height: this.rightFrozenGroup.attribute.height,
54171
+ visible: this.rightFrozenGroup.attribute.visible
54172
+ }), this.bottomFrozenSelectGroup.setAttributes({
54173
+ x: this.bottomFrozenGroup.attribute.x,
54174
+ y: this.bottomFrozenGroup.attribute.y,
54175
+ width: this.bottomFrozenGroup.attribute.width,
54176
+ height: this.bottomFrozenGroup.attribute.height,
54177
+ visible: this.bottomFrozenGroup.attribute.visible
54178
+ }), this.rightTopCornerSelectGroup.setAttributes({
54179
+ x: this.rightTopCornerGroup.attribute.x,
54180
+ y: this.rightTopCornerGroup.attribute.y,
54181
+ width: this.rightTopCornerGroup.attribute.width,
54182
+ height: this.rightTopCornerGroup.attribute.height,
54183
+ visible: this.rightTopCornerGroup.attribute.visible
54184
+ }), this.leftBottomCornerSelectGroup.setAttributes({
54185
+ x: this.leftBottomCornerGroup.attribute.x,
54186
+ y: this.leftBottomCornerGroup.attribute.y,
54187
+ width: this.leftBottomCornerGroup.attribute.width,
54188
+ height: this.leftBottomCornerGroup.attribute.height,
54189
+ visible: this.leftBottomCornerGroup.attribute.visible
54190
+ }), this.rightBottomCornerSelectGroup.setAttributes({
54191
+ x: this.rightBottomCornerGroup.attribute.x,
54192
+ y: this.rightBottomCornerGroup.attribute.y,
54193
+ width: this.rightBottomCornerGroup.attribute.width,
54194
+ height: this.rightBottomCornerGroup.attribute.height,
54195
+ visible: this.rightBottomCornerGroup.attribute.visible
54196
+ });
54197
+ }
54198
+ getSelectOverlayGroup(selectRangeType) {
54199
+ switch (selectRangeType) {
54200
+ case "body":
54201
+ return this.bodySelectGroup;
54202
+ case "rowHeader":
54203
+ return this.rowHeaderSelectGroup;
54204
+ case "bottomFrozen":
54205
+ return this.bottomFrozenSelectGroup;
54206
+ case "columnHeader":
54207
+ return this.colHeaderSelectGroup;
54208
+ case "rightFrozen":
54209
+ return this.rightFrozenSelectGroup;
54210
+ case "rightTopCorner":
54211
+ return this.rightTopCornerSelectGroup;
54212
+ case "leftBottomCorner":
54213
+ return this.leftBottomCornerSelectGroup;
54214
+ case "rightBottomCorner":
54215
+ return this.rightBottomCornerSelectGroup;
54216
+ default:
54217
+ return this.cornerHeaderSelectGroup;
54218
+ }
53929
54219
  }
53930
54220
  updateCellContentWhileResize(col, row) {
53931
54221
  var _a;
@@ -55404,29 +55694,32 @@
55404
55694
  }
55405
55695
  }
55406
55696
  function createCustomCellSelectBorder(scene, start_Col, start_Row, end_Col, end_Row, selectRangeType, selectId, strokes, style) {
55407
- var _a, _b, _c, _d;
55697
+ var _a, _b, _c, _d, _e, _f;
55408
55698
  const startCol = Math.min(start_Col, end_Col),
55409
55699
  startRow = Math.min(start_Row, end_Row),
55410
55700
  endCol = Math.max(start_Col, end_Col),
55411
55701
  endRow = Math.max(start_Row, end_Row),
55702
+ overlayGroup = scene.getSelectOverlayGroup(selectRangeType),
55703
+ offsetX = scene.tableGroup.attribute.x + (null !== (_a = overlayGroup.attribute.x) && void 0 !== _a ? _a : 0),
55704
+ offsetY = scene.tableGroup.attribute.y + (null !== (_b = overlayGroup.attribute.y) && void 0 !== _b ? _b : 0),
55412
55705
  firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds,
55413
55706
  rect = createRect({
55414
55707
  pickable: !1,
55415
- fill: null !== (_a = style.cellBgColor) && void 0 !== _a && _a,
55416
- lineWidth: null !== (_b = style.cellBorderLineWidth) && void 0 !== _b ? _b : 0,
55417
- lineDash: null !== (_c = style.cellBorderLineDash) && void 0 !== _c ? _c : [],
55708
+ fill: null !== (_c = style.cellBgColor) && void 0 !== _c && _c,
55709
+ lineWidth: null !== (_d = style.cellBorderLineWidth) && void 0 !== _d ? _d : 0,
55710
+ lineDash: null !== (_e = style.cellBorderLineDash) && void 0 !== _e ? _e : [],
55418
55711
  stroke: strokes.map(stroke => !!stroke && style.cellBorderColor),
55419
- x: firstCellBound.x1 - scene.tableGroup.attribute.x,
55420
- y: firstCellBound.y1 - scene.tableGroup.attribute.y,
55712
+ x: firstCellBound.x1 - offsetX,
55713
+ y: firstCellBound.y1 - offsetY,
55421
55714
  width: 0,
55422
55715
  height: 0,
55423
55716
  visible: !0,
55424
- cornerRadius: getCornerRadius(selectRangeType, null === (_d = scene.table.theme.frameStyle) || void 0 === _d ? void 0 : _d.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
55717
+ cornerRadius: getCornerRadius(selectRangeType, null === (_f = scene.table.theme.frameStyle) || void 0 === _f ? void 0 : _f.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
55425
55718
  });
55426
55719
  scene.customSelectedRangeComponents.set(`${startCol}-${startRow}-${endCol}-${endRow}-${selectId}`, {
55427
55720
  rect: rect,
55428
55721
  role: selectRangeType
55429
- }), 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);
55722
+ }), overlayGroup.addChild(rect);
55430
55723
  }
55431
55724
 
55432
55725
  function deletaCustomSelectRanges(state) {
@@ -55447,7 +55740,7 @@
55447
55740
  constructor(table) {
55448
55741
  this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce$1(state => {
55449
55742
  this.updateInteractionState(null != state ? state : InteractionState.default);
55450
- }, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
55743
+ }, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this), this.updateFrozenHorizontalScrollBar = this.updateFrozenHorizontalScrollBar.bind(this), this.updateRightFrozenHorizontalScrollBar = this.updateRightFrozenHorizontalScrollBar.bind(this);
55451
55744
  }
55452
55745
  initState() {
55453
55746
  this._initState(), this.setHoverState(), this.setSelectState(), this.setFrozenState();
@@ -55564,7 +55857,9 @@
55564
55857
  row: -1
55565
55858
  }, this.scroll = {
55566
55859
  horizontalBarPos: 0,
55567
- verticalBarPos: 0
55860
+ verticalBarPos: 0,
55861
+ frozenHorizontalBarPos: 0,
55862
+ rightFrozenHorizontalBarPos: 0
55568
55863
  }, this.tablePosition = {
55569
55864
  absoluteX: 0,
55570
55865
  absoluteY: 0
@@ -55796,13 +56091,42 @@
55796
56091
  }), void this._frozenObserver.observe(container);
55797
56092
  }
55798
56093
  if (this.table.getColsWidth(0, originalFrozenColCount - 1) > this.table._getMaxFrozenWidth()) {
55799
- if (this.table.internalProps.unfreezeAllOnExceedsMaxWidth) this.table._setFrozenColCount(0), this.setFrozenCol(-1);else {
56094
+ if (this.table.options.scrollFrozenCols) this.table.frozenColCount !== originalFrozenColCount && (this.table._setFrozenColCount(originalFrozenColCount), this.setFrozenCol(originalFrozenColCount));else if (this.table.internalProps.unfreezeAllOnExceedsMaxWidth) this.table._setFrozenColCount(0), this.setFrozenCol(-1);else {
55800
56095
  const computedFrozenColCount = this.table._getComputedFrozenColCount(originalFrozenColCount);
55801
56096
  this.table._setFrozenColCount(computedFrozenColCount), this.setFrozenCol(computedFrozenColCount);
55802
56097
  }
55803
56098
  } else this.table.frozenColCount !== originalFrozenColCount && (this.table._setFrozenColCount(originalFrozenColCount), this.setFrozenCol(originalFrozenColCount));
56099
+ this.table.options.scrollFrozenCols && 0 !== this.table.getFrozenColsOffset() ? this.setFrozenColsScrollLeft(this.scroll.frozenHorizontalBarPos, !1) : this.setFrozenColsScrollLeft(0, !1), this.table.options.scrollRightFrozenCols && 0 !== this.table.getRightFrozenColsOffset() ? this.setRightFrozenColsScrollLeft(this.scroll.rightFrozenHorizontalBarPos, !1) : this.setRightFrozenColsScrollLeft(0, !1);
55804
56100
  } else this.clearFrozenObserver();
55805
56101
  }
56102
+ setFrozenColsScrollLeft(left, triggerRender = !0) {
56103
+ if (!this.table || !this.table.scenegraph) return;
56104
+ const maxScrollLeft = this.table.getFrozenColsOffset();
56105
+ if (left = Math.max(0, Math.min(left, maxScrollLeft)), left = Math.ceil(left), this.scroll.frozenHorizontalBarPos === left) return;
56106
+ this.scroll.frozenHorizontalBarPos = left;
56107
+ const ratio = maxScrollLeft ? left / maxScrollLeft : 0;
56108
+ this.table.scenegraph.component.updateFrozenHorizontalScrollBarPos(ratio), triggerRender && this.table.scenegraph.setFrozenColsScrollLeft(left);
56109
+ }
56110
+ setRightFrozenColsScrollLeft(left, triggerRender = !0) {
56111
+ if (!this.table || !this.table.scenegraph) return;
56112
+ const maxScrollLeft = this.table.getRightFrozenColsOffset();
56113
+ if (left = Math.max(0, Math.min(left, maxScrollLeft)), left = Math.ceil(left), this.scroll.rightFrozenHorizontalBarPos === left) return;
56114
+ this.scroll.rightFrozenHorizontalBarPos = left;
56115
+ const ratio = maxScrollLeft ? 1 - left / maxScrollLeft : 1;
56116
+ this.table.scenegraph.component.updateRightFrozenHorizontalScrollBarPos(ratio), triggerRender && this.table.scenegraph.setRightFrozenColsScrollLeft(left);
56117
+ }
56118
+ updateFrozenHorizontalScrollBar(xRatio) {
56119
+ var _a, _b, _c;
56120
+ const maxScrollLeft = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0;
56121
+ let left = Math.ceil(xRatio * maxScrollLeft);
56122
+ isValid$1(left) && !isNaN(left) || (left = 0), this.setFrozenColsScrollLeft(left, !0);
56123
+ }
56124
+ updateRightFrozenHorizontalScrollBar(xRatio) {
56125
+ var _a, _b, _c;
56126
+ const maxScrollLeft = null !== (_c = null === (_b = (_a = this.table).getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0;
56127
+ let left = Math.ceil((1 - xRatio) * maxScrollLeft);
56128
+ isValid$1(left) && !isNaN(left) || (left = 0), this.setRightFrozenColsScrollLeft(left, !0);
56129
+ }
55806
56130
  clearFrozenObserver() {
55807
56131
  this._frozenObserver && (this._frozenObserver.disconnect(), this._frozenObserver = null);
55808
56132
  }
@@ -55875,32 +56199,35 @@
55875
56199
  }), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
55876
56200
  }
55877
56201
  updateHorizontalScrollBar(xRatio) {
55878
- var _a, _b, _c, _d;
56202
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
55879
56203
  const totalWidth = this.table.getAllColsWidth(),
55880
- oldHorizontalBarPos = this.scroll.horizontalBarPos;
55881
- let horizontalBarPos = Math.ceil(xRatio * (totalWidth - this.table.scenegraph.width));
56204
+ oldHorizontalBarPos = this.scroll.horizontalBarPos,
56205
+ frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56206
+ rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
56207
+ scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
56208
+ let horizontalBarPos = Math.ceil(xRatio * scrollRange);
55882
56209
  isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
55883
56210
  const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
55884
56211
  if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
55885
56212
  event: void 0,
55886
56213
  scrollTop: this.scroll.verticalBarPos,
55887
56214
  scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
55888
- scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
55889
- scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
56215
+ scrollHeight: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
56216
+ scrollWidth: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
55890
56217
  viewHeight: this.table.tableNoFrameHeight,
55891
56218
  viewWidth: this.table.tableNoFrameWidth,
55892
56219
  scrollDirection: "horizontal",
55893
56220
  scrollRatioX: xRatio,
55894
56221
  dx: dx
55895
56222
  }).some(value => !1 === value)) {
55896
- const xRatio = this.scroll.horizontalBarPos / (totalWidth - this.table.scenegraph.width);
56223
+ const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
55897
56224
  this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
55898
56225
  } 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), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
55899
56226
  event: void 0,
55900
56227
  scrollTop: this.scroll.verticalBarPos,
55901
56228
  scrollLeft: this.scroll.horizontalBarPos,
55902
- scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
55903
- scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
56229
+ scrollHeight: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
56230
+ scrollWidth: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
55904
56231
  viewHeight: this.table.tableNoFrameHeight,
55905
56232
  viewWidth: this.table.tableNoFrameWidth,
55906
56233
  scrollDirection: "horizontal",
@@ -55952,15 +56279,18 @@
55952
56279
  }), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
55953
56280
  }
55954
56281
  setScrollLeft(left, event, triggerEvent = !0) {
55955
- var _a, _b, _c, _d, _e, _f, _g;
56282
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
55956
56283
  if (!this.table || !this.table.scenegraph) return;
55957
56284
  this.table.scrollLeft;
55958
56285
  const totalWidth = this.table.getAllColsWidth(),
55959
- sizeTolerance = (this.table.getFrozenColsWidth(), (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0);
55960
- left = Math.max(0, Math.min(left, totalWidth - this.table.scenegraph.width - sizeTolerance)), left = Math.ceil(left);
56286
+ frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56287
+ rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
56288
+ scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset),
56289
+ sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
56290
+ left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
55961
56291
  const oldHorizontalBarPos = this.scroll.horizontalBarPos,
55962
- xRatio = left / (totalWidth - this.table.scenegraph.width);
55963
- 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) {
56292
+ xRatio = scrollRange ? left / scrollRange : 0;
56293
+ 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) {
55964
56294
  let horizontalBarPos = left;
55965
56295
  isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
55966
56296
  const dx = horizontalBarPos - oldHorizontalBarPos;
@@ -55968,15 +56298,15 @@
55968
56298
  event: null == event ? void 0 : event.nativeEvent,
55969
56299
  scrollTop: this.scroll.verticalBarPos,
55970
56300
  scrollLeft: horizontalBarPos,
55971
- scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
55972
- scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
56301
+ scrollHeight: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
56302
+ scrollWidth: null === (_l = this.table.theme.scrollStyle) || void 0 === _l ? void 0 : _l.width,
55973
56303
  viewHeight: this.table.tableNoFrameHeight,
55974
56304
  viewWidth: this.table.tableNoFrameWidth,
55975
56305
  scrollDirection: "horizontal",
55976
56306
  scrollRatioX: xRatio,
55977
56307
  dx: dx
55978
56308
  }).some(value => !1 === value)) {
55979
- const xRatio = this.scroll.horizontalBarPos / (totalWidth - this.table.scenegraph.width);
56309
+ const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
55980
56310
  return void this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
55981
56311
  }
55982
56312
  }
@@ -55986,8 +56316,8 @@
55986
56316
  event: null == event ? void 0 : event.nativeEvent,
55987
56317
  scrollTop: this.scroll.verticalBarPos,
55988
56318
  scrollLeft: this.scroll.horizontalBarPos,
55989
- scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
55990
- scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
56319
+ scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
56320
+ scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
55991
56321
  viewHeight: this.table.tableNoFrameHeight,
55992
56322
  viewWidth: this.table.tableNoFrameWidth,
55993
56323
  scrollDirection: "horizontal",
@@ -55999,7 +56329,7 @@
55999
56329
  this.table.scenegraph.component.hideVerticalScrollBar();
56000
56330
  }
56001
56331
  showVerticalScrollBar(autoHide) {
56002
- this.table.scenegraph.component.showVerticalScrollBar(), autoHide && (clearTimeout(this._clearVerticalScrollBar), this._clearVerticalScrollBar = setTimeout(() => {
56332
+ this.table.scenegraph.component.showVerticalScrollBar(), clearTimeout(this._clearVerticalScrollBar), autoHide && (this._clearVerticalScrollBar = setTimeout(() => {
56003
56333
  var _a;
56004
56334
  null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideVerticalScrollBar();
56005
56335
  }, 1e3));
@@ -56007,9 +56337,9 @@
56007
56337
  hideHorizontalScrollBar() {
56008
56338
  this.table.scenegraph.component.hideHorizontalScrollBar();
56009
56339
  }
56010
- showHorizontalScrollBar(autoHide) {
56340
+ showHorizontalScrollBar(autoHide, target = "all") {
56011
56341
  var _a;
56012
- this.table.scenegraph.component.showHorizontalScrollBar(), null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.showFrozenColumnShadow(), autoHide && (clearTimeout(this._clearHorizontalScrollBar), this._clearHorizontalScrollBar = setTimeout(() => {
56342
+ this.table.scenegraph.component.showHorizontalScrollBar(target), null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.showFrozenColumnShadow(), clearTimeout(this._clearHorizontalScrollBar), autoHide && (this._clearHorizontalScrollBar = setTimeout(() => {
56013
56343
  var _a, _b;
56014
56344
  null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideFrozenColumnShadow(), null === (_b = this.table.scenegraph) || void 0 === _b || _b.component.hideHorizontalScrollBar();
56015
56345
  }, 1e3));
@@ -56380,7 +56710,7 @@
56380
56710
  }
56381
56711
 
56382
56712
  function handleWhell(event, state, isWheelEvent = !0) {
56383
- var _a, _b, _c;
56713
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56384
56714
  let {
56385
56715
  deltaX: deltaX,
56386
56716
  deltaY: deltaY
@@ -56391,8 +56721,39 @@
56391
56721
  vertical: 1
56392
56722
  });
56393
56723
  (optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
56394
- const autoHide = "scrolling" === (null === (_b = null === (_a = state.table.options.theme) || void 0 === _a ? void 0 : _a.scrollStyle) || void 0 === _b ? void 0 : _b.visible);
56395
- optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(state) || deltaX && isHorizontalExistScrollBar(state)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
56724
+ const visible1 = null === (_a = state.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.visible,
56725
+ horizontalAutoHide = "scrolling" === (null !== (_c = null === (_b = state.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.horizontalVisible) && void 0 !== _c ? _c : visible1),
56726
+ verticalAutoHide = "scrolling" === (null !== (_e = null === (_d = state.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.verticalVisible) && void 0 !== _e ? _e : visible1);
56727
+ let usedFrozenHorizontal = !1,
56728
+ usedRightFrozenHorizontal = !1,
56729
+ blockedFrozenHorizontal = !1,
56730
+ blockedRightFrozenHorizontal = !1;
56731
+ if (optimizedDeltaX) {
56732
+ const pxEvent = event.x,
56733
+ pyEvent = event.y,
56734
+ pxFallback = null === (_g = null === (_f = state.table.eventManager) || void 0 === _f ? void 0 : _f.LastBodyPointerXY) || void 0 === _g ? void 0 : _g.x,
56735
+ pyFallback = null === (_j = null === (_h = state.table.eventManager) || void 0 === _h ? void 0 : _h.LastBodyPointerXY) || void 0 === _j ? void 0 : _j.y,
56736
+ px = "number" == typeof pxEvent ? pxEvent : pxFallback,
56737
+ py = "number" == typeof pyEvent ? pyEvent : pyFallback,
56738
+ relativeX = "number" == typeof px ? px - state.table.tableX : NaN,
56739
+ relativeY = "number" == typeof py ? py - state.table.tableY : NaN,
56740
+ isInTable = isFinite(relativeX) && isFinite(relativeY) && relativeX >= 0 && relativeY >= 0 && relativeX <= state.table.tableNoFrameWidth && relativeY <= state.table.tableNoFrameHeight,
56741
+ frozenColsScrollable = state.table.options.scrollFrozenCols && state.table.getFrozenColsOffset() > 0,
56742
+ rightFrozenColsScrollable = state.table.options.scrollRightFrozenCols && state.table.getRightFrozenColsOffset() > 0,
56743
+ isInFrozenViewport = isInTable && relativeX > 0 && relativeX < state.table.getFrozenColsWidth(),
56744
+ isInRightFrozenViewport = isInTable && relativeX > state.table.tableNoFrameWidth - state.table.getRightFrozenColsWidth();
56745
+ if (frozenColsScrollable && isInFrozenViewport) {
56746
+ const maxFrozenScrollLeft = state.table.getFrozenColsOffset(),
56747
+ nextFrozenScrollLeft = state.scroll.frozenHorizontalBarPos + optimizedDeltaX;
56748
+ optimizedDeltaX < 0 && state.scroll.frozenHorizontalBarPos > 0 || optimizedDeltaX > 0 && state.scroll.frozenHorizontalBarPos < maxFrozenScrollLeft ? (state.setFrozenColsScrollLeft(nextFrozenScrollLeft), usedFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "frozen")) : state.table.options.scrollFrozenColsPassThroughToBody ? (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body")) : (blockedFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "frozen"));
56749
+ } else if (rightFrozenColsScrollable && isInRightFrozenViewport) {
56750
+ const maxRightFrozenScrollLeft = state.table.getRightFrozenColsOffset(),
56751
+ rightFrozenDelta = -optimizedDeltaX,
56752
+ nextRightFrozenScrollLeft = state.scroll.rightFrozenHorizontalBarPos + rightFrozenDelta;
56753
+ rightFrozenDelta < 0 && state.scroll.rightFrozenHorizontalBarPos > 0 || rightFrozenDelta > 0 && state.scroll.rightFrozenHorizontalBarPos < maxRightFrozenScrollLeft ? (state.setRightFrozenColsScrollLeft(nextRightFrozenScrollLeft), usedRightFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "rightFrozen")) : state.table.options.scrollFrozenColsPassThroughToBody ? (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body")) : (blockedRightFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "rightFrozen"));
56754
+ } else state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body");
56755
+ }
56756
+ optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(verticalAutoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_k = event.nativeEvent) || void 0 === _k ? void 0 : _k.cancelable) && ("none" === state.table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(state) || deltaX && isHorizontalExistScrollBar(state)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && !blockedFrozenHorizontal && !blockedRightFrozenHorizontal && (usedFrozenHorizontal ? state.table.getFrozenColsOffset() > 0 : usedRightFrozenHorizontal ? state.table.getRightFrozenColsOffset() > 0 : isHorizontalScrollable(deltaX, state))) && event.nativeEvent.preventDefault();
56396
56757
  }
56397
56758
  function optimizeScrollXY(x, y, ratio) {
56398
56759
  var _a, _b;
@@ -56405,13 +56766,19 @@
56405
56766
  return 0 != state.table.getAllRowsHeight() - state.table.scenegraph.height && !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
56406
56767
  }
56407
56768
  function isHorizontalScrollable(deltaX, state) {
56408
- return 0 != state.table.getAllColsWidth() - state.table.scenegraph.width && !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
56769
+ var _a, _b, _c, _d, _e, _f;
56770
+ const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56771
+ rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
56772
+ return 0 != state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset && !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
56409
56773
  }
56410
56774
  function isVerticalExistScrollBar(state) {
56411
56775
  return !(state.table.getAllRowsHeight() - state.table.scenegraph.height <= 0);
56412
56776
  }
56413
56777
  function isHorizontalExistScrollBar(state) {
56414
- return !(state.table.getAllColsWidth() - state.table.scenegraph.width <= 0);
56778
+ var _a, _b, _c, _d, _e, _f;
56779
+ const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56780
+ rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
56781
+ return !(state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset <= 0);
56415
56782
  }
56416
56783
  function isScrollToTop(deltaY, state) {
56417
56784
  return 0 !== state.table.getAllRowsHeight() - state.table.scenegraph.height && deltaY <= 0 && state.scroll.verticalBarPos < 1;
@@ -56423,12 +56790,17 @@
56423
56790
  return 0 !== totalHeight && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
56424
56791
  }
56425
56792
  function isScrollToLeft(deltaX, state) {
56426
- return 0 !== state.table.getAllColsWidth() - state.table.scenegraph.width && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
56793
+ var _a, _b, _c, _d, _e, _f;
56794
+ const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
56795
+ rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
56796
+ return 0 !== state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
56427
56797
  }
56428
56798
  function isScrollToRight(deltaX, state) {
56429
- var _a;
56799
+ var _a, _b, _c, _d, _e, _f, _g;
56430
56800
  const sizeTolerance = (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0,
56431
- totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
56801
+ frozenOffset = null !== (_d = null === (_c = (_b = state.table).getFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(_b)) && void 0 !== _d ? _d : 0,
56802
+ rightFrozenOffset = null !== (_g = null === (_f = (_e = state.table).getRightFrozenColsOffset) || void 0 === _f ? void 0 : _f.call(_e)) && void 0 !== _g ? _g : 0,
56803
+ totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
56432
56804
  return 0 !== totalWidth && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
56433
56805
  }
56434
56806
  class InertiaScroll {
@@ -56507,16 +56879,17 @@
56507
56879
 
56508
56880
  function bindTableGroupListener$1(eventManager) {
56509
56881
  const table = eventManager.table,
56510
- stateManager = table.stateManager;
56882
+ stateManager = table.stateManager,
56883
+ getEventArgsSet = e => getCellEventArgsSetWithTable(e, table);
56511
56884
  table.scenegraph.tableGroup.addEventListener("pointermove", e => {
56512
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
56885
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
56513
56886
  const lastX = null !== (_b = null === (_a = table.eventManager.LastPointerXY) || void 0 === _a ? void 0 : _a.x) && void 0 !== _b ? _b : e.x,
56514
56887
  lastY = null !== (_d = null === (_c = table.eventManager.LastPointerXY) || void 0 === _c ? void 0 : _c.y) && void 0 !== _d ? _d : e.y;
56515
56888
  table.eventManager.LastPointerXY = {
56516
56889
  x: e.x,
56517
56890
  y: e.y
56518
56891
  }, eventManager.touchSetTimeout && (clearTimeout(eventManager.touchSetTimeout), eventManager.touchSetTimeout = void 0);
56519
- const eventArgsSet = getCellEventArgsSet(e);
56892
+ const eventArgsSet = getEventArgsSet(e);
56520
56893
  if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE, {
56521
56894
  col: eventArgsSet.eventArgs.col,
56522
56895
  row: eventArgsSet.eventArgs.row,
@@ -56570,14 +56943,19 @@
56570
56943
  mergeCellInfo: null === (_t = eventArgsSet.eventArgs) || void 0 === _t ? void 0 : _t.mergeInfo
56571
56944
  });
56572
56945
  }
56946
+ if (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) {
56947
+ const relativeX = e.x - table.tableX,
56948
+ target = table.options.scrollFrozenCols && (null === (_u = table.getFrozenColsOffset) || void 0 === _u ? void 0 : _u.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_v = table.getRightFrozenColsOffset) || void 0 === _v ? void 0 : _v.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
56949
+ stateManager.showHorizontalScrollBar(!1, target);
56950
+ }
56573
56951
  }), table.scenegraph.tableGroup.addEventListener("pointerout", e => {
56574
56952
  var _a;
56575
- const eventArgsSet = getCellEventArgsSet(e),
56953
+ const eventArgsSet = getEventArgsSet(e),
56576
56954
  cellGoup = null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target;
56577
56955
  "table" === (null == cellGoup ? void 0 : cellGoup.role) && eventManager.dealTableHover();
56578
56956
  }), table.scenegraph.tableGroup.addEventListener("pointerover", e => {
56579
56957
  var _a, _b;
56580
- const eventArgsSet = getCellEventArgsSet(e),
56958
+ const eventArgsSet = getEventArgsSet(e),
56581
56959
  cellGoup = null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target;
56582
56960
  if (cellGoup && table.hasListeners(TABLE_EVENT_TYPE.MOUSEOVER_CHART_SYMBOL) && "symbol" === cellGoup.type) {
56583
56961
  const cellGroup = e.composedPath().find(p => "cell" === p.roll);
@@ -56606,7 +56984,13 @@
56606
56984
  }
56607
56985
  }
56608
56986
  }), table.scenegraph.tableGroup.addEventListener("pointerenter", e => {
56609
- (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.showHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.showVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE, {
56987
+ var _a, _b;
56988
+ if (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) {
56989
+ const relativeX = e.x - table.tableX,
56990
+ target = table.options.scrollFrozenCols && (null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_b = table.getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
56991
+ stateManager.showHorizontalScrollBar(!1, target);
56992
+ }
56993
+ (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.showVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE, {
56610
56994
  event: e.nativeEvent
56611
56995
  });
56612
56996
  }), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
@@ -56636,7 +57020,7 @@
56636
57020
  x: e.x,
56637
57021
  y: e.y
56638
57022
  }, 0 !== e.button) return;
56639
- const eventArgsSet = getCellEventArgsSet(e);
57023
+ const eventArgsSet = getEventArgsSet(e);
56640
57024
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
56641
57025
  if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && (table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0)), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
56642
57026
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
@@ -56673,7 +57057,7 @@
56673
57057
  }
56674
57058
  }
56675
57059
  if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL)) {
56676
- const eventArgsSet = getCellEventArgsSet(e);
57060
+ const eventArgsSet = getEventArgsSet(e);
56677
57061
  eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL, {
56678
57062
  col: eventArgsSet.eventArgs.col,
56679
57063
  row: eventArgsSet.eventArgs.row,
@@ -56692,7 +57076,7 @@
56692
57076
  fireMoveColEventListeners(table, endMoveColSuccess, e.nativeEvent);
56693
57077
  } else if (stateManager.isSelecting()) {
56694
57078
  table.stateManager.endSelectCells(), table.stateManager.isFillHandle() && table.stateManager.endFillSelect();
56695
- const eventArgsSet = getCellEventArgsSet(e);
57079
+ const eventArgsSet = getEventArgsSet(e);
56696
57080
  if (table.eventManager.isDraging && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
56697
57081
  const cellsEvent = {
56698
57082
  event: e.nativeEvent,
@@ -56708,7 +57092,7 @@
56708
57092
  }
56709
57093
  } else stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
56710
57094
  if (!table.eventManager.isDraging) {
56711
- const eventArgsSet = getCellEventArgsSet(e);
57095
+ const eventArgsSet = getEventArgsSet(e);
56712
57096
  if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
56713
57097
  const {
56714
57098
  col: col,
@@ -56736,7 +57120,7 @@
56736
57120
  }
56737
57121
  }
56738
57122
  if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
56739
- const eventArgsSet = getCellEventArgsSet(e);
57123
+ const eventArgsSet = getEventArgsSet(e);
56740
57124
  eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
56741
57125
  col: eventArgsSet.eventArgs.col,
56742
57126
  row: eventArgsSet.eventArgs.row,
@@ -56751,7 +57135,7 @@
56751
57135
  }
56752
57136
  }), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
56753
57137
  var _a, _b, _c, _d, _e, _f, _g, _h;
56754
- const eventArgsSet = getCellEventArgsSet(e);
57138
+ const eventArgsSet = getEventArgsSet(e);
56755
57139
  if (eventArgsSet.eventArgs) {
56756
57140
  stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
56757
57141
  const {
@@ -56798,9 +57182,9 @@
56798
57182
  }), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
56799
57183
  var _a;
56800
57184
  if (table.stateManager.columnResize.resizing) return;
56801
- const eventArgsSet = getCellEventArgsSet(e);
57185
+ const eventArgsSet = getEventArgsSet(e);
56802
57186
  if (!table.stateManager.columnResize.resizing && !table.stateManager.columnMove.moving && (eventManager.dealIconClick(e, eventArgsSet), (null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) && eventManager.touchSetTimeout && "touch" === e.pointerType)) {
56803
- const eventArgsSet = getCellEventArgsSet(e);
57187
+ const eventArgsSet = getEventArgsSet(e);
56804
57188
  if (eventManager.touchSetTimeout) {
56805
57189
  clearTimeout(eventManager.touchSetTimeout);
56806
57190
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
@@ -56809,7 +57193,7 @@
56809
57193
  }
56810
57194
  }), table.scenegraph.stage.addEventListener("pointerdown", e => {
56811
57195
  var _a, _b, _c, _d;
56812
- const eventArgsSet = getCellEventArgsSet(e);
57196
+ const eventArgsSet = getCellEventArgsSetWithTable(e, table);
56813
57197
  (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) && (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) === (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) || stateManager.hideMenu();
56814
57198
  let isCompleteEdit = !1;
56815
57199
  const target = e.target;
@@ -56841,11 +57225,11 @@
56841
57225
  }
56842
57226
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
56843
57227
  var _a, _b, _c;
56844
- const eventArgsSet = getCellEventArgsSet(e);
57228
+ const eventArgsSet = getCellEventArgsSetWithTable(e, table);
56845
57229
  null !== (_c = null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.isDescendantsOf) || void 0 === _b ? void 0 : _b.call(_a, table.scenegraph.tableGroup)) && void 0 !== _c && _c && (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor());
56846
57230
  }), table.scenegraph.tableGroup.addEventListener("checkbox_state_change", e => {
56847
57231
  var _a, _b;
56848
- const eventArgsSet = getCellEventArgsSet(e),
57232
+ const eventArgsSet = getEventArgsSet(e),
56849
57233
  {
56850
57234
  col: col,
56851
57235
  row: row
@@ -56880,7 +57264,7 @@
56880
57264
  table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
56881
57265
  }), table.scenegraph.tableGroup.addEventListener("radio_checked", e => {
56882
57266
  var _a, _b, _c;
56883
- const eventArgsSet = getCellEventArgsSet(e),
57267
+ const eventArgsSet = getEventArgsSet(e),
56884
57268
  {
56885
57269
  col: col,
56886
57270
  row: row,
@@ -56931,7 +57315,7 @@
56931
57315
  table.fireListeners(TABLE_EVENT_TYPE.RADIO_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
56932
57316
  }), table.scenegraph.tableGroup.addEventListener("switch_state_change", e => {
56933
57317
  var _a, _b;
56934
- const eventArgsSet = getCellEventArgsSet(e),
57318
+ const eventArgsSet = getEventArgsSet(e),
56935
57319
  {
56936
57320
  col: col,
56937
57321
  row: row,
@@ -56993,7 +57377,7 @@
56993
57377
  }
56994
57378
  function dblclickHandler(e, table) {
56995
57379
  var _a, _b, _c, _d, _e, _f;
56996
- const eventArgsSet = getCellEventArgsSet(e);
57380
+ const eventArgsSet = getCellEventArgsSetWithTable(e, table);
56997
57381
  let col = -1,
56998
57382
  row = -1;
56999
57383
  eventArgsSet.eventArgs && (col = eventArgsSet.eventArgs.col, row = eventArgsSet.eventArgs.row);
@@ -57023,17 +57407,29 @@
57023
57407
  }
57024
57408
 
57025
57409
  function bindScrollBarListener(eventManager) {
57410
+ var _a, _b, _c, _d, _e;
57026
57411
  const table = eventManager.table,
57027
57412
  stateManager = table.stateManager,
57028
- scenegraph = table.scenegraph;
57413
+ scenegraph = table.scenegraph,
57414
+ visible1 = null === (_a = table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.visible,
57415
+ horizontalVisible = null !== (_c = null === (_b = table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.horizontalVisible) && void 0 !== _c ? _c : visible1,
57416
+ verticalVisible = null !== (_e = null === (_d = table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.verticalVisible) && void 0 !== _e ? _e : visible1;
57029
57417
  scenegraph.component.vScrollBar.addEventListener("pointerover", e => {
57030
- stateManager.showVerticalScrollBar();
57418
+ "focus" !== verticalVisible && "scrolling" !== verticalVisible || stateManager.showVerticalScrollBar();
57031
57419
  }), scenegraph.component.hScrollBar.addEventListener("pointerover", e => {
57032
- stateManager.showHorizontalScrollBar();
57420
+ "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "body");
57421
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointerover", e => {
57422
+ "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "frozen");
57423
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerover", e => {
57424
+ "focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "rightFrozen");
57033
57425
  }), scenegraph.component.vScrollBar.addEventListener("pointerout", e => {
57034
- stateManager.interactionState !== InteractionState.scrolling && stateManager.hideVerticalScrollBar();
57426
+ stateManager.interactionState !== InteractionState.scrolling && ("focus" === verticalVisible ? stateManager.hideVerticalScrollBar() : "scrolling" === verticalVisible && stateManager.showVerticalScrollBar(!0));
57035
57427
  }), scenegraph.component.hScrollBar.addEventListener("pointerout", e => {
57036
- stateManager.interactionState !== InteractionState.scrolling && stateManager.hideHorizontalScrollBar();
57428
+ stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "body"));
57429
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointerout", e => {
57430
+ stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "frozen"));
57431
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerout", e => {
57432
+ stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "rightFrozen"));
57037
57433
  }), scenegraph.component.vScrollBar.addEventListener("pointermove", e => {
57038
57434
  scenegraph.table.stateManager.updateCursor("default"), e.stopPropagation();
57039
57435
  }), scenegraph.component.vScrollBar.addEventListener("pointerdown", e => {
@@ -57056,10 +57452,22 @@
57056
57452
  scenegraph.table.eventManager.isDraging = !1;
57057
57453
  }), scenegraph.component.hScrollBar.addEventListener("pointermove", e => {
57058
57454
  scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
57455
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointermove", e => {
57456
+ scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
57457
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointermove", e => {
57458
+ scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
57059
57459
  }), scenegraph.component.hScrollBar.addEventListener("pointerdown", e => {
57060
57460
  e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57061
57461
  event: e.nativeEvent
57062
57462
  });
57463
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointerdown", e => {
57464
+ e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57465
+ event: e.nativeEvent
57466
+ });
57467
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerdown", e => {
57468
+ e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57469
+ event: e.nativeEvent
57470
+ });
57063
57471
  }), scenegraph.component.hScrollBar.addEventListener("scrollDown", e => {
57064
57472
  var _a;
57065
57473
  scenegraph.table.eventManager.LastBodyPointerXY = {
@@ -57068,15 +57476,45 @@
57068
57476
  }, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57069
57477
  event: e.nativeEvent
57070
57478
  });
57479
+ }), scenegraph.component.frozenHScrollBar.addEventListener("scrollDown", e => {
57480
+ var _a;
57481
+ scenegraph.table.eventManager.LastBodyPointerXY = {
57482
+ x: e.x,
57483
+ y: e.y
57484
+ }, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57485
+ event: e.nativeEvent
57486
+ });
57487
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollDown", e => {
57488
+ var _a;
57489
+ scenegraph.table.eventManager.LastBodyPointerXY = {
57490
+ x: e.x,
57491
+ y: e.y
57492
+ }, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
57493
+ event: e.nativeEvent
57494
+ });
57071
57495
  }), scenegraph.component.hScrollBar.addEventListener("pointerup", () => {
57072
57496
  stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57073
57497
  }), scenegraph.component.hScrollBar.addEventListener("pointerupoutside", () => {
57074
57498
  stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57075
57499
  }), scenegraph.component.hScrollBar.addEventListener("scrollUp", e => {
57076
57500
  scenegraph.table.eventManager.isDraging = !1;
57501
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointerup", () => {
57502
+ stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57503
+ }), scenegraph.component.frozenHScrollBar.addEventListener("pointerupoutside", () => {
57504
+ stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57505
+ }), scenegraph.component.frozenHScrollBar.addEventListener("scrollUp", e => {
57506
+ scenegraph.table.eventManager.isDraging = !1;
57507
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerup", () => {
57508
+ stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57509
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerupoutside", () => {
57510
+ stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57511
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollUp", e => {
57512
+ scenegraph.table.eventManager.isDraging = !1;
57077
57513
  });
57078
57514
  const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
57079
- throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
57515
+ throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20),
57516
+ throttleFrozenHorizontalWheel = throttle(stateManager.updateFrozenHorizontalScrollBar, 20),
57517
+ throttleRightFrozenHorizontalWheel = throttle(stateManager.updateRightFrozenHorizontalScrollBar, 20);
57080
57518
  scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
57081
57519
  var _a;
57082
57520
  scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
@@ -57087,6 +57525,16 @@
57087
57525
  scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
57088
57526
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
57089
57527
  throttleHorizontalWheel(ratio);
57528
+ }), scenegraph.component.frozenHScrollBar.addEventListener("scrollDrag", e => {
57529
+ var _a;
57530
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
57531
+ const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
57532
+ throttleFrozenHorizontalWheel(ratio);
57533
+ }), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollDrag", e => {
57534
+ var _a;
57535
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
57536
+ const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
57537
+ throttleRightFrozenHorizontalWheel(ratio);
57090
57538
  });
57091
57539
  }
57092
57540
 
@@ -57321,18 +57769,20 @@
57321
57769
  right = !1,
57322
57770
  left = !1;
57323
57771
  y > drawRange.bottom - bottomFrozenRowHeight && canScrollY && table.scrollTop + table.tableNoFrameHeight < table.getAllRowsHeight() ? (bottom = !0, table.eventManager.scrollYSpeed = -(y - drawRange.bottom + bottomFrozenRowHeight) / 50) : y < drawRange.top + topFrozenRowHeight && canScrollY && table.scrollTop > 0 && (top = !0, table.eventManager.scrollYSpeed = -(y - drawRange.top - topFrozenRowHeight) / 50), x > drawRange.right - rightFrozenColsWidth && canScrollX && table.scrollLeft + table.tableNoFrameWidth < table.getAllColsWidth() ? (right = !0, table.eventManager.scrollXSpeed = -(x - drawRange.right + rightFrozenColsWidth) / 50) : x < drawRange.left + leftFrozenColsWidth && canScrollX && table.scrollLeft > 0 && (left = !0, table.eventManager.scrollXSpeed = -(x - drawRange.left - leftFrozenColsWidth) / 50), table.eventManager.inertiaScroll.startInertia(table.eventManager.scrollXSpeed, table.eventManager.scrollYSpeed, 1), table.eventManager.inertiaScroll.setScrollHandle((dx, dy) => {
57324
- var _a;
57772
+ var _a, _b, _c;
57325
57773
  let selectX, selectY;
57326
57774
  handleWhell({
57327
57775
  deltaX: -dx,
57328
57776
  deltaY: -dy
57329
- }, table.stateManager, !1), bottom ? selectY = table.scrollTop + drawRange.height - bottomFrozenRowHeight - 20 : top && (selectY = table.scrollTop + topFrozenRowHeight + 20), right ? selectX = table.scrollLeft + drawRange.width - rightFrozenColsWidth - 20 : left && (selectX = table.scrollLeft + leftFrozenColsWidth + 20);
57777
+ }, table.stateManager, !1);
57778
+ const frozenOffset = null !== (_b = null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : 0;
57779
+ bottom ? selectY = table.scrollTop + drawRange.height - bottomFrozenRowHeight - 20 : top && (selectY = table.scrollTop + topFrozenRowHeight + 20), right ? selectX = table.scrollLeft + frozenOffset + drawRange.width - rightFrozenColsWidth - 20 : left && (selectX = table.scrollLeft + frozenOffset + leftFrozenColsWidth + 20);
57330
57780
  let considerFrozenY = !1,
57331
57781
  considerFrozenX = !1;
57332
- right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
57782
+ right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + frozenOffset + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
57333
57783
  const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
57334
57784
  targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
57335
- !(null === (_a = table.options.select) || void 0 === _a ? void 0 : _a.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow) && table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
57785
+ !(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow) && table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
57336
57786
  });
57337
57787
  } else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
57338
57788
  }
@@ -59958,18 +60408,24 @@
59958
60408
  })(candRow, bottom);
59959
60409
  }
59960
60410
  function getTargetColAtConsiderRightFrozen(absoluteX, isConsider, _this) {
60411
+ var _a, _b;
59961
60412
  if (0 === absoluteX) return {
59962
60413
  left: 0,
59963
60414
  col: 0,
59964
60415
  right: 0,
59965
60416
  width: 0
59966
60417
  };
59967
- if (absoluteX -= _this.tableX, isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
59968
- col: _this.colCount - i - 1,
59969
- left: void 0,
59970
- right: void 0,
59971
- width: void 0
59972
- };
60418
+ absoluteX -= _this.tableX;
60419
+ const rightFrozenScrollLeft = null !== (_b = null === (_a = _this.getRightFrozenColsScrollLeft) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0;
60420
+ if (isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) {
60421
+ absoluteX -= rightFrozenScrollLeft;
60422
+ for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
60423
+ col: _this.colCount - i - 1,
60424
+ left: void 0,
60425
+ right: void 0,
60426
+ width: void 0
60427
+ };
60428
+ }
59973
60429
  return getTargetColAt(absoluteX, _this);
59974
60430
  }
59975
60431
  function getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider, _this) {
@@ -60007,16 +60463,20 @@
60007
60463
  return Math.min(Math.ceil(absoluteX / _this.internalProps.defaultColWidth), _this.colCount - 1);
60008
60464
  }
60009
60465
  function getCellAtRelativePosition(x, y, _this) {
60010
- x -= _this.tableX;
60466
+ var _a, _b, _c, _d;
60467
+ x -= _this.tableX, y -= _this.tableY;
60468
+ const frozenColsWidth = _this.getFrozenColsWidth(),
60469
+ frozenColsOffset = null !== (_b = null === (_a = _this.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0,
60470
+ frozenColsScrollLeft = null !== (_d = null === (_c = _this.getFrozenColsScrollLeft) || void 0 === _c ? void 0 : _c.call(_this)) && void 0 !== _d ? _d : 0;
60011
60471
  let topFrozen = !1;
60012
- (y -= _this.tableY) > 0 && y < _this.getFrozenRowsHeight() && (topFrozen = !0);
60472
+ y > 0 && y < _this.getFrozenRowsHeight() && (topFrozen = !0);
60013
60473
  let leftFrozen = !1;
60014
- x > 0 && x < _this.getFrozenColsWidth() && (leftFrozen = !0);
60474
+ x > 0 && x < frozenColsWidth && (leftFrozen = !0);
60015
60475
  let bottomFrozen = !1;
60016
60476
  y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight && y <= _this.getAllRowsHeight() && (bottomFrozen = !0);
60017
60477
  let rightFrozen = !1;
60018
60478
  x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
60019
- const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen || rightFrozen ? x : x + _this.scrollLeft) + _this.tableX, rightFrozen, _this),
60479
+ const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this),
60020
60480
  rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
60021
60481
  if (colInfo && rowInfo) {
60022
60482
  const {
@@ -60050,11 +60510,16 @@
60050
60510
  };
60051
60511
  }
60052
60512
  function getColAtRelativePosition(x, _this) {
60513
+ var _a, _b, _c, _d;
60514
+ x -= _this.tableX;
60515
+ const frozenColsWidth = _this.getFrozenColsWidth(),
60516
+ frozenColsOffset = null !== (_b = null === (_a = _this.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0,
60517
+ frozenColsScrollLeft = null !== (_d = null === (_c = _this.getFrozenColsScrollLeft) || void 0 === _c ? void 0 : _c.call(_this)) && void 0 !== _d ? _d : 0;
60053
60518
  let leftFrozen = !1;
60054
- (x -= _this.tableX) > 0 && x < _this.getFrozenColsWidth() && (leftFrozen = !0);
60519
+ x > 0 && x < frozenColsWidth && (leftFrozen = !0);
60055
60520
  let rightFrozen = !1;
60056
60521
  x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
60057
- const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen || rightFrozen ? x : x + _this.scrollLeft) + _this.tableX, rightFrozen, _this);
60522
+ const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this);
60058
60523
  if (colInfo) {
60059
60524
  const {
60060
60525
  col: col
@@ -60439,7 +60904,7 @@
60439
60904
  }
60440
60905
  constructor(container, options = {}) {
60441
60906
  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;
60442
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.24.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60907
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60443
60908
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60444
60909
  options: options,
60445
60910
  container: container
@@ -60640,7 +61105,7 @@
60640
61105
  set frozenColCount(frozenColCount) {
60641
61106
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount, this.options.frozenColCount = frozenColCount;
60642
61107
  const maxFrozenWidth = this._getMaxFrozenWidth();
60643
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
61108
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
60644
61109
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
60645
61110
  this.internalProps.frozenColCount = computedFrozenColCount;
60646
61111
  }
@@ -60649,7 +61114,7 @@
60649
61114
  setFrozenColCount(frozenColCount) {
60650
61115
  frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount, this.options.frozenColCount = frozenColCount;
60651
61116
  const maxFrozenWidth = this._getMaxFrozenWidth();
60652
- if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
61117
+ if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
60653
61118
  const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
60654
61119
  this.internalProps.frozenColCount = computedFrozenColCount;
60655
61120
  }
@@ -60803,6 +61268,11 @@
60803
61268
  const maxFrozenWidth = null !== (_a = this.options.maxFrozenWidth) && void 0 !== _a ? _a : "80%";
60804
61269
  return _toPxWidth(this, maxFrozenWidth);
60805
61270
  }
61271
+ _getMaxRightFrozenWidth() {
61272
+ var _a, _b;
61273
+ const maxRightFrozenWidth = null !== (_b = null !== (_a = this.options.maxRightFrozenWidth) && void 0 !== _a ? _a : this.options.maxFrozenWidth) && void 0 !== _b ? _b : "80%";
61274
+ return _toPxWidth(this, maxRightFrozenWidth);
61275
+ }
60806
61276
  _getComputedFrozenColCount(frozenColCount) {
60807
61277
  const maxFrozenWidth = this._getMaxFrozenWidth();
60808
61278
  let computedfrozenColCount = frozenColCount;
@@ -61121,21 +61591,26 @@
61121
61591
  let relativeX = !0,
61122
61592
  relativeY = !0;
61123
61593
  (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
61124
- const cellRect = this.getCellRect(col, row);
61125
- return this._toRelativeRect(cellRect, relativeX, relativeY);
61594
+ const cellRect = this.getCellRect(col, row),
61595
+ rect = this._toRelativeRect(cellRect, relativeX, relativeY);
61596
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(col, row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
61126
61597
  }
61127
61598
  getCellRangeRelativeRect(range) {
61128
61599
  if (range.start) {
61129
61600
  const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
61130
61601
  let relativeX = !0,
61131
61602
  relativeY = !0;
61132
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1), this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
61603
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
61604
+ const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
61605
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.start.col, range.start.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
61133
61606
  }
61134
61607
  const cellRange = this.getCellRange(range.col, range.row),
61135
61608
  isFrozenCell = this.isFrozenCell(range.col, range.row);
61136
61609
  let relativeX = !0,
61137
61610
  relativeY = !0;
61138
- return (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1), this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
61611
+ (null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
61612
+ const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
61613
+ return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.col, range.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
61139
61614
  }
61140
61615
  getVisibleCellRangeRelativeRect(range) {
61141
61616
  let cellRange;
@@ -61245,7 +61720,7 @@
61245
61720
  } = this,
61246
61721
  width = this.tableNoFrameWidth,
61247
61722
  height = this.tableNoFrameHeight;
61248
- return new Rect$1(scrollLeft, scrollTop, width, height);
61723
+ return new Rect$1(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
61249
61724
  }
61250
61725
  get visibleRowCount() {
61251
61726
  const {
@@ -61274,7 +61749,8 @@
61274
61749
  scrollLeft: scrollLeft
61275
61750
  } = this,
61276
61751
  frozenRowsHeight = this.getFrozenRowsHeight(),
61277
- frozenColsWidth = this.getFrozenColsWidth(),
61752
+ frozenColsContentWidth = this.getFrozenColsContentWidth(),
61753
+ frozenColsOffset = this.getFrozenColsOffset(),
61278
61754
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
61279
61755
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
61280
61756
  {
@@ -61282,9 +61758,9 @@
61282
61758
  } = this.getRowAt(scrollTop + frozenRowsHeight + 1),
61283
61759
  {
61284
61760
  col: colStart
61285
- } = this.getColAt(scrollLeft + frozenColsWidth + 1),
61761
+ } = this.getColAt(scrollLeft + frozenColsContentWidth + 1),
61286
61762
  rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1,
61287
- colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
61763
+ colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
61288
61764
  return colEnd < 0 || rowEnd < 0 ? null : {
61289
61765
  rowStart: rowStart,
61290
61766
  colStart: colStart,
@@ -61311,12 +61787,13 @@
61311
61787
  const {
61312
61788
  scrollLeft: scrollLeft
61313
61789
  } = this,
61314
- frozenColsWidth = this.getFrozenColsWidth(),
61790
+ frozenColsContentWidth = this.getFrozenColsContentWidth(),
61791
+ frozenColsOffset = this.getFrozenColsOffset(),
61315
61792
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
61316
61793
  {
61317
61794
  col: colStart
61318
- } = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX),
61319
- colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
61795
+ } = this.getColAt(scrollLeft + frozenColsContentWidth + 1 + start_deltaX),
61796
+ colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
61320
61797
  return colEnd < 0 ? null : {
61321
61798
  colStart: colStart,
61322
61799
  colEnd: colEnd
@@ -61327,7 +61804,7 @@
61327
61804
  frozenColCount: frozenColCount
61328
61805
  } = this,
61329
61806
  visibleRect = this.getVisibleRect(),
61330
- visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getColsWidth(0, frozenColCount - 1) : visibleRect.left,
61807
+ visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left,
61331
61808
  initCol = this.getTargetColAt(visibleLeft);
61332
61809
  if (!initCol) return 0;
61333
61810
  const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
@@ -61512,8 +61989,23 @@
61512
61989
  return this.getRowsHeight(0, this.frozenRowCount - 1);
61513
61990
  }
61514
61991
  getFrozenColsWidth() {
61992
+ const contentWidth = this.getFrozenColsContentWidth();
61993
+ if (!this.options.scrollFrozenCols) return contentWidth;
61994
+ const maxFrozenWidth = this._getMaxFrozenWidth();
61995
+ return Math.min(contentWidth, maxFrozenWidth);
61996
+ }
61997
+ getFrozenColsContentWidth() {
61515
61998
  return this.getColsWidth(0, this.frozenColCount - 1);
61516
61999
  }
62000
+ getFrozenColsOffset() {
62001
+ const contentWidth = this.getFrozenColsContentWidth(),
62002
+ viewportWidth = this.getFrozenColsWidth();
62003
+ return Math.max(0, contentWidth - viewportWidth);
62004
+ }
62005
+ getFrozenColsScrollLeft() {
62006
+ var _a;
62007
+ return null !== (_a = this.stateManager.scroll.frozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
62008
+ }
61517
62009
  getBottomFrozenRowsHeight() {
61518
62010
  if (this.bottomFrozenRowCount > 0) {
61519
62011
  let height = 0;
@@ -61523,6 +62015,12 @@
61523
62015
  return 0;
61524
62016
  }
61525
62017
  getRightFrozenColsWidth() {
62018
+ const contentWidth = this.getRightFrozenColsContentWidth();
62019
+ if (!this.options.scrollRightFrozenCols) return contentWidth;
62020
+ const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
62021
+ return Math.min(contentWidth, maxRightFrozenWidth);
62022
+ }
62023
+ getRightFrozenColsContentWidth() {
61526
62024
  if (this.rightFrozenColCount > 0) {
61527
62025
  let width = 0;
61528
62026
  for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) width += this.getColWidth(col);
@@ -61530,6 +62028,15 @@
61530
62028
  }
61531
62029
  return 0;
61532
62030
  }
62031
+ getRightFrozenColsOffset() {
62032
+ const contentWidth = this.getRightFrozenColsContentWidth(),
62033
+ viewportWidth = this.getRightFrozenColsWidth();
62034
+ return Math.max(0, contentWidth - viewportWidth);
62035
+ }
62036
+ getRightFrozenColsScrollLeft() {
62037
+ var _a;
62038
+ return null !== (_a = this.stateManager.scroll.rightFrozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
62039
+ }
61533
62040
  getDrawRange() {
61534
62041
  var _a, _b;
61535
62042
  const width = (null === (_a = this.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.tableNoFrameWidth : Math.min(this.tableNoFrameWidth, this.getAllColsWidth()),
@@ -70326,6 +70833,12 @@
70326
70833
  <line x1="70" y1="10" x2="70" y2="190" stroke="black" stroke-width="4"/>
70327
70834
  </svg>`;
70328
70835
  const TASKBAR_HOVER_ICON_WIDTH = 10;
70836
+ const LOCATE_ICON_SIZE = 22;
70837
+ const LOCATE_ICON_PADDING = 4;
70838
+ const LOCATE_ICON_BG = '#f2f3f5';
70839
+ const LOCATE_ICON_BG_HOVER = '#4080ff';
70840
+ const LOCATE_ICON_ARROW = '#4e5969';
70841
+ const LOCATE_ICON_ARROW_HOVER = '#ffffff';
70329
70842
  class TaskBar {
70330
70843
  formatMilestoneText(text, record) {
70331
70844
  if (!text) {
@@ -70396,6 +70909,8 @@
70396
70909
  hoverBarLeftIcon;
70397
70910
  hoverBarRightIcon;
70398
70911
  hoverBarProgressHandle;
70912
+ locateIconsGroup;
70913
+ currentHoverLocateIcon;
70399
70914
  _scene;
70400
70915
  width;
70401
70916
  height;
@@ -70416,6 +70931,9 @@
70416
70931
  scene.ganttGroup.addChild(this.group);
70417
70932
  this.initBars();
70418
70933
  this.initHoverBarIcons();
70934
+ if (scene._gantt.parsedOptions.taskBarLocateIcon) {
70935
+ this.initLocateIconsGroup();
70936
+ }
70419
70937
  }
70420
70938
  initBars() {
70421
70939
  this.barContainer = new Group$2({
@@ -70782,6 +71300,7 @@
70782
71300
  if (baselineBar) {
70783
71301
  this.barContainer.insertBefore(baselineBar, barGroupBox);
70784
71302
  }
71303
+ this.updateOffscreenIndicators();
70785
71304
  }
70786
71305
  initHoverBarIcons() {
70787
71306
  const hoverBarGroup = new Group$2({
@@ -70848,11 +71367,168 @@
70848
71367
  this.hoverBarProgressHandle = progressHandle;
70849
71368
  hoverBarGroup.appendChild(progressHandle);
70850
71369
  }
71370
+ initLocateIconsGroup() {
71371
+ const locateIconsGroup = new Group$2({
71372
+ x: 0,
71373
+ y: 0,
71374
+ width: this.width,
71375
+ height: this.height,
71376
+ clip: true,
71377
+ pickable: false
71378
+ });
71379
+ this.locateIconsGroup = locateIconsGroup;
71380
+ locateIconsGroup.name = 'task-bar-locate-icons';
71381
+ this.group.appendChild(locateIconsGroup);
71382
+ }
71383
+ applyLocateIconStyle(icon, hover) {
71384
+ const background = icon.background;
71385
+ const arrow = icon.arrow;
71386
+ if (background) {
71387
+ background.setAttribute('fill', hover ? LOCATE_ICON_BG_HOVER : LOCATE_ICON_BG);
71388
+ }
71389
+ if (arrow) {
71390
+ arrow.setAttribute('fill', hover ? LOCATE_ICON_ARROW_HOVER : LOCATE_ICON_ARROW);
71391
+ }
71392
+ }
71393
+ createLocateIcon(side, target) {
71394
+ const iconGroup = new Group$2({
71395
+ x: 0,
71396
+ y: 0,
71397
+ width: LOCATE_ICON_SIZE,
71398
+ height: LOCATE_ICON_SIZE,
71399
+ pickable: true,
71400
+ cursor: 'pointer',
71401
+ visibleAll: false
71402
+ });
71403
+ iconGroup.name = side === 'left' ? 'task-bar-locate-icon-left' : 'task-bar-locate-icon-right';
71404
+ iconGroup.attachedToTaskBarNode = target;
71405
+ iconGroup.side = side;
71406
+ const background = createRect({
71407
+ x: 0,
71408
+ y: 0,
71409
+ width: LOCATE_ICON_SIZE,
71410
+ height: LOCATE_ICON_SIZE,
71411
+ cornerRadius: 4,
71412
+ fill: LOCATE_ICON_BG,
71413
+ pickable: false
71414
+ });
71415
+ const arrowSize = 6;
71416
+ const center = LOCATE_ICON_SIZE / 2;
71417
+ const arrow = side === 'left'
71418
+ ? new Polygon({
71419
+ points: [
71420
+ { x: center + arrowSize / 2, y: center - arrowSize },
71421
+ { x: center - arrowSize / 2, y: center },
71422
+ { x: center + arrowSize / 2, y: center + arrowSize }
71423
+ ],
71424
+ fill: LOCATE_ICON_ARROW,
71425
+ pickable: false
71426
+ })
71427
+ : new Polygon({
71428
+ points: [
71429
+ { x: center - arrowSize / 2, y: center - arrowSize },
71430
+ { x: center + arrowSize / 2, y: center },
71431
+ { x: center - arrowSize / 2, y: center + arrowSize }
71432
+ ],
71433
+ fill: LOCATE_ICON_ARROW,
71434
+ pickable: false
71435
+ });
71436
+ iconGroup.appendChild(background);
71437
+ iconGroup.appendChild(arrow);
71438
+ iconGroup.background = background;
71439
+ iconGroup.arrow = arrow;
71440
+ this.applyLocateIconStyle(iconGroup, false);
71441
+ return iconGroup;
71442
+ }
71443
+ setLocateIconHover(icon) {
71444
+ if (this.currentHoverLocateIcon && this.currentHoverLocateIcon !== icon) {
71445
+ this.applyLocateIconStyle(this.currentHoverLocateIcon, false);
71446
+ }
71447
+ if (icon) {
71448
+ this.applyLocateIconStyle(icon, true);
71449
+ }
71450
+ this.currentHoverLocateIcon = icon;
71451
+ this._scene.updateNextFrame();
71452
+ }
71453
+ updateOffscreenIndicators() {
71454
+ if (!this.locateIconsGroup) {
71455
+ return;
71456
+ }
71457
+ const gantt = this._scene._gantt;
71458
+ const scrollLeft = gantt.stateManager.scrollLeft;
71459
+ const scrollTop = gantt.stateManager.scrollTop;
71460
+ const viewWidth = gantt.tableNoFrameWidth;
71461
+ const viewHeight = this.height;
71462
+ const visibleLeft = scrollLeft;
71463
+ const visibleRight = scrollLeft + viewWidth;
71464
+ const visibleTop = scrollTop;
71465
+ const visibleBottom = scrollTop + viewHeight;
71466
+ let child = this.barContainer.firstChild;
71467
+ while (child) {
71468
+ if (child.name === 'task-bar') {
71469
+ const bar = child;
71470
+ const barLeft = bar.attribute.x;
71471
+ const barRight = barLeft + bar.attribute.width;
71472
+ const barTop = bar.attribute.y;
71473
+ const barBottom = barTop + bar.attribute.height;
71474
+ const verticalVisible = barBottom >= visibleTop && barTop <= visibleBottom;
71475
+ let side = null;
71476
+ if (verticalVisible) {
71477
+ if (barRight < visibleLeft) {
71478
+ side = 'left';
71479
+ }
71480
+ else if (barLeft > visibleRight) {
71481
+ side = 'right';
71482
+ }
71483
+ }
71484
+ const leftIcon = bar.locateLeftIcon;
71485
+ const rightIcon = bar.locateRightIcon;
71486
+ if (!side) {
71487
+ leftIcon?.setAttribute('visibleAll', false);
71488
+ rightIcon?.setAttribute('visibleAll', false);
71489
+ if (this.currentHoverLocateIcon === leftIcon || this.currentHoverLocateIcon === rightIcon) {
71490
+ this.setLocateIconHover(null);
71491
+ }
71492
+ }
71493
+ else {
71494
+ let icon = side === 'left' ? leftIcon : rightIcon;
71495
+ if (!icon) {
71496
+ icon = this.createLocateIcon(side, bar);
71497
+ if (side === 'left') {
71498
+ bar.locateLeftIcon = icon;
71499
+ }
71500
+ else {
71501
+ bar.locateRightIcon = icon;
71502
+ }
71503
+ this.locateIconsGroup.appendChild(icon);
71504
+ }
71505
+ else if (icon.parent !== this.locateIconsGroup) {
71506
+ this.locateIconsGroup.appendChild(icon);
71507
+ }
71508
+ const iconX = side === 'left' ? LOCATE_ICON_PADDING : viewWidth - LOCATE_ICON_SIZE - LOCATE_ICON_PADDING;
71509
+ const iconY = barTop - scrollTop + (bar.attribute.height - LOCATE_ICON_SIZE) / 2;
71510
+ icon.setAttributes({
71511
+ x: iconX,
71512
+ y: iconY,
71513
+ visibleAll: true
71514
+ });
71515
+ const otherIcon = side === 'left' ? rightIcon : leftIcon;
71516
+ otherIcon?.setAttribute('visibleAll', false);
71517
+ if (this.currentHoverLocateIcon === otherIcon) {
71518
+ this.setLocateIconHover(null);
71519
+ }
71520
+ }
71521
+ }
71522
+ child = child._next;
71523
+ }
71524
+ }
70851
71525
  setX(x) {
70852
71526
  this.barContainer.setAttribute('x', x);
71527
+ this.updateOffscreenIndicators();
70853
71528
  }
70854
71529
  setY(y) {
70855
71530
  this.barContainer.setAttribute('y', y);
71531
+ this.updateOffscreenIndicators();
70856
71532
  }
70857
71533
  refresh() {
70858
71534
  this.width = this._scene._gantt.tableNoFrameWidth;
@@ -70862,6 +71538,11 @@
70862
71538
  width: this.width,
70863
71539
  y: this._scene._gantt.getAllHeaderRowsHeight()
70864
71540
  });
71541
+ this.locateIconsGroup?.setAttributes({
71542
+ width: this.width,
71543
+ height: this.height
71544
+ });
71545
+ this.locateIconsGroup?.removeAllChild();
70865
71546
  const x = this.barContainer.attribute.x;
70866
71547
  const y = this.barContainer.attribute.y;
70867
71548
  this.barContainer.removeAllChild();
@@ -70869,12 +71550,18 @@
70869
71550
  this.initBars();
70870
71551
  this.setX(x);
70871
71552
  this.setY(y);
71553
+ this.updateOffscreenIndicators();
70872
71554
  }
70873
71555
  resize() {
70874
71556
  this.width = this._scene._gantt.tableNoFrameWidth;
70875
71557
  this.height = this._scene._gantt.gridHeight;
70876
71558
  this.group.setAttribute('width', this.width);
70877
71559
  this.group.setAttribute('height', this.height);
71560
+ this.locateIconsGroup?.setAttributes({
71561
+ width: this.width,
71562
+ height: this.height
71563
+ });
71564
+ this.updateOffscreenIndicators();
70878
71565
  }
70879
71566
  showHoverBar(x, y, width, height, target) {
70880
71567
  const { startDate, endDate, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);
@@ -73536,6 +74223,18 @@
73536
74223
  event.touchSetTimeout = undefined;
73537
74224
  }
73538
74225
  if (stateManager.interactionState === InteractionState$1.default) {
74226
+ let locateIconTarget = null;
74227
+ if (gantt.parsedOptions.taskBarLocateIcon) {
74228
+ locateIconTarget = e.detailPath.find((pathNode) => {
74229
+ return pathNode.name === 'task-bar-locate-icon-left' || pathNode.name === 'task-bar-locate-icon-right';
74230
+ });
74231
+ if (locateIconTarget) {
74232
+ scene._gantt.scenegraph.taskBar.setLocateIconHover(locateIconTarget);
74233
+ }
74234
+ else if (scene._gantt.scenegraph.taskBar.currentHoverLocateIcon) {
74235
+ scene._gantt.scenegraph.taskBar.setLocateIconHover(null);
74236
+ }
74237
+ }
73539
74238
  const taskBarTarget = e.detailPath.find((pathNode) => {
73540
74239
  return pathNode.name === 'task-bar';
73541
74240
  });
@@ -73580,7 +74279,7 @@
73580
74279
  }
73581
74280
  }
73582
74281
  }
73583
- else {
74282
+ else if (!locateIconTarget) {
73584
74283
  if (scene._gantt.stateManager.hoverTaskBar.target) {
73585
74284
  if (scene._gantt.hasListeners(GANTT_EVENT_TYPE.MOUSELEAVE_TASK_BAR)) {
73586
74285
  const taskIndex = scene._gantt.stateManager.hoverTaskBar.target.task_index;
@@ -73720,8 +74419,10 @@
73720
74419
  let depedencyLink;
73721
74420
  let isClickMarklineIcon = false;
73722
74421
  let isClickMarklineContent = false;
74422
+ let isClickLocateIcon = false;
73723
74423
  let markLineContentTarget;
73724
74424
  let markLineIconTarget;
74425
+ let locateIconTarget;
73725
74426
  const taskBarTarget = e.detailPath.find((pathNode) => {
73726
74427
  if (pathNode.name === 'task-bar') {
73727
74428
  isClickBar = true;
@@ -73754,9 +74455,27 @@
73754
74455
  markLineContentTarget = pathNode;
73755
74456
  return false;
73756
74457
  }
74458
+ else if (gantt.parsedOptions.taskBarLocateIcon &&
74459
+ (pathNode.name === 'task-bar-locate-icon-left' || pathNode.name === 'task-bar-locate-icon-right')) {
74460
+ isClickLocateIcon = true;
74461
+ locateIconTarget = pathNode;
74462
+ return false;
74463
+ }
73757
74464
  return false;
73758
74465
  });
73759
- if (isClickBar && scene._gantt.parsedOptions.taskBarSelectable && event.poniterState === 'down') {
74466
+ if (isClickLocateIcon && event.poniterState === 'down') {
74467
+ const barNode = locateIconTarget?.attachedToTaskBarNode;
74468
+ const side = locateIconTarget?.side;
74469
+ if (barNode) {
74470
+ const barLeft = barNode.attribute.x;
74471
+ const barRight = barLeft + barNode.attribute.width;
74472
+ const viewWidth = gantt.tableNoFrameWidth;
74473
+ const padding = 12;
74474
+ const targetLeft = side === 'left' ? barLeft - padding : barRight - viewWidth + padding;
74475
+ gantt.stateManager.setScrollLeft(targetLeft);
74476
+ }
74477
+ }
74478
+ else if (isClickBar && scene._gantt.parsedOptions.taskBarSelectable && event.poniterState === 'down') {
73760
74479
  stateManager.hideDependencyLinkSelectedLine();
73761
74480
  const taskBarNode = taskBarTarget;
73762
74481
  stateManager.showTaskBarSelectedBorder(taskBarNode);
@@ -73946,6 +74665,9 @@
73946
74665
  }
73947
74666
  });
73948
74667
  scene.ganttGroup.addEventListener('pointerleave', (e) => {
74668
+ if (scene._gantt.scenegraph.taskBar.currentHoverLocateIcon) {
74669
+ scene._gantt.scenegraph.taskBar.setLocateIconHover(null);
74670
+ }
73949
74671
  if ((gantt.parsedOptions.scrollStyle.horizontalVisible &&
73950
74672
  gantt.parsedOptions.scrollStyle.horizontalVisible === 'focus') ||
73951
74673
  (!gantt.parsedOptions.scrollStyle.horizontalVisible && gantt.parsedOptions.scrollStyle.visible === 'focus')) {
@@ -77647,7 +78369,7 @@
77647
78369
  PluginManager: PluginManager
77648
78370
  });
77649
78371
 
77650
- const version = "1.24.0";
78372
+ const version = "1.25.0";
77651
78373
 
77652
78374
  exports.Gantt = Gantt;
77653
78375
  exports.TYPES = index$4;