@visactor/vtable-calendar 1.11.2 → 1.11.3

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.
@@ -31031,8 +31031,8 @@
31031
31031
  };
31032
31032
  }
31033
31033
  class ReactCustomLayout {
31034
- constructor(removeAllContainer, table) {
31035
- this.removeAllContainer = removeAllContainer, this.table = table, this.customLayoutFuncCache = new Map(), this.reactRemoveGraphicCache = new Map(), this.headerCustomLayoutFuncCache = new Map(), this.headerReactRemoveGraphicCache = new Map();
31034
+ constructor(table) {
31035
+ this.table = table, this.customLayoutFuncCache = new Map(), this.reactRemoveGraphicCache = new Map(), this.reactRemoveAllGraphicCache = new Map(), this.headerCustomLayoutFuncCache = new Map(), this.headerReactRemoveGraphicCache = new Map(), this.headerReactRemoveAllGraphicCache = new Map();
31036
31036
  }
31037
31037
  hasReactCreateGraphic(componentId, isHeaderCustomLayout) {
31038
31038
  return isHeaderCustomLayout ? this.headerCustomLayoutFuncCache.has(componentId) : this.customLayoutFuncCache.has(componentId);
@@ -31043,6 +31043,9 @@
31043
31043
  setReactRemoveGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
31044
31044
  isHeaderCustomLayout ? this.headerReactRemoveGraphicCache.set(componentId, removeGraphic) : this.reactRemoveGraphicCache.set(componentId, removeGraphic);
31045
31045
  }
31046
+ setReactRemoveAllGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
31047
+ isHeaderCustomLayout ? this.headerReactRemoveAllGraphicCache.set(componentId, removeGraphic) : this.reactRemoveAllGraphicCache.set(componentId, removeGraphic);
31048
+ }
31046
31049
  updateCustomCell(componentId, isHeaderCustomLayout) {
31047
31050
  const table = this.table;
31048
31051
  if (table.isPivotTable()) {
@@ -31088,7 +31091,18 @@
31088
31091
  removeFun && removeFun(col, row);
31089
31092
  }
31090
31093
  clearCache() {
31091
- this.removeAllContainer();
31094
+ this.reactRemoveAllGraphicCache.forEach(removeFun => {
31095
+ removeFun();
31096
+ }), this.headerReactRemoveAllGraphicCache.forEach(removeFun => {
31097
+ removeFun();
31098
+ });
31099
+ }
31100
+ updateAllCustomCell() {
31101
+ this.customLayoutFuncCache.forEach((createFun, componentId) => {
31102
+ this.updateCustomCell(componentId);
31103
+ }), this.headerCustomLayoutFuncCache.forEach((createFun, componentId) => {
31104
+ this.updateCustomCell(componentId, !0);
31105
+ });
31092
31106
  }
31093
31107
  }
31094
31108
  function getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout) {
@@ -35588,8 +35602,9 @@
35588
35602
  const define = table.getHeaderDefine(col, row);
35589
35603
  cellDisable = null == define ? void 0 : define.disableHeaderSelect;
35590
35604
  } else {
35591
- const define = table.getBodyColumnDefine(col, row);
35592
- cellDisable = null == define ? void 0 : define.disableSelect;
35605
+ const define = table.getBodyColumnDefine(col, row),
35606
+ disableSelect = null == define ? void 0 : define.disableSelect;
35607
+ cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect;
35593
35608
  }
35594
35609
  cellDisable && (selectMode = void 0);
35595
35610
  }
@@ -35608,8 +35623,9 @@
35608
35623
  }
