@visactor/vtable-sheet 1.26.3 → 1.26.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -473,5 +473,4 @@ class WorkSheet {
473
473
  }
474
474
  }
475
475
 
476
- exports.WorkSheet = WorkSheet;
477
- //# sourceMappingURL=WorkSheet.js.map
476
+ exports.WorkSheet = WorkSheet;
@@ -72,4 +72,5 @@ class VTableSheetEventBus {
72
72
  }
73
73
  }
74
74
 
75
- exports.VTableSheetEventBus = VTableSheetEventBus;
75
+ exports.VTableSheetEventBus = VTableSheetEventBus;
76
+ //# sourceMappingURL=vtable-sheet-event-bus.js.map
package/cjs/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.26.3";
5
+ export declare const version = "1.26.2";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.26.3", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.26.2", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.26.3\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.26.2\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
@@ -43257,6 +43257,20 @@
43257
43257
  var _a, _b, _c;
43258
43258
  return null !== (_c = null === (_b = null === (_a = this.dataConfig) || void 0 === _a ? void 0 : _a.groupByRules) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0;
43259
43259
  }
43260
+ refreshRecords(records = [], dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
43261
+ var _a;
43262
+ this.clearCache(), this.beforeChangedRecordsMap.clear(), this.groupAggregator = null, this.addRecordRule = (null == dataConfig ? void 0 : dataConfig.addRecordRule) || "Object", this.dataConfig = dataConfig, this.columns = columns, this._isGrouped = isArray$8(null == dataConfig ? void 0 : dataConfig.groupByRules), this.rowHierarchyType = rowHierarchyType, this.dataSourceObj = {
43263
+ get: index => records[index],
43264
+ length: records.length,
43265
+ records: records
43266
+ }, this._source = this.processRecords(records), this.sourceLength = (null === (_a = this.source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap.clear(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
43267
+ totalCount: this.sourceLength,
43268
+ perPageCount: this.sourceLength,
43269
+ currentPage: 0
43270
+ }, this.hierarchyExpandLevel = hierarchyExpandLevel >= 1 ? hierarchyExpandLevel : 0, this.currentIndexedData = Array.from({
43271
+ length: this.sourceLength
43272
+ }, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this.sourceLength, this.pagination.totalCount = this.sourceLength), "tree" === rowHierarchyType && this.initTreeHierarchyState(), this.updatePagerData();
43273
+ }
43260
43274
  updateGroup() {
43261
43275
  var _a, _b, _c;
43262
43276
  this.clearCache();
@@ -43815,14 +43829,17 @@
43815
43829
  table.dataSource.hierarchyExpandLevel && table.refreshRowColCount(), table.render();
43816
43830
  })];
43817
43831
  }
