@visactor/vtable-gantt 1.26.1 → 1.26.2-none

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.
@@ -63,5 +63,4 @@ class EventTarget {
63
63
  }
64
64
  }
65
65
 
66
- exports.EventTarget = EventTarget;
67
- //# sourceMappingURL=EventTarget.js.map
66
+ exports.EventTarget = EventTarget;
@@ -83,4 +83,5 @@ function isTouchEvent(e) {
83
83
  return !!e.changedTouches;
84
84
  }
85
85
 
86
+ //# sourceMappingURL=touch.js.map
86
87
  exports.bindTouchListener = bindTouchListener;
package/cjs/index.d.ts CHANGED
@@ -6,5 +6,5 @@ import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
8
  import * as plugins from './plugins';
9
- export declare const version = "1.26.1";
9
+ export declare const version = "1.26.2-none";
10
10
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
package/cjs/index.js CHANGED
@@ -56,5 +56,5 @@ exports.VTable = VTable;
56
56
 
57
57
  const plugins = __importStar(require("./plugins"));
58
58
 
59
- exports.plugins = plugins, exports.version = "1.26.1";
59
+ exports.plugins = plugins, exports.version = "1.26.2-none";
60
60
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.26.1\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,aAAa,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.26.2-none\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
@@ -184,5 +184,4 @@ class TimelineHeader {
184
184
  }
185
185
  }
186
186
 
187
- exports.TimelineHeader = TimelineHeader;
188
- //# sourceMappingURL=timeline-header.js.map
187
+ exports.TimelineHeader = TimelineHeader;
@@ -89,6 +89,7 @@ function _syncTableSize(gantt) {
89
89
  gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt), gantt.zoomScaleManager && gantt.zoomScaleManager.handleTableWidthChange());
90
90
  }
91
91
 
92
+ //# sourceMappingURL=gantt-table-sync.js.map
92
93
  exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
93
94
  exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
94
95
  exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
@@ -54789,7 +54789,7 @@
54789
54789
  col: col,
54790
54790
  row: row
54791
54791
  };
54792
- enableShiftSelectMode || (currentRange.end = currentRange.start), scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange);
54792
+ enableShiftSelectMode || (currentRange.end = currentRange.start), cellPos.col = col, cellPos.row = row, scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange);
54793
54793
  } else {
54794
54794
  let extendSelectRange = !isValid$1(skipBodyMerge) || !skipBodyMerge;
54795
54795
  if (-1 === cellPos.col || -1 === cellPos.row || enableCtrlSelectMode || (state.select.ranges = [], scenegraph.deleteAllSelectBorder()), "cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
@@ -58476,13 +58476,14 @@
58476
58476
  }
58477
58477
  cellIsHeaderCheck(eventArgsSet, update) {
58478
58478
  const {
58479
- eventArgs: eventArgs
58480
- } = eventArgsSet,
58481
- {
58482
- col: col,
58483
- row: row,
58484
- target: target
58485
- } = eventArgs;
58479
+ eventArgs: eventArgs
58480
+ } = eventArgsSet;
58481
+ if (!eventArgs) return !1;
58482
+ const {
58483
+ col: col,
58484
+ row: row,
58485
+ target: target
58486
+ } = eventArgs;
58486
58487
  if (!this.table.isHeader(col, row)) return !1;
58487
58488
  return "checkbox" === this.table.getCellType(eventArgs.col, eventArgs.row) && "checkbox" === target.name;
58488
58489
  }
@@ -61075,7 +61076,7 @@
61075
61076
  }
61076
61077
  constructor(container, options = {}) {
61077
61078
  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;
61078
- 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.26.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61079
+ 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.26.2-none", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61079
61080
  const g = window;
61080
61081
  g[this.id] = this;
61081
61082
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -61925,22 +61926,20 @@
61925
61926
  return count;
61926
61927
  }
