@visactor/vtable-calendar 1.17.6-alpha.2 → 1.17.6

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.
@@ -37398,7 +37398,7 @@
37398
37398
  if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
37399
37399
  const deltaWidth = 0,
37400
37400
  deltaHeight = 0;
37401
- "border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
37401
+ "border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, "table-border-rect" !== rect.name ? Math.ceil(width + deltaWidth) : width + deltaWidth, "table-border-rect" !== rect.name ? Math.ceil(height + deltaHeight) : height + deltaHeight) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
37402
37402
  renderStrokeWithCornerRadius(i, x1, y1, x2, y2, rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
37403
37403
  })), context.stroke());
37404
37404
  }
@@ -41832,27 +41832,77 @@
41832
41832
  },
41833
41833
  skipBodyMerge: !0
41834
41834
  });
41835
- } else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
41836
- start: {
41837
- col: table.leftRowSeriesNumberCount,
41838
- row: table.columnHeaderLevelCount
41839
- },
41840
- end: {
41841
- col: table.colCount - 1,
41842
- row: table.rowCount - 1
41843
- },
41844
- skipBodyMerge: !0
41845
- }) : state.select.ranges.push({
41846
- start: {
41847
- col: 0,
41848
- row: 0
41849
- },
41850
- end: {
41851
- col: table.colCount - 1,
41852
- row: table.rowCount - 1
41853
- },
41854
- skipBodyMerge: !0
41855
- });else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
41835
+ } else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) {
41836
+ extendSelectRange = !1;
41837
+ const {
41838
+ cornerHeaderSelectMode: cornerHeaderSelectMode
41839
+ } = state.select;
41840
+ if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
41841
+ start: {
41842
+ col: table.leftRowSeriesNumberCount,
41843
+ row: table.columnHeaderLevelCount
41844
+ },
41845
+ end: {
41846
+ col: table.colCount - 1,
41847
+ row: table.rowCount - 1
41848
+ },
41849
+ skipBodyMerge: !0
41850
+ });else if ("inline" === cornerHeaderSelectMode) {
41851
+ const cellRange = skipBodyMerge ? {
41852
+ start: {
41853
+ col: col,
41854
+ row: row
41855
+ },
41856
+ end: {
41857
+ col: col,
41858
+ row: row
41859
+ }
41860
+ } : table.getCellRange(col, row);
41861
+ state.select.ranges.push({
41862
+ start: {
41863
+ col: cellRange.start.col,
41864
+ row: cellRange.start.row
41865
+ },
41866
+ end: {
41867
+ col: cellRange.end.col,
41868
+ row: table.rowCount - 1
41869
+ },
41870
+ skipBodyMerge: !0
41871
+ });
41872
+ } else if ("cell" === cornerHeaderSelectMode) {
41873
+ const cellRange = skipBodyMerge ? {
41874
+ start: {
41875
+ col: col,
41876
+ row: row
41877
+ },
41878
+ end: {
41879
+ col: col,
41880
+ row: row
41881
+ }
41882
+ } : table.getCellRange(col, row);
41883
+ state.select.ranges.push({
41884
+ start: {
41885
+ col: cellRange.start.col,
41886
+ row: cellRange.start.row
41887
+ },
41888
+ end: {
41889
+ col: cellRange.end.col,
41890
+ row: cellRange.end.row
41891
+ },
41892
+ skipBodyMerge: skipBodyMerge || void 0
41893
+ });
41894
+ } else state.select.ranges.push({
41895
+ start: {
41896
+ col: 0,
41897
+ row: 0
41898
+ },
41899
+ end: {
41900
+ col: table.colCount - 1,
41901
+ row: table.rowCount - 1
41902
+ },
41903
+ skipBodyMerge: !0
41904
+ });
41905
+ } else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
41856
41906
  start: {
41857
41907
  col: table.leftRowSeriesNumberCount,
41858
41908
  row: row
@@ -41872,27 +41922,77 @@
41872
41922
  row: row
41873
41923
  },
41874
41924
  skipBodyMerge: !0