43818
- function _setRecords(table, records = []) {
43832
+ function getListTableRowHierarchyType(table) {
43833
+ var _a, _b;
43819
43834
  const tableWithPlugins = table;
43835
+ let rowHierarchyType = table.internalProps.layoutMap.rowHierarchyType;
43836
+ return isArray$8(null === (_a = table.internalProps.dataConfig) || void 0 === _a ? void 0 : _a.groupByRules) && (rowHierarchyType = "tree"), (null === (_b = tableWithPlugins.pluginManager) || void 0 === _b ? void 0 : _b.getPluginByName("Master Detail Plugin")) && (rowHierarchyType = "grid"), rowHierarchyType;
43837
+ }
43838
+ function _setRecords(table, records = []) {
43820
43839
  _dealWithUpdateDataSource(table, () => {
43821
- var _a;
43822
43840
  table.internalProps.records = records;
43823
- let rowHierarchyType = table.internalProps.layoutMap.rowHierarchyType;
43824
- isArray$8(null === (_a = table.internalProps.dataConfig) || void 0 === _a ? void 0 : _a.groupByRules) && (rowHierarchyType = "tree"), tableWithPlugins.pluginManager.getPluginByName("Master Detail Plugin") && (rowHierarchyType = "grid");
43825
- const newDataSource = table.internalProps.dataSource = CachedDataSource.ofArray(records, table.internalProps.dataConfig, table.pagination, table.internalProps.columns, rowHierarchyType, getHierarchyExpandLevel(table));
43841
+ const rowHierarchyType = getListTableRowHierarchyType(table),
43842
+ newDataSource = table.internalProps.dataSource = CachedDataSource.ofArray(records, table.internalProps.dataConfig, table.pagination, table.internalProps.columns, rowHierarchyType, getHierarchyExpandLevel(table));
43826
43843
  table.addReleaseObj(newDataSource);
43827
43844
  });
43828
43845
  }
@@ -44612,7 +44629,7 @@
44612
44629
  col: null !== (_b = null == range ? void 0 : range.start.col) && void 0 !== _b ? _b : col,
44613
44630
  row: null !== (_c = null == range ? void 0 : range.start.row) && void 0 !== _c ? _c : row,
44614
44631
  dataValue: table.getCellOriginValue(col, row),
44615
- value: table.getCellValue(col, row),
44632
+ value: table.getCellValue(col, row) || "",
44616
44633
  rect: {
44617
44634
  left: 0,
44618
44635
  top: 0,
@@ -44634,7 +44651,7 @@
44634
44651
  col: col,
44635
44652
  row: row,
44636
44653
  dataValue: table.getCellOriginValue(col, row),
44637
- value: table.getCellValue(col, row),
44654
+ value: table.getCellValue(col, row) || "",
44638
44655
  rect: {
44639
44656
  left: 0,
44640
44657
  top: 0,
@@ -45198,7 +45215,7 @@
45198
45215
 
45199
45216
  function createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, lineClamp, cellWidth, cellHeight, textAlign, textBaseline, table, cellTheme, range) {
45200
45217
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45201
- let contentWidth,
45218
+ let contentWidth = 0,
45202
45219
  leftIconWidth = 0,
45203
45220
  rightIconWidth = 0,
45204
45221
  absoluteRightIconWidth = 0;
@@ -45278,8 +45295,8 @@
45278
45295
  }), contentRightIcons.forEach(icon => {
45279
45296
  const iconMark = dealWithIcon(icon, void 0, cellGroup.col, cellGroup.row, range, table, dealWithIconComputeVar);
45280
45297
  iconMark.role = "icon-content-right", iconMark.name = icon.name, cellContent.addRightOccupyingIcon(iconMark);
45281
- }), cellContent.addContent(textMark), cellGroup.appendChild(cellContent), cellContent.layout(), contentWidth = cellContent.AABBBounds.width(), cellContent.AABBBounds.height();
45282
- } else cellGroup.firstChild ? cellGroup.insertBefore(textMark, cellGroup.firstChild) : cellGroup.appendChild(textMark), contentWidth = textMark.AABBBounds.width(), textMark.AABBBounds.height();
45298
+ }), cellContent.addContent(textMark), cellGroup.appendChild(cellContent), cellContent.layout(), autoColWidth && (contentWidth = cellContent.AABBBounds.width());
45299
+ } else cellGroup.firstChild ? cellGroup.insertBefore(textMark, cellGroup.firstChild) : cellGroup.appendChild(textMark), autoColWidth && (contentWidth = textMark.AABBBounds.width());
45283
45300
  } else if (isValid$2(textStr)) {
45284
45301
  const {
45285
45302
  text: text,
@@ -45303,7 +45320,7 @@
45303
45320
  keepCenterInLine: !0
45304
45321
  },
45305
45322
  wrapText = new Text$1(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
45306
- wrapText.name = "text", wrapText.textBaseline = textBaseline, cellGroup.appendChild(wrapText), contentWidth = wrapText.AABBBounds.width(), wrapText.AABBBounds.height();
45323
+ wrapText.name = "text", wrapText.textBaseline = textBaseline, cellGroup.appendChild(wrapText), autoColWidth && (contentWidth = wrapText.AABBBounds.width());
45307
45324
  }
45308
45325
  const width = autoColWidth ? leftIconWidth + contentWidth + rightIconWidth : cellWidth - (padding[1] + padding[3]),
45309
45326
  height = cellHeight - (padding[0] + padding[2]);
@@ -45761,7 +45778,7 @@
45761
45778
  }
45762
45779
  }
45763
45780
 
45764
- function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
45781
+ function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, headerStyle) {
45765
45782
  var _a, _b;
45766
45783
  let cellGroup,
45767
45784
  isAsync = !1;
@@ -45796,7 +45813,7 @@
45796
45813
  customElementsGroup: customElementsGroup,
45797
45814
  renderDefault: renderDefault
45798
45815
  } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult);
