@visactor/vtable-calendar 1.19.1 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28894,7 +28894,7 @@
28894
28894
  class Aggregator {
28895
28895
  constructor(config) {
28896
28896
  var _a;
28897
- this.isAggregator = !0, this.isRecord = !0, this.records = [], this.key = config.key, this.field = config.field, this.formatFun = config.formatFun, this.isRecord = null !== (_a = config.isRecord) && void 0 !== _a ? _a : this.isRecord;
28897
+ this.isAggregator = !0, this.isRecord = !0, this.records = [], this.children = [], this.key = config.key, this.field = config.field, this.formatFun = config.formatFun, this.isRecord = null !== (_a = config.isRecord) && void 0 !== _a ? _a : this.isRecord;
28898
28898
  }
28899
28899
  clearCacheValue() {
28900
28900
  this._formatedValue = void 0;
@@ -28903,7 +28903,7 @@
28903
28903
  return this._formatedValue || (this.formatFun ? this._formatedValue = this.formatFun(this.value(), col, row, table) : this._formatedValue = this.value()), this._formatedValue;
28904
28904
  }
28905
28905
  reset() {
28906
- this.records = [], this.clearCacheValue();
28906
+ this.records = [], this.changedValue = void 0, this.children = [], this.clearCacheValue();
28907
28907
  }
28908
28908
  }
28909
28909
  class RecordAggregator extends Aggregator {
@@ -28911,19 +28911,20 @@
28911
28911
  super(...arguments), this.type = AggregationType.RECORD, this.isRecord = !0;
28912
28912
  }
28913
28913
  push(record) {
28914
- record && this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), this.clearCacheValue();
28914
+ record && this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && this.children && this.children.push(record), this.clearCacheValue();
28915
28915
  }
28916
28916
  deleteRecord(record) {
28917
- record && this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.clearCacheValue();
28917
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children && (this.children = this.children.filter(item => item !== record))), this.clearCacheValue();
28918
28918
  }
28919
28919
  updateRecord(oldRecord, newRecord) {
28920
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), this.clearCacheValue());
28920
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.clearCacheValue());
28921
28921
  }
28922
28922
  value() {
28923
- return this.records;
28923
+ var _a;
28924
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.records;
28924
28925
  }
28925
28926
  reset() {
28926
- this.records = [];
28927
+ this.children = [], this.changedValue = void 0, this.records = [];
28927
28928
  }
28928
28929
  recalculate() {}
28929
28930
  }
@@ -28932,19 +28933,20 @@
28932
28933
  super(...arguments), this.type = AggregationType.NONE, this.isRecord = !0;
28933
28934
  }
28934
28935
  push(record) {
28935
- record && (this.isRecord && (this.records = [record]), this.field && (this.fieldValue = record[this.field])), this.clearCacheValue();
28936
+ record && (this.isRecord && (this.records = [record]), record.isAggregator && this.children && (this.children = [record]), this.field && (this.fieldValue = record[this.field])), this.clearCacheValue();
28936
28937
  }
28937
28938
  deleteRecord(record) {
28938
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.field && this.records.length && (this.fieldValue = this.records[this.records.length - 1][this.field])), this.clearCacheValue();
28939
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children && (this.children = this.children.filter(item => item !== record)), this.field && this.records.length && (this.fieldValue = this.records[this.records.length - 1][this.field])), this.clearCacheValue();
28939
28940
  }
28940
28941
  updateRecord(oldRecord, newRecord) {
28941
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), this.field && this.records.length && (this.fieldValue = this.records[this.records.length - 1][this.field]), this.clearCacheValue());
28942
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.field && this.records.length && (this.fieldValue = this.records[this.records.length - 1][this.field]), this.clearCacheValue());
28942
28943
  }
28943
28944
  value() {
28944
- return this.fieldValue;
28945
+ var _a;
28946
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.fieldValue;
28945
28947
  }
28946
28948
  reset() {
28947
- this.records = [], this.fieldValue = void 0;
28949
+ this.children = [], this.changedValue = void 0, this.records = [], this.fieldValue = void 0;
28948
28950
  }
28949
28951
  recalculate() {}
28950
28952
  }
@@ -28953,20 +28955,20 @@
28953
28955
  super(config), this.type = AggregationType.CUSTOM, this.isRecord = !0, this.values = [], this.aggregationFun = config.aggregationFun;
28954
28956
  }
28955
28957
  push(record) {
28956
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), this.field && this.values.push(record[this.field])), this.clearCacheValue();
28958
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && this.children && this.children.push(record), this.field && this.values.push(record[this.field])), this.clearCacheValue();
28957
28959
  }
