@visactor/vtable-calendar 1.15.1-alpha.1 → 1.15.1

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.
@@ -29286,7 +29286,7 @@
29286
29286
  }
29287
29287
  constructor(dataSourceObj, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
29288
29288
  var _a;
29289
- super(), this.currentIndexedData = [], this.hierarchyExpandLevel = 0, this.hasHierarchyStateExpand = !1, this.beforeChangedRecordsMap = {}, this.registedAggregators = {}, this.fieldAggregators = [], this.registerAggregators(), this.dataSourceObj = dataSourceObj, this.dataConfig = dataConfig, this._get = null == dataSourceObj ? void 0 : dataSourceObj.get, this.columns = columns, this._source = (null == dataSourceObj ? void 0 : dataSourceObj.records) ? this.processRecords(null == dataSourceObj ? void 0 : dataSourceObj.records) : dataSourceObj, this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap = new Map(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
29289
+ super(), this.currentIndexedData = [], this.hierarchyExpandLevel = 0, this.hasHierarchyStateExpand = !1, this.beforeChangedRecordsMap = new Map(), this.registedAggregators = {}, this.fieldAggregators = [], this.registerAggregators(), this.dataSourceObj = dataSourceObj, this.dataConfig = dataConfig, this._get = null == dataSourceObj ? void 0 : dataSourceObj.get, this.columns = columns, this._source = (null == dataSourceObj ? void 0 : dataSourceObj.records) ? this.processRecords(null == dataSourceObj ? void 0 : dataSourceObj.records) : dataSourceObj, this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap = new Map(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
29290
29290
  totalCount: this._sourceLength,
29291
29291
  perPageCount: this._sourceLength,
29292
29292
  currentPage: 0
@@ -29311,6 +29311,16 @@
29311
29311
  } else !0 === nodeData.children && !nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.collapse);
29312
29312
  }
29313
29313
  }
29314
+ supplementConfig(pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
29315
+ var _a;
29316
+ this.columns = columns, this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap = new Map(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
29317
+ totalCount: this._sourceLength,
29318
+ perPageCount: this._sourceLength,
29319
+ currentPage: 0
29320
+ }, hierarchyExpandLevel >= 1 && (this.hierarchyExpandLevel = hierarchyExpandLevel), this.currentIndexedData = Array.from({
29321
+ length: this._sourceLength
29322
+ }, (_, i) => i), "tree" === rowHierarchyType && this.initTreeHierarchyState(), this.rowHierarchyType = rowHierarchyType, this.updatePagerData();
29323
+ }
29314
29324
  registerAggregator(type, aggregator) {
29315
29325
  this.registedAggregators[type] = aggregator;
29316
29326
  }
@@ -29411,6 +29421,9 @@
29411
29421
  for (let i = 0; i < currentIndexedData.length; i++) if ((Array.isArray(currentIndexedData[i]) && 1 === currentIndexedData[i].length || !Array.isArray(currentIndexedData[i])) && firstLevelIndex++, firstLevelIndex >= startIndex && firstLevelIndex < endIndex) this._currentPagerIndexedData.push(currentIndexedData[i]);else if (firstLevelIndex >= endIndex) break;
29412
29422
  } else if (this._sourceLength > 0) throw new Error("currentIndexedData should has values!");
29413
29423
  }
29424
+ getRecordIndexPaths(bodyShowIndex) {
29425
+ return this._currentPagerIndexedData[bodyShowIndex];
29426
+ }
29414
29427
  get records() {
29415
29428
  return Array.isArray(this._source) ? this._source : [];
29416
29429
  }
@@ -29441,7 +29454,11 @@
29441
29454
  getHierarchyState(index) {
29442
29455
  var _a;
29443
29456
  const record = this.getOriginalRecord(this.currentPagerIndexedData[index]);
29444
- return null !== (_a = null == record ? void 0 : record.hierarchyState) && void 0 !== _a ? _a : null;
29457
+ if (null == record ? void 0 : record.hierarchyState) {
29458
+ const hierarchyState = record.hierarchyState;
29459
+ if ((null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) > 0 || !0 === record.children) return hierarchyState;
29460
+ }
29461
+ return null;
29445
29462
  }