61927
61928
  getBodyVisibleCellRange() {
61929
+ var _a, _b, _c, _d;
61928
61930
  const {
61929
61931
  scrollTop: scrollTop,
61930
61932
  scrollLeft: scrollLeft
61931
61933
  } = this,
61932
- frozenRowsHeight = this.getFrozenRowsHeight(),
61933
61934
  frozenColsContentWidth = this.getFrozenColsContentWidth(),
61934
61935
  frozenColsOffset = this.getFrozenColsOffset(),
61935
61936
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
61936
61937
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
61937
- {
61938
- row: rowStart
61939
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1),
61938
+ rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount),
61940
61939
  {
61941
61940
  col: colStart
61942
61941
  } = this.getColAt(scrollLeft + frozenColsContentWidth + 1),
61943
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1,
61942
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1,
61944
61943
  colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
61945
61944
  return colEnd < 0 || rowEnd < 0 ? null : {
61946
61945
  rowStart: rowStart,
@@ -61950,15 +61949,13 @@
61950
61949
  };
61951
61950
  }
61952
61951
  getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
61952
+ var _a, _b, _c, _d;
61953
61953
  const {
61954
61954
  scrollTop: scrollTop
61955
61955
  } = this,
61956
- frozenRowsHeight = this.getFrozenRowsHeight(),
61957
61956
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
61958
- {
61959
- row: rowStart
61960
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY),
61961
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
61957
+ rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1 + start_deltaY)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount),
61958
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1;
61962
61959
  return rowEnd < 0 ? null : {
61963
61960
  rowStart: rowStart,
61964
61961
  rowEnd: rowEnd
@@ -64675,7 +64672,7 @@
64675
64672
  return !1;
64676
64673
  }
64677
64674
  moveHeaderPosition(source, target) {
64678
- var _a, _b, _c, _d, _e, _f, _g;
64675
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
64679
64676
  if ((!(null === (_a = this._table.options.dragOrder) || void 0 === _a ? void 0 : _a.validateDragOrderOnEnd) || (null === (_b = this._table.options.dragOrder) || void 0 === _b ? void 0 : _b.validateDragOrderOnEnd(source, target))) && this.canMoveHeaderPosition(source, target)) {
64680
64677
  let sourceCellRange = this.getCellRange(source.col, source.row);
64681
64678
  if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
@@ -64695,9 +64692,13 @@
64695
64692
  sourceData.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(rowRecords, sourceData);
64696
64693
  }
64697
64694
  }
64698
- const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
64699
- if (sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), null === (_f = this._table.options.dragOrder) || void 0 === _f ? void 0 : _f.maintainArrayDataOrder) for (let i = 0; i < this._columns.length; i++) this._columns[i].field = i;
64700
- if (this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), null === (_g = this._table.options.dragOrder) || void 0 === _g ? void 0 : _g.maintainArrayDataOrder) for (let i = 0; i < this.columnTree.tree.children.length; i++) this.columnTree.tree.children[i].field = i;
64695
+ const sourceColIndex = sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount,
64696
+ targetColIndex = target.col >= source.col ? targetCellRange.end.col - this.leftRowSeriesNumberColumnCount : targetCellRange.start.col - this.leftRowSeriesNumberColumnCount,
64697
+ sourceTotalIndex = null !== (_h = null === (_g = null === (_f = this._columns[sourceColIndex]) || void 0 === _f ? void 0 : _f.define) || void 0 === _g ? void 0 : _g.startInTotal) && void 0 !== _h ? _h : sourceColIndex,
64698
+ targetTotalIndex = null !== (_l = null === (_k = null === (_j = this._columns[targetColIndex]) || void 0 === _j ? void 0 : _j.define) || void 0 === _k ? void 0 : _k.startInTotal) && void 0 !== _l ? _l : targetColIndex,
64699
+ sourceColumns = this._columns.splice(sourceColIndex, sourceSize);
64700
+ if (sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), null === (_m = this._table.options.dragOrder) || void 0 === _m ? void 0 : _m.maintainArrayDataOrder) for (let i = 0; i < this._columns.length; i++) this._columns[i].field = i;
64701
+ if (this.columnTree.movePosition(sourceCellRange.start.row, sourceTotalIndex, targetTotalIndex), null === (_o = this._table.options.dragOrder) || void 0 === _o ? void 0 : _o.maintainArrayDataOrder) for (let i = 0; i < this.columnTree.tree.children.length; i++) this.columnTree.tree.children[i].field = i;
64701
64702
  return this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