28958
28960
  updateRecord(oldRecord, newRecord) {
28959
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), this.field && this.records.length && (this.values = this.records.map(item => item[this.field])), this.clearCacheValue());
28961
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.field && this.records.length && (this.values = this.records.map(item => item[this.field])), this.clearCacheValue());
28960
28962
  }
28961
28963
  deleteRecord(record) {
28962
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.field && this.records.length && (this.values = this.records.map(item => item[this.field]))), this.clearCacheValue();
28964
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children && (this.children = this.children.filter(item => item !== record)), this.field && this.records.length && (this.values = this.records.map(item => item[this.field]))), this.clearCacheValue();
28963
28965
  }
28964
28966
  value() {
28965
- var _a;
28966
- return this.fieldValue || (this.fieldValue = null === (_a = this.aggregationFun) || void 0 === _a ? void 0 : _a.call(this, this.values, this.records, this.field)), this.fieldValue;
28967
+ var _a, _b;
28968
+ return this.fieldValue || (this.fieldValue = null === (_a = this.aggregationFun) || void 0 === _a ? void 0 : _a.call(this, this.values, this.records, this.field)), null !== (_b = this.changedValue) && void 0 !== _b ? _b : this.fieldValue;
28967
28969
  }
28968
28970
  reset() {
28969
- this.records = [], this.fieldValue = void 0;
28971
+ this.records = [], this.children = [], this.changedValue = void 0, this.fieldValue = void 0;
28970
28972
  }
28971
28973
  recalculate() {
28972
28974
  this.fieldValue = void 0, this._formatedValue = void 0;
@@ -28978,7 +28980,8 @@
28978
28980
  super(config), this.type = AggregationType.SUM, this.sum = 0, this.positiveSum = 0, this.nagetiveSum = 0, this.needSplitPositiveAndNegativeForSum = !1, this.needSplitPositiveAndNegativeForSum = null !== (_a = config.needSplitPositiveAndNegative) && void 0 !== _a && _a;
28979
28981
  }
28980
28982
  push(record) {
28981
- if (record) if (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator) {
28983
+ if (record) if (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && this.children) {
28984
+ this.children.push(record);
28982
28985
  const value = record.value();
28983
28986
  this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
28984
28987
  } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
@@ -28988,7 +28991,8 @@
28988
28991
  this.clearCacheValue();
28989
28992
  }
28990
28993
  deleteRecord(record) {
28991
- if (record) if (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator) {
28994
+ if (record) if (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children) {
28995
+ this.children = this.children.filter(item => item !== record);
28992
28996
  const value = record.value();
28993
28997
  this.sum -= null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum -= value : value < 0 && (this.nagetiveSum -= value));
28994
28998
  } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
@@ -28999,10 +29003,11 @@
28999
29003
  }
29000
29004
  updateRecord(oldRecord, newRecord) {
29001
29005
  if (oldRecord && newRecord) {
29002
- if (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator) {
29003
- const oldValue = oldRecord.value(),
29004
- newValue = newRecord.value();
29005
- this.sum += newValue - oldValue, this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum -= oldValue : oldValue < 0 && (this.nagetiveSum -= oldValue), newValue > 0 ? this.positiveSum += newValue : newValue < 0 && (this.nagetiveSum += newValue));
29006
+ if (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && this.children) {
29007
+ const oldValue = oldRecord.value();
29008
+ this.children = this.children.filter(item => item !== oldRecord);
29009
+ const newValue = newRecord.value();
29010
+ this.children.push(newRecord), this.sum += newValue - oldValue, this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum -= oldValue : oldValue < 0 && (this.nagetiveSum -= oldValue), newValue > 0 ? this.positiveSum += newValue : newValue < 0 && (this.nagetiveSum += newValue));
29006
29011
  } else if (this.field && !isNaN(parseFloat(oldRecord[this.field]))) {
29007
29012
  const oldValue = parseFloat(oldRecord[this.field]),
29008
29013
  newValue = parseFloat(newRecord[this.field]);
@@ -29012,8 +29017,8 @@
29012
29017
  }
29013
29018
  }
29014
29019
  value() {
29015
- var _a;
29016
- return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.sum : void 0;
29020
+ var _a, _b;
29021
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.sum : void 0;
29017
29022
  }
29018
29023
  positiveValue() {
29019
29024
  return this.positiveSum;
@@ -29025,7 +29030,13 @@
29025
29030
  super.reset(), this.records = [], this.sum = 0;
29026
29031
  }
29027
29032
  recalculate() {
29028
- if (this.sum = 0, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
29033
+ if (this.sum = 0, this._formatedValue = void 0, this.children && this.children.length > 0) for (let i = 0; i < this.children.length; i++) {
29034
+ const child = this.children[i];
29035
+ if (child.isAggregator) {
29036
+ const value = child.value();
29037
+ this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
29038
+ }
29039
+ } else if (this.records) for (let i = 0; i < this.records.length; i++) {
29029
29040
  const record = this.records[i];
29030
29041
  if (record.isAggregator) {
29031
29042
  const value = record.value();
@@ -29042,22 +29053,29 @@
29042
29053
  super(...arguments), this.type = AggregationType.COUNT, this.count = 0;
29043
29054
  }
29044
29055
  push(record) {
29045
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? this.count += record.value() : this.count++), this.clearCacheValue();
29056
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? (this.children && this.children.push(record), this.count += record.value()) : this.count++), this.clearCacheValue();
29046
29057
  }
29047
29058
  deleteRecord(record) {
29048
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator ? this.count -= record.value() : this.count--), this.clearCacheValue();
29059
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator ? (this.children && (this.children = this.children.filter(item => item !== record)), this.count -= record.value()) : this.count--), this.clearCacheValue();
29049
29060
  }
