@visactor/vtable-gantt 1.22.11-alpha.9 → 1.22.12-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35301,12 +35301,12 @@
35301
35301
  difference = (adjusted_date.getTime() - startDate.getTime()) / msInWeek;
35302
35302
  break;
35303
35303
  case 'month':
35304
+ const startDaysInMonth = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0).getDate();
35305
+ const adjustedDaysInMonth = new Date(adjusted_date.getFullYear(), adjusted_date.getMonth() + 1, 0).getDate();
35304
35306
  difference =
35305
35307
  (adjusted_date.getFullYear() - startDate.getFullYear()) * 12 +
35306
35308
  (adjusted_date.getMonth() - startDate.getMonth());
35307
- difference +=
35308
- (adjusted_date.getDate() - startDate.getDate()) /
35309
- new Date(adjusted_date.getFullYear(), adjusted_date.getMonth() + 1, 0).getDate();
35309
+ difference += adjusted_date.getDate() / adjustedDaysInMonth - startDate.getDate() / startDaysInMonth;
35310
35310
  break;
35311
35311
  case 'quarter':
35312
35312
  difference =
@@ -38455,6 +38455,24 @@
38455
38455
  }, delay));
38456
38456
  };
38457
38457
  }
38458
+ function cancellableThrottle(func, delay) {
38459
+ let timer = null,
38460
+ lastArgs = null,
38461
+ context = null;
38462
+ return {
38463
+ throttled: function (...args) {
38464
+ lastArgs = args, context = this, timer || (timer = setTimeout(() => {
38465
+ lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
38466
+ }, delay));
38467
+ },
38468
+ cancel: () => {
38469
+ timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
38470
+ },
38471
+ flush: () => {
38472
+ timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
38473
+ }
38474
+ };
38475
+ }
38458
38476
  function pad(num, totalChars) {
38459
38477
  for (num = `${num}`; num.length < totalChars;) num = "0" + num;
38460
38478
  return num;
@@ -38718,7 +38736,6 @@
38718
38736
  AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
38719
38737
  AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
38720
38738
  CHANGE_CELL_VALUE: "change_cell_value",
38721
- CHANGE_CELL_VALUES: "change_cell_values",
38722
38739
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
38723
38740
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
38724
38741
  DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
@@ -40851,24 +40868,6 @@
40851
40868
  }
40852
40869
  }
40853
40870
  }
40854
- changeFieldValueByRecordIndex(value, recordIndex, field, table) {
40855
- var _a, _b, _c, _d;
40856
- if (null === field) return;
40857
- if (null == recordIndex) return;
40858
- const rawKey = recordIndex.toString();
40859
- if (!this.beforeChangedRecordsMap.has(rawKey)) {
40860
- const rawRecords = Array.isArray(null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) ? this.dataSourceObj.records : null,
40861
- originRecord = rawRecords ? Array.isArray(recordIndex) ? getValueFromDeepArray(rawRecords, recordIndex) : rawRecords[recordIndex] : void 0;
40862
- this.beforeChangedRecordsMap.set(rawKey, null !== (_b = cloneDeep(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _b ? _b : {});
40863
- }
40864
- if ("string" == typeof field || "number" == typeof field) {
40865
- const beforeChangedValue = null === (_c = this.beforeChangedRecordsMap.get(rawKey)) || void 0 === _c ? void 0 : _c[field],
40866
- rawRecords = Array.isArray(null === (_d = this.dataSourceObj) || void 0 === _d ? void 0 : _d.records) ? this.dataSourceObj.records : null,
40867
- record = rawRecords ? Array.isArray(recordIndex) ? getValueFromDeepArray(rawRecords, recordIndex) : rawRecords[recordIndex] : void 0;
40868
- let formatValue = value;
40869
- "number" == typeof beforeChangedValue && isAllDigits(value) && (formatValue = parseFloat(value)), record ? record[field] = formatValue : rawRecords && "number" == typeof recordIndex && (rawRecords[recordIndex] = "Array" === this.addRecordRule ? [] : {}, rawRecords[recordIndex][field] = formatValue);
40870
- }
40871
- }
40872
40871
  cacheBeforeChangedRecord(dataIndex, table) {
40873
40872
  var _a;
40874
40873
  if (!this.beforeChangedRecordsMap.has(dataIndex.toString())) {
@@ -40884,92 +40883,41 @@
40884
40883
  Array.isArray(indexed) || this.records.splice(indexed, 1, record);
40885
40884
  }
40886
40885
  }
40887
- _getRawRecordsArray() {
40886
+ addRecord(record, index) {
40888
40887
  var _a;
40889
- const rawRecords = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records;
40890
- return Array.isArray(rawRecords) ? rawRecords : null;
40891
- }
40892
- _hasFilterInEffect() {
40893
- var _a, _b, _c, _d, _e;
40894
- return (null !== (_c = null === (_b = null === (_a = this.dataConfig) || void 0 === _a ? void 0 : _a.filterRules) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) >= 1 || (null !== (_e = null === (_d = this.lastFilterRules) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0) >= 1;
40895
- }
40896
- _normalizeInsertIndex(index, length) {
40897
- return null == index || index > length ? length : index < 0 ? 0 : index;
40898
- }
40899
- _mapViewInsertIndexToRawInsertIndex(rawRecords, viewIndex) {
40900
- if (0 === this.records.length) return rawRecords.length;
40901
- if (viewIndex <= 0) {
40902
- const firstVisibleRecord = this.records[0],
40903
- rawIndex = rawRecords.indexOf(firstVisibleRecord);
40904
- return rawIndex >= 0 ? rawIndex : 0;
40905
- }
40906
- if (viewIndex >= this.records.length) {
40907
- const lastVisibleRecord = this.records[this.records.length - 1],
40908
- rawIndex = rawRecords.indexOf(lastVisibleRecord);
40909
- return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
40910
- }
40911
- const prevRecord = this.records[viewIndex - 1],
40912
- rawIndex = rawRecords.indexOf(prevRecord);
40913
- return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
40914
- }
40915
- _resetIndexingFromViewRecords() {
40916
- if (this._sourceLength = this.records.length, this.currentIndexedData = Array.from({
40917
- length: this._sourceLength
40918
- }, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination) return this.pagination.totalCount = this._sourceLength, void this.updatePagerData();
40919
- this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
40920
- }
40921
- addRecord(record, index, syncToOriginalRecords = !1) {
40922
- var _a, _b, _c;
40923
- if (!syncToOriginalRecords) {
40924
- if (Array.isArray(this.records)) {
40925
- this.records.splice(index, 0, record), this.adjustBeforeChangedRecordsMap(index, 1), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1;
40926
- for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].push(record);
40927
- if ("tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination) {
40928
- this.pagination.totalCount = this._sourceLength;
40929
- const {
40930
- perPageCount: perPageCount,
40931
- currentPage: currentPage
40932
- } = this.pagination;
40933
- index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
40934
- } else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
40935
- (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, 1);
40936
- }
40937
- return;
40888
+ if (Array.isArray(this.records)) {
40889
+ this.records.splice(index, 0, record), this.adjustBeforeChangedRecordsMap(index, 1), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1;
40890
+ for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].push(record);
40891
+ if ("tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination) {
40892
+ this.pagination.totalCount = this._sourceLength;
40893
+ const {
40894
+ perPageCount: perPageCount,
40895
+ currentPage: currentPage
40896
+ } = this.pagination;
40897
+ index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
40898
+ } else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
40899
+ (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, 1);
40938
40900
  }
40939
- const rawRecords = this._getRawRecordsArray();
40940
- if (!rawRecords) return;
40941
- const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
40942
- rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
40943
- rawRecords.splice(rawInsertIndex, 0, record), syncToOriginalRecords && this._hasFilterInEffect() && this.markForceVisibleRecord(record), this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.added) && this.dataSourceObj.added(rawInsertIndex, 1);
40944
40901
  }
40945
- addRecords(recordArr, index, syncToOriginalRecords = !1) {
40946
- var _a, _b, _c;
40947
- if (!syncToOriginalRecords) {
40948
- if (Array.isArray(this.records)) {
40949
- if (Array.isArray(recordArr)) {
40950
- this.records.splice(index, 0, ...recordArr), this.adjustBeforeChangedRecordsMap(index, recordArr.length);
40951
- for (let i = 0; i < recordArr.length; i++) this.currentIndexedData.push(this.currentIndexedData.length);
40952
- this._sourceLength += recordArr.length;
40953
- for (let i = 0; i < this.fieldAggregators.length; i++) for (let j = 0; j < recordArr.length; j++) this.fieldAggregators[i].push(recordArr[j]);
40954
- }
40955
- if (this.userPagination) {
40956
- this.pagination.totalCount = this._sourceLength;
40957
- const {
40958
- perPageCount: perPageCount,
40959
- currentPage: currentPage
40960
- } = this.pagination;
40961
- index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
40962
- } else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
40963
- (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, recordArr.length);
40902
+ addRecords(recordArr, index) {
40903
+ var _a;
40904
+ if (Array.isArray(this.records)) {
40905
+ if (Array.isArray(recordArr)) {
40906
+ this.records.splice(index, 0, ...recordArr), this.adjustBeforeChangedRecordsMap(index, recordArr.length);
40907
+ for (let i = 0; i < recordArr.length; i++) this.currentIndexedData.push(this.currentIndexedData.length);
40908
+ this._sourceLength += recordArr.length;
40909
+ for (let i = 0; i < this.fieldAggregators.length; i++) for (let j = 0; j < recordArr.length; j++) this.fieldAggregators[i].push(recordArr[j]);
40964
40910
  }
40965
- return;
40911
+ if (this.userPagination) {
40912
+ this.pagination.totalCount = this._sourceLength;
40913
+ const {
40914
+ perPageCount: perPageCount,
40915
+ currentPage: currentPage
40916
+ } = this.pagination;
40917
+ index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
40918
+ } else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
40919
+ (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, recordArr.length);
40966
40920
  }
40967
- const rawRecords = this._getRawRecordsArray();
40968
- if (!rawRecords || !Array.isArray(recordArr) || 0 === recordArr.length) return;
40969
- const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
40970
- rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
40971
- if (rawRecords.splice(rawInsertIndex, 0, ...recordArr), syncToOriginalRecords && this._hasFilterInEffect()) for (let i = 0; i < recordArr.length; i++) this.markForceVisibleRecord(recordArr[i]);
40972
- this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.added) && this.dataSourceObj.added(rawInsertIndex, recordArr.length);
40973
40921
  }
40974
40922
  addRecordForSorted(record) {
40975
40923
  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));
@@ -40985,49 +40933,27 @@
40985
40933
  }
40986
40934
  }
40987
40935
  adjustBeforeChangedRecordsMap(insertIndex, insertCount, type = "add") {
40988
- const delta = "add" === type ? insertCount : -insertCount,
40989
- numericKeys = [];
40990
- this.beforeChangedRecordsMap.forEach((_, key) => {
40991
- const numKey = Number(key);
40992
- Number.isInteger(numKey) && numKey.toString() === key && numKey >= insertIndex && numericKeys.push(numKey);
40993
- }), numericKeys.sort((a, b) => "add" === type ? b - a : a - b);
40994
- for (let i = 0; i < numericKeys.length; i++) {
40995
- const key = numericKeys[i],
40996
- record = this.beforeChangedRecordsMap.get(key.toString());
40997
- this.beforeChangedRecordsMap.delete(key.toString()), this.beforeChangedRecordsMap.set((key + delta).toString(), record);
40998
- }
40999
- }
41000
- deleteRecords(recordIndexs, syncToOriginalRecords = !1) {
41001
- var _a, _b, _c;
41002
- if (!syncToOriginalRecords) {
41003
- if (Array.isArray(this.records)) {
41004
- const realDeletedRecordIndexs = [],
41005
- recordIndexsMaxToMin = recordIndexs.sort((a, b) => b - a);
41006
- for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
41007
- const recordIndex = recordIndexsMaxToMin[index];
41008
- if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
41009
- this.adjustBeforeChangedRecordsMap(recordIndex, 1, "delete"), realDeletedRecordIndexs.push(recordIndex);
41010
- const deletedRecord = this.records[recordIndex];
41011
- for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].deleteRecord(deletedRecord);
41012
- this.records.splice(recordIndex, 1), this.currentIndexedData.pop(), this._sourceLength -= 1;
41013
- }
41014
- return this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength), this.updatePagerData(), (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.deleted) && this.dataSourceObj.deleted(realDeletedRecordIndexs), realDeletedRecordIndexs;
41015
- }
41016
- return [];
41017
- }
41018
- const rawRecords = this._getRawRecordsArray();
41019
- if (!rawRecords || !Array.isArray(this.records)) return [];
41020
- const realDeletedRecordIndexs = [],
41021
- recordIndexsMaxToMin = recordIndexs.slice().sort((a, b) => b - a),
41022
- rawDeletedIndexs = [];
41023
- for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
41024
- const viewIndex = recordIndexsMaxToMin[index];
41025
- if (viewIndex >= this.records.length || viewIndex < 0) continue;
41026
- const deletedRecord = this.records[viewIndex],
41027
- rawIndex = rawRecords.indexOf(deletedRecord);
41028
- rawIndex >= 0 && (rawRecords.splice(rawIndex, 1), rawDeletedIndexs.push(rawIndex)), realDeletedRecordIndexs.push(viewIndex);
40936
+ for (let key = this.beforeChangedRecordsMap.size - 1; key >= insertIndex; key--) {
40937
+ const record = this.beforeChangedRecordsMap.get(key.toString());
40938
+ this.beforeChangedRecordsMap.delete(key.toString()), this.beforeChangedRecordsMap.set((key + ("add" === type ? insertCount : -insertCount)).toString(), record);
41029
40939
  }
41030
- return this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules), (null === (_c = this.dataSourceObj) || void 0 === _c ? void 0 : _c.deleted) && this.dataSourceObj.deleted(rawDeletedIndexs), realDeletedRecordIndexs;
40940
+ }
40941
+ deleteRecords(recordIndexs) {
40942
+ var _a;
40943
+ if (Array.isArray(this.records)) {
40944
+ const realDeletedRecordIndexs = [],
40945
+ recordIndexsMaxToMin = recordIndexs.sort((a, b) => b - a);
40946
+ for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
40947
+ const recordIndex = recordIndexsMaxToMin[index];
40948
+ if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
40949
+ this.adjustBeforeChangedRecordsMap(recordIndex, 1, "delete"), realDeletedRecordIndexs.push(recordIndex);
40950
+ const deletedRecord = this.records[recordIndex];
40951
+ for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].deleteRecord(deletedRecord);
40952
+ this.records.splice(recordIndex, 1), this.currentIndexedData.pop(), this._sourceLength -= 1;
40953
+ }
40954
+ return this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength), this.updatePagerData(), (null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.deleted) && this.dataSourceObj.deleted(realDeletedRecordIndexs), realDeletedRecordIndexs;
40955
+ }
40956
+ return [];
41031
40957
  }