64702
64703
  sourceIndex: sourceCellRange.start.col,
64703
64704
  targetIndex: targetIndex,
@@ -64716,8 +64717,12 @@
64716
64717
  const sourceIds = this._headerCellIds[row].splice(sourceCellRange.start.row, sourceSize);
64717
64718
  sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
64718
64719
  }
64719
- const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
64720
- return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
64720
+ const sourceRowIndex = sourceCellRange.start.row,
64721
+ targetRowIndex = target.row >= source.row ? targetCellRange.end.row : targetCellRange.start.row,
64722
+ sourceTotalIndex = null !== (_r = null === (_q = null === (_p = this._columns[sourceRowIndex]) || void 0 === _p ? void 0 : _p.define) || void 0 === _q ? void 0 : _q.startInTotal) && void 0 !== _r ? _r : sourceRowIndex,
64723
+ targetTotalIndex = null !== (_u = null === (_t = null === (_s = this._columns[targetRowIndex]) || void 0 === _s ? void 0 : _s.define) || void 0 === _t ? void 0 : _t.startInTotal) && void 0 !== _u ? _u : targetRowIndex,
64724
+ sourceColumns = this._columns.splice(sourceRowIndex, sourceSize);
64725
+ return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceTotalIndex, targetTotalIndex), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
64721
64726
  sourceIndex: sourceCellRange.start.row,
64722
64727
  targetIndex: targetIndex,
64723
64728
  sourceSize: sourceSize,
@@ -66250,7 +66255,16 @@
66250
66255
  const sourceCellRange = this.getCellRange(source.col, source.row),
66251
66256
  targetCellRange = this.getCellRange(target.col, target.row),
66252
66257
  moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
66253
- return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), moveContext) : null;
66258
+ return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), this.syncColumnsStateFromLayoutMap(), moveContext) : null;
66259
+ }
66260
+ syncColumnsStateFromLayoutMap() {
66261
+ const nextColumns = cloneDeepSpec(this.internalProps.columns, ["children"]),
66262
+ cleanColumns = columns => {
66263
+ columns.forEach(col => {
66264
+ delete col.level, delete col.size, delete col.startInTotal, delete col.startIndex, delete col.id, delete col.hierarchyState, col.columns && cleanColumns(col.columns);
66265
+ });
66266
+ };
66267
+ cleanColumns(nextColumns), this.options.columns = nextColumns, this.options.header && (this.options.header = nextColumns);
66254
66268
  }
66255
66269
  changeRecordOrder(sourceIndex, targetIndex) {
66256
66270
  this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.changeOrder(sourceIndex, targetIndex);
@@ -69019,15 +69033,22 @@
69019
69033
  cursor: "pointer"
69020
69034
  });