35609
35624
  function isCellDisableSelect(table, col, row) {
35610
35625
  const columnDefine = table.getBodyColumnDefine(col, row),
35611
- isHeader = table.isHeader(col, row);
35612
- return !(!(null == columnDefine ? void 0 : columnDefine.disableSelect) || isHeader) || !(!isHeader || !(null == columnDefine ? void 0 : columnDefine.disableHeaderSelect));
35626
+ isHeader = table.isHeader(col, row),
35627
+ disableSelect = null == columnDefine ? void 0 : columnDefine.disableSelect;
35628
+ return !(!("function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect) || isHeader) || !(!isHeader || !(null == columnDefine ? void 0 : columnDefine.disableHeaderSelect));
35613
35629
  }
35614
35630
 
35615
35631
  var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -38548,13 +38564,25 @@
38548
38564
  layout = table.internalProps.layoutMap,
38549
38565
  columnResizeType = -1 === col ? "all" : table.internalProps.columnResizeType;
38550
38566
  if ("column" === columnResizeType) {
38551
- const columnGroup = scenegraph.getColGroup(col);
38567
+ const columnGroup = scenegraph.getColGroup(col),
38568
+ columnHeaderGroup = scenegraph.getColGroup(col, !0),
38569
+ columnBottomGroup = scenegraph.getColGroupInBottom(col, !0);
38552
38570
  if (null == columnGroup || columnGroup.forEachChildren(cellNode => {
38553
38571
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38572
+ }), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
38573
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38574
+ }), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
38575
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38554
38576
  }), "adaptive" === table.widthMode && col < table.colCount - 1) {
38555
- const columnGroup = scenegraph.getColGroup(col + 1);
38577
+ const columnGroup = scenegraph.getColGroup(col + 1),
38578
+ columnHeaderGroup = scenegraph.getColGroup(col + 1, !0),
38579
+ columnBottomGroup = scenegraph.getColGroupInBottom(col + 1, !0);
38556
38580
  null == columnGroup || columnGroup.forEachChildren(cellNode => {
38557
38581
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38582
+ }), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
38583
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38584
+ }), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
38585
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38558
38586
  });
38559
38587
  }
38560
38588
  } else {
@@ -38576,7 +38604,9 @@
38576
38604
  startCol = node.startInTotal + table.frozenColCount, endCol = node.startInTotal + table.frozenColCount + node.size - 1;
38577
38605
  }
38578
38606
  for (let c = startCol; c <= endCol; c++) {
38579
- const columnGroup = scenegraph.getColGroup(c);
38607
+ const columnGroup = scenegraph.getColGroup(c),
38608
+ columnHeaderGroup = scenegraph.getColGroup(c, !0),
38609
+ columnBottomGroup = scenegraph.getColGroupInBottom(c, !0);
38580
38610
  if (columnGroup) {
38581
38611
  if ("indicator" === columnResizeType) {
38582
38612
  const indicatorKey = layout.getIndicatorKey(c, table.columnHeaderLevelCount);
@@ -38589,6 +38619,10 @@
38589
38619
  }
38590
38620
  columnGroup.forEachChildren(cellNode => {
38591
38621
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38622
+ }), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
38623
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38624
+ }), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
38625
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38592
38626
  });
38593
38627
  }
38594
38628
  }
@@ -38619,27 +38653,43 @@
38619
38653
  node = layout.getHeadNodeByRowOrColDimensions(headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1));
38620
38654
  startRow = node.startInTotal + table.frozenRowCount, endRow = node.startInTotal + table.frozenRowCount + node.size - 1;
38621
38655
  }
38622
- for (let col = scenegraph.proxy.colStart; col <= scenegraph.proxy.colEnd; col++) if ("row" === rowResizeType) {
38623
- const cellNode = scenegraph.highPerformanceGetCell(col, row);
38624
- if ("cell" !== cellNode.role) continue;
38625
- if (updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row)), "adaptive" === table.heightMode && row < table.rowCount - 1) {
38626
- const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);
38627
- updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38628
- }
38629
- } else for (let r = startRow; r <= endRow; r++) {
38630
- if ("indicator" === rowResizeType) {
38631
- const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);
38632
- if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) continue;
38633
- if (layout.indicatorsAsCol) {
38634
- const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r),
38635
- headerPath = null == headerPaths ? void 0 : headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
38636
- if (!headerPath || resizeDimensionKey !== headerPath.dimensionKey || resizeDimensionValue !== headerPath.value) continue;
38656
+ const colsRange = [{
38657
+ startCol: scenegraph.proxy.colStart,
38658
+ endCol: scenegraph.proxy.colEnd
38659
+ }];
38660
+ table.frozenColCount && colsRange.push({
38661
+ startCol: 0,
38662
+ endCol: table.frozenColCount - 1
38663
+ }), table.rightFrozenColCount && colsRange.push({
38664
+ startCol: table.colCount - table.rightFrozenColCount,
38665
+ endCol: table.colCount - 1
38666
+ }), colsRange.forEach(_ref => {
38667
+ let {
38668
+ startCol: startCol,
38669
+ endCol: endCol
38670
+ } = _ref;
38671
+ for (let col = startCol; col <= endCol; col++) if ("row" === rowResizeType) {
38672
+ const cellNode = scenegraph.highPerformanceGetCell(col, row);
38673
+ if ("cell" !== cellNode.role) continue;
38674
+ if (updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row)), "adaptive" === table.heightMode && row < table.rowCount - 1) {
38675
+ const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);
38676
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38637
38677
  }
