@visactor/vtable-gantt 1.10.2-alpha.0 → 1.10.2

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.
@@ -29411,7 +29411,7 @@
29411
29411
  function getValueByPath(obj, paths) {
29412
29412
  let prop,
29413
29413
  res = obj;
29414
- for (; prop = paths.shift();) res = res[prop];
29414
+ for (; (prop = paths.shift()) && (res = res[prop], res););
29415
29415
  return res;
29416
29416
  }
29417
29417
  function isAllDigits(str) {
@@ -31191,7 +31191,7 @@
31191
31191
  return hasThemeProperty(obj, names) || hasThemeProperty(superTheme, names);
31192
31192
  }
31193
31193
  extends(obj) {
31194
- return new TableTheme(obj, this.internalTheme.superTheme || this.internalTheme.obj);
31194
+ return new TableTheme(ingoreNoneValueMerge({}, obj), ingoreNoneValueMerge(this.internalTheme.superTheme, this.internalTheme.obj));
31195
31195
  }
31196
31196
  getStyle(style) {
31197
31197
  const that = this;
@@ -31670,7 +31670,7 @@
31670
31670
  super(...arguments), this.type = AggregationType.MIN, this.min = Number.MAX_SAFE_INTEGER;
31671
31671
  }
31672
31672
  push(record) {
31673
- record && (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] && (this.min = record[this.field] < this.min ? record[this.field] : this.min)), this.clearCacheValue();
31673
+ record && (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] ? this.min = record[this.field] < this.min ? record[this.field] : this.min : this.field && !isNaN(record[this.field]) && (this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min)), this.clearCacheValue();
31674
31674
  }
31675
31675
  deleteRecord(record) {
31676
31676
  record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.recalculate());
@@ -31688,7 +31688,7 @@
31688
31688
  recalculate() {
31689
31689
  if (this.min = Number.MAX_SAFE_INTEGER, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
31690
31690
  const record = this.records[i];
31691
- "Aggregator" === record.className ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] && (this.min = record[this.field] < this.min ? record[this.field] : this.min);
31691
+ "Aggregator" === record.className ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] ? this.min = record[this.field] < this.min ? record[this.field] : this.min : this.field && !isNaN(record[this.field]) && (this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min);
31692
31692
  }
31693
31693
  }
31694
31694
  }
@@ -38127,8 +38127,7 @@
38127
38127
 
38128
38128
  function computeColsWidth(table, colStart, colEnd, update) {
38129
38129
  var _a, _b, _c, _d, _e, _f, _g, _h;
38130
- "undefined" != typeof window && window.performance.now();
38131
- colStart = null != colStart ? colStart : 0, colEnd = null != colEnd ? colEnd : table.colCount - 1, 0 === colStart && colEnd === table.colCount - 1 && table._clearColRangeWidthsMap();
38130
+ table.internalProps.columnWidthConfig && table._parseColumnWidthConfig(table.internalProps.columnWidthConfig), colStart = null != colStart ? colStart : 0, colEnd = null != colEnd ? colEnd : table.colCount - 1, 0 === colStart && colEnd === table.colCount - 1 && table._clearColRangeWidthsMap();
38132
38131
  const layoutMap = table.internalProps.layoutMap;
38133
38132
  table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache());
38134
38133
  const oldColWidths = [],
@@ -38444,10 +38443,10 @@
38444
38443
  value = customMergeText, customStyle = customMergeStyle, (customLayout || customRender) && (customResult = dealWithCustom(customLayout, customRender, customMergeRange.start.col, customMergeRange.start.row, table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), isCustomMerge = !0;
38445
38444
  }
38446
38445
  }
38447
- let colForDefine = col,
38446
+ let define,
38447
+ colForDefine = col,
38448
38448
  rowForDefine = row;
38449
- range && (colForDefine = range.start.col, rowForDefine = range.start.row), !table.isPivotTable() && ("columnHeader" === cellLocation || "cornerHeader" === cellLocation) && row >= table.columnHeaderLevelCount && (cellLocation = "body");
38450
- const define = "body" !== cellLocation ? table.getHeaderDefine(colForDefine, rowForDefine) : table.getBodyColumnDefine(colForDefine, rowForDefine);
38449
+ range && (colForDefine = range.start.col, rowForDefine = range.start.row), !table.isPivotTable() && ("columnHeader" === cellLocation || "cornerHeader" === cellLocation) && row >= table.columnHeaderLevelCount && (cellLocation = "body"), define = !table.isPivotTable() && table.isSeriesNumberInBody(col, row) ? table.getBodyColumnDefine(colForDefine, rowForDefine) : "body" !== cellLocation ? table.getHeaderDefine(colForDefine, rowForDefine) : table.getBodyColumnDefine(colForDefine, rowForDefine);
38451
38450
  let mayHaveIcon = "body" !== cellLocation || (null == define ? void 0 : define.dragOrder) || !!(null == define ? void 0 : define.icon) || !!(null == define ? void 0 : define.tree);
38452
38451
  if (!range && (table.internalProps.enableTreeNodeMerge || "body" !== cellLocation || (null == define ? void 0 : define.mergeCell)) && (range = table.getCellRange(col, row), isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row, isMerge)) {
38453
38452
  const mergeSize = dealMerge(range, mergeMap, table, rowStart > range.start.row);
@@ -38743,7 +38742,7 @@
38743
38742
  if (!colGroup) return;
38744
38743
  const screenTopRow = proxy.screenTopRow,
38745
38744
  topRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
38746
- bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
38745
+ bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
38747
38746
  for (let row = topRow; row <= bottomRow; row++) {
38748
38747
  const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, !0);
38749
38748
  proxy.updateCellGroupContent(cellGroup);
@@ -38875,19 +38874,19 @@
38875
38874
  distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
38876
38875
  let syncTopRow, syncBottomRow;
38877
38876
  if ("autoHeight" === proxy.table.heightMode) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
38878
- syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
38877
+ syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
38879
38878
  }