29050
29061
  updateRecord(oldRecord, newRecord) {
29051
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && (this.count += newRecord.value() - oldRecord.value()));
29062
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && (this.count += newRecord.value() - oldRecord.value()), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)));
29052
29063
  }
29053
29064
  value() {
29054
- return this.count;
29065
+ var _a;
29066
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.count;
29055
29067
  }
29056
29068
  reset() {
29057
- this.records = [], this.count = 0;
29069
+ this.changedValue = void 0, this.children = [], this.records = [], this.count = 0;
29058
29070
  }
29059
29071
  recalculate() {
29060
- if (this.count = 0, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
29072
+ if (this.count = 0, this._formatedValue = void 0, this.children && this.children.length > 0) for (let i = 0; i < this.children.length; i++) {
29073
+ const child = this.children[i];
29074
+ if (child.isAggregator) {
29075
+ const value = child.value();
29076
+ this.count += null != value ? value : 0;
29077
+ } else this.count++;
29078
+ } else if (this.records) for (let i = 0; i < this.records.length; i++) {
29061
29079
  const record = this.records[i];
29062
29080
  record.isAggregator ? this.count += record.value() : this.count++;
29063
29081
  }
@@ -29068,23 +29086,29 @@
29068
29086
  super(...arguments), this.type = AggregationType.AVG, this.sum = 0, this.count = 0;
29069
29087
  }
29070
29088
  push(record) {
29071
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++)), this.clearCacheValue();
29089
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && this.children.push(record), this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++)), this.clearCacheValue();
29072
29090
  }
29073
29091
  deleteRecord(record) {
29074
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && record.type === AggregationType.AVG ? (this.sum -= record.sum, this.count -= record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum -= parseFloat(record[this.field]), this.count--)), this.clearCacheValue();
29092
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && (this.children = this.children.filter(item => item !== record)), this.sum -= record.sum, this.count -= record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum -= parseFloat(record[this.field]), this.count--)), this.clearCacheValue();
29075
29093
  }
29076
29094
  updateRecord(oldRecord, newRecord) {
29077
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && oldRecord.type === AggregationType.AVG ? (this.sum += newRecord.sum - oldRecord.sum, this.count += newRecord.count - oldRecord.count) : this.field && !isNaN(parseFloat(oldRecord[this.field])) && (this.sum += parseFloat(newRecord[this.field]) - parseFloat(oldRecord[this.field])), this.clearCacheValue());
29095
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && oldRecord.type === AggregationType.AVG ? (this.children && newRecord.isAggregator && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.sum += newRecord.sum - oldRecord.sum, this.count += newRecord.count - oldRecord.count) : this.field && !isNaN(parseFloat(oldRecord[this.field])) && (this.sum += parseFloat(newRecord[this.field]) - parseFloat(oldRecord[this.field])), this.clearCacheValue());
29078
29096
  }
29079
29097
  value() {
29080
- var _a;
29081
- return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.sum / this.count : void 0;
29098
+ var _a, _b;
29099
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.sum / this.count : void 0;
29082
29100
  }
29083
29101
  reset() {
29084
- this.records = [], this.sum = 0, this.count = 0;
29102
+ this.changedValue = void 0, this.children = [], this.records = [], this.sum = 0, this.count = 0;
29085
29103
  }