38678
+ } else for (let r = startRow; r <= endRow; r++) {
38679
+ if ("indicator" === rowResizeType) {
38680
+ const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);
38681
+ if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) continue;
38682
+ if (layout.indicatorsAsCol) {
38683
+ const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r),
38684
+ headerPath = null == headerPaths ? void 0 : headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
38685
+ if (!headerPath || resizeDimensionKey !== headerPath.dimensionKey || resizeDimensionValue !== headerPath.value) continue;
38686
+ }
38687
+ }
38688
+ const cellNode = scenegraph.highPerformanceGetCell(col, r);
38689
+ if ("cell" !== cellNode.role) continue;
38690
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38638
38691
  }
38639
- const cellNode = scenegraph.highPerformanceGetCell(col, r);
38640
- if ("cell" !== cellNode.role) continue;
38641
- updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
38642
- }
38692
+ });
38643
38693
  }
38644
38694
  function clearChartCacheImage(scenegraph) {
38645
38695
  var _a;
@@ -39290,6 +39340,12 @@
39290
39340
  return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightTopCornerGroup.getColGroup(col) : !isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightFrozenGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.bodyGroup.getColGroup(col), element || void 0;
39291
39341
  }
39292
39342
  getColGroupInBottom(col) {
39343
+ let isCornerOrColHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
39344
+ var _a;
39345
+ if (isCornerOrColHeader) {
39346
+ const element = null !== (_a = this.getColGroupInLeftBottomCorner(col)) && void 0 !== _a ? _a : this.getColGroupInRightBottomCorner(col);
39347
+ if (element) return element;
39348
+ }
39293
39349
  if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
39294
39350
  }
39295
39351
  getColGroupInLeftBottomCorner(col) {
@@ -40009,7 +40065,7 @@
40009
40065
  let makeSelectCellVisible = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
40010
40066
  let skipBodyMerge = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : !1;
40011
40067
  let forceSelect = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : !1;
40012
- var _a, _b;
40068
+ var _a, _b, _c, _d;
40013
40069
  const {
40014
40070
  table: table,
40015
40071
  interactionState: interactionState
@@ -40021,8 +40077,10 @@
40021
40077
  highlightScope: highlightScope,
40022
40078
  disableHeader: disableHeader,
40023
40079
  cellPos: cellPos
40024
- } = state.select;
40025
- if ((disableHeader && table.isHeader(col, row) || "none" === highlightScope) && !1 === forceSelect && (-1 !== col && -1 !== row && makeSelectCellVisible && table._makeVisibleCell(col, row), col = -1, row = -1), -1 !== col && -1 !== row && makeSelectCellVisible) if (interactionState === InteractionState.grabing && state.select.ranges.length > 0) {
40080
+ } = state.select,
40081
+ disableSelect = null === (_b = null === (_a = table.options) || void 0 === _a ? void 0 : _a.select) || void 0 === _b ? void 0 : _b.disableSelect,
40082
+ cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect;
40083
+ if ((disableHeader && table.isHeader(col, row) || "none" === highlightScope || cellDisable) && !1 === forceSelect && (-1 !== col && -1 !== row && makeSelectCellVisible && table._makeVisibleCell(col, row), col = -1, row = -1), -1 !== col && -1 !== row && makeSelectCellVisible) if (interactionState === InteractionState.grabing && state.select.ranges.length > 0) {
40026
40084
  const currentRange = state.select.ranges[state.select.ranges.length - 1];
40027
40085
  col > currentRange.start.col && col > currentRange.end.col && table._makeVisibleCell(col + 1, row), row > currentRange.start.row && row > currentRange.end.row && table._makeVisibleCell(col, row + 1), col < currentRange.start.col && col < currentRange.end.col && table._makeVisibleCell(col - 1, row), row < currentRange.start.row && row < currentRange.end.row && table._makeVisibleCell(col, row - 1);
40028
40086
  } else table._makeVisibleCell(col, row);
@@ -40033,7 +40091,7 @@
40033
40091
  const {
40034
40092
  disableHeaderSelect: disableHeaderSelect,
40035
40093
  disableRowSeriesNumberSelect: disableRowSeriesNumberSelect
40036
- } = (null === (_a = table.options.keyboardOptions) || void 0 === _a ? void 0 : _a.selectAllOnCtrlA) || {};
40094
+ } = (null === (_c = table.options.keyboardOptions) || void 0 === _c ? void 0 : _c.selectAllOnCtrlA) || {};
40037
40095
  disableHeaderSelect && (_startCol = table.rowHeaderLevelCount, _startRow = table.columnHeaderLevelCount), (disableRowSeriesNumberSelect || disableHeaderSelect && table.transpose) && table.options.rowSeriesNumber && (_startCol += 1), state.select.ranges.push({
40038
40096
  start: {
40039
40097
  col: _startCol,
@@ -40302,7 +40360,7 @@
40302
40360
  });
40303
40361
  }