45799
- cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync);
45816
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync, headerStyle);
45800
45817
  const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
45801
45818
  if (axisConfig) {
45802
45819
  const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_a = axisConfig.__vtableBodyChartCellPadding) && void 0 !== _a ? _a : padding, table);
@@ -45819,20 +45836,20 @@
45819
45836
  } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult),
45820
45837
  style = table._getCellStyle(col, row),
45821
45838
  dataValue = table.getCellOriginValue(col, row);
45822
- cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync);
45839
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync, headerStyle);
45823
45840
  const progressBarGroup = Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
45824
45841
  cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
45825
45842
  } else if ("sparkline" === type) {
45826
45843
  cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
45827
45844
  } else if ("checkbox" === type) {
45828
45845
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
45829
- cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
45846
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync, headerStyle);
45830
45847
  } else {
45831
45848
  cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
45832
45849
  }
45833
45850
  } else if ("radio" === type) {
45834
45851
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
45835
- cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
45852
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync, headerStyle);
45836
45853
  } else {
45837
45854
  cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
45838
45855
  }
@@ -46623,7 +46640,7 @@
46623
46640
  col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
46624
46641
  row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
46625
46642
  dataValue: table.getCellOriginValue(col, row),
46626
- value: table.getCellValue(col, row),
46643
+ value: table.getCellValue(col, row) || "",
46627
46644
  rect: getCellRect$1(col, row, table),
46628
46645
  table: table,
46629
46646
  originCol: col,
@@ -50804,7 +50821,7 @@
50804
50821
  col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
50805
50822
  row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
50806
50823
  dataValue: table.getCellOriginValue(col, row),
50807
- value: table.getCellValue(col, row),
50824
+ value: table.getCellValue(col, row) || "",
50808
50825
  rect: getCellRect(col, row, table),
50809
50826
  table: table,
50810
50827
  originCol: col,
@@ -51044,6 +51061,7 @@
51044
51061
  isMerge,
51045
51062
  customStyle,
51046
51063
  customResult,
51064
+ rawRecord,
51047
51065
  cellLocation = table.getCellLocation(col, row),
51048
51066
  value = table.getCellValue(col, row),
51049
51067
  cellWidth = colWidth,
@@ -51073,17 +51091,17 @@
51073
51091
  const isAggregation = "isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row),
51074
51092
  isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
51075
51093
  let mayHaveIcon = "body" !== cellLocation || ((null == define ? void 0 : define.dragOrder) || !!(null == define ? void 0 : define.icon) || !!(null == define ? void 0 : define.tree)) && !(isAggregation && isSeriesNumber);
51076
- 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)) {
51094
+ if (!range && (table.internalProps.enableTreeNodeMerge || "body" !== cellLocation || (null == define ? void 0 : define.mergeCell)) && (table.internalProps.enableTreeNodeMerge && "body" === cellLocation && !(null == define ? void 0 : define.mergeCell) ? (rawRecord = table.getCellRawRecord(col, row), (null == rawRecord ? void 0 : rawRecord.vtableMerge) && (range = table.getCellRange(col, row), isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row)) : (range = table.getCellRange(col, row), isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row), isMerge)) {
51077
51095
  const mergeSize = dealMerge(range, mergeMap, table, rowStart > range.start.row);
51078
51096
  cellWidth = mergeSize.cellWidth, cellHeight = mergeSize.cellHeight;
51079
51097
  }
51080
51098
  let isVtableMerge = !1;
51081
51099
  if (table.internalProps.enableTreeNodeMerge && isMerge) {
51082
- const rawRecord = table.getCellRawRecord(range.start.col, range.start.row),
51083
- {
51084
- vtableMergeName: vtableMergeName,
51085
- vtableMerge: vtableMerge
51086
- } = null != rawRecord ? rawRecord : {};
51100
+ rawRecord = null != rawRecord ? rawRecord : table.getCellRawRecord(range.start.col, range.start.row);
51101
+ const {
51102
+ vtableMergeName: vtableMergeName,
51103
+ vtableMerge: vtableMerge
51104
+ } = null != rawRecord ? rawRecord : {};
51087
51105
  isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
51088
51106
  }
51089
51107
  const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row);