41032
40958
  deleteRecordsForSorted(recordIndexs) {
41033
40959
  if (Array.isArray(this.records)) {
@@ -41041,34 +40967,18 @@
41041
40967
  this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength), this.beforeChangedRecordsMap.clear();
41042
40968
  }
41043
40969
  }
41044
- updateRecords(records, recordIndexs, syncToOriginalRecords = !1) {
41045
- var _a;
41046
- if (!syncToOriginalRecords) {
41047
- const realDeletedRecordIndexs = [];
41048
- for (let index = 0; index < recordIndexs.length; index++) {
41049
- const recordIndex = recordIndexs[index];
41050
- 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 {
41051
- if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
41052
- this.beforeChangedRecordsMap.delete(recordIndex.toString()), realDeletedRecordIndexs.push(recordIndex);
41053
- for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
41054
- this.records[recordIndex] = records[index];
41055
- }
41056
- }
41057
- return this.userPagination && this.updatePagerData(), realDeletedRecordIndexs;
41058
- }
41059
- const rawRecords = this._getRawRecordsArray();
41060
- if (!rawRecords || !Array.isArray(this.records)) return [];
41061
- const realUpdatedIndexs = [];
40970
+ updateRecords(records, recordIndexs) {
40971
+ const realDeletedRecordIndexs = [];
41062
40972
  for (let index = 0; index < recordIndexs.length; index++) {
41063
40973
  const recordIndex = recordIndexs[index];
41064
- if (Array.isArray(recordIndex)) this.beforeChangedRecordsMap.delete(recordIndex.toString()), realUpdatedIndexs.push(recordIndex), recordIndex.slice(0, -1).reduce((acc, key) => (void 0 === acc[key] && (acc[key] = {}), acc[key].children), rawRecords)[recordIndex[recordIndex.length - 1]] = records[index];else {
41065
- if (recordIndex >= this.records.length || recordIndex < 0) continue;
41066
- const oldRecord = this.records[recordIndex],
41067
- rawIndex = rawRecords.indexOf(oldRecord);
41068
- rawIndex >= 0 && (rawRecords[rawIndex] = records[index]), realUpdatedIndexs.push(recordIndex);
40974
+ 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 {
40975
+ if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
40976
+ this.beforeChangedRecordsMap.delete(recordIndex.toString()), realDeletedRecordIndexs.push(recordIndex);
40977
+ for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
40978
+ this.records[recordIndex] = records[index];
41069
40979
  }
41070
40980
  }
41071
- return this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_a = this.dataConfig) || void 0 === _a ? void 0 : _a.filterRules), realUpdatedIndexs;
40981
+ return this.userPagination && this.updatePagerData(), realDeletedRecordIndexs;
41072
40982
  }
41073
40983
  updateRecordsForSorted(records, recordIndexs) {
41074
40984
  for (let index = 0; index < recordIndexs.length; index++) {
@@ -41136,30 +41046,23 @@
41136
41046
  setSortedIndexMap(field, filedMap) {
41137
41047
  this.sortedIndexMap.set(field, filedMap);
41138
41048
  }
41139
- markForceVisibleRecord(record) {
41140
- !record || "object" != typeof record && "function" != typeof record || (this._forceVisibleRecords || (this._forceVisibleRecords = new WeakSet()), this._forceVisibleRecords.add(record));
41141
- }
41142
- clearForceVisibleRecords() {
41143
- this._forceVisibleRecords = void 0;
41144
- }
41145
41049
  clearFilteredChildren(record) {
41146
41050
  var _a, _b;
41147
41051
  record.filteredChildren = void 0;
41148
41052
  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]);
41149
41053
  }
41150
41054
  filterRecord(record) {
41151
- var _a, _b, _c, _d;
41152
- if (null === (_a = this._forceVisibleRecords) || void 0 === _a ? void 0 : _a.has(record)) return !0;
41055
+ var _a, _b, _c;
41153
41056
  let isReserved = !0;
41154
- for (let i = 0; i < (null === (_b = this.dataConfig.filterRules) || void 0 === _b ? void 0 : _b.length); i++) {
41155
- const filterRule = null === (_c = this.dataConfig) || void 0 === _c ? void 0 : _c.filterRules[i];
41057
+ for (let i = 0; i < (null === (_a = this.dataConfig.filterRules) || void 0 === _a ? void 0 : _a.length); i++) {
41058
+ const filterRule = null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.filterRules[i];
41156
41059
  if (filterRule.filterKey) {
41157
41060
  const filterValue = record[filterRule.filterKey];
41158
41061
  if (-1 === filterRule.filteredValues.indexOf(filterValue)) {
41159
41062
  isReserved = !1;
41160
41063
  break;
41161
41064
  }
41162
- } else if (!(null === (_d = filterRule.filterFunc) || void 0 === _d ? void 0 : _d.call(filterRule, record))) {
41065
+ } else if (!(null === (_c = filterRule.filterFunc) || void 0 === _c ? void 0 : _c.call(filterRule, record))) {
41163
41066
  isReserved = !1;
41164
41067
  break;
41165
41068
  }
@@ -47709,11 +47612,46 @@
47709
47612
  return hoverMode;
47710
47613
  }
47711
47614
 
47615
+ let brushingChartInstance,
47616
+ brushingChartInstanceCellPos = {
47617
+ col: -1,
47618
+ row: -1
47619
+ };
47620
+ function setBrushingChartInstance(chartInstance, col, row) {
47621
+ brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
47622
+ col: col,
47623
+ row: row
47624
+ };
47625
+ }
47626
+ function clearAndReleaseBrushingChartInstance(scenegraph) {
47627
+ var _a, _b, _c;
47628
+ enableTooltipToAllChartInstances();
47629
+ const cellGroup = scenegraph.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
47630
+ (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, scenegraph.table, {
47631
+ forceRelease: !0,
47632
+ releaseChartInstance: !0,
47633
+ releaseColumnChartInstance: !1,
47634
+ releaseRowChartInstance: !1,
47635
+ releaseAllChartInstance: !1
47636
+ })), isValid$1(chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col]) && delete chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col][brushingChartInstanceCellPos.row], isValid$1(chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row]) && delete chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row][brushingChartInstanceCellPos.col], brushingChartInstance = void 0, brushingChartInstanceCellPos = {
47637
+ col: -1,
47638
+ row: -1
47639
+ };
47640
+ }
47641
+ function getBrushingChartInstance() {
47642
+ return brushingChartInstance;
47643
+ }
47644
+ function getBrushingChartInstanceCellPos() {
47645
+ return brushingChartInstanceCellPos;
47646
+ }
47712
47647
  const chartInstanceListColumnByColumnDirection = {};
47713
47648
  const chartInstanceListRowByRowDirection = {};
47649
+ const delayRunDimensionHoverTimerForColumnDirection = [],
47650
+ delayRunDimensionHoverTimerForRowDirection = [],
47651
+ delayRunDimensionHoverTimerForViewRange = [];
47714
47652
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47715
47653
  var _a;
47716
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47654
+ clearDelayRunDimensionHoverTimerForColumnDirection(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47717
47655
  const {
47718
47656
  rowStart: rowStart
47719
47657
  } = table.getBodyVisibleRowRange();
@@ -47722,76 +47660,40 @@
47722
47660
  for (let i = rowStart; i <= rowEnd; i++) {
47723
47661
  const cellGroup = table.scenegraph.getCell(col, i),
47724
47662
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47725
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
47726
- var _a, _b, _c, _d, _e, _f;
47663
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
47664
+ const timer = setTimeout(() => {
47665
+ var _a, _b, _c, _d;
47727
47666
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47728
47667
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47729
47668
  let isShowTooltip = !isScatter;
47730
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
47731
- const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
47732
- {
47733
- rowEnd: rowEnd1
47734
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47735
- if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47736
- const {
47737
- rowEnd: rowEnd2
47738
- } = table.getBodyVisibleRowRange(0, 5);
47739
- isShowTooltip = rowEnd2 !== rowEnd;
47740
- }
47741
- } else if (i === rowStart && isShowTooltip) {
47742
- const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
47743
- {
47744
- rowStart: rowStart1
47745
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47746
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
47747
- const {
47748
- rowStart: rowStart2
47749
- } = table.getBodyVisibleRowRange(0, -5);
47750
- isShowTooltip = rowStart2 !== rowStart;
47751
- }
47752
- }
47753
- if (isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_f = (_e = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _f || _f.call(_e, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47754
- const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47669
+ if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table)), isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47670
+ const cellBoundry = table.getCellRelativeRect(col, i),
47671
+ bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47755
47672
  absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
47756
47673
  hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47757
47674
  tooltip: !1,
47758
47675
  showTooltipOption: {
47759
- x: canvasXY.x,
47760
- y: absolutePositionTop,
47676
+ x: canvasXY.x - cellBoundry.left,
47677
+ y: absolutePositionTop - cellBoundry.top,
47761
47678
  activeType: "dimension"
47762
47679
  }
47763
47680
  })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47764
47681
  tooltip: isShowTooltip,
47765
47682
  showTooltipOption: {
47766
- x: canvasXY.x,
47767
- y: absolutePositionTop,
47683
+ x: canvasXY.x - cellBoundry.left,
47684
+ y: absolutePositionTop - cellBoundry.top,
47768
47685
  activeType: "dimension"
47769
47686
  }
47770
47687
  });
47771
47688
  }
47772
47689
  }
47773
- }, 0), table.scenegraph.updateNextFrame();
47774
- }
47775
- }
47776
- function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
47777
- var _a;
47778
- if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
47779
- for (const i in chartInstanceListColumnByColumnDirection[col]) {
47780
- if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
47781
- const cellGroup = table.scenegraph.getCell(col, Number(i)),
47782
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47783
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
47784
- releaseChartInstance: !0,
47785
- releaseColumnChartInstance: !1,
47786
- releaseRowChartInstance: !1
47787
- }), chartInstanceListColumnByColumnDirection[col][i] = null);
47788
- }
47789
- delete chartInstanceListColumnByColumnDirection[col];
47690
+ }, 0);
47691
+ delayRunDimensionHoverTimerForColumnDirection.push(timer), table.scenegraph.updateNextFrame();
47790
47692
  }
47791
47693
  }
47792
47694
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47793
47695
  var _a;