38880
38879
  computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updatePartRowPosition(startRow, endRow, direction, proxy), proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count;
38881
38880
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
38882
- "autoHeight" === proxy.table.heightMode && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0)), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), "autoHeight" === proxy.table.heightMode && sync ? proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1) : proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, distStartRow), proxy.rowUpdateDirection = direction, proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
38881
+ "autoHeight" === proxy.table.heightMode && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0)), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), "autoHeight" === proxy.table.heightMode && sync ? proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1) : proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, distStartRow), proxy.rowUpdateDirection = direction, proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
38883
38882
  } else {
38884
38883
  const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
38885
- distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count,
38884
+ distEndRow = Math.min(proxy.table.rowCount - 1, "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count),
38886
38885
  distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
38887
38886
  let syncTopRow, syncBottomRow;
38888
- "autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount)), computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
38887
+ "autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1)), computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
38889
38888
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
38890
- "autoHeight" === proxy.table.heightMode && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up")), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), "autoHeight" === proxy.table.heightMode && sync ? proxy.rowUpdatePos = proxy.rowEnd + 1 : proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
38889
+ "autoHeight" === proxy.table.heightMode && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up")), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), "autoHeight" === proxy.table.heightMode && sync ? proxy.rowUpdatePos = proxy.rowEnd + 1 : proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
38891
38890
  }
38892
38891
  });
38893
38892
  }
@@ -38991,7 +38990,7 @@
38991
38990
  "group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
38992
38991
  cellGroup.needUpdate = !0;
38993
38992
  }));
38994
- }), "autoHeight" === proxy.table.heightMode ? (syncTopRow = proxy.rowStart, syncBottomRow = proxy.rowEnd) : (syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + 2 * proxy.screenRowCount));
38993
+ }), "autoHeight" === proxy.table.heightMode ? (syncTopRow = proxy.rowStart, syncBottomRow = proxy.rowEnd) : (syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1));
38995
38994
  const oldBodyHeight = proxy.table.getAllRowsHeight();
38996
38995
  computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
38997
38996
  const newBodyHeight = proxy.table.getAllRowsHeight();
@@ -39333,6 +39332,16 @@
39333
39332
  const heightLimit = 5 * this.table.tableNoFrameHeight;
39334
39333
  this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight), this.firstScreenRowLimit = Math.max(30, this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight))), this.rowUpdatePos = this.bodyBottomRow;
39335
39334
  }
39335
+ refreshRowCount() {
39336
+ this.bodyTopRow = this.table.frozenRowCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
39337
+ const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
39338
+ this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.rowStart + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow, this.rowEnd = this.totalRow;
39339
+ }
39340
+ refreshColCount() {
39341
+ this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
39342
+ const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
39343
+ this.totalActualBodyColCount = totalActualBodyColCount, this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol, this.colEnd = this.totalCol;
39344
+ }
39336
39345
  resize() {
39337
39346
  const defaultColWidth = this.table.defaultColWidth;
39338
39347
  this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
@@ -40001,9 +40010,11 @@
40001
40010
  const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
40002
40011
  rowUpdatePos = isValid$1(rowUpdatePos) ? isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
40003
40012
  }
40004
- for (let col = 0; col < table.colCount; col++) updateRows.forEach(r => {
40005
- const mergeInfo = getCellMergeInfo(scene.table, col, r);
40006
- if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) updateCell$1(col, row, scene.table, !1);else updateCell$1(col, r, scene.table, !1);
40013
+ for (let col = 0; col < table.colCount; col++) updateRows.forEach(row => {
40014
+ if (row < table.frozenRowCount || row > table.rowCount - 1 || row < scene.table.rowCount - scene.table.bottomFrozenRowCount && (row < scene.proxy.rowStart || row > scene.proxy.rowEnd)) removeCellGroup(row, scene);else {
40015
+ const mergeInfo = getCellMergeInfo(scene.table, col, row);
40016
+ if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) updateCell$1(col, row, scene.table, !1);else updateCell$1(col, row, scene.table, !1);
40017
+ }
40007
40018
  });
40008
40019
  if (updateRows.length) {
40009
40020
  const pos = _getUpdateRowIndex(updateRows[0] - 1, updateRows[updateRows.length - 1] + 1, scene);
@@ -40022,7 +40033,7 @@
40022
40033
  scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
40023
40034
  }
40024
40035
  scene.proxy.rowUpdateDirection = "up", scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), updateBottomFrozeCellGroups();
40025
- } else removeRows.length && (setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene), scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), updateBottomFrozeCellGroups(), scene.proxy.progress());
40036
+ } else removeRows.length && (setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene), scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), updateBottomFrozeCellGroups());
40026
40037
  scene.proxy.progress();
40027
40038
  const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);
40028
40039
  function updateBottomFrozeCellGroups() {
@@ -40040,7 +40051,7 @@
40040
40051
  const proxy = scene.proxy;
40041
40052
  row >= proxy.rowStart && row <= proxy.rowEnd && (removeCellGroup(row, scene), proxy.rowEnd--, proxy.currentRow--), proxy.bodyBottomRow--;
40042
40053
  const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1);
40043
- proxy.totalActualBodyRowCount = totalActualBodyRowCount, proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1;
40054
+ proxy.totalActualBodyRowCount = totalActualBodyRowCount, proxy.totalRow = Math.min(proxy.table.rowCount - 1, proxy.rowStart + totalActualBodyRowCount - 1);
40044
40055
  }