@@ -51113,7 +51131,7 @@
51113
51131
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
51114
51132
  cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
51115
51133
  cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), cellTheme.group.width = colWidth, cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight, cellTheme._vtable.padding && (padding = cellTheme._vtable.padding), cellTheme.text.textAlign && (textAlign = cellTheme.text.textAlign), cellTheme.text.textBaseline && (textBaseline = cellTheme.text.textBaseline), "body" === cellLocation || cellTheme.group.fill || (cellTheme.group.fill = "#fff");
51116
- const cellGroup = createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
51134
+ const cellGroup = createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellStyle);
51117
51135
  if (columnGroup.updateColumnRowNumber(row), isMerge) {
51118
51136
  const rangeHeight = table.getRowHeight(row),
51119
51137
  {
@@ -51155,7 +51173,7 @@
51155
51173
  } = createCellArgs,
51156
51174
  cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
51157
51175
  cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
51158
- cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), cellTheme.group.width = colWidth, cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight, cellTheme._vtable.padding && (padding = cellTheme._vtable.padding), cellTheme.text.textAlign && (textAlign = cellTheme.text.textAlign), cellTheme.text.textBaseline && (textBaseline = cellTheme.text.textBaseline), "body" === cellLocation || cellTheme.group.fill || (cellTheme.group.fill = "#fff"), createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
51176
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), cellTheme.group.width = colWidth, cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight, cellTheme._vtable.padding && (padding = cellTheme._vtable.padding), cellTheme.text.textAlign && (textAlign = cellTheme.text.textAlign), cellTheme.text.textBaseline && (textBaseline = cellTheme.text.textBaseline), "body" === cellLocation || cellTheme.group.fill || (cellTheme.group.fill = "#fff"), createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellStyle);
51159
51177
  }
51160
51178
  function dealMerge(range, mergeMap, table, forceUpdate) {
51161
51179
  let cellWidth = 0,
@@ -54605,16 +54623,28 @@
54605
54623
  updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX), updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
54606
54624
  }
54607
54625
  updateContainerAttrHeightAndY() {
54608
- var _a, _b, _c;
54609
- for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
54610
- for (let i = 0; i < this.colHeaderGroup.children.length; i++) updateContainerChildrenY(this.colHeaderGroup.children[i], 0);
54611
- for (let i = 0; i < this.rightTopCornerGroup.children.length; i++) updateContainerChildrenY(this.rightTopCornerGroup.children[i], 0);
54612
- for (let i = 0; i < this.rowHeaderGroup.children.length; i++) this.rowHeaderGroup.children[i].firstChild && updateContainerChildrenY(this.rowHeaderGroup.children[i], this.rowHeaderGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, this.rowHeaderGroup.children[i].firstChild.row - 1) : 0);
54613
- for (let i = 0; i < this.bodyGroup.children.length; i++) this.bodyGroup.children[i].firstChild && updateContainerChildrenY(this.bodyGroup.children[i], this.bodyGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_b = this.table.frozenRowCount) && void 0 !== _b ? _b : 0, this.bodyGroup.children[i].firstChild.row - 1) : 0);
54614
- for (let i = 0; i < this.rightFrozenGroup.children.length; i++) this.rightFrozenGroup.children[i].firstChild && updateContainerChildrenY(this.rightFrozenGroup.children[i], this.rightFrozenGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_c = this.table.frozenRowCount) && void 0 !== _c ? _c : 0, this.rightFrozenGroup.children[i].firstChild.row - 1) : 0);
54615
- for (let i = 0; i < this.leftBottomCornerGroup.children.length; i++) updateContainerChildrenY(this.leftBottomCornerGroup.children[i], 0);
54616
- for (let i = 0; i < this.bottomFrozenGroup.children.length; i++) updateContainerChildrenY(this.bottomFrozenGroup.children[i], 0);
54617
- for (let i = 0; i < this.rightBottomCornerGroup.children.length; i++) updateContainerChildrenY(this.rightBottomCornerGroup.children[i], 0);
54626
+ this.cornerHeaderGroup.forEachChildrenSkipChild(column => {
54627
+ updateContainerChildrenY(column, 0);
54628
+ }), this.colHeaderGroup.forEachChildrenSkipChild(column => {
54629
+ updateContainerChildrenY(column, 0);
54630
+ }), this.rightTopCornerGroup.forEachChildrenSkipChild(column => {
54631
+ updateContainerChildrenY(column, 0);
54632
+ }), this.rowHeaderGroup.forEachChildrenSkipChild(column => {
54633
+ var _a;
54634
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
54635
+ }), this.bodyGroup.forEachChildrenSkipChild(column => {
54636
+ var _a;
54637
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
54638
+ }), this.rightFrozenGroup.forEachChildrenSkipChild(column => {
54639
+ var _a;
54640
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
54641
+ }), this.leftBottomCornerGroup.forEachChildrenSkipChild(column => {
54642
+ updateContainerChildrenY(column, 0);
54643
+ }), this.bottomFrozenGroup.forEachChildrenSkipChild(column => {
54644
+ updateContainerChildrenY(column, 0);
54645
+ }), this.rightBottomCornerGroup.forEachChildrenSkipChild(column => {
54646
+ updateContainerChildrenY(column, 0);
54647
+ });
54618
54648
  }