47794
- isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47696
+ clearDelayRunDimensionHoverTimerForRowDirection(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47795
47697
  const {
47796
47698
  colStart: colStart
47797
47699
  } = table.getBodyVisibleColRange();
@@ -47800,64 +47702,162 @@
47800
47702
  for (let i = colStart; i <= colEnd; i++) {
47801
47703
  const cellGroup = table.scenegraph.getCell(i, row),
47802
47704
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47803
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
47705
+ chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
47706
+ const timer = setTimeout(() => {
47804
47707
  var _a, _b, _c, _d;
47805
47708
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
47806
47709
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47807
47710
  let isShowTooltip = !isScatter;
47808
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
47809
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47810
- {
47811
- colEnd: colEnd1
47812
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47813
- if (colEnd1 === colEnd) isShowTooltip = !0;else {
47814
- const {
47815
- colEnd: colEnd2
47816
- } = table.getBodyVisibleColRange(0, 5);
47817
- isShowTooltip = colEnd2 !== colEnd;
47818
- }
47819
- } else if (i === colStart && isShowTooltip) {
47820
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47821
- {
47822
- colStart: colStart1
47823
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47824
- if (colStart1 === colStart) isShowTooltip = !0;else {
47825
- const {
47826
- colStart: colStart2
47827
- } = table.getBodyVisibleColRange(0, -5);
47828
- isShowTooltip = colStart2 !== colStart;
47829
- }
47830
- }
47831
- if (isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47832
- const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47711
+ if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table)), isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47712
+ const cellBoundry = table.getCellRelativeRect(i, row),
47713
+ bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47833
47714
  absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
47834
47715
  hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47835
47716
  tooltip: !1,
47836
47717
  showTooltipOption: {
47837
- x: absolutePositionLeft,
47838
- y: canvasXY.y,
47718
+ x: absolutePositionLeft - cellBoundry.left,
47719
+ y: canvasXY.y - cellBoundry.top,
47839
47720
  activeType: "dimension"
47840
47721
  }
47841
47722
  })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47842
47723
  tooltip: isShowTooltip,
47843
47724
  showTooltipOption: {
47844
- x: absolutePositionLeft,
47845
- y: canvasXY.y,
47725
+ x: absolutePositionLeft - cellBoundry.left,
47726
+ y: canvasXY.y - cellBoundry.top,
47846
47727
  activeType: "dimension"
47847
47728
  }
47848
47729
  });
47849
47730
  }
47850
47731
  }
47851
- }, 0), table.scenegraph.updateNextFrame();
47732
+ }, 0);
47733
+ delayRunDimensionHoverTimerForRowDirection.push(timer), table.scenegraph.updateNextFrame();
47734
+ }
47735
+ }
47736
+ function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
47737
+ var _a;
47738
+ clearDelayRunDimensionHoverTimerForViewRange();
47739
+ const {
47740
+ rowStart: rowStart
47741
+ } = table.getBodyVisibleRowRange();
47742
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47743
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47744
+ const {
47745
+ colStart: colStart
47746
+ } = table.getBodyVisibleColRange();
47747
+ let colEnd = table.getBodyVisibleColRange().colEnd;
47748
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47749
+ for (let col = colStart; col <= colEnd; col++) {
47750
+ isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47751
+ for (let i = rowStart; i <= rowEnd; i++) {
47752
+ const cellGroup = table.scenegraph.getCell(col, i),
47753
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47754
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
47755
+ const timer = setTimeout(() => {
47756
+ var _a, _b;
47757
+ if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47758
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47759
+ let isShowTooltip = !0;
47760
+ "object" == typeof chartDimensionLinkage && (deactivate ? (chartInstanceListColumnByColumnDirection[col][i].setHovered(), chartInstanceListColumnByColumnDirection[col][i].hideTooltip()) : (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table), isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table), chartInstanceListColumnByColumnDirection[col][i].setHovered(datum), isShowTooltip && chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
47761
+ activeType: "mark"
47762
+ })));
47763
+ }
47764
+ }, 0);
47765
+ delayRunDimensionHoverTimerForViewRange.push(timer), table.scenegraph.updateNextFrame();
47766
+ }
47767
+ }
47768
+ }
47769
+ function checkIsShowTooltipForEdgeRow(row, table) {
47770
+ var _a, _b;
47771
+ let isShowTooltip = !0;
47772
+ const {
47773
+ rowStart: rowStart
47774
+ } = table.getBodyVisibleRowRange();
47775
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47776
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47777
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47778
+ if (row === rowEnd && isShowTooltip) {
47779
+ const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
47780
+ {
47781
+ rowEnd: rowEnd1
47782
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47783
+ if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47784
+ const {
47785
+ rowEnd: rowEnd2
47786
+ } = table.getBodyVisibleRowRange(0, 5);
47787
+ isShowTooltip = rowEnd2 !== rowEnd;
47788
+ }
47789
+ } else if (row === rowStart && isShowTooltip) {
47790
+ const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
47791
+ {
47792
+ rowStart: rowStart1
47793
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47794
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
47795
+ const {
47796
+ rowStart: rowStart2
47797
+ } = table.getBodyVisibleRowRange(0, -5);
47798
+ isShowTooltip = rowStart2 !== rowStart;
47799
+ }
47852
47800
  }
47801
+ return isShowTooltip;
47853
47802
  }
47854
- function clearChartInstanceListByRowDirection(row, excludedCol, table) {
47803
+ function checkIsShowTooltipForEdgeColumn(col, table) {
47804
+ let isShowTooltip = !0;
47805
+ const {
47806
+ colStart: colStart
47807
+ } = table.getBodyVisibleColRange();
47808
+ let colEnd = table.getBodyVisibleColRange().colEnd;
47809
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47810
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47811
+ if (col === colEnd && isShowTooltip) {
47812
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47813
+ {
47814
+ colEnd: colEnd1
47815
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47816
+ if (colEnd1 === colEnd) isShowTooltip = !0;else {
47817
+ const {
47818
+ colEnd: colEnd2
47819
+ } = table.getBodyVisibleColRange(0, 5);
47820
+ isShowTooltip = colEnd2 !== colEnd;
47821
+ }
47822
+ } else if (col === colStart && isShowTooltip) {
47823
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47824
+ {
47825
+ colStart: colStart1
47826
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47827
+ if (colStart1 === colStart) isShowTooltip = !0;else {
47828
+ const {
47829
+ colStart: colStart2
47830
+ } = table.getBodyVisibleColRange(0, -5);
47831
+ isShowTooltip = colStart2 !== colStart;
47832
+ }
47833
+ }
47834
+ return isShowTooltip;
47835
+ }
47836
+ function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
47837
+ var _a;
47838
+ if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
47839
+ for (const i in chartInstanceListColumnByColumnDirection[col]) {
47840
+ if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
47841
+ const cellGroup = table.scenegraph.getCell(col, Number(i)),
47842
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47843
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
47844
+ forceRelease: forceRelease,
47845
+ releaseChartInstance: !0,
47846
+ releaseColumnChartInstance: !1,
47847
+ releaseRowChartInstance: !1
47848
+ }), chartInstanceListColumnByColumnDirection[col][i] = null);
47849
+ }
47850
+ delete chartInstanceListColumnByColumnDirection[col];
47851
+ }
47852
+ }
47853
+ function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
47855
47854
  var _a;
47856
47855
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
47857
47856
  if (isValid$1(excludedCol) && Number(i) === excludedCol) continue;
47858
47857
  const cellGroup = table.scenegraph.getCell(Number(i), row),
47859
47858
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47860
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
47859
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
47860
+ forceRelease: forceRelease,
47861
47861
  releaseChartInstance: !0,
47862
47862
  releaseColumnChartInstance: !1,
47863
47863
  releaseRowChartInstance: !1
@@ -47865,6 +47865,40 @@
47865
47865
  }
47866
47866
  delete chartInstanceListRowByRowDirection[row];
47867
47867
  }
47868
+ function clearDelayRunDimensionHoverTimerForColumnDirection() {
47869
+ for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
47870
+ delayRunDimensionHoverTimerForColumnDirection.length = 0;
47871
+ }
47872
+ function clearDelayRunDimensionHoverTimerForRowDirection() {
47873
+ for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
47874
+ delayRunDimensionHoverTimerForRowDirection.length = 0;
47875
+ }
47876
+ function clearDelayRunDimensionHoverTimerForViewRange() {
47877
+ for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
47878
+ delayRunDimensionHoverTimerForViewRange.length = 0;
47879
+ }
47880
+ function clearDelayRunDimensionHoverTimers() {
47881
+ for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
47882
+ delayRunDimensionHoverTimerForColumnDirection.length = 0;
47883
+ for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
47884
+ delayRunDimensionHoverTimerForRowDirection.length = 0;
47885
+ for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
47886
+ delayRunDimensionHoverTimerForViewRange.length = 0;
47887
+ }
47888
+ function clearAllChartInstanceList(table, forceRelease = !1) {
47889
+ clearDelayRunDimensionHoverTimers();
47890
+ for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
47891
+ for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
47892
+ }
47893
+ let disabledTooltipToAllChartInstances = !1;
47894
+ function isDisabledTooltipToAllChartInstances() {
47895
+ return disabledTooltipToAllChartInstances;
47896
+ }
47897
+ function enableTooltipToAllChartInstances() {
47898
+ disabledTooltipToAllChartInstances = !1;
47899
+ for (const col in chartInstanceListColumnByColumnDirection) for (const row in chartInstanceListColumnByColumnDirection[col]) chartInstanceListColumnByColumnDirection[col][row].disableTooltip(!1);
47900
+ for (const row in chartInstanceListRowByRowDirection) for (const col in chartInstanceListRowByRowDirection[row]) chartInstanceListRowByRowDirection[row][col].disableTooltip(!1);
47901
+ }
47868
47902
 
47869
47903
  function isValidAlignDomain(domain) {
47870
47904
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -48498,7 +48532,7 @@
48498
48532
  const CHART_NUMBER_TYPE = genNumberType();
48499
48533
  class Chart extends Rect$2 {
48500
48534
  constructor(isShareChartSpec, params) {
48501
- if (super(params), this.type = "chart", this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
48535
+ if (super(params), this.type = "chart", this.activeChartInstanceLastViewBox = null, this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
48502
48536
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
48503
48537
  renderCanvas: params.canvas,
48504
48538
  mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
@@ -48519,7 +48553,7 @@
48519
48553
  }
48520
48554
  }
48521
48555
  activate(table) {
48522
- var _a, _b, _c, _d, _e;
48556
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
48523
48557
  if (this.activeChartInstance) return;
48524
48558
  const {
48525
48559
  col: col,
@@ -48538,7 +48572,7 @@
48538
48572
  y1: y1 - table.scrollTop,
48539
48573
  y2: y2 - table.scrollTop
48540
48574
  });
48541
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.release(), this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
48575
+ this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
48542
48576
  renderCanvas: this.attribute.canvas,
48543
48577
  mode: "desktop-browser",
48544
48578
  canvasControled: !1,
@@ -48572,7 +48606,7 @@
48572
48606
  layer.main && drawParams.clear && hoverColor && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
48573
48607
  }
48574
48608
  },
48575
- componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
48609
+ componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
48576
48610
  tooltip: {
48577
48611
  dimension: !1,
48578
48612
  mark: !0
@@ -48583,16 +48617,43 @@
48583
48617
  const chartStage = this.activeChartInstance.getStage(),
48584
48618
  matrix = this.globalTransMatrix.clone(),
48585
48619
  stageMatrix = this.stage.window.getViewBoxTransform();
48620
+ let brushChangeThrottle;
48586
48621
  matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, this.activeChartInstance), this.activeChartInstance.on("click", params => {
48622
+ var _a, _b, _c;
48623
+ !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? this.attribute.spec.interactions.find(interaction => "element-select" === interaction.type && interaction.isMultiple) ? table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "multiple-select") : table.scenegraph.updateChartState(null, void 0) : !0 === (null === (_b = this.attribute.spec.select) || void 0 === _b ? void 0 : _b.enable) && "multiple" === (null === (_c = this.attribute.spec.select) || void 0 === _c ? void 0 : _c.mode) ? table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "multiple-select") : Chart.temp && (table.scenegraph.updateChartState(null, "brush"), table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "click"));
48624
+ }), (null === (_d = table.options.chartDimensionLinkage) || void 0 === _d ? void 0 : _d.listenBrushChange) && (brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), null !== (_f = null === (_e = table.options.chartDimensionLinkage) || void 0 === _e ? void 0 : _e.brushChangeDelay) && void 0 !== _f ? _f : 100), this.activeChartInstance.on("brushChange", params => {
48587
48625
  var _a;
48588
- !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum);
48626
+ brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
48627
+ })), this.activeChartInstance.on("brushStart", params => {
48628
+ const brushingChartInstance = getBrushingChartInstance();
48629
+ brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && clearAndReleaseBrushingChartInstance(table.scenegraph), setBrushingChartInstance(this.activeChartInstance, col, row));
48589
48630
  }), this.activeChartInstance.on("brushEnd", params => {
48590
48631
  var _a;
48591
- table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
48632
+ null == brushChangeThrottle || brushChangeThrottle.cancel(), table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush"), Chart.temp = 0, setTimeout(() => {
48592
48633
  Chart.temp = 1;
48593
48634
  }, 0);