40045
40056
  function addRow(row, scene) {
40046
40057
  const proxy = scene.proxy;
@@ -41940,7 +41951,7 @@
41940
41951
  disableHeaderSelect: disableHeaderSelect,
41941
41952
  disableRowSeriesNumberSelect: disableRowSeriesNumberSelect
41942
41953
  } = (null === (_a = table.options.keyboardOptions) || void 0 === _a ? void 0 : _a.selectAllOnCtrlA) || {};
41943
- disableHeaderSelect && (_startCol = table.rowHeaderLevelCount, _startRow = table.columnHeaderLevelCount), (disableRowSeriesNumberSelect || disableHeaderSelect) && table.options.rowSeriesNumber && (_startCol += 1), state.select.ranges.push({
41954
+ disableHeaderSelect && (_startCol = table.rowHeaderLevelCount, _startRow = table.columnHeaderLevelCount), (disableRowSeriesNumberSelect || disableHeaderSelect && table.transpose) && table.options.rowSeriesNumber && (_startCol += 1), state.select.ranges.push({
41944
41955
  start: {
41945
41956
  col: _startCol,
41946
41957
  row: _startRow
@@ -42009,7 +42020,7 @@
42009
42020
  row: row
42010
42021
  }
42011
42022
  } : table.getCellRange(col, row);
42012
- currentRange.start.col < cellRange.end.col ? currentRange.end.col = cellRange.end.col : currentRange.start.col > cellRange.start.col && (currentRange.end.col = cellRange.start.col), currentRange.start.row < cellRange.end.row ? currentRange.end.row = cellRange.end.row : currentRange.start.row > cellRange.start.row && (currentRange.end.row = cellRange.start.row), skipBodyMerge && (currentRange.skipBodyMerge = !0);
42023
+ currentRange.start.col < cellRange.end.col ? currentRange.end.col = cellRange.end.col : currentRange.start.col > cellRange.start.col && (currentRange.end.col = cellRange.start.col), currentRange.start.row < cellRange.end.row ? currentRange.end.row = cellRange.end.row : currentRange.start.row > cellRange.start.row && (currentRange.end.row = cellRange.start.row), "body" === state.select.headerSelectMode && (table.isRowHeader(col, row) ? (currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, currentRange.end.col = table.colCount - 1) : table.isColumnHeader(col, row) ? (currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.row = table.rowCount - 1) : table.internalProps.layoutMap.isSeriesNumberInBody(col, row) ? (currentRange.start.col = table.leftRowSeriesNumberCount, currentRange.end.col = table.colCount - 1) : table.isCornerHeader(col, row) ? (currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.col = table.colCount - 1, currentRange.end.row = table.rowCount - 1) : table.isSeriesNumber(col, row) && (currentRange.start.col = table.leftRowSeriesNumberCount, currentRange.start.row = table.columnHeaderLevelCount, currentRange.end.col = table.colCount - 1, currentRange.end.row = table.rowCount - 1)), skipBodyMerge && (currentRange.skipBodyMerge = !0);
42013
42024
  }
42014
42025
  scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
42015
42026
  }
@@ -42022,25 +42033,55 @@
42022
42033
  endCol = Math.max(currentRange.start.col, currentRange.end.col, col),
42023
42034
  startRow = Math.min(currentRange.start.row, currentRange.end.row, row),
42024
42035
  endRow = table.rowCount - 1;
42025
- currentRange.start = {
42036
+ "body" === state.select.headerSelectMode ? (currentRange.start = {
42037
+ col: startCol,
42038
+ row: table.columnHeaderLevelCount
42039
+ }, currentRange.end = {
42040
+ col: endCol,
42041
+ row: table.rowCount - 1
42042
+ }) : (currentRange.start = {
42026
42043
  col: startCol,
42027
42044
  row: startRow
42028
42045
  }, currentRange.end = {
42029
42046
  col: endCol,
42030
42047
  row: endRow
42031
- };
42048
+ });
42032
42049
  } else if ("cell" !== state.select.headerSelectMode && table.isRowHeader(col, row)) {
42033
42050
  const startCol = Math.min(currentRange.start.col, currentRange.end.col, col),
42034
42051
  endCol = table.colCount - 1,
42035
42052
  startRow = Math.min(currentRange.start.row, currentRange.end.row, row),
42036
42053
  endRow = Math.max(currentRange.start.row, currentRange.end.row, row);
42037
- currentRange.start = {
42054
+ "body" === state.select.headerSelectMode ? (currentRange.start = {
42055
+ col: table.leftRowSeriesNumberCount + table.rowHeaderLevelCount,
42056
+ row: startRow
42057
+ }, currentRange.end = {
42058
+ col: table.colCount - 1,
42059
+ row: endRow
42060
+ }) : (currentRange.start = {
42038
42061
  col: startCol,
42039
42062
  row: startRow
42040
42063
  }, currentRange.end = {
42041
42064
  col: endCol,
42042
42065
  row: endRow
42043
- };
42066
+ });
42067
+ } else if ("cell" !== state.select.headerSelectMode && table.isSeriesNumberInBody(col, row)) {
42068
+ const startCol = Math.min(currentRange.start.col, currentRange.end.col, col),
42069
+ endCol = table.colCount - 1,
42070
+ startRow = Math.min(currentRange.start.row, currentRange.end.row, row),
42071
+ endRow = Math.max(currentRange.start.row, currentRange.end.row, row);
42072
+ "body" === state.select.headerSelectMode ? (currentRange.start = {
42073
+ col: table.leftRowSeriesNumberCount,
42074
+ row: startRow
42075
+ }, currentRange.end = {
42076
+ col: table.colCount - 1,
42077
+ row: endRow
42078
+ }) : (currentRange.start = {
42079
+ col: startCol,
42080
+ row: startRow
42081
+ }, currentRange.end = {
42082
+ col: endCol,
42083
+ row: endRow
42084
+ });
42044
42085
  } else currentRange.end = {
42045
42086
  col: col,
42046
42087
  row: row
@@ -42050,7 +42091,17 @@
42050
42091
  let extendSelectRange = !0;
42051
42092
  if (-1 === cellPos.col || -1 === cellPos.row || isCtrl || (state.select.ranges = [], scenegraph.deleteAllSelectBorder()), "cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
42052
42093
  const cellRange = table.getCellRange(col, row);
42053
- state.select.ranges.push({
42094
+ "body" === state.select.headerSelectMode ? state.select.ranges.push({
42095
+ start: {
42096
+ col: cellRange.start.col,
42097
+ row: table.columnHeaderLevelCount
42098
+ },
42099
+ end: {
42100
+ col: cellRange.end.col,
42101
+ row: table.rowCount - 1
42102
+ },
42103
+ skipBodyMerge: !0
42104
+ }) : state.select.ranges.push({
42054
42105
  start: {
42055
42106
  col: cellRange.start.col,
42056
42107
  row: row
@@ -42063,7 +42114,17 @@
42063
42114
  });
42064
42115
  } else if ("cell" !== state.select.headerSelectMode && table.isRowHeader(col, row)) {
42065
42116
  const cellRange = table.getCellRange(col, row);
42066
- state.select.ranges.push({
42117
+ "body" === state.select.headerSelectMode ? state.select.ranges.push({
42118
+ start: {
42119
+ col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
42120
+ row: cellRange.start.row
42121
+ },
42122
+ end: {
42123
+ col: table.colCount - 1,
42124
+ row: cellRange.end.row
42125
+ },
42126
+ skipBodyMerge: !0
42127
+ }) : state.select.ranges.push({
42067
42128
  start: {
42068
42129
  col: col,
42069
42130
  row: cellRange.start.row
@@ -42074,7 +42135,17 @@
42074
42135
  },
42075
42136
  skipBodyMerge: !0
42076
42137
  });
42077
- } else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) extendSelectRange = !1, state.select.ranges.push({
42138
+ } else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
42139
+ start: {
42140
+ col: table.leftRowSeriesNumberCount,
42141
+ row: table.columnHeaderLevelCount
42142
+ },
42143
+ end: {
42144
+ col: table.colCount - 1,
42145
+ row: table.rowCount - 1
42146
+ },
42147
+ skipBodyMerge: !0
42148
+ }) : state.select.ranges.push({
42078
42149
  start: {
42079
42150
  col: 0,
42080
42151
  row: 0
@@ -42084,7 +42155,17 @@
42084
42155
  row: table.rowCount - 1
42085
42156
  },
42086
42157
  skipBodyMerge: !0
42087
- });else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, state.select.ranges.push({
42158
+ });else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
42159
+ start: {
42160
+ col: table.leftRowSeriesNumberCount,
42161
+ row: row
42162
+ },
42163
+ end: {
42164
+ col: table.colCount - 1,
42165
+ row: row
42166
+ },
42167
+ skipBodyMerge: !0
42168
+ }) : state.select.ranges.push({
42088
42169
  start: {
42089
42170
  col: col,
42090
42171
  row: row
@@ -42094,6 +42175,26 @@
42094
42175
  row: row
42095
42176
  },
42096
42177
  skipBodyMerge: !0
42178
+ });else if (table.internalProps.layoutMap.isCornerHeader(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
42179
+ start: {
42180
+ col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
42181
+ row: table.columnHeaderLevelCount
42182
+ },
42183
+ end: {
42184
+ col: table.colCount - 1,
42185
+ row: table.rowCount - 1
42186
+ },
42187
+ skipBodyMerge: !0
42188
+ }) : state.select.ranges.push({
42189
+ start: {
42190
+ col: table.leftRowSeriesNumberCount,
42191
+ row: 0
42192
+ },
42193
+ end: {
42194
+ col: table.colCount - 1,
42195
+ row: table.rowCount - 1
42196
+ },
42197
+ skipBodyMerge: !0
42097
42198
  });else if (col >= 0 && row >= 0) {
42098
42199
  const cellRange = skipBodyMerge ? {
42099
42200
  start: {
@@ -42573,12 +42674,12 @@
42573
42674
  function updateHeaderCheckedState(field, state, col, row) {
42574
42675
  const allChecked = state.checkedState.every((check_state, index) => {
42575
42676
  const tableIndex = state.table.getTableIndexByRecordIndex(index);
42576
- return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !0 === check_state[field];
42677
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !0 === (null == check_state ? void 0 : check_state[field]);
42577
42678
  });
42578
42679
  if (allChecked) return state.headerCheckedState[field] = !0, allChecked;
42579
42680
  if (state.checkedState.every((check_state, index) => {
42580
42681
  const tableIndex = state.table.getTableIndexByRecordIndex(index);
42581
- return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !1 === check_state[field];
42682
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !1 === (null == check_state ? void 0 : check_state[field]);
42582
42683
  })) return state.headerCheckedState[field] = !1, !1;
42583
42684
  return !!state.checkedState.find(check_state => !0 === (null == check_state ? void 0 : check_state[field])) && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
42584
42685
  }
@@ -43323,7 +43424,18 @@
43323
43424
  }
43324
43425
  }
43325
43426
  triggerFreeze(col, row, iconMark) {
43326
- this.table.isPivotTable() || this.table.transpose || (dealFreeze(col, row, this.table), this.frozen.icon = iconMark);
43427
+ if (!this.table.isPivotTable() && !this.table.transpose) {
43428
+ if (dealFreeze(col, row, this.table), this.table.hasListeners(PIVOT_TABLE_EVENT_TYPE.FREEZE_CLICK)) {
43429
+ const fields = this.table.internalProps.layoutMap.columnObjects.slice(0, col + 1);
43430
+ this.table.fireListeners(PIVOT_TABLE_EVENT_TYPE.FREEZE_CLICK, {
43431
+ col: col,
43432
+ row: row,
43433
+ fields: fields.reduce((pre, cur) => pre.concat(cur.field), []),
43434
+ colCount: this.table.frozenColCount
43435
+ });
43436
+ }
43437
+ this.frozen.icon = iconMark;
43438
+ }
43327
43439
  }
43328
43440
  updateCursor() {
43329
43441
  let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "default";
@@ -43670,38 +43782,6 @@
43670
43782
  target && !target.isDescendantsOf(table.scenegraph.tableGroup) && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, {
43671
43783
  event: e.nativeEvent
43672
43784
  });
43673
- }), table.scenegraph.tableGroup.addEventListener("pointerupoutside", e => {
43674
- var _a, _b, _c, _d, _e, _f, _g, _h;
43675
- const eventArgsSet = getCellEventArgsSet(e);
43676
- if (stateManager.menu.isShow && (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) !== (null === (_b = stateManager.residentHoverIcon) || void 0 === _b ? void 0 : _b.icon) && setTimeout(() => {
43677
- table.internalProps.menuHandler.pointInMenuElement(e.client.x, e.client.y) || stateManager.menu.isShow && stateManager.hideMenu();
43678
- }, 0), stateManager.isResizeCol()) endResizeCol(table);else if (stateManager.isResizeRow()) endResizeRow(table);else if (stateManager.isMoveCol()) {
43679
- table.stateManager.endMoveCol() && -1 !== (null === (_c = table.stateManager.columnMove) || void 0 === _c ? void 0 : _c.colSource) && -1 !== (null === (_d = table.stateManager.columnMove) || void 0 === _d ? void 0 : _d.rowSource) && -1 !== (null === (_e = table.stateManager.columnMove) || void 0 === _e ? void 0 : _e.colTarget) && -1 !== (null === (_f = table.stateManager.columnMove) || void 0 === _f ? void 0 : _f.rowTarget) && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION) && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
43680
- target: {
43681
- col: table.stateManager.columnMove.colTarget,
43682
- row: table.stateManager.columnMove.rowTarget
43683
- },
43684
- source: {
43685
- col: table.stateManager.columnMove.colSource,
43686
- row: table.stateManager.columnMove.rowSource
43687
- },
43688
- event: e.nativeEvent
43689
- });
43690
- } else if (stateManager.isSelecting() && (null === (_h = null === (_g = table.stateManager.select) || void 0 === _g ? void 0 : _g.ranges) || void 0 === _h ? void 0 : _h.length)) {
43691
- const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col,
43692
- lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
43693
- if (table.stateManager.endSelectCells(), table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
43694
- const cellsEvent = {
43695
- event: e.nativeEvent,
43696
- cells: [],
43697
- col: lastCol,
43698
- row: lastRow,
43699
- scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
43700
- target: void 0
43701
- };
43702
- cellsEvent.cells = table.getSelectedCellInfos(), table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
43703
- }
43704
- }
43705
43785
  });
