@visactor/vtable 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +22 -6
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +4 -0
- package/cjs/PivotTable.js +10 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/empty-tip/empty-tip.js +2 -2
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.js +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/title/title.js +1 -1
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/core/BaseTable.js +6 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.js +1 -2
- package/cjs/core/animation.js +3 -2
- package/cjs/core/animation.js.map +1 -1
- package/cjs/core/record-helper.js +20 -12
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +2 -1
- package/cjs/dataset/statistics-helper.js +2 -2
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/edit/edit-manager.js +1 -2
- package/cjs/event/event.js +5 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +35 -3
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +1 -32
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/style.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 +2 -1
- package/cjs/layout/pivot-header-layout.js +1 -1
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/row-height-map.js +2 -1
- package/cjs/layout/row-height-map.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +1 -1
- package/cjs/layout/tree-helper.js +2 -2
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/plugins/icons.js +1 -2
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/themes.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +3 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +12 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +5 -5
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +8 -7
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/checkbox/checkbox.d.ts +1 -1
- package/cjs/state/checkbox/checkbox.js +11 -6
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/select/update-position.js +105 -10
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +2 -2
- package/cjs/state/state.js +14 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +1 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/util.js +1 -1
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +9 -8
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +9 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +398 -128
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +23 -5
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +4 -0
- package/es/PivotTable.js +10 -2
- package/es/PivotTable.js.map +1 -1
- package/es/components/empty-tip/empty-tip.js +2 -2
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.js +1 -1
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/title/title.js +1 -1
- package/es/components/title/title.js.map +1 -1
- package/es/core/BaseTable.js +6 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.js +1 -2
- package/es/core/animation.js +4 -3
- package/es/core/animation.js.map +1 -1
- package/es/core/record-helper.js +21 -11
- package/es/core/record-helper.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +2 -1
- package/es/dataset/statistics-helper.js +2 -2
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/edit/edit-manager.js +1 -2
- package/es/event/event.js +5 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +34 -3
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +1 -32
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/style.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 +2 -1
- package/es/layout/pivot-header-layout.js +1 -1
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/row-height-map.js +2 -1
- package/es/layout/row-height-map.js.map +1 -1
- package/es/layout/simple-header-layout.js +1 -1
- package/es/layout/tree-helper.js +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/plugins/icons.js +1 -2
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/themes.js +1 -1
- package/es/scenegraph/group-creater/column-helper.js +3 -3
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/proxy.js +12 -0
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +5 -5
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +7 -6
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/checkbox/checkbox.d.ts +1 -1
- package/es/state/checkbox/checkbox.js +11 -6
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/select/update-position.js +105 -10
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.d.ts +2 -2
- package/es/state/state.js +14 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +1 -1
- package/es/themes/theme.js.map +1 -1
- package/es/tools/util.js +1 -1
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +9 -8
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +9 -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
|
@@ -26985,6 +26985,9 @@
|
|
|
26985
26985
|
let prop;
|
|
26986
26986
|
while ((prop = paths.shift())) {
|
|
26987
26987
|
res = res[prop];
|
|
26988
|
+
if (!res) {
|
|
26989
|
+
break;
|
|
26990
|
+
}
|
|
26988
26991
|
}
|
|
26989
26992
|
return res;
|
|
26990
26993
|
}
|
|
@@ -28950,7 +28953,7 @@
|
|
|
28950
28953
|
return hasThemeProperty(obj, names) || hasThemeProperty(superTheme, names);
|
|
28951
28954
|
}
|
|
28952
28955
|
extends(obj) {
|
|
28953
|
-
return new TableTheme(obj, this.internalTheme.superTheme
|
|
28956
|
+
return new TableTheme(ingoreNoneValueMerge({}, obj), ingoreNoneValueMerge(this.internalTheme.superTheme, this.internalTheme.obj));
|
|
28954
28957
|
}
|
|
28955
28958
|
getStyle(style) {
|
|
28956
28959
|
const that = this;
|
|
@@ -29943,6 +29946,9 @@
|
|
|
29943
29946
|
else if (this.field && typeof record[this.field] === 'number') {
|
|
29944
29947
|
this.min = record[this.field] < this.min ? record[this.field] : this.min;
|
|
29945
29948
|
}
|
|
29949
|
+
else if (this.field && !isNaN(record[this.field])) {
|
|
29950
|
+
this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min;
|
|
29951
|
+
}
|
|
29946
29952
|
}
|
|
29947
29953
|
this.clearCacheValue();
|
|
29948
29954
|
}
|
|
@@ -29989,6 +29995,9 @@
|
|
|
29989
29995
|
else if (this.field && typeof record[this.field] === 'number') {
|
|
29990
29996
|
this.min = record[this.field] < this.min ? record[this.field] : this.min;
|
|
29991
29997
|
}
|
|
29998
|
+
else if (this.field && !isNaN(record[this.field])) {
|
|
29999
|
+
this.min = parseFloat(record[this.field]) < this.min ? parseFloat(record[this.field]) : this.min;
|
|
30000
|
+
}
|
|
29992
30001
|
}
|
|
29993
30002
|
}
|
|
29994
30003
|
}
|
|
@@ -40199,7 +40208,8 @@
|
|
|
40199
40208
|
});
|
|
40200
40209
|
|
|
40201
40210
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
40202
|
-
|
|
40211
|
+
table.internalProps.columnWidthConfig &&
|
|
40212
|
+
table._parseColumnWidthConfig(table.internalProps.columnWidthConfig);
|
|
40203
40213
|
colStart = colStart ?? 0;
|
|
40204
40214
|
colEnd = colEnd ?? table.colCount - 1;
|
|
40205
40215
|
if (colStart === 0 && colEnd === table.colCount - 1) {
|
|
@@ -40761,9 +40771,16 @@
|
|
|
40761
40771
|
row >= table.columnHeaderLevelCount) {
|
|
40762
40772
|
cellLocation = 'body';
|
|
40763
40773
|
}
|
|
40764
|
-
|
|
40765
|
-
|
|
40766
|
-
|
|
40774
|
+
let define;
|
|
40775
|
+
if (!table.isPivotTable() && table.isSeriesNumberInBody(col, row)) {
|
|
40776
|
+
define = table.getBodyColumnDefine(colForDefine, rowForDefine);
|
|
40777
|
+
}
|
|
40778
|
+
else {
|
|
40779
|
+
define =
|
|
40780
|
+
cellLocation !== 'body'
|
|
40781
|
+
? table.getHeaderDefine(colForDefine, rowForDefine)
|
|
40782
|
+
: table.getBodyColumnDefine(colForDefine, rowForDefine);
|
|
40783
|
+
}
|
|
40767
40784
|
let mayHaveIcon = cellLocation !== 'body'
|
|
40768
40785
|
? true
|
|
40769
40786
|
: define?.dragOrder || !!define?.icon || !!define?.tree;
|
|
@@ -41276,7 +41293,7 @@
|
|
|
41276
41293
|
}
|
|
41277
41294
|
const screenTopRow = proxy.screenTopRow;
|
|
41278
41295
|
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
41279
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
41296
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2, proxy.table.rowCount - 1);
|
|
41280
41297
|
for (let row = topRow; row <= bottomRow; row++) {
|
|
41281
41298
|
const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, true);
|
|
41282
41299
|
proxy.updateCellGroupContent(cellGroup);
|
|
@@ -41504,7 +41521,7 @@
|
|
|
41504
41521
|
}
|
|
41505
41522
|
else {
|
|
41506
41523
|
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
41507
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
41524
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2, proxy.table.rowCount - 1);
|
|
41508
41525
|
syncTopRow = topRow;
|
|
41509
41526
|
syncBottomRow = bottomRow;
|
|
41510
41527
|
}
|
|
@@ -41519,7 +41536,7 @@
|
|
|
41519
41536
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up', true);
|
|
41520
41537
|
}
|
|
41521
41538
|
proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
|
|
41522
|
-
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count));
|
|
41539
|
+
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1));
|
|
41523
41540
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
41524
41541
|
if (proxy.table.heightMode === 'autoHeight' && sync) {
|
|
41525
41542
|
proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1);
|
|
@@ -41533,7 +41550,7 @@
|
|
|
41533
41550
|
}
|
|
41534
41551
|
else {
|
|
41535
41552
|
const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
|
|
41536
|
-
const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
41553
|
+
const distEndRow = Math.min(proxy.table.rowCount - 1, direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count);
|
|
41537
41554
|
const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
|
|
41538
41555
|
let syncTopRow;
|
|
41539
41556
|
let syncBottomRow;
|
|
@@ -41543,7 +41560,7 @@
|
|
|
41543
41560
|
}
|
|
41544
41561
|
else {
|
|
41545
41562
|
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
41546
|
-
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
41563
|
+
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2, proxy.table.rowCount - 1);
|
|
41547
41564
|
}
|
|
41548
41565
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, false);
|
|
41549
41566
|
updateAllRowPosition(distStartRowY, count, direction, proxy);
|
|
@@ -41556,7 +41573,7 @@
|
|
|
41556
41573
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
41557
41574
|
}
|
|
41558
41575
|
proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
|
|
41559
|
-
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count));
|
|
41576
|
+
proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1));
|
|
41560
41577
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
41561
41578
|
if (proxy.table.heightMode === 'autoHeight' && sync) {
|
|
41562
41579
|
proxy.rowUpdatePos = proxy.rowEnd + 1;
|
|
@@ -41688,7 +41705,7 @@
|
|
|
41688
41705
|
}
|
|
41689
41706
|
else {
|
|
41690
41707
|
syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - proxy.screenRowCount * 1);
|
|
41691
|
-
syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + proxy.screenRowCount * 2);
|
|
41708
|
+
syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + proxy.screenRowCount * 2, proxy.table.rowCount - 1);
|
|
41692
41709
|
}
|
|
41693
41710
|
const oldBodyHeight = proxy.table.getAllRowsHeight();
|
|
41694
41711
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
|
|
@@ -42145,6 +42162,23 @@
|
|
|
42145
42162
|
this.firstScreenRowLimit = Math.max(30, this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight)));
|
|
42146
42163
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
42147
42164
|
}
|
|
42165
|
+
refreshRowCount() {
|
|
42166
|
+
this.bodyTopRow = this.table.frozenRowCount;
|
|
42167
|
+
this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
|
|
42168
|
+
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
42169
|
+
this.totalActualBodyRowCount = totalActualBodyRowCount;
|
|
42170
|
+
this.totalRow = this.rowStart + totalActualBodyRowCount - 1;
|
|
42171
|
+
this.rowStart = this.bodyTopRow;
|
|
42172
|
+
this.rowEnd = this.totalRow;
|
|
42173
|
+
}
|
|
42174
|
+
refreshColCount() {
|
|
42175
|
+
this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
|
|
42176
|
+
const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
|
|
42177
|
+
this.totalActualBodyColCount = totalActualBodyColCount;
|
|
42178
|
+
this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1;
|
|
42179
|
+
this.colStart = this.bodyLeftCol;
|
|
42180
|
+
this.colEnd = this.totalCol;
|
|
42181
|
+
}
|
|
42148
42182
|
resize() {
|
|
42149
42183
|
const defaultColWidth = this.table.defaultColWidth;
|
|
42150
42184
|
this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;
|
|
@@ -43276,17 +43310,25 @@
|
|
|
43276
43310
|
rowUpdatePos = isValid$1(rowUpdatePos) ? (isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
|
|
43277
43311
|
}
|
|
43278
43312
|
for (let col = 0; col < table.colCount; col++) {
|
|
43279
|
-
updateRows.forEach(
|
|
43280
|
-
|
|
43281
|
-
|
|
43282
|
-
|
|
43283
|
-
|
|
43284
|
-
|
|
43285
|
-
}
|
|
43286
|
-
}
|
|
43313
|
+
updateRows.forEach(row => {
|
|
43314
|
+
if (row < table.frozenRowCount ||
|
|
43315
|
+
row > table.rowCount - 1 ||
|
|
43316
|
+
(row < scene.table.rowCount - scene.table.bottomFrozenRowCount &&
|
|
43317
|
+
(row < scene.proxy.rowStart || row > scene.proxy.rowEnd))) {
|
|
43318
|
+
removeCellGroup(row, scene);
|
|
43287
43319
|
}
|
|
43288
43320
|
else {
|
|
43289
|
-
|
|
43321
|
+
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
43322
|
+
if (mergeInfo) {
|
|
43323
|
+
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
43324
|
+
for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
43325
|
+
updateCell$1(col, row, scene.table, false);
|
|
43326
|
+
}
|
|
43327
|
+
}
|
|
43328
|
+
}
|
|
43329
|
+
else {
|
|
43330
|
+
updateCell$1(col, row, scene.table, false);
|
|
43331
|
+
}
|
|
43290
43332
|
}
|
|
43291
43333
|
});
|
|
43292
43334
|
}
|
|
@@ -43323,7 +43365,6 @@
|
|
|
43323
43365
|
setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene);
|
|
43324
43366
|
scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);
|
|
43325
43367
|
updateBottomFrozeCellGroups();
|
|
43326
|
-
scene.proxy.progress();
|
|
43327
43368
|
}
|
|
43328
43369
|
scene.proxy.progress();
|
|
43329
43370
|
const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);
|
|
@@ -43352,7 +43393,7 @@
|
|
|
43352
43393
|
proxy.bodyBottomRow--;
|
|
43353
43394
|
const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1);
|
|
43354
43395
|
proxy.totalActualBodyRowCount = totalActualBodyRowCount;
|
|
43355
|
-
proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1;
|
|
43396
|
+
proxy.totalRow = Math.min(proxy.table.rowCount - 1, proxy.rowStart + totalActualBodyRowCount - 1);
|
|
43356
43397
|
}
|
|
43357
43398
|
function addRow(row, scene) {
|
|
43358
43399
|
const proxy = scene.proxy;
|
|
@@ -46871,7 +46912,8 @@
|
|
|
46871
46912
|
_startCol = table.rowHeaderLevelCount;
|
|
46872
46913
|
_startRow = table.columnHeaderLevelCount;
|
|
46873
46914
|
}
|
|
46874
|
-
if ((disableRowSeriesNumberSelect || disableHeaderSelect
|
|
46915
|
+
if ((disableRowSeriesNumberSelect || (disableHeaderSelect && table.transpose)) &&
|
|
46916
|
+
table.options.rowSeriesNumber) {
|
|
46875
46917
|
_startCol += 1;
|
|
46876
46918
|
}
|
|
46877
46919
|
state.select.ranges.push({
|
|
@@ -46901,16 +46943,42 @@
|
|
|
46901
46943
|
const endCol = Math.max(currentRange.start.col, currentRange.end.col, col);
|
|
46902
46944
|
const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);
|
|
46903
46945
|
const endRow = table.rowCount - 1;
|
|
46904
|
-
|
|
46905
|
-
|
|
46946
|
+
if (state.select.headerSelectMode === 'body') {
|
|
46947
|
+
currentRange.start = { col: startCol, row: table.columnHeaderLevelCount };
|
|
46948
|
+
currentRange.end = { col: endCol, row: table.rowCount - 1 };
|
|
46949
|
+
}
|
|
46950
|
+
else {
|
|
46951
|
+
currentRange.start = { col: startCol, row: startRow };
|
|
46952
|
+
currentRange.end = { col: endCol, row: endRow };
|
|
46953
|
+
}
|
|
46906
46954
|
}
|
|
46907
46955
|
else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {
|
|
46908
46956
|
const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);
|
|
46909
46957
|
const endCol = table.colCount - 1;
|
|
46910
46958
|
const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);
|
|
46911
46959
|
const endRow = Math.max(currentRange.start.row, currentRange.end.row, row);
|
|
46912
|
-
|
|
46913
|
-
|
|
46960
|
+
if (state.select.headerSelectMode === 'body') {
|
|
46961
|
+
currentRange.start = { col: table.leftRowSeriesNumberCount + table.rowHeaderLevelCount, row: startRow };
|
|
46962
|
+
currentRange.end = { col: table.colCount - 1, row: endRow };
|
|
46963
|
+
}
|
|
46964
|
+
else {
|
|
46965
|
+
currentRange.start = { col: startCol, row: startRow };
|
|
46966
|
+
currentRange.end = { col: endCol, row: endRow };
|
|
46967
|
+
}
|
|
46968
|
+
}
|
|
46969
|
+
else if (state.select.headerSelectMode !== 'cell' && table.isSeriesNumberInBody(col, row)) {
|
|
46970
|
+
const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);
|
|
46971
|
+
const endCol = table.colCount - 1;
|
|
46972
|
+
const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);
|
|
46973
|
+
const endRow = Math.max(currentRange.start.row, currentRange.end.row, row);
|
|
46974
|
+
if (state.select.headerSelectMode === 'body') {
|
|
46975
|
+
currentRange.start = { col: table.leftRowSeriesNumberCount, row: startRow };
|
|
46976
|
+
currentRange.end = { col: table.colCount - 1, row: endRow };
|
|
46977
|
+
}
|
|
46978
|
+
else {
|
|
46979
|
+
currentRange.start = { col: startCol, row: startRow };
|
|
46980
|
+
currentRange.end = { col: endCol, row: endRow };
|
|
46981
|
+
}
|
|
46914
46982
|
}
|
|
46915
46983
|
else {
|
|
46916
46984
|
currentRange.end = { col, row };
|
|
@@ -46926,35 +46994,97 @@
|
|
|
46926
46994
|
}
|
|
46927
46995
|
if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {
|
|
46928
46996
|
const cellRange = table.getCellRange(col, row);
|
|
46929
|
-
state.select.
|
|
46930
|
-
|
|
46931
|
-
|
|
46932
|
-
|
|
46933
|
-
|
|
46997
|
+
if (state.select.headerSelectMode === 'body') {
|
|
46998
|
+
state.select.ranges.push({
|
|
46999
|
+
start: { col: cellRange.start.col, row: table.columnHeaderLevelCount },
|
|
47000
|
+
end: { col: cellRange.end.col, row: table.rowCount - 1 },
|
|
47001
|
+
skipBodyMerge: true
|
|
47002
|
+
});
|
|
47003
|
+
}
|
|
47004
|
+
else {
|
|
47005
|
+
state.select.ranges.push({
|
|
47006
|
+
start: { col: cellRange.start.col, row },
|
|
47007
|
+
end: { col: cellRange.end.col, row: table.rowCount - 1 },
|
|
47008
|
+
skipBodyMerge: true
|
|
47009
|
+
});
|
|
47010
|
+
}
|
|
46934
47011
|
}
|
|
46935
47012
|
else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {
|
|
46936
47013
|
const cellRange = table.getCellRange(col, row);
|
|
46937
|
-
state.select.
|
|
46938
|
-
|
|
46939
|
-
|
|
46940
|
-
|
|
46941
|
-
|
|
47014
|
+
if (state.select.headerSelectMode === 'body') {
|
|
47015
|
+
state.select.ranges.push({
|
|
47016
|
+
start: { col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, row: cellRange.start.row },
|
|
47017
|
+
end: { col: table.colCount - 1, row: cellRange.end.row },
|
|
47018
|
+
skipBodyMerge: true
|
|
47019
|
+
});
|
|
47020
|
+
}
|
|
47021
|
+
else {
|
|
47022
|
+
state.select.ranges.push({
|
|
47023
|
+
start: { col, row: cellRange.start.row },
|
|
47024
|
+
end: { col: table.colCount - 1, row: cellRange.end.row },
|
|
47025
|
+
skipBodyMerge: true
|
|
47026
|
+
});
|
|
47027
|
+
}
|
|
46942
47028
|
}
|
|
46943
47029
|
else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) {
|
|
46944
47030
|
extendSelectRange = false;
|
|
46945
|
-
state.select.
|
|
46946
|
-
|
|
46947
|
-
|
|
46948
|
-
|
|
46949
|
-
|
|
47031
|
+
if (state.select.headerSelectMode === 'body') {
|
|
47032
|
+
state.select.ranges.push({
|
|
47033
|
+
start: {
|
|
47034
|
+
col: table.leftRowSeriesNumberCount,
|
|
47035
|
+
row: table.columnHeaderLevelCount
|
|
47036
|
+
},
|
|
47037
|
+
end: { col: table.colCount - 1, row: table.rowCount - 1 },
|
|
47038
|
+
skipBodyMerge: true
|
|
47039
|
+
});
|
|
47040
|
+
}
|
|
47041
|
+
else {
|
|
47042
|
+
state.select.ranges.push({
|
|
47043
|
+
start: { col: 0, row: 0 },
|
|
47044
|
+
end: { col: table.colCount - 1, row: table.rowCount - 1 },
|
|
47045
|
+
skipBodyMerge: true
|
|
47046
|
+
});
|
|
47047
|
+
}
|
|
46950
47048
|
}
|
|
46951
47049
|
else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
46952
47050
|
extendSelectRange = false;
|
|
46953
|
-
state.select.
|
|
46954
|
-
|
|
46955
|
-
|
|
46956
|
-
|
|
46957
|
-
|
|
47051
|
+
if (state.select.headerSelectMode === 'body') {
|
|
47052
|
+
state.select.ranges.push({
|
|
47053
|
+
start: {
|
|
47054
|
+
col: table.leftRowSeriesNumberCount,
|
|
47055
|
+
row
|
|
47056
|
+
},
|
|
47057
|
+
end: { col: table.colCount - 1, row: row },
|
|
47058
|
+
skipBodyMerge: true
|
|
47059
|
+
});
|
|
47060
|
+
}
|
|
47061
|
+
else {
|
|
47062
|
+
state.select.ranges.push({
|
|
47063
|
+
start: { col, row },
|
|
47064
|
+
end: { col: table.colCount - 1, row: row },
|
|
47065
|
+
skipBodyMerge: true
|
|
47066
|
+
});
|
|
47067
|
+
}
|
|
47068
|
+
}
|
|
47069
|
+
else if (table.internalProps.layoutMap.isCornerHeader(col, row)) {
|
|
47070
|
+
extendSelectRange = false;
|
|
47071
|
+
if (state.select.headerSelectMode === 'body') {
|
|
47072
|
+
state.select.ranges.push({
|
|
47073
|
+
start: {
|
|
47074
|
+
col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
|
|
47075
|
+
row: table.columnHeaderLevelCount
|
|
47076
|
+
},
|
|
47077
|
+
end: { col: table.colCount - 1, row: table.rowCount - 1 },
|
|
47078
|
+
skipBodyMerge: true
|
|
47079
|
+
});
|
|
47080
|
+
}
|
|
47081
|
+
else {
|
|
47082
|
+
state.select.ranges.push({
|
|
47083
|
+
start: { col: table.leftRowSeriesNumberCount, row: 0 },
|
|
47084
|
+
end: { col: table.colCount - 1, row: table.rowCount - 1 },
|
|
47085
|
+
skipBodyMerge: true
|
|
47086
|
+
});
|
|
47087
|
+
}
|
|
46958
47088
|
}
|
|
46959
47089
|
else if (col >= 0 && row >= 0) {
|
|
46960
47090
|
const cellRange = skipBodyMerge ? { start: { col, row }, end: { col, row } } : table.getCellRange(col, row);
|
|
@@ -47073,6 +47203,32 @@
|
|
|
47073
47203
|
else if (currentRange.start.row > cellRange.start.row) {
|
|
47074
47204
|
currentRange.end.row = cellRange.start.row;
|
|
47075
47205
|
}
|
|
47206
|
+
if (state.select.headerSelectMode === 'body') {
|
|
47207
|
+
if (table.isRowHeader(col, row)) {
|
|
47208
|
+
currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount;
|
|
47209
|
+
currentRange.end.col = table.colCount - 1;
|
|
47210
|
+
}
|
|
47211
|
+
else if (table.isColumnHeader(col, row)) {
|
|
47212
|
+
currentRange.start.row = table.columnHeaderLevelCount;
|
|
47213
|
+
currentRange.end.row = table.rowCount - 1;
|
|
47214
|
+
}
|
|
47215
|
+
else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) {
|
|
47216
|
+
currentRange.start.col = table.leftRowSeriesNumberCount;
|
|
47217
|
+
currentRange.end.col = table.colCount - 1;
|
|
47218
|
+
}
|
|
47219
|
+
else if (table.isCornerHeader(col, row)) {
|
|
47220
|
+
currentRange.start.col = table.rowHeaderLevelCount + table.leftRowSeriesNumberCount;
|
|
47221
|
+
currentRange.start.row = table.columnHeaderLevelCount;
|
|
47222
|
+
currentRange.end.col = table.colCount - 1;
|
|
47223
|
+
currentRange.end.row = table.rowCount - 1;
|
|
47224
|
+
}
|
|
47225
|
+
else if (table.isSeriesNumber(col, row)) {
|
|
47226
|
+
currentRange.start.col = table.leftRowSeriesNumberCount;
|
|
47227
|
+
currentRange.start.row = table.columnHeaderLevelCount;
|
|
47228
|
+
currentRange.end.col = table.colCount - 1;
|
|
47229
|
+
currentRange.end.row = table.rowCount - 1;
|
|
47230
|
+
}
|
|
47231
|
+
}
|
|
47076
47232
|
if (skipBodyMerge) {
|
|
47077
47233
|
currentRange.skipBodyMerge = true;
|
|
47078
47234
|
}
|
|
@@ -47880,7 +48036,7 @@
|
|
|
47880
48036
|
state.headerCheckedState[field] = checked;
|
|
47881
48037
|
}
|
|
47882
48038
|
else if (state.checkedState?.length > 0) {
|
|
47883
|
-
const isAllChecked = state.updateHeaderCheckedState(field);
|
|
48039
|
+
const isAllChecked = state.updateHeaderCheckedState(field, col, row);
|
|
47884
48040
|
return isAllChecked;
|
|
47885
48041
|
}
|
|
47886
48042
|
return state.headerCheckedState[field];
|
|
@@ -47958,23 +48114,37 @@
|
|
|
47958
48114
|
});
|
|
47959
48115
|
}
|
|
47960
48116
|
}
|
|
47961
|
-
function updateHeaderCheckedState(field, state) {
|
|
47962
|
-
const allChecked = state.checkedState.every((
|
|
47963
|
-
|
|
48117
|
+
function updateHeaderCheckedState(field, state, col, row) {
|
|
48118
|
+
const allChecked = state.checkedState.every((check_state, index) => {
|
|
48119
|
+
const tableIndex = state.table.getTableIndexByRecordIndex(index);
|
|
48120
|
+
const mergeCell = state.table.transpose
|
|
48121
|
+
? state.table.getCustomMerge(tableIndex, row)
|
|
48122
|
+
: state.table.getCustomMerge(col, tableIndex);
|
|
48123
|
+
if (mergeCell) {
|
|
48124
|
+
return true;
|
|
48125
|
+
}
|
|
48126
|
+
return check_state?.[field] === true;
|
|
47964
48127
|
});
|
|
47965
48128
|
if (allChecked) {
|
|
47966
48129
|
state.headerCheckedState[field] = true;
|
|
47967
48130
|
return allChecked;
|
|
47968
48131
|
}
|
|
47969
|
-
const allUnChecked = state.checkedState.every((
|
|
47970
|
-
|
|
48132
|
+
const allUnChecked = state.checkedState.every((check_state, index) => {
|
|
48133
|
+
const tableIndex = state.table.getTableIndexByRecordIndex(index);
|
|
48134
|
+
const mergeCell = state.table.transpose
|
|
48135
|
+
? state.table.getCustomMerge(tableIndex, row)
|
|
48136
|
+
: state.table.getCustomMerge(col, tableIndex);
|
|
48137
|
+
if (mergeCell) {
|
|
48138
|
+
return true;
|
|
48139
|
+
}
|
|
48140
|
+
return check_state?.[field] === false;
|
|
47971
48141
|
});
|
|
47972
48142
|
if (allUnChecked) {
|
|
47973
48143
|
state.headerCheckedState[field] = false;
|
|
47974
48144
|
return false;
|
|
47975
48145
|
}
|
|
47976
|
-
const hasChecked = state.checkedState.find((
|
|
47977
|
-
return
|
|
48146
|
+
const hasChecked = state.checkedState.find((check_state) => {
|
|
48147
|
+
return check_state?.[field] === true;
|
|
47978
48148
|
});
|
|
47979
48149
|
if (hasChecked) {
|
|
47980
48150
|
state.headerCheckedState[field] = 'indeterminate';
|
|
@@ -49172,6 +49342,15 @@
|
|
|
49172
49342
|
return;
|
|
49173
49343
|
}
|
|
49174
49344
|
dealFreeze(col, row, this.table);
|
|
49345
|
+
if (this.table.hasListeners(PIVOT_TABLE_EVENT_TYPE.FREEZE_CLICK)) {
|
|
49346
|
+
const fields = this.table.internalProps.layoutMap.columnObjects.slice(0, col + 1);
|
|
49347
|
+
this.table.fireListeners(PIVOT_TABLE_EVENT_TYPE.FREEZE_CLICK, {
|
|
49348
|
+
col: col,
|
|
49349
|
+
row: row,
|
|
49350
|
+
fields: fields.reduce((pre, cur) => pre.concat(cur.field), []),
|
|
49351
|
+
colCount: this.table.frozenColCount
|
|
49352
|
+
});
|
|
49353
|
+
}
|
|
49175
49354
|
this.frozen.icon = iconMark;
|
|
49176
49355
|
}
|
|
49177
49356
|
updateCursor(mode = 'default') {
|
|
@@ -49215,8 +49394,8 @@
|
|
|
49215
49394
|
initCheckedState(records) {
|
|
49216
49395
|
return initCheckedState(records, this);
|
|
49217
49396
|
}
|
|
49218
|
-
updateHeaderCheckedState(field) {
|
|
49219
|
-
return updateHeaderCheckedState(field, this);
|
|
49397
|
+
updateHeaderCheckedState(field, col, row) {
|
|
49398
|
+
return updateHeaderCheckedState(field, this, col, row);
|
|
49220
49399
|
}
|
|
49221
49400
|
initLeftRecordsCheckState(records) {
|
|
49222
49401
|
return initLeftRecordsCheckState(records, this);
|
|
@@ -49756,60 +49935,6 @@
|
|
|
49756
49935
|
});
|
|
49757
49936
|
}
|
|
49758
49937
|
});
|
|
49759
|
-
table.scenegraph.tableGroup.addEventListener('pointerupoutside', (e) => {
|
|
49760
|
-
const eventArgsSet = getCellEventArgsSet(e);
|
|
49761
|
-
if (stateManager.menu.isShow && eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
49762
|
-
setTimeout(() => {
|
|
49763
|
-
if (!table.internalProps.menuHandler.pointInMenuElement(e.client.x, e.client.y)) {
|
|
49764
|
-
stateManager.menu.isShow && stateManager.hideMenu();
|
|
49765
|
-
}
|
|
49766
|
-
}, 0);
|
|
49767
|
-
}
|
|
49768
|
-
if (stateManager.isResizeCol()) {
|
|
49769
|
-
endResizeCol(table);
|
|
49770
|
-
}
|
|
49771
|
-
else if (stateManager.isResizeRow()) {
|
|
49772
|
-
endResizeRow(table);
|
|
49773
|
-
}
|
|
49774
|
-
else if (stateManager.isMoveCol()) {
|
|
49775
|
-
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
49776
|
-
if (endMoveColSuccess &&
|
|
49777
|
-
table.stateManager.columnMove?.colSource !== -1 &&
|
|
49778
|
-
table.stateManager.columnMove?.rowSource !== -1 &&
|
|
49779
|
-
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
49780
|
-
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
49781
|
-
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
49782
|
-
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
49783
|
-
target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
|
|
49784
|
-
source: {
|
|
49785
|
-
col: table.stateManager.columnMove.colSource,
|
|
49786
|
-
row: table.stateManager.columnMove.rowSource
|
|
49787
|
-
},
|
|
49788
|
-
event: e.nativeEvent
|
|
49789
|
-
});
|
|
49790
|
-
}
|
|
49791
|
-
}
|
|
49792
|
-
}
|
|
49793
|
-
else if (stateManager.isSelecting()) {
|
|
49794
|
-
if (table.stateManager.select?.ranges?.length) {
|
|
49795
|
-
const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col;
|
|
49796
|
-
const lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
|
|
49797
|
-
table.stateManager.endSelectCells();
|
|
49798
|
-
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
49799
|
-
const cellsEvent = {
|
|
49800
|
-
event: e.nativeEvent,
|
|
49801
|
-
cells: [],
|
|
49802
|
-
col: lastCol,
|
|
49803
|
-
row: lastRow,
|
|
49804
|
-
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
49805
|
-
target: undefined
|
|
49806
|
-
};
|
|
49807
|
-
cellsEvent.cells = table.getSelectedCellInfos();
|
|
49808
|
-
table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
|
|
49809
|
-
}
|
|
49810
|
-
}
|
|
49811
|
-
}
|
|
49812
|
-
});
|
|
49813
49938
|
const globalPointerupCallback = (e) => {
|
|
49814
49939
|
const target = e.target;
|
|
49815
49940
|
if (!table.getElement().contains(target)) {
|
|
@@ -50235,7 +50360,7 @@
|
|
|
50235
50360
|
const cellType = table.getCellType(col, row);
|
|
50236
50361
|
if (cellType === 'checkbox') {
|
|
50237
50362
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field];
|
|
50238
|
-
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field);
|
|
50363
|
+
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
|
|
50239
50364
|
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
50240
50365
|
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
50241
50366
|
}
|
|
@@ -51002,7 +51127,64 @@
|
|
|
51002
51127
|
callback: globalPointerdownCallback
|
|
51003
51128
|
});
|
|
51004
51129
|
document.body.addEventListener('pointerdown', globalPointerdownCallback);
|
|
51130
|
+
const globalPointerupOutsideCallback = (e) => {
|
|
51131
|
+
if (stateManager.menu.isShow) {
|
|
51132
|
+
setTimeout(() => {
|
|
51133
|
+
if (!table.internalProps.menuHandler.pointInMenuElement(e.clientX, e.clientY)) {
|
|
51134
|
+
stateManager.menu.isShow && stateManager.hideMenu();
|
|
51135
|
+
}
|
|
51136
|
+
}, 0);
|
|
51137
|
+
}
|
|
51138
|
+
if (stateManager.isResizeCol()) {
|
|
51139
|
+
endResizeCol(table);
|
|
51140
|
+
}
|
|
51141
|
+
else if (stateManager.isResizeRow()) {
|
|
51142
|
+
endResizeRow(table);
|
|
51143
|
+
}
|
|
51144
|
+
else if (stateManager.isMoveCol()) {
|
|
51145
|
+
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
51146
|
+
if (endMoveColSuccess &&
|
|
51147
|
+
table.stateManager.columnMove?.colSource !== -1 &&
|
|
51148
|
+
table.stateManager.columnMove?.rowSource !== -1 &&
|
|
51149
|
+
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
51150
|
+
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
51151
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
51152
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
51153
|
+
target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
|
|
51154
|
+
source: {
|
|
51155
|
+
col: table.stateManager.columnMove.colSource,
|
|
51156
|
+
row: table.stateManager.columnMove.rowSource
|
|
51157
|
+
},
|
|
51158
|
+
event: e
|
|
51159
|
+
});
|
|
51160
|
+
}
|
|
51161
|
+
}
|
|
51162
|
+
}
|
|
51163
|
+
else if (stateManager.isSelecting()) {
|
|
51164
|
+
if (table.stateManager.select?.ranges?.length) {
|
|
51165
|
+
const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col;
|
|
51166
|
+
const lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
|
|
51167
|
+
table.stateManager.endSelectCells();
|
|
51168
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
51169
|
+
const cellsEvent = {
|
|
51170
|
+
event: e,
|
|
51171
|
+
cells: [],
|
|
51172
|
+
col: lastCol,
|
|
51173
|
+
row: lastRow,
|
|
51174
|
+
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
51175
|
+
target: undefined
|
|
51176
|
+
};
|
|
51177
|
+
cellsEvent.cells = table.getSelectedCellInfos();
|
|
51178
|
+
table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
|
|
51179
|
+
}
|
|
51180
|
+
}
|
|
51181
|
+
}
|
|
51182
|
+
};
|
|
51005
51183
|
const globalPointerupCallback = (e) => {
|
|
51184
|
+
const target = e.target;
|
|
51185
|
+
if (target !== table.canvas) {
|
|
51186
|
+
globalPointerupOutsideCallback(e);
|
|
51187
|
+
}
|
|
51006
51188
|
table.eventManager.LastBodyPointerXY = null;
|
|
51007
51189
|
table.eventManager.isDown = false;
|
|
51008
51190
|
table.eventManager.isDraging = false;
|
|
@@ -51060,6 +51242,9 @@
|
|
|
51060
51242
|
const leftFrozenColsWidth = table.getFrozenColsWidth();
|
|
51061
51243
|
const rightFrozenColsWidth = table.getRightFrozenColsWidth();
|
|
51062
51244
|
const startCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].start;
|
|
51245
|
+
if (table.isSeriesNumber(startCell.col, startCell.row)) {
|
|
51246
|
+
return;
|
|
51247
|
+
}
|
|
51063
51248
|
const endCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end;
|
|
51064
51249
|
const canScrollY = (table.isFrozenRow(startCell.row) === false || table.isFrozenRow(endCell.row) === false) &&
|
|
51065
51250
|
table.getAllRowsHeight() > table.tableNoFrameHeight;
|
|
@@ -51639,6 +51824,11 @@
|
|
|
51639
51824
|
}
|
|
51640
51825
|
deelTableSelectAll() {
|
|
51641
51826
|
this.table.stateManager.updateSelectPos(-1, -1, false, false, true);
|
|
51827
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CELL, {
|
|
51828
|
+
ranges: this.table.stateManager.select.ranges,
|
|
51829
|
+
col: 0,
|
|
51830
|
+
row: 0
|
|
51831
|
+
});
|
|
51642
51832
|
}
|
|
51643
51833
|
dealMenuSelect(eventArgsSet) {
|
|
51644
51834
|
}
|
|
@@ -53507,6 +53697,9 @@
|
|
|
53507
53697
|
this.difference.clear();
|
|
53508
53698
|
}
|
|
53509
53699
|
add(position, value) {
|
|
53700
|
+
if (!isValid$1(value)) {
|
|
53701
|
+
return;
|
|
53702
|
+
}
|
|
53510
53703
|
const defaultValue = this.table.getRowHeight(position);
|
|
53511
53704
|
if (!this.data.has(position)) {
|
|
53512
53705
|
this._keys.push(position);
|
|
@@ -53530,6 +53723,9 @@
|
|
|
53530
53723
|
}
|
|
53531
53724
|
}
|
|
53532
53725
|
put(position, newValue) {
|
|
53726
|
+
if (!isValid$1(newValue)) {
|
|
53727
|
+
return;
|
|
53728
|
+
}
|
|
53533
53729
|
if (this.data.has(position)) {
|
|
53534
53730
|
const oldValue = this.data.get(position);
|
|
53535
53731
|
if (oldValue === newValue) {
|
|
@@ -55872,11 +56068,10 @@
|
|
|
55872
56068
|
};
|
|
55873
56069
|
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
|
|
55874
56070
|
const easing = !isBoolean$2(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
|
|
55875
|
-
|
|
56071
|
+
new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
55876
56072
|
graphic: this.tempGraphic,
|
|
55877
56073
|
table: this.table
|
|
55878
56074
|
}));
|
|
55879
|
-
this.timeline.addAnimate(animation);
|
|
55880
56075
|
this.ticker.start();
|
|
55881
56076
|
}
|
|
55882
56077
|
clear() {
|
|
@@ -55919,7 +56114,7 @@
|
|
|
55919
56114
|
return TABLE_EVENT_TYPE;
|
|
55920
56115
|
}
|
|
55921
56116
|
options;
|
|
55922
|
-
version = "1.10.
|
|
56117
|
+
version = "1.10.2";
|
|
55923
56118
|
pagination;
|
|
55924
56119
|
id = `VTable${Date.now()}`;
|
|
55925
56120
|
headerStyleCache;
|
|
@@ -57423,7 +57618,11 @@
|
|
|
57423
57618
|
return getTargetColAt(absoluteX, this);
|
|
57424
57619
|
}
|
|
57425
57620
|
getTargetRowAt(absoluteY) {
|
|
57426
|
-
|
|
57621
|
+
const targetRow = getTargetRowAt(absoluteY, this);
|
|
57622
|
+
if (targetRow) {
|
|
57623
|
+
targetRow.row = Math.min(targetRow.row, this.rowCount - 1);
|
|
57624
|
+
}
|
|
57625
|
+
return targetRow;
|
|
57427
57626
|
}
|
|
57428
57627
|
getTargetColAtConsiderRightFrozen(absoluteX, isConsider) {
|
|
57429
57628
|
return getTargetColAtConsiderRightFrozen(absoluteX, isConsider, this);
|
|
@@ -61194,7 +61393,25 @@
|
|
|
61194
61393
|
break;
|
|
61195
61394
|
}
|
|
61196
61395
|
thisRowPasteColEnd = startCol + j;
|
|
61197
|
-
|
|
61396
|
+
let isCanChange = false;
|
|
61397
|
+
if (workOnEditableCell === false) {
|
|
61398
|
+
isCanChange = true;
|
|
61399
|
+
}
|
|
61400
|
+
else {
|
|
61401
|
+
if (table.isHasEditorDefine(startCol + j, startRow + i)) {
|
|
61402
|
+
const editor = table.getEditor(startCol + j, startRow + i);
|
|
61403
|
+
const oldValue = oldValues[i][j];
|
|
61404
|
+
const value = rowValues[j];
|
|
61405
|
+
const maybePromiseOrValue = editor?.validateValue?.(value, oldValue) ?? true;
|
|
61406
|
+
if (isPromise(maybePromiseOrValue)) {
|
|
61407
|
+
isCanChange = true;
|
|
61408
|
+
}
|
|
61409
|
+
else {
|
|
61410
|
+
isCanChange = maybePromiseOrValue;
|
|
61411
|
+
}
|
|
61412
|
+
}
|
|
61413
|
+
}
|
|
61414
|
+
if (isCanChange) {
|
|
61198
61415
|
const value = rowValues[j];
|
|
61199
61416
|
const recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i);
|
|
61200
61417
|
const { field } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i);
|
|
@@ -62090,6 +62307,7 @@
|
|
|
62090
62307
|
this.scenegraph.clearCells();
|
|
62091
62308
|
this.dataSource.updatePagination(this.pagination);
|
|
62092
62309
|
this.refreshRowColCount();
|
|
62310
|
+
this.stateManager.initCheckedState(this.records);
|
|
62093
62311
|
this.scenegraph.createSceneGraph();
|
|
62094
62312
|
this.renderAsync();
|
|
62095
62313
|
}
|
|
@@ -62313,10 +62531,29 @@
|
|
|
62313
62531
|
const diffDataIndices = this.dataSource.toggleHierarchyState(index, this.scenegraph.proxy.rowStart - this.columnHeaderLevelCount, Math.max(this.scenegraph.proxy.rowEnd - this.columnHeaderLevelCount, this.scenegraph.proxy.rowStart - this.columnHeaderLevelCount + this.scenegraph.proxy.rowLimit - 1));
|
|
62314
62532
|
const diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
|
|
62315
62533
|
this.refreshRowColCount();
|
|
62534
|
+
for (let row = this.rowCount - this.bottomFrozenRowCount; row < this.rowCount; row++) {
|
|
62535
|
+
const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
|
|
62536
|
+
this._setRowHeight(row, newHeight);
|
|
62537
|
+
}
|
|
62316
62538
|
this.clearCellStyleCache();
|
|
62317
62539
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
62318
62540
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
62319
|
-
|
|
62541
|
+
const updateCells = [{ col, row }];
|
|
62542
|
+
if (diffPositions.removeCellPositions?.length > 0 &&
|
|
62543
|
+
diffPositions.removeCellPositions[diffPositions.removeCellPositions.length - 1].row >=
|
|
62544
|
+
this.scenegraph.proxy.rowEnd) {
|
|
62545
|
+
for (let i = 0; i <= diffPositions.removeCellPositions.length - 1; i++) {
|
|
62546
|
+
if (diffPositions.removeCellPositions[i].row <= this.scenegraph.proxy.rowEnd) {
|
|
62547
|
+
updateCells.push({
|
|
62548
|
+
col: diffPositions.removeCellPositions[i].col,
|
|
62549
|
+
row: diffPositions.removeCellPositions[i].row
|
|
62550
|
+
});
|
|
62551
|
+
}
|
|
62552
|
+
}
|
|
62553
|
+
diffPositions.removeCellPositions = [];
|
|
62554
|
+
this.scenegraph.proxy.refreshRowCount();
|
|
62555
|
+
}
|
|
62556
|
+
this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells);
|
|
62320
62557
|
if (checkHasChart) {
|
|
62321
62558
|
if (this.autoFillWidth && !notFillWidth) {
|
|
62322
62559
|
notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth;
|
|
@@ -62412,6 +62649,7 @@
|
|
|
62412
62649
|
this.dataSource.updateFilterRules(filterRules);
|
|
62413
62650
|
}
|
|
62414
62651
|
this.refreshRowColCount();
|
|
62652
|
+
this.stateManager.initCheckedState(this.records);
|
|
62415
62653
|
this.scenegraph.createSceneGraph();
|
|
62416
62654
|
}
|
|
62417
62655
|
getCheckboxState(field) {
|
|
@@ -63593,10 +63831,14 @@
|
|
|
63593
63831
|
: 0;
|
|
63594
63832
|
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
63595
63833
|
? this.table.getDrawRange().width
|
|
63596
|
-
: this.table.tableNoFrameWidth) -
|
|
63834
|
+
: this.table.tableNoFrameWidth) -
|
|
63835
|
+
leftHeaderWidth -
|
|
63836
|
+
this.table.getTheme().scrollStyle.width;
|
|
63597
63837
|
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
63598
63838
|
? this.table.getDrawRange().height
|
|
63599
|
-
: this.table.tableNoFrameHeight) -
|
|
63839
|
+
: this.table.tableNoFrameHeight) -
|
|
63840
|
+
topHeaderHeight -
|
|
63841
|
+
this.table.getTheme().scrollStyle.width;
|
|
63600
63842
|
this._emptyTipComponent.setAttributes({
|
|
63601
63843
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
63602
63844
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -63641,10 +63883,14 @@
|
|
|
63641
63883
|
: 0;
|
|
63642
63884
|
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
63643
63885
|
? this.table.getDrawRange().width
|
|
63644
|
-
: this.table.tableNoFrameWidth) -
|
|
63886
|
+
: this.table.tableNoFrameWidth) -
|
|
63887
|
+
leftHeaderWidth -
|
|
63888
|
+
this.table.getTheme().scrollStyle.width;
|
|
63645
63889
|
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
63646
63890
|
? this.table.getDrawRange().height
|
|
63647
|
-
: this.table.tableNoFrameHeight) -
|
|
63891
|
+
: this.table.tableNoFrameHeight) -
|
|
63892
|
+
topHeaderHeight -
|
|
63893
|
+
this.table.getTheme().scrollStyle.width;
|
|
63648
63894
|
return {
|
|
63649
63895
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
63650
63896
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -64597,7 +64843,7 @@
|
|
|
64597
64843
|
const abstractPos = table._getMouseAbstractPoint(e.event, false);
|
|
64598
64844
|
let menu = null;
|
|
64599
64845
|
if (abstractPos.inTable && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
64600
|
-
menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col);
|
|
64846
|
+
menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table);
|
|
64601
64847
|
}
|
|
64602
64848
|
else if (abstractPos.inTable && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
64603
64849
|
menu = table.internalProps.menu?.contextMenuItems;
|
|
@@ -64660,9 +64906,17 @@
|
|
|
64660
64906
|
}
|
|
64661
64907
|
const padding = getQuadProps(this._titleOption.padding ?? 10);
|
|
64662
64908
|
const realWidth = this._titleOption.width ??
|
|
64663
|
-
|
|
64909
|
+
(this.table.widthMode === 'adaptive'
|
|
64910
|
+
? this.table.tableNoFrameWidth
|
|
64911
|
+
: Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)) -
|
|
64912
|
+
padding[1] -
|
|
64913
|
+
padding[3];
|
|
64664
64914
|
const realHeight = this._titleOption.height ??
|
|
64665
|
-
|
|
64915
|
+
(this.table.heightMode === 'adaptive'
|
|
64916
|
+
? this.table.tableNoFrameHeight
|
|
64917
|
+
: Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height)) -
|
|
64918
|
+
padding[0] -
|
|
64919
|
+
padding[2];
|
|
64666
64920
|
this._titleComponent.setAttributes({
|
|
64667
64921
|
x: this._titleOption.x ?? this._titleOption.orient === 'right'
|
|
64668
64922
|
? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)
|
|
@@ -68252,7 +68506,9 @@
|
|
|
68252
68506
|
return false;
|
|
68253
68507
|
}
|
|
68254
68508
|
isColumnHeader(col, row) {
|
|
68255
|
-
if (col >= this.rowHeaderLevelCount
|
|
68509
|
+
if (col >= this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount &&
|
|
68510
|
+
row >= 0 &&
|
|
68511
|
+
row < this.columnHeaderLevelCount) {
|
|
68256
68512
|
return true;
|
|
68257
68513
|
}
|
|
68258
68514
|
return false;
|
|
@@ -72129,6 +72385,7 @@
|
|
|
72129
72385
|
this.internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
72130
72386
|
this.internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
72131
72387
|
this.internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
72388
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
72132
72389
|
const records = this.internalProps.records;
|
|
72133
72390
|
this.internalProps.recordsIsTwoDimensionalArray = false;
|
|
72134
72391
|
if (records?.[0]?.constructor === Array) {
|
|
@@ -72253,6 +72510,7 @@
|
|
|
72253
72510
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
72254
72511
|
internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
72255
72512
|
internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
72513
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
72256
72514
|
if (options?.rowHierarchyType === 'tree' &&
|
|
72257
72515
|
this.internalProps.layoutMap.rowHierarchyType === 'tree' &&
|
|
72258
72516
|
this.internalProps.layoutMap.rowExpandLevel === options?.rowExpandLevel) {
|
|
@@ -72866,6 +73124,18 @@
|
|
|
72866
73124
|
});
|
|
72867
73125
|
}
|
|
72868
73126
|
}
|
|
73127
|
+
_parseColumnWidthConfig(columnWidthConfig) {
|
|
73128
|
+
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
73129
|
+
const item = columnWidthConfig[i];
|
|
73130
|
+
const dimensions = item.dimensions;
|
|
73131
|
+
const width = item.width;
|
|
73132
|
+
const cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
73133
|
+
if (cell && !this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
73134
|
+
this._setColWidth(cell.col, width);
|
|
73135
|
+
this.internalProps._widthResizedColMap.add(cell.col);
|
|
73136
|
+
}
|
|
73137
|
+
}
|
|
73138
|
+
}
|
|
72869
73139
|
updatePivotSortState(pivotSortStateConfig) {
|
|
72870
73140
|
this.pivotSortState = pivotSortStateConfig;
|
|
72871
73141
|
}
|
|
@@ -75166,7 +75436,7 @@
|
|
|
75166
75436
|
}
|
|
75167
75437
|
|
|
75168
75438
|
registerForVrender();
|
|
75169
|
-
const version = "1.10.
|
|
75439
|
+
const version = "1.10.2";
|
|
75170
75440
|
function getIcons() {
|
|
75171
75441
|
return get$2();
|
|
75172
75442
|
}
|