48594
- }), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
48635
+ }), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
48636
+ markName: "pie"
48637
+ }, params => {
48638
+ var _a;
48639
+ const categoryField = this.attribute.spec.categoryField,
48640
+ datum = {
48641
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48642
+ };
48643
+ generateChartInstanceListByViewRange(datum, table, !1);
48644
+ }), this.activeChartInstance.on("pointerout", {
48645
+ markName: "pie"
48646
+ }, params => {
48647
+ var _a;
48648
+ const categoryField = this.attribute.spec.categoryField,
48649
+ datum = {
48650
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48651
+ };
48652
+ generateChartInstanceListByViewRange(datum, table, !0);
48653
+ })), this.activeChartInstance.on("dimensionHover", params => {
48595
48654
  var _a, _b;
48655
+ if (isDisabledTooltipToAllChartInstances()) return;
48656
+ this.activeChartInstance.disableTooltip(!1);
48596
48657
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
48597
48658
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
48598
48659
  viewport = null === (_b = null == params ? void 0 : params.event) || void 0 === _b ? void 0 : _b.viewport;
@@ -48609,11 +48670,11 @@
48609
48670
  prev_justShowMarkTooltip = this.justShowMarkTooltip;
48610
48671
  params.mark && params.datum && !Array.isArray(params.datum) ? (this.activeChartInstanceHoverOnMark = params.mark, justShowMarkTooltip = !0) : (this.activeChartInstanceHoverOnMark = null, justShowMarkTooltip = !1), this.justShowMarkTooltip = justShowMarkTooltip;
48611
48672
  let delayRunDimensionHover = !1;
48612
- if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1, clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0), "enter" === params.action || "move" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
48673
+ if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1, this.clearDelayRunDimensionHoverTimer()), "enter" === params.action || "move" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
48613
48674
  const dimensionValue = dimensionInfo.value,
48614
48675
  indicatorsAsCol = table.options.indicatorsAsCol;
48615
- if (delayRunDimensionHover ? (clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = setTimeout(() => {
48616
- indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
48676
+ if (delayRunDimensionHover ? (this.clearDelayRunDimensionHoverTimer(), this.delayRunDimensionHoverTimer = setTimeout(() => {
48677
+ isDisabledTooltipToAllChartInstances() || (indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1));
48617
48678
  }, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
48618
48679
  const series = dimensionInfo.data[0].series,
48619
48680
  width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
@@ -48654,21 +48715,26 @@
48654
48715
  }
48655
48716
  }
48656
48717
  }
48657
- }), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
48718
+ })), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance), isDisabledTooltipToAllChartInstances() && this.activeChartInstance.disableTooltip(!0);
48719
+ }
48720
+ clearDelayRunDimensionHoverTimer() {
48721
+ clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0;
48658
48722
  }
48659
48723
  deactivate(table, {
48724
+ forceRelease = !1,
48660
48725
  releaseChartInstance = !0,
48661
48726
  releaseColumnChartInstance = !0,
48662
- releaseRowChartInstance = !0
48727
+ releaseRowChartInstance = !0,
48728
+ releaseAllChartInstance = !1
48663
48729
  } = {}) {
48664
48730
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48665
- if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
48666
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
48731
+ if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.clearDelayRunDimensionHoverTimer(), releaseChartInstance) {
48732
+ !this.activeChartInstance || !forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
48667
48733
  x1: -1e3,
48668
48734
  x2: -800,
48669
48735
  y1: -1e3,
48670
48736
  y2: -800
48671
- }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
48737
+ }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
48672
48738
  const {
48673
48739
  col: col,
48674
48740
  row: row
@@ -48681,7 +48747,7 @@
48681
48747
  } = this.parent;
48682
48748
  releaseColumnChartInstance && table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) && (null === (_h = null === (_g = table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild) || void 0 === _g ? void 0 : _g.hideLabelHoverOnAxis) || void 0 === _h || _h.call(_g)), releaseRowChartInstance && table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) && (null === (_k = null === (_j = table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild) || void 0 === _j ? void 0 : _j.hideLabelHoverOnAxis) || void 0 === _k || _k.call(_j));
48683
48749
  }
48684
- releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table);
48750
+ releaseAllChartInstance ? clearAllChartInstanceList(table, forceRelease) : (releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table, forceRelease), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table, forceRelease));
48685
48751
  }
48686
48752
  updateData(data) {
48687
48753
  this.attribute.data = data;
@@ -48696,13 +48762,14 @@
48696
48762
  y1: y1,
48697
48763
  x2: x2,
48698
48764
  y2: y2
48699
- } = cellGroup.globalAABBBounds;
48700
- return {
48701
- x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
48702
- x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
48703
- y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
48704
- y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
48705
- };
48765
+ } = cellGroup.globalAABBBounds,
48766
+ viewBox = {
48767
+ x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
48768
+ x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
48769
+ y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
48770
+ y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
48771
+ };
48772
+ return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
48706
48773
  }
48707
48774
  }
48708
48775
  function getTableBounds(col, row, table) {
@@ -48917,7 +48984,7 @@
48917
48984
  {
48918
48985
  width = groupAttribute.width,
48919
48986
  height = groupAttribute.height
48920
- } = (chart.getViewBox(), chart.attribute),
48987
+ } = chart.attribute,
48921
48988
  {
48922
48989
  table: table
48923
48990
  } = chart.getRootNode(),
@@ -48945,8 +49012,9 @@
48945
49012
  });
48946
49013
  }
48947
49014
  }
48948
- const viewBox = chart.getViewBox();
48949
- activeChartInstance.updateViewBox({
49015
+ const lastViewBox = chart.activeChartInstanceLastViewBox,
49016
+ viewBox = chart.getViewBox();
49017
+ lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
48950
49018
  x1: 0,
48951
49019
  x2: viewBox.x2 - viewBox.x1,
48952
49020
  y1: 0,
@@ -51743,7 +51811,7 @@
51743
51811
  rowUpdatePos = isValid$1(rowUpdatePos) ? isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
51744
51812
  }
51745
51813
  let updateAfter;
51746
- if (scene.table._clearRowRangeHeightsMap(), addRows.forEach(row => {
51814
+ if (scene.table._clearRowRangeHeightsMap(), verifyProxyRowStatus(scene), addRows.forEach(row => {
51747
51815
  const needUpdateAfter = addRow(row, scene, skipUpdateProxy);
51748
51816
  updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, rowHeightsMap.insert(row);
51749
51817
  }), resetRowNumberAndY(scene), addRows.length) {
@@ -51973,6 +52041,25 @@
51973
52041
  function setRowSeriesNumberCellNeedUpdate(startUpdateRow, scene) {
51974
52042
  if (scene.table.isHasSeriesNumber()) for (let row = startUpdateRow; row <= scene.table.rowCount - 1; row++) updateCell$1(0, row, scene.table, !1);
51975
52043
  }
52044
+ function verifyProxyRowStatus(scene) {
52045
+ const proxy = scene.proxy,
52046
+ {
52047
+ rowStart: rowStart,
52048
+ rowEnd: rowEnd,
52049
+ rowLimit: rowLimit,
52050
+ totalRow: totalRow
52051
+ } = proxy;
52052
+ if (rowStart > rowEnd) return proxy.rowStart = scene.table.columnHeaderLevelCount, proxy.rowEnd = Math.min(totalRow, proxy.rowStart + rowLimit - 1), void (proxy.currentRow = 0);
52053
+ if (rowStart + rowLimit - 1 > totalRow) {
52054
+ const oldRowStart = proxy.rowStart,
52055
+ newRowStart = Math.max(scene.table.columnHeaderLevelCount, totalRow - rowLimit + 1);
52056
+ if (newRowStart === oldRowStart) return;
52057
+ proxy.rowStart = newRowStart, proxy.rowEnd = Math.min(totalRow, newRowStart + rowLimit - 1), proxy.currentRow = proxy.rowEnd + 1;
52058
+ const addRowCount = oldRowStart - proxy.rowStart;
52059
+ for (let i = 0; i < addRowCount; i++) addRowCellGroup(proxy.rowStart + i, scene);
52060
+ proxy.rowUpdatePos = proxy.rowStart;
52061
+ }
52062
+ }
51976
52063
 
51977
52064
  function createReactContainer(table) {
51978
52065
  const {
@@ -52455,18 +52542,25 @@
52455
52542
  }
52456
52543
  function clearChartCacheImage(scenegraph) {
52457
52544
  var _a;
52545
+ const brushingCellPos = getBrushingChartInstanceCellPos();
52458
52546
  for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
52459
52547
  const columnGroup = scenegraph.getColGroup(c);
52460
52548
  null === (_a = null == columnGroup ? void 0 : columnGroup.getChildren()) || void 0 === _a || _a.forEach(cellNode => {
52461
- cellNode.children.forEach(node => {
52549
+ brushingCellPos && brushingCellPos.col === cellNode.col && brushingCellPos.row === cellNode.row || cellNode.children.forEach(node => {
52462
52550
  "chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
52463
52551
  });
52464
52552
  });
52465
52553
  }
52466
52554
  }
52467
- function updateChartState(scenegraph, datum) {
52555
+ function clearCellChartCacheImage(col, row, scenegraph) {
52556
+ scenegraph.getCell(col, row).children.forEach(node => {
52557
+ "chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
52558
+ });
52559
+ }
52560
+ function updateChartState(scenegraph, datum, selectedDataMode) {
52468
52561
  const table = scenegraph.table;
52469
52562
  if (table.isPivotChart()) {
52563
+ table._selectedDataMode = selectedDataMode;
52470
52564
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
52471
52565
  if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
52472
52566
  const newSelectedDataItemsInChart = [];
@@ -52481,7 +52575,7 @@
52481
52575
  for (const itemKey in datum) itemKey.startsWith("VGRAMMAR_") || itemKey.startsWith("__VCHART") || (selectedState[itemKey] = datum[itemKey]);
52482
52576
  newSelectedDataItemsInChart.push(selectedState);
52483
52577
  }
52484
- isEqual(table._selectedDataItemsInChart, newSelectedDataItemsInChart) || (table._selectedDataItemsInChart = newSelectedDataItemsInChart, table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame());
52578
+ "multiple-select" === selectedDataMode ? (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length ? table._selectedDataItemsInChart = [] : table._selectedDataItemsInChart.push(...newSelectedDataItemsInChart), table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame()) : isEqual(table._selectedDataItemsInChart, newSelectedDataItemsInChart) || (table._selectedDataItemsInChart = newSelectedDataItemsInChart, table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame());
52485
52579
  }
52486
52580
  }
52487
52581
  function updateChartGraphicSize(cellNode, width, height) {
@@ -53214,16 +53308,28 @@
53214
53308
  resetResidentHoverIcon(col, row) {
53215
53309
  resetResidentHoverIcon(col, row, this);
53216
53310
  }
53217
- deactivateChart(col, row) {
53218
- var _a, _b, _c;
53311
+ deactivateChart(col, row, forceRelease = !1) {
53312
+ var _a, _b, _c, _d, _e, _f;
53313
+ if (forceRelease) {
53314
+ const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
53315
+ brushingChartInstance = getBrushingChartInstance();
53316
+ brushingChartInstanceCellPos && brushingChartInstance && (clearAndReleaseBrushingChartInstance(this), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this));
53317
+ }
53219
53318
  if (-1 === col || -1 === row) return;
53220
53319
  const cellGroup = this.getCell(col, row);
53221
53320
  if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
53321
+ if (forceRelease) return void (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
53322
+ forceRelease: !0,
53323
+ releaseChartInstance: !0,
53324
+ releaseColumnChartInstance: !0,
53325
+ releaseRowChartInstance: !0,
53326
+ releaseAllChartInstance: !0
53327
+ }));
53222
53328
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
53223
- null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, this.table.options.chartDimensionLinkage ? {
53224
- releaseChartInstance: "scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
53225
- releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
53226
- releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
53329
+ null === (_e = null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) || void 0 === _e || _e.call(_d, this.table, (null === (_f = this.table.options.chartDimensionLinkage) || void 0 === _f ? void 0 : _f.showTooltip) ? {
53330
+ releaseChartInstance: "pie" !== chartType && ("scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53331
+ releaseColumnChartInstance: "pie" !== chartType && (col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53332
+ releaseRowChartInstance: "pie" !== chartType && (row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount)
53227
53333
  } : void 0);
53228
53334
  }
53229
53335
  }
@@ -53271,8 +53377,15 @@
53271
53377
  updateChartSizeForResizeRowHeight(row) {
53272
53378
  updateChartSizeForResizeRowHeight(this, row);
53273
53379
  }
53274
- updateChartState(datum) {
53275
- this.table.isPivotChart() && updateChartState(this, datum);
53380
+ updateChartState(datum, selectedDataMode) {
53381
+ var _a, _b, _c;
53382
+ if (this.table.isPivotChart()) {
53383
+ if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
53384
+ const brushingChartInstance = getBrushingChartInstance();
53385
+ brushingChartInstance && (null === (_a = brushingChartInstance.getChart()) || void 0 === _a || _a.getComponentsByKey("brush")[0].clearBrushStateAndMask()), null === (_c = null === (_b = this.table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.clearChartState) || void 0 === _c || _c.call(_b);
53386
+ }
53387
+ updateChartState(this, datum, selectedDataMode);
53388
+ }
53276
53389
  }
53277
53390
  updateCheckboxCellState(col, row, checked) {
53278
53391
  var _a, _b;
@@ -53928,7 +54041,7 @@
53928
54041
  } else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) {
53929
54042
  if (interactionState !== InteractionState.default || table.eventManager.isDraging || table.stateManager.isResizeCol()) {
53930
54043
  if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) && !table.stateManager.isResizeCol()) {
53931
- let extendSelectRange = !0;
54044
+ let extendSelectRange = !isValid$1(skipBodyMerge) || !skipBodyMerge;
53932
54045
  -1 === cellPos.col && (cellPos.col = col), -1 === cellPos.row && (cellPos.row = row), cellPos.col = col, cellPos.row = row;
53933
54046
  const currentRange = state.select.ranges[state.select.ranges.length - 1];
53934
54047
  if (currentRange) {
@@ -54050,7 +54163,7 @@
54050
54163
  };
54051
54164
  enableShiftSelectMode || (currentRange.end = currentRange.start), scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange);
54052
54165
  } else {
54053
- let extendSelectRange = !0;
54166
+ let extendSelectRange = !isValid$1(skipBodyMerge) || !skipBodyMerge;
54054
54167
  if (-1 === cellPos.col || -1 === cellPos.row || enableCtrlSelectMode || (state.select.ranges = [], scenegraph.deleteAllSelectBorder()), "cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
54055
54168
  const cellRange = table.getCellRange(col, row);
54056
54169
  "body" === state.select.headerSelectMode ? state.select.ranges.push({
@@ -56299,7 +56412,7 @@
56299
56412
  }, 0 !== e.button) return;
56300
56413
  const eventArgsSet = getCellEventArgsSet(e);
56301
56414
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
56302
- if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
56415
+ if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && (table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0)), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
56303
56416
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
56304
56417
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
56305
56418
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -56327,7 +56440,7 @@
56327
56440
  }
56328
56441
  eventManager.dealTableHover(eventArgsSet);
56329
56442
  } else {
56330
- if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
56443
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), void stateManager.updateInteractionState(InteractionState.grabing);
56331
56444
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56332
56445
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56333
56446
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -56479,7 +56592,7 @@
56479
56592
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
56480
56593
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
56481
56594
  if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
56482
- table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
56595
+ table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), stateManager.updateInteractionState(InteractionState.grabing);
56483
56596
  const {
56484
56597
  eventArgs: eventArgs
56485
56598
  } = eventArgsSet;
@@ -56498,7 +56611,7 @@
56498
56611
  if (table.eventManager.isDraging || !target || !target.isDescendantsOf(table.scenegraph.stage) && target.stage !== target || target.isDescendantsOf(table.scenegraph.tableGroup)) table.eventManager.isDraging && stateManager.isSelecting() && stateManager.endSelectCells();else {
56499
56612
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
56500
56613
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
56501
- (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null);
56614
+ (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
56502
56615
  }
56503
56616
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
56504
56617
  var _a, _b, _c;
@@ -56616,7 +56729,15 @@
56616
56729
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
56617
56730
  }), table.scenegraph.stage.addEventListener("wheel", e => {
56618
56731
  var _a;
56619
- e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
56732
+ if (!e.path.find(node => "legend" === node.name)) {
56733
+ null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
56734
+ const {
56735
+ cellPos: cellPos
56736
+ } = table.stateManager.hover,
56737
+ prevHoverCellCol = cellPos.col,
56738
+ prevHoverCellRow = cellPos.row;
56739
+ table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
56740
+ }
56620
56741
  });
56621
56742
  }
56622
56743
  function bindGesture(eventManager) {
@@ -56731,11 +56852,13 @@
56731
56852
  const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
56732
56853
  throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
56733
56854
  scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
56734
- scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
56855
+ var _a;
56856
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
56735
56857
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
56736
56858
  throttleVerticalWheel(ratio, e);
56737
56859
  }), scenegraph.component.hScrollBar.addEventListener("scrollDrag", e => {
56738
- scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
56860
+ var _a;
56861
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
56739
56862
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
56740
56863
  throttleHorizontalWheel(ratio);
56741
56864
  });
@@ -56870,22 +56993,22 @@
56870
56993
  table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight || "adaptive" === table.widthMode || "adaptive" === table.heightMode) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$1(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio$1()), e.windowSizeNotChange || table.resize());