41875
- });else if (table.internalProps.layoutMap.isCornerHeader(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
41876
- start: {
41877
- col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
41878
- row: table.columnHeaderLevelCount
41879
- },
41880
- end: {
41881
- col: table.colCount - 1,
41882
- row: table.rowCount - 1
41883
- },
41884
- skipBodyMerge: !0
41885
- }) : state.select.ranges.push({
41886
- start: {
41887
- col: table.leftRowSeriesNumberCount,
41888
- row: 0
41889
- },
41890
- end: {
41891
- col: table.colCount - 1,
41892
- row: table.rowCount - 1
41893
- },
41894
- skipBodyMerge: !0
41895
- });else if (col >= 0 && row >= 0) {
41925
+ });else if (table.internalProps.layoutMap.isCornerHeader(col, row)) {
41926
+ extendSelectRange = !1;
41927
+ const {
41928
+ cornerHeaderSelectMode: cornerHeaderSelectMode
41929
+ } = state.select;
41930
+ if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
41931
+ start: {
41932
+ col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
41933
+ row: table.columnHeaderLevelCount
41934
+ },
41935
+ end: {
41936
+ col: table.colCount - 1,
41937
+ row: table.rowCount - 1
41938
+ },
41939
+ skipBodyMerge: !0
41940
+ });else if ("cell" === cornerHeaderSelectMode) {
41941
+ const cellRange = skipBodyMerge ? {
41942
+ start: {
41943
+ col: col,
41944
+ row: row
41945
+ },
41946
+ end: {
41947
+ col: col,
41948
+ row: row
41949
+ }
41950
+ } : table.getCellRange(col, row);
41951
+ state.select.ranges.push({
41952
+ start: {
41953
+ col: cellRange.start.col,
41954
+ row: cellRange.start.row
41955
+ },
41956
+ end: {
41957
+ col: cellRange.end.col,
41958
+ row: cellRange.end.row
41959
+ },
41960
+ skipBodyMerge: skipBodyMerge || void 0
41961
+ });
41962
+ } else if ("inline" === cornerHeaderSelectMode) {
41963
+ const cellRange = skipBodyMerge ? {
41964
+ start: {
41965
+ col: col,
41966
+ row: row
41967
+ },
41968
+ end: {
41969
+ col: col,
41970
+ row: row
41971
+ }
41972
+ } : table.getCellRange(col, row);
41973
+ state.select.ranges.push({
41974
+ start: {
41975
+ col: cellRange.start.col,
41976
+ row: cellRange.start.row
41977
+ },
41978
+ end: {
41979
+ col: cellRange.end.col,
41980
+ row: table.rowCount - 1
41981
+ },
41982
+ skipBodyMerge: !0
41983
+ });
41984
+ } else state.select.ranges.push({
41985
+ start: {
41986
+ col: table.leftRowSeriesNumberCount,
41987
+ row: 0
41988
+ },
41989
+ end: {
41990
+ col: table.colCount - 1,
41991
+ row: table.rowCount - 1
41992
+ },
41993
+ skipBodyMerge: !0
41994
+ });
41995
+ } else if (col >= 0 && row >= 0) {
41896
41996
  const cellRange = skipBodyMerge ? {
41897
41997
  start: {
41898
41998
  col: col,
@@ -42342,7 +42442,7 @@
42342
42442
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
42343
42443
  if (recordIndex >= 0) {
42344
42444
  const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
42345
- state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
42445
+ state.checkedState.get(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
42346
42446
  [field]: checked
42347
42447
  });
42348
42448
  }
@@ -42367,7 +42467,7 @@
42367
42467
  if (recordIndex >= 0) {
42368
42468
  const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
42369
42469
  if (isValid$3(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
42370
- if (state.checkedState.has(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
42470
+ if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
42371
42471
  const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
42372
42472
  state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
42373
42473
  [field]: !0
@@ -42749,21 +42849,22 @@
42749
42849
  });
42750
42850
  }
42751
42851
  setSelectState() {
42752
- var _a;
42852
+ var _a, _b, _c, _d, _e;
42753
42853
  const {
42754
- headerSelectMode: headerSelectMode,
42755
- disableSelect: disableSelect,
42756
- disableHeaderSelect: disableHeaderSelect,
42757
- highlightMode: highlightMode,
42758
- highlightInRange: highlightInRange
42759
- } = Object.assign({}, {
42760
- headerSelectMode: "inline",
42761
- disableSelect: !1,
42762
- disableHeaderSelect: !1,
42763
- highlightMode: "cell",
42764
- highlightInRange: !1
42765
- }, this.table.options.select);
42766
- this.select.highlightScope = !0 === disableSelect ? HighlightScope.none : "cross" === highlightMode ? HighlightScope.cross : "row" === highlightMode ? HighlightScope.row : "column" === highlightMode ? HighlightScope.column : HighlightScope.single, this.select.singleStyle = !disableSelect, this.select.disableHeader = disableHeaderSelect, this.select.headerSelectMode = headerSelectMode, this.select.highlightInRange = highlightInRange, this.select.disableCtrlMultiSelect = !1 === (null === (_a = this.table.options.keyboardOptions) || void 0 === _a ? void 0 : _a.ctrlMultiSelect);
42854
+ headerSelectMode: headerSelectMode,
42855
+ disableSelect: disableSelect,
42856
+ disableHeaderSelect: disableHeaderSelect,
42857
+ highlightMode: highlightMode,
42858
+ highlightInRange: highlightInRange
42859
+ } = Object.assign({}, {
42860
+ headerSelectMode: "inline",
42861
+ disableSelect: !1,
42862
+ disableHeaderSelect: !1,
42863
+ highlightMode: "cell",
42864
+ highlightInRange: !1
42865
+ }, this.table.options.select),
42866
+ cornerHeaderSelectMode = (null === (_a = this.table.options.select) || void 0 === _a ? void 0 : _a.cornerHeaderSelectMode) ? null === (_b = this.table.options.select) || void 0 === _b ? void 0 : _b.cornerHeaderSelectMode : "body" === (null === (_c = this.table.options.select) || void 0 === _c ? void 0 : _c.headerSelectMode) ? null === (_d = this.table.options.select) || void 0 === _d ? void 0 : _d.headerSelectMode : "all";
42867
+ this.select.highlightScope = !0 === disableSelect ? HighlightScope.none : "cross" === highlightMode ? HighlightScope.cross : "row" === highlightMode ? HighlightScope.row : "column" === highlightMode ? HighlightScope.column : HighlightScope.single, this.select.singleStyle = !disableSelect, this.select.disableHeader = disableHeaderSelect, this.select.headerSelectMode = headerSelectMode, this.select.cornerHeaderSelectMode = cornerHeaderSelectMode, this.select.highlightInRange = highlightInRange, this.select.disableCtrlMultiSelect = !1 === (null === (_e = this.table.options.keyboardOptions) || void 0 === _e ? void 0 : _e.ctrlMultiSelect);
42767
42868
  }
42768
42869
  isSelected(col, row) {
42769
42870
  let seled = !1;
@@ -44538,6 +44639,7 @@
44538
44639
  right = !1,
44539
44640
  left = !1;
44540
44641
  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) => {
44642
+ var _a;
44541
44643
  let selectX, selectY;
44542
44644
  handleWhell({
44543
44645
  deltaX: -dx,
@@ -44548,7 +44650,7 @@
44548
44650
  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);
44549
44651
  const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
44550
44652
  targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
44551
- isValid$3(targetCol) && isValid$3(targetRow) && table.stateManager.updateSelectPos(targetCol.col, targetRow.row, !1, !1, !1, !1);
44653
+ !(null === (_a = table.options.select) || void 0 === _a ? void 0 : _a.disableDragSelect) && isValid$3(targetCol) && isValid$3(targetRow) && table.stateManager.updateSelectPos(targetCol.col, targetRow.row, !1, !1, !1, !1);
44552
44654
  });
44553
44655
  } else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
44554
44656
  }
@@ -47703,7 +47805,7 @@
47703
47805
  constructor(container) {
47704
47806
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47705
47807
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47706
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.6-alpha.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47808
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47707
47809
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47708
47810
  const {
47709
47811
  frozenColCount = 0,
@@ -51032,9 +51134,10 @@
51032
51134
 
51033
51135
  class SimpleHeaderLayoutMap {
51034
51136
  constructor(table, columns, showHeader, hierarchyIndent) {
51035
- this.seqId = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0, this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0, this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0, this._cellRangeMap = new Map(), this._showHeader = showHeader, this._table = table, this._columns = [], this._columnsIncludeHided = [], this._headerCellIds = [], this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20, this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment, this.columnTree = new DimensionTree(columns, {
51137
+ var _a, _b;
51138
+ this.seqId = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0, this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0, this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0, this._cellRangeMap = new Map(), this._showHeader = showHeader, this._table = table, this._columns = [], this._columnsIncludeHided = [], this._headerCellIds = [], this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20, this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment, this.columnHierarchyType = table.options.headerHierarchyType, this.columnExpandLevel = null !== (_a = table.options.headerExpandLevel) && void 0 !== _a ? _a : 1, this.columnTree = new DimensionTree(columns, {
51036
51139
  seqId: 0
51037
- }, null), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
51140
+ }, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
51038
51141
  }
51039
51142
  handleRowSeriesNumber(rowSeriesNumber) {
51040
51143
  var _a;
@@ -51550,11 +51653,14 @@
51550
51653
  headerType: null !== (_b = hd.headerType) && void 0 !== _b ? _b : "text",
51551
51654
  dropDownMenu: hd.dropDownMenu,
51552
51655
  define: hd,
51656
+ hierarchyState: hd.hierarchyState,
51553
51657
  columnWidthComputeMode: hd.columnWidthComputeMode
51554
51658
  };
51555
51659
  results[id] = cell;
51556
51660
  for (let r = row - 1; r >= 0; r--) this._headerCellIds[r] && (this._headerCellIds[r][col] = roots[r]);
51557
- if (hideColumnsSubHeader ? this._headerCellIds[row - 1] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id, hd.columns) {
51661
+ hideColumnsSubHeader ? this._headerCellIds[row - 1] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
51662
+ const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
51663
+ if (hd.columns && expand) {
51558
51664
  !hd.columns.every(c => c.hide) && this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
51559
51665
  } else {
51560
51666
  const colDef = {
@@ -51922,7 +52028,7 @@
51922
52028
  return {};
51923
52029
  }
51924
52030
 
51925
- function listTableChangeCellValue(col, row, value, workOnEditableCell, table) {
52031
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
51926
52032
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
51927
52033
  const recordIndex = table.getRecordShowIndexByCell(col, row),
51928
52034
  {
@@ -51953,7 +52059,7 @@
51953
52059
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
51954
52060
  }
51955
52061
  const changedValue = table.getCellOriginValue(col, row);
51956
- oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
52062
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
51957
52063
  col: col,
51958
52064
  row: row,
51959
52065
  rawValue: beforeChangeValue,
@@ -51962,7 +52068,7 @@
51962
52068
  }), table.scenegraph.updateNextFrame();
51963
52069
  }
51964
52070
  }
51965
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, table) {
52071
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
51966
52072
  var _a, _b;
51967
52073
  let pasteColEnd = startCol,
51968
52074
  pasteRowEnd = startRow;
@@ -52006,7 +52112,7 @@
52006
52112
  oldValue = oldValues[i][j];
52007
52113
  table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
52008
52114
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
52009
- oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
52115
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
52010
52116
  col: startCol + j,
52011
52117
  row: startRow + i,
52012
52118
  rawValue: beforeChangeValue,
@@ -52735,6 +52841,8 @@
52735
52841
  return null;
52736
52842
  }
52737
52843
  getHierarchyState(col, row) {
52844
+ var _a;
52845
+ if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
52738
52846
  if (!this.options.groupBy || isArray$7(this.options.groupBy) && 0 === this.options.groupBy.length) {
52739
52847
  if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
52740
52848
  }
@@ -52745,7 +52853,26 @@
52745
52853
  let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
52746
52854
  this.stateManager.updateHoverIcon(col, row, void 0, void 0);
52747
52855
  const hierarchyState = this.getHierarchyState(col, row);
52748
- if (hierarchyState === HierarchyState.expand) this._refreshHierarchyState(col, row, recalculateColWidths), this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
52856
+ if (this.isHeader(col, row)) {
52857
+ const headerTreeNode = this.internalProps.layoutMap.getHeader(col, row),
52858
+ {
52859
+ hierarchyState: rawHierarchyState,
52860
+ define: columnDefine
52861
+ } = headerTreeNode;
52862
+ if (![HierarchyState.collapse, HierarchyState.expand].includes(rawHierarchyState) || !columnDefine) return;
52863
+ const children = columnDefine.columns;
52864
+ if (Array.isArray(children) && children.length > 0) {
52865
+ const hierarchyState = rawHierarchyState === HierarchyState.expand ? HierarchyState.collapse : HierarchyState.expand;
52866
+ headerTreeNode.hierarchyState = hierarchyState, headerTreeNode.define.hierarchyState = hierarchyState, this.updateColumns(this.internalProps.columns);
52867
+ }
52868
+ this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
52869
+ col: col,
52870
+ row: row,
52871
+ hierarchyState: hierarchyState,
52872
+ originData: headerTreeNode,
52873
+ cellLocation: this.getCellLocation(col, row)
52874
+ });
52875
+ } else if (hierarchyState === HierarchyState.expand) this._refreshHierarchyState(col, row, recalculateColWidths), this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
52749
52876
  col: col,
52750
52877
  row: row,
52751
52878
  hierarchyState: HierarchyState.collapse
@@ -52958,11 +53085,13 @@
52958
53085
  }
52959
53086
  changeCellValue(col, row, value) {
52960
53087
  let workOnEditableCell = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
52961
- return listTableChangeCellValue(col, row, value, workOnEditableCell, this);
53088
+ let triggerEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
53089
+ return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
52962
53090
  }
52963
53091
  changeCellValues(startCol, startRow, values) {
52964
53092
  let workOnEditableCell = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
52965
- return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
53093
+ let triggerEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
53094
+ return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this);
52966
53095
  }
52967
53096
  addRecord(record, recordIndex) {
52968
53097
  var _a;