43706
43786
  const globalPointerupCallback = e => {
43707
43787
  var _a;
@@ -44369,7 +44449,36 @@
44369
44449
  callback: globalPointerdownCallback
44370
44450
  }), document.body.addEventListener("pointerdown", globalPointerdownCallback);
44371
44451
  const globalPointerupCallback = e => {
44372
- table.eventManager.LastBodyPointerXY = null, table.eventManager.isDown = !1, table.eventManager.isDraging = !1, table.eventManager.inertiaScroll.endInertia(), "grabing" === stateManager.interactionState && stateManager.isResizeCol() ? endResizeCol(table) : "grabing" === stateManager.interactionState && stateManager.isResizeRow() && endResizeRow(table);
44452
+ e.target !== table.canvas && (e => {
44453
+ var _a, _b, _c, _d, _e, _f;
44454
+ if (stateManager.menu.isShow && setTimeout(() => {
44455
+ table.internalProps.menuHandler.pointInMenuElement(e.clientX, e.clientY) || stateManager.menu.isShow && stateManager.hideMenu();
44456
+ }, 0), stateManager.isResizeCol()) endResizeCol(table);else if (stateManager.isResizeRow()) endResizeRow(table);else if (stateManager.isMoveCol()) table.stateManager.endMoveCol() && -1 !== (null === (_a = table.stateManager.columnMove) || void 0 === _a ? void 0 : _a.colSource) && -1 !== (null === (_b = table.stateManager.columnMove) || void 0 === _b ? void 0 : _b.rowSource) && -1 !== (null === (_c = table.stateManager.columnMove) || void 0 === _c ? void 0 : _c.colTarget) && -1 !== (null === (_d = table.stateManager.columnMove) || void 0 === _d ? void 0 : _d.rowTarget) && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION) && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
44457
+ target: {
44458
+ col: table.stateManager.columnMove.colTarget,
44459
+ row: table.stateManager.columnMove.rowTarget
44460
+ },
44461
+ source: {
44462
+ col: table.stateManager.columnMove.colSource,
44463
+ row: table.stateManager.columnMove.rowSource
44464
+ },
44465
+ event: e
44466
+ });else if (stateManager.isSelecting() && (null === (_f = null === (_e = table.stateManager.select) || void 0 === _e ? void 0 : _e.ranges) || void 0 === _f ? void 0 : _f.length)) {
44467
+ const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col,
44468
+ lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
44469
+ if (table.stateManager.endSelectCells(), table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
44470
+ const cellsEvent = {
44471
+ event: e,
44472
+ cells: [],
44473
+ col: lastCol,
44474
+ row: lastRow,
44475
+ scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
44476
+ target: void 0
44477
+ };
44478
+ cellsEvent.cells = table.getSelectedCellInfos(), table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
44479
+ }
44480
+ }
44481
+ })(e), table.eventManager.LastBodyPointerXY = null, table.eventManager.isDown = !1, table.eventManager.isDraging = !1, table.eventManager.inertiaScroll.endInertia(), "grabing" === stateManager.interactionState && stateManager.isResizeCol() ? endResizeCol(table) : "grabing" === stateManager.interactionState && stateManager.isResizeRow() && endResizeRow(table);
44373
44482
  };
