@visactor/vtable-sheet 1.22.11-alpha.8 → 1.22.11-alpha.9
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.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-sheet.js +599 -447
- package/dist/vtable-sheet.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/dist/vtable-sheet.js
CHANGED
|
@@ -37856,24 +37856,6 @@
|
|
|
37856
37856
|
}, delay));
|
|
37857
37857
|
};
|
|
37858
37858
|
}
|
|
37859
|
-
function cancellableThrottle(func, delay) {
|
|
37860
|
-
let timer = null,
|
|
37861
|
-
lastArgs = null,
|
|
37862
|
-
context = null;
|
|
37863
|
-
return {
|
|
37864
|
-
throttled: function (...args) {
|
|
37865
|
-
lastArgs = args, context = this, timer || (timer = setTimeout(() => {
|
|
37866
|
-
lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
|
|
37867
|
-
}, delay));
|
|
37868
|
-
},
|
|
37869
|
-
cancel: () => {
|
|
37870
|
-
timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
|
|
37871
|
-
},
|
|
37872
|
-
flush: () => {
|
|
37873
|
-
timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
|
|
37874
|
-
}
|
|
37875
|
-
};
|
|
37876
|
-
}
|
|
37877
37859
|
function pad(num, totalChars) {
|
|
37878
37860
|
for (num = `${num}`; num.length < totalChars;) num = "0" + num;
|
|
37879
37861
|
return num;
|
|
@@ -38846,6 +38828,7 @@
|
|
|
38846
38828
|
AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
|
|
38847
38829
|
AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
|
|
38848
38830
|
CHANGE_CELL_VALUE: "change_cell_value",
|
|
38831
|
+
CHANGE_CELL_VALUES: "change_cell_values",
|
|
38849
38832
|
DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
|
|
38850
38833
|
MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
|
|
38851
38834
|
DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
|
|
@@ -40978,6 +40961,24 @@
|
|
|
40978
40961
|
}
|
|
40979
40962
|
}
|
|
40980
40963
|
}
|
|
40964
|
+
changeFieldValueByRecordIndex(value, recordIndex, field, table) {
|
|
40965
|
+
var _a, _b, _c, _d;
|
|
40966
|
+
if (null === field) return;
|
|
40967
|
+
if (null == recordIndex) return;
|
|
40968
|
+
const rawKey = recordIndex.toString();
|
|
40969
|
+
if (!this.beforeChangedRecordsMap.has(rawKey)) {
|
|
40970
|
+
const rawRecords = Array.isArray(null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) ? this.dataSourceObj.records : null,
|
|
40971
|
+
originRecord = rawRecords ? Array.isArray(recordIndex) ? getValueFromDeepArray(rawRecords, recordIndex) : rawRecords[recordIndex] : void 0;
|
|
40972
|
+
this.beforeChangedRecordsMap.set(rawKey, null !== (_b = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _b ? _b : {});
|
|
40973
|
+
}
|
|
40974
|
+
if ("string" == typeof field || "number" == typeof field) {
|
|
40975
|
+
const beforeChangedValue = null === (_c = this.beforeChangedRecordsMap.get(rawKey)) || void 0 === _c ? void 0 : _c[field],
|
|
40976
|
+
rawRecords = Array.isArray(null === (_d = this.dataSourceObj) || void 0 === _d ? void 0 : _d.records) ? this.dataSourceObj.records : null,
|
|
40977
|
+
record = rawRecords ? Array.isArray(recordIndex) ? getValueFromDeepArray(rawRecords, recordIndex) : rawRecords[recordIndex] : void 0;
|
|
40978
|
+
let formatValue = value;
|
|
40979
|
+
"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);
|
|
40980
|
+
}
|
|
40981
|
+
}
|
|
40981
40982
|
cacheBeforeChangedRecord(dataIndex, table) {
|
|
40982
40983
|
var _a;
|
|
40983
40984
|
if (!this.beforeChangedRecordsMap.has(dataIndex.toString())) {
|
|
@@ -40993,41 +40994,92 @@
|
|
|
40993
40994
|
Array.isArray(indexed) || this.records.splice(indexed, 1, record);
|
|
40994
40995
|
}
|
|
40995
40996
|
}
|
|
40996
|
-
|
|
40997
|
+
_getRawRecordsArray() {
|
|
40997
40998
|
var _a;
|
|
40998
|
-
|
|
40999
|
-
|
|
41000
|
-
|
|
41001
|
-
|
|
41002
|
-
|
|
41003
|
-
|
|
41004
|
-
|
|
41005
|
-
|
|
41006
|
-
|
|
41007
|
-
|
|
41008
|
-
|
|
41009
|
-
|
|
40999
|
+
const rawRecords = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records;
|
|
41000
|
+
return Array.isArray(rawRecords) ? rawRecords : null;
|
|
41001
|
+
}
|
|
41002
|
+
_hasFilterInEffect() {
|
|
41003
|
+
var _a, _b, _c, _d, _e;
|
|
41004
|
+
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;
|
|
41005
|
+
}
|
|
41006
|
+
_normalizeInsertIndex(index, length) {
|
|
41007
|
+
return null == index || index > length ? length : index < 0 ? 0 : index;
|
|
41008
|
+
}
|
|
41009
|
+
_mapViewInsertIndexToRawInsertIndex(rawRecords, viewIndex) {
|
|
41010
|
+
if (0 === this.records.length) return rawRecords.length;
|
|
41011
|
+
if (viewIndex <= 0) {
|
|
41012
|
+
const firstVisibleRecord = this.records[0],
|
|
41013
|
+
rawIndex = rawRecords.indexOf(firstVisibleRecord);
|
|
41014
|
+
return rawIndex >= 0 ? rawIndex : 0;
|
|
41015
|
+
}
|
|
41016
|
+
if (viewIndex >= this.records.length) {
|
|
41017
|
+
const lastVisibleRecord = this.records[this.records.length - 1],
|
|
41018
|
+
rawIndex = rawRecords.indexOf(lastVisibleRecord);
|
|
41019
|
+
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
41010
41020
|
}
|
|
41021
|
+
const prevRecord = this.records[viewIndex - 1],
|
|
41022
|
+
rawIndex = rawRecords.indexOf(prevRecord);
|
|
41023
|
+
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
41011
41024
|
}
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
|
|
41019
|
-
|
|
41025
|
+
_resetIndexingFromViewRecords() {
|
|
41026
|
+
if (this._sourceLength = this.records.length, this.currentIndexedData = Array.from({
|
|
41027
|
+
length: this._sourceLength
|
|
41028
|
+
}, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination) return this.pagination.totalCount = this._sourceLength, void this.updatePagerData();
|
|
41029
|
+
this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
|
|
41030
|
+
}
|
|
41031
|
+
addRecord(record, index, syncToOriginalRecords = !1) {
|
|
41032
|
+
var _a, _b, _c;
|
|
41033
|
+
if (!syncToOriginalRecords) {
|
|
41034
|
+
if (Array.isArray(this.records)) {
|
|
41035
|
+
this.records.splice(index, 0, record), this.adjustBeforeChangedRecordsMap(index, 1), this.currentIndexedData.push(this.currentIndexedData.length), this._sourceLength += 1;
|
|
41036
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].push(record);
|
|
41037
|
+
if ("tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination) {
|
|
41038
|
+
this.pagination.totalCount = this._sourceLength;
|
|
41039
|
+
const {
|
|
41040
|
+
perPageCount: perPageCount,
|
|
41041
|
+
currentPage: currentPage
|
|
41042
|
+
} = this.pagination;
|
|
41043
|
+
index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
|
|
41044
|
+
} else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
|
|
41045
|
+
(null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, 1);
|
|
41020
41046
|
}
|
|
41021
|
-
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
|
|
41025
|
-
|
|
41026
|
-
|
|
41027
|
-
|
|
41028
|
-
|
|
41029
|
-
|
|
41047
|
+
return;
|
|
41048
|
+
}
|
|
41049
|
+
const rawRecords = this._getRawRecordsArray();
|
|
41050
|
+
if (!rawRecords) return;
|
|
41051
|
+
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
|
|
41052
|
+
rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
41053
|
+
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);
|
|
41054
|
+
}
|
|
41055
|
+
addRecords(recordArr, index, syncToOriginalRecords = !1) {
|
|
41056
|
+
var _a, _b, _c;
|
|
41057
|
+
if (!syncToOriginalRecords) {
|
|
41058
|
+
if (Array.isArray(this.records)) {
|
|
41059
|
+
if (Array.isArray(recordArr)) {
|
|
41060
|
+
this.records.splice(index, 0, ...recordArr), this.adjustBeforeChangedRecordsMap(index, recordArr.length);
|
|
41061
|
+
for (let i = 0; i < recordArr.length; i++) this.currentIndexedData.push(this.currentIndexedData.length);
|
|
41062
|
+
this._sourceLength += recordArr.length;
|
|
41063
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) for (let j = 0; j < recordArr.length; j++) this.fieldAggregators[i].push(recordArr[j]);
|
|
41064
|
+
}
|
|
41065
|
+
if (this.userPagination) {
|
|
41066
|
+
this.pagination.totalCount = this._sourceLength;
|
|
41067
|
+
const {
|
|
41068
|
+
perPageCount: perPageCount,
|
|
41069
|
+
currentPage: currentPage
|
|
41070
|
+
} = this.pagination;
|
|
41071
|
+
index < perPageCount * (currentPage || 0) + perPageCount && this.updatePagerData();
|
|
41072
|
+
} else this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, this.updatePagerData();
|
|
41073
|
+
(null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.added) && this.dataSourceObj.added(index, recordArr.length);
|
|
41074
|
+
}
|
|
41075
|
+
return;
|
|
41030
41076
|
}
|
|
41077
|
+
const rawRecords = this._getRawRecordsArray();
|
|
41078
|
+
if (!rawRecords || !Array.isArray(recordArr) || 0 === recordArr.length) return;
|
|
41079
|
+
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length),
|
|
41080
|
+
rawInsertIndex = this._hasFilterInEffect() ? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex) : this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
41081
|
+
if (rawRecords.splice(rawInsertIndex, 0, ...recordArr), syncToOriginalRecords && this._hasFilterInEffect()) for (let i = 0; i < recordArr.length; i++) this.markForceVisibleRecord(recordArr[i]);
|
|
41082
|
+
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);
|
|
41031
41083
|
}
|
|
41032
41084
|
addRecordForSorted(record) {
|
|
41033
41085
|
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));
|
|
@@ -41043,27 +41095,49 @@
|
|
|
41043
41095
|
}
|
|
41044
41096
|
}
|
|
41045
41097
|
adjustBeforeChangedRecordsMap(insertIndex, insertCount, type = "add") {
|
|
41046
|
-
|
|
41047
|
-
|
|
41048
|
-
|
|
41049
|
-
|
|
41050
|
-
|
|
41051
|
-
|
|
41052
|
-
|
|
41053
|
-
|
|
41054
|
-
|
|
41055
|
-
|
|
41056
|
-
|
|
41057
|
-
|
|
41058
|
-
|
|
41059
|
-
|
|
41060
|
-
|
|
41061
|
-
|
|
41062
|
-
|
|
41063
|
-
|
|
41064
|
-
|
|
41098
|
+
const delta = "add" === type ? insertCount : -insertCount,
|
|
41099
|
+
numericKeys = [];
|
|
41100
|
+
this.beforeChangedRecordsMap.forEach((_, key) => {
|
|
41101
|
+
const numKey = Number(key);
|
|
41102
|
+
Number.isInteger(numKey) && numKey.toString() === key && numKey >= insertIndex && numericKeys.push(numKey);
|
|
41103
|
+
}), numericKeys.sort((a, b) => "add" === type ? b - a : a - b);
|
|
41104
|
+
for (let i = 0; i < numericKeys.length; i++) {
|
|
41105
|
+
const key = numericKeys[i],
|
|
41106
|
+
record = this.beforeChangedRecordsMap.get(key.toString());
|
|
41107
|
+
this.beforeChangedRecordsMap.delete(key.toString()), this.beforeChangedRecordsMap.set((key + delta).toString(), record);
|
|
41108
|
+
}
|
|
41109
|
+
}
|
|
41110
|
+
deleteRecords(recordIndexs, syncToOriginalRecords = !1) {
|
|
41111
|
+
var _a, _b, _c;
|
|
41112
|
+
if (!syncToOriginalRecords) {
|
|
41113
|
+
if (Array.isArray(this.records)) {
|
|
41114
|
+
const realDeletedRecordIndexs = [],
|
|
41115
|
+
recordIndexsMaxToMin = recordIndexs.sort((a, b) => b - a);
|
|
41116
|
+
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
41117
|
+
const recordIndex = recordIndexsMaxToMin[index];
|
|
41118
|
+
if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
|
|
41119
|
+
this.adjustBeforeChangedRecordsMap(recordIndex, 1, "delete"), realDeletedRecordIndexs.push(recordIndex);
|
|
41120
|
+
const deletedRecord = this.records[recordIndex];
|
|
41121
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].deleteRecord(deletedRecord);
|
|
41122
|
+
this.records.splice(recordIndex, 1), this.currentIndexedData.pop(), this._sourceLength -= 1;
|
|
41123
|
+
}
|
|
41124
|
+
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;
|
|
41125
|
+
}
|
|
41126
|
+
return [];
|
|
41127
|
+
}
|
|
41128
|
+
const rawRecords = this._getRawRecordsArray();
|
|
41129
|
+
if (!rawRecords || !Array.isArray(this.records)) return [];
|
|
41130
|
+
const realDeletedRecordIndexs = [],
|
|
41131
|
+
recordIndexsMaxToMin = recordIndexs.slice().sort((a, b) => b - a),
|
|
41132
|
+
rawDeletedIndexs = [];
|
|
41133
|
+
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
41134
|
+
const viewIndex = recordIndexsMaxToMin[index];
|
|
41135
|
+
if (viewIndex >= this.records.length || viewIndex < 0) continue;
|
|
41136
|
+
const deletedRecord = this.records[viewIndex],
|
|
41137
|
+
rawIndex = rawRecords.indexOf(deletedRecord);
|
|
41138
|
+
rawIndex >= 0 && (rawRecords.splice(rawIndex, 1), rawDeletedIndexs.push(rawIndex)), realDeletedRecordIndexs.push(viewIndex);
|
|
41065
41139
|
}
|
|
41066
|
-
return
|
|
41140
|
+
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;
|
|
41067
41141
|
}
|
|
41068
41142
|
deleteRecordsForSorted(recordIndexs) {
|
|
41069
41143
|
if (Array.isArray(this.records)) {
|
|
@@ -41077,18 +41151,34 @@
|
|
|
41077
41151
|
this.sortedIndexMap.clear(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength), this.beforeChangedRecordsMap.clear();
|
|
41078
41152
|
}
|
|
41079
41153
|
}
|
|
41080
|
-
updateRecords(records, recordIndexs) {
|
|
41081
|
-
|
|
41154
|
+
updateRecords(records, recordIndexs, syncToOriginalRecords = !1) {
|
|
41155
|
+
var _a;
|
|
41156
|
+
if (!syncToOriginalRecords) {
|
|
41157
|
+
const realDeletedRecordIndexs = [];
|
|
41158
|
+
for (let index = 0; index < recordIndexs.length; index++) {
|
|
41159
|
+
const recordIndex = recordIndexs[index];
|
|
41160
|
+
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 {
|
|
41161
|
+
if (recordIndex >= this._sourceLength || recordIndex < 0) continue;
|
|
41162
|
+
this.beforeChangedRecordsMap.delete(recordIndex.toString()), realDeletedRecordIndexs.push(recordIndex);
|
|
41163
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
|
|
41164
|
+
this.records[recordIndex] = records[index];
|
|
41165
|
+
}
|
|
41166
|
+
}
|
|
41167
|
+
return this.userPagination && this.updatePagerData(), realDeletedRecordIndexs;
|
|
41168
|
+
}
|
|
41169
|
+
const rawRecords = this._getRawRecordsArray();
|
|
41170
|
+
if (!rawRecords || !Array.isArray(this.records)) return [];
|
|
41171
|
+
const realUpdatedIndexs = [];
|
|
41082
41172
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
41083
41173
|
const recordIndex = recordIndexs[index];
|
|
41084
|
-
if (Array.isArray(recordIndex)) this.beforeChangedRecordsMap.delete(recordIndex.toString()),
|
|
41085
|
-
if (recordIndex >= this.
|
|
41086
|
-
this.
|
|
41087
|
-
|
|
41088
|
-
|
|
41174
|
+
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 {
|
|
41175
|
+
if (recordIndex >= this.records.length || recordIndex < 0) continue;
|
|
41176
|
+
const oldRecord = this.records[recordIndex],
|
|
41177
|
+
rawIndex = rawRecords.indexOf(oldRecord);
|
|
41178
|
+
rawIndex >= 0 && (rawRecords[rawIndex] = records[index]), realUpdatedIndexs.push(recordIndex);
|
|
41089
41179
|
}
|
|
41090
41180
|
}
|
|
41091
|
-
return this.
|
|
41181
|
+
return this.beforeChangedRecordsMap.clear(), this.sortedIndexMap.clear(), this.updateFilterRules(null === (_a = this.dataConfig) || void 0 === _a ? void 0 : _a.filterRules), realUpdatedIndexs;
|
|
41092
41182
|
}
|
|
41093
41183
|
updateRecordsForSorted(records, recordIndexs) {
|
|
41094
41184
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
@@ -41156,23 +41246,30 @@
|
|
|
41156
41246
|
setSortedIndexMap(field, filedMap) {
|
|
41157
41247
|
this.sortedIndexMap.set(field, filedMap);
|
|
41158
41248
|
}
|
|
41249
|
+
markForceVisibleRecord(record) {
|
|
41250
|
+
!record || "object" != typeof record && "function" != typeof record || (this._forceVisibleRecords || (this._forceVisibleRecords = new WeakSet()), this._forceVisibleRecords.add(record));
|
|
41251
|
+
}
|
|
41252
|
+
clearForceVisibleRecords() {
|
|
41253
|
+
this._forceVisibleRecords = void 0;
|
|
41254
|
+
}
|
|
41159
41255
|
clearFilteredChildren(record) {
|
|
41160
41256
|
var _a, _b;
|
|
41161
41257
|
record.filteredChildren = void 0;
|
|
41162
41258
|
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]);
|
|
41163
41259
|
}
|
|
41164
41260
|
filterRecord(record) {
|
|
41165
|
-
var _a, _b, _c;
|
|
41261
|
+
var _a, _b, _c, _d;
|
|
41262
|
+
if (null === (_a = this._forceVisibleRecords) || void 0 === _a ? void 0 : _a.has(record)) return !0;
|
|
41166
41263
|
let isReserved = !0;
|
|
41167
|
-
for (let i = 0; i < (null === (
|
|
41168
|
-
const filterRule = null === (
|
|
41264
|
+
for (let i = 0; i < (null === (_b = this.dataConfig.filterRules) || void 0 === _b ? void 0 : _b.length); i++) {
|
|
41265
|
+
const filterRule = null === (_c = this.dataConfig) || void 0 === _c ? void 0 : _c.filterRules[i];
|
|
41169
41266
|
if (filterRule.filterKey) {
|
|
41170
41267
|
const filterValue = record[filterRule.filterKey];
|
|
41171
41268
|
if (-1 === filterRule.filteredValues.indexOf(filterValue)) {
|
|
41172
41269
|
isReserved = !1;
|
|
41173
41270
|
break;
|
|
41174
41271
|
}
|
|
41175
|
-
} else if (!(null === (
|
|
41272
|
+
} else if (!(null === (_d = filterRule.filterFunc) || void 0 === _d ? void 0 : _d.call(filterRule, record))) {
|
|
41176
41273
|
isReserved = !1;
|
|
41177
41274
|
break;
|
|
41178
41275
|
}
|
|
@@ -47722,35 +47819,11 @@
|
|
|
47722
47819
|
return hoverMode;
|
|
47723
47820
|
}
|
|
47724
47821
|
|
|
47725
|
-
let brushingChartInstance,
|
|
47726
|
-
brushingChartInstanceCellPos = {
|
|
47727
|
-
col: -1,
|
|
47728
|
-
row: -1
|
|
47729
|
-
};
|
|
47730
|
-
function setBrushingChartInstance(chartInstance, col, row) {
|
|
47731
|
-
brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
|
|
47732
|
-
col: col,
|
|
47733
|
-
row: row
|
|
47734
|
-
};
|
|
47735
|
-
}
|
|
47736
|
-
function clearBrushingChartInstance() {
|
|
47737
|
-
brushingChartInstance = void 0, brushingChartInstanceCellPos = {
|
|
47738
|
-
col: -1,
|
|
47739
|
-
row: -1
|
|
47740
|
-
};
|
|
47741
|
-
}
|
|
47742
|
-
function getBrushingChartInstance() {
|
|
47743
|
-
return brushingChartInstance;
|
|
47744
|
-
}
|
|
47745
|
-
function getBrushingChartInstanceCellPos() {
|
|
47746
|
-
return brushingChartInstanceCellPos;
|
|
47747
|
-
}
|
|
47748
47822
|
const chartInstanceListColumnByColumnDirection = {};
|
|
47749
47823
|
const chartInstanceListRowByRowDirection = {};
|
|
47750
|
-
const delayRunDimensionHoverTimer = [];
|
|
47751
47824
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
47752
47825
|
var _a;
|
|
47753
|
-
|
|
47826
|
+
isValid$2(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
47754
47827
|
const {
|
|
47755
47828
|
rowStart: rowStart
|
|
47756
47829
|
} = table.getBodyVisibleRowRange();
|
|
@@ -47759,40 +47832,76 @@
|
|
|
47759
47832
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47760
47833
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47761
47834
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47762
|
-
chartInstanceListColumnByColumnDirection[col][i] || isValid$2(chartNode) && (chartNode.
|
|
47763
|
-
|
|
47764
|
-
var _a, _b, _c, _d;
|
|
47835
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$2(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
47836
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47765
47837
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47766
47838
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47767
47839
|
let isShowTooltip = !isScatter;
|
|
47768
|
-
if (isScatter
|
|
47769
|
-
const
|
|
47770
|
-
|
|
47840
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
|
|
47841
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
|
|
47842
|
+
{
|
|
47843
|
+
rowEnd: rowEnd1
|
|
47844
|
+
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
47845
|
+
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47846
|
+
const {
|
|
47847
|
+
rowEnd: rowEnd2
|
|
47848
|
+
} = table.getBodyVisibleRowRange(0, 5);
|
|
47849
|
+
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47850
|
+
}
|
|
47851
|
+
} else if (i === rowStart && isShowTooltip) {
|
|
47852
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
|
|
47853
|
+
{
|
|
47854
|
+
rowStart: rowStart1
|
|
47855
|
+
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
47856
|
+
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
47857
|
+
const {
|
|
47858
|
+
rowStart: rowStart2
|
|
47859
|
+
} = table.getBodyVisibleRowRange(0, -5);
|
|
47860
|
+
isShowTooltip = rowStart2 !== rowStart;
|
|
47861
|
+
}
|
|
47862
|
+
}
|
|
47863
|
+
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 {
|
|
47864
|
+
const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
47771
47865
|
absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
|
|
47772
47866
|
hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47773
47867
|
tooltip: !1,
|
|
47774
47868
|
showTooltipOption: {
|
|
47775
|
-
x: canvasXY.x
|
|
47776
|
-
y: absolutePositionTop
|
|
47869
|
+
x: canvasXY.x,
|
|
47870
|
+
y: absolutePositionTop,
|
|
47777
47871
|
activeType: "dimension"
|
|
47778
47872
|
}
|
|
47779
47873
|
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47780
47874
|
tooltip: isShowTooltip,
|
|
47781
47875
|
showTooltipOption: {
|
|
47782
|
-
x: canvasXY.x
|
|
47783
|
-
y: absolutePositionTop
|
|
47876
|
+
x: canvasXY.x,
|
|
47877
|
+
y: absolutePositionTop,
|
|
47784
47878
|
activeType: "dimension"
|
|
47785
47879
|
}
|
|
47786
47880
|
});
|
|
47787
47881
|
}
|
|
47788
47882
|
}
|
|
47789
|
-
}, 0);
|
|
47790
|
-
|
|
47883
|
+
}, 0), table.scenegraph.updateNextFrame();
|
|
47884
|
+
}
|
|
47885
|
+
}
|
|
47886
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
47887
|
+
var _a;
|
|
47888
|
+
if (isValid$2(chartInstanceListColumnByColumnDirection[col])) {
|
|
47889
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
47890
|
+
if (isValid$2(excludedRow) && Number(i) === excludedRow) continue;
|
|
47891
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
47892
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47893
|
+
chartNode.addUpdateShapeAndBoundsTag(), isValid$2(chartNode) && (chartNode.deactivate(table, {
|
|
47894
|
+
releaseChartInstance: !0,
|
|
47895
|
+
releaseColumnChartInstance: !1,
|
|
47896
|
+
releaseRowChartInstance: !1
|
|
47897
|
+
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
47898
|
+
}
|
|
47899
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
47791
47900
|
}
|
|
47792
47901
|
}
|
|
47793
47902
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
47794
47903
|
var _a;
|
|
47795
|
-
|
|
47904
|
+
isValid$2(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
47796
47905
|
const {
|
|
47797
47906
|
colStart: colStart
|
|
47798
47907
|
} = table.getBodyVisibleColRange();
|
|
@@ -47801,162 +47910,64 @@
|
|
|
47801
47910
|
for (let i = colStart; i <= colEnd; i++) {
|
|
47802
47911
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
47803
47912
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47804
|
-
chartInstanceListRowByRowDirection[row][i] || isValid$2(chartNode) && (chartNode.
|
|
47805
|
-
const timer = setTimeout(() => {
|
|
47913
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$2(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
47806
47914
|
var _a, _b, _c, _d;
|
|
47807
47915
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47808
47916
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47809
47917
|
let isShowTooltip = !isScatter;
|
|
47810
|
-
if (isScatter
|
|
47811
|
-
const
|
|
47812
|
-
|
|
47918
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
|
|
47919
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47920
|
+
{
|
|
47921
|
+
colEnd: colEnd1
|
|
47922
|
+
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
47923
|
+
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47924
|
+
const {
|
|
47925
|
+
colEnd: colEnd2
|
|
47926
|
+
} = table.getBodyVisibleColRange(0, 5);
|
|
47927
|
+
isShowTooltip = colEnd2 !== colEnd;
|
|
47928
|
+
}
|
|
47929
|
+
} else if (i === colStart && isShowTooltip) {
|
|
47930
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47931
|
+
{
|
|
47932
|
+
colStart: colStart1
|
|
47933
|
+
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
47934
|
+
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
47935
|
+
const {
|
|
47936
|
+
colStart: colStart2
|
|
47937
|
+
} = table.getBodyVisibleColRange(0, -5);
|
|
47938
|
+
isShowTooltip = colStart2 !== colStart;
|
|
47939
|
+
}
|
|
47940
|
+
}
|
|
47941
|
+
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 {
|
|
47942
|
+
const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
47813
47943
|
absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
|
|
47814
47944
|
hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47815
47945
|
tooltip: !1,
|
|
47816
47946
|
showTooltipOption: {
|
|
47817
|
-
x: absolutePositionLeft
|
|
47818
|
-
y: canvasXY.y
|
|
47947
|
+
x: absolutePositionLeft,
|
|
47948
|
+
y: canvasXY.y,
|
|
47819
47949
|
activeType: "dimension"
|
|
47820
47950
|
}
|
|
47821
47951
|
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47822
47952
|
tooltip: isShowTooltip,
|
|
47823
47953
|
showTooltipOption: {
|
|
47824
|
-
x: absolutePositionLeft
|
|
47825
|
-
y: canvasXY.y
|
|
47954
|
+
x: absolutePositionLeft,
|
|
47955
|
+
y: canvasXY.y,
|
|
47826
47956
|
activeType: "dimension"
|
|
47827
47957
|
}
|
|
47828
47958
|
});
|
|
47829
47959
|
}
|
|
47830
47960
|
}
|
|
47831
|
-
}, 0);
|
|
47832
|
-
delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
|
|
47833
|
-
}
|
|
47834
|
-
}
|
|
47835
|
-
function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
|
|
47836
|
-
var _a;
|
|
47837
|
-
clearDelayRunDimensionHoverTimers();
|
|
47838
|
-
const {
|
|
47839
|
-
rowStart: rowStart
|
|
47840
|
-
} = table.getBodyVisibleRowRange();
|
|
47841
|
-
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
47842
|
-
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
47843
|
-
const {
|
|
47844
|
-
colStart: colStart
|
|
47845
|
-
} = table.getBodyVisibleColRange();
|
|
47846
|
-
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
47847
|
-
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
47848
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
47849
|
-
isValid$2(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
47850
|
-
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47851
|
-
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47852
|
-
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47853
|
-
chartInstanceListColumnByColumnDirection[col][i] || isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
|
|
47854
|
-
const timer = setTimeout(() => {
|
|
47855
|
-
var _a, _b;
|
|
47856
|
-
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47857
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47858
|
-
let isShowTooltip = !0;
|
|
47859
|
-
"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, {
|
|
47860
|
-
activeType: "mark"
|
|
47861
|
-
})));
|
|
47862
|
-
}
|
|
47863
|
-
}, 0);
|
|
47864
|
-
delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
|
|
47865
|
-
}
|
|
47866
|
-
}
|
|
47867
|
-
}
|
|
47868
|
-
function checkIsShowTooltipForEdgeRow(row, table) {
|
|
47869
|
-
var _a, _b;
|
|
47870
|
-
let isShowTooltip = !0;
|
|
47871
|
-
const {
|
|
47872
|
-
rowStart: rowStart
|
|
47873
|
-
} = table.getBodyVisibleRowRange();
|
|
47874
|
-
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
47875
|
-
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
47876
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47877
|
-
if (row === rowEnd && isShowTooltip) {
|
|
47878
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
|
|
47879
|
-
{
|
|
47880
|
-
rowEnd: rowEnd1
|
|
47881
|
-
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
47882
|
-
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47883
|
-
const {
|
|
47884
|
-
rowEnd: rowEnd2
|
|
47885
|
-
} = table.getBodyVisibleRowRange(0, 5);
|
|
47886
|
-
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47887
|
-
}
|
|
47888
|
-
} else if (row === rowStart && isShowTooltip) {
|
|
47889
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
|
|
47890
|
-
{
|
|
47891
|
-
rowStart: rowStart1
|
|
47892
|
-
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
47893
|
-
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
47894
|
-
const {
|
|
47895
|
-
rowStart: rowStart2
|
|
47896
|
-
} = table.getBodyVisibleRowRange(0, -5);
|
|
47897
|
-
isShowTooltip = rowStart2 !== rowStart;
|
|
47898
|
-
}
|
|
47899
|
-
}
|
|
47900
|
-
return isShowTooltip;
|
|
47901
|
-
}
|
|
47902
|
-
function checkIsShowTooltipForEdgeColumn(col, table) {
|
|
47903
|
-
let isShowTooltip = !0;
|
|
47904
|
-
const {
|
|
47905
|
-
colStart: colStart
|
|
47906
|
-
} = table.getBodyVisibleColRange();
|
|
47907
|
-
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
47908
|
-
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
47909
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47910
|
-
if (col === colEnd && isShowTooltip) {
|
|
47911
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47912
|
-
{
|
|
47913
|
-
colEnd: colEnd1
|
|
47914
|
-
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
47915
|
-
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47916
|
-
const {
|
|
47917
|
-
colEnd: colEnd2
|
|
47918
|
-
} = table.getBodyVisibleColRange(0, 5);
|
|
47919
|
-
isShowTooltip = colEnd2 !== colEnd;
|
|
47920
|
-
}
|
|
47921
|
-
} else if (col === colStart && isShowTooltip) {
|
|
47922
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47923
|
-
{
|
|
47924
|
-
colStart: colStart1
|
|
47925
|
-
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
47926
|
-
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
47927
|
-
const {
|
|
47928
|
-
colStart: colStart2
|
|
47929
|
-
} = table.getBodyVisibleColRange(0, -5);
|
|
47930
|
-
isShowTooltip = colStart2 !== colStart;
|
|
47931
|
-
}
|
|
47932
|
-
}
|
|
47933
|
-
return isShowTooltip;
|
|
47934
|
-
}
|
|
47935
|
-
function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
|
|
47936
|
-
var _a;
|
|
47937
|
-
if (isValid$2(chartInstanceListColumnByColumnDirection[col])) {
|
|
47938
|
-
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
47939
|
-
if (isValid$2(excludedRow) && Number(i) === excludedRow) continue;
|
|
47940
|
-
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
47941
|
-
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47942
|
-
isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
|
|
47943
|
-
forceRelease: forceRelease,
|
|
47944
|
-
releaseChartInstance: !0,
|
|
47945
|
-
releaseColumnChartInstance: !1,
|
|
47946
|
-
releaseRowChartInstance: !1
|
|
47947
|
-
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
47948
|
-
}
|
|
47949
|
-
delete chartInstanceListColumnByColumnDirection[col];
|
|
47961
|
+
}, 0), table.scenegraph.updateNextFrame();
|
|
47950
47962
|
}
|
|
47951
47963
|
}
|
|
47952
|
-
function clearChartInstanceListByRowDirection(row, excludedCol, table
|
|
47964
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table) {
|
|
47953
47965
|
var _a;
|
|
47954
47966
|
if (isValid$2(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
47955
47967
|
if (isValid$2(excludedCol) && Number(i) === excludedCol) continue;
|
|
47956
47968
|
const cellGroup = table.scenegraph.getCell(Number(i), row),
|
|
47957
47969
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47958
|
-
isValid$2(chartNode) && (chartNode.
|
|
47959
|
-
forceRelease: forceRelease,
|
|
47970
|
+
chartNode.addUpdateShapeAndBoundsTag(), isValid$2(chartNode) && (chartNode.deactivate(table, {
|
|
47960
47971
|
releaseChartInstance: !0,
|
|
47961
47972
|
releaseColumnChartInstance: !1,
|
|
47962
47973
|
releaseRowChartInstance: !1
|
|
@@ -47964,19 +47975,6 @@
|
|
|
47964
47975
|
}
|
|
47965
47976
|
delete chartInstanceListRowByRowDirection[row];
|
|
47966
47977
|
}
|
|
47967
|
-
function clearDelayRunDimensionHoverTimers() {
|
|
47968
|
-
for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
|
|
47969
|
-
delayRunDimensionHoverTimer.length = 0;
|
|
47970
|
-
}
|
|
47971
|
-
function clearAllChartInstanceList(table, forceRelease = !1) {
|
|
47972
|
-
clearDelayRunDimensionHoverTimers();
|
|
47973
|
-
for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
|
|
47974
|
-
for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
|
|
47975
|
-
}
|
|
47976
|
-
let disabledShowTooltipToAllChartInstances = !1;
|
|
47977
|
-
function isDisabledShowTooltipToAllChartInstances() {
|
|
47978
|
-
return disabledShowTooltipToAllChartInstances;
|
|
47979
|
-
}
|
|
47980
47978
|
|
|
47981
47979
|
function isValidAlignDomain(domain) {
|
|
47982
47980
|
return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -48610,7 +48608,7 @@
|
|
|
48610
48608
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
48611
48609
|
class Chart extends Rect$2 {
|
|
48612
48610
|
constructor(isShareChartSpec, params) {
|
|
48613
|
-
if (super(params), this.type = "chart", this.
|
|
48611
|
+
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 {
|
|
48614
48612
|
const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
|
|
48615
48613
|
renderCanvas: params.canvas,
|
|
48616
48614
|
mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
|
|
@@ -48631,7 +48629,7 @@
|
|
|
48631
48629
|
}
|
|
48632
48630
|
}
|
|
48633
48631
|
activate(table) {
|
|
48634
|
-
var _a, _b, _c, _d, _e
|
|
48632
|
+
var _a, _b, _c, _d, _e;
|
|
48635
48633
|
if (this.activeChartInstance) return;
|
|
48636
48634
|
const {
|
|
48637
48635
|
col: col,
|
|
@@ -48650,7 +48648,7 @@
|
|
|
48650
48648
|
y1: y1 - table.scrollTop,
|
|
48651
48649
|
y2: y2 - table.scrollTop
|
|
48652
48650
|
});
|
|
48653
|
-
this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
48651
|
+
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, {
|
|
48654
48652
|
renderCanvas: this.attribute.canvas,
|
|
48655
48653
|
mode: "desktop-browser",
|
|
48656
48654
|
canvasControled: !1,
|
|
@@ -48684,7 +48682,7 @@
|
|
|
48684
48682
|
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());
|
|
48685
48683
|
}
|
|
48686
48684
|
},
|
|
48687
|
-
componentShowContent:
|
|
48685
|
+
componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
|
|
48688
48686
|
tooltip: {
|
|
48689
48687
|
dimension: !1,
|
|
48690
48688
|
mark: !0
|
|
@@ -48695,43 +48693,16 @@
|
|
|
48695
48693
|
const chartStage = this.activeChartInstance.getStage(),
|
|
48696
48694
|
matrix = this.globalTransMatrix.clone(),
|
|
48697
48695
|
stageMatrix = this.stage.window.getViewBoxTransform();
|
|
48698
|
-
let brushChangeThrottle;
|
|
48699
48696
|
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 => {
|
|
48700
48697
|
var _a;
|
|
48701
|
-
!1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null
|
|
48702
|
-
}), (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 => {
|
|
48703
|
-
var _a;
|
|
48704
|
-
brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
|
|
48705
|
-
})), this.activeChartInstance.on("brushStart", params => {
|
|
48706
|
-
const brushingChartInstance = getBrushingChartInstance();
|
|
48707
|
-
brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), setBrushingChartInstance(this.activeChartInstance, col, row));
|
|
48698
|
+
!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);
|
|
48708
48699
|
}), this.activeChartInstance.on("brushEnd", params => {
|
|
48709
48700
|
var _a;
|
|
48710
|
-
|
|
48701
|
+
table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
|
|
48711
48702
|
Chart.temp = 1;
|
|
48712
48703
|
}, 0);
|
|
48713
|
-
}),
|
|
48714
|
-
markName: "pie"
|
|
48715
|
-
}, params => {
|
|
48716
|
-
var _a;
|
|
48717
|
-
const categoryField = this.attribute.spec.categoryField,
|
|
48718
|
-
datum = {
|
|
48719
|
-
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
48720
|
-
};
|
|
48721
|
-
generateChartInstanceListByViewRange(datum, table, !1);
|
|
48722
|
-
}), this.activeChartInstance.on("pointerout", {
|
|
48723
|
-
markName: "pie"
|
|
48724
|
-
}, params => {
|
|
48725
|
-
var _a;
|
|
48726
|
-
const categoryField = this.attribute.spec.categoryField,
|
|
48727
|
-
datum = {
|
|
48728
|
-
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
48729
|
-
};
|
|
48730
|
-
generateChartInstanceListByViewRange(datum, table, !0);
|
|
48731
|
-
})), this.activeChartInstance.on("dimensionHover", params => {
|
|
48704
|
+
}), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
|
|
48732
48705
|
var _a, _b;
|
|
48733
|
-
if (isDisabledShowTooltipToAllChartInstances()) return;
|
|
48734
|
-
this.activeChartInstance.disableTooltip(!1);
|
|
48735
48706
|
const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
|
|
48736
48707
|
canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
|
|
48737
48708
|
viewport = null === (_b = null == params ? void 0 : params.event) || void 0 === _b ? void 0 : _b.viewport;
|
|
@@ -48748,11 +48719,11 @@
|
|
|
48748
48719
|
prev_justShowMarkTooltip = this.justShowMarkTooltip;
|
|
48749
48720
|
params.mark && params.datum && !Array.isArray(params.datum) ? (this.activeChartInstanceHoverOnMark = params.mark, justShowMarkTooltip = !0) : (this.activeChartInstanceHoverOnMark = null, justShowMarkTooltip = !1), this.justShowMarkTooltip = justShowMarkTooltip;
|
|
48750
48721
|
let delayRunDimensionHover = !1;
|
|
48751
|
-
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.
|
|
48722
|
+
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) {
|
|
48752
48723
|
const dimensionValue = dimensionInfo.value,
|
|
48753
48724
|
indicatorsAsCol = table.options.indicatorsAsCol;
|
|
48754
|
-
if (delayRunDimensionHover ? (this.
|
|
48755
|
-
|
|
48725
|
+
if (delayRunDimensionHover ? (clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = setTimeout(() => {
|
|
48726
|
+
indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
|
|
48756
48727
|
}, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
|
|
48757
48728
|
const series = dimensionInfo.data[0].series,
|
|
48758
48729
|
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
@@ -48793,26 +48764,21 @@
|
|
|
48793
48764
|
}
|
|
48794
48765
|
}
|
|
48795
48766
|
}
|
|
48796
|
-
})
|
|
48797
|
-
}
|
|
48798
|
-
clearDelayRunDimensionHoverTimer() {
|
|
48799
|
-
clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0;
|
|
48767
|
+
}), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
|
|
48800
48768
|
}
|
|
48801
48769
|
deactivate(table, {
|
|
48802
|
-
forceRelease = !1,
|
|
48803
48770
|
releaseChartInstance = !0,
|
|
48804
48771
|
releaseColumnChartInstance = !0,
|
|
48805
|
-
releaseRowChartInstance = !0
|
|
48806
|
-
releaseAllChartInstance = !1
|
|
48772
|
+
releaseRowChartInstance = !0
|
|
48807
48773
|
} = {}) {
|
|
48808
48774
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48809
|
-
if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.
|
|
48810
|
-
|
|
48775
|
+
if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
|
|
48776
|
+
null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
48811
48777
|
x1: -1e3,
|
|
48812
48778
|
x2: -800,
|
|
48813
48779
|
y1: -1e3,
|
|
48814
48780
|
y2: -800
|
|
48815
|
-
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null
|
|
48781
|
+
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
|
|
48816
48782
|
const {
|
|
48817
48783
|
col: col,
|
|
48818
48784
|
row: row
|
|
@@ -48825,7 +48791,7 @@
|
|
|
48825
48791
|
} = this.parent;
|
|
48826
48792
|
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));
|
|
48827
48793
|
}
|
|
48828
|
-
|
|
48794
|
+
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);
|
|
48829
48795
|
}
|
|
48830
48796
|
updateData(data) {
|
|
48831
48797
|
this.attribute.data = data;
|
|
@@ -48840,14 +48806,13 @@
|
|
|
48840
48806
|
y1: y1,
|
|
48841
48807
|
x2: x2,
|
|
48842
48808
|
y2: y2
|
|
48843
|
-
} = cellGroup.globalAABBBounds
|
|
48844
|
-
|
|
48845
|
-
|
|
48846
|
-
|
|
48847
|
-
|
|
48848
|
-
|
|
48849
|
-
|
|
48850
|
-
return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
|
|
48809
|
+
} = cellGroup.globalAABBBounds;
|
|
48810
|
+
return {
|
|
48811
|
+
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)),
|
|
48812
|
+
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)),
|
|
48813
|
+
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)),
|
|
48814
|
+
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))
|
|
48815
|
+
};
|
|
48851
48816
|
}
|
|
48852
48817
|
}
|
|
48853
48818
|
function getTableBounds(col, row, table) {
|
|
@@ -49062,7 +49027,7 @@
|
|
|
49062
49027
|
{
|
|
49063
49028
|
width = groupAttribute.width,
|
|
49064
49029
|
height = groupAttribute.height
|
|
49065
|
-
} = chart.attribute,
|
|
49030
|
+
} = (chart.getViewBox(), chart.attribute),
|
|
49066
49031
|
{
|
|
49067
49032
|
table: table
|
|
49068
49033
|
} = chart.getRootNode(),
|
|
@@ -49090,9 +49055,8 @@
|
|
|
49090
49055
|
});
|
|
49091
49056
|
}
|
|
49092
49057
|
}
|
|
49093
|
-
const
|
|
49094
|
-
|
|
49095
|
-
lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
|
|
49058
|
+
const viewBox = chart.getViewBox();
|
|
49059
|
+
activeChartInstance.updateViewBox({
|
|
49096
49060
|
x1: 0,
|
|
49097
49061
|
x2: viewBox.x2 - viewBox.x1,
|
|
49098
49062
|
y1: 0,
|
|
@@ -52610,10 +52574,9 @@
|
|
|
52610
52574
|
});
|
|
52611
52575
|
}
|
|
52612
52576
|
}
|
|
52613
|
-
function updateChartState(scenegraph, datum
|
|
52577
|
+
function updateChartState(scenegraph, datum) {
|
|
52614
52578
|
const table = scenegraph.table;
|
|
52615
52579
|
if (table.isPivotChart()) {
|
|
52616
|
-
table._selectedDataMode = selectedDataMode;
|
|
52617
52580
|
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
52618
52581
|
if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
|
|
52619
52582
|
const newSelectedDataItemsInChart = [];
|
|
@@ -53361,39 +53324,16 @@
|
|
|
53361
53324
|
resetResidentHoverIcon(col, row) {
|
|
53362
53325
|
resetResidentHoverIcon(col, row, this);
|
|
53363
53326
|
}
|
|
53364
|
-
deactivateChart(col, row
|
|
53365
|
-
var _a, _b, _c
|
|
53366
|
-
if (-1 === col || -1 === row)
|
|
53367
|
-
if (forceRelease) {
|
|
53368
|
-
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
|
|
53369
|
-
brushingChartInstance = getBrushingChartInstance();
|
|
53370
|
-
if (brushingChartInstanceCellPos && brushingChartInstance) {
|
|
53371
|
-
const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
53372
|
-
(null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (clearBrushingChartInstance(), 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, {
|
|
53373
|
-
forceRelease: !0,
|
|
53374
|
-
releaseChartInstance: !0,
|
|
53375
|
-
releaseColumnChartInstance: !0,
|
|
53376
|
-
releaseRowChartInstance: !0,
|
|
53377
|
-
releaseAllChartInstance: !0
|
|
53378
|
-
}));
|
|
53379
|
-
}
|
|
53380
|
-
}
|
|
53381
|
-
return;
|
|
53382
|
-
}
|
|
53327
|
+
deactivateChart(col, row) {
|
|
53328
|
+
var _a, _b, _c;
|
|
53329
|
+
if (-1 === col || -1 === row) return;
|
|
53383
53330
|
const cellGroup = this.getCell(col, row);
|
|
53384
|
-
if (null === (
|
|
53385
|
-
if (forceRelease) return clearBrushingChartInstance(), void (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _e ? void 0 : _e.deactivate) || void 0 === _f || _f.call(_e, this.table, {
|
|
53386
|
-
forceRelease: !0,
|
|
53387
|
-
releaseChartInstance: !0,
|
|
53388
|
-
releaseColumnChartInstance: !0,
|
|
53389
|
-
releaseRowChartInstance: !0,
|
|
53390
|
-
releaseAllChartInstance: !0
|
|
53391
|
-
}));
|
|
53331
|
+
if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
|
|
53392
53332
|
const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
|
|
53393
|
-
null === (
|
|
53394
|
-
releaseChartInstance: "
|
|
53395
|
-
releaseColumnChartInstance:
|
|
53396
|
-
releaseRowChartInstance:
|
|
53333
|
+
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 ? {
|
|
53334
|
+
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,
|
|
53335
|
+
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,
|
|
53336
|
+
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
|
|
53397
53337
|
} : void 0);
|
|
53398
53338
|
}
|
|
53399
53339
|
}
|
|
@@ -53441,15 +53381,8 @@
|
|
|
53441
53381
|
updateChartSizeForResizeRowHeight(row) {
|
|
53442
53382
|
updateChartSizeForResizeRowHeight(this, row);
|
|
53443
53383
|
}
|
|
53444
|
-
updateChartState(datum
|
|
53445
|
-
|
|
53446
|
-
if (this.table.isPivotChart()) {
|
|
53447
|
-
if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
|
|
53448
|
-
const brushingChartInstance = getBrushingChartInstance();
|
|
53449
|
-
brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), null === (_b = null === (_a = this.table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.clearChartState) || void 0 === _b || _b.call(_a);
|
|
53450
|
-
}
|
|
53451
|
-
updateChartState(this, datum, selectedDataMode);
|
|
53452
|
-
}
|
|
53384
|
+
updateChartState(datum) {
|
|
53385
|
+
this.table.isPivotChart() && updateChartState(this, datum);
|
|
53453
53386
|
}
|
|
53454
53387
|
updateCheckboxCellState(col, row, checked) {
|
|
53455
53388
|
var _a, _b;
|
|
@@ -56476,7 +56409,7 @@
|
|
|
56476
56409
|
}, 0 !== e.button) return;
|
|
56477
56410
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
56478
56411
|
if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
|
|
56479
|
-
if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) &&
|
|
56412
|
+
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;
|
|
56480
56413
|
const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
|
|
56481
56414
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
56482
56415
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -56504,7 +56437,7 @@
|
|
|
56504
56437
|
}
|
|
56505
56438
|
eventManager.dealTableHover(eventArgsSet);
|
|
56506
56439
|
} else {
|
|
56507
|
-
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null
|
|
56440
|
+
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56508
56441
|
if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56509
56442
|
if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56510
56443
|
eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
|
|
@@ -56656,7 +56589,7 @@
|
|
|
56656
56589
|
if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
|
|
56657
56590
|
const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
|
|
56658
56591
|
if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
56659
|
-
table.scenegraph.updateChartState(null
|
|
56592
|
+
table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
|
|
56660
56593
|
const {
|
|
56661
56594
|
eventArgs: eventArgs
|
|
56662
56595
|
} = eventArgsSet;
|
|
@@ -56675,7 +56608,7 @@
|
|
|
56675
56608
|
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 {
|
|
56676
56609
|
stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
|
|
56677
56610
|
const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
56678
|
-
(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
|
|
56611
|
+
(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);
|
|
56679
56612
|
}
|
|
56680
56613
|
}), table.scenegraph.stage.addEventListener("pointermove", e => {
|
|
56681
56614
|
var _a, _b, _c;
|
|
@@ -56793,15 +56726,7 @@
|
|
|
56793
56726
|
table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
|
|
56794
56727
|
}), table.scenegraph.stage.addEventListener("wheel", e => {
|
|
56795
56728
|
var _a;
|
|
56796
|
-
|
|
56797
|
-
null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
|
|
56798
|
-
const {
|
|
56799
|
-
cellPos: cellPos
|
|
56800
|
-
} = table.stateManager.hover,
|
|
56801
|
-
prevHoverCellCol = cellPos.col,
|
|
56802
|
-
prevHoverCellRow = cellPos.row;
|
|
56803
|
-
table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
|
|
56804
|
-
}
|
|
56729
|
+
e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
|
|
56805
56730
|
});
|
|
56806
56731
|
}
|
|
56807
56732
|
function bindGesture(eventManager) {
|
|
@@ -56916,13 +56841,11 @@
|
|
|
56916
56841
|
const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
|
|
56917
56842
|
throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
|
|
56918
56843
|
scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
|
|
56919
|
-
|
|
56920
|
-
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);
|
|
56844
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
|
|
56921
56845
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
56922
56846
|
throttleVerticalWheel(ratio, e);
|
|
56923
56847
|
}), scenegraph.component.hScrollBar.addEventListener("scrollDrag", e => {
|
|
56924
|
-
|
|
56925
|
-
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);
|
|
56848
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
|
|
56926
56849
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
56927
56850
|
throttleHorizontalWheel(ratio);
|
|
56928
56851
|
});
|
|
@@ -57072,7 +56995,7 @@
|
|
|
57072
56995
|
const isHasSelected = !!(null === (_b = stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
|
|
57073
56996
|
eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected);
|
|
57074
56997
|
}
|
|
57075
|
-
})
|
|
56998
|
+
});
|
|
57076
56999
|
}
|
|
57077
57000
|
};
|
|
57078
57001
|
eventManager.globalEventListeners.push({
|
|
@@ -57583,7 +57506,7 @@
|
|
|
57583
57506
|
};
|
|
57584
57507
|
let EventManager$1 = class EventManager {
|
|
57585
57508
|
constructor(table) {
|
|
57586
|
-
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$1.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
|
|
57509
|
+
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$1.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
|
|
57587
57510
|
this.bindSelfEvent();
|
|
57588
57511
|
}, 0));
|
|
57589
57512
|
}
|
|
@@ -57885,15 +57808,25 @@
|
|
|
57885
57808
|
} catch (error) {}
|
|
57886
57809
|
}
|
|
57887
57810
|
handleCut(e) {
|
|
57811
|
+
var _a;
|
|
57888
57812
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
57889
|
-
this.handleCopy(e, !0), this.cutWaitPaste = !0, this.cutCellRange = this.table.getSelectedCellInfos(), this.
|
|
57890
|
-
|
|
57813
|
+
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 => ({
|
|
57814
|
+
start: {
|
|
57815
|
+
col: r.start.col,
|
|
57816
|
+
row: r.start.row
|
|
57817
|
+
},
|
|
57818
|
+
end: {
|
|
57819
|
+
col: r.end.col,
|
|
57820
|
+
row: r.end.row
|
|
57821
|
+
}
|
|
57822
|
+
})), this.clipboardCheckTimer && clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = window.setTimeout(() => {
|
|
57823
|
+
this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.cutRanges = null, this.clipboardCheckTimer = null);
|
|
57891
57824
|
}, 3e4), this.saveClipboardContent();
|
|
57892
57825
|
});
|
|
57893
57826
|
}
|
|
57894
57827
|
handlePaste(e) {
|
|
57895
57828
|
this.cutWaitPaste ? this.checkClipboardChanged().then(changed => {
|
|
57896
|
-
this.executePaste(e), changed || this.clearCutArea(this.table), this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.clipboardCheckTimer && (clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = null));
|
|
57829
|
+
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));
|
|
57897
57830
|
}).catch(() => {
|
|
57898
57831
|
this.executePaste(e), this.cutWaitPaste && (this.cutWaitPaste = !1, this.cutCellRange = null, this.clipboardCheckTimer && (clearTimeout(this.clipboardCheckTimer), this.clipboardCheckTimer = null));
|
|
57899
57832
|
}) : this.executePaste(e);
|
|
@@ -57970,9 +57903,9 @@
|
|
|
57970
57903
|
}
|
|
57971
57904
|
clearCutArea(table) {
|
|
57972
57905
|
try {
|
|
57973
|
-
const
|
|
57974
|
-
if (!
|
|
57975
|
-
|
|
57906
|
+
const ranges = this.cutRanges;
|
|
57907
|
+
if (!ranges || 0 === ranges.length) return;
|
|
57908
|
+
table.changeCellValuesByIds(ranges, "");
|
|
57976
57909
|
} catch (error) {}
|
|
57977
57910
|
}
|
|
57978
57911
|
checkClipboardChanged() {
|
|
@@ -59910,6 +59843,15 @@
|
|
|
59910
59843
|
constructor(table, customCellStyle, customCellStyleArrangement) {
|
|
59911
59844
|
this.table = table, this.customCellStyle = customCellStyle, this.customCellStyleArrangement = customCellStyleArrangement;
|
|
59912
59845
|
}
|
|
59846
|
+
clearCustomCellStyleArrangement() {
|
|
59847
|
+
this.customCellStyleArrangement = [];
|
|
59848
|
+
}
|
|
59849
|
+
addCustomCellStyleArrangement(cellPosition, customStyleId) {
|
|
59850
|
+
this.customCellStyleArrangement.push({
|
|
59851
|
+
cellPosition: cellPosition,
|
|
59852
|
+
customStyleId: customStyleId
|
|
59853
|
+
});
|
|
59854
|
+
}
|
|
59913
59855
|
getCustomCellStyle(col, row) {
|
|
59914
59856
|
const customStyleIds = this.getCustomCellStyleIds(col, row);
|
|
59915
59857
|
if (customStyleIds.length) {
|
|
@@ -60215,7 +60157,7 @@
|
|
|
60215
60157
|
}
|
|
60216
60158
|
constructor(container, options = {}) {
|
|
60217
60159
|
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;
|
|
60218
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.
|
|
60160
|
+
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$1.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");
|
|
60219
60161
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
60220
60162
|
options: options,
|
|
60221
60163
|
container: container
|
|
@@ -64026,15 +63968,16 @@
|
|
|
64026
63968
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
64027
63969
|
});
|
|
64028
63970
|
};
|
|
64029
|
-
function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
|
|
63971
|
+
function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
64030
63972
|
if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
|
|
64031
|
-
const
|
|
63973
|
+
const recordShowIndex = table.getRecordShowIndexByCell(col, row),
|
|
63974
|
+
recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
|
|
64032
63975
|
{
|
|
64033
63976
|
field: field
|
|
64034
63977
|
} = table.internalProps.layoutMap.getBody(col, row),
|
|
64035
63978
|
beforeChangeValue = table.getCellRawValue(col, row),
|
|
64036
63979
|
oldValue = table.getCellOriginValue(col, row);
|
|
64037
|
-
table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value,
|
|
63980
|
+
table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
|
|
64038
63981
|
const range = table.getCellRange(col, row),
|
|
64039
63982
|
aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
|
|
64040
63983
|
if (aggregators) {
|
|
@@ -64057,16 +64000,24 @@
|
|
|
64057
64000
|
table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
64058
64001
|
}
|
|
64059
64002
|
const changedValue = table.getCellOriginValue(col, row);
|
|
64060
|
-
oldValue !== changedValue && triggerEvent
|
|
64061
|
-
|
|
64062
|
-
|
|
64063
|
-
|
|
64064
|
-
|
|
64065
|
-
|
|
64066
|
-
|
|
64003
|
+
if (oldValue !== changedValue && triggerEvent) {
|
|
64004
|
+
const changeValue = {
|
|
64005
|
+
col: col,
|
|
64006
|
+
row: row,
|
|
64007
|
+
recordIndex: recordIndex,
|
|
64008
|
+
field: field,
|
|
64009
|
+
rawValue: beforeChangeValue,
|
|
64010
|
+
currentValue: oldValue,
|
|
64011
|
+
changedValue: changedValue
|
|
64012
|
+
};
|
|
64013
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
64014
|
+
values: [changeValue]
|
|
64015
|
+
});
|
|
64016
|
+
}
|
|
64017
|
+
table.scenegraph.updateNextFrame();
|
|
64067
64018
|
}
|
|
64068
64019
|
}
|
|
64069
|
-
function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
|
|
64020
|
+
function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
64070
64021
|
var _a, _b;
|
|
64071
64022
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64072
64023
|
const changedCellResults = [];
|
|
@@ -64088,6 +64039,7 @@
|
|
|
64088
64039
|
oldRowValues.push(oldValue);
|
|
64089
64040
|
}
|
|
64090
64041
|
}
|
|
64042
|
+
const resultChangeValues = [];
|
|
64091
64043
|
for (let i = 0; i < values.length && !(startRow + i > table.rowCount - 1); i++) {
|
|
64092
64044
|
changedCellResults[i] = [], pasteRowEnd = startRow + i;
|
|
64093
64045
|
const rowValues = values[i];
|
|
@@ -64111,25 +64063,34 @@
|
|
|
64111
64063
|
if (isCanChange) {
|
|
64112
64064
|
changedCellResults[i][j] = !0;
|
|
64113
64065
|
const value = rowValues[j],
|
|
64114
|
-
|
|
64066
|
+
recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
|
|
64067
|
+
recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
|
|
64115
64068
|
{
|
|
64116
64069
|
field: field
|
|
64117
64070
|
} = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
|
|
64118
64071
|
beforeChangeValue = beforeChangeValues[i][j],
|
|
64119
64072
|
oldValue = oldValues[i][j];
|
|
64120
|
-
table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value,
|
|
64073
|
+
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);
|
|
64121
64074
|
const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
|
|
64122
|
-
oldValue !== changedValue && triggerEvent
|
|
64123
|
-
|
|
64124
|
-
|
|
64125
|
-
|
|
64126
|
-
|
|
64127
|
-
|
|
64128
|
-
|
|
64075
|
+
if (oldValue !== changedValue && triggerEvent) {
|
|
64076
|
+
const changeValue = {
|
|
64077
|
+
col: startCol + j,
|
|
64078
|
+
row: startRow + i,
|
|
64079
|
+
recordIndex: recordIndex,
|
|
64080
|
+
field: field,
|
|
64081
|
+
rawValue: beforeChangeValue,
|
|
64082
|
+
currentValue: oldValue,
|
|
64083
|
+
changedValue: changedValue
|
|
64084
|
+
};
|
|
64085
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
|
|
64086
|
+
}
|
|
64129
64087
|
} else changedCellResults[i][j] = !1;
|
|
64130
64088
|
}
|
|
64131
64089
|
pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
|
|
64132
64090
|
}
|
|
64091
|
+
silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
64092
|
+
values: resultChangeValues
|
|
64093
|
+
});
|
|
64133
64094
|
const startRange = table.getCellRange(startCol, startRow),
|
|
64134
64095
|
range = table.getCellRange(pasteColEnd, pasteRowEnd),
|
|
64135
64096
|
aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
|
|
@@ -64163,6 +64124,58 @@
|
|
|
64163
64124
|
return table.scenegraph.updateNextFrame(), changedCellResults;
|
|
64164
64125
|
});
|
|
64165
64126
|
}
|
|
64127
|
+
function listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
64128
|
+
var _a, _b;
|
|
64129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64130
|
+
const resultChangeValues = [],
|
|
64131
|
+
processed = new Set(),
|
|
64132
|
+
nextValue = null != value ? value : "";
|
|
64133
|
+
for (let i = 0; i < (null !== (_a = null == ranges ? void 0 : ranges.length) && void 0 !== _a ? _a : 0); i++) {
|
|
64134
|
+
const range = ranges[i],
|
|
64135
|
+
startCol = Math.min(range.start.col, range.end.col),
|
|
64136
|
+
endCol = Math.max(range.start.col, range.end.col),
|
|
64137
|
+
startRow = Math.min(range.start.row, range.end.row),
|
|
64138
|
+
endRow = Math.max(range.start.row, range.end.row);
|
|
64139
|
+
if (startCol > endCol || startRow > endRow) continue;
|
|
64140
|
+
const values = [],
|
|
64141
|
+
oldValues = [];
|
|
64142
|
+
for (let row = startRow; row <= endRow; row++) {
|
|
64143
|
+
const rowValues = [],
|
|
64144
|
+
rowOldValues = [];
|
|
64145
|
+
for (let col = startCol; col <= endCol; col++) rowValues.push(nextValue), rowOldValues.push(table.getCellOriginValue(col, row));
|
|
64146
|
+
values.push(rowValues), oldValues.push(rowOldValues);
|
|
64147
|
+
}
|
|
64148
|
+
const changedCellResults = yield listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, !0);
|
|
64149
|
+
for (let r = 0; r < values.length; r++) for (let c = 0; c < values[r].length; c++) {
|
|
64150
|
+
const col = startCol + c,
|
|
64151
|
+
row = startRow + r,
|
|
64152
|
+
key = `${col},${row}`;
|
|
64153
|
+
if (processed.has(key)) continue;
|
|
64154
|
+
if (processed.add(key), !triggerEvent || !(null === (_b = null == changedCellResults ? void 0 : changedCellResults[r]) || void 0 === _b ? void 0 : _b[c])) continue;
|
|
64155
|
+
const oldValue = oldValues[r][c],
|
|
64156
|
+
changedValue = table.getCellOriginValue(col, row);
|
|
64157
|
+
if (oldValue === changedValue) continue;
|
|
64158
|
+
const recordShowIndex = table.getRecordShowIndexByCell(col, row),
|
|
64159
|
+
recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
|
|
64160
|
+
{
|
|
64161
|
+
field: field
|
|
64162
|
+
} = table.internalProps.layoutMap.getBody(col, row);
|
|
64163
|
+
resultChangeValues.push({
|
|
64164
|
+
col: col,
|
|
64165
|
+
row: row,
|
|
64166
|
+
recordIndex: recordIndex,
|
|
64167
|
+
field: field,
|
|
64168
|
+
rawValue: oldValue,
|
|
64169
|
+
currentValue: oldValue,
|
|
64170
|
+
changedValue: changedValue
|
|
64171
|
+
});
|
|
64172
|
+
}
|
|
64173
|
+
}
|
|
64174
|
+
!silentChangeCellValuesEvent && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
64175
|
+
values: resultChangeValues
|
|
64176
|
+
});
|
|
64177
|
+
});
|
|
64178
|
+
}
|
|
64166
64179
|
function getCellUpdateType(col, row, table, oldCellUpdateType) {
|
|
64167
64180
|
if ("group" === oldCellUpdateType) return oldCellUpdateType;
|
|
64168
64181
|
if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
|
|
@@ -64180,13 +64193,16 @@
|
|
|
64180
64193
|
}), table.dataSource.sort(sortState));
|
|
64181
64194
|
}
|
|
64182
64195
|
function listTableAddRecord(record, recordIndex, table) {
|
|
64183
|
-
var _a, _b, _c, _d;
|
|
64196
|
+
var _a, _b, _c, _d, _e, _f;
|
|
64184
64197
|
try {
|
|
64185
64198
|
if (!record) return !1;
|
|
64186
|
-
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)
|
|
64199
|
+
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) {
|
|
64200
|
+
!!(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();
|
|
64201
|
+
} else {
|
|
64187
64202
|
(void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
|
|
64188
|
-
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount
|
|
64189
|
-
|
|
64203
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
|
|
64204
|
+
syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
|
|
64205
|
+
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;
|
|
64190
64206
|
const oldRowCount = table.rowCount;
|
|
64191
64207
|
if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
|
|
64192
64208
|
const newRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -64255,13 +64271,16 @@
|
|
|
64255
64271
|
}
|
|
64256
64272
|
}
|
|
64257
64273
|
function listTableAddRecords(records, recordIndex, table) {
|
|
64258
|
-
var _a, _b, _c, _d;
|
|
64274
|
+
var _a, _b, _c, _d, _e, _f;
|
|
64259
64275
|
try {
|
|
64260
64276
|
if (!records || 0 === records.length) return !1;
|
|
64261
|
-
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)
|
|
64277
|
+
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) {
|
|
64278
|
+
!!(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();
|
|
64279
|
+
} else {
|
|
64262
64280
|
void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
|
|
64263
|
-
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount
|
|
64264
|
-
|
|
64281
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
|
|
64282
|
+
syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords);
|
|
64283
|
+
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;
|
|
64265
64284
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
64266
64285
|
if (table.refreshRowColCount(), 0 === table.scenegraph.proxy.totalActualBodyRowCount) return table.scenegraph.clearCells(), table.scenegraph.createSceneGraph(), !0;
|
|
64267
64286
|
const newRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -64330,16 +64349,20 @@
|
|
|
64330
64349
|
}
|
|
64331
64350
|
}
|
|
64332
64351
|
function listTableDeleteRecords(recordIndexs, table) {
|
|
64333
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
64352
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
64334
64353
|
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) {
|
|
64335
64354
|
const deletedRecordIndexs = null === (_d = (_c = table.dataSource).deleteRecordsForTree) || void 0 === _d ? void 0 : _d.call(_c, recordIndexs);
|
|
64336
64355
|
if (0 === deletedRecordIndexs.length) return;
|
|
64337
64356
|
for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
|
|
64338
64357
|
table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();
|
|
64339
|
-
} else if (table.sortState)
|
|
64340
|
-
|
|
64358
|
+
} else if (table.sortState) {
|
|
64359
|
+
!!(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();
|
|
64360
|
+
} else {
|
|
64361
|
+
const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords),
|
|
64362
|
+
deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs, syncToOriginalRecords);
|
|
64341
64363
|
if (0 === deletedRecordIndexs.length) return;
|
|
64342
64364
|
for (let index = 0; index < deletedRecordIndexs.length; index++) adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
|
|
64365
|
+
if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
|
|
64343
64366
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
64344
64367
|
table.refreshRowColCount();
|
|
64345
64368
|
const newRowCount = table.transpose ? table.colCount : table.rowCount,
|
|
@@ -64377,7 +64400,7 @@
|
|
|
64377
64400
|
col: 0,
|
|
64378
64401
|
row: row
|
|
64379
64402
|
});
|
|
64380
|
-
null === (
|
|
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();
|
|
64381
64404
|
}
|
|
64382
64405
|
} else {
|
|
64383
64406
|
const delRows = [],
|
|
@@ -64409,15 +64432,19 @@
|
|
|
64409
64432
|
col: 0,
|
|
64410
64433
|
row: row
|
|
64411
64434
|
});
|
|
64412
|
-
null === (
|
|
64435
|
+
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();
|
|
64413
64436
|
}
|
|
64414
64437
|
}
|
|
64415
64438
|
}
|
|
64416
64439
|
function listTableUpdateRecords(records, recordIndexs, table) {
|
|
64417
|
-
var _a, _b, _c, _d;
|
|
64418
|
-
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)
|
|
64419
|
-
|
|
64440
|
+
var _a, _b, _c, _d, _e, _f;
|
|
64441
|
+
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) {
|
|
64442
|
+
!!(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();
|
|
64443
|
+
} else {
|
|
64444
|
+
const syncToOriginalRecords = !!(null === (_f = table.options) || void 0 === _f ? void 0 : _f.syncRecordOperationsToSourceRecords),
|
|
64445
|
+
updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs, syncToOriginalRecords);
|
|
64420
64446
|
if (0 === updateRecordIndexs.length) return;
|
|
64447
|
+
if (syncToOriginalRecords) return table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), void table.scenegraph.createSceneGraph();
|
|
64421
64448
|
const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
|
|
64422
64449
|
if (table.pagination) {
|
|
64423
64450
|
const {
|
|
@@ -65183,8 +65210,8 @@
|
|
|
65183
65210
|
updateFilterRules(filterRules, options = {
|
|
65184
65211
|
clearRowHeightCache: !0
|
|
65185
65212
|
}) {
|
|
65186
|
-
var _a;
|
|
65187
|
-
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 === (
|
|
65213
|
+
var _a, _b, _c;
|
|
65214
|
+
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();
|
|
65188
65215
|
}
|
|
65189
65216
|
getFilteredRecords() {
|
|
65190
65217
|
return this.dataSource.records;
|
|
@@ -65326,43 +65353,165 @@
|
|
|
65326
65353
|
}
|
|
65327
65354
|
return isValid$2(editorDefine);
|
|
65328
65355
|
}
|
|
65329
|
-
changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0) {
|
|
65330
|
-
return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
|
|
65356
|
+
changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
|
|
65357
|
+
return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
65358
|
+
}
|
|
65359
|
+
changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
|
|
65360
|
+
return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
65361
|
+
}
|
|
65362
|
+
changeCellValuesByIds(ranges, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
|
|
65363
|
+
return listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
65364
|
+
}
|
|
65365
|
+
changeSourceCellValue(recordIndex, field, value) {
|
|
65366
|
+
const tableIndex = this.getTableIndexByRecordIndex(recordIndex),
|
|
65367
|
+
cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
|
|
65368
|
+
if (tableIndex < 0 || cellAddr.col < 0 || cellAddr.row < 0) return;
|
|
65369
|
+
this.dataSource.changeFieldValue(value, tableIndex, field, cellAddr.col, cellAddr.row, this);
|
|
65370
|
+
const beforeChangeValue = this.getCellRawValue(cellAddr.col, cellAddr.row),
|
|
65371
|
+
oldValue = this.getCellOriginValue(cellAddr.col, cellAddr.row),
|
|
65372
|
+
changedValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
|
|
65373
|
+
if (oldValue !== changedValue) {
|
|
65374
|
+
const changeValue = {
|
|
65375
|
+
col: cellAddr.col,
|
|
65376
|
+
row: cellAddr.row,
|
|
65377
|
+
recordIndex: recordIndex,
|
|
65378
|
+
field: field,
|
|
65379
|
+
rawValue: beforeChangeValue,
|
|
65380
|
+
currentValue: oldValue,
|
|
65381
|
+
changedValue: changedValue
|
|
65382
|
+
};
|
|
65383
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
65384
|
+
values: [changeValue]
|
|
65385
|
+
});
|
|
65386
|
+
}
|
|
65387
|
+
}
|
|
65388
|
+
changeCellValueByRecord(recordIndex, field, value, options) {
|
|
65389
|
+
var _a, _b, _c, _d, _e;
|
|
65390
|
+
const triggerEvent = null === (_a = null == options ? void 0 : options.triggerEvent) || void 0 === _a || _a,
|
|
65391
|
+
silentChangeCellValuesEvent = null == options ? void 0 : options.silentChangeCellValuesEvent,
|
|
65392
|
+
autoRefresh = null === (_b = null == options ? void 0 : options.autoRefresh) || void 0 === _b || _b,
|
|
65393
|
+
records = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records;
|
|
65394
|
+
let record, oldValue;
|
|
65395
|
+
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;
|
|
65396
|
+
const changedValue = !record || "string" != typeof field && "number" != typeof field ? value : null == record ? void 0 : record[field];
|
|
65397
|
+
if (oldValue !== changedValue) {
|
|
65398
|
+
const cellAddr = this.getCellAddrByFieldRecord(field, recordIndex),
|
|
65399
|
+
changeValue = {
|
|
65400
|
+
col: null !== (_d = null == cellAddr ? void 0 : cellAddr.col) && void 0 !== _d ? _d : -1,
|
|
65401
|
+
row: null !== (_e = null == cellAddr ? void 0 : cellAddr.row) && void 0 !== _e ? _e : -1,
|
|
65402
|
+
recordIndex: recordIndex,
|
|
65403
|
+
field: field,
|
|
65404
|
+
rawValue: oldValue,
|
|
65405
|
+
currentValue: oldValue,
|
|
65406
|
+
changedValue: changedValue
|
|
65407
|
+
};
|
|
65408
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
65409
|
+
values: [changeValue]
|
|
65410
|
+
});
|
|
65411
|
+
}
|
|
65412
|
+
autoRefresh && this.refreshAfterSourceChange();
|
|
65413
|
+
}
|
|
65414
|
+
changeCellValueBySource(recordIndex, field, value, triggerEvent = !0, silentChangeCellValuesEvent) {
|
|
65415
|
+
return this.changeCellValueByRecord(recordIndex, field, value, {
|
|
65416
|
+
triggerEvent: triggerEvent,
|
|
65417
|
+
silentChangeCellValuesEvent: silentChangeCellValuesEvent,
|
|
65418
|
+
autoRefresh: !0
|
|
65419
|
+
});
|
|
65420
|
+
}
|
|
65421
|
+
changeCellValuesByRecords(changeValues, options) {
|
|
65422
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
65423
|
+
const triggerEvent = null === (_a = null == options ? void 0 : options.triggerEvent) || void 0 === _a || _a,
|
|
65424
|
+
silentChangeCellValuesEvent = null == options ? void 0 : options.silentChangeCellValuesEvent,
|
|
65425
|
+
autoRefresh = null === (_b = null == options ? void 0 : options.autoRefresh) || void 0 === _b || _b,
|
|
65426
|
+
resultChangeValues = [];
|
|
65427
|
+
for (let i = 0; i < changeValues.length; i++) {
|
|
65428
|
+
const {
|
|
65429
|
+
recordIndex: recordIndex,
|
|
65430
|
+
field: field,
|
|
65431
|
+
value: value
|
|
65432
|
+
} = changeValues[i],
|
|
65433
|
+
records = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records;
|
|
65434
|
+
let record, oldValue;
|
|
65435
|
+
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) {
|
|
65436
|
+
const changedValue = !record || "string" != typeof field && "number" != typeof field ? value : null == record ? void 0 : record[field];
|
|
65437
|
+
if (oldValue !== changedValue) {
|
|
65438
|
+
const changeValue = {
|
|
65439
|
+
col: null !== (_e = null === (_d = this.getCellAddrByFieldRecord(field, recordIndex)) || void 0 === _d ? void 0 : _d.col) && void 0 !== _e ? _e : -1,
|
|
65440
|
+
row: null !== (_g = null === (_f = this.getCellAddrByFieldRecord(field, recordIndex)) || void 0 === _f ? void 0 : _f.row) && void 0 !== _g ? _g : -1,
|
|
65441
|
+
recordIndex: recordIndex,
|
|
65442
|
+
field: field,
|
|
65443
|
+
rawValue: oldValue,
|
|
65444
|
+
currentValue: oldValue,
|
|
65445
|
+
changedValue: changedValue
|
|
65446
|
+
};
|
|
65447
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
|
|
65448
|
+
}
|
|
65449
|
+
}
|
|
65450
|
+
}
|
|
65451
|
+
!silentChangeCellValuesEvent && resultChangeValues.length && triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
|
|
65452
|
+
values: resultChangeValues
|
|
65453
|
+
}), autoRefresh && this.refreshAfterSourceChange();
|
|
65454
|
+
}
|
|
65455
|
+
changeCellValuesBySource(changeValues, triggerEvent = !0, silentChangeCellValuesEvent) {
|
|
65456
|
+
return this.changeCellValuesByRecords(changeValues, {
|
|
65457
|
+
triggerEvent: triggerEvent,
|
|
65458
|
+
silentChangeCellValuesEvent: silentChangeCellValuesEvent,
|
|
65459
|
+
autoRefresh: !0
|
|
65460
|
+
});
|
|
65331
65461
|
}
|
|
65332
|
-
|
|
65333
|
-
|
|
65462
|
+
refreshAfterSourceChange(options) {
|
|
65463
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
65464
|
+
const reapplyFilter = null === (_a = null == options ? void 0 : options.reapplyFilter) || void 0 === _a || _a,
|
|
65465
|
+
reapplySort = null === (_b = null == options ? void 0 : options.reapplySort) || void 0 === _b || _b,
|
|
65466
|
+
clearRowHeightCache = null === (_c = null == options ? void 0 : options.clearRowHeightCache) || void 0 === _c || _c;
|
|
65467
|
+
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);
|
|
65468
|
+
const traverseColumns = columns => {
|
|
65469
|
+
var _a, _b, _c, _d;
|
|
65470
|
+
for (let i = 0; i < (null !== (_a = null == columns ? void 0 : columns.length) && void 0 !== _a ? _a : 0); i++) {
|
|
65471
|
+
const column = columns[i],
|
|
65472
|
+
aggregators = null == column ? void 0 : column.vtable_aggregator;
|
|
65473
|
+
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);
|
|
65474
|
+
(null == column ? void 0 : column.columns) && traverseColumns(column.columns);
|
|
65475
|
+
}
|
|
65476
|
+
};
|
|
65477
|
+
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();
|
|
65334
65478
|
}
|
|
65335
|
-
addRecord(record, recordIndex) {
|
|
65479
|
+
addRecord(record, recordIndex, triggerEvent = !0) {
|
|
65336
65480
|
var _a;
|
|
65337
65481
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
65338
|
-
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
65482
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), triggerEvent && success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
65339
65483
|
records: [record],
|
|
65340
65484
|
recordIndex: recordIndex,
|
|
65341
65485
|
recordCount: 1
|
|
65342
65486
|
});
|
|
65343
65487
|
}
|
|
65344
|
-
addRecords(records, recordIndex) {
|
|
65488
|
+
addRecords(records, recordIndex, triggerEvent = !0) {
|
|
65345
65489
|
var _a;
|
|
65346
65490
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
65347
|
-
"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, {
|
|
65491
|
+
"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, {
|
|
65348
65492
|
records: records,
|
|
65349
65493
|
recordIndex: recordIndex,
|
|
65350
65494
|
recordCount: records.length
|
|
65351
65495
|
});
|
|
65352
65496
|
}
|
|
65353
|
-
deleteRecords(recordIndexs) {
|
|
65497
|
+
deleteRecords(recordIndexs, triggerEvent = !0) {
|
|
65354
65498
|
var _a;
|
|
65355
|
-
|
|
65499
|
+
const deletedRecords = [];
|
|
65500
|
+
(null == recordIndexs ? void 0 : recordIndexs.length) > 0 && recordIndexs.forEach(index => {
|
|
65501
|
+
let record = null;
|
|
65502
|
+
record = "number" == typeof index ? this.dataSource.get(index) : [], deletedRecords.push(record);
|
|
65503
|
+
}), listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
65356
65504
|
const rowIndexs = [];
|
|
65357
65505
|
for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
|
|
65358
|
-
this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
|
|
65506
|
+
triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
|
|
65359
65507
|
recordIndexs: recordIndexs,
|
|
65508
|
+
records: deletedRecords,
|
|
65360
65509
|
rowIndexs: rowIndexs,
|
|
65361
65510
|
deletedCount: (Array.isArray(recordIndexs[0]), recordIndexs.length)
|
|
65362
65511
|
});
|
|
65363
65512
|
}
|
|
65364
|
-
updateRecords(records, recordIndexs) {
|
|
65365
|
-
listTableUpdateRecords(records, recordIndexs, this), this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
|
|
65513
|
+
updateRecords(records, recordIndexs, triggerEvent = !0) {
|
|
65514
|
+
listTableUpdateRecords(records, recordIndexs, this), triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
|
|
65366
65515
|
records: records,
|
|
65367
65516
|
recordIndexs: recordIndexs,
|
|
65368
65517
|
updateCount: records.length
|
|
@@ -69582,8 +69731,8 @@
|
|
|
69582
69731
|
}(ExcelEditCellKeyboardResponse || (ExcelEditCellKeyboardResponse = {}));
|
|
69583
69732
|
class ExcelEditCellKeyboardPlugin {
|
|
69584
69733
|
constructor(pluginOptions) {
|
|
69585
|
-
var _a, _b;
|
|
69586
|
-
this.id = "excel-edit-cell-keyboard", this.name = "Excel Edit Cell Keyboard", this.runTime = [TABLE_EVENT_TYPE.INITIALIZED], this.id = null !== (_a = null == pluginOptions ? void 0 : pluginOptions.id) && void 0 !== _a ? _a : this.id, this.pluginOptions = pluginOptions, this.responseKeyboard = null !== (_b = null == pluginOptions ? void 0 : pluginOptions.responseKeyboard) && void 0 !== _b ? _b : [ExcelEditCellKeyboardResponse.ENTER, ExcelEditCellKeyboardResponse.TAB, ExcelEditCellKeyboardResponse.ARROW_LEFT, ExcelEditCellKeyboardResponse.ARROW_RIGHT, ExcelEditCellKeyboardResponse.ARROW_DOWN, ExcelEditCellKeyboardResponse.ARROW_UP, ExcelEditCellKeyboardResponse.DELETE, ExcelEditCellKeyboardResponse.BACKSPACE], this.bindEvent();
|
|
69734
|
+
var _a, _b, _c;
|
|
69735
|
+
this.id = "excel-edit-cell-keyboard", this.name = "Excel Edit Cell Keyboard", this.runTime = [TABLE_EVENT_TYPE.INITIALIZED], this.id = null !== (_a = null == pluginOptions ? void 0 : pluginOptions.id) && void 0 !== _a ? _a : this.id, this.pluginOptions = pluginOptions, this.responseKeyboard = null !== (_b = null == pluginOptions ? void 0 : pluginOptions.responseKeyboard) && void 0 !== _b ? _b : [ExcelEditCellKeyboardResponse.ENTER, ExcelEditCellKeyboardResponse.TAB, ExcelEditCellKeyboardResponse.ARROW_LEFT, ExcelEditCellKeyboardResponse.ARROW_RIGHT, ExcelEditCellKeyboardResponse.ARROW_DOWN, ExcelEditCellKeyboardResponse.ARROW_UP, ExcelEditCellKeyboardResponse.DELETE, ExcelEditCellKeyboardResponse.BACKSPACE], this.aggregateDeleteToOneChangeCellValuesEvent = null !== (_c = null == pluginOptions ? void 0 : pluginOptions.aggregateDeleteToOneChangeCellValuesEvent) && void 0 !== _c && _c, this.bindEvent();
|
|
69587
69736
|
}
|
|
69588
69737
|
run(...args) {
|
|
69589
69738
|
const table = args[2];
|
|
@@ -69614,7 +69763,7 @@
|
|
|
69614
69763
|
(null == selectCells ? void 0 : selectCells.length) > 0 && (document.activeElement === this.table.getElement() || Object.values(this.table.editorManager.cacheLastSelectedCellEditor || {}).some(editor => {
|
|
69615
69764
|
var _a;
|
|
69616
69765
|
return (null === (_a = editor.getInputElement) || void 0 === _a ? void 0 : _a.call(editor)) === document.activeElement;
|
|
69617
|
-
})) && (deleteSelectRange(selectCells, this.table, null === (_c = null === (_b = this.pluginOptions) || void 0 === _b ? void 0 : _b.deleteWorkOnEditableCell) || void 0 === _c || _c), event.stopPropagation(), event.preventDefault());
|
|
69766
|
+
})) && (deleteSelectRange(selectCells, this.table, null === (_c = null === (_b = this.pluginOptions) || void 0 === _b ? void 0 : _b.deleteWorkOnEditableCell) || void 0 === _c || _c, this.aggregateDeleteToOneChangeCellValuesEvent), event.stopPropagation(), event.preventDefault());
|
|
69618
69767
|
}
|
|
69619
69768
|
} else this.table.editorManager.completeEdit(), this.table.getElement().focus(), eventKey === ExcelEditCellKeyboardResponse.ENTER ? this.table.selectCell(col, row + 1) : eventKey === ExcelEditCellKeyboardResponse.TAB && this.table.selectCell(col + 1, row), event.stopPropagation(), event.preventDefault();
|
|
69620
69769
|
}
|
|
@@ -69636,8 +69785,11 @@
|
|
|
69636
69785
|
document.removeEventListener("keydown", this.handleKeyDown, !0);
|
|
69637
69786
|
}
|
|
69638
69787
|
}
|
|
69639
|
-
function deleteSelectRange(selectCells, tableInstance, workOnEditableCell = !1) {
|
|
69640
|
-
|
|
69788
|
+
function deleteSelectRange(selectCells, tableInstance, workOnEditableCell = !1, aggregateToOneChangeCellValuesEvent = !1) {
|
|
69789
|
+
if (aggregateToOneChangeCellValuesEvent) {
|
|
69790
|
+
const ranges = tableInstance.stateManager.select.ranges;
|
|
69791
|
+
(null == ranges ? void 0 : ranges.length) && tableInstance.changeCellValuesByIds(ranges, "", workOnEditableCell, !0);
|
|
69792
|
+
} else for (let i = 0; i < selectCells.length; i++) for (let j = 0; j < selectCells[i].length; j++) tableInstance.changeCellValue(selectCells[i][j].col, selectCells[i][j].row, "", workOnEditableCell);
|
|
69641
69793
|
}
|
|
69642
69794
|
|
|
69643
69795
|
const MENU_CONTAINER_CLASS = "vtable-context-menu-container";
|
|
@@ -91200,7 +91352,7 @@
|
|
|
91200
91352
|
importStyle();
|
|
91201
91353
|
}
|
|
91202
91354
|
|
|
91203
|
-
const version = "1.22.11-alpha.
|
|
91355
|
+
const version = "1.22.11-alpha.9";
|
|
91204
91356
|
importStyles();
|
|
91205
91357
|
|
|
91206
91358
|
exports.TYPES = index;
|