56871
56994
  });
56872
56995
  const globalPointerdownCallback = e => {
56873
- var _a;
56996
+ var _a, _b, _c, _d;
56874
56997
  if (table.isReleased) return;
56875
56998
  table.eventManager.LastBodyPointerXY = {
56876
56999
  x: e.x,
56877
57000
  y: e.y
56878
57001
  }, table.eventManager.isDown = !0;
56879
57002
  const target = e.target;
56880
- if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target)) {
56881
- const isCompleteEdit = null === (_a = table.editorManager) || void 0 === _a ? void 0 : _a.completeEdit(e);
57003
+ if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target) && (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.shouldTreatAsClickOnTable) || (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.shouldTreatAsClickOnTable) && !(null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.shouldTreatAsClickOnTable(e)))) {
57004
+ const isCompleteEdit = null === (_d = table.editorManager) || void 0 === _d ? void 0 : _d.completeEdit(e);
56882
57005
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
56883
57006
  var _a, _b;
56884
57007
  if (!1 !== isCompleteEdit && (null === (_a = table.options.select) || void 0 === _a ? void 0 : _a.outsideClickDeselect)) {
56885
57008
  const isHasSelected = !!(null === (_b = stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
56886
57009
  eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected);
56887
57010
  }
56888
- });
57011
+ }), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
56889
57012
  }
56890
57013
  };
56891
57014
  eventManager.globalEventListeners.push({
@@ -57396,7 +57519,7 @@
57396
57519
  };
57397
57520
  let EventManager$1 = class EventManager {
57398
57521
  constructor(table) {
57399
- this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.cutWaitPaste = !1, this.clipboardCheckTimer = null, this.cutOperationTime = 0, this.lastClipboardContent = "", this.cutCellRange = null, this.cutRanges = null, this.copySourceRange = null, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
57522
+ this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.cutWaitPaste = !1, this.clipboardCheckTimer = null, this.cutOperationTime = 0, this.lastClipboardContent = "", this.cutCellRange = null, this.copySourceRange = null, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
57400
57523
  this.bindSelfEvent();
57401
57524
  }, 0));
57402
57525
  }
@@ -57698,25 +57821,15 @@
57698
57821
  } catch (error) {}
57699
57822
  }
57700
57823
  handleCut(e) {
57701
- var _a;
57702
57824
  return __awaiter$1(this, void 0, void 0, function* () {
57703
- this.handleCopy(e, !0), this.cutWaitPaste = !0, this.cutCellRange = this.table.getSelectedCellInfos(), this.cutRanges = null === (_a = this.table.stateManager.select.ranges) || void 0 === _a ? void 0 : _a.map(r => ({
57704
- start: {
57705
- col: r.start.col,
57706
- row: r.start.row
57707
- },
57708
- end: {
57709
- col: r.end.col,
57710
- row: r.end.row
57711
- }
57712
- })), this.clipboardCheckTimer && clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = window.setTimeout(() => {
57713
- this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.cutRanges = null, this.clipboardCheckTimer = null);
57825
+ this.handleCopy(e, !0), this.cutWaitPaste = !0, this.cutCellRange = this.table.getSelectedCellInfos(), this.clipboardCheckTimer && clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = window.setTimeout(() => {
57826
+ this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.clipboardCheckTimer = null);
57714
57827
  }, 3e4), this.saveClipboardContent();
57715
57828
  });
57716
57829
  }
57717
57830
  handlePaste(e) {
57718
57831
  this.cutWaitPaste ? this.checkClipboardChanged().then(changed => {
57719
- this.executePaste(e), changed || this.clearCutArea(this.table), this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.cutRanges = null, this.clipboardCheckTimer && (clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = null));
57832
+ this.executePaste(e), changed || this.clearCutArea(this.table), this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.clipboardCheckTimer && (clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = null));
57720
57833
  }).catch(() => {
57721
57834
  this.executePaste(e), this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.clipboardCheckTimer && (clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = null));
57722
57835
  }) : this.executePaste(e);
@@ -57793,9 +57906,9 @@
57793
57906
  }
57794
57907
  clearCutArea(table) {
57795
57908
  try {
57796
- const ranges = this.cutRanges;
57797
- if (!ranges || 0 === ranges.length) return;
57798
- table.changeCellValuesByIds(ranges, "");
57909
+ const selectCells = this.cutCellRange;
57910
+ if (!selectCells || 0 === selectCells.length) return;
57911
+ for (let i = 0; i < selectCells.length; i++) for (let j = 0; j < selectCells[i].length; j++) selectCells[i][j] && table.changeCellValue(selectCells[i][j].col, selectCells[i][j].row, void 0);
57799
57912
  } catch (error) {}
57800
57913
  }