44374
44483
  eventManager.globalEventListeners.push({
44375
44484
  name: "pointerup",
@@ -44401,8 +44510,9 @@
44401
44510
  bottomFrozenRowHeight = table.getBottomFrozenRowsHeight(),
44402
44511
  leftFrozenColsWidth = table.getFrozenColsWidth(),
44403
44512
  rightFrozenColsWidth = table.getRightFrozenColsWidth(),
44404
- startCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].start,
44405
- endCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end,
44513
+ startCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].start;
44514
+ if (table.isSeriesNumber(startCell.col, startCell.row)) return;
44515
+ const endCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end,
44406
44516
  canScrollY = (!1 === table.isFrozenRow(startCell.row) || !1 === table.isFrozenRow(endCell.row)) && table.getAllRowsHeight() > table.tableNoFrameHeight,
44407
44517
  canScrollX = (!1 === table.isFrozenColumn(startCell.col) || !1 === table.isFrozenColumn(endCell.col)) && table.getAllColsWidth() > table.tableNoFrameWidth;
44408
44518
  if ((y > drawRange.bottom - bottomFrozenRowHeight || y < drawRange.top + topFrozenRowHeight) && canScrollY || (x > drawRange.right - rightFrozenColsWidth || x < drawRange.left + leftFrozenColsWidth) && canScrollX) {
@@ -44675,7 +44785,11 @@
44675
44785
  return !1;
44676
44786
  }