54619
54649
  updateContainer(updateConfig = {
54620
54650
  async: !1,
@@ -57561,73 +57591,70 @@
57561
57591
  });
57562
57592
  }), table.scenegraph.tableGroup.addEventListener("pointerup", e => {
57563
57593
  var _a, _b, _c, _d, _e, _f, _g, _h;
57564
- if (0 !== e.button) return;
57565
- const endedResizeCol = stateManager.isResizeCol(),
57566
- endedResizeRow = stateManager.isResizeRow(),
57567
- endedMoveCol = stateManager.isMoveCol(),
57568
- shouldSkipClickCell = endedResizeCol || endedResizeRow;
57569
- if ("grabing" === stateManager.interactionState) {
57570
- if (stateManager.updateInteractionState(InteractionState.default), endedResizeCol) endResizeCol(table);else if (endedResizeRow) endResizeRow(table);else if (endedMoveCol) {
57571
- const endMoveColSuccess = table.stateManager.endMoveCol();
57572
- fireMoveColEventListeners(table, endMoveColSuccess, e.nativeEvent);
57573
- } else if (stateManager.isSelecting()) {
57574
- table.stateManager.endSelectCells(), table.stateManager.isFillHandle() && table.stateManager.endFillSelect();
57594
+ if (0 === e.button) {
57595
+ if ("grabing" === stateManager.interactionState) {
57596
+ if (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol()) endResizeCol(table);else if (stateManager.isResizeRow()) endResizeRow(table);else if (stateManager.isMoveCol()) {
57597
+ const endMoveColSuccess = table.stateManager.endMoveCol();
57598
+ fireMoveColEventListeners(table, endMoveColSuccess, e.nativeEvent);
57599
+ } else if (stateManager.isSelecting()) {
57600
+ table.stateManager.endSelectCells(), table.stateManager.isFillHandle() && table.stateManager.endFillSelect();
57601
+ const eventArgsSet = getEventArgsSet(e);
57602
+ if (table.eventManager.isDraging && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
57603
+ const cellsEvent = {
57604
+ event: e.nativeEvent,
57605
+ cells: [],
57606
+ col: eventArgsSet.eventArgs.target.col,
57607
+ row: eventArgsSet.eventArgs.target.row,
57608
+ scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
57609
+ target: null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target,
57610
+ mergeCellInfo: null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.mergeInfo
57611
+ };
57612
+ cellsEvent.cells = table.getSelectedCellInfos(), table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
57613
+ }
57614
+ }
57615
+ } else stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57616
+ if (!table.eventManager.isDraging) {
57575
57617
  const eventArgsSet = getEventArgsSet(e);
57576
- if (table.eventManager.isDraging && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
57577
- const cellsEvent = {
57618
+ if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
57619
+ const {
57620
+ col: col,
57621
+ row: row
57622
+ } = eventArgsSet.eventArgs,
57623
+ cellInfo = table.getCellInfo(col, row);
57624
+ let icon, position;
57625
+ if (null === (_c = eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target) {
57626
+ const iconInfo = getIconAndPositionFromTarget(null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target);
57627
+ iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
57628
+ }
57629
+ const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
57578
57630
  event: e.nativeEvent,
57631
+ federatedEvent: e,
57579
57632
  cells: [],
57580
- col: eventArgsSet.eventArgs.target.col,
57581
- row: eventArgsSet.eventArgs.target.row,
57582
- scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
57583
- target: null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target,
57584
- mergeCellInfo: null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.mergeInfo
57585
- };
57586
- cellsEvent.cells = table.getSelectedCellInfos(), table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
57633
+ targetIcon: icon ? {
57634
+ name: icon.name,
57635
+ position: position,
57636
+ funcType: icon.attribute.funcType
57637
+ } : void 0,
57638
+ target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
57639
+ mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
57640
+ });
57641
+ table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
57587
57642
  }
57588
57643
  }
57589
- } else stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
57590
- if (!table.eventManager.isDraging && !shouldSkipClickCell) {
57591
- const eventArgsSet = getEventArgsSet(e);
57592
- if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
57593
- const {
57594
- col: col,
57595
- row: row
57596
- } = eventArgsSet.eventArgs,
57597
- cellInfo = table.getCellInfo(col, row);
57598
- let icon, position;
57599
- if (null === (_c = eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target) {
57600
- const iconInfo = getIconAndPositionFromTarget(null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target);
57601
- iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
57602
- }
57603
- const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
57644
+ if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
57645
+ const eventArgsSet = getEventArgsSet(e);
57646
+ eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
57647
+ col: eventArgsSet.eventArgs.col,
57648
+ row: eventArgsSet.eventArgs.row,
57604
57649
  event: e.nativeEvent,
57605
- federatedEvent: e,
57606
- cells: [],
57607
- targetIcon: icon ? {
57608
- name: icon.name,
57609
- position: position,
57610
- funcType: icon.attribute.funcType
57611
- } : void 0,
57612
- target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
57613
- mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
57650
+ target: null === (_g = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _g ? void 0 : _g.target,
57651
+ mergeCellInfo: null === (_h = eventArgsSet.eventArgs) || void 0 === _h ? void 0 : _h.mergeInfo
57614
57652
  });
57615
- table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
57616
57653
  }
57654
+ setTimeout(() => {
57655
+ eventManager.isDown = !1, eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
57656
+ }, 0);
57617
57657
  }
57618
- if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
57619
- const eventArgsSet = getEventArgsSet(e);
57620
- eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
57621
- col: eventArgsSet.eventArgs.col,
57622
- row: eventArgsSet.eventArgs.row,
57623
- event: e.nativeEvent,
57624
- target: null === (_g = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _g ? void 0 : _g.target,
57625
- mergeCellInfo: null === (_h = eventArgsSet.eventArgs) || void 0 === _h ? void 0 : _h.mergeInfo
57626
- });
57627
- }
57628
- setTimeout(() => {
57629
- eventManager.isDown = !1, eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
57630
- }, 0);
57631
57658
  }), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