57801
57914
  checkClipboardChanged() {
@@ -59731,22 +59844,41 @@
59731
59844
 
59732
59845
  class CustomCellStylePlugin {
59733
59846
  constructor(table, customCellStyle, customCellStyleArrangement) {
59734
- this.table = table, this.customCellStyle = customCellStyle, this.customCellStyleArrangement = customCellStyleArrangement;
59847
+ this.table = table, this.customCellStyle = customCellStyle, this.customCellStyleArrangement = customCellStyleArrangement, this._customCellStyleArrangementIndex = new Map(), this._customCellStyleArrangementTombstoneCount = 0, this._rebuildCustomCellStyleArrangementIndex();
59735
59848
  }
59736
- clearCustomCellStyleArrangement() {
59737
- this.customCellStyleArrangement = [];
59849
+ _getCustomCellStyleArrangementKey(cellPos) {
59850
+ if (cellPos.range) {
59851
+ const {
59852
+ start: start,
59853
+ end: end
59854
+ } = cellPos.range;
59855
+ return `range:${start.col},${start.row},${end.col},${end.row}`;
59856
+ }
59857
+ if (void 0 !== cellPos.col && void 0 !== cellPos.row) return `cell:${cellPos.col},${cellPos.row}`;
59738
59858
  }
59739
- addCustomCellStyleArrangement(cellPosition, customStyleId) {
59740
- this.customCellStyleArrangement.push({
59741
- cellPosition: cellPosition,
59742
- customStyleId: customStyleId
59743
- });
59859
+ _rebuildCustomCellStyleArrangementIndex() {
59860
+ this._customCellStyleArrangementIndex.clear(), this._customCellStyleArrangementTombstoneCount = 0;
59861
+ for (let i = 0; i < this.customCellStyleArrangement.length; i++) {
59862
+ if (!isValid$1(this.customCellStyleArrangement[i].customStyleId)) {
59863
+ this._customCellStyleArrangementTombstoneCount++;
59864
+ continue;
59865
+ }
59866
+ const key = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[i].cellPosition);
59867
+ key && this._customCellStyleArrangementIndex.set(key, i);
59868
+ }
59869
+ }
59870
+ _compactCustomCellStyleArrangementIfNeeded() {
59871
+ const length = this.customCellStyleArrangement.length;
59872
+ if (this._customCellStyleArrangementTombstoneCount < 2048) return;
59873
+ if (4 * this._customCellStyleArrangementTombstoneCount < length) return;
59874
+ const compacted = this.customCellStyleArrangement.filter(style => isValid$1(style.customStyleId));
59875
+ compacted.length !== this.customCellStyleArrangement.length ? (this.customCellStyleArrangement.length = 0, this.customCellStyleArrangement.push(...compacted), this._rebuildCustomCellStyleArrangementIndex()) : this._customCellStyleArrangementTombstoneCount = 0;
59744
59876
  }
59745
59877
  getCustomCellStyle(col, row) {
59746
59878
  const customStyleIds = this.getCustomCellStyleIds(col, row);
59747
59879
  if (customStyleIds.length) {
59748
59880
  const styles = [];
59749
- return customStyleIds.forEach(customStyleId => {
59881
+ if (customStyleIds.forEach(customStyleId => {
59750
59882
  const styleOption = this.getCustomCellStyleOption(customStyleId);
59751
59883
  if (isFunction$3(null == styleOption ? void 0 : styleOption.style)) {
59752
59884
  const style = styleOption.style({
@@ -59759,14 +59891,15 @@
59759
59891
  });
59760
59892
  styles.push(style);
59761
59893
  } else (null == styleOption ? void 0 : styleOption.style) && styles.push(styleOption.style);
59762
- }), merge({}, ...styles);
59894
+ }), !styles.length) return;
59895
+ return merge({}, ...styles);
59763
59896
  }
59764
59897
  }
59765
59898
  getCustomCellStyleIds(col, row) {
59766
59899
  const customStyleIds = [],
59767
59900
  range = this.table.getCellRange(col, row);
59768
59901
  for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.customCellStyleArrangement.forEach(style => {
59769
- style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && customStyleIds.push(style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && customStyleIds.push(style.customStyleId);
59902
+ isValid$1(style.customStyleId) && (style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && customStyleIds.push(style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && customStyleIds.push(style.customStyleId));
59770
59903
  });
59771
59904
  return customStyleIds;
59772
59905
  }
@@ -59787,21 +59920,35 @@
59787
59920
  }), this.table.scenegraph.updateNextFrame();
59788
59921
  }
59789
59922
  arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
59790
- var _a;
59791
- const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
59792
- if (-1 === index && !customStyleId) return;
59793
- if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
59794
- cellPosition: {
59795
- col: cellPos.col,
59796
- row: cellPos.row,
59797
- range: cellPos.range
59798
- },
59799
- customStyleId: customStyleId
59800
- });else {
59923
+ var _a, _b;
59924
+ const inputKey = this._getCustomCellStyleArrangementKey(cellPos);
59925
+ let index = inputKey && null !== (_a = this._customCellStyleArrangementIndex.get(inputKey)) && void 0 !== _a ? _a : -1;
59926
+ if (inputKey && -1 !== index) {
59927
+ const item = this.customCellStyleArrangement[index],
59928
+ itemKey = item ? this._getCustomCellStyleArrangementKey(item.cellPosition) : void 0;
59929
+ item && isValid$1(item.customStyleId) && itemKey === inputKey || (index = this.customCellStyleArrangement.findIndex(style => !!isValid$1(style.customStyleId) && this._getCustomCellStyleArrangementKey(style.cellPosition) === inputKey), -1 !== index ? this._customCellStyleArrangementIndex.set(inputKey, index) : this._customCellStyleArrangementIndex.delete(inputKey));
59930
+ }
59931
+ if (-1 !== index || inputKey || (index = this.customCellStyleArrangement.findIndex(style => !!isValid$1(style.customStyleId) && (style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row))), -1 === index && !customStyleId) return;
59932
+ if (-1 === index && customStyleId) {
59933
+ this.customCellStyleArrangement.push({
59934
+ cellPosition: {
59935
+ col: cellPos.col,
59936
+ row: cellPos.row,
59937
+ range: cellPos.range
59938
+ },
59939
+ customStyleId: customStyleId
59940
+ });
59941
+ const pushedIndex = this.customCellStyleArrangement.length - 1,
59942
+ pushedKey = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[pushedIndex].cellPosition);
59943
+ pushedKey && this._customCellStyleArrangementIndex.set(pushedKey, pushedIndex);
59944
+ } else {
59801
59945
  if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
59802
- customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
59946
+ if (customStyleId) this.customCellStyleArrangement[index].customStyleId = customStyleId;else {
59947
+ const existedKey = this._getCustomCellStyleArrangementKey(this.customCellStyleArrangement[index].cellPosition);
59948
+ isValid$1(this.customCellStyleArrangement[index].customStyleId) && this._customCellStyleArrangementTombstoneCount++, this.customCellStyleArrangement[index].customStyleId = null, existedKey && this._customCellStyleArrangementIndex.delete(existedKey), this._compactCustomCellStyleArrangementIfNeeded();
59949
+ }
59803
59950
  }
59804
- const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
59951
+ const style = customStyleId ? null === (_b = this.getCustomCellStyleOption(customStyleId)) || void 0 === _b ? void 0 : _b.style : void 0;
59805
59952
  if (style) {
59806
59953
  forceFastUpdate = !0;
59807
59954
  for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
@@ -59816,7 +59963,7 @@
59816
59963
  this.table.scenegraph.updateNextFrame();
59817
59964
  }
59818
59965
  updateCustomCell(customCellStyle, customCellStyleArrangement) {
59819
- this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, customCellStyle.forEach(cellStyle => {
59966
+ this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, this._customCellStyleArrangementIndex.clear(), this._customCellStyleArrangementTombstoneCount = 0, customCellStyle.forEach(cellStyle => {
59820
59967
  this.registerCustomCellStyle(cellStyle.id, cellStyle.style);
59821
59968
  }), customCellStyleArrangement.forEach(cellStyle => {
59822
59969
  this.arrangeCustomCellStyle(cellStyle.cellPosition, cellStyle.customStyleId);
@@ -60047,7 +60194,7 @@
60047
60194
  }
60048
60195
  constructor(container, options = {}) {
60049
60196
  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;
60050
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.9", 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");
60197
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.12-alpha.0", 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");
60051
60198
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60052
60199
  options: options,
60053
60200
  container: container
@@ -61261,16 +61408,16 @@
61261
61408
  startCol = enableShiftSelectMode && (null === (_a = null == lastSelectRange ? void 0 : lastSelectRange.start) || void 0 === _a ? void 0 : _a.col) ? null === (_b = null == lastSelectRange ? void 0 : lastSelectRange.start) || void 0 === _b ? void 0 : _b.col : colIndex,
61262
61409
  endCol = colIndex,
61263
61410
  endRow = this.rowCount - 1;
61264
- this.stateManager.updateSelectPos(startCol, 0, enableShiftSelectMode, enableCtrlSelectMode, !1, null === (_d = null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.makeSelectCellVisible) || void 0 === _d || _d, !0), this.stateManager.updateInteractionState(InteractionState.grabing), this.stateManager.updateSelectPos(endCol, endRow, enableShiftSelectMode, enableCtrlSelectMode, !1, null === (_f = null === (_e = this.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f, !0);
61411
+ this.stateManager.updateSelectPos(startCol, 0, enableShiftSelectMode, enableCtrlSelectMode, !1, null === (_d = null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.makeSelectCellVisible) || void 0 === _d || _d, !0), this.stateManager.updateInteractionState(InteractionState.grabing), this.stateManager.updateSelectPos(endCol, endRow, enableShiftSelectMode, enableCtrlSelectMode, !1, null === (_f = null === (_e = this.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f, !0), this.stateManager.select.selecting = !1;
61265
61412
  }
61266
61413
  dragSelectCol(colIndex, enableCtrlSelectMode) {
61267
61414
  var _a, _b;
61268
61415
  const currentSelectRanges = this.stateManager.select.ranges,
61269
61416
  lastSelectRange = currentSelectRanges[currentSelectRanges.length - 1];
61270
- lastSelectRange && (lastSelectRange.end.col = colIndex), this.stateManager.updateSelectPos(colIndex, this.rowCount - 1, !1, enableCtrlSelectMode, !1, null === (_b = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.makeSelectCellVisible) || void 0 === _b || _b, !0);
61417
+ lastSelectRange && (lastSelectRange.end.col = colIndex), this.stateManager.updateSelectPos(colIndex, this.rowCount - 1, !1, enableCtrlSelectMode, !1, null === (_b = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.makeSelectCellVisible) || void 0 === _b || _b, !0), this.stateManager.select.selecting = !1;
61271
61418
  }
61272
61419
  endDragSelect() {
61273
- this.stateManager.updateInteractionState(InteractionState.default), this.stateManager.endSelectCells(!1, !1);
61420
+ this.stateManager.updateInteractionState(InteractionState.default);
61274
61421
  }
61275
61422
  startDragSelectRow(rowIndex, enableCtrlSelectMode, isShift) {
61276
61423
  var _a, _b, _c, _d, _e, _f;
@@ -61278,13 +61425,13 @@
61278
61425
  startRow = isShift && (null === (_a = null == lastSelectRange ? void 0 : lastSelectRange.start) || void 0 === _a ? void 0 : _a.row) ? null === (_b = null == lastSelectRange ? void 0 : lastSelectRange.start) || void 0 === _b ? void 0 : _b.row : rowIndex,
61279
61426
  endCol = this.colCount - 1,
61280
61427
  endRow = rowIndex;
61281
- this.stateManager.updateSelectPos(0, startRow, isShift, enableCtrlSelectMode, !1, null === (_d = null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.makeSelectCellVisible) || void 0 === _d || _d, !0), this.stateManager.updateInteractionState(InteractionState.grabing), this.stateManager.updateSelectPos(endCol, endRow, isShift, enableCtrlSelectMode, !1, null === (_f = null === (_e = this.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f, !0);
61428
+ this.stateManager.updateSelectPos(0, startRow, isShift, enableCtrlSelectMode, !1, null === (_d = null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.makeSelectCellVisible) || void 0 === _d || _d, !0), this.stateManager.updateInteractionState(InteractionState.grabing), this.stateManager.updateSelectPos(endCol, endRow, isShift, enableCtrlSelectMode, !1, null === (_f = null === (_e = this.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f, !0), this.stateManager.select.selecting = !1;
61282
61429
  }
61283
61430
  dragSelectRow(rowIndex, isCtrl) {
61284
61431
  var _a, _b;
61285
61432
  const currentSelectRanges = this.stateManager.select.ranges,
61286
61433
  lastSelectRange = currentSelectRanges[currentSelectRanges.length - 1];
61287
- lastSelectRange && (lastSelectRange.end.row = rowIndex), this.stateManager.updateSelectPos(this.colCount - 1, rowIndex, !1, isCtrl, !1, null === (_b = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.makeSelectCellVisible) || void 0 === _b || _b, !0);
61434
+ lastSelectRange && (lastSelectRange.end.row = rowIndex), this.stateManager.updateSelectPos(this.colCount - 1, rowIndex, !1, isCtrl, !1, null === (_b = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.makeSelectCellVisible) || void 0 === _b || _b, !0), this.stateManager.select.selecting = !1;
61288
61435
  }
61289
61436
  get recordsCount() {
61290
61437
  var _a;
@@ -62206,6 +62353,18 @@
62206
62353
  }
62207
62354
  return !1;
62208
62355
  }
62356
+ updateCellContent(col, row) {
62357
+ this.scenegraph.updateCellContent(col, row);
62358
+ }
62359
+ updateCellContentRange(startCol, startRow, endCol, endRow) {
62360
+ for (let i = startCol; i <= endCol; i++) for (let j = startRow; j <= endRow; j++) this.scenegraph.updateCellContent(i, j);
62361
+ }
62362
+ updateCellContentRanges(ranges) {
62363
+ for (let i = 0; i < ranges.length; i++) {
62364
+ const range = ranges[i];
62365
+ this.updateCellContentRange(range.start.col, range.start.row, range.end.col, range.end.row);
62366
+ }
62367
+ }
62209
62368
  }
62210
62369
 
62211
62370
  const chartTypes = {};
@@ -63708,8 +63867,8 @@
63708
63867
  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;
63709
63868
  const editor = this.table.getEditor(col, row);
63710
63869
  editor && setTimeout(() => {
63711
- var _a;
63712
- editor && this.editingEditor !== editor && (null === (_a = editor.prepareEdit) || void 0 === _a || _a.call(editor, {
63870
+ var _a, _b;
63871
+ editor && this.editingEditor !== editor && (null === (_b = (_a = editor).prepareEdit) || void 0 === _b || _b.call(_a, {
63713
63872
  referencePosition: referencePosition,
63714
63873
  container: this.table.getElement(),
63715
63874
  table: this.table,
@@ -63722,14 +63881,14 @@
63722
63881
  this.listenersId.push(doubleClickEventId, clickEventId, selectedChangedEventId);
63723
63882
  }
63724
63883
  startEditCell(col, row, value, editElement) {
63725
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
63884
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
63726
63885
  if (this.editingEditor) return;
63727
63886
  const editor = this.table.getEditor(col, row);
63728
63887
  if (editor) {
63729
- if (editElement && editor.setElement(editElement), this.table.internalProps.layoutMap.isSeriesNumber(col, row)) return;
63730
- 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)) {
63731
- const isPivotTable = null === (_d = (_c = this.table).isPivotTable) || void 0 === _d ? void 0 : _d.call(_c),
63732
- updateAggregationOnEditCell = !!isPivotTable && (null === (_f = null === (_e = this.table.internalProps) || void 0 === _e ? void 0 : _e.dataConfig) || void 0 === _f ? void 0 : _f.updateAggregationOnEditCell);
63888
+ if (editElement && (null === (_b = (_a = editor).setElement) || void 0 === _b || _b.call(_a, editElement)), this.table.internalProps.layoutMap.isSeriesNumber(col, row)) return;
63889
+ if (null === (_d = null === (_c = this.table.internalProps.layoutMap) || void 0 === _c ? void 0 : _c.isAggregation) || void 0 === _d ? void 0 : _d.call(_c, col, row)) {
63890
+ const isPivotTable = null === (_f = (_e = this.table).isPivotTable) || void 0 === _f ? void 0 : _f.call(_e),
63891
+ updateAggregationOnEditCell = !!isPivotTable && (null === (_h = null === (_g = this.table.internalProps) || void 0 === _g ? void 0 : _g.dataConfig) || void 0 === _h ? void 0 : _h.updateAggregationOnEditCell);
63733
63892
  if (!isPivotTable || isPivotTable && updateAggregationOnEditCell) return;
63734
63893
  }
63735
63894
  const record = this.table.getCellRawRecord(col, row);
@@ -63748,9 +63907,9 @@
63748
63907
  height: rect.height
63749
63908
  }
63750
63909
  };
63751
- 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, () => {
63910
+ 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 === (_j = editor.beginEditing) || void 0 === _j || _j.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_k = editor.bindSuccessCallback) || void 0 === _k || _k.call(editor, () => {
63752
63911
  this.completeEdit();
63753
- }), null === (_j = editor.onStart) || void 0 === _j || _j.call(editor, {
63912
+ }), null === (_l = editor.onStart) || void 0 === _l || _l.call(editor, {
63754
63913
  value: dataValue,
63755
63914
  endEdit: () => {
63756
63915
  this.completeEdit();
@@ -63858,16 +64017,15 @@
63858
64017
  step((generator = generator.apply(thisArg, _arguments || [])).next());
63859
64018
  });
63860
64019
  };
63861
- function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
64020
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
63862
64021
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
63863
- const recordShowIndex = table.getRecordShowIndexByCell(col, row),
63864
- recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
64022
+ const recordIndex = table.getRecordShowIndexByCell(col, row),
63865
64023
  {
63866
64024
  field: field
63867
64025
  } = table.internalProps.layoutMap.getBody(col, row),
63868
64026
  beforeChangeValue = table.getCellRawValue(col, row),
63869
64027
  oldValue = table.getCellOriginValue(col, row);
63870
- table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
64028
+ table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordIndex, field, col, row, table);
63871
64029
  const range = table.getCellRange(col, row),
63872
64030
  aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
63873
64031
  if (aggregators) {
@@ -63890,24 +64048,16 @@
63890
64048
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
63891
64049
  }
63892
64050
  const changedValue = table.getCellOriginValue(col, row);
63893
- if (oldValue !== changedValue && triggerEvent) {
63894
- const changeValue = {
63895
- col: col,
63896
- row: row,
63897
- recordIndex: recordIndex,
63898
- field: field,
63899
- rawValue: beforeChangeValue,
63900
- currentValue: oldValue,
63901
- changedValue: changedValue
63902
- };
63903
- table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
63904
- values: [changeValue]
63905
- });
63906
- }
63907
- table.scenegraph.updateNextFrame();
64051
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
64052
+ col: col,
64053
+ row: row,
64054
+ rawValue: beforeChangeValue,
64055
+ currentValue: oldValue,
64056
+ changedValue: changedValue
64057
+ }), table.scenegraph.updateNextFrame();
63908
64058
  }
63909
64059
  }
63910
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
64060
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
63911
64061
  var _a, _b;
63912
64062
  return __awaiter(this, void 0, void 0, function* () {
63913
64063
  const changedCellResults = [];
@@ -63929,7 +64079,6 @@
63929
64079
  oldRowValues.push(oldValue);
63930
64080
  }
63931
64081
  }
63932
- const resultChangeValues = [];
63933
64082
  for (let i = 0; i < values.length && !(startRow + i > table.rowCount - 1); i++) {
63934
64083
  changedCellResults[i] = [], pasteRowEnd = startRow + i;
63935
64084
  const rowValues = values[i];
@@ -63953,34 +64102,25 @@
63953
64102
  if (isCanChange) {
63954
64103
  changedCellResults[i][j] = !0;
63955
64104
  const value = rowValues[j],
63956
- recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
63957
- recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
64105
+ recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
63958
64106
  {
63959
64107
  field: field
63960
64108
  } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
63961
64109
  beforeChangeValue = beforeChangeValues[i][j],
63962
64110
  oldValue = oldValues[i][j];
63963
- table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, startCol + j, startRow + i, table);
64111
+ table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
63964
64112
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
63965
- if (oldValue !== changedValue && triggerEvent) {
63966
- const changeValue = {
63967
- col: startCol + j,
63968
- row: startRow + i,
63969
- recordIndex: recordIndex,
63970
- field: field,
63971
- rawValue: beforeChangeValue,
63972
- currentValue: oldValue,
63973
- changedValue: changedValue
63974
- };
63975
- table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
63976
- }
64113
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
64114
+ col: startCol + j,
64115
+ row: startRow + i,
64116
+ rawValue: beforeChangeValue,
64117
+ currentValue: oldValue,
64118
+ changedValue: changedValue
64119
+ });
63977
64120
  } else changedCellResults[i][j] = !1;
63978
64121
  }
63979
64122
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
63980
64123
  }
63981
- silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
63982
- values: resultChangeValues
63983
- });
63984
64124
  const startRange = table.getCellRange(startCol, startRow),
63985
64125
  range = table.getCellRange(pasteColEnd, pasteRowEnd),
63986
64126
  aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
@@ -64014,58 +64154,6 @@
64014
64154
  return table.scenegraph.updateNextFrame(), changedCellResults;
64015
64155
  });