29086
29104
  recalculate() {
29087
- if (this.sum = 0, this.count = 0, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
29105
+ if (this.sum = 0, this.count = 0, this._formatedValue = void 0, this.children && this.children.length > 0) for (let i = 0; i < this.children.length; i++) {
29106
+ const child = this.children[i];
29107
+ if (child.isAggregator && child.type === AggregationType.AVG) {
29108
+ const childValue = child.value();
29109
+ this.sum += childValue * child.count, this.count += child.count;
29110
+ }
29111
+ } else if (this.records) for (let i = 0; i < this.records.length; i++) {
29088
29112
  const record = this.records[i];
29089
29113
  record.isAggregator && record.type === AggregationType.AVG ? (this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++);
29090
29114
  }
@@ -29095,23 +29119,29 @@
29095
29119
  super(...arguments), this.type = AggregationType.MAX, this.max = Number.MIN_SAFE_INTEGER;
29096
29120
  }
29097
29121
  push(record) {
29098
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? this.max = record.max > this.max ? record.max : this.max : "number" == typeof record ? this.max = record > this.max ? record : this.max : this.field && "number" == typeof record[this.field] ? this.max = record[this.field] > this.max ? record[this.field] : this.max : this.field && !isNaN(record[this.field]) && (this.max = parseFloat(record[this.field]) > this.max ? parseFloat(record[this.field]) : this.max)), this.clearCacheValue();
29122
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? (this.children && this.children.push(record), this.max = record.max > this.max ? record.max : this.max) : "number" == typeof record ? this.max = record > this.max ? record : this.max : this.field && "number" == typeof record[this.field] ? this.max = record[this.field] > this.max ? record[this.field] : this.max : this.field && !isNaN(record[this.field]) && (this.max = parseFloat(record[this.field]) > this.max ? parseFloat(record[this.field]) : this.max)), this.clearCacheValue();
29099
29123
  }
29100
29124
  deleteRecord(record) {
29101
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.recalculate());
29125
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children && (this.children = this.children.filter(item => item !== record)), this.recalculate());
29102
29126
  }
29103
29127
  updateRecord(oldRecord, newRecord) {
29104
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), this.recalculate());
29128
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.recalculate());
29105
29129
  }
29106
29130
  value() {
29107
- var _a;
29108
- return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.max : void 0;
29131
+ var _a, _b;
29132
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.max : void 0;
29109
29133
  }
29110
29134
  reset() {
29111
- this.records = [], this.max = Number.MIN_SAFE_INTEGER;
29135
+ this.records = [], this.changedValue = void 0, this.children = [], this.max = Number.MIN_SAFE_INTEGER;
29112
29136
  }
29113
29137
  recalculate() {
29114
- if (this.max = Number.MIN_SAFE_INTEGER, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
29138
+ if (this.max = Number.MIN_SAFE_INTEGER, this._formatedValue = void 0, this.children && this.children.length > 0) for (let i = 0; i < this.children.length; i++) {
29139
+ const child = this.children[i];
29140
+ if (child.isAggregator) {
29141
+ const childValue = child.value();
29142
+ this.max = Math.max(this.max, childValue);
29143
+ }
29144
+ } else if (this.records) for (let i = 0; i < this.records.length; i++) {
29115
29145
  const record = this.records[i];
29116
29146
  record.isAggregator ? this.max = record.max > this.max ? record.max : this.max : "number" == typeof record ? this.max = record > this.max ? record : this.max : this.field && "number" == typeof record[this.field] ? this.max = record[this.field] > this.max ? record[this.field] : this.max : this.field && !isNaN(record[this.field]) && (this.max = parseFloat(record[this.field]) > this.max ? parseFloat(record[this.field]) : this.max);
29117
29147
  }
@@ -29122,23 +29152,29 @@
29122
29152
  super(...arguments), this.type = AggregationType.MIN, this.min = Number.MAX_SAFE_INTEGER;
29123
29153
  }
29124
29154
  push(record) {
29125
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] ? this.min = record[this.field] < this.min ? record[this.field] : this.min : this.field && !isNaN(record[this.field]) && (this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min)), this.clearCacheValue();
29155
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator ? (this.children && this.children.push(record), this.min = record.min < this.min ? record.min : this.min) : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] ? this.min = record[this.field] < this.min ? record[this.field] : this.min : this.field && !isNaN(record[this.field]) && (this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min)), this.clearCacheValue();
29126
29156
  }
29127
29157
  deleteRecord(record) {
29128
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), this.recalculate());
29158
+ record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children && (this.children = this.children.filter(item => item !== record)), this.recalculate());
29129
29159
  }
