@visactor/vtable 1.20.1-alpha.1 → 1.20.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +3 -2
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +4 -0
- package/cjs/PivotChart.js +30 -18
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +2 -1
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -4
- package/cjs/core/BaseTable.js +16 -16
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js +12 -4
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -0
- package/cjs/data/DataSource.js +6 -9
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.js +17 -8
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +20 -17
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/self-event-listener/list-table/checkbox.js +4 -2
- package/cjs/event/self-event-listener/list-table/checkbox.js.map +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/chart-helper/get-axis-config.js +73 -28
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +19 -9
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +3 -3
- package/cjs/layout/pivot-header-layout.js +23 -12
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +1 -0
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +4 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +4 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/vchart-graphic-picker.js +9 -0
- package/cjs/scenegraph/graphic/contributions/vchart-graphic-picker.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +3 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +13 -6
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/select/update-position.d.ts +1 -1
- package/cjs/state/select/update-position.js +7 -7
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +2 -1
- package/cjs/state/state.js +5 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +349 -114
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +3 -2
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +4 -0
- package/es/PivotChart.js +30 -18
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +2 -1
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -4
- package/es/core/BaseTable.js +16 -16
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js +12 -4
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -0
- package/es/data/DataSource.js +6 -9
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.js +17 -8
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +20 -17
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/self-event-listener/list-table/checkbox.js +4 -2
- package/es/event/self-event-listener/list-table/checkbox.js.map +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/chart-helper/get-axis-config.js +73 -28
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +19 -9
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +3 -3
- package/es/layout/pivot-header-layout.js +23 -12
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +1 -0
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +4 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +4 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/vchart-graphic-picker.js +9 -0
- package/es/scenegraph/graphic/contributions/vchart-graphic-picker.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +3 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +13 -6
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/select/update-position.d.ts +1 -1
- package/es/state/select/update-position.js +7 -7
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.d.ts +2 -1
- package/es/state/state.js +5 -4
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -0
- 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
|
@@ -39423,22 +39423,23 @@
|
|
|
39423
39423
|
}
|
|
39424
39424
|
}
|
|
39425
39425
|
else {
|
|
39426
|
-
|
|
39427
|
-
targetI = this.currentPagerIndexedData[targetIndex];
|
|
39428
|
-
const records = this.records.splice(sourceI, 1);
|
|
39429
|
-
records.unshift(targetI, 0);
|
|
39430
|
-
Array.prototype.splice.apply(this.records, records);
|
|
39426
|
+
this.exchangeRecordData(sourceIndex, targetIndex);
|
|
39431
39427
|
}
|
|
39432
39428
|
this.restoreTreeHierarchyState();
|
|
39433
39429
|
this.updatePagerData();
|
|
39434
39430
|
}
|
|
39435
39431
|
else {
|
|
39436
|
-
|
|
39437
|
-
records.unshift(targetIndex, 0);
|
|
39438
|
-
Array.prototype.splice.apply(this.records, records);
|
|
39432
|
+
this.exchangeRecordData(sourceIndex, targetIndex);
|
|
39439
39433
|
}
|
|
39440
39434
|
}
|
|
39441
39435
|
}
|
|
39436
|
+
exchangeRecordData(sourceIndex, targetIndex) {
|
|
39437
|
+
const sourceI = this.getRecordIndexPaths(sourceIndex);
|
|
39438
|
+
const targetI = this.getRecordIndexPaths(targetIndex);
|
|
39439
|
+
const records = this.records.splice(sourceI, 1);
|
|
39440
|
+
records.unshift(targetI, 0);
|
|
39441
|
+
Array.prototype.splice.apply(this.records, records);
|
|
39442
|
+
}
|
|
39442
39443
|
restoreTreeHierarchyState() {
|
|
39443
39444
|
if (this.hierarchyExpandLevel) {
|
|
39444
39445
|
for (let i = 0; i < this._sourceLength; i++) {
|
|
@@ -46073,8 +46074,17 @@
|
|
|
46073
46074
|
if (table.isPivotChart() &&
|
|
46074
46075
|
row >= table.columnHeaderLevelCount &&
|
|
46075
46076
|
row < table.rowCount - table.bottomFrozenRowCount) {
|
|
46076
|
-
|
|
46077
|
-
|
|
46077
|
+
let ifNeedComputeRowHeight = table.internalProps.layoutMap.indicatorsAsCol;
|
|
46078
|
+
let isHeatmap = false;
|
|
46079
|
+
if (!table.internalProps.layoutMap.indicatorsAsCol) {
|
|
46080
|
+
const chartSpec = table.internalProps.layoutMap.getChartSpec(table.rowHeaderLevelCount, row);
|
|
46081
|
+
if (chartSpec.type === 'heatmap') {
|
|
46082
|
+
isHeatmap = true;
|
|
46083
|
+
ifNeedComputeRowHeight = true;
|
|
46084
|
+
}
|
|
46085
|
+
}
|
|
46086
|
+
if (ifNeedComputeRowHeight) {
|
|
46087
|
+
const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row, isHeatmap);
|
|
46078
46088
|
if (optimunHeight > 0) {
|
|
46079
46089
|
return optimunHeight;
|
|
46080
46090
|
}
|
|
@@ -49017,7 +49027,7 @@
|
|
|
49017
49027
|
const formatResult = table.options.specFormat(chart.attribute.spec, chartInstance, chart);
|
|
49018
49028
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
49019
49029
|
const spec = formatResult.spec;
|
|
49020
|
-
chartInstance.updateSpecSync(spec);
|
|
49030
|
+
chartInstance.updateSpecSync(spec, false, { reuse: false, morph: false });
|
|
49021
49031
|
updateSpec = formatResult.updateSpec ?? true;
|
|
49022
49032
|
}
|
|
49023
49033
|
}
|
|
@@ -49198,7 +49208,7 @@
|
|
|
49198
49208
|
const formatResult = table.options.specFormat(chart.attribute.spec, activeChartInstance, chart);
|
|
49199
49209
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
49200
49210
|
const spec = formatResult.spec;
|
|
49201
|
-
activeChartInstance.updateSpecSync(spec);
|
|
49211
|
+
activeChartInstance.updateSpecSync(spec, false, { reuse: false, morph: false });
|
|
49202
49212
|
}
|
|
49203
49213
|
}
|
|
49204
49214
|
const viewBox = chart.getViewBox();
|
|
@@ -50545,6 +50555,19 @@
|
|
|
50545
50555
|
type = 'chart';
|
|
50546
50556
|
numberType = CHART_NUMBER_TYPE;
|
|
50547
50557
|
contains(chart, point, params) {
|
|
50558
|
+
if (chart.attribute.detectPickChartItem) {
|
|
50559
|
+
const vChart = chart.activeChartInstance;
|
|
50560
|
+
if (!vChart) {
|
|
50561
|
+
return false;
|
|
50562
|
+
}
|
|
50563
|
+
const vchartStage = vChart.getStage();
|
|
50564
|
+
vchartStage.dirtyBounds?.clear();
|
|
50565
|
+
const pick = vchartStage.pick(point.x, point.y);
|
|
50566
|
+
if (pick.graphic === null && pick.group.name === 'root') {
|
|
50567
|
+
return false;
|
|
50568
|
+
}
|
|
50569
|
+
return pick;
|
|
50570
|
+
}
|
|
50548
50571
|
if (!chart.AABBBounds.containsPoint(point)) {
|
|
50549
50572
|
return false;
|
|
50550
50573
|
}
|
|
@@ -50747,7 +50770,12 @@
|
|
|
50747
50770
|
}
|
|
50748
50771
|
if (table.isPivotChart() && col >= table.rowHeaderLevelCount && col < table.colCount - table.rightFrozenColCount) {
|
|
50749
50772
|
if (!table.internalProps.layoutMap.indicatorsAsCol) {
|
|
50750
|
-
const
|
|
50773
|
+
const chartSpec = table.internalProps.layoutMap.getChartSpec(col, table.columnHeaderLevelCount);
|
|
50774
|
+
let isHeatmap = false;
|
|
50775
|
+
if (chartSpec.type === 'heatmap') {
|
|
50776
|
+
isHeatmap = true;
|
|
50777
|
+
}
|
|
50778
|
+
const optimunWidth = table.internalProps.layoutMap.getOptimunWidthForChart(col, isHeatmap);
|
|
50751
50779
|
if (optimunWidth > 0) {
|
|
50752
50780
|
return optimunWidth;
|
|
50753
50781
|
}
|
|
@@ -58033,10 +58061,10 @@
|
|
|
58033
58061
|
return table._getLayoutCellId(col, row) === table._getLayoutCellId(range1Col, range1Row);
|
|
58034
58062
|
}
|
|
58035
58063
|
|
|
58036
|
-
function updateSelectPosition(state, col, row,
|
|
58064
|
+
function updateSelectPosition(state, col, row, enableShiftSelectMode, enableCtrlSelectMode, isSelectAll, makeSelectCellVisible = true, skipBodyMerge = false) {
|
|
58037
58065
|
const { table, interactionState } = state;
|
|
58038
58066
|
const { scenegraph } = table;
|
|
58039
|
-
const {
|
|
58067
|
+
const { cellPos } = state.select;
|
|
58040
58068
|
state.select.isSelectAll = isSelectAll;
|
|
58041
58069
|
if (col !== -1 && row !== -1 && makeSelectCellVisible) {
|
|
58042
58070
|
table._makeVisibleCell(col, row);
|
|
@@ -58092,11 +58120,7 @@
|
|
|
58092
58120
|
!table.eventManager.isDraging &&
|
|
58093
58121
|
!table.stateManager.isResizeCol()) {
|
|
58094
58122
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
58095
|
-
if (
|
|
58096
|
-
if (!isCtrl || disableCtrlMultiSelect) {
|
|
58097
|
-
cellPos.col = col;
|
|
58098
|
-
cellPos.row = row;
|
|
58099
|
-
}
|
|
58123
|
+
if (enableShiftSelectMode && currentRange) {
|
|
58100
58124
|
if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {
|
|
58101
58125
|
const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);
|
|
58102
58126
|
const endCol = Math.max(currentRange.start.col, currentRange.end.col, col);
|
|
@@ -58142,12 +58166,15 @@
|
|
|
58142
58166
|
else {
|
|
58143
58167
|
currentRange.end = { col, row };
|
|
58144
58168
|
}
|
|
58169
|
+
if (!enableShiftSelectMode) {
|
|
58170
|
+
currentRange.end = currentRange.start;
|
|
58171
|
+
}
|
|
58145
58172
|
scenegraph.deleteLastSelectedRangeComponents();
|
|
58146
58173
|
scenegraph.updateCellSelectBorder(currentRange);
|
|
58147
58174
|
}
|
|
58148
58175
|
else {
|
|
58149
58176
|
let extendSelectRange = true;
|
|
58150
|
-
if (cellPos.col !== -1 && cellPos.row !== -1 &&
|
|
58177
|
+
if (cellPos.col !== -1 && cellPos.row !== -1 && !enableCtrlSelectMode) {
|
|
58151
58178
|
state.select.ranges = [];
|
|
58152
58179
|
scenegraph.deleteAllSelectBorder();
|
|
58153
58180
|
}
|
|
@@ -60136,6 +60163,7 @@
|
|
|
60136
60163
|
this.select.cornerHeaderSelectMode = cornerHeaderSelectMode;
|
|
60137
60164
|
this.select.highlightInRange = highlightInRange;
|
|
60138
60165
|
this.select.disableCtrlMultiSelect = this.table.options.keyboardOptions?.ctrlMultiSelect === false;
|
|
60166
|
+
this.select.disableShiftMultiSelect = this.table.options.keyboardOptions?.shiftMultiSelect === false;
|
|
60139
60167
|
}
|
|
60140
60168
|
isSelected(col, row) {
|
|
60141
60169
|
let seled = false;
|
|
@@ -60216,7 +60244,7 @@
|
|
|
60216
60244
|
updateHoverPos(col, row) {
|
|
60217
60245
|
updateHoverPosition(this, col, row);
|
|
60218
60246
|
}
|
|
60219
|
-
updateSelectPos(col, row,
|
|
60247
|
+
updateSelectPos(col, row, enableShiftSelectMode = false, enableCtrlSelectMode = false, isSelectAll = false, makeSelectCellVisible = true, skipBodyMerge = false) {
|
|
60220
60248
|
if (row !== -1 && row !== -1) {
|
|
60221
60249
|
this.select.selecting = true;
|
|
60222
60250
|
}
|
|
@@ -60234,7 +60262,7 @@
|
|
|
60234
60262
|
}
|
|
60235
60263
|
const oldCellPosCol = this.select.cellPos.col;
|
|
60236
60264
|
const oldCellPosRow = this.select.cellPos.row;
|
|
60237
|
-
updateSelectPosition(this, col, row,
|
|
60265
|
+
updateSelectPosition(this, col, row, enableShiftSelectMode, enableCtrlSelectMode, isSelectAll, makeSelectCellVisible, skipBodyMerge);
|
|
60238
60266
|
if (this.table.hasListeners(TABLE_EVENT_TYPE.SELECTED_CHANGED) &&
|
|
60239
60267
|
(oldCellPosCol !== col || oldCellPosRow !== row)) {
|
|
60240
60268
|
this.table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CHANGED, {
|
|
@@ -62597,7 +62625,8 @@
|
|
|
62597
62625
|
if (isCellDisableSelect(table, targetCol, targetRow)) {
|
|
62598
62626
|
return;
|
|
62599
62627
|
}
|
|
62600
|
-
table.
|
|
62628
|
+
const enableShiftSelectMode = table.options.keyboardOptions?.shiftMultiSelect ?? true;
|
|
62629
|
+
table.selectCell(targetCol, targetRow, e.shiftKey && enableShiftSelectMode);
|
|
62601
62630
|
if ((table.options.keyboardOptions?.moveEditCellOnArrowKeys ?? false) &&
|
|
62602
62631
|
table.editorManager?.editingEditor) {
|
|
62603
62632
|
table.editorManager?.completeEdit();
|
|
@@ -62622,7 +62651,8 @@
|
|
|
62622
62651
|
if (isCellDisableSelect(table, targetCol, targetRow)) {
|
|
62623
62652
|
return;
|
|
62624
62653
|
}
|
|
62625
|
-
table.
|
|
62654
|
+
const enableShiftSelectMode = table.options.keyboardOptions?.shiftMultiSelect ?? true;
|
|
62655
|
+
table.selectCell(targetCol, targetRow, e.shiftKey && enableShiftSelectMode);
|
|
62626
62656
|
}
|
|
62627
62657
|
return;
|
|
62628
62658
|
}
|
|
@@ -62632,7 +62662,8 @@
|
|
|
62632
62662
|
if (isCellDisableSelect(table, targetCol, targetRow)) {
|
|
62633
62663
|
return;
|
|
62634
62664
|
}
|
|
62635
|
-
table.
|
|
62665
|
+
const enableShiftSelectMode = table.options.keyboardOptions?.shiftMultiSelect ?? true;
|
|
62666
|
+
table.selectCell(targetCol, targetRow, e.shiftKey && enableShiftSelectMode);
|
|
62636
62667
|
}
|
|
62637
62668
|
else if ((table.options.keyboardOptions?.editCellOnEnter ?? true) &&
|
|
62638
62669
|
(table.stateManager.select.ranges?.length ?? 0) === 1) {
|
|
@@ -63293,10 +63324,10 @@
|
|
|
63293
63324
|
});
|
|
63294
63325
|
}
|
|
63295
63326
|
function bindGroupCheckboxTreeChange(table) {
|
|
63296
|
-
if (table.internalProps.enableCheckboxCascade !== true) {
|
|
63297
|
-
return;
|
|
63298
|
-
}
|
|
63299
63327
|
table.on('checkbox_state_change', args => {
|
|
63328
|
+
if (table.internalProps.enableCheckboxCascade !== true) {
|
|
63329
|
+
return;
|
|
63330
|
+
}
|
|
63300
63331
|
const { col, row, checked, field } = args;
|
|
63301
63332
|
const isCheckboxAndTree = table.internalProps.columns.some(column => column.tree);
|
|
63302
63333
|
table.internalProps.enableCheckboxCascade && field !== '_vtable_rowSeries_number';
|
|
@@ -63462,10 +63493,10 @@
|
|
|
63462
63493
|
});
|
|
63463
63494
|
}
|
|
63464
63495
|
function bindHeaderCheckboxChange(table) {
|
|
63465
|
-
if (table.internalProps.enableHeaderCheckboxCascade !== true) {
|
|
63466
|
-
return;
|
|
63467
|
-
}
|
|
63468
63496
|
table.on('checkbox_state_change', args => {
|
|
63497
|
+
if (table.internalProps.enableHeaderCheckboxCascade !== true) {
|
|
63498
|
+
return;
|
|
63499
|
+
}
|
|
63469
63500
|
const { col, row, checked, field } = args;
|
|
63470
63501
|
if (table.isHeader(col, row)) {
|
|
63471
63502
|
table.stateManager.setHeaderCheckedState(field, checked);
|
|
@@ -63721,7 +63752,9 @@
|
|
|
63721
63752
|
this.table.stateManager.updateSelectPos(-1, -1);
|
|
63722
63753
|
return false;
|
|
63723
63754
|
}
|
|
63724
|
-
|
|
63755
|
+
const shiftMultiSelect = this.table.keyboardOptions?.shiftMultiSelect ?? true;
|
|
63756
|
+
const ctrlMultiSelect = this.table.keyboardOptions?.ctrlMultiSelect ?? true;
|
|
63757
|
+
this.table.stateManager.updateSelectPos(this.table.stateManager.select.selectInline === 'row' ? this.table.colCount - 1 : eventArgs.col, this.table.stateManager.select.selectInline === 'col' ? this.table.rowCount - 1 : eventArgs.row, eventArgs.event.shiftKey && shiftMultiSelect, (eventArgs.event.ctrlKey || eventArgs.event.metaKey) && ctrlMultiSelect, false, isSelectMoving ? false : this.table.options.select?.makeSelectCellVisible ?? true);
|
|
63725
63758
|
return true;
|
|
63726
63759
|
}
|
|
63727
63760
|
return false;
|
|
@@ -63769,10 +63802,13 @@
|
|
|
63769
63802
|
updateCol = eventArgs.col;
|
|
63770
63803
|
}
|
|
63771
63804
|
}
|
|
63772
|
-
|
|
63805
|
+
const ctrlMultiSelect = this.table.keyboardOptions?.ctrlMultiSelect ?? true;
|
|
63806
|
+
this.table.stateManager.updateSelectPos(isSelectMoving ? updateCol : currentRange.end.col, isSelectMoving ? updateRow : currentRange.end.row, true, (eventArgs.event.ctrlKey || eventArgs.event.metaKey) && ctrlMultiSelect, false, !isSelectMoving);
|
|
63773
63807
|
}
|
|
63774
63808
|
else {
|
|
63775
|
-
|
|
63809
|
+
const shiftMultiSelect = this.table.keyboardOptions?.shiftMultiSelect ?? true;
|
|
63810
|
+
const ctrlMultiSelect = this.table.keyboardOptions?.ctrlMultiSelect ?? true;
|
|
63811
|
+
this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey && shiftMultiSelect, (eventArgs.event.ctrlKey || eventArgs.event.metaKey) && ctrlMultiSelect, false, !isSelectMoving);
|
|
63776
63812
|
}
|
|
63777
63813
|
return true;
|
|
63778
63814
|
}
|
|
@@ -63952,7 +63988,7 @@
|
|
|
63952
63988
|
return false;
|
|
63953
63989
|
}
|
|
63954
63990
|
release() {
|
|
63955
|
-
this.gesture
|
|
63991
|
+
this.gesture?.release();
|
|
63956
63992
|
this.globalEventListeners.forEach(item => {
|
|
63957
63993
|
if (item.env === 'document') {
|
|
63958
63994
|
document.removeEventListener(item.name, item.callback);
|
|
@@ -64135,7 +64171,7 @@
|
|
|
64135
64171
|
rowValues.push(cell);
|
|
64136
64172
|
});
|
|
64137
64173
|
});
|
|
64138
|
-
const changedCellResults = await table.changeCellValues(col, row, values);
|
|
64174
|
+
const changedCellResults = await table.changeCellValues(col, row, values, true);
|
|
64139
64175
|
if (table.hasListeners(TABLE_EVENT_TYPE.PASTED_DATA)) {
|
|
64140
64176
|
table.fireListeners(TABLE_EVENT_TYPE.PASTED_DATA, {
|
|
64141
64177
|
col,
|
|
@@ -67924,6 +67960,7 @@
|
|
|
67924
67960
|
}
|
|
67925
67961
|
});
|
|
67926
67962
|
const axisRange = getRange('bottom', col, row - 1, col, row, col, row, 0, layout);
|
|
67963
|
+
const { chartType } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
67927
67964
|
if (!axisRange) {
|
|
67928
67965
|
return;
|
|
67929
67966
|
}
|
|
@@ -67942,12 +67979,20 @@
|
|
|
67942
67979
|
axisOption.zero = false;
|
|
67943
67980
|
}
|
|
67944
67981
|
}
|
|
67982
|
+
let domain = [];
|
|
67983
|
+
if (chartType === 'heatmap') {
|
|
67984
|
+
const colDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.rowCount - layout.bottomFrozenRowCount - 1, 'xField');
|
|
67985
|
+
const data = layout.dataset.collectedValues[colDimensionKey] ?? [];
|
|
67986
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
67987
|
+
domain = data?.[colPath ?? ''] ?? [];
|
|
67988
|
+
}
|
|
67945
67989
|
return merge$1({
|
|
67946
67990
|
title: {
|
|
67947
67991
|
visible: true,
|
|
67948
67992
|
text: indicatorInfo?.title
|
|
67949
67993
|
},
|
|
67950
|
-
range
|
|
67994
|
+
range,
|
|
67995
|
+
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain)
|
|
67951
67996
|
}, axisOption, {
|
|
67952
67997
|
orient: 'bottom',
|
|
67953
67998
|
type: axisOption?.type || 'linear',
|
|
@@ -68007,6 +68052,7 @@
|
|
|
68007
68052
|
}
|
|
68008
68053
|
});
|
|
68009
68054
|
const axisRange = getRange('left', col + 1, row, col, row, col, row, 0, layout);
|
|
68055
|
+
const { chartType } = getAxisOption(col + 1, row, 'left', layout);
|
|
68010
68056
|
if (!axisRange) {
|
|
68011
68057
|
return;
|
|
68012
68058
|
}
|
|
@@ -68025,13 +68071,21 @@
|
|
|
68025
68071
|
axisOption.zero = false;
|
|
68026
68072
|
}
|
|
68027
68073
|
}
|
|
68074
|
+
let domain = [];
|
|
68075
|
+
if (chartType === 'heatmap') {
|
|
68076
|
+
const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, 'yField');
|
|
68077
|
+
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
68078
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
68079
|
+
domain = data?.[rowPath ?? ''] ?? [];
|
|
68080
|
+
}
|
|
68028
68081
|
return merge$1({
|
|
68029
68082
|
title: {
|
|
68030
68083
|
visible: true,
|
|
68031
68084
|
text: indicatorInfo?.title,
|
|
68032
68085
|
autoRotate: true
|
|
68033
68086
|
},
|
|
68034
|
-
range: range
|
|
68087
|
+
range: range,
|
|
68088
|
+
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain)
|
|
68035
68089
|
}, axisOption, {
|
|
68036
68090
|
orient: 'left',
|
|
68037
68091
|
type: axisOption?.type || 'linear',
|
|
@@ -68050,6 +68104,7 @@
|
|
|
68050
68104
|
row >= layout.columnHeaderLevelCount &&
|
|
68051
68105
|
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
68052
68106
|
const axisRange = getRange('right', col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 1, layout);
|
|
68107
|
+
const { chartType } = getAxisOption(col - 1, row, 'right', layout);
|
|
68053
68108
|
if (!axisRange) {
|
|
68054
68109
|
return;
|
|
68055
68110
|
}
|
|
@@ -68068,11 +68123,19 @@
|
|
|
68068
68123
|
axisOption.zero = false;
|
|
68069
68124
|
}
|
|
68070
68125
|
}
|
|
68126
|
+
let domain = [];
|
|
68127
|
+
if (chartType === 'heatmap') {
|
|
68128
|
+
const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.colCount - layout.rightFrozenColCount - 1, row, 'yField');
|
|
68129
|
+
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
68130
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
68131
|
+
domain = data?.[rowPath ?? ''] ?? [];
|
|
68132
|
+
}
|
|
68071
68133
|
return merge$1({
|
|
68072
68134
|
range: range,
|
|
68073
68135
|
title: {
|
|
68074
68136
|
autoRotate: true
|
|
68075
|
-
}
|
|
68137
|
+
},
|
|
68138
|
+
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain)
|
|
68076
68139
|
}, axisOption, {
|
|
68077
68140
|
orient: 'right',
|
|
68078
68141
|
type: axisOption?.type || 'linear',
|
|
@@ -68320,38 +68383,80 @@
|
|
|
68320
68383
|
return orient === 'bottom' || orient === 'top';
|
|
68321
68384
|
}
|
|
68322
68385
|
function hasLinearAxis(spec, tableAxesConfig, isHorizontal, isThisXAxis) {
|
|
68323
|
-
if (!isArray$7(spec.axes) || spec.axes.length === 0) {
|
|
68386
|
+
if ((!isArray$7(spec.axes) || spec.axes.length === 0) && (!isArray$7(tableAxesConfig) || tableAxesConfig.length === 0)) {
|
|
68324
68387
|
return (isHorizontal && isThisXAxis) || (!isHorizontal && !isThisXAxis);
|
|
68325
68388
|
}
|
|
68326
|
-
|
|
68327
|
-
|
|
68328
|
-
|
|
68329
|
-
|
|
68330
|
-
|
|
68331
|
-
|
|
68332
|
-
|
|
68333
|
-
|
|
68334
|
-
|
|
68335
|
-
|
|
68336
|
-
|
|
68337
|
-
|
|
68338
|
-
|
|
68389
|
+
if (isArray$7(spec.axes) && spec.axes.length > 0) {
|
|
68390
|
+
for (let i = 0; i < spec.axes.length; i++) {
|
|
68391
|
+
const axisSpec = spec.axes[i];
|
|
68392
|
+
if (!isHorizontal && isThisXAxis && axisSpec.orient === 'bottom') {
|
|
68393
|
+
if (spec.type === 'heatmap') {
|
|
68394
|
+
return axisSpec.type === 'linear';
|
|
68395
|
+
}
|
|
68396
|
+
if (axisSpec.type === 'linear') {
|
|
68397
|
+
return true;
|
|
68398
|
+
}
|
|
68399
|
+
}
|
|
68400
|
+
if (isHorizontal && isThisXAxis && axisSpec.orient === 'bottom') {
|
|
68401
|
+
if (spec.type === 'heatmap') {
|
|
68402
|
+
return axisSpec.type === 'linear';
|
|
68403
|
+
}
|
|
68404
|
+
if (axisSpec.type !== 'linear') {
|
|
68405
|
+
return true;
|
|
68406
|
+
}
|
|
68407
|
+
}
|
|
68408
|
+
if (!isHorizontal && !isThisXAxis && axisSpec.orient === 'left') {
|
|
68409
|
+
if (spec.type === 'heatmap') {
|
|
68410
|
+
return axisSpec.type === 'linear';
|
|
68411
|
+
}
|
|
68412
|
+
if (axisSpec.type !== 'linear') {
|
|
68413
|
+
return true;
|
|
68414
|
+
}
|
|
68415
|
+
}
|
|
68416
|
+
if (isHorizontal && !isThisXAxis && axisSpec.orient === 'left') {
|
|
68417
|
+
if (spec.type === 'heatmap') {
|
|
68418
|
+
return axisSpec.type === 'linear';
|
|
68419
|
+
}
|
|
68420
|
+
if (axisSpec.type === 'linear') {
|
|
68421
|
+
return true;
|
|
68422
|
+
}
|
|
68423
|
+
}
|
|
68339
68424
|
}
|
|
68340
68425
|
}
|
|
68341
68426
|
if (isArray$7(tableAxesConfig) && tableAxesConfig.length > 0) {
|
|
68342
68427
|
for (let i = 0; i < tableAxesConfig.length; i++) {
|
|
68343
68428
|
const axisSpec = tableAxesConfig[i];
|
|
68344
|
-
if (!isHorizontal && isThisXAxis && axisSpec.orient === 'bottom'
|
|
68345
|
-
|
|
68429
|
+
if (!isHorizontal && isThisXAxis && axisSpec.orient === 'bottom') {
|
|
68430
|
+
if (spec.type === 'heatmap') {
|
|
68431
|
+
return axisSpec.type === 'linear';
|
|
68432
|
+
}
|
|
68433
|
+
if (axisSpec.type === 'linear') {
|
|
68434
|
+
return true;
|
|
68435
|
+
}
|
|
68346
68436
|
}
|
|
68347
|
-
if (isHorizontal && isThisXAxis && axisSpec.orient === 'bottom'
|
|
68348
|
-
|
|
68437
|
+
if (isHorizontal && isThisXAxis && axisSpec.orient === 'bottom') {
|
|
68438
|
+
if (spec.type === 'heatmap') {
|
|
68439
|
+
return axisSpec.type === 'linear';
|
|
68440
|
+
}
|
|
68441
|
+
if (axisSpec.type !== 'linear') {
|
|
68442
|
+
return true;
|
|
68443
|
+
}
|
|
68349
68444
|
}
|
|
68350
|
-
if (!isHorizontal && !isThisXAxis && axisSpec.orient === 'left'
|
|
68351
|
-
|
|
68445
|
+
if (!isHorizontal && !isThisXAxis && axisSpec.orient === 'left') {
|
|
68446
|
+
if (spec.type === 'heatmap') {
|
|
68447
|
+
return axisSpec.type === 'linear';
|
|
68448
|
+
}
|
|
68449
|
+
if (axisSpec.type !== 'linear') {
|
|
68450
|
+
return true;
|
|
68451
|
+
}
|
|
68352
68452
|
}
|
|
68353
|
-
if (isHorizontal && !isThisXAxis && axisSpec.orient === 'left'
|
|
68354
|
-
|
|
68453
|
+
if (isHorizontal && !isThisXAxis && axisSpec.orient === 'left') {
|
|
68454
|
+
if (spec.type === 'heatmap') {
|
|
68455
|
+
return axisSpec.type === 'linear';
|
|
68456
|
+
}
|
|
68457
|
+
if (axisSpec.type === 'linear') {
|
|
68458
|
+
return true;
|
|
68459
|
+
}
|
|
68355
68460
|
}
|
|
68356
68461
|
}
|
|
68357
68462
|
}
|
|
@@ -69016,7 +69121,7 @@
|
|
|
69016
69121
|
return TABLE_EVENT_TYPE;
|
|
69017
69122
|
}
|
|
69018
69123
|
options;
|
|
69019
|
-
version = "1.20.
|
|
69124
|
+
version = "1.20.2-alpha.0";
|
|
69020
69125
|
pagination;
|
|
69021
69126
|
id = `VTable${Date.now()}`;
|
|
69022
69127
|
headerStyleCache;
|
|
@@ -70592,7 +70697,7 @@
|
|
|
70592
70697
|
this.scenegraph.stage.release();
|
|
70593
70698
|
this.scenegraph.proxy.release();
|
|
70594
70699
|
internalProps.focusControl.release();
|
|
70595
|
-
const
|
|
70700
|
+
const parentElement = internalProps.element?.parentElement;
|
|
70596
70701
|
if (parentElement && !this.options.canvas) {
|
|
70597
70702
|
parentElement.removeChild(internalProps.element);
|
|
70598
70703
|
}
|
|
@@ -70914,9 +71019,9 @@
|
|
|
70914
71019
|
clearSelected() {
|
|
70915
71020
|
this.stateManager.updateSelectPos(-1, -1);
|
|
70916
71021
|
}
|
|
70917
|
-
selectCell(col, row,
|
|
71022
|
+
selectCell(col, row, enableShiftSelectMode, enableCtrlSelectMode, makeSelectCellVisible, skipBodyMerge = false) {
|
|
70918
71023
|
const isHasSelected = !!this.stateManager.select.ranges?.length;
|
|
70919
|
-
this.stateManager.updateSelectPos(col, row,
|
|
71024
|
+
this.stateManager.updateSelectPos(col, row, enableShiftSelectMode, enableCtrlSelectMode, false, makeSelectCellVisible ?? this.options.select?.makeSelectCellVisible ?? true, skipBodyMerge);
|
|
70920
71025
|
this.stateManager.endSelectCells(true, isHasSelected);
|
|
70921
71026
|
}
|
|
70922
71027
|
selectCells(cellRanges) {
|
|
@@ -70990,37 +71095,37 @@
|
|
|
70990
71095
|
]);
|
|
70991
71096
|
}
|
|
70992
71097
|
}
|
|
70993
|
-
startDragSelectCol(colIndex,
|
|
71098
|
+
startDragSelectCol(colIndex, enableCtrlSelectMode, enableShiftSelectMode) {
|
|
70994
71099
|
const lastSelectRange = this.stateManager.select.ranges[this.stateManager.select.ranges.length - 1];
|
|
70995
|
-
const startCol =
|
|
71100
|
+
const startCol = enableShiftSelectMode && lastSelectRange?.start?.col ? lastSelectRange?.start?.col : colIndex;
|
|
70996
71101
|
const startRow = 0;
|
|
70997
71102
|
const endCol = colIndex;
|
|
70998
71103
|
const endRow = this.rowCount - 1;
|
|
70999
|
-
this.stateManager.updateSelectPos(startCol, startRow,
|
|
71104
|
+
this.stateManager.updateSelectPos(startCol, startRow, enableShiftSelectMode, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
|
|
71000
71105
|
this.stateManager.updateInteractionState(InteractionState.grabing);
|
|
71001
|
-
this.stateManager.updateSelectPos(endCol, endRow,
|
|
71106
|
+
this.stateManager.updateSelectPos(endCol, endRow, enableShiftSelectMode, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
|
|
71002
71107
|
}
|
|
71003
|
-
dragSelectCol(colIndex,
|
|
71108
|
+
dragSelectCol(colIndex, enableCtrlSelectMode) {
|
|
71004
71109
|
const currentSelectRanges = this.stateManager.select.ranges;
|
|
71005
71110
|
const lastSelectRange = currentSelectRanges[currentSelectRanges.length - 1];
|
|
71006
71111
|
if (lastSelectRange) {
|
|
71007
71112
|
lastSelectRange.end.col = colIndex;
|
|
71008
71113
|
}
|
|
71009
|
-
this.stateManager.updateSelectPos(colIndex, this.rowCount - 1, false,
|
|
71114
|
+
this.stateManager.updateSelectPos(colIndex, this.rowCount - 1, false, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
|
|
71010
71115
|
}
|
|
71011
71116
|
endDragSelect() {
|
|
71012
71117
|
this.stateManager.updateInteractionState(InteractionState.default);
|
|
71013
71118
|
this.stateManager.endSelectCells(false, false);
|
|
71014
71119
|
}
|
|
71015
|
-
startDragSelectRow(rowIndex,
|
|
71120
|
+
startDragSelectRow(rowIndex, enableCtrlSelectMode, isShift) {
|
|
71016
71121
|
const lastSelectRange = this.stateManager.select.ranges[this.stateManager.select.ranges.length - 1];
|
|
71017
71122
|
const startCol = 0;
|
|
71018
71123
|
const startRow = isShift && lastSelectRange?.start?.row ? lastSelectRange?.start?.row : rowIndex;
|
|
71019
71124
|
const endCol = this.colCount - 1;
|
|
71020
71125
|
const endRow = rowIndex;
|
|
71021
|
-
this.stateManager.updateSelectPos(startCol, startRow, isShift,
|
|
71126
|
+
this.stateManager.updateSelectPos(startCol, startRow, isShift, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
|
|
71022
71127
|
this.stateManager.updateInteractionState(InteractionState.grabing);
|
|
71023
|
-
this.stateManager.updateSelectPos(endCol, endRow, isShift,
|
|
71128
|
+
this.stateManager.updateSelectPos(endCol, endRow, isShift, enableCtrlSelectMode, false, this.options.select?.makeSelectCellVisible ?? true, true);
|
|
71024
71129
|
}
|
|
71025
71130
|
dragSelectRow(rowIndex, isCtrl) {
|
|
71026
71131
|
const currentSelectRanges = this.stateManager.select.ranges;
|
|
@@ -73708,7 +73813,11 @@
|
|
|
73708
73813
|
columnObj.chartSpec.type !== 'gauge' &&
|
|
73709
73814
|
columnObj.chartSpec.type !== 'pie' &&
|
|
73710
73815
|
columnObj.chartSpec.type !== 'funnel' &&
|
|
73711
|
-
columnObj.chartSpec.type !== 'rose'
|
|
73816
|
+
columnObj.chartSpec.type !== 'rose' &&
|
|
73817
|
+
columnObj.chartSpec.type !== 'sunburst' &&
|
|
73818
|
+
columnObj.chartSpec.type !== 'treemap' &&
|
|
73819
|
+
columnObj.chartSpec.type !== 'sankey' &&
|
|
73820
|
+
columnObj.chartSpec.type !== 'circlePacking') {
|
|
73712
73821
|
isHasCartesianChart = true;
|
|
73713
73822
|
break;
|
|
73714
73823
|
}
|
|
@@ -73725,7 +73834,11 @@
|
|
|
73725
73834
|
chartSpec.type === 'gauge' ||
|
|
73726
73835
|
chartSpec.type === 'wordCloud' ||
|
|
73727
73836
|
chartSpec.type === 'funnel' ||
|
|
73728
|
-
chartSpec.type === 'rose'
|
|
73837
|
+
chartSpec.type === 'rose' ||
|
|
73838
|
+
chartSpec.type === 'sunburst' ||
|
|
73839
|
+
chartSpec.type === 'treemap' ||
|
|
73840
|
+
chartSpec.type === 'sankey' ||
|
|
73841
|
+
chartSpec.type === 'circlePacking') {
|
|
73729
73842
|
isHasCartesianChart = false;
|
|
73730
73843
|
}
|
|
73731
73844
|
}
|
|
@@ -73745,7 +73858,11 @@
|
|
|
73745
73858
|
columnObj.chartSpec.type !== 'radar' &&
|
|
73746
73859
|
columnObj.chartSpec.type !== 'gauge' &&
|
|
73747
73860
|
columnObj.chartSpec.type !== 'funnel' &&
|
|
73748
|
-
columnObj.chartSpec.type !== 'rose'
|
|
73861
|
+
columnObj.chartSpec.type !== 'rose' &&
|
|
73862
|
+
columnObj.chartSpec.type !== 'sunburst' &&
|
|
73863
|
+
columnObj.chartSpec.type !== 'treemap' &&
|
|
73864
|
+
columnObj.chartSpec.type !== 'sankey' &&
|
|
73865
|
+
columnObj.chartSpec.type !== 'circlePacking') {
|
|
73749
73866
|
isHasCartesianChart = true;
|
|
73750
73867
|
break;
|
|
73751
73868
|
}
|
|
@@ -73760,7 +73877,11 @@
|
|
|
73760
73877
|
chartSpec.type !== 'gauge' &&
|
|
73761
73878
|
chartSpec.type !== 'wordCloud' &&
|
|
73762
73879
|
chartSpec.type !== 'funnel' &&
|
|
73763
|
-
chartSpec.type !== 'rose'
|
|
73880
|
+
chartSpec.type !== 'rose' &&
|
|
73881
|
+
chartSpec.type !== 'sunburst' &&
|
|
73882
|
+
chartSpec.type !== 'treemap' &&
|
|
73883
|
+
chartSpec.type !== 'sankey' &&
|
|
73884
|
+
chartSpec.type !== 'circlePacking') {
|
|
73764
73885
|
isHasCartesianChart = true;
|
|
73765
73886
|
}
|
|
73766
73887
|
}
|
|
@@ -73781,7 +73902,16 @@
|
|
|
73781
73902
|
serie.sortDataByAxis = true;
|
|
73782
73903
|
});
|
|
73783
73904
|
}
|
|
73784
|
-
if (chartSpec.type !== '
|
|
73905
|
+
if (chartSpec.type !== 'pie' &&
|
|
73906
|
+
chartSpec.type !== 'radar' &&
|
|
73907
|
+
chartSpec.type !== 'gauge' &&
|
|
73908
|
+
chartSpec.type !== 'wordCloud' &&
|
|
73909
|
+
chartSpec.type !== 'funnel' &&
|
|
73910
|
+
chartSpec.type !== 'rose' &&
|
|
73911
|
+
chartSpec.type !== 'sunburst' &&
|
|
73912
|
+
chartSpec.type !== 'treemap' &&
|
|
73913
|
+
chartSpec.type !== 'sankey' &&
|
|
73914
|
+
chartSpec.type !== 'circlePacking') {
|
|
73785
73915
|
chartSpec.axes = layout.getChartAxes(col, row);
|
|
73786
73916
|
}
|
|
73787
73917
|
chartSpec.padding = 0;
|
|
@@ -73862,9 +73992,18 @@
|
|
|
73862
73992
|
if (hasSameAxis(axisOption, axes)) {
|
|
73863
73993
|
return;
|
|
73864
73994
|
}
|
|
73995
|
+
const { chartType } = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
73996
|
+
let domain = [];
|
|
73997
|
+
if (chartType === 'heatmap') {
|
|
73998
|
+
const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, 'yField');
|
|
73999
|
+
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
74000
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
74001
|
+
domain = data?.[rowPath ?? ''] ?? [];
|
|
74002
|
+
}
|
|
73865
74003
|
axes.push(merge$1({
|
|
73866
74004
|
range,
|
|
73867
|
-
label: { style: { fontSize: DEFAULT_TEXT_FONT_SIZE } }
|
|
74005
|
+
label: { style: { fontSize: DEFAULT_TEXT_FONT_SIZE } },
|
|
74006
|
+
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain)
|
|
73868
74007
|
}, axisOption, {
|
|
73869
74008
|
type: axisOption?.type || 'linear',
|
|
73870
74009
|
orient: index === 0 ? 'left' : 'right',
|
|
@@ -73873,7 +74012,8 @@
|
|
|
73873
74012
|
domainLine: { visible: false },
|
|
73874
74013
|
seriesIndex: axisOption?.seriesId ? undefined : index,
|
|
73875
74014
|
tick: {
|
|
73876
|
-
tickMode: getTickModeFunction(targetTicks, targetRange, range, index)
|
|
74015
|
+
tickMode: getTickModeFunction(targetTicks, targetRange, range, index),
|
|
74016
|
+
visible: false
|
|
73877
74017
|
},
|
|
73878
74018
|
sync: { axisId: NO_AXISID_FRO_VTABLE }
|
|
73879
74019
|
}));
|
|
@@ -76160,6 +76300,9 @@
|
|
|
76160
76300
|
if (deletedRecordIndexs.length === 0) {
|
|
76161
76301
|
return;
|
|
76162
76302
|
}
|
|
76303
|
+
for (let index = 0; index < deletedRecordIndexs.length; index++) {
|
|
76304
|
+
adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
|
|
76305
|
+
}
|
|
76163
76306
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
76164
76307
|
table.refreshRowColCount();
|
|
76165
76308
|
const newRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -76436,12 +76579,28 @@
|
|
|
76436
76579
|
});
|
|
76437
76580
|
}
|
|
76438
76581
|
else {
|
|
76439
|
-
const
|
|
76440
|
-
|
|
76441
|
-
|
|
76442
|
-
|
|
76443
|
-
|
|
76444
|
-
|
|
76582
|
+
const toDelete = [];
|
|
76583
|
+
const toUpdate = [];
|
|
76584
|
+
checkedState.forEach((value, key) => {
|
|
76585
|
+
const dataIndex = Number(key);
|
|
76586
|
+
if (!isNaN(dataIndex) && dataIndex >= recordIndex) {
|
|
76587
|
+
if (dataIndex === recordIndex) {
|
|
76588
|
+
toDelete.push(key);
|
|
76589
|
+
}
|
|
76590
|
+
else if (dataIndex > recordIndex) {
|
|
76591
|
+
toUpdate.push({
|
|
76592
|
+
originKey: key,
|
|
76593
|
+
targetKey: (dataIndex - count).toString(),
|
|
76594
|
+
value
|
|
76595
|
+
});
|
|
76596
|
+
}
|
|
76597
|
+
}
|
|
76598
|
+
});
|
|
76599
|
+
toDelete.forEach(key => checkedState.delete(key));
|
|
76600
|
+
toUpdate.forEach(({ originKey, targetKey, value }) => {
|
|
76601
|
+
checkedState.delete(originKey);
|
|
76602
|
+
checkedState.set(targetKey, value);
|
|
76603
|
+
});
|
|
76445
76604
|
}
|
|
76446
76605
|
}
|
|
76447
76606
|
function adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, count) {
|
|
@@ -76805,7 +76964,7 @@
|
|
|
76805
76964
|
else {
|
|
76806
76965
|
const define = table.getBodyColumnDefine(col, row);
|
|
76807
76966
|
const checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
|
|
76808
|
-
if (
|
|
76967
|
+
if (['number', 'string'].includes(typeof checkboxSeriesNumberStyle)) {
|
|
76809
76968
|
value = checkboxSeriesNumberStyle;
|
|
76810
76969
|
}
|
|
76811
76970
|
else if (checkboxSeriesNumberStyle?.text) {
|
|
@@ -77694,7 +77853,7 @@
|
|
|
77694
77853
|
return this.dataSource.getTableIndex(index);
|
|
77695
77854
|
}
|
|
77696
77855
|
release() {
|
|
77697
|
-
this.editorManager
|
|
77856
|
+
this.editorManager?.release();
|
|
77698
77857
|
super.release();
|
|
77699
77858
|
}
|
|
77700
77859
|
expandAllTreeNode() {
|
|
@@ -81891,6 +82050,7 @@
|
|
|
81891
82050
|
data: table.getCellValue(col, row) || [],
|
|
81892
82051
|
cellPadding: padding,
|
|
81893
82052
|
dpr: table.internalProps.pixelRatio,
|
|
82053
|
+
detectPickChartItem: table.options.customConfig?.detectPickChartItem,
|
|
81894
82054
|
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
81895
82055
|
tableChartOption: table.options.chartOption,
|
|
81896
82056
|
col,
|
|
@@ -87189,13 +87349,30 @@
|
|
|
87189
87349
|
this._largeCellRangeCache.length = 0;
|
|
87190
87350
|
this._CellHeaderPathMap = new Map();
|
|
87191
87351
|
}
|
|
87192
|
-
getDimensionKeyInChartSpec(_col, _row) {
|
|
87352
|
+
getDimensionKeyInChartSpec(_col, _row, type) {
|
|
87193
87353
|
let dimensionKey;
|
|
87194
87354
|
if (this.indicatorsAsCol === false) {
|
|
87355
|
+
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
87356
|
+
if (chartSpec) {
|
|
87357
|
+
dimensionKey =
|
|
87358
|
+
type === 'yField'
|
|
87359
|
+
? chartSpec.yField ?? chartSpec?.series?.[0]?.yField
|
|
87360
|
+
: chartSpec.type === 'histogram'
|
|
87361
|
+
? chartSpec.x2Field
|
|
87362
|
+
: chartSpec.xField ?? chartSpec?.series?.[0]?.xField;
|
|
87363
|
+
if (dimensionKey) {
|
|
87364
|
+
return dimensionKey;
|
|
87365
|
+
}
|
|
87366
|
+
}
|
|
87195
87367
|
for (let i = 0; i < this.indicatorsDefine.length; i++) {
|
|
87196
87368
|
const chartSpec = this.indicatorsDefine[i].chartSpec;
|
|
87197
87369
|
if (chartSpec) {
|
|
87198
|
-
dimensionKey =
|
|
87370
|
+
dimensionKey =
|
|
87371
|
+
type === 'yField'
|
|
87372
|
+
? chartSpec.yField ?? chartSpec?.series?.[0]?.yField
|
|
87373
|
+
: chartSpec.type === 'histogram'
|
|
87374
|
+
? chartSpec.x2Field
|
|
87375
|
+
: chartSpec.xField ?? chartSpec?.series?.[0]?.xField;
|
|
87199
87376
|
if (dimensionKey) {
|
|
87200
87377
|
return dimensionKey;
|
|
87201
87378
|
}
|
|
@@ -87203,10 +87380,27 @@
|
|
|
87203
87380
|
}
|
|
87204
87381
|
}
|
|
87205
87382
|
else {
|
|
87383
|
+
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
87384
|
+
if (chartSpec) {
|
|
87385
|
+
dimensionKey =
|
|
87386
|
+
type === 'xField'
|
|
87387
|
+
? chartSpec.type === 'histogram'
|
|
87388
|
+
? chartSpec.x2Field
|
|
87389
|
+
: chartSpec.xField ?? chartSpec?.series?.[0]?.xField
|
|
87390
|
+
: chartSpec.yField ?? chartSpec?.series?.[0]?.yField;
|
|
87391
|
+
if (dimensionKey) {
|
|
87392
|
+
return dimensionKey;
|
|
87393
|
+
}
|
|
87394
|
+
}
|
|
87206
87395
|
for (let i = 0; i < this.indicatorsDefine.length; i++) {
|
|
87207
87396
|
const chartSpec = this.indicatorsDefine[i].chartSpec;
|
|
87208
87397
|
if (chartSpec) {
|
|
87209
|
-
dimensionKey =
|
|
87398
|
+
dimensionKey =
|
|
87399
|
+
type === 'xField'
|
|
87400
|
+
? chartSpec.type === 'histogram'
|
|
87401
|
+
? chartSpec.x2Field
|
|
87402
|
+
: chartSpec.xField ?? chartSpec?.series?.[0]?.xField
|
|
87403
|
+
: chartSpec.yField ?? chartSpec?.series?.[0]?.yField;
|
|
87210
87404
|
if (dimensionKey) {
|
|
87211
87405
|
return dimensionKey;
|
|
87212
87406
|
}
|
|
@@ -87332,8 +87526,13 @@
|
|
|
87332
87526
|
}
|
|
87333
87527
|
return null;
|
|
87334
87528
|
}
|
|
87335
|
-
getOptimunHeightForChart(row) {
|
|
87529
|
+
getOptimunHeightForChart(row, isHeatmap) {
|
|
87336
87530
|
const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
|
|
87531
|
+
if (isHeatmap) {
|
|
87532
|
+
if (path[path.length - 1].indicatorKey) {
|
|
87533
|
+
path.pop();
|
|
87534
|
+
}
|
|
87535
|
+
}
|
|
87337
87536
|
let collectedValues;
|
|
87338
87537
|
for (const key in this.dataset.collectValuesBy) {
|
|
87339
87538
|
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
|
|
@@ -87352,12 +87551,12 @@
|
|
|
87352
87551
|
}
|
|
87353
87552
|
else {
|
|
87354
87553
|
const barWidth = this._chartItemSpanSize || 25;
|
|
87355
|
-
height = (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
87554
|
+
height = (collectedValues?.length ?? 0) * (barWidth + (isHeatmap ? 0 : barWidth / 3));
|
|
87356
87555
|
}
|
|
87357
87556
|
const padding = getQuadProps(this._chartPadding ?? this._table.theme.bodyStyle.padding ?? 0);
|
|
87358
87557
|
return height + padding[0] + padding[2];
|
|
87359
87558
|
}
|
|
87360
|
-
getOptimunWidthForChart(col) {
|
|
87559
|
+
getOptimunWidthForChart(col, isHeatmap) {
|
|
87361
87560
|
const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
|
|
87362
87561
|
let collectedValues;
|
|
87363
87562
|
for (const key in this.dataset.collectValuesBy) {
|
|
@@ -87377,7 +87576,7 @@
|
|
|
87377
87576
|
}
|
|
87378
87577
|
else {
|
|
87379
87578
|
const barWidth = this._chartItemSpanSize || 25;
|
|
87380
|
-
width = (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
87579
|
+
width = (collectedValues?.length ?? 0) * (barWidth + (isHeatmap ? 0 : barWidth / 3));
|
|
87381
87580
|
}
|
|
87382
87581
|
const padding = getQuadProps(this._chartPadding ?? this._table.theme.bodyStyle.padding ?? 0);
|
|
87383
87582
|
return width + padding[1] + padding[3];
|
|
@@ -91432,7 +91631,7 @@
|
|
|
91432
91631
|
}
|
|
91433
91632
|
release() {
|
|
91434
91633
|
this.internalProps.layoutMap.clearHeaderPathCache();
|
|
91435
|
-
this.editorManager
|
|
91634
|
+
this.editorManager?.release();
|
|
91436
91635
|
super.release();
|
|
91437
91636
|
}
|
|
91438
91637
|
}
|
|
@@ -92072,9 +92271,14 @@
|
|
|
92072
92271
|
if (typeof indicators[i] !== 'string' && indicators[i].chartSpec) {
|
|
92073
92272
|
if (indicators[i].chartSpec?.type === 'pie' ||
|
|
92074
92273
|
indicators[i].chartSpec?.type === 'rose' ||
|
|
92274
|
+
indicators[i].chartSpec?.type === 'funnel' ||
|
|
92075
92275
|
indicators[i].chartSpec?.type === 'radar' ||
|
|
92076
92276
|
indicators[i].chartSpec?.type === 'gauge' ||
|
|
92077
|
-
indicators[i].chartSpec?.type === 'wordCloud'
|
|
92277
|
+
indicators[i].chartSpec?.type === 'wordCloud' ||
|
|
92278
|
+
indicators[i].chartSpec?.type === 'sunburst' ||
|
|
92279
|
+
indicators[i].chartSpec?.type === 'treemap' ||
|
|
92280
|
+
indicators[i].chartSpec?.type === 'sankey' ||
|
|
92281
|
+
indicators[i].chartSpec?.type === 'circlePacking') {
|
|
92078
92282
|
continue;
|
|
92079
92283
|
}
|
|
92080
92284
|
const indicatorDefine = indicators[i];
|
|
@@ -92083,11 +92287,15 @@
|
|
|
92083
92287
|
indicatorSpec?.stack !== false &&
|
|
92084
92288
|
(indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
|
|
92085
92289
|
(indicatorSpec.stack = true);
|
|
92086
|
-
|
|
92087
|
-
|
|
92088
|
-
|
|
92089
|
-
|
|
92090
|
-
|
|
92290
|
+
if (indicatorSpec?.type !== 'heatmap') {
|
|
92291
|
+
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
92292
|
+
by: rowKeys,
|
|
92293
|
+
range: true,
|
|
92294
|
+
sumBy: indicatorSpec.type === 'histogram'
|
|
92295
|
+
? columnKeys.concat(indicatorSpec?.xField, indicatorSpec?.x2Field)
|
|
92296
|
+
: indicatorSpec?.stack && columnKeys.concat(indicatorSpec?.xField)
|
|
92297
|
+
};
|
|
92298
|
+
}
|
|
92091
92299
|
if (indicatorSpec.series) {
|
|
92092
92300
|
indicatorSpec.series.forEach((chartSeries) => {
|
|
92093
92301
|
const xField = typeof chartSeries.xField === 'string' ? chartSeries.xField : chartSeries.xField[0];
|
|
@@ -92115,7 +92323,11 @@
|
|
|
92115
92323
|
});
|
|
92116
92324
|
}
|
|
92117
92325
|
else {
|
|
92118
|
-
const xField =
|
|
92326
|
+
const xField = indicatorSpec.type === 'histogram'
|
|
92327
|
+
? indicatorSpec.x2Field
|
|
92328
|
+
: typeof indicatorSpec.xField === 'string'
|
|
92329
|
+
? indicatorSpec.xField
|
|
92330
|
+
: indicatorSpec.xField[0];
|
|
92119
92331
|
collectValuesBy[xField] = {
|
|
92120
92332
|
by: columnKeys,
|
|
92121
92333
|
type: indicatorSpec.direction !== 'horizontal' ? 'xField' : undefined,
|
|
@@ -92128,8 +92340,11 @@
|
|
|
92128
92340
|
const yField = indicatorSpec.yField;
|
|
92129
92341
|
collectValuesBy[yField] = {
|
|
92130
92342
|
by: rowKeys,
|
|
92131
|
-
|
|
92132
|
-
|
|
92343
|
+
type: indicatorSpec.direction !== 'horizontal' ? 'yField' : undefined,
|
|
92344
|
+
range: hasLinearAxis(indicatorSpec, this._axes, indicatorSpec.direction === 'horizontal', false),
|
|
92345
|
+
sumBy: indicatorSpec.type === 'histogram'
|
|
92346
|
+
? columnKeys.concat(indicatorSpec?.xField, indicatorSpec?.x2Field)
|
|
92347
|
+
: indicatorSpec.stack && columnKeys.concat(indicatorSpec?.xField),
|
|
92133
92348
|
sortBy: indicatorSpec.direction === 'horizontal' ? indicatorSpec?.data?.fields?.[yField]?.domain : undefined,
|
|
92134
92349
|
extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
|
|
92135
92350
|
};
|
|
@@ -92140,11 +92355,13 @@
|
|
|
92140
92355
|
indicatorSpec?.stack !== false &&
|
|
92141
92356
|
(indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
|
|
92142
92357
|
(indicatorSpec.stack = true);
|
|
92143
|
-
|
|
92144
|
-
|
|
92145
|
-
|
|
92146
|
-
|
|
92147
|
-
|
|
92358
|
+
if (indicatorSpec?.type !== 'heatmap') {
|
|
92359
|
+
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
92360
|
+
by: columnKeys,
|
|
92361
|
+
range: true,
|
|
92362
|
+
sumBy: indicatorSpec?.stack && rowKeys.concat(indicatorSpec?.yField)
|
|
92363
|
+
};
|
|
92364
|
+
}
|
|
92148
92365
|
if (indicatorSpec.series) {
|
|
92149
92366
|
indicatorSpec.series.forEach((chartSeries) => {
|
|
92150
92367
|
const yField = typeof chartSeries.yField === 'string' ? chartSeries.yField : chartSeries.yField[0];
|
|
@@ -92182,9 +92399,10 @@
|
|
|
92182
92399
|
indicatorSpec?.stack !== false &&
|
|
92183
92400
|
(indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
|
|
92184
92401
|
(indicatorSpec.stack = true);
|
|
92185
|
-
const xField = indicatorSpec.xField;
|
|
92402
|
+
const xField = indicatorSpec.type === 'histogram' ? indicatorSpec.x2Field : indicatorSpec.xField;
|
|
92186
92403
|
collectValuesBy[xField] = {
|
|
92187
92404
|
by: columnKeys,
|
|
92405
|
+
type: indicatorSpec.direction === 'horizontal' ? 'xField' : undefined,
|
|
92188
92406
|
range: hasLinearAxis(indicatorSpec, this._axes, indicatorSpec.direction === 'horizontal', true),
|
|
92189
92407
|
sumBy: indicatorSpec.stack && rowKeys.concat(indicatorSpec?.yField),
|
|
92190
92408
|
sortBy: indicatorSpec.direction !== 'horizontal' ? indicatorSpec?.data?.fields?.[xField]?.domain : undefined,
|
|
@@ -92283,6 +92501,23 @@
|
|
|
92283
92501
|
});
|
|
92284
92502
|
}
|
|
92285
92503
|
updateFilterRules(filterRules) {
|
|
92504
|
+
this._throttledUpdateFilterRules(filterRules);
|
|
92505
|
+
}
|
|
92506
|
+
_throttleTimer = null;
|
|
92507
|
+
_latestFilterRules = null;
|
|
92508
|
+
_throttledUpdateFilterRules(filterRules) {
|
|
92509
|
+
this._latestFilterRules = filterRules;
|
|
92510
|
+
if (this._throttleTimer === null) {
|
|
92511
|
+
this._executeFilterUpdate(filterRules);
|
|
92512
|
+
this._throttleTimer = window.setTimeout(() => {
|
|
92513
|
+
if (this._latestFilterRules !== filterRules) {
|
|
92514
|
+
this._executeFilterUpdate(this._latestFilterRules);
|
|
92515
|
+
}
|
|
92516
|
+
this._throttleTimer = null;
|
|
92517
|
+
}, 200);
|
|
92518
|
+
}
|
|
92519
|
+
}
|
|
92520
|
+
_executeFilterUpdate(filterRules) {
|
|
92286
92521
|
this.internalProps.dataConfig.filterRules = filterRules;
|
|
92287
92522
|
this.dataset.updateFilterRules(filterRules);
|
|
92288
92523
|
clearChartCacheImage(this.scenegraph);
|
|
@@ -93178,7 +93413,7 @@
|
|
|
93178
93413
|
}
|
|
93179
93414
|
|
|
93180
93415
|
registerForVrender();
|
|
93181
|
-
const version = "1.20.
|
|
93416
|
+
const version = "1.20.2-alpha.0";
|
|
93182
93417
|
function getIcons() {
|
|
93183
93418
|
return get$2();
|
|
93184
93419
|
}
|