57632
57659
  var _a, _b, _c, _d, _e, _f, _g, _h;
57633
57660
  const eventArgsSet = getEventArgsSet(e);
@@ -61445,7 +61472,7 @@
61445
61472
  }
61446
61473
  constructor(container, options = {}) {
61447
61474
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
61448
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61475
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61449
61476
  const g = window;
61450
61477
  g[this.id] = this;
61451
61478
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -62504,7 +62531,7 @@
62504
62531
  const internalProps = this.internalProps;
62505
62532
  if ("node" === Env$1.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.groupTitleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, (null == updateConfig ? void 0 : updateConfig.clearColWidthCache) && (internalProps._widthResizedColMap.clear(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}), (null == updateConfig ? void 0 : updateConfig.clearRowHeightCache) && (internalProps._heightResizedRowMap.clear(), internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map()), internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
62506
62533
  null == legend || legend.release();
62507
- }), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
62534
+ }), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), (null == updateConfig ? void 0 : updateConfig.skipClearCells) || this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
62508
62535
  internalProps.legends = [];
62509
62536
  const createLegend = Factory.getFunction("createLegend");
62510
62537
  if (Array.isArray(options.legends)) {
@@ -66566,14 +66593,19 @@
66566
66593
  clearRowHeightCache: !0
66567
66594
  }) {
66568
66595
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
66569
- const internalProps = this.internalProps;
66570
- if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
66596
+ const internalProps = this.internalProps,
66597
+ prevSortState = internalProps.sortState,
66598
+ hasActiveSortState = (Array.isArray(options.sortState) ? options.sortState : options.sortState ? [options.sortState] : []).some(item => (null == item ? void 0 : item.field) && (null == item ? void 0 : item.order) && "normal" !== item.order),
66599
+ shouldSkipInitialClearCells = Boolean(options.records) || !!options.dataSource && this.dataSource !== options.dataSource;
66600
+ if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, Object.assign(Object.assign({}, updateConfig), {
66601
+ skipClearCells: shouldSkipInitialClearCells
66602
+ })), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
66571
66603
  addRecordRule: options.addRecordRule