40304
40362
  cellPos.col = col, cellPos.row = row;
40305
- const currentRange = null === (_b = state.select.ranges) || void 0 === _b ? void 0 : _b[state.select.ranges.length - 1];
40363
+ const currentRange = null === (_d = state.select.ranges) || void 0 === _d ? void 0 : _d[state.select.ranges.length - 1];
40306
40364
  currentRange && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
40307
40365
  }
40308
40366
  }
@@ -40763,7 +40821,7 @@
40763
40821
  for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
40764
40822
  isNeedInitHeaderCheckedStateFromRecord = !0;
40765
40823
  }
40766
- isNeedInitHeaderCheckedStateFromRecord && records.forEach((record, index) => {
40824
+ isNeedInitHeaderCheckedStateFromRecord && (null == records || records.forEach((record, index) => {
40767
40825
  state._checkboxCellTypeFields.forEach(field => {
40768
40826
  const value = record[field];
40769
40827
  let isChecked;
@@ -40782,7 +40840,7 @@
40782
40840
  }
40783
40841
  state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
40784
40842
  });
40785
- });
40843
+ }));
40786
40844
  }
40787
40845
  function updateHeaderCheckedState(field, state, col, row) {
40788
40846
  const allChecked = state.checkedState.every((check_state, index) => {
@@ -41096,7 +41154,7 @@
41096
41154
  highlightMode: "cell",
41097
41155
  highlightInRange: !1
41098
41156
  }, this.table.options.select);
41099
- this.select.highlightScope = 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;
41157
+ 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;
41100
41158
  }
41101
41159
  isSelected(col, row) {
41102
41160
  let seled = !1;
@@ -42934,16 +42992,18 @@
42934
42992
  } = eventArgsSet;
42935
42993
  if (eventArgs) {
42936
42994
  if ("checkbox" === eventArgs.target.name || "radio" === eventArgs.target.name) return !1;
42937
- const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
42995
+ const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row),
42996
+ disableSelect = null == define ? void 0 : define.disableSelect,
42997
+ cellDisable = "function" == typeof disableSelect ? disableSelect(eventArgs.col, eventArgs.row, this.table) : disableSelect;
42938
42998
  if (this.table.isHeader(eventArgs.col, eventArgs.row) && ((null == define ? void 0 : define.disableHeaderSelect) || (null === (_a = this.table.stateManager.select) || void 0 === _a ? void 0 : _a.disableHeader))) return isSelectMoving || this.table.stateManager.updateSelectPos(-1, -1), !1;
