@visactor/vtable 1.10.2-alpha.0 → 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/body-helper/style.js +2 -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 +4 -2
- 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 +0 -31
- 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.js +2 -2
- 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 +1 -1
- package/cjs/state/state.js +12 -2
- 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 +8 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +375 -119
- 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/body-helper/style.js +2 -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 +4 -2
- 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 +0 -31
- 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.js +2 -2
- 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 +1 -1
- package/es/state/state.js +12 -2
- 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 +8 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
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
|
}
|
|
@@ -47967,7 +48123,7 @@
|
|
|
47967
48123
|
if (mergeCell) {
|
|
47968
48124
|
return true;
|
|
47969
48125
|
}
|
|
47970
|
-
return check_state[field] === true;
|
|
48126
|
+
return check_state?.[field] === true;
|
|
47971
48127
|
});
|
|
47972
48128
|
if (allChecked) {
|
|
47973
48129
|
state.headerCheckedState[field] = true;
|
|
@@ -47981,7 +48137,7 @@
|
|
|
47981
48137
|
if (mergeCell) {
|
|
47982
48138
|
return true;
|
|
47983
48139
|
}
|
|
47984
|
-
return check_state[field] === false;
|
|
48140
|
+
return check_state?.[field] === false;
|
|
47985
48141
|
});
|
|
47986
48142
|
if (allUnChecked) {
|
|
47987
48143
|
state.headerCheckedState[field] = false;
|
|
@@ -49186,6 +49342,15 @@
|
|
|
49186
49342
|
return;
|
|
49187
49343
|
}
|
|
49188
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
|
+
}
|
|
49189
49354
|
this.frozen.icon = iconMark;
|
|
49190
49355
|
}
|
|
49191
49356
|
updateCursor(mode = 'default') {
|
|
@@ -49770,60 +49935,6 @@
|
|
|
49770
49935
|
});
|
|
49771
49936
|
}
|
|
49772
49937
|
});
|
|
49773
|
-
table.scenegraph.tableGroup.addEventListener('pointerupoutside', (e) => {
|
|
49774
|
-
const eventArgsSet = getCellEventArgsSet(e);
|
|
49775
|
-
if (stateManager.menu.isShow && eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
49776
|
-
setTimeout(() => {
|
|
49777
|
-
if (!table.internalProps.menuHandler.pointInMenuElement(e.client.x, e.client.y)) {
|
|
49778
|
-
stateManager.menu.isShow && stateManager.hideMenu();
|
|
49779
|
-
}
|
|
49780
|
-
}, 0);
|
|
49781
|
-
}
|
|
49782
|
-
if (stateManager.isResizeCol()) {
|
|
49783
|
-
endResizeCol(table);
|
|
49784
|
-
}
|
|
49785
|
-
else if (stateManager.isResizeRow()) {
|
|
49786
|
-
endResizeRow(table);
|
|
49787
|
-
}
|
|
49788
|
-
else if (stateManager.isMoveCol()) {
|
|
49789
|
-
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
49790
|
-
if (endMoveColSuccess &&
|
|
49791
|
-
table.stateManager.columnMove?.colSource !== -1 &&
|
|
49792
|
-
table.stateManager.columnMove?.rowSource !== -1 &&
|
|
49793
|
-
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
49794
|
-
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
49795
|
-
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
49796
|
-
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
49797
|
-
target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
|
|
49798
|
-
source: {
|
|
49799
|
-
col: table.stateManager.columnMove.colSource,
|
|
49800
|
-
row: table.stateManager.columnMove.rowSource
|
|
49801
|
-
},
|
|
49802
|
-
event: e.nativeEvent
|
|
49803
|
-
});
|
|
49804
|
-
}
|
|
49805
|
-
}
|
|
49806
|
-
}
|
|
49807
|
-
else if (stateManager.isSelecting()) {
|
|
49808
|
-
if (table.stateManager.select?.ranges?.length) {
|
|
49809
|
-
const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col;
|
|
49810
|
-
const lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
|
|
49811
|
-
table.stateManager.endSelectCells();
|
|
49812
|
-
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
49813
|
-
const cellsEvent = {
|
|
49814
|
-
event: e.nativeEvent,
|
|
49815
|
-
cells: [],
|
|
49816
|
-
col: lastCol,
|
|
49817
|
-
row: lastRow,
|
|
49818
|
-
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
49819
|
-
target: undefined
|
|
49820
|
-
};
|
|
49821
|
-
cellsEvent.cells = table.getSelectedCellInfos();
|
|
49822
|
-
table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
|
|
49823
|
-
}
|
|
49824
|
-
}
|
|
49825
|
-
}
|
|
49826
|
-
});
|
|
49827
49938
|
const globalPointerupCallback = (e) => {
|
|
49828
49939
|
const target = e.target;
|
|
49829
49940
|
if (!table.getElement().contains(target)) {
|
|
@@ -51016,7 +51127,64 @@
|
|
|
51016
51127
|
callback: globalPointerdownCallback
|
|
51017
51128
|
});
|
|
51018
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
|
+
};
|
|
51019
51183
|
const globalPointerupCallback = (e) => {
|
|
51184
|
+
const target = e.target;
|
|
51185
|
+
if (target !== table.canvas) {
|
|
51186
|
+
globalPointerupOutsideCallback(e);
|
|
51187
|
+
}
|
|
51020
51188
|
table.eventManager.LastBodyPointerXY = null;
|
|
51021
51189
|
table.eventManager.isDown = false;
|
|
51022
51190
|
table.eventManager.isDraging = false;
|
|
@@ -51074,6 +51242,9 @@
|
|
|
51074
51242
|
const leftFrozenColsWidth = table.getFrozenColsWidth();
|
|
51075
51243
|
const rightFrozenColsWidth = table.getRightFrozenColsWidth();
|
|
51076
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
|
+
}
|
|
51077
51248
|
const endCell = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end;
|
|
51078
51249
|
const canScrollY = (table.isFrozenRow(startCell.row) === false || table.isFrozenRow(endCell.row) === false) &&
|
|
51079
51250
|
table.getAllRowsHeight() > table.tableNoFrameHeight;
|
|
@@ -51653,6 +51824,11 @@
|
|
|
51653
51824
|
}
|
|
51654
51825
|
deelTableSelectAll() {
|
|
51655
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
|
+
});
|
|
51656
51832
|
}
|
|
51657
51833
|
dealMenuSelect(eventArgsSet) {
|
|
51658
51834
|
}
|
|
@@ -53521,6 +53697,9 @@
|
|
|
53521
53697
|
this.difference.clear();
|
|
53522
53698
|
}
|
|
53523
53699
|
add(position, value) {
|
|
53700
|
+
if (!isValid$1(value)) {
|
|
53701
|
+
return;
|
|
53702
|
+
}
|
|
53524
53703
|
const defaultValue = this.table.getRowHeight(position);
|
|
53525
53704
|
if (!this.data.has(position)) {
|
|
53526
53705
|
this._keys.push(position);
|
|
@@ -53544,6 +53723,9 @@
|
|
|
53544
53723
|
}
|
|
53545
53724
|
}
|
|
53546
53725
|
put(position, newValue) {
|
|
53726
|
+
if (!isValid$1(newValue)) {
|
|
53727
|
+
return;
|
|
53728
|
+
}
|
|
53547
53729
|
if (this.data.has(position)) {
|
|
53548
53730
|
const oldValue = this.data.get(position);
|
|
53549
53731
|
if (oldValue === newValue) {
|
|
@@ -55886,11 +56068,10 @@
|
|
|
55886
56068
|
};
|
|
55887
56069
|
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
|
|
55888
56070
|
const easing = !isBoolean$2(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
|
|
55889
|
-
|
|
56071
|
+
new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
55890
56072
|
graphic: this.tempGraphic,
|
|
55891
56073
|
table: this.table
|
|
55892
56074
|
}));
|
|
55893
|
-
this.timeline.addAnimate(animation);
|
|
55894
56075
|
this.ticker.start();
|
|
55895
56076
|
}
|
|
55896
56077
|
clear() {
|
|
@@ -55933,7 +56114,7 @@
|
|
|
55933
56114
|
return TABLE_EVENT_TYPE;
|
|
55934
56115
|
}
|
|
55935
56116
|
options;
|
|
55936
|
-
version = "1.10.2
|
|
56117
|
+
version = "1.10.2";
|
|
55937
56118
|
pagination;
|
|
55938
56119
|
id = `VTable${Date.now()}`;
|
|
55939
56120
|
headerStyleCache;
|
|
@@ -57437,7 +57618,11 @@
|
|
|
57437
57618
|
return getTargetColAt(absoluteX, this);
|
|
57438
57619
|
}
|
|
57439
57620
|
getTargetRowAt(absoluteY) {
|
|
57440
|
-
|
|
57621
|
+
const targetRow = getTargetRowAt(absoluteY, this);
|
|
57622
|
+
if (targetRow) {
|
|
57623
|
+
targetRow.row = Math.min(targetRow.row, this.rowCount - 1);
|
|
57624
|
+
}
|
|
57625
|
+
return targetRow;
|
|
57441
57626
|
}
|
|
57442
57627
|
getTargetColAtConsiderRightFrozen(absoluteX, isConsider) {
|
|
57443
57628
|
return getTargetColAtConsiderRightFrozen(absoluteX, isConsider, this);
|
|
@@ -61208,7 +61393,25 @@
|
|
|
61208
61393
|
break;
|
|
61209
61394
|
}
|
|
61210
61395
|
thisRowPasteColEnd = startCol + j;
|
|
61211
|
-
|
|
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) {
|
|
61212
61415
|
const value = rowValues[j];
|
|
61213
61416
|
const recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i);
|
|
61214
61417
|
const { field } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i);
|
|
@@ -62104,6 +62307,7 @@
|
|
|
62104
62307
|
this.scenegraph.clearCells();
|
|
62105
62308
|
this.dataSource.updatePagination(this.pagination);
|
|
62106
62309
|
this.refreshRowColCount();
|
|
62310
|
+
this.stateManager.initCheckedState(this.records);
|
|
62107
62311
|
this.scenegraph.createSceneGraph();
|
|
62108
62312
|
this.renderAsync();
|
|
62109
62313
|
}
|
|
@@ -62327,10 +62531,29 @@
|
|
|
62327
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));
|
|
62328
62532
|
const diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
|
|
62329
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
|
+
}
|
|
62330
62538
|
this.clearCellStyleCache();
|
|
62331
62539
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
62332
62540
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
62333
|
-
|
|
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);
|
|
62334
62557
|
if (checkHasChart) {
|
|
62335
62558
|
if (this.autoFillWidth && !notFillWidth) {
|
|
62336
62559
|
notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth;
|
|
@@ -62426,6 +62649,7 @@
|
|
|
62426
62649
|
this.dataSource.updateFilterRules(filterRules);
|
|
62427
62650
|
}
|
|
62428
62651
|
this.refreshRowColCount();
|
|
62652
|
+
this.stateManager.initCheckedState(this.records);
|
|
62429
62653
|
this.scenegraph.createSceneGraph();
|
|
62430
62654
|
}
|
|
62431
62655
|
getCheckboxState(field) {
|
|
@@ -63607,10 +63831,14 @@
|
|
|
63607
63831
|
: 0;
|
|
63608
63832
|
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
63609
63833
|
? this.table.getDrawRange().width
|
|
63610
|
-
: this.table.tableNoFrameWidth) -
|
|
63834
|
+
: this.table.tableNoFrameWidth) -
|
|
63835
|
+
leftHeaderWidth -
|
|
63836
|
+
this.table.getTheme().scrollStyle.width;
|
|
63611
63837
|
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
63612
63838
|
? this.table.getDrawRange().height
|
|
63613
|
-
: this.table.tableNoFrameHeight) -
|
|
63839
|
+
: this.table.tableNoFrameHeight) -
|
|
63840
|
+
topHeaderHeight -
|
|
63841
|
+
this.table.getTheme().scrollStyle.width;
|
|
63614
63842
|
this._emptyTipComponent.setAttributes({
|
|
63615
63843
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
63616
63844
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -63655,10 +63883,14 @@
|
|
|
63655
63883
|
: 0;
|
|
63656
63884
|
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
63657
63885
|
? this.table.getDrawRange().width
|
|
63658
|
-
: this.table.tableNoFrameWidth) -
|
|
63886
|
+
: this.table.tableNoFrameWidth) -
|
|
63887
|
+
leftHeaderWidth -
|
|
63888
|
+
this.table.getTheme().scrollStyle.width;
|
|
63659
63889
|
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
63660
63890
|
? this.table.getDrawRange().height
|
|
63661
|
-
: this.table.tableNoFrameHeight) -
|
|
63891
|
+
: this.table.tableNoFrameHeight) -
|
|
63892
|
+
topHeaderHeight -
|
|
63893
|
+
this.table.getTheme().scrollStyle.width;
|
|
63662
63894
|
return {
|
|
63663
63895
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
63664
63896
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -64611,7 +64843,7 @@
|
|
|
64611
64843
|
const abstractPos = table._getMouseAbstractPoint(e.event, false);
|
|
64612
64844
|
let menu = null;
|
|
64613
64845
|
if (abstractPos.inTable && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
64614
|
-
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);
|
|
64615
64847
|
}
|
|
64616
64848
|
else if (abstractPos.inTable && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
64617
64849
|
menu = table.internalProps.menu?.contextMenuItems;
|
|
@@ -64674,9 +64906,17 @@
|
|
|
64674
64906
|
}
|
|
64675
64907
|
const padding = getQuadProps(this._titleOption.padding ?? 10);
|
|
64676
64908
|
const realWidth = this._titleOption.width ??
|
|
64677
|
-
|
|
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];
|
|
64678
64914
|
const realHeight = this._titleOption.height ??
|
|
64679
|
-
|
|
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];
|
|
64680
64920
|
this._titleComponent.setAttributes({
|
|
64681
64921
|
x: this._titleOption.x ?? this._titleOption.orient === 'right'
|
|
64682
64922
|
? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)
|
|
@@ -68266,7 +68506,9 @@
|
|
|
68266
68506
|
return false;
|
|
68267
68507
|
}
|
|
68268
68508
|
isColumnHeader(col, row) {
|
|
68269
|
-
if (col >= this.rowHeaderLevelCount
|
|
68509
|
+
if (col >= this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount &&
|
|
68510
|
+
row >= 0 &&
|
|
68511
|
+
row < this.columnHeaderLevelCount) {
|
|
68270
68512
|
return true;
|
|
68271
68513
|
}
|
|
68272
68514
|
return false;
|
|
@@ -72143,6 +72385,7 @@
|
|
|
72143
72385
|
this.internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
72144
72386
|
this.internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
72145
72387
|
this.internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
72388
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
72146
72389
|
const records = this.internalProps.records;
|
|
72147
72390
|
this.internalProps.recordsIsTwoDimensionalArray = false;
|
|
72148
72391
|
if (records?.[0]?.constructor === Array) {
|
|
@@ -72267,6 +72510,7 @@
|
|
|
72267
72510
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
72268
72511
|
internalProps.rowResizeType = options.rowResizeType ?? 'row';
|
|
72269
72512
|
internalProps.dataConfig = cloneDeep(options.dataConfig);
|
|
72513
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
72270
72514
|
if (options?.rowHierarchyType === 'tree' &&
|
|
72271
72515
|
this.internalProps.layoutMap.rowHierarchyType === 'tree' &&
|
|
72272
72516
|
this.internalProps.layoutMap.rowExpandLevel === options?.rowExpandLevel) {
|
|
@@ -72880,6 +73124,18 @@
|
|
|
72880
73124
|
});
|
|
72881
73125
|
}
|
|
72882
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
|
+
}
|
|
72883
73139
|
updatePivotSortState(pivotSortStateConfig) {
|
|
72884
73140
|
this.pivotSortState = pivotSortStateConfig;
|
|
72885
73141
|
}
|
|
@@ -75180,7 +75436,7 @@
|
|
|
75180
75436
|
}
|
|
75181
75437
|
|
|
75182
75438
|
registerForVrender();
|
|
75183
|
-
const version = "1.10.2
|
|
75439
|
+
const version = "1.10.2";
|
|
75184
75440
|
function getIcons() {
|
|
75185
75441
|
return get$2();
|
|
75186
75442
|
}
|