44677
44787
  deelTableSelectAll() {
44678
- this.table.stateManager.updateSelectPos(-1, -1, !1, !1, !0);
44788
+ this.table.stateManager.updateSelectPos(-1, -1, !1, !1, !0), this.table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CELL, {
44789
+ ranges: this.table.stateManager.select.ranges,
44790
+ col: 0,
44791
+ row: 0
44792
+ });
44679
44793
  }
44680
44794
  dealMenuSelect(eventArgsSet) {}
44681
44795
  checkColumnResize(eventArgsSet, update) {
@@ -45894,6 +46008,7 @@
45894
46008
  this.cumulativeSum.clear(), this.difference.clear();
45895
46009
  }
45896
46010
  add(position, value) {
46011
+ if (!isValid$1(value)) return;
45897
46012
  const defaultValue = this.table.getRowHeight(position);
45898
46013
  this.data.has(position) || (this._keys.push(position), this._sorted = !1), this.data.set(position, value), this.totalSum += value, this.updateDifference(position, value - defaultValue);
45899
46014
  }
@@ -45908,7 +46023,7 @@
45908
46023
  }
45909
46024
  }
45910
46025
  put(position, newValue) {
45911
- if (this.data.has(position)) {
46026
+ if (isValid$1(newValue)) if (this.data.has(position)) {
45912
46027
  const oldValue = this.data.get(position);
45913
46028
  if (oldValue === newValue) return;
45914
46029
  this.data.set(position, newValue);
@@ -47160,12 +47275,12 @@
47160
47275
  y: isNumber$2(position.row) ? cellRect.top - this.table.getFrozenRowsHeight() : this.table.scrollTop
47161
47276
  },
47162
47277
  duration = isBoolean$2(animationOption) ? animationOption ? 3e3 : 0 : null !== (_c = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _c ? _c : 3e3,
47163
- easing = isBoolean$2(animationOption) ? animationOption ? "linear" : "" : null !== (_d = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _d ? _d : "linear",
47164
- animation = new Animate().bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
47165
- graphic: this.tempGraphic,
47166
- table: this.table
47167
- }));
47168
- this.timeline.addAnimate(animation), this.ticker.start();
47278
+ easing = isBoolean$2(animationOption) ? animationOption ? "linear" : "" : null !== (_d = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _d ? _d : "linear";
47279
+ new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
47280
+ graphic: this.tempGraphic,
47281
+ table: this.table
47282
+ }));
47283
+ this.ticker.start();
47169
47284
  }