29130
29160
  updateRecord(oldRecord, newRecord) {
29131
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), this.recalculate());
29161
+ oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && newRecord.isAggregator && this.children && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.recalculate());
29132
29162
  }
29133
29163
  value() {
29134
- var _a;
29135
- return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.min : void 0;
29164
+ var _a, _b;
29165
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.min : void 0;
29136
29166
  }
29137
29167
  reset() {
29138
- this.records = [], this.min = Number.MAX_SAFE_INTEGER;
29168
+ this.records = [], this.changedValue = void 0, this.children = [], this.min = Number.MAX_SAFE_INTEGER;
29139
29169
  }
29140
29170
  recalculate() {
29141
- if (this.min = Number.MAX_SAFE_INTEGER, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
29171
+ if (this.min = Number.MAX_SAFE_INTEGER, this._formatedValue = void 0, this.children && this.children.length > 0) for (let i = 0; i < this.children.length; i++) {
29172
+ const child = this.children[i];
29173
+ if (child.isAggregator) {
29174
+ const childValue = child.value();
29175
+ this.min = Math.min(this.min, childValue);
29176
+ }
29177
+ } else if (this.records) for (let i = 0; i < this.records.length; i++) {
29142
29178
  const record = this.records[i];
29143
29179
  record.isAggregator ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] ? this.min = record[this.field] < this.min ? record[this.field] : this.min : this.field && !isNaN(record[this.field]) && (this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min);
29144
29180
  }
@@ -32038,15 +32074,16 @@
32038
32074
  }, (_, i) => i), "tree" === rowHierarchyType && this.initTreeHierarchyState(), this.rowHierarchyType = rowHierarchyType, this.updatePagerData();
32039
32075
  }