64016
64156
  }
64017
- function listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
64018
- var _a, _b;
64019
- return __awaiter(this, void 0, void 0, function* () {
64020
- const resultChangeValues = [],
64021
- processed = new Set(),
64022
- nextValue = null != value ? value : "";
64023
- for (let i = 0; i < (null !== (_a = null == ranges ? void 0 : ranges.length) && void 0 !== _a ? _a : 0); i++) {
64024
- const range = ranges[i],
64025
- startCol = Math.min(range.start.col, range.end.col),
64026
- endCol = Math.max(range.start.col, range.end.col),
64027
- startRow = Math.min(range.start.row, range.end.row),
64028
- endRow = Math.max(range.start.row, range.end.row);
64029
- if (startCol > endCol || startRow > endRow) continue;
64030
- const values = [],
64031
- oldValues = [];
64032
- for (let row = startRow; row <= endRow; row++) {
64033
- const rowValues = [],
64034
- rowOldValues = [];
64035
- for (let col = startCol; col <= endCol; col++) rowValues.push(nextValue), rowOldValues.push(table.getCellOriginValue(col, row));
64036
- values.push(rowValues), oldValues.push(rowOldValues);
64037
- }
64038
- const changedCellResults = yield listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, !0);
64039
- for (let r = 0; r < values.length; r++) for (let c = 0; c < values[r].length; c++) {
64040
- const col = startCol + c,
64041
- row = startRow + r,
64042
- key = `${col},${row}`;
64043
- if (processed.has(key)) continue;
64044
- if (processed.add(key), !triggerEvent || !(null === (_b = null == changedCellResults ? void 0 : changedCellResults[r]) || void 0 === _b ? void 0 : _b[c])) continue;
64045
- const oldValue = oldValues[r][c],
64046
- changedValue = table.getCellOriginValue(col, row);
64047
- if (oldValue === changedValue) continue;
64048
- const recordShowIndex = table.getRecordShowIndexByCell(col, row),
64049
- recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
64050
- {
64051
- field: field
64052
- } = table.internalProps.layoutMap.getBody(col, row);
64053
- resultChangeValues.push({
64054
- col: col,
64055
- row: row,
64056
- recordIndex: recordIndex,
64057
- field: field,
64058
- rawValue: oldValue,
64059
- currentValue: oldValue,
64060
- changedValue: changedValue
64061
- });
64062
- }
64063
- }
64064
- !silentChangeCellValuesEvent && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
64065
- values: resultChangeValues
64066
- });
64067
- });
64068
- }
64069
64157
  function getCellUpdateType(col, row, table, oldCellUpdateType) {
64070
64158
  if ("group" === oldCellUpdateType) return oldCellUpdateType;
64071
64159
  if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
@@ -64083,16 +64171,13 @@
64083
64171
  }), table.dataSource.sort(sortState));
64084
64172
  }
64085
64173
  function listTableAddRecord(record, recordIndex, table) {
64086
- var _a, _b, _c, _d, _e, _f;
64174
+ var _a, _b, _c, _d;
64087
64175
  try {
64088
64176
  if (!record) return !1;
64089
- if (table.internalProps.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), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) {
64090
- !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.addRecord(record, table.dataSource.records.length, !0) : table.dataSource.addRecordForSorted(record), table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
64091
- } else {
64177
+ if (table.internalProps.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), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), table.stateManager.checkedState.clear(), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
64092
64178
  (void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
64093
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
64094
- syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
64095
- if (table.dataSource.addRecord(record, recordIndex, syncToOriginalRecords), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1), syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
64179
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
64180
+ table.dataSource.addRecord(record, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
64096
64181
  const oldRowCount = table.rowCount;
64097
64182
  if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
64098
64183
  const newRowCount = table.transpose ? table.colCount : table.rowCount;
@@ -64161,16 +64246,13 @@
64161
64246
  }
64162
64247
  }
64163
64248
  function listTableAddRecords(records, recordIndex, table) {
64164
- var _a, _b, _c, _d, _e, _f;
64249
+ var _a, _b, _c, _d;
64165
64250
  try {
64166
64251
  if (!records || 0 === records.length) return !1;
64167
- if (table.internalProps.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), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) {
64168
- !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.addRecords(records, table.dataSource.records.length, !0) : table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
64169
- } else {
64252
+ if (table.internalProps.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), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), 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 {
64170
64253
  void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
64171
- const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
64172
- syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
64173
- if (table.dataSource.addRecords(records, recordIndex, syncToOriginalRecords), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length), syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
64254
+ const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
64255
+ table.dataSource.addRecords(records, recordIndex), adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
64174
64256
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
64175
64257
  if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
64176
64258
  const newRowCount = table.transpose ? table.colCount : table.rowCount;
@@ -64239,20 +64321,16 @@
64239
64321
  }
64240
64322
  }
64241
64323
  function listTableDeleteRecords(recordIndexs, table) {
64242
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
64324
+ var _a, _b, _c, _d, _e, _f, _g, _h;
64243
64325
  if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.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) {
64244
64326
  const deletedRecordIndexs = null === (_d = (_c = table.dataSource).deleteRecordsForTree) || void 0 === _d ? void 0 : _d.call(_c, recordIndexs);
64245
64327
  if (0 === deletedRecordIndexs.length) return;
64246
64328
  for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
64247
64329
  table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
64248
- } else if (table.sortState) {
64249
- !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.deleteRecords(recordIndexs, !0) : table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
64250
- } else {
64251
- const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords),
64252
- deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs, syncToOriginalRecords);
64330
+ } else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
64331
+ const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
64253
64332
  if (0 === deletedRecordIndexs.length) return;
64254
64333
  for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
64255
- if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
64256
64334
  const oldRowCount = table.transpose ? table.colCount : table.rowCount;
64257
64335
  table.refreshRowColCount();
64258
64336
  const newRowCount = table.transpose ? table.colCount : table.rowCount,
@@ -64290,7 +64368,7 @@
64290
64368
  col: 0,
64291
64369
  row: row
64292
64370
  });
64293
- 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();
64371
+ 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();
64294
64372
  }
64295
64373
  } else {
64296
64374
  const delRows = [],
@@ -64322,19 +64400,15 @@
64322
64400
  col: 0,
64323
64401
  row: row
64324
64402
  });