47170
47285
  clear() {
47171
47286
  this.timeline.clear(), this.ticker.stop();
@@ -47187,7 +47302,7 @@
47187
47302
  constructor(container) {
47188
47303
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47189
47304
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
47190
- if (super(), this.showFrozenIcon = !0, this.version = "1.10.2-alpha.0", 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");
47305
+ if (super(), this.showFrozenIcon = !0, this.version = "1.10.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");
47191
47306
  const {
47192
47307
  frozenColCount = 0,
47193
47308
  frozenRowCount: frozenRowCount,
@@ -48090,7 +48205,8 @@
48090
48205
  return getTargetColAt(absoluteX, this);
48091
48206
  }
48092
48207
  getTargetRowAt(absoluteY) {
48093
- return getTargetRowAt(absoluteY, this);
48208
+ const targetRow = getTargetRowAt(absoluteY, this);
48209
+ return targetRow && (targetRow.row = Math.min(targetRow.row, this.rowCount - 1)), targetRow;
48094
48210
  }
48095
48211
  getTargetColAtConsiderRightFrozen(absoluteX, isConsider) {
48096
48212
  return getTargetColAtConsiderRightFrozen(absoluteX, isConsider, this);
@@ -50534,6 +50650,7 @@
50534
50650
  }
50535
50651
  }
50536
50652
  function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, table) {
50653
+ var _a, _b;
50537
50654
  let pasteColEnd = startCol,
50538
50655
  pasteRowEnd = startRow;
50539
50656
  const beforeChangeValues = [],
@@ -50556,21 +50673,32 @@
50556
50673
  pasteRowEnd = startRow + i;
50557
50674
  const rowValues = values[i];
50558
50675
  let thisRowPasteColEnd = startCol;
50559
- for (let j = 0; j < rowValues.length && !(startCol + j > table.colCount - 1); j++) if (thisRowPasteColEnd = startCol + j, workOnEditableCell && table.isHasEditorDefine(startCol + j, startRow + i) || !1 === workOnEditableCell) {
50560
- const value = rowValues[j],
50561
- recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
50562
- {
50563
- field: field
50564
- } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
50565
- beforeChangeValue = beforeChangeValues[i][j],
50566
- oldValue = oldValues[i][j];
50567
- 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), table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
50568
- col: startCol + j,
50569
- row: startRow + i,
50570
- rawValue: beforeChangeValue,
50571
- currentValue: oldValue,
50572
- changedValue: table.getCellOriginValue(startCol + j, startRow + i)
50573
- });
50676
+ for (let j = 0; j < rowValues.length && !(startCol + j > table.colCount - 1); j++) {
50677
+ thisRowPasteColEnd = startCol + j;
50678
+ let isCanChange = !1;
50679
+ if (!1 === workOnEditableCell) isCanChange = !0;else if (table.isHasEditorDefine(startCol + j, startRow + i)) {
50680
+ const editor = table.getEditor(startCol + j, startRow + i),
50681
+ oldValue = oldValues[i][j],
50682
+ value = rowValues[j],
50683
+ maybePromiseOrValue = null === (_b = null === (_a = null == editor ? void 0 : editor.validateValue) || void 0 === _a ? void 0 : _a.call(editor, value, oldValue)) || void 0 === _b || _b;
50684
+ isCanChange = !!isPromise(maybePromiseOrValue) || maybePromiseOrValue;
50685
+ }
50686
+ if (isCanChange) {
50687
+ const value = rowValues[j],
50688
+ recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
50689
+ {
50690
+ field: field
50691
+ } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
50692
+ beforeChangeValue = beforeChangeValues[i][j],
50693
+ oldValue = oldValues[i][j];
50694
+ 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), table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
50695
+ col: startCol + j,
50696
+ row: startRow + i,
50697
+ rawValue: beforeChangeValue,
50698
+ currentValue: oldValue,
50699
+ changedValue: table.getCellOriginValue(startCol + j, startRow + i)
50700
+ });
50701
+ }
50574
50702
  }
50575
50703
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
50576
50704
  }
@@ -51152,7 +51280,7 @@
51152
51280
  });
51153
51281
  }
51154
51282
  updatePagination(pagination) {
51155
- this.pagination && ("number" == typeof pagination.currentPage && pagination.currentPage >= 0 && (this.pagination.currentPage = pagination.currentPage), pagination.perPageCount && (this.pagination.perPageCount = pagination.perPageCount || this.pagination.perPageCount), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.clearCells(), this.dataSource.updatePagination(this.pagination), this.refreshRowColCount(), this.scenegraph.createSceneGraph(), this.renderAsync());
51283
+ this.pagination && ("number" == typeof pagination.currentPage && pagination.currentPage >= 0 && (this.pagination.currentPage = pagination.currentPage), pagination.perPageCount && (this.pagination.perPageCount = pagination.perPageCount || this.pagination.perPageCount), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.clearCells(), this.dataSource.updatePagination(this.pagination), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(), this.renderAsync());
51156
51284
  }
51157
51285
  refreshHeader() {
51158
51286
  var _a;
@@ -51267,6 +51395,7 @@
51267
51395
  }
51268
51396
  }
51269
51397
  _refreshHierarchyState(col, row) {
51398
+ var _a;
51270
51399
  let notFillWidth = !1,
51271
51400
  notFillHeight = !1;
51272
51401
  const checkHasChart = this.internalProps.layoutMap.checkHasChart();
@@ -51274,10 +51403,24 @@
51274
51403
  const index = this.getRecordShowIndexByCell(col, row),
51275
51404
  diffDataIndices = this.dataSource.toggleHierarchyState(index, this.scenegraph.proxy.rowStart - this.columnHeaderLevelCount, Math.max(this.scenegraph.proxy.rowEnd - this.columnHeaderLevelCount, this.scenegraph.proxy.rowStart - this.columnHeaderLevelCount + this.scenegraph.proxy.rowLimit - 1)),
51276
51405
  diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
51277
- this.refreshRowColCount(), this.clearCellStyleCache(), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, [{
51406
+ this.refreshRowColCount();
51407
+ for (let row = this.rowCount - this.bottomFrozenRowCount; row < this.rowCount; row++) {
51408
+ const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
51409
+ this._setRowHeight(row, newHeight);
51410
+ }
51411
+ this.clearCellStyleCache(), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1;
51412
+ const updateCells = [{
51278
51413
  col: col,
51279
51414
  row: row
51280
- }]), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
51415
+ }];
51416
+ if ((null === (_a = diffPositions.removeCellPositions) || void 0 === _a ? void 0 : _a.length) > 0 && diffPositions.removeCellPositions[diffPositions.removeCellPositions.length - 1].row >= this.scenegraph.proxy.rowEnd) {
51417
+ for (let i = 0; i <= diffPositions.removeCellPositions.length - 1; i++) diffPositions.removeCellPositions[i].row <= this.scenegraph.proxy.rowEnd && updateCells.push({
51418
+ col: diffPositions.removeCellPositions[i].col,
51419
+ row: diffPositions.removeCellPositions[i].row
51420
+ });
51421
+ diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
51422
+ }
51423
+ this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
51281
51424
  }
