@visactor/vtable 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/ListTable.d.ts +34 -7
- package/cjs/ListTable.js +138 -18
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +0 -3
- package/cjs/PivotChart.js +5 -12
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/index.js +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/index.d.ts +1 -0
- package/cjs/core/index.js +30 -0
- package/cjs/core/index.js.map +1 -0
- package/cjs/core/record-helper.d.ts +4 -2
- package/cjs/core/record-helper.js +120 -47
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +13 -4
- package/cjs/data/DataSource.js +174 -60
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.d.ts +2 -1
- package/cjs/event/event.js +20 -9
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +2 -8
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -14
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.js +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +1 -2
- package/cjs/layout/pivot-header-layout.d.ts +0 -6
- package/cjs/layout/pivot-header-layout.js +20 -39
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/plugins/custom-cell-style.d.ts +5 -0
- package/cjs/plugins/custom-cell-style.js +9 -0
- package/cjs/plugins/custom-cell-style.js.map +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +2 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +75 -198
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +1 -10
- package/cjs/scenegraph/graphic/chart.js +27 -61
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +4 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -2
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -2
- package/cjs/scenegraph/scenegraph.js +11 -44
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/tools/util.d.ts +0 -5
- package/cjs/tools/util.js +4 -22
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +15 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +33 -13
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +898 -711
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +34 -7
- package/es/ListTable.js +134 -18
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +0 -3
- package/es/PivotChart.js +4 -13
- package/es/PivotChart.js.map +1 -1
- package/es/components/index.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/index.d.ts +1 -0
- package/es/core/index.js +2 -0
- package/es/core/index.js.map +1 -0
- package/es/core/record-helper.d.ts +4 -2
- package/es/core/record-helper.js +114 -43
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.d.ts +13 -4
- package/es/data/DataSource.js +174 -60
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.d.ts +2 -1
- package/es/event/event.js +20 -9
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +2 -8
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +8 -13
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/index.js +1 -2
- package/es/layout/pivot-header-layout.d.ts +0 -6
- package/es/layout/pivot-header-layout.js +20 -39
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/plugins/custom-cell-style.d.ts +5 -0
- package/es/plugins/custom-cell-style.js +9 -0
- package/es/plugins/custom-cell-style.js.map +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +2 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
- package/es/scenegraph/graphic/active-cell-chart-list.js +68 -186
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +1 -10
- package/es/scenegraph/graphic/chart.js +25 -58
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +4 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -2
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -2
- package/es/scenegraph/scenegraph.js +10 -43
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/tools/util.d.ts +0 -5
- package/es/tools/util.js +0 -18
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +15 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +33 -13
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/dist/vtable.js
CHANGED
|
@@ -36018,47 +36018,6 @@
|
|
|
36018
36018
|
}
|
|
36019
36019
|
};
|
|
36020
36020
|
}
|
|
36021
|
-
function cancellableThrottle(func, delay) {
|
|
36022
|
-
let timer = null;
|
|
36023
|
-
let lastArgs = null;
|
|
36024
|
-
let context = null;
|
|
36025
|
-
const throttled = function (...args) {
|
|
36026
|
-
lastArgs = args;
|
|
36027
|
-
context = this;
|
|
36028
|
-
if (!timer) {
|
|
36029
|
-
timer = setTimeout(() => {
|
|
36030
|
-
if (lastArgs) {
|
|
36031
|
-
func.apply(context, lastArgs);
|
|
36032
|
-
}
|
|
36033
|
-
timer = null;
|
|
36034
|
-
lastArgs = null;
|
|
36035
|
-
context = null;
|
|
36036
|
-
}, delay);
|
|
36037
|
-
}
|
|
36038
|
-
};
|
|
36039
|
-
const cancel = () => {
|
|
36040
|
-
if (timer) {
|
|
36041
|
-
clearTimeout(timer);
|
|
36042
|
-
timer = null;
|
|
36043
|
-
lastArgs = null;
|
|
36044
|
-
context = null;
|
|
36045
|
-
}
|
|
36046
|
-
};
|
|
36047
|
-
const flush = () => {
|
|
36048
|
-
if (timer && lastArgs) {
|
|
36049
|
-
clearTimeout(timer);
|
|
36050
|
-
func.apply(context, lastArgs);
|
|
36051
|
-
timer = null;
|
|
36052
|
-
lastArgs = null;
|
|
36053
|
-
context = null;
|
|
36054
|
-
}
|
|
36055
|
-
};
|
|
36056
|
-
return {
|
|
36057
|
-
throttled,
|
|
36058
|
-
cancel,
|
|
36059
|
-
flush
|
|
36060
|
-
};
|
|
36061
|
-
}
|
|
36062
36021
|
function pad(num, totalChars) {
|
|
36063
36022
|
const pad = '0';
|
|
36064
36023
|
num = `${num}`;
|
|
@@ -36451,6 +36410,7 @@
|
|
|
36451
36410
|
AFTER_UPDATE_CELL_CONTENT_WIDTH: 'after_update_cell_content_width',
|
|
36452
36411
|
AFTER_UPDATE_SELECT_BORDER_HEIGHT: 'after_update_select_border_height',
|
|
36453
36412
|
CHANGE_CELL_VALUE: 'change_cell_value',
|
|
36413
|
+
CHANGE_CELL_VALUES: 'change_cell_values',
|
|
36454
36414
|
DRAG_FILL_HANDLE_END: 'drag_fill_handle_end',
|
|
36455
36415
|
MOUSEDOWN_FILL_HANDLE: 'mousedown_fill_handle',
|
|
36456
36416
|
DBLCLICK_FILL_HANDLE: 'dblclick_fill_handle',
|
|
@@ -38548,6 +38508,7 @@
|
|
|
38548
38508
|
_sourceLength;
|
|
38549
38509
|
_source;
|
|
38550
38510
|
sortedIndexMap;
|
|
38511
|
+
_forceVisibleRecords;
|
|
38551
38512
|
lastSortStates;
|
|
38552
38513
|
currentIndexedData = [];
|
|
38553
38514
|
userPagination;
|
|
@@ -38973,6 +38934,48 @@
|
|
|
38973
38934
|
}
|
|
38974
38935
|
}
|
|
38975
38936
|
}
|
|
38937
|
+
changeFieldValueByRecordIndex(value, recordIndex, field, table) {
|
|
38938
|
+
if (field === null) {
|
|
38939
|
+
return undefined;
|
|
38940
|
+
}
|
|
38941
|
+
if (recordIndex === undefined || recordIndex === null) {
|
|
38942
|
+
return;
|
|
38943
|
+
}
|
|
38944
|
+
const rawKey = recordIndex.toString();
|
|
38945
|
+
if (!this.beforeChangedRecordsMap.has(rawKey)) {
|
|
38946
|
+
const rawRecords = Array.isArray(this.dataSourceObj?.records)
|
|
38947
|
+
? this.dataSourceObj.records
|
|
38948
|
+
: null;
|
|
38949
|
+
const originRecord = rawRecords
|
|
38950
|
+
? Array.isArray(recordIndex)
|
|
38951
|
+
? getValueFromDeepArray(rawRecords, recordIndex)
|
|
38952
|
+
: rawRecords[recordIndex]
|
|
38953
|
+
: undefined;
|
|
38954
|
+
this.beforeChangedRecordsMap.set(rawKey, cloneDeep(originRecord, undefined, ['vtable_gantt_linkedFrom', 'vtable_gantt_linkedTo']) ?? {});
|
|
38955
|
+
}
|
|
38956
|
+
if (typeof field === 'string' || typeof field === 'number') {
|
|
38957
|
+
const beforeChangedValue = this.beforeChangedRecordsMap.get(rawKey)?.[field];
|
|
38958
|
+
const rawRecords = Array.isArray(this.dataSourceObj?.records)
|
|
38959
|
+
? this.dataSourceObj.records
|
|
38960
|
+
: null;
|
|
38961
|
+
const record = rawRecords
|
|
38962
|
+
? Array.isArray(recordIndex)
|
|
38963
|
+
? getValueFromDeepArray(rawRecords, recordIndex)
|
|
38964
|
+
: rawRecords[recordIndex]
|
|
38965
|
+
: undefined;
|
|
38966
|
+
let formatValue = value;
|
|
38967
|
+
if (typeof beforeChangedValue === 'number' && isAllDigits(value)) {
|
|
38968
|
+
formatValue = parseFloat(value);
|
|
38969
|
+
}
|
|
38970
|
+
if (record) {
|
|
38971
|
+
record[field] = formatValue;
|
|
38972
|
+
}
|
|
38973
|
+
else if (rawRecords && typeof recordIndex === 'number') {
|
|
38974
|
+
rawRecords[recordIndex] = this.addRecordRule === 'Array' ? [] : {};
|
|
38975
|
+
rawRecords[recordIndex][field] = formatValue;
|
|
38976
|
+
}
|
|
38977
|
+
}
|
|
38978
|
+
}
|
|
38976
38979
|
cacheBeforeChangedRecord(dataIndex, table) {
|
|
38977
38980
|
if (!this.beforeChangedRecordsMap.has(dataIndex.toString())) {
|
|
38978
38981
|
const originRecord = this.getOriginalRecord(dataIndex);
|
|
@@ -38998,70 +39001,166 @@
|
|
|
38998
39001
|
}
|
|
38999
39002
|
}
|
|
39000
39003
|
}
|
|
39001
|
-
|
|
39002
|
-
|
|
39003
|
-
|
|
39004
|
-
|
|
39005
|
-
|
|
39006
|
-
|
|
39007
|
-
|
|
39008
|
-
|
|
39009
|
-
|
|
39010
|
-
|
|
39011
|
-
|
|
39012
|
-
|
|
39013
|
-
|
|
39014
|
-
|
|
39015
|
-
|
|
39016
|
-
|
|
39017
|
-
|
|
39018
|
-
|
|
39004
|
+
_getRawRecordsArray() {
|
|
39005
|
+
const rawRecords = this.dataSourceObj?.records;
|
|
39006
|
+
return Array.isArray(rawRecords) ? rawRecords : null;
|
|
39007
|
+
}
|
|
39008
|
+
_hasFilterInEffect() {
|
|
39009
|
+
return (this.dataConfig?.filterRules?.length ?? 0) >= 1 || (this.lastFilterRules?.length ?? 0) >= 1;
|
|
39010
|
+
}
|
|
39011
|
+
_normalizeInsertIndex(index, length) {
|
|
39012
|
+
if (index === undefined || index === null) {
|
|
39013
|
+
return length;
|
|
39014
|
+
}
|
|
39015
|
+
if (index > length) {
|
|
39016
|
+
return length;
|
|
39017
|
+
}
|
|
39018
|
+
if (index < 0) {
|
|
39019
|
+
return 0;
|
|
39020
|
+
}
|
|
39021
|
+
return index;
|
|
39022
|
+
}
|
|
39023
|
+
_mapViewInsertIndexToRawInsertIndex(rawRecords, viewIndex) {
|
|
39024
|
+
if (this.records.length === 0) {
|
|
39025
|
+
return rawRecords.length;
|
|
39026
|
+
}
|
|
39027
|
+
if (viewIndex <= 0) {
|
|
39028
|
+
const firstVisibleRecord = this.records[0];
|
|
39029
|
+
const rawIndex = rawRecords.indexOf(firstVisibleRecord);
|
|
39030
|
+
return rawIndex >= 0 ? rawIndex : 0;
|
|
39031
|
+
}
|
|
39032
|
+
if (viewIndex >= this.records.length) {
|
|
39033
|
+
const lastVisibleRecord = this.records[this.records.length - 1];
|
|
39034
|
+
const rawIndex = rawRecords.indexOf(lastVisibleRecord);
|
|
39035
|
+
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
39036
|
+
}
|
|
39037
|
+
const prevRecord = this.records[viewIndex - 1];
|
|
39038
|
+
const rawIndex = rawRecords.indexOf(prevRecord);
|
|
39039
|
+
return rawIndex >= 0 ? rawIndex + 1 : rawRecords.length;
|
|
39040
|
+
}
|
|
39041
|
+
_resetIndexingFromViewRecords() {
|
|
39042
|
+
this._sourceLength = this.records.length;
|
|
39043
|
+
this.currentIndexedData = Array.from({ length: this._sourceLength }, (_, i) => i);
|
|
39044
|
+
if (this.rowHierarchyType === 'tree') {
|
|
39045
|
+
this.initTreeHierarchyState();
|
|
39046
|
+
}
|
|
39047
|
+
if (this.userPagination) {
|
|
39048
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39049
|
+
this.updatePagerData();
|
|
39050
|
+
return;
|
|
39051
|
+
}
|
|
39052
|
+
this.pagination.perPageCount = this._sourceLength;
|
|
39053
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39054
|
+
this.updatePagerData();
|
|
39055
|
+
}
|
|
39056
|
+
addRecord(record, index, syncToOriginalRecords = false) {
|
|
39057
|
+
if (!syncToOriginalRecords) {
|
|
39058
|
+
if (Array.isArray(this.records)) {
|
|
39059
|
+
this.records.splice(index, 0, record);
|
|
39060
|
+
this.adjustBeforeChangedRecordsMap(index, 1);
|
|
39061
|
+
this.currentIndexedData.push(this.currentIndexedData.length);
|
|
39062
|
+
this._sourceLength += 1;
|
|
39063
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) {
|
|
39064
|
+
this.fieldAggregators[i].push(record);
|
|
39065
|
+
}
|
|
39066
|
+
if (this.rowHierarchyType === 'tree') {
|
|
39067
|
+
this.initTreeHierarchyState();
|
|
39068
|
+
}
|
|
39069
|
+
if (this.userPagination) {
|
|
39070
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39071
|
+
const { perPageCount, currentPage } = this.pagination;
|
|
39072
|
+
const startIndex = perPageCount * (currentPage || 0);
|
|
39073
|
+
const endIndex = startIndex + perPageCount;
|
|
39074
|
+
if (index < endIndex) {
|
|
39075
|
+
this.updatePagerData();
|
|
39076
|
+
}
|
|
39077
|
+
}
|
|
39078
|
+
else {
|
|
39079
|
+
this.pagination.perPageCount = this._sourceLength;
|
|
39080
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39019
39081
|
this.updatePagerData();
|
|
39020
39082
|
}
|
|
39083
|
+
if (this.dataSourceObj?.added) {
|
|
39084
|
+
this.dataSourceObj.added(index, 1);
|
|
39085
|
+
}
|
|
39021
39086
|
}
|
|
39022
|
-
|
|
39023
|
-
|
|
39024
|
-
|
|
39025
|
-
|
|
39026
|
-
|
|
39027
|
-
|
|
39028
|
-
|
|
39029
|
-
|
|
39087
|
+
return;
|
|
39088
|
+
}
|
|
39089
|
+
const rawRecords = this._getRawRecordsArray();
|
|
39090
|
+
if (!rawRecords) {
|
|
39091
|
+
return;
|
|
39092
|
+
}
|
|
39093
|
+
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length);
|
|
39094
|
+
const rawInsertIndex = this._hasFilterInEffect()
|
|
39095
|
+
? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex)
|
|
39096
|
+
: this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
39097
|
+
rawRecords.splice(rawInsertIndex, 0, record);
|
|
39098
|
+
if (syncToOriginalRecords && this._hasFilterInEffect()) {
|
|
39099
|
+
this.markForceVisibleRecord(record);
|
|
39100
|
+
}
|
|
39101
|
+
this.beforeChangedRecordsMap.clear();
|
|
39102
|
+
this.sortedIndexMap.clear();
|
|
39103
|
+
this.updateFilterRules(this.dataConfig?.filterRules);
|
|
39104
|
+
if (this.dataSourceObj?.added) {
|
|
39105
|
+
this.dataSourceObj.added(rawInsertIndex, 1);
|
|
39030
39106
|
}
|
|
39031
39107
|
}
|
|
39032
|
-
addRecords(recordArr, index) {
|
|
39033
|
-
if (
|
|
39034
|
-
if (Array.isArray(
|
|
39035
|
-
|
|
39036
|
-
|
|
39037
|
-
|
|
39038
|
-
|
|
39108
|
+
addRecords(recordArr, index, syncToOriginalRecords = false) {
|
|
39109
|
+
if (!syncToOriginalRecords) {
|
|
39110
|
+
if (Array.isArray(this.records)) {
|
|
39111
|
+
if (Array.isArray(recordArr)) {
|
|
39112
|
+
this.records.splice(index, 0, ...recordArr);
|
|
39113
|
+
this.adjustBeforeChangedRecordsMap(index, recordArr.length);
|
|
39114
|
+
for (let i = 0; i < recordArr.length; i++) {
|
|
39115
|
+
this.currentIndexedData.push(this.currentIndexedData.length);
|
|
39116
|
+
}
|
|
39117
|
+
this._sourceLength += recordArr.length;
|
|
39118
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) {
|
|
39119
|
+
for (let j = 0; j < recordArr.length; j++) {
|
|
39120
|
+
this.fieldAggregators[i].push(recordArr[j]);
|
|
39121
|
+
}
|
|
39122
|
+
}
|
|
39039
39123
|
}
|
|
39040
|
-
this.
|
|
39041
|
-
|
|
39042
|
-
|
|
39043
|
-
|
|
39124
|
+
if (this.userPagination) {
|
|
39125
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39126
|
+
const { perPageCount, currentPage } = this.pagination;
|
|
39127
|
+
const startIndex = perPageCount * (currentPage || 0);
|
|
39128
|
+
const endIndex = startIndex + perPageCount;
|
|
39129
|
+
if (index < endIndex) {
|
|
39130
|
+
this.updatePagerData();
|
|
39044
39131
|
}
|
|
39045
39132
|
}
|
|
39046
|
-
|
|
39047
|
-
|
|
39048
|
-
|
|
39049
|
-
const { perPageCount, currentPage } = this.pagination;
|
|
39050
|
-
const startIndex = perPageCount * (currentPage || 0);
|
|
39051
|
-
const endIndex = startIndex + perPageCount;
|
|
39052
|
-
if (index < endIndex) {
|
|
39133
|
+
else {
|
|
39134
|
+
this.pagination.perPageCount = this._sourceLength;
|
|
39135
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39053
39136
|
this.updatePagerData();
|
|
39054
39137
|
}
|
|
39138
|
+
if (this.dataSourceObj?.added) {
|
|
39139
|
+
this.dataSourceObj.added(index, recordArr.length);
|
|
39140
|
+
}
|
|
39055
39141
|
}
|
|
39056
|
-
|
|
39057
|
-
|
|
39058
|
-
|
|
39059
|
-
|
|
39060
|
-
|
|
39061
|
-
|
|
39062
|
-
|
|
39142
|
+
return;
|
|
39143
|
+
}
|
|
39144
|
+
const rawRecords = this._getRawRecordsArray();
|
|
39145
|
+
if (!rawRecords || !Array.isArray(recordArr) || recordArr.length === 0) {
|
|
39146
|
+
return;
|
|
39147
|
+
}
|
|
39148
|
+
const viewInsertIndex = this._normalizeInsertIndex(index, this.records.length);
|
|
39149
|
+
const rawInsertIndex = this._hasFilterInEffect()
|
|
39150
|
+
? this._mapViewInsertIndexToRawInsertIndex(rawRecords, viewInsertIndex)
|
|
39151
|
+
: this._normalizeInsertIndex(viewInsertIndex, rawRecords.length);
|
|
39152
|
+
rawRecords.splice(rawInsertIndex, 0, ...recordArr);
|
|
39153
|
+
if (syncToOriginalRecords && this._hasFilterInEffect()) {
|
|
39154
|
+
for (let i = 0; i < recordArr.length; i++) {
|
|
39155
|
+
this.markForceVisibleRecord(recordArr[i]);
|
|
39063
39156
|
}
|
|
39064
39157
|
}
|
|
39158
|
+
this.beforeChangedRecordsMap.clear();
|
|
39159
|
+
this.sortedIndexMap.clear();
|
|
39160
|
+
this.updateFilterRules(this.dataConfig?.filterRules);
|
|
39161
|
+
if (this.dataSourceObj?.added) {
|
|
39162
|
+
this.dataSourceObj.added(rawInsertIndex, recordArr.length);
|
|
39163
|
+
}
|
|
39065
39164
|
}
|
|
39066
39165
|
addRecordForSorted(record) {
|
|
39067
39166
|
if (Array.isArray(this.records)) {
|
|
@@ -39094,46 +39193,84 @@
|
|
|
39094
39193
|
}
|
|
39095
39194
|
}
|
|
39096
39195
|
adjustBeforeChangedRecordsMap(insertIndex, insertCount, type = 'add') {
|
|
39097
|
-
const
|
|
39098
|
-
|
|
39196
|
+
const delta = type === 'add' ? insertCount : -insertCount;
|
|
39197
|
+
const numericKeys = [];
|
|
39198
|
+
this.beforeChangedRecordsMap.forEach((_, key) => {
|
|
39199
|
+
const numKey = Number(key);
|
|
39200
|
+
if (Number.isInteger(numKey) && numKey.toString() === key && numKey >= insertIndex) {
|
|
39201
|
+
numericKeys.push(numKey);
|
|
39202
|
+
}
|
|
39203
|
+
});
|
|
39204
|
+
numericKeys.sort((a, b) => (type === 'add' ? b - a : a - b));
|
|
39205
|
+
for (let i = 0; i < numericKeys.length; i++) {
|
|
39206
|
+
const key = numericKeys[i];
|
|
39099
39207
|
const record = this.beforeChangedRecordsMap.get(key.toString());
|
|
39100
39208
|
this.beforeChangedRecordsMap.delete(key.toString());
|
|
39101
|
-
this.beforeChangedRecordsMap.set((key +
|
|
39209
|
+
this.beforeChangedRecordsMap.set((key + delta).toString(), record);
|
|
39102
39210
|
}
|
|
39103
39211
|
}
|
|
39104
|
-
deleteRecords(recordIndexs) {
|
|
39105
|
-
if (
|
|
39106
|
-
|
|
39107
|
-
|
|
39108
|
-
|
|
39109
|
-
|
|
39110
|
-
|
|
39111
|
-
|
|
39212
|
+
deleteRecords(recordIndexs, syncToOriginalRecords = false) {
|
|
39213
|
+
if (!syncToOriginalRecords) {
|
|
39214
|
+
if (Array.isArray(this.records)) {
|
|
39215
|
+
const realDeletedRecordIndexs = [];
|
|
39216
|
+
const recordIndexsMaxToMin = recordIndexs.sort((a, b) => b - a);
|
|
39217
|
+
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
39218
|
+
const recordIndex = recordIndexsMaxToMin[index];
|
|
39219
|
+
if (recordIndex >= this._sourceLength || recordIndex < 0) {
|
|
39220
|
+
continue;
|
|
39221
|
+
}
|
|
39222
|
+
this.adjustBeforeChangedRecordsMap(recordIndex, 1, 'delete');
|
|
39223
|
+
realDeletedRecordIndexs.push(recordIndex);
|
|
39224
|
+
const deletedRecord = this.records[recordIndex];
|
|
39225
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) {
|
|
39226
|
+
this.fieldAggregators[i].deleteRecord(deletedRecord);
|
|
39227
|
+
}
|
|
39228
|
+
this.records.splice(recordIndex, 1);
|
|
39229
|
+
this.currentIndexedData.pop();
|
|
39230
|
+
this._sourceLength -= 1;
|
|
39112
39231
|
}
|
|
39113
|
-
this.
|
|
39114
|
-
|
|
39115
|
-
const deletedRecord = this.records[recordIndex];
|
|
39116
|
-
for (let i = 0; i < this.fieldAggregators.length; i++) {
|
|
39117
|
-
this.fieldAggregators[i].deleteRecord(deletedRecord);
|
|
39232
|
+
if (this.userPagination) {
|
|
39233
|
+
this.updatePagerData();
|
|
39118
39234
|
}
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
|
|
39122
|
-
|
|
39123
|
-
|
|
39124
|
-
this.
|
|
39235
|
+
else {
|
|
39236
|
+
this.pagination.perPageCount = this._sourceLength;
|
|
39237
|
+
this.pagination.totalCount = this._sourceLength;
|
|
39238
|
+
this.updatePagerData();
|
|
39239
|
+
}
|
|
39240
|
+
if (this.dataSourceObj?.deleted) {
|
|
39241
|
+
this.dataSourceObj.deleted(realDeletedRecordIndexs);
|
|
39242
|
+
}
|
|
39243
|
+
return realDeletedRecordIndexs;
|
|
39125
39244
|
}
|
|
39126
|
-
|
|
39127
|
-
|
|
39128
|
-
|
|
39129
|
-
|
|
39245
|
+
return [];
|
|
39246
|
+
}
|
|
39247
|
+
const rawRecords = this._getRawRecordsArray();
|
|
39248
|
+
if (!rawRecords || !Array.isArray(this.records)) {
|
|
39249
|
+
return [];
|
|
39250
|
+
}
|
|
39251
|
+
const realDeletedRecordIndexs = [];
|
|
39252
|
+
const recordIndexsMaxToMin = recordIndexs.slice().sort((a, b) => b - a);
|
|
39253
|
+
const rawDeletedIndexs = [];
|
|
39254
|
+
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
39255
|
+
const viewIndex = recordIndexsMaxToMin[index];
|
|
39256
|
+
if (viewIndex >= this.records.length || viewIndex < 0) {
|
|
39257
|
+
continue;
|
|
39130
39258
|
}
|
|
39131
|
-
|
|
39132
|
-
|
|
39259
|
+
const deletedRecord = this.records[viewIndex];
|
|
39260
|
+
const rawIndex = rawRecords.indexOf(deletedRecord);
|
|
39261
|
+
if (rawIndex >= 0) {
|
|
39262
|
+
rawRecords.splice(rawIndex, 1);
|
|
39263
|
+
rawDeletedIndexs.push(rawIndex);
|
|
39133
39264
|
}
|
|
39134
|
-
|
|
39265
|
+
realDeletedRecordIndexs.push(viewIndex);
|
|
39135
39266
|
}
|
|
39136
|
-
|
|
39267
|
+
this.beforeChangedRecordsMap.clear();
|
|
39268
|
+
this.sortedIndexMap.clear();
|
|
39269
|
+
this.updateFilterRules(this.dataConfig?.filterRules);
|
|
39270
|
+
if (this.dataSourceObj?.deleted) {
|
|
39271
|
+
this.dataSourceObj.deleted(rawDeletedIndexs);
|
|
39272
|
+
}
|
|
39273
|
+
return realDeletedRecordIndexs;
|
|
39137
39274
|
}
|
|
39138
39275
|
deleteRecordsForSorted(recordIndexs) {
|
|
39139
39276
|
if (Array.isArray(this.records)) {
|
|
@@ -39155,36 +39292,71 @@
|
|
|
39155
39292
|
this.beforeChangedRecordsMap.clear();
|
|
39156
39293
|
}
|
|
39157
39294
|
}
|
|
39158
|
-
updateRecords(records, recordIndexs) {
|
|
39159
|
-
|
|
39295
|
+
updateRecords(records, recordIndexs, syncToOriginalRecords = false) {
|
|
39296
|
+
if (!syncToOriginalRecords) {
|
|
39297
|
+
const realDeletedRecordIndexs = [];
|
|
39298
|
+
for (let index = 0; index < recordIndexs.length; index++) {
|
|
39299
|
+
const recordIndex = recordIndexs[index];
|
|
39300
|
+
if (Array.isArray(recordIndex)) {
|
|
39301
|
+
this.beforeChangedRecordsMap.delete(recordIndex.toString());
|
|
39302
|
+
realDeletedRecordIndexs.push(recordIndex);
|
|
39303
|
+
recordIndex.slice(0, -1).reduce((acc, key) => {
|
|
39304
|
+
if (acc[key] === undefined) {
|
|
39305
|
+
acc[key] = {};
|
|
39306
|
+
}
|
|
39307
|
+
return acc[key].children;
|
|
39308
|
+
}, this.records)[recordIndex[recordIndex.length - 1]] = records[index];
|
|
39309
|
+
}
|
|
39310
|
+
else {
|
|
39311
|
+
if (recordIndex >= this._sourceLength || recordIndex < 0) {
|
|
39312
|
+
continue;
|
|
39313
|
+
}
|
|
39314
|
+
this.beforeChangedRecordsMap.delete(recordIndex.toString());
|
|
39315
|
+
realDeletedRecordIndexs.push(recordIndex);
|
|
39316
|
+
for (let i = 0; i < this.fieldAggregators.length; i++) {
|
|
39317
|
+
this.fieldAggregators[i].updateRecord(this.records[recordIndex], records[index]);
|
|
39318
|
+
}
|
|
39319
|
+
this.records[recordIndex] = records[index];
|
|
39320
|
+
}
|
|
39321
|
+
}
|
|
39322
|
+
if (this.userPagination) {
|
|
39323
|
+
this.updatePagerData();
|
|
39324
|
+
}
|
|
39325
|
+
return realDeletedRecordIndexs;
|
|
39326
|
+
}
|
|
39327
|
+
const rawRecords = this._getRawRecordsArray();
|
|
39328
|
+
if (!rawRecords || !Array.isArray(this.records)) {
|
|
39329
|
+
return [];
|
|
39330
|
+
}
|
|
39331
|
+
const realUpdatedIndexs = [];
|
|
39160
39332
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
39161
39333
|
const recordIndex = recordIndexs[index];
|
|
39162
39334
|
if (Array.isArray(recordIndex)) {
|
|
39163
39335
|
this.beforeChangedRecordsMap.delete(recordIndex.toString());
|
|
39164
|
-
|
|
39336
|
+
realUpdatedIndexs.push(recordIndex);
|
|
39165
39337
|
recordIndex.slice(0, -1).reduce((acc, key) => {
|
|
39166
39338
|
if (acc[key] === undefined) {
|
|
39167
39339
|
acc[key] = {};
|
|
39168
39340
|
}
|
|
39169
39341
|
return acc[key].children;
|
|
39170
|
-
},
|
|
39342
|
+
}, rawRecords)[recordIndex[recordIndex.length - 1]] = records[index];
|
|
39171
39343
|
}
|
|
39172
39344
|
else {
|
|
39173
|
-
if (recordIndex >= this.
|
|
39345
|
+
if (recordIndex >= this.records.length || recordIndex < 0) {
|
|
39174
39346
|
continue;
|
|
39175
39347
|
}
|
|
39176
|
-
this.
|
|
39177
|
-
|
|
39178
|
-
|
|
39179
|
-
|
|
39348
|
+
const oldRecord = this.records[recordIndex];
|
|
39349
|
+
const rawIndex = rawRecords.indexOf(oldRecord);
|
|
39350
|
+
if (rawIndex >= 0) {
|
|
39351
|
+
rawRecords[rawIndex] = records[index];
|
|
39180
39352
|
}
|
|
39181
|
-
|
|
39353
|
+
realUpdatedIndexs.push(recordIndex);
|
|
39182
39354
|
}
|
|
39183
39355
|
}
|
|
39184
|
-
|
|
39185
|
-
|
|
39186
|
-
|
|
39187
|
-
return
|
|
39356
|
+
this.beforeChangedRecordsMap.clear();
|
|
39357
|
+
this.sortedIndexMap.clear();
|
|
39358
|
+
this.updateFilterRules(this.dataConfig?.filterRules);
|
|
39359
|
+
return realUpdatedIndexs;
|
|
39188
39360
|
}
|
|
39189
39361
|
updateRecordsForSorted(records, recordIndexs) {
|
|
39190
39362
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
@@ -39265,7 +39437,11 @@
|
|
|
39265
39437
|
}
|
|
39266
39438
|
}
|
|
39267
39439
|
if (!filedMapArray.length) {
|
|
39268
|
-
filedMapArray = states.map(() => ({
|
|
39440
|
+
filedMapArray = states.map(() => ({
|
|
39441
|
+
asc: [],
|
|
39442
|
+
desc: [],
|
|
39443
|
+
normal: []
|
|
39444
|
+
}));
|
|
39269
39445
|
for (let index = 0; index < states.length; index++) {
|
|
39270
39446
|
this.sortedIndexMap.set(states[index].field, filedMapArray[index]);
|
|
39271
39447
|
}
|
|
@@ -39280,6 +39456,16 @@
|
|
|
39280
39456
|
setSortedIndexMap(field, filedMap) {
|
|
39281
39457
|
this.sortedIndexMap.set(field, filedMap);
|
|
39282
39458
|
}
|
|
39459
|
+
markForceVisibleRecord(record) {
|
|
39460
|
+
if (!record || (typeof record !== 'object' && typeof record !== 'function')) {
|
|
39461
|
+
return;
|
|
39462
|
+
}
|
|
39463
|
+
this._forceVisibleRecords ||= new WeakSet();
|
|
39464
|
+
this._forceVisibleRecords.add(record);
|
|
39465
|
+
}
|
|
39466
|
+
clearForceVisibleRecords() {
|
|
39467
|
+
this._forceVisibleRecords = undefined;
|
|
39468
|
+
}
|
|
39283
39469
|
clearFilteredChildren(record) {
|
|
39284
39470
|
record.filteredChildren = undefined;
|
|
39285
39471
|
for (let i = 0; i < (record.children?.length ?? 0); i++) {
|
|
@@ -39287,6 +39473,9 @@
|
|
|
39287
39473
|
}
|
|
39288
39474
|
}
|
|
39289
39475
|
filterRecord(record) {
|
|
39476
|
+
if (this._forceVisibleRecords?.has(record)) {
|
|
39477
|
+
return true;
|
|
39478
|
+
}
|
|
39290
39479
|
let isReserved = true;
|
|
39291
39480
|
for (let i = 0; i < this.dataConfig.filterRules?.length; i++) {
|
|
39292
39481
|
const filterRule = this.dataConfig?.filterRules[i];
|
|
@@ -49015,27 +49204,9 @@
|
|
|
49015
49204
|
return hoverMode;
|
|
49016
49205
|
}
|
|
49017
49206
|
|
|
49018
|
-
let brushingChartInstance;
|
|
49019
|
-
let brushingChartInstanceCellPos = { col: -1, row: -1 };
|
|
49020
|
-
function setBrushingChartInstance(chartInstance, col, row) {
|
|
49021
|
-
brushingChartInstance = chartInstance;
|
|
49022
|
-
brushingChartInstanceCellPos = { col, row };
|
|
49023
|
-
}
|
|
49024
|
-
function clearBrushingChartInstance() {
|
|
49025
|
-
brushingChartInstance = undefined;
|
|
49026
|
-
brushingChartInstanceCellPos = { col: -1, row: -1 };
|
|
49027
|
-
}
|
|
49028
|
-
function getBrushingChartInstance() {
|
|
49029
|
-
return brushingChartInstance;
|
|
49030
|
-
}
|
|
49031
|
-
function getBrushingChartInstanceCellPos() {
|
|
49032
|
-
return brushingChartInstanceCellPos;
|
|
49033
|
-
}
|
|
49034
49207
|
const chartInstanceListColumnByColumnDirection = {};
|
|
49035
49208
|
const chartInstanceListRowByRowDirection = {};
|
|
49036
|
-
const delayRunDimensionHoverTimer = [];
|
|
49037
49209
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
49038
|
-
clearDelayRunDimensionHoverTimers();
|
|
49039
49210
|
if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49040
49211
|
chartInstanceListColumnByColumnDirection[col] = {};
|
|
49041
49212
|
}
|
|
@@ -49045,9 +49216,9 @@
|
|
|
49045
49216
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
49046
49217
|
const cellGroup = table.scenegraph.getCell(col, i);
|
|
49047
49218
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49219
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49048
49220
|
if (chartInstanceListColumnByColumnDirection[col][i]) ;
|
|
49049
49221
|
else if (isValid$1(chartNode)) {
|
|
49050
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49051
49222
|
if (chartNode.activeChartInstance) {
|
|
49052
49223
|
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49053
49224
|
}
|
|
@@ -49056,13 +49227,44 @@
|
|
|
49056
49227
|
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49057
49228
|
}
|
|
49058
49229
|
}
|
|
49059
|
-
|
|
49230
|
+
setTimeout(() => {
|
|
49060
49231
|
if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
|
|
49061
49232
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49062
49233
|
let isShowTooltip = !isScatter;
|
|
49063
49234
|
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49064
49235
|
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49065
|
-
|
|
49236
|
+
if (i === rowEnd && isShowTooltip) {
|
|
49237
|
+
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49238
|
+
const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
49239
|
+
if (rowEnd1 === rowEnd) {
|
|
49240
|
+
isShowTooltip = true;
|
|
49241
|
+
}
|
|
49242
|
+
else {
|
|
49243
|
+
const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
|
|
49244
|
+
if (rowEnd2 !== rowEnd) {
|
|
49245
|
+
isShowTooltip = true;
|
|
49246
|
+
}
|
|
49247
|
+
else {
|
|
49248
|
+
isShowTooltip = false;
|
|
49249
|
+
}
|
|
49250
|
+
}
|
|
49251
|
+
}
|
|
49252
|
+
else if (i === rowStart && isShowTooltip) {
|
|
49253
|
+
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49254
|
+
const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
49255
|
+
if (rowStart1 === rowStart) {
|
|
49256
|
+
isShowTooltip = true;
|
|
49257
|
+
}
|
|
49258
|
+
else {
|
|
49259
|
+
const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
|
|
49260
|
+
if (rowStart2 !== rowStart) {
|
|
49261
|
+
isShowTooltip = true;
|
|
49262
|
+
}
|
|
49263
|
+
else {
|
|
49264
|
+
isShowTooltip = false;
|
|
49265
|
+
}
|
|
49266
|
+
}
|
|
49267
|
+
}
|
|
49066
49268
|
}
|
|
49067
49269
|
if (isScatter) {
|
|
49068
49270
|
if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
|
|
@@ -49075,7 +49277,6 @@
|
|
|
49075
49277
|
}
|
|
49076
49278
|
}
|
|
49077
49279
|
else {
|
|
49078
|
-
const cellBoundry = table.getCellRelativeRect(col, i);
|
|
49079
49280
|
const bodyBoundryTop = table.frozenRowCount
|
|
49080
49281
|
? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom
|
|
49081
49282
|
: 0;
|
|
@@ -49086,32 +49287,43 @@
|
|
|
49086
49287
|
}
|
|
49087
49288
|
chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49088
49289
|
tooltip: false,
|
|
49089
|
-
showTooltipOption: {
|
|
49090
|
-
x: canvasXY.x - cellBoundry.left,
|
|
49091
|
-
y: absolutePositionTop - cellBoundry.top,
|
|
49092
|
-
activeType: 'dimension'
|
|
49093
|
-
}
|
|
49290
|
+
showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
|
|
49094
49291
|
});
|
|
49095
49292
|
}
|
|
49096
49293
|
else {
|
|
49097
49294
|
chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49098
49295
|
tooltip: isShowTooltip,
|
|
49099
|
-
showTooltipOption: {
|
|
49100
|
-
x: canvasXY.x - cellBoundry.left,
|
|
49101
|
-
y: absolutePositionTop - cellBoundry.top,
|
|
49102
|
-
activeType: 'dimension'
|
|
49103
|
-
}
|
|
49296
|
+
showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
|
|
49104
49297
|
});
|
|
49105
49298
|
}
|
|
49106
49299
|
}
|
|
49107
49300
|
}
|
|
49108
49301
|
}, 0);
|
|
49109
|
-
delayRunDimensionHoverTimer.push(timer);
|
|
49110
49302
|
table.scenegraph.updateNextFrame();
|
|
49111
49303
|
}
|
|
49112
49304
|
}
|
|
49305
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
49306
|
+
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49307
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
49308
|
+
if (isValid$1(excludedRow) && Number(i) === excludedRow) {
|
|
49309
|
+
continue;
|
|
49310
|
+
}
|
|
49311
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i));
|
|
49312
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49313
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49314
|
+
if (isValid$1(chartNode)) {
|
|
49315
|
+
chartNode.deactivate(table, {
|
|
49316
|
+
releaseChartInstance: true,
|
|
49317
|
+
releaseColumnChartInstance: false,
|
|
49318
|
+
releaseRowChartInstance: false
|
|
49319
|
+
});
|
|
49320
|
+
chartInstanceListColumnByColumnDirection[col][i] = null;
|
|
49321
|
+
}
|
|
49322
|
+
}
|
|
49323
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
49324
|
+
}
|
|
49325
|
+
}
|
|
49113
49326
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
49114
|
-
clearDelayRunDimensionHoverTimers();
|
|
49115
49327
|
if (!isValid$1(chartInstanceListRowByRowDirection[row])) {
|
|
49116
49328
|
chartInstanceListRowByRowDirection[row] = {};
|
|
49117
49329
|
}
|
|
@@ -49121,9 +49333,9 @@
|
|
|
49121
49333
|
for (let i = colStart; i <= colEnd; i++) {
|
|
49122
49334
|
const cellGroup = table.scenegraph.getCell(i, row);
|
|
49123
49335
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49336
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49124
49337
|
if (chartInstanceListRowByRowDirection[row][i]) ;
|
|
49125
49338
|
else if (isValid$1(chartNode)) {
|
|
49126
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49127
49339
|
if (chartNode.activeChartInstance) {
|
|
49128
49340
|
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49129
49341
|
}
|
|
@@ -49132,13 +49344,44 @@
|
|
|
49132
49344
|
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49133
49345
|
}
|
|
49134
49346
|
}
|
|
49135
|
-
|
|
49347
|
+
setTimeout(() => {
|
|
49136
49348
|
if (chartInstanceListRowByRowDirection[row]?.[i]) {
|
|
49137
49349
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49138
49350
|
let isShowTooltip = !isScatter;
|
|
49139
49351
|
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49140
49352
|
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49141
|
-
|
|
49353
|
+
if (i === colEnd && isShowTooltip) {
|
|
49354
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49355
|
+
const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
49356
|
+
if (colEnd1 === colEnd) {
|
|
49357
|
+
isShowTooltip = true;
|
|
49358
|
+
}
|
|
49359
|
+
else {
|
|
49360
|
+
const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
|
|
49361
|
+
if (colEnd2 !== colEnd) {
|
|
49362
|
+
isShowTooltip = true;
|
|
49363
|
+
}
|
|
49364
|
+
else {
|
|
49365
|
+
isShowTooltip = false;
|
|
49366
|
+
}
|
|
49367
|
+
}
|
|
49368
|
+
}
|
|
49369
|
+
else if (i === colStart && isShowTooltip) {
|
|
49370
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49371
|
+
const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
49372
|
+
if (colStart1 === colStart) {
|
|
49373
|
+
isShowTooltip = true;
|
|
49374
|
+
}
|
|
49375
|
+
else {
|
|
49376
|
+
const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
|
|
49377
|
+
if (colStart2 !== colStart) {
|
|
49378
|
+
isShowTooltip = true;
|
|
49379
|
+
}
|
|
49380
|
+
else {
|
|
49381
|
+
isShowTooltip = false;
|
|
49382
|
+
}
|
|
49383
|
+
}
|
|
49384
|
+
}
|
|
49142
49385
|
}
|
|
49143
49386
|
if (isScatter) {
|
|
49144
49387
|
if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
|
|
@@ -49151,7 +49394,6 @@
|
|
|
49151
49394
|
}
|
|
49152
49395
|
}
|
|
49153
49396
|
else {
|
|
49154
|
-
const cellBoundry = table.getCellRelativeRect(i, row);
|
|
49155
49397
|
const bodyBoundryLeft = table.frozenColCount
|
|
49156
49398
|
? table.getCellRelativeRect(table.frozenColCount - 1, row).right
|
|
49157
49399
|
: 0;
|
|
@@ -49162,188 +49404,22 @@
|
|
|
49162
49404
|
}
|
|
49163
49405
|
chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49164
49406
|
tooltip: false,
|
|
49165
|
-
showTooltipOption: {
|
|
49166
|
-
x: absolutePositionLeft - cellBoundry.left,
|
|
49167
|
-
y: canvasXY.y - cellBoundry.top,
|
|
49168
|
-
activeType: 'dimension'
|
|
49169
|
-
}
|
|
49407
|
+
showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
|
|
49170
49408
|
});
|
|
49171
49409
|
}
|
|
49172
49410
|
else {
|
|
49173
49411
|
chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49174
49412
|
tooltip: isShowTooltip,
|
|
49175
|
-
showTooltipOption: {
|
|
49176
|
-
x: absolutePositionLeft - cellBoundry.left,
|
|
49177
|
-
y: canvasXY.y - cellBoundry.top,
|
|
49178
|
-
activeType: 'dimension'
|
|
49179
|
-
}
|
|
49413
|
+
showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
|
|
49180
49414
|
});
|
|
49181
49415
|
}
|
|
49182
49416
|
}
|
|
49183
49417
|
}
|
|
49184
49418
|
}, 0);
|
|
49185
|
-
delayRunDimensionHoverTimer.push(timer);
|
|
49186
49419
|
table.scenegraph.updateNextFrame();
|
|
49187
49420
|
}
|
|
49188
49421
|
}
|
|
49189
|
-
function
|
|
49190
|
-
clearDelayRunDimensionHoverTimers();
|
|
49191
|
-
const { rowStart } = table.getBodyVisibleRowRange();
|
|
49192
|
-
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
49193
|
-
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
49194
|
-
const { colStart } = table.getBodyVisibleColRange();
|
|
49195
|
-
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
49196
|
-
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
49197
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
49198
|
-
if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49199
|
-
chartInstanceListColumnByColumnDirection[col] = {};
|
|
49200
|
-
}
|
|
49201
|
-
for (let i = rowStart; i <= rowEnd; i++) {
|
|
49202
|
-
const cellGroup = table.scenegraph.getCell(col, i);
|
|
49203
|
-
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49204
|
-
if (chartInstanceListColumnByColumnDirection[col][i]) ;
|
|
49205
|
-
else if (isValid$1(chartNode)) {
|
|
49206
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49207
|
-
if (chartNode.activeChartInstance) {
|
|
49208
|
-
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49209
|
-
}
|
|
49210
|
-
else {
|
|
49211
|
-
if (chartNode.attribute.spec.type === 'pie') {
|
|
49212
|
-
chartNode.activate(table);
|
|
49213
|
-
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49214
|
-
}
|
|
49215
|
-
}
|
|
49216
|
-
}
|
|
49217
|
-
const timer = setTimeout(() => {
|
|
49218
|
-
if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
|
|
49219
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49220
|
-
let isShowTooltip = true;
|
|
49221
|
-
if (typeof chartDimensionLinkage === 'object') {
|
|
49222
|
-
if (deactivate) {
|
|
49223
|
-
chartInstanceListColumnByColumnDirection[col][i].setHovered();
|
|
49224
|
-
chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
|
|
49225
|
-
}
|
|
49226
|
-
else {
|
|
49227
|
-
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49228
|
-
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table);
|
|
49229
|
-
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table);
|
|
49230
|
-
chartInstanceListColumnByColumnDirection[col][i].setHovered(datum);
|
|
49231
|
-
isShowTooltip &&
|
|
49232
|
-
chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
|
|
49233
|
-
activeType: 'mark'
|
|
49234
|
-
});
|
|
49235
|
-
}
|
|
49236
|
-
}
|
|
49237
|
-
}
|
|
49238
|
-
}, 0);
|
|
49239
|
-
delayRunDimensionHoverTimer.push(timer);
|
|
49240
|
-
table.scenegraph.updateNextFrame();
|
|
49241
|
-
}
|
|
49242
|
-
}
|
|
49243
|
-
}
|
|
49244
|
-
function checkIsShowTooltipForEdgeRow(row, table) {
|
|
49245
|
-
let isShowTooltip = true;
|
|
49246
|
-
const { rowStart } = table.getBodyVisibleRowRange();
|
|
49247
|
-
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
49248
|
-
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
49249
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49250
|
-
if (row === rowEnd && isShowTooltip) {
|
|
49251
|
-
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49252
|
-
const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
49253
|
-
if (rowEnd1 === rowEnd) {
|
|
49254
|
-
isShowTooltip = true;
|
|
49255
|
-
}
|
|
49256
|
-
else {
|
|
49257
|
-
const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
|
|
49258
|
-
if (rowEnd2 !== rowEnd) {
|
|
49259
|
-
isShowTooltip = true;
|
|
49260
|
-
}
|
|
49261
|
-
else {
|
|
49262
|
-
isShowTooltip = false;
|
|
49263
|
-
}
|
|
49264
|
-
}
|
|
49265
|
-
}
|
|
49266
|
-
else if (row === rowStart && isShowTooltip) {
|
|
49267
|
-
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49268
|
-
const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
49269
|
-
if (rowStart1 === rowStart) {
|
|
49270
|
-
isShowTooltip = true;
|
|
49271
|
-
}
|
|
49272
|
-
else {
|
|
49273
|
-
const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
|
|
49274
|
-
if (rowStart2 !== rowStart) {
|
|
49275
|
-
isShowTooltip = true;
|
|
49276
|
-
}
|
|
49277
|
-
else {
|
|
49278
|
-
isShowTooltip = false;
|
|
49279
|
-
}
|
|
49280
|
-
}
|
|
49281
|
-
}
|
|
49282
|
-
return isShowTooltip;
|
|
49283
|
-
}
|
|
49284
|
-
function checkIsShowTooltipForEdgeColumn(col, table) {
|
|
49285
|
-
let isShowTooltip = true;
|
|
49286
|
-
const { colStart } = table.getBodyVisibleColRange();
|
|
49287
|
-
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
49288
|
-
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
49289
|
-
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49290
|
-
if (col === colEnd && isShowTooltip) {
|
|
49291
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49292
|
-
const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
49293
|
-
if (colEnd1 === colEnd) {
|
|
49294
|
-
isShowTooltip = true;
|
|
49295
|
-
}
|
|
49296
|
-
else {
|
|
49297
|
-
const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
|
|
49298
|
-
if (colEnd2 !== colEnd) {
|
|
49299
|
-
isShowTooltip = true;
|
|
49300
|
-
}
|
|
49301
|
-
else {
|
|
49302
|
-
isShowTooltip = false;
|
|
49303
|
-
}
|
|
49304
|
-
}
|
|
49305
|
-
}
|
|
49306
|
-
else if (col === colStart && isShowTooltip) {
|
|
49307
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49308
|
-
const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
49309
|
-
if (colStart1 === colStart) {
|
|
49310
|
-
isShowTooltip = true;
|
|
49311
|
-
}
|
|
49312
|
-
else {
|
|
49313
|
-
const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
|
|
49314
|
-
if (colStart2 !== colStart) {
|
|
49315
|
-
isShowTooltip = true;
|
|
49316
|
-
}
|
|
49317
|
-
else {
|
|
49318
|
-
isShowTooltip = false;
|
|
49319
|
-
}
|
|
49320
|
-
}
|
|
49321
|
-
}
|
|
49322
|
-
return isShowTooltip;
|
|
49323
|
-
}
|
|
49324
|
-
function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = false) {
|
|
49325
|
-
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49326
|
-
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
49327
|
-
if (isValid$1(excludedRow) && Number(i) === excludedRow) {
|
|
49328
|
-
continue;
|
|
49329
|
-
}
|
|
49330
|
-
const cellGroup = table.scenegraph.getCell(col, Number(i));
|
|
49331
|
-
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49332
|
-
if (isValid$1(chartNode)) {
|
|
49333
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49334
|
-
chartNode.deactivate(table, {
|
|
49335
|
-
forceRelease: forceRelease,
|
|
49336
|
-
releaseChartInstance: true,
|
|
49337
|
-
releaseColumnChartInstance: false,
|
|
49338
|
-
releaseRowChartInstance: false
|
|
49339
|
-
});
|
|
49340
|
-
chartInstanceListColumnByColumnDirection[col][i] = null;
|
|
49341
|
-
}
|
|
49342
|
-
}
|
|
49343
|
-
delete chartInstanceListColumnByColumnDirection[col];
|
|
49344
|
-
}
|
|
49345
|
-
}
|
|
49346
|
-
function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = false) {
|
|
49422
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table) {
|
|
49347
49423
|
if (isValid$1(chartInstanceListRowByRowDirection[row])) {
|
|
49348
49424
|
for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
49349
49425
|
if (isValid$1(excludedCol) && Number(i) === excludedCol) {
|
|
@@ -49351,10 +49427,9 @@
|
|
|
49351
49427
|
}
|
|
49352
49428
|
const cellGroup = table.scenegraph.getCell(Number(i), row);
|
|
49353
49429
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49430
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49354
49431
|
if (isValid$1(chartNode)) {
|
|
49355
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49356
49432
|
chartNode.deactivate(table, {
|
|
49357
|
-
forceRelease: forceRelease,
|
|
49358
49433
|
releaseChartInstance: true,
|
|
49359
49434
|
releaseColumnChartInstance: false,
|
|
49360
49435
|
releaseRowChartInstance: false
|
|
@@ -49365,54 +49440,6 @@
|
|
|
49365
49440
|
}
|
|
49366
49441
|
delete chartInstanceListRowByRowDirection[row];
|
|
49367
49442
|
}
|
|
49368
|
-
function clearDelayRunDimensionHoverTimers() {
|
|
49369
|
-
for (const timer of delayRunDimensionHoverTimer) {
|
|
49370
|
-
clearTimeout(timer);
|
|
49371
|
-
}
|
|
49372
|
-
delayRunDimensionHoverTimer.length = 0;
|
|
49373
|
-
}
|
|
49374
|
-
function clearAllChartInstanceList(table, forceRelease = false) {
|
|
49375
|
-
clearDelayRunDimensionHoverTimers();
|
|
49376
|
-
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49377
|
-
clearChartInstanceListByColumnDirection(Number(col), undefined, table, forceRelease);
|
|
49378
|
-
}
|
|
49379
|
-
for (const row in chartInstanceListRowByRowDirection) {
|
|
49380
|
-
clearChartInstanceListByRowDirection(Number(row), undefined, table, forceRelease);
|
|
49381
|
-
}
|
|
49382
|
-
}
|
|
49383
|
-
let disabledShowTooltipToAllChartInstances = false;
|
|
49384
|
-
function isDisabledShowTooltipToAllChartInstances() {
|
|
49385
|
-
return disabledShowTooltipToAllChartInstances;
|
|
49386
|
-
}
|
|
49387
|
-
function disableTooltipToAllChartInstances() {
|
|
49388
|
-
disabledShowTooltipToAllChartInstances = true;
|
|
49389
|
-
clearDelayRunDimensionHoverTimers();
|
|
49390
|
-
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49391
|
-
for (const row in chartInstanceListColumnByColumnDirection[col]) {
|
|
49392
|
-
chartInstanceListColumnByColumnDirection[col][row].disableTooltip(true);
|
|
49393
|
-
chartInstanceListColumnByColumnDirection[col][row].hideTooltip();
|
|
49394
|
-
}
|
|
49395
|
-
}
|
|
49396
|
-
for (const row in chartInstanceListRowByRowDirection) {
|
|
49397
|
-
for (const col in chartInstanceListRowByRowDirection[row]) {
|
|
49398
|
-
chartInstanceListRowByRowDirection[row][col].disableTooltip(true);
|
|
49399
|
-
chartInstanceListRowByRowDirection[row][col].hideTooltip();
|
|
49400
|
-
}
|
|
49401
|
-
}
|
|
49402
|
-
}
|
|
49403
|
-
function enableTooltipToAllChartInstances() {
|
|
49404
|
-
disabledShowTooltipToAllChartInstances = false;
|
|
49405
|
-
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49406
|
-
for (const row in chartInstanceListColumnByColumnDirection[col]) {
|
|
49407
|
-
chartInstanceListColumnByColumnDirection[col][row].disableTooltip(false);
|
|
49408
|
-
}
|
|
49409
|
-
}
|
|
49410
|
-
for (const row in chartInstanceListRowByRowDirection) {
|
|
49411
|
-
for (const col in chartInstanceListRowByRowDirection[row]) {
|
|
49412
|
-
chartInstanceListRowByRowDirection[row][col].disableTooltip(false);
|
|
49413
|
-
}
|
|
49414
|
-
}
|
|
49415
|
-
}
|
|
49416
49443
|
|
|
49417
49444
|
function isValidAlignDomain(domain) {
|
|
49418
49445
|
return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -50372,7 +50399,6 @@
|
|
|
50372
50399
|
type = 'chart';
|
|
50373
50400
|
chartInstance;
|
|
50374
50401
|
activeChartInstance;
|
|
50375
|
-
activeChartInstanceLastViewBox = null;
|
|
50376
50402
|
activeChartInstanceHoverOnMark = null;
|
|
50377
50403
|
justShowMarkTooltip = undefined;
|
|
50378
50404
|
justShowMarkTooltipTimer = Date.now();
|
|
@@ -50417,6 +50443,7 @@
|
|
|
50417
50443
|
y1: y1 - table.scrollTop,
|
|
50418
50444
|
y2: y2 - table.scrollTop
|
|
50419
50445
|
});
|
|
50446
|
+
this.activeChartInstance?.release();
|
|
50420
50447
|
this.attribute.ClassType.globalConfig.uniqueTooltip = false;
|
|
50421
50448
|
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
50422
50449
|
renderCanvas: this.attribute.canvas,
|
|
@@ -50469,7 +50496,7 @@
|
|
|
50469
50496
|
}
|
|
50470
50497
|
}
|
|
50471
50498
|
},
|
|
50472
|
-
componentShowContent: table.options.chartDimensionLinkage
|
|
50499
|
+
componentShowContent: table.options.chartDimensionLinkage &&
|
|
50473
50500
|
this.attribute.spec.type !== 'scatter'
|
|
50474
50501
|
? {
|
|
50475
50502
|
tooltip: {
|
|
@@ -50490,54 +50517,21 @@
|
|
|
50490
50517
|
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
|
|
50491
50518
|
this.activeChartInstance.on('click', (params) => {
|
|
50492
50519
|
if (this.attribute.spec.select?.enable === false) {
|
|
50493
|
-
table.scenegraph.updateChartState(null
|
|
50520
|
+
table.scenegraph.updateChartState(null);
|
|
50494
50521
|
}
|
|
50495
50522
|
else if (Chart.temp) {
|
|
50496
|
-
table.scenegraph.updateChartState(params?.datum
|
|
50497
|
-
}
|
|
50498
|
-
});
|
|
50499
|
-
let brushChangeThrottle;
|
|
50500
|
-
if (table.options.chartDimensionLinkage?.listenBrushChange) {
|
|
50501
|
-
brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), table.options.chartDimensionLinkage?.brushChangeDelay ?? 100);
|
|
50502
|
-
this.activeChartInstance.on('brushChange', (params) => {
|
|
50503
|
-
brushChangeThrottle.throttled(params?.value?.inBrushData, 'brush');
|
|
50504
|
-
});
|
|
50505
|
-
}
|
|
50506
|
-
this.activeChartInstance.on('brushStart', (params) => {
|
|
50507
|
-
const brushingChartInstance = getBrushingChartInstance();
|
|
50508
|
-
if (brushingChartInstance !== this.activeChartInstance) {
|
|
50509
|
-
if (brushingChartInstance) {
|
|
50510
|
-
brushingChartInstance.getChart().getComponentsByKey('brush')[0].clearBrushStateAndMask();
|
|
50511
|
-
}
|
|
50512
|
-
setBrushingChartInstance(this.activeChartInstance, col, row);
|
|
50523
|
+
table.scenegraph.updateChartState(params?.datum);
|
|
50513
50524
|
}
|
|
50514
50525
|
});
|
|
50515
50526
|
this.activeChartInstance.on('brushEnd', (params) => {
|
|
50516
|
-
|
|
50517
|
-
table.scenegraph.updateChartState(params?.value?.inBrushData, 'brush');
|
|
50527
|
+
table.scenegraph.updateChartState(params?.value?.inBrushData);
|
|
50518
50528
|
Chart.temp = 0;
|
|
50519
50529
|
setTimeout(() => {
|
|
50520
50530
|
Chart.temp = 1;
|
|
50521
50531
|
}, 0);
|
|
50522
50532
|
});
|
|
50523
|
-
if (table.options.chartDimensionLinkage
|
|
50524
|
-
if (this.attribute.spec.type === 'pie') {
|
|
50525
|
-
this.activeChartInstance.on('pointerover', { markName: 'pie' }, (params) => {
|
|
50526
|
-
const categoryField = this.attribute.spec.categoryField;
|
|
50527
|
-
const datum = { [categoryField]: params?.datum?.[categoryField] };
|
|
50528
|
-
generateChartInstanceListByViewRange(datum, table, false);
|
|
50529
|
-
});
|
|
50530
|
-
this.activeChartInstance.on('pointerout', { markName: 'pie' }, (params) => {
|
|
50531
|
-
const categoryField = this.attribute.spec.categoryField;
|
|
50532
|
-
const datum = { [categoryField]: params?.datum?.[categoryField] };
|
|
50533
|
-
generateChartInstanceListByViewRange(datum, table, true);
|
|
50534
|
-
});
|
|
50535
|
-
}
|
|
50533
|
+
if (table.options.chartDimensionLinkage) {
|
|
50536
50534
|
this.activeChartInstance.on('dimensionHover', (params) => {
|
|
50537
|
-
if (isDisabledShowTooltipToAllChartInstances()) {
|
|
50538
|
-
return;
|
|
50539
|
-
}
|
|
50540
|
-
this.activeChartInstance.disableTooltip(false);
|
|
50541
50535
|
const dimensionInfo = params?.dimensionInfo[0];
|
|
50542
50536
|
const canvasXY = params?.event?.canvas;
|
|
50543
50537
|
const viewport = params?.event?.viewport;
|
|
@@ -50588,11 +50582,13 @@
|
|
|
50588
50582
|
}
|
|
50589
50583
|
else if (prev_justShowMarkTooltip === false && justShowMarkTooltip === true) {
|
|
50590
50584
|
delayRunDimensionHover = false;
|
|
50591
|
-
this.
|
|
50585
|
+
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50586
|
+
this.delayRunDimensionHoverTimer = undefined;
|
|
50592
50587
|
}
|
|
50593
50588
|
else if (prev_justShowMarkTooltip === true && justShowMarkTooltip === true) {
|
|
50594
50589
|
delayRunDimensionHover = false;
|
|
50595
|
-
this.
|
|
50590
|
+
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50591
|
+
this.delayRunDimensionHoverTimer = undefined;
|
|
50596
50592
|
}
|
|
50597
50593
|
if (params.action === 'enter' ||
|
|
50598
50594
|
params.action === 'move' ||
|
|
@@ -50608,11 +50604,8 @@
|
|
|
50608
50604
|
}
|
|
50609
50605
|
}
|
|
50610
50606
|
else {
|
|
50611
|
-
this.
|
|
50607
|
+
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50612
50608
|
this.delayRunDimensionHoverTimer = setTimeout(() => {
|
|
50613
|
-
if (isDisabledShowTooltipToAllChartInstances()) {
|
|
50614
|
-
return;
|
|
50615
|
-
}
|
|
50616
50609
|
if (indicatorsAsCol) {
|
|
50617
50610
|
generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
|
|
50618
50611
|
}
|
|
@@ -50673,31 +50666,23 @@
|
|
|
50673
50666
|
});
|
|
50674
50667
|
}
|
|
50675
50668
|
table._bindChartEvent?.(this.activeChartInstance);
|
|
50676
|
-
if (isDisabledShowTooltipToAllChartInstances()) {
|
|
50677
|
-
this.activeChartInstance.disableTooltip(true);
|
|
50678
|
-
}
|
|
50679
50669
|
}
|
|
50680
50670
|
static temp = 1;
|
|
50681
|
-
|
|
50682
|
-
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50683
|
-
this.delayRunDimensionHoverTimer = undefined;
|
|
50684
|
-
}
|
|
50685
|
-
deactivate(table, { forceRelease = false, releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true, releaseAllChartInstance = false } = {}) {
|
|
50671
|
+
deactivate(table, { releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true } = {}) {
|
|
50686
50672
|
this.activeChartInstanceHoverOnMark = null;
|
|
50687
50673
|
this.justShowMarkTooltip = undefined;
|
|
50688
50674
|
this.justShowMarkTooltipTimer = Date.now();
|
|
50689
|
-
this.
|
|
50675
|
+
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50676
|
+
this.delayRunDimensionHoverTimer = undefined;
|
|
50690
50677
|
if (releaseChartInstance) {
|
|
50691
|
-
|
|
50692
|
-
|
|
50693
|
-
|
|
50694
|
-
|
|
50695
|
-
|
|
50696
|
-
|
|
50697
|
-
|
|
50698
|
-
|
|
50699
|
-
this.activeChartInstance = null;
|
|
50700
|
-
}
|
|
50678
|
+
this.activeChartInstance?.updateViewBox({
|
|
50679
|
+
x1: -1000,
|
|
50680
|
+
x2: -800,
|
|
50681
|
+
y1: -1000,
|
|
50682
|
+
y2: -800
|
|
50683
|
+
}, false, false);
|
|
50684
|
+
this.activeChartInstance?.release();
|
|
50685
|
+
this.activeChartInstance = null;
|
|
50701
50686
|
const { col, row } = this.parent;
|
|
50702
50687
|
table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) &&
|
|
50703
50688
|
table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
|
|
@@ -50717,16 +50702,11 @@
|
|
|
50717
50702
|
table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
|
|
50718
50703
|
}
|
|
50719
50704
|
}
|
|
50720
|
-
if (
|
|
50721
|
-
|
|
50705
|
+
if (releaseColumnChartInstance) {
|
|
50706
|
+
clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table);
|
|
50722
50707
|
}
|
|
50723
|
-
|
|
50724
|
-
|
|
50725
|
-
clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table, forceRelease);
|
|
50726
|
-
}
|
|
50727
|
-
if (releaseRowChartInstance) {
|
|
50728
|
-
clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table, forceRelease);
|
|
50729
|
-
}
|
|
50708
|
+
if (releaseRowChartInstance) {
|
|
50709
|
+
clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table);
|
|
50730
50710
|
}
|
|
50731
50711
|
}
|
|
50732
50712
|
updateData(data) {
|
|
@@ -50737,19 +50717,12 @@
|
|
|
50737
50717
|
const padding = this.attribute.cellPadding;
|
|
50738
50718
|
const table = this.stage.table;
|
|
50739
50719
|
const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
|
|
50740
|
-
|
|
50720
|
+
return {
|
|
50741
50721
|
x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
50742
50722
|
x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
50743
50723
|
y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
|
|
50744
50724
|
y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
|
|
50745
50725
|
};
|
|
50746
|
-
if (this.activeChartInstance) {
|
|
50747
|
-
this.activeChartInstanceLastViewBox = viewBox;
|
|
50748
|
-
}
|
|
50749
|
-
else {
|
|
50750
|
-
this.activeChartInstanceLastViewBox = null;
|
|
50751
|
-
}
|
|
50752
|
-
return viewBox;
|
|
50753
50726
|
}
|
|
50754
50727
|
}
|
|
50755
50728
|
function getTableBounds(col, row, table) {
|
|
@@ -51018,6 +50991,7 @@
|
|
|
51018
50991
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
51019
50992
|
const groupAttribute = getTheme(chart, params?.theme).group;
|
|
51020
50993
|
const { dataId, data, spec } = chart.attribute;
|
|
50994
|
+
chart.getViewBox();
|
|
51021
50995
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
51022
50996
|
const { table } = chart.getRootNode();
|
|
51023
50997
|
const { cacheCanvas, activeChartInstance } = chart;
|
|
@@ -51040,20 +51014,13 @@
|
|
|
51040
51014
|
activeChartInstance.updateSpecSync(spec, false, { reuse: false, morph: false });
|
|
51041
51015
|
}
|
|
51042
51016
|
}
|
|
51043
|
-
const lastViewBox = chart.activeChartInstanceLastViewBox;
|
|
51044
51017
|
const viewBox = chart.getViewBox();
|
|
51045
|
-
|
|
51046
|
-
|
|
51047
|
-
viewBox.x2
|
|
51048
|
-
|
|
51049
|
-
viewBox.y2
|
|
51050
|
-
|
|
51051
|
-
x1: 0,
|
|
51052
|
-
x2: viewBox.x2 - viewBox.x1,
|
|
51053
|
-
y1: 0,
|
|
51054
|
-
y2: viewBox.y2 - viewBox.y1
|
|
51055
|
-
}, false, false);
|
|
51056
|
-
}
|
|
51018
|
+
activeChartInstance.updateViewBox({
|
|
51019
|
+
x1: 0,
|
|
51020
|
+
x2: viewBox.x2 - viewBox.x1,
|
|
51021
|
+
y1: 0,
|
|
51022
|
+
y2: viewBox.y2 - viewBox.y1
|
|
51023
|
+
}, false, false);
|
|
51057
51024
|
const chartStage = activeChartInstance.getStage();
|
|
51058
51025
|
chartStage.needRender = true;
|
|
51059
51026
|
const matrix = chart.globalTransMatrix.clone();
|
|
@@ -57169,10 +57136,9 @@
|
|
|
57169
57136
|
updateTableAxes(scenegraph.rightFrozenGroup, scenegraph.table);
|
|
57170
57137
|
updateTableAxes(scenegraph.bottomFrozenGroup, scenegraph.table);
|
|
57171
57138
|
}
|
|
57172
|
-
function updateChartState(scenegraph, datum
|
|
57139
|
+
function updateChartState(scenegraph, datum) {
|
|
57173
57140
|
const table = scenegraph.table;
|
|
57174
57141
|
if (table.isPivotChart()) {
|
|
57175
|
-
table._selectedDataMode = selectedDataMode;
|
|
57176
57142
|
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
57177
57143
|
if ((datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) &&
|
|
57178
57144
|
preSelectItemsCount === 0) {
|
|
@@ -58439,73 +58405,38 @@
|
|
|
58439
58405
|
resetResidentHoverIcon(col, row) {
|
|
58440
58406
|
resetResidentHoverIcon(col, row, this);
|
|
58441
58407
|
}
|
|
58442
|
-
deactivateChart(col, row
|
|
58408
|
+
deactivateChart(col, row) {
|
|
58443
58409
|
if (col === -1 || row === -1) {
|
|
58444
|
-
if (forceRelease) {
|
|
58445
|
-
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos();
|
|
58446
|
-
const brushingChartInstance = getBrushingChartInstance();
|
|
58447
|
-
if (brushingChartInstanceCellPos && brushingChartInstance) {
|
|
58448
|
-
const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
58449
|
-
if (cellGroup?.firstChild?.deactivate) {
|
|
58450
|
-
clearBrushingChartInstance();
|
|
58451
|
-
cellGroup?.firstChild?.deactivate?.(this.table, {
|
|
58452
|
-
forceRelease: true,
|
|
58453
|
-
releaseChartInstance: true,
|
|
58454
|
-
releaseColumnChartInstance: true,
|
|
58455
|
-
releaseRowChartInstance: true,
|
|
58456
|
-
releaseAllChartInstance: true
|
|
58457
|
-
});
|
|
58458
|
-
}
|
|
58459
|
-
}
|
|
58460
|
-
}
|
|
58461
58410
|
return;
|
|
58462
58411
|
}
|
|
58463
58412
|
const cellGroup = this.getCell(col, row);
|
|
58464
58413
|
if (cellGroup?.firstChild?.deactivate) {
|
|
58465
|
-
if (forceRelease) {
|
|
58466
|
-
clearBrushingChartInstance();
|
|
58467
|
-
cellGroup?.firstChild?.deactivate?.(this.table, {
|
|
58468
|
-
forceRelease: true,
|
|
58469
|
-
releaseChartInstance: true,
|
|
58470
|
-
releaseColumnChartInstance: true,
|
|
58471
|
-
releaseRowChartInstance: true,
|
|
58472
|
-
releaseAllChartInstance: true
|
|
58473
|
-
});
|
|
58474
|
-
return;
|
|
58475
|
-
}
|
|
58476
58414
|
const chartNode = cellGroup?.firstChild;
|
|
58477
58415
|
const chartType = chartNode.attribute.spec.type;
|
|
58478
|
-
cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage
|
|
58416
|
+
cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage
|
|
58479
58417
|
? {
|
|
58480
|
-
releaseChartInstance: chartType === '
|
|
58481
|
-
?
|
|
58482
|
-
|
|
58483
|
-
? (col !== this.table.stateManager.hover.cellPos.col &&
|
|
58484
|
-
row !== this.table.stateManager.hover.cellPos.row) ||
|
|
58485
|
-
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58486
|
-
this.table.stateManager.hover.cellPos.row >
|
|
58487
|
-
this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
|
|
58488
|
-
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58489
|
-
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58490
|
-
: this.table.options.indicatorsAsCol
|
|
58491
|
-
? row !== this.table.stateManager.hover.cellPos.row ||
|
|
58492
|
-
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58493
|
-
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58494
|
-
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58495
|
-
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58496
|
-
this.table.stateManager.hover.cellPos.row >
|
|
58497
|
-
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58498
|
-
releaseColumnChartInstance: chartType === 'pie'
|
|
58499
|
-
? false
|
|
58500
|
-
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58418
|
+
releaseChartInstance: chartType === 'scatter'
|
|
58419
|
+
? (col !== this.table.stateManager.hover.cellPos.col &&
|
|
58420
|
+
row !== this.table.stateManager.hover.cellPos.row) ||
|
|
58501
58421
|
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58502
58422
|
this.table.stateManager.hover.cellPos.row >
|
|
58503
|
-
this.table.rowCount - 1 - this.table.bottomFrozenRowCount
|
|
58504
|
-
releaseRowChartInstance: chartType === 'pie'
|
|
58505
|
-
? false
|
|
58506
|
-
: row !== this.table.stateManager.hover.cellPos.row ||
|
|
58423
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
|
|
58507
58424
|
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58508
58425
|
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58426
|
+
: this.table.options.indicatorsAsCol
|
|
58427
|
+
? row !== this.table.stateManager.hover.cellPos.row ||
|
|
58428
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58429
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58430
|
+
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58431
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58432
|
+
this.table.stateManager.hover.cellPos.row >
|
|
58433
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58434
|
+
releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58435
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58436
|
+
this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58437
|
+
releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row ||
|
|
58438
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58439
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58509
58440
|
}
|
|
58510
58441
|
: undefined);
|
|
58511
58442
|
}
|
|
@@ -58562,17 +58493,8 @@
|
|
|
58562
58493
|
updateChartSizeForResizeRowHeight(row) {
|
|
58563
58494
|
updateChartSizeForResizeRowHeight(this, row);
|
|
58564
58495
|
}
|
|
58565
|
-
updateChartState(datum
|
|
58566
|
-
|
|
58567
|
-
if (datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) {
|
|
58568
|
-
const brushingChartInstance = getBrushingChartInstance();
|
|
58569
|
-
if (brushingChartInstance) {
|
|
58570
|
-
brushingChartInstance.getChart().getComponentsByKey('brush')[0].clearBrushStateAndMask();
|
|
58571
|
-
}
|
|
58572
|
-
this.table.options.chartDimensionLinkage?.clearChartState?.();
|
|
58573
|
-
}
|
|
58574
|
-
updateChartState(this, datum, selectedDataMode);
|
|
58575
|
-
}
|
|
58496
|
+
updateChartState(datum) {
|
|
58497
|
+
this.table.isPivotChart() && updateChartState(this, datum);
|
|
58576
58498
|
}
|
|
58577
58499
|
updateCheckboxCellState(col, row, checked) {
|
|
58578
58500
|
if (this.table.transpose) {
|
|
@@ -63859,8 +63781,7 @@
|
|
|
63859
63781
|
return;
|
|
63860
63782
|
}
|
|
63861
63783
|
if (table.isPivotChart() && eventArgsSet?.eventArgs?.target.type !== 'chart') {
|
|
63862
|
-
table.scenegraph.updateChartState(null
|
|
63863
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63784
|
+
table.scenegraph.updateChartState(null);
|
|
63864
63785
|
}
|
|
63865
63786
|
if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
63866
63787
|
stateManager.hideMenu();
|
|
@@ -63929,8 +63850,7 @@
|
|
|
63929
63850
|
else {
|
|
63930
63851
|
if (!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
63931
63852
|
(eventManager.checkColumnResize(eventArgsSet, true) || eventManager.checkRowResize(eventArgsSet, true))) {
|
|
63932
|
-
table.scenegraph.updateChartState(null
|
|
63933
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63853
|
+
table.scenegraph.updateChartState(null);
|
|
63934
63854
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
63935
63855
|
return;
|
|
63936
63856
|
}
|
|
@@ -64175,8 +64095,7 @@
|
|
|
64175
64095
|
!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
64176
64096
|
!stateManager.columnResize.resizing &&
|
|
64177
64097
|
eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
64178
|
-
table.scenegraph.updateChartState(null
|
|
64179
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64098
|
+
table.scenegraph.updateChartState(null);
|
|
64180
64099
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
64181
64100
|
const { eventArgs } = eventArgsSet;
|
|
64182
64101
|
if (!eventArgs?.targetCell) {
|
|
@@ -64223,8 +64142,7 @@
|
|
|
64223
64142
|
}
|
|
64224
64143
|
stateManager.endSelectCells(true, isHasSelected);
|
|
64225
64144
|
stateManager.updateCursor();
|
|
64226
|
-
table.scenegraph.updateChartState(null
|
|
64227
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64145
|
+
table.scenegraph.updateChartState(null);
|
|
64228
64146
|
}
|
|
64229
64147
|
else if (table.eventManager.isDraging && stateManager.isSelecting()) {
|
|
64230
64148
|
stateManager.endSelectCells();
|
|
@@ -64415,10 +64333,6 @@
|
|
|
64415
64333
|
const legend = e.path.find(node => node.name === 'legend');
|
|
64416
64334
|
if (!legend) {
|
|
64417
64335
|
table.editorManager?.completeEdit();
|
|
64418
|
-
const { cellPos } = table.stateManager.hover;
|
|
64419
|
-
const prevHoverCellCol = cellPos.col;
|
|
64420
|
-
const prevHoverCellRow = cellPos.row;
|
|
64421
|
-
table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, true);
|
|
64422
64336
|
if (table.eventManager._enableTableScroll) {
|
|
64423
64337
|
handleWhell(e, stateManager);
|
|
64424
64338
|
}
|
|
@@ -64612,9 +64526,6 @@
|
|
|
64612
64526
|
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
64613
64527
|
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
64614
64528
|
}
|
|
64615
|
-
scenegraph.table.stateManager.hideMenu();
|
|
64616
|
-
scenegraph.table.editorManager?.completeEdit();
|
|
64617
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64618
64529
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
64619
64530
|
throttleVerticalWheel(ratio, e);
|
|
64620
64531
|
});
|
|
@@ -64626,9 +64537,6 @@
|
|
|
64626
64537
|
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
64627
64538
|
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
64628
64539
|
}
|
|
64629
|
-
scenegraph.table.stateManager.hideMenu();
|
|
64630
|
-
scenegraph.table.editorManager?.completeEdit();
|
|
64631
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64632
64540
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
64633
64541
|
throttleHorizontalWheel(ratio);
|
|
64634
64542
|
});
|
|
@@ -64934,8 +64842,6 @@
|
|
|
64934
64842
|
stateManager.endSelectCells(true, isHasSelected);
|
|
64935
64843
|
}
|
|
64936
64844
|
});
|
|
64937
|
-
table.scenegraph.updateChartState(null, undefined);
|
|
64938
|
-
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64939
64845
|
}
|
|
64940
64846
|
};
|
|
64941
64847
|
eventManager.globalEventListeners.push({
|
|
@@ -65779,6 +65685,7 @@
|
|
|
65779
65685
|
cutOperationTime = 0;
|
|
65780
65686
|
lastClipboardContent = '';
|
|
65781
65687
|
cutCellRange = null;
|
|
65688
|
+
cutRanges = null;
|
|
65782
65689
|
copySourceRange = null;
|
|
65783
65690
|
constructor(table) {
|
|
65784
65691
|
this.table = table;
|
|
@@ -66298,6 +66205,10 @@
|
|
|
66298
66205
|
this.handleCopy(e, true);
|
|
66299
66206
|
this.cutWaitPaste = true;
|
|
66300
66207
|
this.cutCellRange = this.table.getSelectedCellInfos();
|
|
66208
|
+
this.cutRanges = this.table.stateManager.select.ranges?.map(r => ({
|
|
66209
|
+
start: { col: r.start.col, row: r.start.row },
|
|
66210
|
+
end: { col: r.end.col, row: r.end.row }
|
|
66211
|
+
}));
|
|
66301
66212
|
if (this.clipboardCheckTimer) {
|
|
66302
66213
|
clearTimeout(this.clipboardCheckTimer);
|
|
66303
66214
|
}
|
|
@@ -66305,6 +66216,7 @@
|
|
|
66305
66216
|
if (this.cutWaitPaste) {
|
|
66306
66217
|
this.cutWaitPaste = false;
|
|
66307
66218
|
this.cutCellRange = null;
|
|
66219
|
+
this.cutRanges = null;
|
|
66308
66220
|
this.clipboardCheckTimer = null;
|
|
66309
66221
|
}
|
|
66310
66222
|
}, 30000);
|
|
@@ -66324,6 +66236,7 @@
|
|
|
66324
66236
|
if (this.cutWaitPaste) {
|
|
66325
66237
|
this.cutWaitPaste = false;
|
|
66326
66238
|
this.cutCellRange = null;
|
|
66239
|
+
this.cutRanges = null;
|
|
66327
66240
|
if (this.clipboardCheckTimer) {
|
|
66328
66241
|
clearTimeout(this.clipboardCheckTimer);
|
|
66329
66242
|
this.clipboardCheckTimer = null;
|
|
@@ -66439,17 +66352,11 @@
|
|
|
66439
66352
|
}
|
|
66440
66353
|
clearCutArea(table) {
|
|
66441
66354
|
try {
|
|
66442
|
-
const
|
|
66443
|
-
if (!
|
|
66355
|
+
const ranges = this.cutRanges;
|
|
66356
|
+
if (!ranges || ranges.length === 0) {
|
|
66444
66357
|
return;
|
|
66445
66358
|
}
|
|
66446
|
-
|
|
66447
|
-
for (let j = 0; j < selectCells[i].length; j++) {
|
|
66448
|
-
if (selectCells[i][j]) {
|
|
66449
|
-
table.changeCellValue(selectCells[i][j].col, selectCells[i][j].row, undefined);
|
|
66450
|
-
}
|
|
66451
|
-
}
|
|
66452
|
-
}
|
|
66359
|
+
table.changeCellValuesByIds(ranges, '');
|
|
66453
66360
|
}
|
|
66454
66361
|
catch (error) {
|
|
66455
66362
|
}
|
|
@@ -69971,6 +69878,15 @@
|
|
|
69971
69878
|
this.customCellStyle = customCellStyle;
|
|
69972
69879
|
this.customCellStyleArrangement = customCellStyleArrangement;
|
|
69973
69880
|
}
|
|
69881
|
+
clearCustomCellStyleArrangement() {
|
|
69882
|
+
this.customCellStyleArrangement = [];
|
|
69883
|
+
}
|
|
69884
|
+
addCustomCellStyleArrangement(cellPosition, customStyleId) {
|
|
69885
|
+
this.customCellStyleArrangement.push({
|
|
69886
|
+
cellPosition,
|
|
69887
|
+
customStyleId
|
|
69888
|
+
});
|
|
69889
|
+
}
|
|
69974
69890
|
getCustomCellStyle(col, row) {
|
|
69975
69891
|
const customStyleIds = this.getCustomCellStyleIds(col, row);
|
|
69976
69892
|
if (customStyleIds.length) {
|
|
@@ -70499,7 +70415,7 @@
|
|
|
70499
70415
|
return TABLE_EVENT_TYPE;
|
|
70500
70416
|
}
|
|
70501
70417
|
options;
|
|
70502
|
-
version = "1.22.11-alpha.
|
|
70418
|
+
version = "1.22.11-alpha.9";
|
|
70503
70419
|
pagination;
|
|
70504
70420
|
id = `VTable${Date.now()}`;
|
|
70505
70421
|
headerStyleCache;
|
|
@@ -76537,9 +76453,10 @@
|
|
|
76537
76453
|
return { addRecordRule };
|
|
76538
76454
|
}
|
|
76539
76455
|
|
|
76540
|
-
function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
|
|
76456
|
+
function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
76541
76457
|
if ((workOnEditableCell && table.isHasEditorDefine(col, row)) || workOnEditableCell === false) {
|
|
76542
|
-
const
|
|
76458
|
+
const recordShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
76459
|
+
const recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : undefined;
|
|
76543
76460
|
const { field } = table.internalProps.layoutMap.getBody(col, row);
|
|
76544
76461
|
const beforeChangeValue = table.getCellRawValue(col, row);
|
|
76545
76462
|
const oldValue = table.getCellOriginValue(col, row);
|
|
@@ -76547,7 +76464,7 @@
|
|
|
76547
76464
|
table.internalProps.layoutMap.updateColumnTitle(col, row, value);
|
|
76548
76465
|
}
|
|
76549
76466
|
else {
|
|
76550
|
-
table.dataSource.changeFieldValue(value,
|
|
76467
|
+
table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
|
|
76551
76468
|
}
|
|
76552
76469
|
const range = table.getCellRange(col, row);
|
|
76553
76470
|
const aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
|
|
@@ -76600,18 +76517,24 @@
|
|
|
76600
76517
|
}
|
|
76601
76518
|
const changedValue = table.getCellOriginValue(col, row);
|
|
76602
76519
|
if (oldValue !== changedValue && triggerEvent) {
|
|
76603
|
-
|
|
76520
|
+
const changeValue = {
|
|
76604
76521
|
col,
|
|
76605
76522
|
row,
|
|
76523
|
+
recordIndex,
|
|
76524
|
+
field,
|
|
76606
76525
|
rawValue: beforeChangeValue,
|
|
76607
76526
|
currentValue: oldValue,
|
|
76608
76527
|
changedValue
|
|
76609
|
-
}
|
|
76528
|
+
};
|
|
76529
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue);
|
|
76530
|
+
if (!silentChangeCellValuesEvent) {
|
|
76531
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: [changeValue] });
|
|
76532
|
+
}
|
|
76610
76533
|
}
|
|
76611
76534
|
table.scenegraph.updateNextFrame();
|
|
76612
76535
|
}
|
|
76613
76536
|
}
|
|
76614
|
-
async function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
|
|
76537
|
+
async function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
76615
76538
|
const changedCellResults = [];
|
|
76616
76539
|
let pasteColEnd = startCol;
|
|
76617
76540
|
let pasteRowEnd = startRow;
|
|
@@ -76638,6 +76561,7 @@
|
|
|
76638
76561
|
oldRowValues.push(oldValue);
|
|
76639
76562
|
}
|
|
76640
76563
|
}
|
|
76564
|
+
const resultChangeValues = [];
|
|
76641
76565
|
for (let i = 0; i < values.length; i++) {
|
|
76642
76566
|
if (startRow + i > table.rowCount - 1) {
|
|
76643
76567
|
break;
|
|
@@ -76677,7 +76601,8 @@
|
|
|
76677
76601
|
if (isCanChange) {
|
|
76678
76602
|
changedCellResults[i][j] = true;
|
|
76679
76603
|
const value = rowValues[j];
|
|
76680
|
-
const
|
|
76604
|
+
const recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i);
|
|
76605
|
+
const recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : undefined;
|
|
76681
76606
|
const { field } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i);
|
|
76682
76607
|
const beforeChangeValue = beforeChangeValues[i][j];
|
|
76683
76608
|
const oldValue = oldValues[i][j];
|
|
@@ -76685,17 +76610,21 @@
|
|
|
76685
76610
|
table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value);
|
|
76686
76611
|
}
|
|
76687
76612
|
else {
|
|
76688
|
-
table.dataSource.changeFieldValue(value,
|
|
76613
|
+
table.dataSource.changeFieldValue(value, recordShowIndex, field, startCol + j, startRow + i, table);
|
|
76689
76614
|
}
|
|
76690
76615
|
const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
|
|
76691
76616
|
if (oldValue !== changedValue && triggerEvent) {
|
|
76692
|
-
|
|
76617
|
+
const changeValue = {
|
|
76693
76618
|
col: startCol + j,
|
|
76694
76619
|
row: startRow + i,
|
|
76620
|
+
recordIndex,
|
|
76621
|
+
field,
|
|
76695
76622
|
rawValue: beforeChangeValue,
|
|
76696
76623
|
currentValue: oldValue,
|
|
76697
76624
|
changedValue
|
|
76698
|
-
}
|
|
76625
|
+
};
|
|
76626
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue);
|
|
76627
|
+
resultChangeValues.push(changeValue);
|
|
76699
76628
|
}
|
|
76700
76629
|
}
|
|
76701
76630
|
else {
|
|
@@ -76704,6 +76633,9 @@
|
|
|
76704
76633
|
}
|
|
76705
76634
|
pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
|
|
76706
76635
|
}
|
|
76636
|
+
if (!silentChangeCellValuesEvent) {
|
|
76637
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: resultChangeValues });
|
|
76638
|
+
}
|
|
76707
76639
|
const startRange = table.getCellRange(startCol, startRow);
|
|
76708
76640
|
const range = table.getCellRange(pasteColEnd, pasteRowEnd);
|
|
76709
76641
|
const aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
|
|
@@ -76776,6 +76708,68 @@
|
|
|
76776
76708
|
table.scenegraph.updateNextFrame();
|
|
76777
76709
|
return changedCellResults;
|
|
76778
76710
|
}
|
|
76711
|
+
async function listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
|
|
76712
|
+
const resultChangeValues = [];
|
|
76713
|
+
const processed = new Set();
|
|
76714
|
+
const nextValue = (value ?? '');
|
|
76715
|
+
for (let i = 0; i < (ranges?.length ?? 0); i++) {
|
|
76716
|
+
const range = ranges[i];
|
|
76717
|
+
const startCol = Math.min(range.start.col, range.end.col);
|
|
76718
|
+
const endCol = Math.max(range.start.col, range.end.col);
|
|
76719
|
+
const startRow = Math.min(range.start.row, range.end.row);
|
|
76720
|
+
const endRow = Math.max(range.start.row, range.end.row);
|
|
76721
|
+
if (startCol > endCol || startRow > endRow) {
|
|
76722
|
+
continue;
|
|
76723
|
+
}
|
|
76724
|
+
const values = [];
|
|
76725
|
+
const oldValues = [];
|
|
76726
|
+
for (let row = startRow; row <= endRow; row++) {
|
|
76727
|
+
const rowValues = [];
|
|
76728
|
+
const rowOldValues = [];
|
|
76729
|
+
for (let col = startCol; col <= endCol; col++) {
|
|
76730
|
+
rowValues.push(nextValue);
|
|
76731
|
+
rowOldValues.push(table.getCellOriginValue(col, row));
|
|
76732
|
+
}
|
|
76733
|
+
values.push(rowValues);
|
|
76734
|
+
oldValues.push(rowOldValues);
|
|
76735
|
+
}
|
|
76736
|
+
const changedCellResults = await listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, true);
|
|
76737
|
+
for (let r = 0; r < values.length; r++) {
|
|
76738
|
+
for (let c = 0; c < values[r].length; c++) {
|
|
76739
|
+
const col = startCol + c;
|
|
76740
|
+
const row = startRow + r;
|
|
76741
|
+
const key = `${col},${row}`;
|
|
76742
|
+
if (processed.has(key)) {
|
|
76743
|
+
continue;
|
|
76744
|
+
}
|
|
76745
|
+
processed.add(key);
|
|
76746
|
+
if (!triggerEvent || !changedCellResults?.[r]?.[c]) {
|
|
76747
|
+
continue;
|
|
76748
|
+
}
|
|
76749
|
+
const oldValue = oldValues[r][c];
|
|
76750
|
+
const changedValue = table.getCellOriginValue(col, row);
|
|
76751
|
+
if (oldValue === changedValue) {
|
|
76752
|
+
continue;
|
|
76753
|
+
}
|
|
76754
|
+
const recordShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
76755
|
+
const recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : undefined;
|
|
76756
|
+
const { field } = table.internalProps.layoutMap.getBody(col, row);
|
|
76757
|
+
resultChangeValues.push({
|
|
76758
|
+
col,
|
|
76759
|
+
row,
|
|
76760
|
+
recordIndex,
|
|
76761
|
+
field,
|
|
76762
|
+
rawValue: oldValue,
|
|
76763
|
+
currentValue: oldValue,
|
|
76764
|
+
changedValue
|
|
76765
|
+
});
|
|
76766
|
+
}
|
|
76767
|
+
}
|
|
76768
|
+
}
|
|
76769
|
+
if (!silentChangeCellValuesEvent && triggerEvent) {
|
|
76770
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: resultChangeValues });
|
|
76771
|
+
}
|
|
76772
|
+
}
|
|
76779
76773
|
function getCellUpdateType(col, row, table, oldCellUpdateType) {
|
|
76780
76774
|
if (oldCellUpdateType === 'group') {
|
|
76781
76775
|
return oldCellUpdateType;
|
|
@@ -76829,7 +76823,13 @@
|
|
|
76829
76823
|
table.scenegraph.createSceneGraph();
|
|
76830
76824
|
}
|
|
76831
76825
|
else if (table.sortState) {
|
|
76832
|
-
table.
|
|
76826
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
76827
|
+
if (syncToOriginalRecords) {
|
|
76828
|
+
table.dataSource.addRecord(record, table.dataSource.records.length, true);
|
|
76829
|
+
}
|
|
76830
|
+
else {
|
|
76831
|
+
table.dataSource.addRecordForSorted(record);
|
|
76832
|
+
}
|
|
76833
76833
|
table.stateManager.checkedState.clear();
|
|
76834
76834
|
sortRecords(table);
|
|
76835
76835
|
table.refreshRowColCount();
|
|
@@ -76842,8 +76842,16 @@
|
|
|
76842
76842
|
recordIndex = table.dataSource.sourceLength;
|
|
76843
76843
|
}
|
|
76844
76844
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
76845
|
-
table.
|
|
76845
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
76846
|
+
table.dataSource.addRecord(record, recordIndex, syncToOriginalRecords);
|
|
76846
76847
|
adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
|
|
76848
|
+
if (syncToOriginalRecords) {
|
|
76849
|
+
table.refreshRowColCount();
|
|
76850
|
+
table.internalProps.layoutMap.clearCellRangeMap();
|
|
76851
|
+
table.scenegraph.clearCells();
|
|
76852
|
+
table.scenegraph.createSceneGraph();
|
|
76853
|
+
return true;
|
|
76854
|
+
}
|
|
76847
76855
|
const oldRowCount = table.rowCount;
|
|
76848
76856
|
table.refreshRowColCount();
|
|
76849
76857
|
if (table.scenegraph.proxy.totalActualBodyRowCount === 0) {
|
|
@@ -76955,7 +76963,13 @@
|
|
|
76955
76963
|
table.scenegraph.createSceneGraph();
|
|
76956
76964
|
}
|
|
76957
76965
|
else if (table.sortState) {
|
|
76958
|
-
table.
|
|
76966
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
76967
|
+
if (syncToOriginalRecords) {
|
|
76968
|
+
table.dataSource.addRecords(records, table.dataSource.records.length, true);
|
|
76969
|
+
}
|
|
76970
|
+
else {
|
|
76971
|
+
table.dataSource.addRecordsForSorted(records);
|
|
76972
|
+
}
|
|
76959
76973
|
sortRecords(table);
|
|
76960
76974
|
table.refreshRowColCount();
|
|
76961
76975
|
table.scenegraph.clearCells();
|
|
@@ -76970,8 +76984,16 @@
|
|
|
76970
76984
|
recordIndex = 0;
|
|
76971
76985
|
}
|
|
76972
76986
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
76973
|
-
table.
|
|
76987
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
76988
|
+
table.dataSource.addRecords(records, recordIndex, syncToOriginalRecords);
|
|
76974
76989
|
adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
|
|
76990
|
+
if (syncToOriginalRecords) {
|
|
76991
|
+
table.refreshRowColCount();
|
|
76992
|
+
table.internalProps.layoutMap.clearCellRangeMap();
|
|
76993
|
+
table.scenegraph.clearCells();
|
|
76994
|
+
table.scenegraph.createSceneGraph();
|
|
76995
|
+
return true;
|
|
76996
|
+
}
|
|
76975
76997
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
76976
76998
|
table.refreshRowColCount();
|
|
76977
76999
|
if (table.scenegraph.proxy.totalActualBodyRowCount === 0) {
|
|
@@ -77087,20 +77109,34 @@
|
|
|
77087
77109
|
table.scenegraph.createSceneGraph();
|
|
77088
77110
|
}
|
|
77089
77111
|
else if (table.sortState) {
|
|
77090
|
-
table.
|
|
77112
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
77113
|
+
if (syncToOriginalRecords) {
|
|
77114
|
+
table.dataSource.deleteRecords(recordIndexs, true);
|
|
77115
|
+
}
|
|
77116
|
+
else {
|
|
77117
|
+
table.dataSource.deleteRecordsForSorted(recordIndexs);
|
|
77118
|
+
}
|
|
77091
77119
|
sortRecords(table);
|
|
77092
77120
|
table.refreshRowColCount();
|
|
77093
77121
|
table.scenegraph.clearCells();
|
|
77094
77122
|
table.scenegraph.createSceneGraph();
|
|
77095
77123
|
}
|
|
77096
77124
|
else {
|
|
77097
|
-
const
|
|
77125
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
77126
|
+
const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs, syncToOriginalRecords);
|
|
77098
77127
|
if (deletedRecordIndexs.length === 0) {
|
|
77099
77128
|
return;
|
|
77100
77129
|
}
|
|
77101
77130
|
for (let index = 0; index < deletedRecordIndexs.length; index++) {
|
|
77102
77131
|
adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
|
|
77103
77132
|
}
|
|
77133
|
+
if (syncToOriginalRecords) {
|
|
77134
|
+
table.refreshRowColCount();
|
|
77135
|
+
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77136
|
+
table.scenegraph.clearCells();
|
|
77137
|
+
table.scenegraph.createSceneGraph();
|
|
77138
|
+
return;
|
|
77139
|
+
}
|
|
77104
77140
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
77105
77141
|
table.refreshRowColCount();
|
|
77106
77142
|
const newRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -77218,18 +77254,32 @@
|
|
|
77218
77254
|
table.scenegraph.createSceneGraph();
|
|
77219
77255
|
}
|
|
77220
77256
|
else if (table.sortState) {
|
|
77221
|
-
table.
|
|
77257
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
77258
|
+
if (syncToOriginalRecords) {
|
|
77259
|
+
table.dataSource.updateRecords(records, recordIndexs, true);
|
|
77260
|
+
}
|
|
77261
|
+
else {
|
|
77262
|
+
table.dataSource.updateRecordsForSorted(records, recordIndexs);
|
|
77263
|
+
}
|
|
77222
77264
|
sortRecords(table);
|
|
77223
77265
|
table.refreshRowColCount();
|
|
77224
77266
|
table.scenegraph.clearCells();
|
|
77225
77267
|
table.scenegraph.createSceneGraph();
|
|
77226
77268
|
}
|
|
77227
77269
|
else {
|
|
77228
|
-
const
|
|
77270
|
+
const syncToOriginalRecords = !!table.options?.syncRecordOperationsToSourceRecords;
|
|
77271
|
+
const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs, syncToOriginalRecords);
|
|
77229
77272
|
if (updateRecordIndexs.length === 0) {
|
|
77230
77273
|
return;
|
|
77231
77274
|
}
|
|
77232
|
-
|
|
77275
|
+
if (syncToOriginalRecords) {
|
|
77276
|
+
table.refreshRowColCount();
|
|
77277
|
+
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77278
|
+
table.scenegraph.clearCells();
|
|
77279
|
+
table.scenegraph.createSceneGraph();
|
|
77280
|
+
return;
|
|
77281
|
+
}
|
|
77282
|
+
const bodyRowIndex = updateRecordIndexs.map((index) => table.getBodyRowIndexByRecordIndex(index));
|
|
77233
77283
|
const recordIndexsMinToMax = bodyRowIndex.sort((a, b) => a - b);
|
|
77234
77284
|
if (table.pagination) {
|
|
77235
77285
|
const { perPageCount, currentPage } = table.pagination;
|
|
@@ -78406,6 +78456,7 @@
|
|
|
78406
78456
|
}
|
|
78407
78457
|
updateFilterRules(filterRules, options = { clearRowHeightCache: true }) {
|
|
78408
78458
|
this.scenegraph.clearCells();
|
|
78459
|
+
this.dataSource.clearForceVisibleRecords?.();
|
|
78409
78460
|
if (this.sortState) {
|
|
78410
78461
|
this.dataSource.updateFilterRulesForSorted(filterRules);
|
|
78411
78462
|
sortRecords(this);
|
|
@@ -78626,17 +78677,182 @@
|
|
|
78626
78677
|
}
|
|
78627
78678
|
return isValid$1(editorDefine);
|
|
78628
78679
|
}
|
|
78629
|
-
changeCellValue(col, row, value, workOnEditableCell = false, triggerEvent = true) {
|
|
78630
|
-
return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
|
|
78680
|
+
changeCellValue(col, row, value, workOnEditableCell = false, triggerEvent = true, silentChangeCellValuesEvent) {
|
|
78681
|
+
return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
78682
|
+
}
|
|
78683
|
+
changeCellValues(startCol, startRow, values, workOnEditableCell = false, triggerEvent = true, silentChangeCellValuesEvent) {
|
|
78684
|
+
return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
78685
|
+
}
|
|
78686
|
+
changeCellValuesByIds(ranges, value, workOnEditableCell = false, triggerEvent = true, silentChangeCellValuesEvent) {
|
|
78687
|
+
return listTableChangeCellValuesByIds(ranges, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
|
|
78688
|
+
}
|
|
78689
|
+
changeSourceCellValue(recordIndex, field, value) {
|
|
78690
|
+
const tableIndex = this.getTableIndexByRecordIndex(recordIndex);
|
|
78691
|
+
const cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
|
|
78692
|
+
if (tableIndex < 0 || cellAddr.col < 0 || cellAddr.row < 0) {
|
|
78693
|
+
return;
|
|
78694
|
+
}
|
|
78695
|
+
this.dataSource.changeFieldValue(value, tableIndex, field, cellAddr.col, cellAddr.row, this);
|
|
78696
|
+
const beforeChangeValue = this.getCellRawValue(cellAddr.col, cellAddr.row);
|
|
78697
|
+
const oldValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
|
|
78698
|
+
const changedValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
|
|
78699
|
+
if (oldValue !== changedValue) {
|
|
78700
|
+
const changeValue = {
|
|
78701
|
+
col: cellAddr.col,
|
|
78702
|
+
row: cellAddr.row,
|
|
78703
|
+
recordIndex,
|
|
78704
|
+
field,
|
|
78705
|
+
rawValue: beforeChangeValue,
|
|
78706
|
+
currentValue: oldValue,
|
|
78707
|
+
changedValue
|
|
78708
|
+
};
|
|
78709
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue);
|
|
78710
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: [changeValue] });
|
|
78711
|
+
}
|
|
78712
|
+
}
|
|
78713
|
+
changeCellValueByRecord(recordIndex, field, value, options) {
|
|
78714
|
+
const triggerEvent = options?.triggerEvent ?? true;
|
|
78715
|
+
const silentChangeCellValuesEvent = options?.silentChangeCellValuesEvent;
|
|
78716
|
+
const autoRefresh = options?.autoRefresh ?? true;
|
|
78717
|
+
const records = this.dataSource.dataSourceObj?.records;
|
|
78718
|
+
let record;
|
|
78719
|
+
let oldValue;
|
|
78720
|
+
if (Array.isArray(records) && (typeof field === 'string' || typeof field === 'number')) {
|
|
78721
|
+
record = Array.isArray(recordIndex) ? getValueFromDeepArray(records, recordIndex) : records[recordIndex];
|
|
78722
|
+
oldValue = record?.[field];
|
|
78723
|
+
}
|
|
78724
|
+
this.dataSource.changeFieldValueByRecordIndex(value, recordIndex, field, this);
|
|
78725
|
+
if (!triggerEvent) {
|
|
78726
|
+
return;
|
|
78727
|
+
}
|
|
78728
|
+
const changedValue = record && (typeof field === 'string' || typeof field === 'number') ? record?.[field] : value;
|
|
78729
|
+
if (oldValue !== changedValue) {
|
|
78730
|
+
const cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
|
|
78731
|
+
const changeValue = {
|
|
78732
|
+
col: cellAddr?.col ?? -1,
|
|
78733
|
+
row: cellAddr?.row ?? -1,
|
|
78734
|
+
recordIndex,
|
|
78735
|
+
field,
|
|
78736
|
+
rawValue: oldValue,
|
|
78737
|
+
currentValue: oldValue,
|
|
78738
|
+
changedValue
|
|
78739
|
+
};
|
|
78740
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue);
|
|
78741
|
+
if (!silentChangeCellValuesEvent) {
|
|
78742
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: [changeValue] });
|
|
78743
|
+
}
|
|
78744
|
+
}
|
|
78745
|
+
if (autoRefresh) {
|
|
78746
|
+
this.refreshAfterSourceChange();
|
|
78747
|
+
}
|
|
78748
|
+
}
|
|
78749
|
+
changeCellValueBySource(recordIndex, field, value, triggerEvent = true, silentChangeCellValuesEvent) {
|
|
78750
|
+
return this.changeCellValueByRecord(recordIndex, field, value, {
|
|
78751
|
+
triggerEvent,
|
|
78752
|
+
silentChangeCellValuesEvent,
|
|
78753
|
+
autoRefresh: true
|
|
78754
|
+
});
|
|
78755
|
+
}
|
|
78756
|
+
changeCellValuesByRecords(changeValues, options) {
|
|
78757
|
+
const triggerEvent = options?.triggerEvent ?? true;
|
|
78758
|
+
const silentChangeCellValuesEvent = options?.silentChangeCellValuesEvent;
|
|
78759
|
+
const autoRefresh = options?.autoRefresh ?? true;
|
|
78760
|
+
const resultChangeValues = [];
|
|
78761
|
+
for (let i = 0; i < changeValues.length; i++) {
|
|
78762
|
+
const { recordIndex, field, value } = changeValues[i];
|
|
78763
|
+
const records = this.dataSource.dataSourceObj?.records;
|
|
78764
|
+
let record;
|
|
78765
|
+
let oldValue;
|
|
78766
|
+
if (Array.isArray(records) && (typeof field === 'string' || typeof field === 'number')) {
|
|
78767
|
+
record = Array.isArray(recordIndex) ? getValueFromDeepArray(records, recordIndex) : records[recordIndex];
|
|
78768
|
+
oldValue = record?.[field];
|
|
78769
|
+
}
|
|
78770
|
+
this.dataSource.changeFieldValueByRecordIndex(value, recordIndex, field, this);
|
|
78771
|
+
if (triggerEvent) {
|
|
78772
|
+
const changedValue = record && (typeof field === 'string' || typeof field === 'number') ? record?.[field] : value;
|
|
78773
|
+
if (oldValue !== changedValue) {
|
|
78774
|
+
const changeValue = {
|
|
78775
|
+
col: (this.getCellAddrByFieldRecord(field, recordIndex)?.col ?? -1),
|
|
78776
|
+
row: (this.getCellAddrByFieldRecord(field, recordIndex)?.row ?? -1),
|
|
78777
|
+
recordIndex,
|
|
78778
|
+
field,
|
|
78779
|
+
rawValue: oldValue,
|
|
78780
|
+
currentValue: oldValue,
|
|
78781
|
+
changedValue
|
|
78782
|
+
};
|
|
78783
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue);
|
|
78784
|
+
resultChangeValues.push(changeValue);
|
|
78785
|
+
}
|
|
78786
|
+
}
|
|
78787
|
+
}
|
|
78788
|
+
if (!silentChangeCellValuesEvent && resultChangeValues.length && triggerEvent) {
|
|
78789
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, { values: resultChangeValues });
|
|
78790
|
+
}
|
|
78791
|
+
if (autoRefresh) {
|
|
78792
|
+
this.refreshAfterSourceChange();
|
|
78793
|
+
}
|
|
78794
|
+
}
|
|
78795
|
+
changeCellValuesBySource(changeValues, triggerEvent = true, silentChangeCellValuesEvent) {
|
|
78796
|
+
return this.changeCellValuesByRecords(changeValues, {
|
|
78797
|
+
triggerEvent,
|
|
78798
|
+
silentChangeCellValuesEvent,
|
|
78799
|
+
autoRefresh: true
|
|
78800
|
+
});
|
|
78631
78801
|
}
|
|
78632
|
-
|
|
78633
|
-
|
|
78802
|
+
refreshAfterSourceChange(options) {
|
|
78803
|
+
const reapplyFilter = options?.reapplyFilter ?? true;
|
|
78804
|
+
const reapplySort = options?.reapplySort ?? true;
|
|
78805
|
+
const clearRowHeightCache = options?.clearRowHeightCache ?? true;
|
|
78806
|
+
this.scenegraph.clearCells();
|
|
78807
|
+
if (this.sortState && reapplySort) {
|
|
78808
|
+
this.dataSource.clearSortedIndexMap?.();
|
|
78809
|
+
this.dataSource.sortedIndexMap?.clear?.();
|
|
78810
|
+
}
|
|
78811
|
+
if (reapplyFilter) {
|
|
78812
|
+
if (this.sortState && reapplySort) {
|
|
78813
|
+
this.dataSource.updateFilterRulesForSorted(this.dataSource.dataConfig?.filterRules);
|
|
78814
|
+
sortRecords(this);
|
|
78815
|
+
}
|
|
78816
|
+
else {
|
|
78817
|
+
this.dataSource.updateFilterRules(this.dataSource.dataConfig?.filterRules);
|
|
78818
|
+
}
|
|
78819
|
+
}
|
|
78820
|
+
else if (this.sortState && reapplySort) {
|
|
78821
|
+
sortRecords(this);
|
|
78822
|
+
}
|
|
78823
|
+
const traverseColumns = (columns) => {
|
|
78824
|
+
for (let i = 0; i < (columns?.length ?? 0); i++) {
|
|
78825
|
+
const column = columns[i];
|
|
78826
|
+
const aggregators = column?.vtable_aggregator;
|
|
78827
|
+
if (aggregators) {
|
|
78828
|
+
if (Array.isArray(aggregators)) {
|
|
78829
|
+
for (let j = 0; j < aggregators.length; j++) {
|
|
78830
|
+
aggregators[j]?.recalculate?.();
|
|
78831
|
+
}
|
|
78832
|
+
}
|
|
78833
|
+
else {
|
|
78834
|
+
aggregators?.recalculate?.();
|
|
78835
|
+
}
|
|
78836
|
+
}
|
|
78837
|
+
if (column?.columns) {
|
|
78838
|
+
traverseColumns(column.columns);
|
|
78839
|
+
}
|
|
78840
|
+
}
|
|
78841
|
+
};
|
|
78842
|
+
traverseColumns(this.internalProps.columns);
|
|
78843
|
+
this.refreshRowColCount();
|
|
78844
|
+
this.internalProps.layoutMap.clearCellRangeMap();
|
|
78845
|
+
this.internalProps.useOneRowHeightFillAll = false;
|
|
78846
|
+
this.stateManager.initCheckedState(this.records);
|
|
78847
|
+
this.scenegraph.createSceneGraph(!clearRowHeightCache);
|
|
78848
|
+
this.internalProps.emptyTip?.resetVisible();
|
|
78849
|
+
this.resize();
|
|
78634
78850
|
}
|
|
78635
|
-
addRecord(record, recordIndex) {
|
|
78851
|
+
addRecord(record, recordIndex, triggerEvent = true) {
|
|
78636
78852
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
78637
78853
|
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]);
|
|
78638
78854
|
this.internalProps.emptyTip?.resetVisible();
|
|
78639
|
-
if (success) {
|
|
78855
|
+
if (triggerEvent && success) {
|
|
78640
78856
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
78641
78857
|
records: [record],
|
|
78642
78858
|
recordIndex,
|
|
@@ -78644,13 +78860,13 @@
|
|
|
78644
78860
|
});
|
|
78645
78861
|
}
|
|
78646
78862
|
}
|
|
78647
|
-
addRecords(records, recordIndex) {
|
|
78863
|
+
addRecords(records, recordIndex, triggerEvent = true) {
|
|
78648
78864
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
78649
78865
|
if (typeof recordIndex === 'number') {
|
|
78650
78866
|
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records);
|
|
78651
78867
|
}
|
|
78652
78868
|
this.internalProps.emptyTip?.resetVisible();
|
|
78653
|
-
if (success) {
|
|
78869
|
+
if (triggerEvent && success) {
|
|
78654
78870
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
78655
78871
|
records,
|
|
78656
78872
|
recordIndex,
|
|
@@ -78658,7 +78874,20 @@
|
|
|
78658
78874
|
});
|
|
78659
78875
|
}
|
|
78660
78876
|
}
|
|
78661
|
-
deleteRecords(recordIndexs) {
|
|
78877
|
+
deleteRecords(recordIndexs, triggerEvent = true) {
|
|
78878
|
+
const deletedRecords = [];
|
|
78879
|
+
if (recordIndexs?.length > 0) {
|
|
78880
|
+
recordIndexs.forEach(index => {
|
|
78881
|
+
let record = null;
|
|
78882
|
+
if (typeof index === 'number') {
|
|
78883
|
+
record = this.dataSource.get(index);
|
|
78884
|
+
}
|
|
78885
|
+
else {
|
|
78886
|
+
record = [];
|
|
78887
|
+
}
|
|
78888
|
+
deletedRecords.push(record);
|
|
78889
|
+
});
|
|
78890
|
+
}
|
|
78662
78891
|
listTableDeleteRecords(recordIndexs, this);
|
|
78663
78892
|
adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs);
|
|
78664
78893
|
this.internalProps.emptyTip?.resetVisible();
|
|
@@ -78666,21 +78895,26 @@
|
|
|
78666
78895
|
for (let i = 0; i < recordIndexs.length; i++) {
|
|
78667
78896
|
rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
|
|
78668
78897
|
}
|
|
78669
|
-
|
|
78670
|
-
|
|
78671
|
-
|
|
78672
|
-
|
|
78673
|
-
|
|
78674
|
-
: recordIndexs
|
|
78675
|
-
|
|
78898
|
+
if (triggerEvent) {
|
|
78899
|
+
this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
|
|
78900
|
+
recordIndexs,
|
|
78901
|
+
records: deletedRecords,
|
|
78902
|
+
rowIndexs,
|
|
78903
|
+
deletedCount: Array.isArray(recordIndexs[0])
|
|
78904
|
+
? recordIndexs.length
|
|
78905
|
+
: recordIndexs.length
|
|
78906
|
+
});
|
|
78907
|
+
}
|
|
78676
78908
|
}
|
|
78677
|
-
updateRecords(records, recordIndexs) {
|
|
78909
|
+
updateRecords(records, recordIndexs, triggerEvent = true) {
|
|
78678
78910
|
listTableUpdateRecords(records, recordIndexs, this);
|
|
78679
|
-
|
|
78680
|
-
|
|
78681
|
-
|
|
78682
|
-
|
|
78683
|
-
|
|
78911
|
+
if (triggerEvent) {
|
|
78912
|
+
this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
|
|
78913
|
+
records,
|
|
78914
|
+
recordIndexs,
|
|
78915
|
+
updateCount: records.length
|
|
78916
|
+
});
|
|
78917
|
+
}
|
|
78684
78918
|
}
|
|
78685
78919
|
_hasCustomRenderOrLayout() {
|
|
78686
78920
|
const { headerObjects } = this.internalProps.layoutMap;
|
|
@@ -87577,93 +87811,53 @@
|
|
|
87577
87811
|
return null;
|
|
87578
87812
|
}
|
|
87579
87813
|
_generateChartState() {
|
|
87580
|
-
const select_filter = (datum) => {
|
|
87581
|
-
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87582
|
-
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87583
|
-
for (const itemKey in item) {
|
|
87584
|
-
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87585
|
-
return false;
|
|
87586
|
-
}
|
|
87587
|
-
}
|
|
87588
|
-
return true;
|
|
87589
|
-
});
|
|
87590
|
-
return !!match;
|
|
87591
|
-
}
|
|
87592
|
-
else if (this._table._selectedDimensionInChart?.length) {
|
|
87593
|
-
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87594
|
-
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87595
|
-
return false;
|
|
87596
|
-
}
|
|
87597
|
-
return true;
|
|
87598
|
-
});
|
|
87599
|
-
return !!match;
|
|
87600
|
-
}
|
|
87601
|
-
return false;
|
|
87602
|
-
};
|
|
87603
|
-
const selected_reverse = (datum) => {
|
|
87604
|
-
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87605
|
-
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87606
|
-
for (const itemKey in item) {
|
|
87607
|
-
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87608
|
-
return false;
|
|
87609
|
-
}
|
|
87610
|
-
}
|
|
87611
|
-
return true;
|
|
87612
|
-
});
|
|
87613
|
-
return !match;
|
|
87614
|
-
}
|
|
87615
|
-
else if (this._table._selectedDimensionInChart?.length) {
|
|
87616
|
-
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87617
|
-
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87618
|
-
return false;
|
|
87619
|
-
}
|
|
87620
|
-
return true;
|
|
87621
|
-
});
|
|
87622
|
-
return !match;
|
|
87623
|
-
}
|
|
87624
|
-
return false;
|
|
87625
|
-
};
|
|
87626
87814
|
const state = {
|
|
87627
87815
|
vtable_selected: {
|
|
87628
87816
|
filter: (datum) => {
|
|
87629
|
-
if (this._table.
|
|
87630
|
-
|
|
87817
|
+
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87818
|
+
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87819
|
+
for (const itemKey in item) {
|
|
87820
|
+
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87821
|
+
return false;
|
|
87822
|
+
}
|
|
87823
|
+
}
|
|
87824
|
+
return true;
|
|
87825
|
+
});
|
|
87826
|
+
return !!match;
|
|
87631
87827
|
}
|
|
87632
|
-
if (this._table.
|
|
87633
|
-
|
|
87828
|
+
else if (this._table._selectedDimensionInChart?.length) {
|
|
87829
|
+
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87830
|
+
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87831
|
+
return false;
|
|
87832
|
+
}
|
|
87833
|
+
return true;
|
|
87834
|
+
});
|
|
87835
|
+
return !!match;
|
|
87634
87836
|
}
|
|
87635
87837
|
return false;
|
|
87636
87838
|
}
|
|
87637
87839
|
},
|
|
87638
87840
|
vtable_selected_reverse: {
|
|
87639
87841
|
filter: (datum) => {
|
|
87640
|
-
if (this._table.
|
|
87641
|
-
|
|
87642
|
-
|
|
87643
|
-
|
|
87644
|
-
|
|
87645
|
-
|
|
87646
|
-
|
|
87647
|
-
|
|
87648
|
-
|
|
87649
|
-
|
|
87650
|
-
filter: (datum) => {
|
|
87651
|
-
if (this._table.options.chartDimensionLinkage?.inBrushStateFilter) {
|
|
87652
|
-
return this._table.options.chartDimensionLinkage.inBrushStateFilter(datum);
|
|
87653
|
-
}
|
|
87654
|
-
if (this._table._selectedDataMode === 'brush') {
|
|
87655
|
-
return select_filter(datum);
|
|
87656
|
-
}
|
|
87657
|
-
return false;
|
|
87658
|
-
}
|
|
87659
|
-
},
|
|
87660
|
-
outOfBrush: {
|
|
87661
|
-
filter: (datum) => {
|
|
87662
|
-
if (this._table.options.chartDimensionLinkage?.outOfBrushStateFilter) {
|
|
87663
|
-
return this._table.options.chartDimensionLinkage.outOfBrushStateFilter(datum);
|
|
87842
|
+
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87843
|
+
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87844
|
+
for (const itemKey in item) {
|
|
87845
|
+
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87846
|
+
return false;
|
|
87847
|
+
}
|
|
87848
|
+
}
|
|
87849
|
+
return true;
|
|
87850
|
+
});
|
|
87851
|
+
return !match;
|
|
87664
87852
|
}
|
|
87665
|
-
if (this._table.
|
|
87666
|
-
|
|
87853
|
+
else if (this._table._selectedDimensionInChart?.length) {
|
|
87854
|
+
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87855
|
+
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87856
|
+
return false;
|
|
87857
|
+
}
|
|
87858
|
+
return true;
|
|
87859
|
+
});
|
|
87860
|
+
return !match;
|
|
87667
87861
|
}
|
|
87668
87862
|
return false;
|
|
87669
87863
|
}
|
|
@@ -91935,7 +92129,6 @@
|
|
|
91935
92129
|
pivotSortState;
|
|
91936
92130
|
dataset;
|
|
91937
92131
|
_selectedDataItemsInChart = [];
|
|
91938
|
-
_selectedDataMode = 'click';
|
|
91939
92132
|
_selectedDimensionInChart = [];
|
|
91940
92133
|
_chartEventMap = {};
|
|
91941
92134
|
_axes;
|
|
@@ -93125,12 +93318,6 @@
|
|
|
93125
93318
|
const headerNodes = layoutMap.getCellHeaderPathsWithTreeNode(col, row);
|
|
93126
93319
|
return headerNodes;
|
|
93127
93320
|
}
|
|
93128
|
-
disableTooltipToAllChartInstances() {
|
|
93129
|
-
disableTooltipToAllChartInstances();
|
|
93130
|
-
}
|
|
93131
|
-
enableTooltipToAllChartInstances() {
|
|
93132
|
-
enableTooltipToAllChartInstances();
|
|
93133
|
-
}
|
|
93134
93321
|
}
|
|
93135
93322
|
|
|
93136
93323
|
class Circle extends Circle$1 {
|
|
@@ -93692,7 +93879,7 @@
|
|
|
93692
93879
|
}
|
|
93693
93880
|
|
|
93694
93881
|
registerForVrender();
|
|
93695
|
-
const version = "1.22.11-alpha.
|
|
93882
|
+
const version = "1.22.11-alpha.9";
|
|
93696
93883
|
function getIcons() {
|
|
93697
93884
|
return get$2();
|
|
93698
93885
|
}
|