32040
32076
  initTreeHierarchyState() {
32041
- var _a;
32042
- this.currentIndexedData = Array.from({
32077
+ var _a, _b;
32078
+ this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.currentIndexedData = Array.from({
32043
32079
  length: this._sourceLength
32044
32080
  }, (_, i) => i);
32045
32081
  let nodeLength = this._sourceLength;
32046
32082
  for (let i = 0; i < nodeLength; i++) {
32047
32083
  const indexKey = this.currentIndexedData[i],
32048
- nodeData = this.getOriginalRecord(indexKey),
32049
- children = null !== (_a = nodeData.filteredChildren) && void 0 !== _a ? _a : nodeData.children;
32084
+ nodeData = this.getOriginalRecord(indexKey);
32085
+ if (!nodeData) continue;
32086
+ const children = null !== (_b = nodeData.filteredChildren) && void 0 !== _b ? _b : nodeData.children;
32050
32087
  if ((null == children ? void 0 : children.length) > 0) {
32051
32088
  if (this.hierarchyExpandLevel > 1 ? !nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.expand) : !nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.collapse), this.hasHierarchyStateExpand = !0, nodeData.hierarchyState === HierarchyState.collapse) continue;
32052
32089
  const childrenLength = this.initChildrenNodeHierarchy(indexKey, this.hierarchyExpandLevel, 2, nodeData);
@@ -32575,9 +32612,11 @@
32575
32612
  targetNextIndexs = Array.isArray(targetNextIndexs) ? [...targetNextIndexs] : [targetNextIndexs], targetNextIndexs.length < targetIndexs.length && targetIndexs.splice(targetIndexs.length - 1, 1);
32576
32613
  }
32577
32614
  if (sourceI = sourceIndexs.splice(sourceIndexs.length - 1, 1)[0], targetI = targetIndexs.splice(targetIndexs.length - 1, 1)[0], sourceIndexs.length >= 1) {
32578
- const parent = this.getOriginalRecord(sourceIndexs),
32579
- sourceIds = parent.filteredChildren ? parent.filteredChildren.splice(sourceI, 1) : parent.children.splice(sourceI, 1);
32580
- sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(null !== (_c = parent.filteredChildren) && void 0 !== _c ? _c : parent.children, sourceIds);
32615
+ const parent = this.getOriginalRecord(sourceIndexs);
32616
+ if (parent) {
32617
+ const sourceIds = parent.filteredChildren ? parent.filteredChildren.splice(sourceI, 1) : parent.children.splice(sourceI, 1);
32618
+ sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(null !== (_c = parent.filteredChildren) && void 0 !== _c ? _c : parent.children, sourceIds);
32619
+ }
32581
32620
  } else {
32582
32621
  const sourceIds = this.records.splice(sourceI, 1);
32583
32622
  sourceIds.unshift(targetI, 0), Array.prototype.splice.apply(this.records, sourceIds);
@@ -32598,6 +32637,7 @@
32598
32637
  if (this.hierarchyExpandLevel) {
32599
32638
  for (let i = 0; i < this._sourceLength; i++) {
32600
32639
  const nodeData = this.getOriginalRecord(i);
32640
+ if (!nodeData) continue;
32601
32641
  (null !== (_a = nodeData.filteredChildren) && void 0 !== _a ? _a : nodeData.children) && !nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.collapse);
32602
32642
  }
32603
32643
  this.currentIndexedData = Array.from({
@@ -32606,8 +32646,9 @@
32606
32646
  let nodeLength = this._sourceLength;
32607
32647
  for (let i = 0; i < nodeLength; i++) {
32608
32648
  const indexKey = this.currentIndexedData[i],
32609
- nodeData = this.getOriginalRecord(indexKey),
32610
- children = null !== (_b = nodeData.filteredChildren) && void 0 !== _b ? _b : nodeData.children;
32649
+ nodeData = this.getOriginalRecord(indexKey);
32650
+ if (!nodeData) continue;
32651
+ const children = null !== (_b = nodeData.filteredChildren) && void 0 !== _b ? _b : nodeData.children;
32611
32652
  if ((null == children ? void 0 : children.length) > 0 && nodeData.hierarchyState === HierarchyState.expand) {
32612
32653
  this.hasHierarchyStateExpand = !0;
32613
32654
  const childrenLength = this.restoreChildrenNodeHierarchy(indexKey, nodeData);
@@ -36503,7 +36544,7 @@
36503
36544
  vtableMergeName: vtableMergeName,
36504
36545
  vtableMerge: vtableMerge
36505
36546
  } = null != rawRecord ? rawRecord : {};
36506
- 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));
36547
+ 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) : void 0 !== vtableMergeName && (value = vtableMergeName));
36507
36548
  }
36508
36549
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
36509
36550
  autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
@@ -36685,7 +36726,7 @@
36685
36726
  var _a, _b, _c, _d, _e, _f;
36686
36727
  "number" == typeof child._dx ? (child.skipMergeUpdate = !0, child.setAttributes({
36687
36728
  dx: (null !== (_a = child._dx) && void 0 !== _a ? _a : 0) + dx
36688
- }), child.skipMergeUpdate = !1) : (child.skipMergeUpdate = !0, child._dx = null !== (_b = child.attribute.dx) && void 0 !== _b ? _b : 0, child.setAttributes({
36729
+ }), child.skipMergeUpdate = !1) : (child._dx = null !== (_b = child.attribute.dx) && void 0 !== _b ? _b : 0, child.skipMergeUpdate = !0, child.setAttributes({
36689
36730
  dx: (null !== (_c = child.attribute.dx) && void 0 !== _c ? _c : 0) + dx
36690
36731
  }), child.skipMergeUpdate = !1), "number" == typeof child._dy ? (child.skipMergeUpdate = !0, child.setAttributes({
36691
36732
  dy: (null !== (_d = child._dy) && void 0 !== _d ? _d : 0) + dy
@@ -40301,17 +40342,28 @@
40301
40342
  const adaptiveColumns = [],
40302
40343
  sparklineColumns = [];
40303
40344
  let totalSparklineAbleWidth = 0;
40345
+ const maxWidthColumnMap = new Map(),
40346
+ minWidthColumnMap = new Map();
40304
40347
  for (let col = startCol; col < endColPlus1; col++) {
40305
40348
  const width = update && null !== (_a = newWidths[col]) && void 0 !== _a ? _a : table.getColWidth(col),
40306
40349
  maxWidth = table.getMaxColWidth(col),
40307
40350
  minWidth = table.getMinColWidth(col);
40308
- if (width !== maxWidth && width !== minWidth ? (actualWidth += width, adaptiveColumns.push(col)) : totalDrawWidth -= width, null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.shrinkSparklineFirst) {
40351
+ if (actualWidth += width, adaptiveColumns.push(col), maxWidth === width ? maxWidthColumnMap.set(col, width) : minWidth === width && minWidthColumnMap.set(col, width), null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.shrinkSparklineFirst) {
40309
40352
  "sparkline" === table.getBodyColumnType(col, 0) && (sparklineColumns.push({
40310
40353
  col: col,
40311
40354
  width: width
40312
40355
  }), totalSparklineAbleWidth += width - table.defaultColWidth);
40313
40356
  }
40314
40357
  }
40358
+ if (actualWidth > totalDrawWidth) for (const [col, width] of minWidthColumnMap) {
40359
+ totalDrawWidth -= width, actualWidth -= width;
40360
+ const index = adaptiveColumns.indexOf(col);
40361
+ -1 !== index && adaptiveColumns.splice(index, 1);
40362
+ } else if (actualWidth < totalDrawWidth) for (const [col, width] of maxWidthColumnMap) {
40363
+ totalDrawWidth -= width, actualWidth -= width;
40364
+ const index = adaptiveColumns.indexOf(col);
40365
+ -1 !== index && adaptiveColumns.splice(index, 1);
40366
+ }
40315
40367
  const factor = totalDrawWidth / actualWidth;
40316
40368
  if ((null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.shrinkSparklineFirst) && factor < 1 && actualWidth - totalDrawWidth < totalSparklineAbleWidth) for (let i = 0; i < sparklineColumns.length; i++) {
40317
40369
  const {
@@ -40387,7 +40439,7 @@
40387
40439
  vtableMergeName: vtableMergeName,
40388
40440
  vtableMerge: vtableMerge
40389
40441
  } = null != rawRecord ? rawRecord : {};
40390
- 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));
40442
+ 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) : void 0 !== vtableMergeName && (value = vtableMergeName));
40391
40443
  }
40392
40444
  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";
40393
40445
  if (isPromise(value)) {
@@ -50355,7 +50407,7 @@
50355
50407
  }
50356
50408
  constructor(container, options = {}) {
50357
50409
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
50358
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
50410
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
50359
50411
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
50360
50412
  options: options,
50361
50413
  container: container
@@ -53725,7 +53777,7 @@
53725
53777
  class SimpleHeaderLayoutMap {
53726
53778
  constructor(table, columns, showHeader, hierarchyIndent) {
53727
53779
  var _a, _b;
53728
- this.seqId = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0, this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0, this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0, this._cellRangeMap = new Map(), this._showHeader = showHeader, this._table = table, this._columns = [], this._columnsIncludeHided = [], this._headerCellIds = [], this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20, this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment, this.columnHierarchyType = table.options.headerHierarchyType, this.columnExpandLevel = null !== (_a = table.options.headerExpandLevel) && void 0 !== _a ? _a : 1, this.columnTree = new DimensionTree(columns, {
53780
+ this.seqId = 0, this._columnMaxDepth = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0, this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0, this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0, this._cellRangeMap = new Map(), this._showHeader = showHeader, this._table = table, this._columns = [], this._columnsIncludeHided = [], this._headerCellIds = [], this._columnMaxDepth = this._calculateMaxDepth(columns), this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20, this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment, this.columnHierarchyType = table.options.headerHierarchyType, this.columnExpandLevel = null !== (_a = table.options.headerExpandLevel) && void 0 !== _a ? _a : 1, this.columnTree = new DimensionTree(columns, {
53729
53781
  seqId: 0
53730
53782
  }, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
53731
53783
  }
@@ -54227,7 +54279,16 @@
54227
54279
  getRecordStartRowByRecordIndex(index) {
54228
54280
  return (this.hasAggregationOnTopCount ? this.headerLevelCount + 1 : this.headerLevelCount) + index;
54229
54281
  }
54230
- _addHeaders(row, column, roots, hideColumnsSubHeader) {
54282
+ _calculateMaxDepth(columns, currentDepth = 0) {
54283
+ let maxDepth = currentDepth;
54284
+ return columns.forEach(col => {
54285
+ if (col.columns && col.columns.length > 0) {
54286
+ const childDepth = this._calculateMaxDepth(col.columns, currentDepth + 1);
54287
+ childDepth > maxDepth && (maxDepth = childDepth);
54288
+ }
54289
+ }), maxDepth;
54290
+ }
54291
+ _addHeaders(row, column, roots, hideColumnsSubHeader, lastLevelSpan) {
54231
54292
  const results = [],
54232
54293
  rowCells = this._newRow(row, hideColumnsSubHeader);
54233
54294
  return column.forEach(hd => {
@@ -54247,11 +54308,16 @@
54247
54308
  columnWidthComputeMode: hd.columnWidthComputeMode
54248
54309
  };
54249
54310
  results[id] = cell;
54250
- for (let r = row - 1; r >= 0; r--) this._headerCellIds[r] && (this._headerCellIds[r][col] = roots[r]);
54251
- hideColumnsSubHeader ? this._headerCellIds[row - 1] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
54311
+ let maxRow = row;
54312
+ if (hd.levelSpan) {
54313
+ maxRow = Math.min(row + hd.levelSpan - 1, this._columnMaxDepth - 1);
54314
+ for (let r = row; r <= maxRow; r++) this._headerCellIds[r] || (this._headerCellIds[r] = []), void 0 === this._headerCellIds[r][col] && (this._headerCellIds[r][col] = id);
54315
+ }
54316
+ if (lastLevelSpan) for (let r = maxRow - 1; r >= 0; r--) this._headerCellIds[r] && void 0 === this._headerCellIds[r][col] && void 0 !== roots[maxRow - lastLevelSpan] && (this._headerCellIds[r][col] = roots[maxRow - lastLevelSpan]);else for (let r = maxRow - 1; r >= 0; r--) this._headerCellIds[r] && void 0 === this._headerCellIds[r][col] && void 0 !== roots[r] && (this._headerCellIds[r][col] = roots[r]);
54317
+ hideColumnsSubHeader ? this._headerCellIds[row - 1] && void 0 !== this._headerCellIds[row - 1][col] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
54252
54318
  const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
54253
54319
  if (hd.columns && expand) {
54254
- !hd.columns.every(c => c.hide) && this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
54320
+ !hd.columns.every(c => c.hide) && this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
54255
54321
  } else {
54256
54322
  const colDef = {
54257
54323
  id: this.seqId++,
@@ -54520,11 +54586,15 @@
54520
54586
  this.listenersId.push(doubleClickEventId, clickEventId);
54521
54587
  }
54522
54588
  startEditCell(col, row, value) {
54523
- var _a, _b, _c, _d, _e;
54589
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
54524
54590
  if (this.editingEditor) return;
54525
54591
  const editor = this.table.getEditor(col, row);
54526
54592
  if (editor) {
54527
- if (null === (_b = null === (_a = this.table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isAggregation) || void 0 === _b ? void 0 : _b.call(_a, col, row)) return;
54593
+ if (null === (_b = null === (_a = this.table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isAggregation) || void 0 === _b ? void 0 : _b.call(_a, col, row)) {
54594
+ const isPivotTable = null === (_d = (_c = this.table).isPivotTable) || void 0 === _d ? void 0 : _d.call(_c),
54595
+ updateAggregationOnEditCell = !!isPivotTable && (null === (_f = null === (_e = this.table.internalProps) || void 0 === _e ? void 0 : _e.dataConfig) || void 0 === _f ? void 0 : _f.updateAggregationOnEditCell);
54596
+ if (!isPivotTable || isPivotTable && updateAggregationOnEditCell) return;
54597
+ }
54528
54598
  const record = this.table.getCellRawRecord(col, row);
54529
54599
  if (null == record ? void 0 : record.vtableMerge) return;
54530
54600
  this.editingEditor || (this.editCell = {
@@ -54541,9 +54611,9 @@
54541
54611
  height: rect.height
54542
54612
  }
54543
54613
  };
54544
- col === this.table.colCount - 1 ? referencePosition.rect.width = rect.width - 1 : referencePosition.rect.width = rect.width + 1, row === this.table.rowCount - 1 ? referencePosition.rect.height = rect.height - 1 : referencePosition.rect.height = rect.height + 1, editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
54614
+ col === this.table.colCount - 1 ? referencePosition.rect.width = rect.width - 1 : referencePosition.rect.width = rect.width + 1, row === this.table.rowCount - 1 ? referencePosition.rect.height = rect.height - 1 : referencePosition.rect.height = rect.height + 1, editor.beginEditing, null === (_g = editor.beginEditing) || void 0 === _g || _g.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_h = editor.bindSuccessCallback) || void 0 === _h || _h.call(editor, () => {
54545
54615
  this.completeEdit();
54546
- }), null === (_e = editor.onStart) || void 0 === _e || _e.call(editor, {
54616
+ }), null === (_j = editor.onStart) || void 0 === _j || _j.call(editor, {
54547
54617
  value: dataValue,
54548
54618
  endEdit: () => {
54549
54619
  this.completeEdit();
@@ -55158,7 +55228,7 @@
55158
55228
  col: this.stateManager.hover.cellPos.col,
55159
55229
  row: this.stateManager.hover.cellPos.row
55160
55230
  };
55161
- this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), (null == options ? void 0 : options.clearColWidthCache) && this.internalProps._widthResizedColMap.clear(), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
55231
+ this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), (null == options ? void 0 : options.clearColWidthCache) && this.internalProps._widthResizedColMap.clear(), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
55162
55232
  }
55163
55233
  addColumn(column) {
55164
55234
  const columns = this.options.columns;