51282
51425
  _hasHierarchyTreeHeader() {
51283
51426
  var _a, _b;
@@ -51316,7 +51459,7 @@
51316
51459
  })), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
51317
51460
  }
51318
51461
  updateFilterRules(filterRules) {
51319
- this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.scenegraph.createSceneGraph();
51462
+ this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph();
51320
51463
  }
51321
51464
  getCheckboxState(field) {
51322
51465
  if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
@@ -52131,8 +52274,8 @@
52131
52274
  if (!this._emptyTipComponent) return;
52132
52275
  const leftHeaderWidth = this.table.transpose || !1 === this.table.options.indicatorsAsCol ? this.table.getFrozenColsWidth() : 0,
52133
52276
  topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol ? this.table.getFrozenRowsHeight() : 0,
52134
- width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth,
52135
- height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight;
52277
+ width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth - this.table.getTheme().scrollStyle.width,
52278
+ height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight - this.table.getTheme().scrollStyle.width;
52136
52279
  this._emptyTipComponent.setAttributes({
52137
52280
  spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
52138
52281
  x: this.table.tableX + leftHeaderWidth,
@@ -52157,8 +52300,8 @@
52157
52300
  var _a;
52158
52301
  const leftHeaderWidth = this.table.transpose || !1 === this.table.options.indicatorsAsCol ? this.table.getFrozenColsWidth() : 0,
52159
52302
  topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol ? this.table.getFrozenRowsHeight() : 0,
52160
- width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth,
52161
- height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight;
52303
+ width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth - this.table.getTheme().scrollStyle.width,
52304
+ height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight - this.table.getTheme().scrollStyle.width;
52162
52305
  return {
52163
52306
  spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
52164
52307
  x: this.table.tableX + leftHeaderWidth,
@@ -52866,7 +53009,7 @@
52866
53009
  if ("html" === (null === (_a = table.internalProps.menu) || void 0 === _a ? void 0 : _a.renderMode)) {
52867
53010
  const abstractPos = table._getMouseAbstractPoint(e.event, !1);
52868
53011
  let menu = null;
52869
- abstractPos.inTable && "function" == typeof (null === (_b = table.internalProps.menu) || void 0 === _b ? void 0 : _b.contextMenuItems) ? menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col) : abstractPos.inTable && Array.isArray(null === (_c = table.internalProps.menu) || void 0 === _c ? void 0 : _c.contextMenuItems) && (menu = null === (_d = table.internalProps.menu) || void 0 === _d ? void 0 : _d.contextMenuItems), this._bindToCell(e.col, e.row, "context-menu", {
53012
+ abstractPos.inTable && "function" == typeof (null === (_b = table.internalProps.menu) || void 0 === _b ? void 0 : _b.contextMenuItems) ? menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table) : abstractPos.inTable && Array.isArray(null === (_c = table.internalProps.menu) || void 0 === _c ? void 0 : _c.contextMenuItems) && (menu = null === (_d = table.internalProps.menu) || void 0 === _d ? void 0 : _d.contextMenuItems), this._bindToCell(e.col, e.row, "context-menu", {
52870
53013
  content: menu,
52871
53014
  position: {
52872
53015
  x: abstractPos.x,
@@ -52906,8 +53049,8 @@
52906
53049
  var _a, _b, _c, _d, _e;
52907
53050
  if (!this._titleComponent) return;
52908
53051
  const padding = getQuadProps(null !== (_a = this._titleOption.padding) && void 0 !== _a ? _a : 10),
52909
- realWidth = null !== (_b = this._titleOption.width) && void 0 !== _b ? _b : Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) - padding[1] - padding[3],
52910
- realHeight = null !== (_c = this._titleOption.height) && void 0 !== _c ? _c : Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height) - padding[0] - padding[2];
53052
+ realWidth = null !== (_b = this._titleOption.width) && void 0 !== _b ? _b : ("adaptive" === this.table.widthMode ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)) - padding[1] - padding[3],
53053
+ realHeight = null !== (_c = this._titleOption.height) && void 0 !== _c ? _c : ("adaptive" === this.table.heightMode ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height)) - padding[0] - padding[2];
52911
53054
  this._titleComponent.setAttributes({
52912
53055
  x: (null !== (_d = this._titleOption.x) && void 0 !== _d ? _d : "right" === this._titleOption.orient) ? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) : this.table.tableX,
52913
53056
  y: (null !== (_e = this._titleOption.y) && void 0 !== _e ? _e : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight : this.table.tableY,
@@ -56584,6 +56727,7 @@
56584
56727
  if (this.options.taskListTable?.theme) {
56585
56728
  listTable_options.theme = this.options.taskListTable?.theme;
56586
56729
  if (listTable_options.theme.bodyStyle && !isPropertyWritable(listTable_options.theme, 'bodyStyle')) {
56730
+ listTable_options.theme = (this.options.taskListTable?.theme).extends((this.options.taskListTable?.theme).getExtendTheme());
56587
56731
  const extendThemeOption = listTable_options.theme.getExtendTheme();
56588
56732
  listTable_options.theme.clearBodyStyleCache();
56589
56733
  if (!listTable_options.theme.headerStyle?.bgColor) {
@@ -57000,7 +57144,7 @@
57000
57144
  themes: themes$1
57001
57145
  });
57002
57146
 
57003
- const version = "1.10.2-alpha.0";
57147
+ const version = "1.10.2";
57004
57148
 
57005
57149
  exports.Gantt = Gantt;
57006
57150
  exports.TYPES = index$2;