42939
- if (!this.table.isHeader(eventArgs.col, eventArgs.row) && (null == define ? void 0 : define.disableSelect)) {
42999
+ if (!this.table.isHeader(eventArgs.col, eventArgs.row) && cellDisable) {
42940
43000
  if (!isSelectMoving) {
42941
43001
  const isHasSelected = !!(null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
42942
43002
  this.table.stateManager.updateSelectPos(-1, -1), isHasSelected && this.table.stateManager.endSelectCells(!0, isHasSelected);
42943
43003
  }
42944
43004
  return !1;
42945
43005
  }
42946
- return !this.table.isPivotChart() || "axis-label" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.name) && "chart" !== (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, null === (_f = null === (_e = this.table.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
43006
+ return !this.table.isPivotChart() || "axis-label" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.name) && "chart" !== (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, !isSelectMoving && (null === (_f = null === (_e = this.table.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f)), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
42947
43007
  }
42948
43008
  return !1;
42949
43009
  }
@@ -44412,7 +44472,7 @@
44412
44472
  style: customStyle
44413
44473
  }, this.customCellStyleArrangement.forEach(cellStyle => {
44414
44474
  const cellPos = cellStyle.cellPosition;
44415
- if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
44475
+ if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
44416
44476
  }), this.table.scenegraph.updateNextFrame();
44417
44477
  }
44418
44478
  arrangeCustomCellStyle(cellPos, customStyleId) {
@@ -44429,7 +44489,7 @@
44429
44489
  if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
44430
44490
  customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
44431
44491
  }
44432
- if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {
44492
+ if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
44433
44493
  const range = this.table.getCellRange(col, row);
44434
44494
  for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
44435
44495
  } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
@@ -45513,7 +45573,7 @@
45513
45573
  constructor(container) {
45514
45574
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45515
45575
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45516
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.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");
45576
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
45517
45577
  const {
45518
45578
  frozenColCount = 0,
45519
45579
  frozenRowCount: frozenRowCount,
@@ -46731,7 +46791,9 @@
46731
46791
  }
46732
46792
  _canDragHeaderPosition(col, row) {
46733
46793
  var _a, _b, _c;
46734
- if (this.isHeader(col, row) && (this.stateManager.isSelected(col, row) || "body" === (null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.headerSelectMode) && checkCellInSelect(col, row, [this.getCellRange(this.stateManager.select.cellPos.col, this.stateManager.select.cellPos.row)]) || (null === (_b = this.options.select) || void 0 === _b ? void 0 : _b.disableHeaderSelect) || (null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.disableSelect))) {
46794
+ const disableSelect = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.disableSelect,
46795
+ cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, this) : disableSelect;
46796
+ if (this.isHeader(col, row) && (this.stateManager.isSelected(col, row) || "body" === (null === (_b = this.options.select) || void 0 === _b ? void 0 : _b.headerSelectMode) && checkCellInSelect(col, row, [this.getCellRange(this.stateManager.select.cellPos.col, this.stateManager.select.cellPos.row)]) || (null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.disableHeaderSelect) || cellDisable)) {
46735
46797
  if ("disabled" === this.internalProps.frozenColDragHeaderMode && this.isFrozenColumn(col)) return !1;
46736
46798
  if (this.stateManager.isSelected(col, row)) {
46737
46799
  const selectRange = this.stateManager.select.ranges[0];
@@ -47236,8 +47298,8 @@
47236
47298
  var _a;
47237
47299
  null === (_a = this.dataSource) || void 0 === _a || _a.setSortedIndexMap(field, filedMap);
47238
47300
  }
47239
- checkReactCustomLayout(removeAllContainer) {
47240
- this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(removeAllContainer, this));
47301
+ checkReactCustomLayout() {
47302
+ this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(this));
47241
47303
  }
47242
47304
  get bodyDomContainer() {
47243
47305
  return this.internalProps.bodyDomContainer;
@@ -49088,7 +49150,7 @@
49088
49150
  }
49089
49151
  }
49090
49152
  function listTableDeleteRecords(recordIndexs, table) {
49091
- var _a, _b;
49153
+ var _a, _b, _c, _d, _e, _f;
49092
49154
  if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
49093
49155
  const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
49094
49156
  if (0 === deletedRecordIndexs.length) return;
@@ -49129,7 +49191,7 @@
49129
49191
  col: 0,
49130
49192
  row: row
49131
49193
  });
49132
- table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
49194
+ null === (_c = table.reactCustomLayout) || void 0 === _c || _c.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_d = table.reactCustomLayout) || void 0 === _d || _d.updateAllCustomCell();
49133
49195
  }