69021
69035
  colHeaderGroup.add(hackBorder), colHeaderGroup.border = hackBorder, hackBorder.attachShadow(hackBorder.shadowRoot), hackBorder.name = "border-rect", hackBorder.addEventListener("click", e => {
69036
+ var _a, _b;
69022
69037
  const titleRows = table.listTreeStickCellPlugin.titleRows,
69023
69038
  {
69024
69039
  shadowTarget: shadowTarget
69025
69040
  } = e.pickParams,
69026
- cellGroup = getTargetCell(shadowTarget),
69027
- {
69028
- col: col,
69029
- row: row
69030
- } = cellGroup;
69041
+ cellGroup = getTargetCell(shadowTarget);
69042
+ if (!cellGroup) return;
69043
+ const iconInfo = getIconAndPositionFromTarget(shadowTarget),
69044
+ funcType = null === (_b = null === (_a = null == iconInfo ? void 0 : iconInfo.icon) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.funcType;
69045
+ if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
69046
+ const stickCellTop = getStickCellTop(cellGroup, table);
69047
+ return table.toggleHierarchyState(cellGroup.col, cellGroup.row), void keepRowAtVisiblePosition(cellGroup.col, cellGroup.row, stickCellTop, table);
69048
+ }
69049
+ const {
69050
+ row: row
69051
+ } = cellGroup;
69031
69052
  scrollToRow(row - titleRows.indexOf(row), table);
69032
69053
  });
69033
69054
  }
@@ -69040,15 +69061,22 @@
69040
69061
  cursor: "pointer"
69041
69062
  });
69042
69063
  cornerHeaderGroup.add(hackBorder), cornerHeaderGroup.border = hackBorder, hackBorder.attachShadow(hackBorder.shadowRoot), hackBorder.name = "border-rect", hackBorder.addEventListener("click", e => {
69064
+ var _a, _b;
69043
69065
  const titleRows = table.listTreeStickCellPlugin.titleRows,
69044
69066
  {
69045
69067
  shadowTarget: shadowTarget
69046
69068
  } = e.pickParams,
69047
- cellGroup = getTargetCell(shadowTarget),
69048
- {
69049
- col: col,
69050
- row: row
69051
- } = cellGroup;
69069
+ cellGroup = getTargetCell(shadowTarget);
69070
+ if (!cellGroup) return;
69071
+ const iconInfo = getIconAndPositionFromTarget(shadowTarget),
69072
+ funcType = null === (_b = null === (_a = null == iconInfo ? void 0 : iconInfo.icon) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.funcType;
69073
+ if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
69074
+ const stickCellTop = getStickCellTop(cellGroup, table);
69075
+ return table.toggleHierarchyState(cellGroup.col, cellGroup.row), void keepRowAtVisiblePosition(cellGroup.col, cellGroup.row, stickCellTop, table);
69076
+ }
69077
+ const {
69078
+ row: row
69079
+ } = cellGroup;
69052
69080
  scrollToRow(row - titleRows.indexOf(row), table);
69053
69081
  });
69054
69082
  }
@@ -69068,6 +69096,15 @@
69068
69096
  }
69069
69097
  table.scenegraph.updateNextFrame();
69070
69098
  }
69099
+ function getStickCellTop(cellGroup, table) {
69100
+ var _a, _b;
69101
+ return table.getFrozenRowsHeight() + (null !== (_b = null === (_a = cellGroup.attribute) || void 0 === _a ? void 0 : _a.y) && void 0 !== _b ? _b : 0);
69102
+ }
69103
+ function keepRowAtVisiblePosition(col, row, visibleTop, table) {
69104
+ const drawRange = table.getDrawRange(),
69105
+ targetScrollTop = Math.max(0, Math.min(table.getCellRect(col, row).top - visibleTop, table.getAllRowsHeight() - drawRange.height));
69106
+ table.scrollTop = targetScrollTop, table.scenegraph.updateNextFrame();
69107
+ }
69071
69108
  const registerListTreeStickCellPlugin = () => {
69072
69109
  Factory.registerComponent("listTreeStickCellPlugin", ListTreeStickCellPlugin);
69073
69110
  };
@@ -78570,7 +78607,7 @@
78570
78607
  PluginManager: PluginManager
78571
78608
  });
78572
78609
 
78573
- const version = "1.26.1";
78610
+ const version = "1.26.2-none";
78574
78611
 
78575
78612
  exports.Gantt = Gantt;
78576
78613
  exports.TYPES = index$4;