64325
- null === (_j = table.reactCustomLayout) || void 0 === _j || _j.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_k = table.reactCustomLayout) || void 0 === _k || _k.updateAllCustomCell();
64403
+ 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();
64326
64404
  }
64327
64405
  }
64328
64406
  }
64329
64407
  function listTableUpdateRecords(records, recordIndexs, table) {
64330
- var _a, _b, _c, _d, _e, _f;
64331
- if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.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) {
64332
- !!(null === (_e = table.options) || void 0 === _e ? void 0 : _e.syncRecordOperationsToSourceRecords) ? table.dataSource.updateRecords(records, recordIndexs, !0) : table.dataSource.updateRecordsForSorted(records, recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
64333
- } else {
64334
- const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords),
64335
- updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs, syncToOriginalRecords);
64408
+ var _a, _b, _c, _d;
64409
+ if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.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 {
64410
+ const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
64336
64411
  if (0 === updateRecordIndexs.length) return;
64337
- if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
64338
64412
  const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
64339
64413
  if (table.pagination) {
64340
64414
  const {
@@ -65100,8 +65174,8 @@
65100
65174
  updateFilterRules(filterRules, options = {
65101
65175
  clearRowHeightCache: !0
65102
65176
  }) {
65103
- var _a, _b, _c;
65104
- this.scenegraph.clearCells(), null === (_b = (_a = this.dataSource).clearForceVisibleRecords) || void 0 === _b || _b.call(_a), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible(), this.resize();
65177
+ var _a;
65178
+ this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), this.resize();
65105
65179
  }
65106
65180
  getFilteredRecords() {
65107
65181
  return this.dataSource.records;
@@ -65243,165 +65317,43 @@
65243
65317
  }
65244
65318
  return isValid$1(editorDefine);
65245
65319
  }
65246
- changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
65247
- return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
65248
- }
65249
- changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
65250
- return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
65251
- }
65252
- changeCellValuesByIds(ranges, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
65253
- return listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
65254
- }
65255
- changeSourceCellValue(recordIndex, field, value) {
65256
- const tableIndex = this.getTableIndexByRecordIndex(recordIndex),
65257
- cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
65258
- if (tableIndex < 0 || cellAddr.col < 0 || cellAddr.row < 0) return;
65259
- this.dataSource.changeFieldValue(value, tableIndex, field, cellAddr.col, cellAddr.row, this);
65260
- const beforeChangeValue = this.getCellRawValue(cellAddr.col, cellAddr.row),
65261
- oldValue = this.getCellOriginValue(cellAddr.col, cellAddr.row),
65262
- changedValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
65263
- if (oldValue !== changedValue) {
65264
- const changeValue = {
65265
- col: cellAddr.col,
65266
- row: cellAddr.row,
65267
- recordIndex: recordIndex,
65268
- field: field,
65269
- rawValue: beforeChangeValue,
65270
- currentValue: oldValue,
65271
- changedValue: changedValue
65272
- };
65273
- this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
65274
- values: [changeValue]
65275
- });
65276
- }
65320
+ changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0) {
65321
+ return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
65277
65322
  }
65278
- changeCellValueByRecord(recordIndex, field, value, options) {
65279
- var _a, _b, _c, _d, _e;
65280
- const triggerEvent = null === (_a = null == options ? void 0 : options.triggerEvent) || void 0 === _a || _a,
65281
- silentChangeCellValuesEvent = null == options ? void 0 : options.silentChangeCellValuesEvent,
65282
- autoRefresh = null === (_b = null == options ? void 0 : options.autoRefresh) || void 0 === _b || _b,
65283
- records = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records;
65284
- let record, oldValue;
65285
- if (!Array.isArray(records) || "string" != typeof field && "number" != typeof field || (record = Array.isArray(recordIndex) ? getValueFromDeepArray(records, recordIndex) : records[recordIndex], oldValue = null == record ? void 0 : record[field]), this.dataSource.changeFieldValueByRecordIndex(value, recordIndex, field, this), !triggerEvent) return;
65286
- const changedValue = !record || "string" != typeof field && "number" != typeof field ? value : null == record ? void 0 : record[field];
65287
- if (oldValue !== changedValue) {
65288
- const cellAddr = this.getCellAddrByFieldRecord(field, recordIndex),
65289
- changeValue = {
65290
- col: null !== (_d = null == cellAddr ? void 0 : cellAddr.col) && void 0 !== _d ? _d : -1,
65291
- row: null !== (_e = null == cellAddr ? void 0 : cellAddr.row) && void 0 !== _e ? _e : -1,
65292
- recordIndex: recordIndex,
65293
- field: field,
65294
- rawValue: oldValue,
65295
- currentValue: oldValue,
65296
- changedValue: changedValue
65297
- };
65298
- this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
65299
- values: [changeValue]
65300
- });
65301
- }
65302
- autoRefresh && this.refreshAfterSourceChange();
65303
- }
65304
- changeCellValueBySource(recordIndex, field, value, triggerEvent = !0, silentChangeCellValuesEvent) {
65305
- return this.changeCellValueByRecord(recordIndex, field, value, {
65306
- triggerEvent: triggerEvent,
65307
- silentChangeCellValuesEvent: silentChangeCellValuesEvent,
65308
- autoRefresh: !0
65309
- });
65310
- }
65311
- changeCellValuesByRecords(changeValues, options) {
65312
- var _a, _b, _c, _d, _e, _f, _g;
65313
- const triggerEvent = null === (_a = null == options ? void 0 : options.triggerEvent) || void 0 === _a || _a,
65314
- silentChangeCellValuesEvent = null == options ? void 0 : options.silentChangeCellValuesEvent,
65315
- autoRefresh = null === (_b = null == options ? void 0 : options.autoRefresh) || void 0 === _b || _b,
65316
- resultChangeValues = [];
65317
- for (let i = 0; i < changeValues.length; i++) {
65318
- const {
65319
- recordIndex: recordIndex,
65320
- field: field,
65321
- value: value
65322
- } = changeValues[i],
65323
- records = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records;
65324
- let record, oldValue;
65325
- if (!Array.isArray(records) || "string" != typeof field && "number" != typeof field || (record = Array.isArray(recordIndex) ? getValueFromDeepArray(records, recordIndex) : records[recordIndex], oldValue = null == record ? void 0 : record[field]), this.dataSource.changeFieldValueByRecordIndex(value, recordIndex, field, this), triggerEvent) {
65326
- const changedValue = !record || "string" != typeof field && "number" != typeof field ? value : null == record ? void 0 : record[field];
65327
- if (oldValue !== changedValue) {
65328
- const changeValue = {
65329
- col: null !== (_e = null === (_d = this.getCellAddrByFieldRecord(field, recordIndex)) || void 0 === _d ? void 0 : _d.col) && void 0 !== _e ? _e : -1,
65330
- row: null !== (_g = null === (_f = this.getCellAddrByFieldRecord(field, recordIndex)) || void 0 === _f ? void 0 : _f.row) && void 0 !== _g ? _g : -1,
65331
- recordIndex: recordIndex,
65332
- field: field,
65333
- rawValue: oldValue,
65334
- currentValue: oldValue,
65335
- changedValue: changedValue
65336
- };
65337
- this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
65338
- }
65339
- }
65340
- }
65341
- !silentChangeCellValuesEvent && resultChangeValues.length && triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
65342
- values: resultChangeValues
65343
- }), autoRefresh && this.refreshAfterSourceChange();
65344
- }
65345
- changeCellValuesBySource(changeValues, triggerEvent = !0, silentChangeCellValuesEvent) {
65346
- return this.changeCellValuesByRecords(changeValues, {
65347
- triggerEvent: triggerEvent,
65348
- silentChangeCellValuesEvent: silentChangeCellValuesEvent,
65349
- autoRefresh: !0
65350
- });
65351
- }
65352
- refreshAfterSourceChange(options) {
65353
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
65354
- const reapplyFilter = null === (_a = null == options ? void 0 : options.reapplyFilter) || void 0 === _a || _a,
65355
- reapplySort = null === (_b = null == options ? void 0 : options.reapplySort) || void 0 === _b || _b,
65356
- clearRowHeightCache = null === (_c = null == options ? void 0 : options.clearRowHeightCache) || void 0 === _c || _c;
65357
- this.scenegraph.clearCells(), this.sortState && reapplySort && (null === (_e = (_d = this.dataSource).clearSortedIndexMap) || void 0 === _e || _e.call(_d), null === (_g = null === (_f = this.dataSource.sortedIndexMap) || void 0 === _f ? void 0 : _f.clear) || void 0 === _g || _g.call(_f)), reapplyFilter ? this.sortState && reapplySort ? (this.dataSource.updateFilterRulesForSorted(null === (_h = this.dataSource.dataConfig) || void 0 === _h ? void 0 : _h.filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(null === (_j = this.dataSource.dataConfig) || void 0 === _j ? void 0 : _j.filterRules) : this.sortState && reapplySort && sortRecords(this);
65358
- const traverseColumns = columns => {
65359
- var _a, _b, _c, _d;
65360
- for (let i = 0; i < (null !== (_a = null == columns ? void 0 : columns.length) && void 0 !== _a ? _a : 0); i++) {
65361
- const column = columns[i],
65362
- aggregators = null == column ? void 0 : column.vtable_aggregator;
65363
- if (aggregators) if (Array.isArray(aggregators)) for (let j = 0; j < aggregators.length; j++) null === (_c = null === (_b = aggregators[j]) || void 0 === _b ? void 0 : _b.recalculate) || void 0 === _c || _c.call(_b);else null === (_d = null == aggregators ? void 0 : aggregators.recalculate) || void 0 === _d || _d.call(aggregators);
65364
- (null == column ? void 0 : column.columns) && traverseColumns(column.columns);
65365
- }
65366
- };
65367
- traverseColumns(this.internalProps.columns), this.refreshRowColCount(), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!clearRowHeightCache), null === (_k = this.internalProps.emptyTip) || void 0 === _k || _k.resetVisible(), this.resize();
65323
+ changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0) {
65324
+ return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this);
65368
65325
  }
65369
- addRecord(record, recordIndex, triggerEvent = !0) {
65326
+ addRecord(record, recordIndex) {
65370
65327
  var _a;
65371
65328
  const success = listTableAddRecord(record, recordIndex, this);
65372
- adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), triggerEvent && success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
65329
+ adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
65373
65330
  records: [record],
65374
65331
  recordIndex: recordIndex,
65375
65332
  recordCount: 1
65376
65333
  });
65377
65334
  }
65378
- addRecords(records, recordIndex, triggerEvent = !0) {
65335
+ addRecords(records, recordIndex) {
65379
65336
  var _a;
65380
65337
  const success = listTableAddRecords(records, recordIndex, this);
65381
- "number" == typeof recordIndex && adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), triggerEvent && success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
65338
+ "number" == typeof recordIndex && adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
65382
65339
  records: records,
65383
65340
  recordIndex: recordIndex,
65384
65341
  recordCount: records.length
65385
65342
  });
65386
65343
  }
65387
- deleteRecords(recordIndexs, triggerEvent = !0) {
65344
+ deleteRecords(recordIndexs) {
65388
65345
  var _a;
65389
- const deletedRecords = [];
65390
- (null == recordIndexs ? void 0 : recordIndexs.length) > 0 && recordIndexs.forEach(index => {
65391
- let record = null;
65392
- record = "number" == typeof index ? this.dataSource.get(index) : [], deletedRecords.push(record);
65393
- }), listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
65346
+ listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
65394
65347
  const rowIndexs = [];
65395
65348
  for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
65396
- triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
65349
+ this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
65397
65350
  recordIndexs: recordIndexs,
65398
- records: deletedRecords,
65399
65351
  rowIndexs: rowIndexs,
65400
65352
  deletedCount: (Array.isArray(recordIndexs[0]), recordIndexs.length)
65401
65353
  });
65402
65354
  }
65403
- updateRecords(records, recordIndexs, triggerEvent = !0) {
65404
- listTableUpdateRecords(records, recordIndexs, this), triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
65355
+ updateRecords(records, recordIndexs) {
65356
+ listTableUpdateRecords(records, recordIndexs, this), this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
65405
65357
  records: records,
65406
65358
  recordIndexs: recordIndexs,
65407
65359
  updateCount: records.length
@@ -76559,7 +76511,7 @@
76559
76511
  PluginManager: PluginManager
76560
76512
  });
76561
76513
 
76562
- const version = "1.22.11-alpha.9";
76514
+ const version = "1.22.12-alpha.0";
76563
76515
 
76564
76516
  exports.Gantt = Gantt;
76565
76517
  exports.TYPES = index$4;