29446
29463
  toggleHierarchyState(index, bodyStartIndex, bodyEndIndex) {
29447
29464
  const oldIndexedData = this.currentIndexedData.slice(0),
@@ -29504,12 +29521,8 @@
29504
29521
  var _a;
29505
29522
  if (null !== field && index >= 0) {
29506
29523
  const dataIndex = this.getIndexKey(index);
29507
- if (!this.beforeChangedRecordsMap[dataIndex]) {
29508
- const originRecord = this.getOriginalRecord(dataIndex);
29509
- this.beforeChangedRecordsMap[dataIndex] = null !== (_a = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {};
29510
- }
29511
- if ("string" == typeof field || "number" == typeof field) {
29512
- const beforeChangedValue = this.beforeChangedRecordsMap[dataIndex][field],
29524
+ if (this.cacheBeforeChangedRecord(dataIndex, table), "string" == typeof field || "number" == typeof field) {
29525
+ const beforeChangedValue = null === (_a = this.beforeChangedRecordsMap.get(dataIndex.toString())) || void 0 === _a ? void 0 : _a[field],
29513
29526
  record = this.getOriginalRecord(dataIndex);
29514
29527
  let formatValue = value;
29515
29528
  "number" == typeof beforeChangedValue && isAllDigits(value) && (formatValue = parseFloat(value)), isPromise(record) ? record.then(record => {
@@ -29518,6 +29531,13 @@
29518
29531
  }
29519
29532
  }
29520
29533
  }
29534
+ cacheBeforeChangedRecord(dataIndex, table) {
29535
+ var _a;
29536
+ if (!this.beforeChangedRecordsMap.has(dataIndex.toString())) {
29537
+ const originRecord = this.getOriginalRecord(dataIndex);
29538
+ this.beforeChangedRecordsMap.set(dataIndex.toString(), null !== (_a = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {});
29539
+ }
29540
+ }
29521
29541
  setRecord(record, index) {
29522
29542
  var _a, _b;
29523
29543
  let isAdd = !0;
@@ -29563,11 +29583,11 @@
29563
29583
  }
29564
29584
  }
29565
29585
  addRecordForSorted(record) {
29566
- Array.isArray(this.records) && (this.beforeChangedRecordsMap = [], this.records.push(record), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1, this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength));
29586
+ Array.isArray(this.records) && (this.beforeChangedRecordsMap.clear(), this.records.push(record), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1, this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength));
29567
29587
  }
29568
29588
  addRecordsForSorted(recordArr) {
29569
29589
  if (Array.isArray(this.records)) {
29570
- if (this.beforeChangedRecordsMap = [], Array.isArray(recordArr)) {
29590
+ if (this.beforeChangedRecordsMap.clear(), Array.isArray(recordArr)) {
29571
29591
  this.records.push(...recordArr);
29572
29592
  for (let i = 0; i < recordArr.length; i++) this.currentIndexedData.push(this.currentIndexedData.length);
29573
29593
  this._sourceLength += recordArr.length, this.sortedIndexMap.clear();
@@ -29576,9 +29596,10 @@
29576
29596
  }
29577
29597
  }
29578
29598
  adjustBeforeChangedRecordsMap(insertIndex, insertCount) {
29579
- for (let key = this.beforeChangedRecordsMap.length - 1; key >= insertIndex; key--) {
29580
- const record = this.beforeChangedRecordsMap[key];
29581
- delete this.beforeChangedRecordsMap[key], this.beforeChangedRecordsMap[key + insertCount] = record;
29599
+ let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "add";
29600
+ for (let key = this.beforeChangedRecordsMap.size - 1; key >= insertIndex; key--) {
29601
+ const record = this.beforeChangedRecordsMap.get(key.toString());
29602
+ this.beforeChangedRecordsMap.delete(key.toString()), this.beforeChangedRecordsMap.set((key + ("add" === type ? insertCount : -insertCount)).toString(), record);
29582
29603
  }
29583
29604
  }
29584
29605
  deleteRecords(recordIndexs) {
@@ -29589,7 +29610,7 @@
29589
29610
  for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
29590
29611
  const recordIndex = recordIndexsMaxToMin[index];
29591
29612
  if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
29592
- delete this.beforeChangedRecordsMap[recordIndex], realDeletedRecordIndexs.push(recordIndex);
29613
+ this.adjustBeforeChangedRecordsMap(recordIndex, 1, "delete"), realDeletedRecordIndexs.push(recordIndex);
29593
29614
  const deletedRecord = this.records[recordIndex];
29594
29615
  for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].deleteRecord(deletedRecord);
29595
29616
  this.records.splice(recordIndex, 1), this.currentIndexedData.pop(), this._sourceLength -= 1;
@@ -29605,18 +29626,18 @@
29605
29626
  const recordIndex = recordIndexsMaxToMin[index];
29606
29627
  if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
29607
29628
  const rawIndex = this.currentIndexedData[recordIndex];
29608
- delete this.beforeChangedRecordsMap[rawIndex], this.records.splice(rawIndex, 1), this._sourceLength -= 1;
29629
+ this.records.splice(rawIndex, 1), this._sourceLength -= 1;
29609
29630
  }
29610
- this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
29631
+ this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength), this.beforeChangedRecordsMap.clear();
29611
29632
  }
29612
29633
  }
29613
29634
  updateRecords(records, recordIndexs) {
29614
29635
  const realDeletedRecordIndexs = [];
29615
29636
  for (let index = 0; index < recordIndexs.length; index++) {
29616
29637
  const recordIndex = recordIndexs[index];
29617
- if (Array.isArray(recordIndex)) delete this.beforeChangedRecordsMap[recordIndex.join(",")], realDeletedRecordIndexs.push(recordIndex), recordIndex.slice(0, -1).reduce((acc, key) => (void 0 === acc[key] && (acc[key] = {}), acc[key].children), this.records)[recordIndex[recordIndex.length - 1]] = records[index];else {
29638
+ if (Array.isArray(recordIndex)) this.beforeChangedRecordsMap.delete(recordIndex.toString()), realDeletedRecordIndexs.push(recordIndex), recordIndex.slice(0, -1).reduce((acc, key) => (void 0 === acc[key] && (acc[key] = {}), acc[key].children), this.records)[recordIndex[recordIndex.length - 1]] = records[index];else {
29618
29639
  if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
29619
- delete this.beforeChangedRecordsMap[recordIndex], realDeletedRecordIndexs.push(recordIndex);
29640
+ this.beforeChangedRecordsMap.delete(recordIndex.toString()), realDeletedRecordIndexs.push(recordIndex);
29620
29641
  for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
29621
29642
  this.records[recordIndex] = records[index];
29622
29643
  }
@@ -29629,7 +29650,7 @@
29629
29650
  if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
29630
29651
  const rawIndex = this.currentIndexedData[recordIndex];
29631
29652
  if ("number" != typeof rawIndex) return;
29632
- delete this.beforeChangedRecordsMap[rawIndex], this.records[rawIndex] = records[index];
29653
+ this.beforeChangedRecordsMap.delete(rawIndex.toString()), this.records[rawIndex] = records[index];
29633
29654
  }
29634
29655
  this.sortedIndexMap.clear();
29635
29656
  }
@@ -29681,7 +29702,7 @@
29681
29702
  clearFilteredChildren(record) {
29682
29703
  var _a, _b;
29683
29704
  record.filteredChildren = void 0;
29684
- for (let i = 0; null !== (_b = i < (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length)) && void 0 !== _b && _b; i++) this.clearFilteredChildren(record.children[i]);
29705
+ for (let i = 0; i < (null !== (_b = null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0); i++) this.clearFilteredChildren(record.children[i]);
29685
29706
  }
29686
29707
  filterRecord(record) {
29687
29708
  var _a, _b, _c;
@@ -29754,8 +29775,8 @@
29754
29775
  });
29755
29776
  }
29756
29777
  getRawRecord(dataIndex) {
29757
- var _a;
29758
- if (null === (_a = this.beforeChangedRecordsMap) || void 0 === _a ? void 0 : _a[dataIndex]) return this.beforeChangedRecordsMap[dataIndex];
29778
+ var _a, _b;
29779
+ if (null === (_a = this.beforeChangedRecordsMap) || void 0 === _a ? void 0 : _a.has(dataIndex.toString())) return null === (_b = this.beforeChangedRecordsMap) || void 0 === _b ? void 0 : _b.get(dataIndex.toString());
29759
29780
  let data;
29760
29781
  return data = this.dataSourceObj.records ? Array.isArray(dataIndex) ? getValueFromDeepArray(this.records, dataIndex) : this.records[dataIndex] : this._get(dataIndex), getValue$2(data, val => {
29761
29782
  this.recordPromiseCallBack(dataIndex, val);
@@ -29781,7 +29802,9 @@
29781
29802
  }
29782
29803
  fieldPromiseCallBack(_index, _field, _value) {}
29783
29804
  recordPromiseCallBack(_index, _record) {}
29784
- isCanExchangeOrder(sourceIndex, targetIndex) {
29805
+ canChangeOrder(sourceIndex, targetIndex) {
29806
+ var _a;
29807
+ if (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.canChangeOrder) return this.dataSourceObj.canChangeOrder(sourceIndex, targetIndex);
29785
29808
  if (this.hasHierarchyStateExpand) {
29786
29809
  let sourceIndexs = this.currentPagerIndexedData[sourceIndex],
29787
29810
  targetIndexs = this.currentPagerIndexedData[targetIndex];
@@ -29797,9 +29820,9 @@
29797
29820
  }
29798
29821
  return !0;
29799
29822
  }
29800
- reorderRecord(sourceIndex, targetIndex) {
29801
- var _a, _b;
29802
- if (!(null === (_a = this.lastSortStates) || void 0 === _a ? void 0 : _a.some(state => "asc" === state.order || "desc" === state.order)) && this.isCanExchangeOrder(sourceIndex, targetIndex)) if (this.hasHierarchyStateExpand) {
29823
+ changeOrder(sourceIndex, targetIndex) {
29824
+ var _a, _b, _c;
29825
+ if (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.changeOrder) this.dataSourceObj.changeOrder(sourceIndex, targetIndex);else if (!(null === (_b = this.lastSortStates) || void 0 === _b ? void 0 : _b.some(state => "asc" === state.order || "desc" === state.order)) && this.canChangeOrder(sourceIndex, targetIndex)) if (this.hasHierarchyStateExpand) {
29803
29826
  let sourceI,
29804
29827
  targetI,
29805
29828
  sourceIndexs = this.currentPagerIndexedData[sourceIndex],
@@ -29812,7 +29835,7 @@
29812
29835
  if (sourceI = sourceIndexs.splice(sourceIndexs.length - 1, 1)[0], targetI = targetIndexs.splice(targetIndexs.length - 1, 1)[0], sourceIndexs.length >= 1) {
29813
29836
  const parent = this.getOriginalRecord(sourceIndexs),
29814
29837
  sourceIds = parent.filteredChildren ? parent.filteredChildren.splice(sourceI, 1) : parent.children.splice(sourceI, 1);
29815
- sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(null !== (_b = parent.filteredChildren) && void 0 !== _b ? _b : parent.children, sourceIds);
29838
+ sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(null !== (_c = parent.filteredChildren) && void 0 !== _c ? _c : parent.children, sourceIds);
29816
29839
  } else {
29817
29840
  const sourceIds = this.records.splice(sourceI, 1);
29818
29841
  sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(this.records, sourceIds);
@@ -29865,6 +29888,10 @@
29865
29888
  return childTotalLength;
29866
29889
  }
29867
29890
  }
29891
+ DataSource.EMPTY = new DataSource({
29892
+ get() {},
29893
+ length: 0
29894
+ });
29868
29895
  function getValueFromDeepArray(array, index) {
29869
29896
  var _a;
29870
29897
  let result = array;
@@ -29877,10 +29904,19 @@
29877
29904
  }
29878
29905
  return result;
29879
29906
  }
29880
- DataSource.EMPTY = new DataSource({
29881
- get() {},
29882
- length: 0
29883
- });
29907
+ function sortRecordIndexs(recordIndexs, sort) {
29908
+ return recordIndexs.sort((a, b) => {
29909
+ var _a, _b;
29910
+ isNumber$4(a) && (a = [a]), isNumber$4(b) && (b = [b]);
29911
+ const length = Math.max(a.length, b.length);
29912
+ for (let i = 0; i < length; i++) {
29913
+ const aa = null !== (_a = a[i]) && void 0 !== _a ? _a : -1,
29914
+ bb = null !== (_b = b[i]) && void 0 !== _b ? _b : -1;
29915
+ if (aa !== bb) return 1 === sort ? aa - bb : bb - aa;
29916
+ }
29917
+ return 0;
29918
+ });
29919
+ }
29884
29920
 
29885
29921
  /**
29886
29922
  * Checks if `value` is classified as an `Array` object.
@@ -31118,14 +31154,21 @@
31118
31154
  }, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel);
31119
31155
  }
31120
31156
  constructor(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
31121
- isArray$7(null == dataConfig ? void 0 : dataConfig.groupByRules) && (rowHierarchyType = "tree"), super(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel), this._recordCache = [], this._fieldCache = {};
31157
+ let _isGrouped;
31158
+ isArray$7(null == dataConfig ? void 0 : dataConfig.groupByRules) && (rowHierarchyType = "tree", _isGrouped = !0), super(opt, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel), this._isGrouped = _isGrouped, this._recordCache = [], this._fieldCache = {};
31122
31159
  }
31123
31160
  getOriginalRecord(index) {
31124
- return this._recordCache && this._recordCache[index] ? this._recordCache[index] : super.getOriginalRecord(index);
31161
+ return isNumber$4(index) && this._recordCache && this._recordCache[index] ? this._recordCache[index] : super.getOriginalRecord(index);
31125
31162
  }
31126
31163
  getRawRecord(index) {
31127
- var _a;
31128
- return (null === (_a = this.beforeChangedRecordsMap) || void 0 === _a ? void 0 : _a[index]) ? this.beforeChangedRecordsMap[index] : this._recordCache && this._recordCache[index] ? this._recordCache[index] : super.getRawRecord(index);
31164
+ var _a, _b, _c, _d;
31165
+ let originRecordIndex, data;
31166
+ if (this._isGrouped) {
31167
+ if (originRecordIndex = this.getOriginRecordIndexForGroup(index), isValid$3(originRecordIndex) && (null === (_a = this.beforeChangedRecordsMap) || void 0 === _a ? void 0 : _a.has(originRecordIndex.toString()))) return null === (_b = this.beforeChangedRecordsMap) || void 0 === _b ? void 0 : _b.get(originRecordIndex.toString());
31168
+ } else if (null === (_c = this.beforeChangedRecordsMap) || void 0 === _c ? void 0 : _c.has(index.toString())) return null === (_d = this.beforeChangedRecordsMap) || void 0 === _d ? void 0 : _d.get(index.toString());
31169
+ return isNumber$4(index) && this._recordCache && this._recordCache[index] ? this._recordCache[index] : (data = this.dataSourceObj.records ? Array.isArray(index) ? getValueFromDeepArray(this.records, index) : this.records[index] : this._get(index), getValue$2(data, val => {
31170
+ this.recordPromiseCallBack(index, val);
31171
+ }));
31129
31172
  }
31130
31173
  getOriginalField(index, field, col, row, table) {
31131
31174
  const rowCache = this._fieldCache && this._fieldCache[index];
@@ -31160,7 +31203,7 @@
31160
31203
  aggregationFun: (values, records, field) => {
31161
31204
  const groupMap = new Map(),
31162
31205
  groupResult = [];
31163
- for (let i = 0; i < records.length; i++) dealWithGroup(records[i], groupResult, groupMap, groupByKeys, 0), records[i].vtableOriginIndex = i;
31206
+ for (let i = 0; i < records.length; i++) dealWithGroup(records[i], groupResult, groupMap, groupByKeys, 0);
31164
31207
  return groupResult;
31165
31208
  }
31166
31209
  }), this.fieldAggregators.push(this.groupAggregator);
@@ -31184,25 +31227,116 @@
31184
31227
  length: this.sourceLength
31185
31228
  }, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this.sourceLength, this.pagination.totalCount = this.sourceLength), this.initTreeHierarchyState(), this.updatePagerData();
31186
31229
  }
31230
+ getOriginRecordIndexForGroup(recordIndex) {
31231
+ const targetRecord = this.getOriginalRecord(recordIndex);
31232
+ if (isValid$3(targetRecord) && !(targetRecord.children && targetRecord.children.length > 0)) for (let i = 0; i < this.dataSourceObj.records.length; i++) if (this.dataSourceObj.records[i] === targetRecord) return i;
31233
+ }
31187
31234
  addRecordsForGroup(recordArr, recordIndex) {
31188
- isArray$7(recordArr) && 0 !== recordArr.length && ((void 0 === recordIndex || recordIndex > this.dataSourceObj.records) && (recordIndex = this.dataSourceObj.records), this.dataSourceObj.records.splice(recordIndex, 0, ...recordArr), this.updateGroup());
31235
+ if (!isArray$7(recordArr) || 0 === recordArr.length) return;
31236
+ let originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
31237
+ (void 0 === originRecordIndex || originRecordIndex > this.dataSourceObj.records) && (originRecordIndex = this.dataSourceObj.records.length), this.dataSourceObj.records.splice(originRecordIndex, 0, ...recordArr), this.adjustBeforeChangedRecordsMap(originRecordIndex, recordArr.length), this.updateGroup();
31189
31238
  }
31190
31239
  deleteRecordsForGroup(recordIndexs) {
31191
31240
  if (!isArray$7(recordIndexs) || 0 === recordIndexs.length) return;
31192
- const recordIndexsMaxToMin = recordIndexs.sort((a, b) => b - a);
31241
+ const recordIndexsMaxToMin = sortRecordIndexs(recordIndexs, -1);
31193
31242
  for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
31194
31243
  const recordIndex = recordIndexsMaxToMin[index];
31195
- recordIndex >= this.sourceLength || recordIndex < 0 || (delete this.beforeChangedRecordsMap[recordIndex], this.dataSourceObj.records.splice(recordIndex, 1), this.sourceLength -= 1);
31244
+ if (isNumber$4(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) continue;
31245
+ const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
31246
+ this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records.splice(originRecordIndex, 1), this.sourceLength -= 1, this.adjustBeforeChangedRecordsMap(originRecordIndex, 1, "delete");
31196
31247
  }
31197
31248
  this.updateGroup();
31198
31249
  }
31199
31250
  updateRecordsForGroup(records, recordIndexs) {
31200
31251
  for (let index = 0; index < recordIndexs.length; index++) {
31201
31252
  const recordIndex = recordIndexs[index];
31202
- recordIndex >= this.sourceLength || recordIndex < 0 || (delete this.beforeChangedRecordsMap[recordIndex], this.dataSourceObj.records[recordIndex] = records[index]);
31253
+ if (isNumber$4(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) continue;
31254
+ const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
31255
+ this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records[originRecordIndex] = records[index];
31203
31256
  }
31204
31257
  this.updateGroup();
31205
31258
  }
31259
+ addRecordsForTree(recordArr, recordIndex) {
31260
+ if (isArray$7(recordArr) && 0 !== recordArr.length) {
31261
+ if (this.adjustBeforeChangedRecordsMap(recordIndex, recordArr.length), isNumber$4(recordIndex)) this.dataSourceObj.records.splice(recordIndex, 0, ...recordArr);else {
31262
+ const index = recordIndex.pop(),
31263
+ parentRecord = this.getOriginalRecord(recordIndex);
31264
+ parentRecord.children ? parentRecord.children.splice(index, 0, ...recordArr) : parentRecord.children = recordArr;
31265
+ }
31266
+ this.initTreeHierarchyState(), this.updatePagerData();
31267
+ }
31268
+ }
31269
+ deleteRecordsForTree(recordIndexs) {
31270
+ if (!isArray$7(recordIndexs) || 0 === recordIndexs.length) return;
31271
+ const recordIndexsMaxToMin = sortRecordIndexs(recordIndexs, -1);
31272
+ for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
31273
+ const recordIndex = recordIndexsMaxToMin[index];
31274
+ if (!isNumber$4(recordIndex) || !(recordIndex >= this.sourceLength || recordIndex < 0)) {
31275
+ if (this.beforeChangedRecordsMap.delete(recordIndex.toString()), isNumber$4(recordIndex)) this.dataSourceObj.records.splice(recordIndex, 1);else {
31276
+ const index = recordIndex.pop();
31277
+ this.getOriginalRecord(recordIndex).children.splice(index, 1);
31278
+ }
31279
+ this.adjustBeforeChangedRecordsMap(recordIndex, 1, "delete");
31280
+ }
31281
+ }
31282
+ this.initTreeHierarchyState(), this.updatePagerData();
31283
+ }
31284
+ updateRecordsForTree(records, recordIndexs) {
31285
+ for (let index = 0; index < recordIndexs.length; index++) {
31286
+ const recordIndex = recordIndexs[index],
31287
+ record = records[index];
31288
+ if (!isNumber$4(recordIndex) || !(recordIndex >= this.sourceLength || recordIndex < 0)) if (this.beforeChangedRecordsMap.delete(recordIndex.toString()), isNumber$4(recordIndex)) this.dataSourceObj.records.splice(recordIndex, 1, record);else {
31289
+ const index = recordIndex.pop();
31290
+ this.getOriginalRecord(recordIndex).children.splice(index, 1, record);
31291
+ }
31292
+ }
31293
+ this.initTreeHierarchyState(), this.updatePagerData();
31294
+ }
31295
+ adjustBeforeChangedRecordsMap(insertIndex, insertCount) {
31296
+ let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "add";
31297
+ if ("tree" === this.rowHierarchyType) {
31298
+ let insertIndexArr;
31299
+ insertIndexArr = isNumber$4(insertIndex) ? [insertIndex] : insertIndex;
31300
+ const targetResult = [];
31301
+ this.beforeChangedRecordsMap.forEach((value, key) => {
31302
+ var _a, _b;
31303
+ const keyArray = key.split(","),
31304
+ length = Math.max(keyArray.length, insertIndexArr.length);
31305
+ for (let i = 0; i < length; i++) {
31306
+ const current = null !== (_a = insertIndexArr[i]) && void 0 !== _a ? _a : -1,
31307
+ keyIndex = null !== (_b = Number(keyArray[i])) && void 0 !== _b ? _b : -1;
31308
+ if (current < keyIndex || current === keyIndex && i === keyArray.length - 1 && i === insertIndexArr.length - 1) return keyArray[i] = (keyIndex + ("add" === type ? insertCount : -insertCount)).toString(), void targetResult.push({
31309
+ originKey: key,
31310
+ targetKey: keyArray.toString(),
31311
+ value: value
31312
+ });
31313
+ }
31314
+ }), targetResult.forEach(_ref => {
31315
+ let {
31316
+ originKey: originKey,
31317
+ targetKey: targetKey,
31318
+ value: value
31319
+ } = _ref;
31320
+ this.beforeChangedRecordsMap.delete(originKey), this.beforeChangedRecordsMap.set(targetKey, value);
31321
+ });
31322
+ } else super.adjustBeforeChangedRecordsMap(insertIndex, insertCount, type);
31323
+ }
31324
+ cacheBeforeChangedRecord(dataIndex, table) {
31325
+ var _a;
31326
+ const originRecord = this.getOriginalRecord(dataIndex);
31327
+ table.options.groupBy && (dataIndex = this.getOriginRecordIndexForGroup(dataIndex)), this.beforeChangedRecordsMap.has(dataIndex.toString()) || this.beforeChangedRecordsMap.set(dataIndex.toString(), null !== (_a = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {});
31328
+ }
31329
+ getGroupSeriesNumber(showIndex) {
31330
+ const recordIndex = this.dataSource.currentIndexedData[showIndex],
31331
+ parentRecordIndexLength = recordIndex.length - 1;
31332
+ let recordIndexLength = recordIndex.length,
31333
+ i = 1;
31334
+ for (; recordIndexLength > parentRecordIndexLength; i++) {
31335
+ const index = this.dataSource.currentIndexedData[showIndex - i];
31336
+ recordIndexLength = isNumber$4(index) ? 1 : index.length;
31337
+ }
31338
+ return i - 1;
31339
+ }
31206
31340
  }
31207
31341
  function dealWithGroup(record, children, map, groupByKeys, level) {
31208
31342
  const groupByKey = groupByKeys[level];
@@ -31649,13 +31783,8 @@
31649
31783
  }
31650
31784
  function _setDataSource(table, dataSource) {
31651
31785
  _dealWithUpdateDataSource(table, () => {
31652
- if (dataSource) {
31653
- if (dataSource instanceof DataSource) table.internalProps.dataSource = dataSource;else {
31654
- const newDataSource = table.internalProps.dataSource = new CachedDataSource(dataSource);
31655
- table.addReleaseObj(newDataSource);
31656
- }
31657
- } else table.internalProps.dataSource = DataSource.EMPTY;
31658
- table.internalProps.records = null;
31786
+ var _a, _b;
31787
+ table.internalProps.dataSource && (null === (_b = (_a = table.internalProps.dataSource).release) || void 0 === _b || _b.call(_a)), dataSource ? dataSource instanceof DataSource ? (table.internalProps.dataSource = dataSource, table.internalProps.dataSource.supplementConfig(table.pagination, table.options.columns, table.internalProps.layoutMap.rowHierarchyType, getHierarchyExpandLevel(table))) : table.internalProps.dataSource = new CachedDataSource(dataSource) : table.internalProps.dataSource = DataSource.EMPTY, table.addReleaseObj(table.internalProps.dataSource), table.internalProps.records = null;
31659
31788
  });
31660
31789
  }
31661
31790
  function _getTargetFrozenRowAt(table, absoluteY) {
@@ -33631,7 +33760,7 @@
33631
33760
  vtableMergeName: vtableMergeName,
33632
33761
  vtableMerge: vtableMerge
33633
33762
  } = null != rawRecord ? rawRecord : {};
33634
- isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.options.groupTitleCustomLayout && (customResult = dealWithCustom(table.options.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))), vtableMergeName && (value = vtableMergeName);
33763
+ isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.options.groupTitleCustomLayout && (customResult = dealWithCustom(table.options.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.options.groupTitleFieldFormat ? value = table.options.groupTitleFieldFormat(rawRecord, col, row, table) : vtableMergeName && (value = vtableMergeName));
33635
33764
  }
33636
33765
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
33637
33766
  autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
@@ -34110,7 +34239,7 @@
34110
34239
  function computeRowsHeight(table, rowStart, rowEnd) {
34111
34240
  let isClearRowRangeHeightsMap = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
34112
34241
  let update = arguments.length > 4 ? arguments[4] : undefined;
34113
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
34242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34114
34243
  "undefined" != typeof window && window.performance.now();
34115
34244
  const oldRowHeights = [],
34116
34245
  newHeights = [];
@@ -34191,23 +34320,17 @@
34191
34320
  const newRowHeight = null !== (_e = newHeights[row]) && void 0 !== _e ? _e : table.getRowHeight(row);
34192
34321
  isValid$3(newRowHeight) && table._setRowHeight(row, newRowHeight);
34193
34322
  }
34194
- if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) {
34195
- for (let row = 0; row <= table.columnHeaderLevelCount - 1; row++) {
34196
- const newRowHeight = table.getRowHeight(row);
34197
- newRowHeight !== (null !== (_f = oldRowHeights[row]) && void 0 !== _f ? _f : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_g = oldRowHeights[row]) && void 0 !== _g ? _g : table.getRowHeight(row)), !0);
34198
- }
34199
- for (let row = table.rowCount - table.bottomFrozenRowCount; row <= table.rowCount - 1; row++) {
34200
- const newRowHeight = table.getRowHeight(row);
34201
- newRowHeight !== (null !== (_h = oldRowHeights[row]) && void 0 !== _h ? _h : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_j = oldRowHeights[row]) && void 0 !== _j ? _j : table.getRowHeight(row)), !0);
34202
- }
34323
+ for (let row = 0; row <= table.frozenRowCount - 1; row++) {
34324
+ const newRowHeight = table.getRowHeight(row);
34325
+ newRowHeight !== (null !== (_f = oldRowHeights[row]) && void 0 !== _f ? _f : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_g = oldRowHeights[row]) && void 0 !== _g ? _g : table.getRowHeight(row)), !0);
34203
34326
  }
34204
- for (let row = 0; row < table.frozenRowCount; row++) {
34327
+ for (let row = table.rowCount - table.bottomFrozenRowCount; row <= table.rowCount - 1; row++) {
34205
34328
  const newRowHeight = table.getRowHeight(row);
34206
- newRowHeight !== (null !== (_k = oldRowHeights[row]) && void 0 !== _k ? _k : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_l = oldRowHeights[row]) && void 0 !== _l ? _l : table.getRowHeight(row)), !0);
34329
+ newRowHeight !== (null !== (_h = oldRowHeights[row]) && void 0 !== _h ? _h : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_j = oldRowHeights[row]) && void 0 !== _j ? _j : table.getRowHeight(row)), !0);
34207
34330
  }
34208
34331
  for (let row = table.scenegraph.proxy.rowStart; row <= table.scenegraph.proxy.rowEnd; row++) {
34209
34332
  const newRowHeight = table.getRowHeight(row);
34210
- newRowHeight !== (null !== (_m = oldRowHeights[row]) && void 0 !== _m ? _m : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_o = oldRowHeights[row]) && void 0 !== _o ? _o : table.getRowHeight(row)), !0);
34333
+ newRowHeight !== (null !== (_k = oldRowHeights[row]) && void 0 !== _k ? _k : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_l = oldRowHeights[row]) && void 0 !== _l ? _l : table.getRowHeight(row)), !0);
34211
34334
  }
34212
34335
  }
34213
34336
  table.isPivotTable() && (layoutMap.disableUseGetBodyCache(), layoutMap.disableUseHeaderPathCache());
@@ -37422,7 +37545,7 @@
37422
37545
  vtableMergeName: vtableMergeName,
37423
37546
  vtableMerge: vtableMerge
37424
37547
  } = null != rawRecord ? rawRecord : {};
37425
- isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.options.groupTitleCustomLayout && (customResult = dealWithCustom(table.options.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))), vtableMergeName && (value = vtableMergeName);
37548
+ isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.options.groupTitleCustomLayout && (customResult = dealWithCustom(table.options.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.options.groupTitleFieldFormat ? value = table.options.groupTitleFieldFormat(rawRecord, col, row, table) : vtableMergeName && (value = vtableMergeName));
37426
37549
  }
37427
37550
  const type = isVtableMerge || isCustomMerge ? "text" : null !== (_b = table.isHeader(col, row) ? null !== (_a = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _a ? _a : "text" : table.getBodyColumnType(col, row)) && void 0 !== _b ? _b : "text";
37428
37551
  if (isPromise(value)) {
@@ -37564,7 +37687,7 @@
37564
37687
  rightBottomCornerGroup: rightBottomCornerGroup
37565
37688
  } = table.scenegraph;
37566
37689
  let distCol, distRow, distColForCompute, distRowForCompute;
37567
- proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
37690
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
37568
37691
  x: table.getFrozenColsWidth(),
37569
37692
  y: table.getFrozenRowsHeight()
37570
37693
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
@@ -38073,7 +38196,7 @@
38073
38196
  });
38074
38197
  for (let col = 0; col < frozenColCount && !(rowEnd < rowStart); col++) [rowStart, rowEnd].forEach(row => {
38075
38198
  const style = table._getCellStyle(col, row);
38076
- if ((null == style ? void 0 : style.textStick) && "tree" !== table.internalProps.layoutMap.rowHierarchyType && "horizontal" !== (null == style ? void 0 : style.textStick)) {
38199
+ if ((null == style ? void 0 : style.textStick) && "horizontal" !== (null == style ? void 0 : style.textStick)) {
38077
38200
  adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
38078
38201
  }
38079
38202
  });
@@ -41832,9 +41955,7 @@
41832
41955
  groupKeyLength = dataSource.dataConfig.groupByRules.length + 1;
41833
41956
  return dataSource.currentIndexedData.forEach((indexArr, index) => {
41834
41957
  if (isArray$7(indexArr) && indexArr.length === groupKeyLength) {
41835
- const {
41836
- vtableOriginIndex: vtableOriginIndex
41837
- } = dataSource.getRawRecord(indexArr);
41958
+ const vtableOriginIndex = dataSource.getOriginRecordIndexForGroup(indexArr);
41838
41959
  result[vtableOriginIndex] = table.stateManager.checkedState.get(indexArr.toString());
41839
41960
  }
41840
41961
  }), result;
@@ -45692,26 +45813,24 @@
45692
45813
  }
45693
45814
 
45694
45815
  function getRowAt(absoluteY, _this) {
45816
+ var _a;
45695
45817
  const frozen = _getTargetFrozenRowAt(_this, absoluteY);
45696
- if (frozen) return frozen;
45697
- let row = getTargetRowAt(absoluteY, _this);
45698
- return row || (row = {
45818
+ return frozen || (null !== (_a = getTargetRowAt(absoluteY, _this)) && void 0 !== _a ? _a : {
45699
45819
  top: -1,
45700
45820
  row: -1,
45701
45821
  bottom: -1,
45702
45822
  height: -1
45703
- }), row;
45823
+ });
45704
45824
  }
45705
45825
  function getColAt(absoluteX, _this) {
45826
+ var _a;
45706
45827
  const frozen = _getTargetFrozenColAt(_this, absoluteX);
45707
- if (frozen) return frozen;
45708
- let col = getTargetColAt(absoluteX, _this);
45709
- return col || (col = {
45828
+ return frozen || (null !== (_a = getTargetColAt(absoluteX, _this)) && void 0 !== _a ? _a : {
45710
45829
  left: -1,
45711
45830
  col: -1,
45712
45831
  right: -1,
45713
45832
  width: 1
45714
- }), col;
45833
+ });
45715
45834
  }
45716
45835
  function getCellAt(absoluteX, absoluteY, _this) {
45717
45836
  const rowInfo = getRowAt(absoluteY, _this),
@@ -46727,7 +46846,7 @@
46727
46846
  constructor(container) {
46728
46847
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46729
46848
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
46730
- if (super(), this.showFrozenIcon = !0, this.version = "1.15.1-alpha.1", 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");
46849
+ if (super(), this.showFrozenIcon = !0, this.version = "1.15.1", 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");
46731
46850
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
46732
46851
  const {
46733
46852
  frozenColCount = 0,
@@ -46773,13 +46892,15 @@
46773
46892
  right: 0,
46774
46893
  left: 0,
46775
46894
  bottom: 0
46776
- }, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), isValid$3(canvasHeight) && isValid$3(canvasWidth) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight, this.columnWidthComputeMode = null !== (_b = options.columnWidthComputeMode) && void 0 !== _b ? _b : "normal";
46895
+ }, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), isValid$3(canvasHeight) && isValid$3(canvasWidth) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_b = options.columnWidthComputeMode) && void 0 !== _b ? _b : "normal";
46777
46896
  const internalProps = this.internalProps = {};
46778
- if (void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative", internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_c = options.customConfig) || void 0 === _c ? void 0 : _c.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, 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.columnResizeMode = columnResizeMode, internalProps.rowResizeMode = rowResizeMode, internalProps.dragHeaderMode = null != dragHeaderMode ? dragHeaderMode : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.calcWidthContext = {
46897
+ void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative", internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_c = options.customConfig) || void 0 === _c ? void 0 : _c.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, 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.columnResizeMode = columnResizeMode, internalProps.rowResizeMode = rowResizeMode, internalProps.dragHeaderMode = null != dragHeaderMode ? dragHeaderMode : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
46898
+ const that = this;
46899
+ if (internalProps.calcWidthContext = {
46779
46900
  _: internalProps,
46780
46901
  get full() {
46781
46902
  var _a;
46782
- return "node" === Env.mode ? canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
46903
+ return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
46783
46904
  }
46784
46905
  }, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_d = options.theme) && void 0 !== _d ? _d : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_e = options.allowFrozenColCount) && void 0 !== _e ? _e : 0, internalProps.limitMaxAutoWidth = null !== (_f = options.limitMaxAutoWidth) && void 0 !== _f ? _f : 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, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this), this.eventManager = new EventManager(this), this.animationManager = new TableAnimationManager(this), options.legends) {
46785
46906
  internalProps.legends = [];
@@ -46815,7 +46936,36 @@
46815
46936
  changedCells: new Map()
46816
46937
  }, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
46817
46938
  const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
46818
- CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []));
46939
+ CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : [])), this._adjustCanvasSizeByOption();
46940
+ }
46941
+ _adjustCanvasSizeByOption() {
46942
+ "auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
46943
+ 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;
46944
+ let canvasWidth, canvasHeight;
46945
+ if ("auto" === this.options.canvasHeight) {
46946
+ let borderWidth = 0;
46947
+ if (null === (_a = this.theme.frameStyle) || void 0 === _a ? void 0 : _a.innerBorder) {
46948
+ borderWidth += null !== (_d = toBoxArray(null !== (_c = null === (_b = this.internalProps.theme.frameStyle) || void 0 === _b ? void 0 : _b.shadowBlur) && void 0 !== _c ? _c : [0])[1]) && void 0 !== _d ? _d : 0;
46949
+ } else if (this.theme.frameStyle) {
46950
+ const lineWidths = toBoxArray(null !== (_f = null === (_e = this.internalProps.theme.frameStyle) || void 0 === _e ? void 0 : _e.borderLineWidth) && void 0 !== _f ? _f : [null]),
46951
+ shadowWidths = toBoxArray(null !== (_h = null === (_g = this.internalProps.theme.frameStyle) || void 0 === _g ? void 0 : _g.shadowBlur) && void 0 !== _h ? _h : [0]);
46952
+ borderWidth += (null !== (_j = lineWidths[0]) && void 0 !== _j ? _j : 0) + (null !== (_k = shadowWidths[0]) && void 0 !== _k ? _k : 0) + ((null !== (_l = lineWidths[2]) && void 0 !== _l ? _l : 0) + (null !== (_m = shadowWidths[2]) && void 0 !== _m ? _m : 0));
46953
+ }
46954
+ canvasHeight = Math.min(this.options.maxCanvasHeight ? this.options.maxCanvasHeight - borderWidth : 2e4, this.getAllRowsHeight()) + borderWidth;
46955
+ } else canvasHeight = this.canvasHeight;
46956
+ if ("auto" === this.options.canvasWidth) {
46957
+ let borderWidth = 0;
46958
+ if (null === (_o = this.theme.frameStyle) || void 0 === _o ? void 0 : _o.innerBorder) {
46959
+ borderWidth += null !== (_r = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0])[2]) && void 0 !== _r ? _r : 0;
46960
+ } else if (this.theme.frameStyle) {
46961
+ const lineWidths = toBoxArray(null !== (_t = null === (_s = this.internalProps.theme.frameStyle) || void 0 === _s ? void 0 : _s.borderLineWidth) && void 0 !== _t ? _t : [null]),
46962
+ shadowWidths = toBoxArray(null !== (_v = null === (_u = this.internalProps.theme.frameStyle) || void 0 === _u ? void 0 : _u.shadowBlur) && void 0 !== _v ? _v : [0]);
46963
+ borderWidth += (null !== (_w = lineWidths[1]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[1]) && void 0 !== _x ? _x : 0) + ((null !== (_y = lineWidths[3]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[3]) && void 0 !== _z ? _z : 0));
46964
+ }
46965
+ canvasWidth = Math.min(this.options.maxCanvasWidth ? this.options.maxCanvasWidth - borderWidth : 2e4, this.getAllColsWidth()) + borderWidth;
46966
+ } else canvasWidth = this.canvasWidth;
46967
+ this.setCanvasSize(canvasWidth, canvasHeight);
46968
+ }, 0);
46819
46969
  }
46820
46970
  getContainer() {
46821
46971
  return this.container;
@@ -47037,7 +47187,7 @@
47037
47187
  setPixelRatio(pixelRatio) {
47038
47188
  if (pixelRatio !== this.internalProps.pixelRatio) {
47039
47189
  this.internalProps.pixelRatio = pixelRatio;
47040
- const canvasWidth = this.options.canvasWidth;
47190
+ const canvasWidth = this.canvasWidth;
47041
47191
  this.internalProps.calcWidthContext = {
47042
47192
  _: this.internalProps,
47043
47193
  get full() {
@@ -47559,7 +47709,7 @@
47559
47709
  limitMinWidth: limitMinWidth,
47560
47710
  limitMinHeight: limitMinHeight
47561
47711
  } = options;
47562
- pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender, this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight;
47712
+ pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
47563
47713
  const internalProps = this.internalProps;
47564
47714
  if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "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.columnResizeMode = columnResizeMode, internalProps.rowResizeMode = rowResizeMode, internalProps.dragHeaderMode = null != dragHeaderMode ? dragHeaderMode : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : 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 !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0, internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 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 === (_e = internalProps.legends) || void 0 === _e || _e.forEach(legend => {
47565
47715
  null == legend || legend.release();
@@ -47593,7 +47743,7 @@
47593
47743
  const MenuHandler = Factory.getComponent("menuHandler");
47594
47744
  internalProps.menuHandler = new MenuHandler(this);
47595
47745
  }
47596
- this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
47746
+ this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []), this._adjustCanvasSizeByOption();
47597
47747
  }
47598
47748
  renderWithRecreateCells() {
47599
47749
  const oldHoverState = {
@@ -50587,7 +50737,7 @@
50587
50737
  if (!this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row)) {
50588
50738
  const sourceIndex = this.getRecordShowIndexByCell(0, source.row),
50589
50739
  targetIndex = this.getRecordShowIndexByCell(0, target.row);
50590
- return this._table.dataSource.isCanExchangeOrder(sourceIndex, targetIndex);
50740
+ return this._table.dataSource.canChangeOrder(sourceIndex, targetIndex);
50591
50741
  }
50592
50742
  if (this.transpose && this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) && (this.getBody(source.col + this.leftRowSeriesNumberColumnCount, source.row).isChildNode && this.getBody(target.col + this.leftRowSeriesNumberColumnCount, target.row).isChildNode ? (source.col = source.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1, target.col = target.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1) : (source.col = source.col + this.leftRowSeriesNumberColumnCount, target.col = target.col + this.leftRowSeriesNumberColumnCount)), source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) return !1;
50593
50743
  if ("disabled" === this._table.internalProps.frozenColDragHeaderMode && this._table.isFrozenColumn(target.col)) return !1;
@@ -51014,8 +51164,8 @@
51014
51164
  }), table.dataSource.sort(sortState));
51015
51165
  }
51016
51166
  function listTableAddRecord(record, recordIndex, table) {
51017
- var _a, _b;
51018
- if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51167
+ var _a, _b, _c, _d;
51168
+ if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51019
51169
  (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
51020
51170
  const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
51021
51171
  table.dataSource.addRecord(record, recordIndex);
@@ -51083,8 +51233,8 @@
51083
51233
  }
51084
51234
  }
51085
51235
  function listTableAddRecords(records, recordIndex, table) {
51086
- var _a, _b;
51087
- if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51236
+ var _a, _b, _c, _d;
51237
+ if (table.options.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51088
51238
  void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
51089
51239
  const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
51090
51240
  table.dataSource.addRecords(records, recordIndex);
@@ -51152,8 +51302,8 @@
51152
51302
  }
51153
51303
  }
51154
51304
  function listTableDeleteRecords(recordIndexs, table) {
51155
- var _a, _b, _c, _d, _e, _f;
51156
- if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51305
+ var _a, _b, _c, _d, _e, _f, _g, _h;
51306
+ if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).deleteRecordsForTree) || void 0 === _d || _d.call(_c, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51157
51307
  const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
51158
51308
  if (0 === deletedRecordIndexs.length) return;
51159
51309
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
@@ -51193,7 +51343,7 @@
51193
51343
  col: 0,
51194
51344
  row: row
51195
51345
  });
51196
- null === (_c = table.reactCustomLayout) || void 0 === _c || _c.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_d = table.reactCustomLayout) || void 0 === _d || _d.updateAllCustomCell();
51346
+ null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
51197
51347
  }
51198
51348
  } else {
51199
51349
  const delRows = [],
@@ -51225,13 +51375,13 @@
51225
51375
  col: 0,
51226
51376
  row: row
51227
51377
  });
51228
- null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
51378
+ null === (_g = table.reactCustomLayout) || void 0 === _g || _g.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_h = table.reactCustomLayout) || void 0 === _h || _h.updateAllCustomCell();
51229
51379
  }
51230
51380
  }
51231
51381
  }
51232
51382
  function listTableUpdateRecords(records, recordIndexs, table) {
51233
- var _a, _b;
51234
- if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51383
+ var _a, _b, _c, _d;
51384
+ if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).updateRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
51235
51385
  const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
51236
51386
  if (0 === updateRecordIndexs.length) return;
51237
51387
  const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
@@ -51362,7 +51512,7 @@
51362
51512
  var _a, _b, _c, _d, _e, _f;
51363
51513
  "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
51364
51514
  const internalProps = this.internalProps;
51365
- if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$3(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
51515
+ if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$3(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
51366
51516
  sortState: internalProps.sortState
51367
51517
  }) : this.setRecords([]), options.title) {
51368
51518
  const Title = Factory.getComponent("title");
@@ -51441,8 +51591,7 @@
51441
51591
  if (this.options.groupBy) {
51442
51592
  const record = table.getCellRawRecord(col, row);
51443
51593
  if (null == record ? void 0 : record.vtableMerge) return "";
51444
- const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
51445
- value = indexs[indexs.length - 1] + 1;
51594
+ value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount);
51446
51595
  } else value = row - this.columnHeaderLevelCount + 1;
51447
51596
  const {
51448
51597
  format: format
@@ -51532,7 +51681,7 @@
51532
51681
  layoutMap: layoutMap
51533
51682
  } = this.internalProps,
51534
51683
  recordShowIndex = layoutMap.getRecordShowIndexByCell(col, row);
51535
- return this.dataSource.currentPagerIndexedData[recordShowIndex];
51684
+ return this.dataSource.getRecordIndexPaths(recordShowIndex);
51536
51685
  }
51537
51686
  getTableIndexByRecordIndex(recordIndex) {
51538
51687
  return this.transpose ? this.dataSource.getTableIndex(recordIndex) + this.rowHeaderLevelCount : this.dataSource.getTableIndex(recordIndex) + this.columnHeaderLevelCount;
@@ -51578,7 +51727,7 @@
51578
51727
  if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_c = null !== (_b = options.enableTreeNodeMerge) && void 0 !== _b ? _b : isValid$3(options.groupBy)) && void 0 !== _c && _c, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
51579
51728
  var _a;
51580
51729
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
51581
- }), internalProps.releaseList = null), options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
51730
+ }), internalProps.releaseList = null), options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
51582
51731
  sortState: options.sortState
51583
51732
  }) : (this._resetFrozenColCount(), this.scenegraph.createSceneGraph(), this.render()), options.title) {
51584
51733
  const Title = Factory.getComponent("title");
@@ -51631,7 +51780,7 @@
51631
51780
  return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), moveContext) : null;
51632
51781
  }
51633
51782
  changeRecordOrder(sourceIndex, targetIndex) {
51634
- this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.reorderRecord(sourceIndex, targetIndex);
51783
+ this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.changeOrder(sourceIndex, targetIndex);
51635
51784
  }
51636
51785
  getCellAddress(findTargetRecord, field) {
51637
51786
  let targetRecordIndex;
@@ -51766,7 +51915,7 @@
51766
51915
  return {
51767
51916
  field: item.field,
51768
51917
  order: item.order,
51769
- orderFn: sortFunc
51918
+ orderFn: null != sortFunc ? sortFunc : defaultOrderFn
51770
51919
  };
51771
51920
  })), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
51772
51921
  }
@@ -53559,10 +53708,12 @@
53559
53708
  resize() {
53560
53709
  var _a;
53561
53710
  if (!this._emptyTipComponent) return;
53562
- const leftHeaderWidth = this.table.transpose || !1 === this.table.options.indicatorsAsCol ? this.table.getFrozenColsWidth() : 0,
53563
- topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol ? this.table.getFrozenRowsHeight() : 0,
53564
- width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth - this.table.getTheme().scrollStyle.width,
53565
- height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable() ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight - this.table.getTheme().scrollStyle.width;
53711
+ const {
53712
+ leftHeaderWidth: leftHeaderWidth,
53713
+ topHeaderHeight: topHeaderHeight,
53714
+ width: width,
53715
+ height: height
53716
+ } = this.getWidthAndHeight();
53566
53717
  this._emptyTipComponent.setAttributes({
53567
53718
  spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
53568
53719
  x: this.table.tableX + leftHeaderWidth,
@@ -53583,12 +53734,24 @@
53583
53734
  resetVisible() {
53584
53735
  (this.table.recordsCount && 0 !== this.table.recordsCount || this.table.internalProps.layoutMap.rowCount !== this.table.internalProps.layoutMap.columnHeaderLevelCount) && this.table.internalProps.layoutMap.colCount !== this.table.internalProps.layoutMap.rowHeaderLevelCount ? this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent) && this.table.scenegraph.stage.defaultLayer.removeChild(this._emptyTipComponent) : this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent) || this.table.scenegraph.stage.defaultLayer.appendChild(this._emptyTipComponent);
53585
53736
  }
53737
+ getWidthAndHeight() {
53738
+ const leftHeaderWidth = this.table.transpose || !1 === this.table.options.indicatorsAsCol ? this.table.getFrozenColsWidth() : 0,
53739
+ topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol ? this.table.getFrozenRowsHeight() : 0;
53740
+ return {
53741
+ leftHeaderWidth: leftHeaderWidth,
53742
+ topHeaderHeight: topHeaderHeight,
53743
+ width: ("basedOnContainer" !== this._emptyTipOption.displayMode && this.table.columnHeaderLevelCount > 0 && this.table.colCount > this.table.rowHeaderLevelCount ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth - this.table.getTheme().scrollStyle.width,
53744
+ height: ("basedOnContainer" !== this._emptyTipOption.displayMode && this.table.rowHeaderLevelCount > 0 && this.table.rowCount > this.table.columnHeaderLevelCount ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight - this.table.getTheme().scrollStyle.width
53745
+ };
53746
+ }
53586
53747
  _getEmptyTipAttrs() {
53587
53748
  var _a;
53588
- const leftHeaderWidth = this.table.transpose || !1 === this.table.options.indicatorsAsCol ? this.table.getFrozenColsWidth() : 0,
53589
- topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol ? this.table.getFrozenRowsHeight() : 0,
53590
- width = ("basedOnContainer" !== this._emptyTipOption.displayMode && this.table.columnHeaderLevelCount > 0 && this.table.colCount > this.table.rowHeaderLevelCount ? this.table.getDrawRange().width : this.table.tableNoFrameWidth) - leftHeaderWidth - this.table.getTheme().scrollStyle.width,
53591
- height = ("basedOnContainer" !== this._emptyTipOption.displayMode && this.table.rowHeaderLevelCount > 0 && this.table.rowCount > this.table.columnHeaderLevelCount ? this.table.getDrawRange().height : this.table.tableNoFrameHeight) - topHeaderHeight - this.table.getTheme().scrollStyle.width;
53749
+ const {
53750
+ leftHeaderWidth: leftHeaderWidth,
53751
+ topHeaderHeight: topHeaderHeight,
53752
+ width: width,
53753
+ height: height
53754
+ } = this.getWidthAndHeight();
53592
53755
  return {
53593
53756
  spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
53594
53757
  x: this.table.tableX + leftHeaderWidth,