66572
66604
  }, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$2(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
66573
66605
  const releaseObj = internalProps.releaseList[i];
66574
66606
  releaseObj instanceof DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
66575
66607
  }
66576
- if (options.dataSource && this.dataSource !== options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
66608
+ if (options.dataSource && this.dataSource !== options.dataSource ? this.dataSource = options.dataSource : options.records && options.records === internalProps.records && options.sortState === prevSortState && !hasActiveSortState && this.dataSource instanceof CachedDataSource ? this._refreshCurrentRecordsForOptionUpdate(options.records) : options.records ? this.setRecords(options.records, {
66577
66609
  sortState: options.sortState
66578
66610
  }) : (this.refreshRowColCount(), this._resetFrozenColCount(), this.scenegraph.createSceneGraph(), this.render()), options.title) {
66579
66611
  const Title = Factory.getComponent("title");
@@ -66589,6 +66621,22 @@
66589
66621
  setTimeout(resolve, 0);
66590
66622
  });
66591
66623
  }
66624
+ _refreshCurrentRecordsForOptionUpdate(records) {
66625
+ var _a;
66626
+ const dataSource = this.dataSource;
66627
+ this.stateManager.endResizeIfResizing(), clearChartRenderQueue();
66628
+ const oldHoverState = {
66629
+ col: this.stateManager.hover.cellPos.col,
66630
+ row: this.stateManager.hover.cellPos.row
66631
+ };
66632
+ this.scenegraph.clearCells(), this.internalProps.records = records, dataSource.refreshRecords(records, this.internalProps.dataConfig, this.pagination, this.internalProps.columns, getListTableRowHierarchyType(this), getHierarchyExpandLevel(this)), this.refreshRowColCount(), this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize();
66633
+ (null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : ["legend", "title"]).forEach(component => {
66634
+ var _a, _b;
66635
+ "legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
66636
+ null == legend || legend.resize();
66637
+ }) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
66638
+ }), this.scenegraph.resize(), this.render();
66639
+ }
66592
66640
  updatePagination(pagination) {
66593
66641
  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());
66594
66642
  }
@@ -70494,10 +70542,10 @@
70494
70542
  }
70495
70543
  }
70496
70544
 
70497
- function createCellGroup(table, value, columnGroup, xOrigin, yOrigin, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync) {
70545
+ function createCellGroup(table, value, columnGroup, xOrigin, yOrigin, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync, headerStyle) {
70498
70546
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
70499
- const headerStyle = table._getCellStyle(col, row),
70500
- functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
70547
+ headerStyle = headerStyle || table._getCellStyle(col, row);
70548
+ const functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
70501
70549
  isValid$2(functionalPadding) && (padding = functionalPadding), (null === (_a = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _a ? void 0 : _a.textAlign) && (textAlign = null === (_b = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _b ? void 0 : _b.textAlign), (null === (_c = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _c ? void 0 : _c.textBaseline) && (textBaseline = null === (_d = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _d ? void 0 : _d.textBaseline);
70502
70550
  const autoRowHeight = table.isAutoRowHeight(row),
70503
70551
  autoColWidth = "auto" === colWidth,
@@ -96229,7 +96277,7 @@
96229
96277
  importStyle();
96230
96278
  }
96231
96279
 
96232
- const version = "1.26.3";
96280
+ const version = "1.26.2";
96233
96281
  importStyles();
96234
96282
 
96235
96283
  exports.TYPES = index;