49134
49196
  } else {
49135
49197
  const delRows = [],
@@ -49161,7 +49223,7 @@
49161
49223
  col: 0,
49162
49224
  row: row
49163
49225
  });
49164
- table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
49226
+ null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
49165
49227
  }
49166
49228
  }
49167
49229
  }
@@ -49244,7 +49306,7 @@
49244
49306
 
49245
49307
  class ListTable extends BaseTable {
49246
49308
  constructor(container, options) {
49247
- var _a, _b, _c, _d;
49309
+ var _a, _b, _c, _d, _e, _f;
49248
49310
  "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
49249
49311
  const internalProps = this.internalProps;
49250
49312
  if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$1(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, "node" !== Env.mode && (this.editorManager = new EditManeger(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
@@ -49253,9 +49315,9 @@
49253
49315
  const Title = Factory.getComponent("title");
49254
49316
  internalProps.title = new Title(options.title, this), this.scenegraph.resize();
49255
49317
  }
49256
- if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
49318
+ if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();else {
49257
49319
  const EmptyTip = Factory.getComponent("emptyTip");
49258
- this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
49320
+ this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_f = this.internalProps.emptyTip) || void 0 === _f || _f.resetVisible();
49259
49321
  }
49260
49322
  if (options.enableTreeStickCell) {
49261
49323
  const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
@@ -49459,7 +49521,7 @@
49459
49521
  return ifCan;
49460
49522
  }
49461
49523
  updateOption(options) {
49462
- var _a, _b, _c, _d;
49524
+ var _a, _b, _c, _d, _e, _f;
49463
49525
  const internalProps = this.internalProps;
49464
49526
  if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_c = null !== (_b = options.enableTreeNodeMerge) && void 0 !== _b ? _b : isValid$1(options.groupBy)) && void 0 !== _c && _c, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
49465
49527
  var _a;
@@ -49470,9 +49532,9 @@
49470
49532
  const Title = Factory.getComponent("title");
49471
49533
  internalProps.title = new Title(options.title, this), this.scenegraph.resize();
49472
49534
  }
49473
- if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
49535
+ if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();else {
49474
49536
  const EmptyTip = Factory.getComponent("emptyTip");
49475
- this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
49537
+ this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_f = this.internalProps.emptyTip) || void 0 === _f || _f.resetVisible();
49476
49538
  }
49477
49539
  return new Promise(resolve => {
49478
49540
  setTimeout(resolve, 0);
@@ -49695,7 +49757,7 @@
49695
49757
  setCellRadioState(col, row, index, this);
49696
49758
  }
49697
49759
  setRecords(records, option) {
49698
- var _a, _b;
49760
+ var _a, _b, _c, _d;
49699
49761
  let sort;
49700
49762
  null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
49701
49763
  "undefined" != typeof window && window.performance.now();
@@ -49718,9 +49780,9 @@
49718
49780
  }
49719
49781
  this.refreshRowColCount();
49720
49782
  } else _setRecords(this, records);
49721
- if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
49783
+ if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
49722
49784
  const EmptyTip = Factory.getComponent("emptyTip");
49723
- this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
49785
+ this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();
49724
49786
  }
49725
49787
  this.render(), isValid$1(oldHoverState.col) && isValid$1(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0 && setTimeout(() => {
49726
49788
  var _a;
@@ -49786,13 +49848,16 @@
49786
49848
  return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
49787
49849
  }
49788
49850
  addRecord(record, recordIndex) {
49789
- listTableAddRecord(record, recordIndex, this);
49851
+ var _a;
49852
+ listTableAddRecord(record, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
49790
49853
  }
49791
49854
  addRecords(records, recordIndex) {
49792
- listTableAddRecords(records, recordIndex, this);
49855
+ var _a;
49856
+ listTableAddRecords(records, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
49793
49857
  }
49794
49858
  deleteRecords(recordIndexs) {
49795
- listTableDeleteRecords(recordIndexs, this);
49859
+ var _a;
49860
+ listTableDeleteRecords(recordIndexs, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
49796
49861
  }
49797
49862
  updateRecords(records, recordIndexs) {
49798
49863
  listTableUpdateRecords(records, recordIndexs, this);