@visactor/vtable 0.16.4-alpha.2 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +1 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +3 -2
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +3 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +16 -12
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/listener/table-group.js +14 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +25 -8
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.d.ts +1 -1
- package/cjs/layout/pivot-layout-helper.js +12 -5
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -0
- package/cjs/scenegraph/layout/compute-col-width.js +12 -8
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +8 -5
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +1 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +20 -22
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +12 -6
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.d.ts +1 -1
- package/cjs/state/hover/is-cell-hover.js +5 -4
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/dist/vtable.js +157 -77
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +1 -1
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +3 -2
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +3 -2
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +16 -12
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/listener/table-group.js +14 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +25 -8
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.d.ts +1 -1
- package/es/layout/pivot-layout-helper.js +12 -5
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.d.ts +1 -0
- package/es/scenegraph/layout/compute-col-width.js +9 -6
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +8 -5
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +1 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js +21 -23
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +12 -6
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/hover/is-cell-hover.d.ts +1 -1
- package/es/state/hover/is-cell-hover.js +5 -4
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -54922,7 +54922,9 @@
|
|
|
54922
54922
|
for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {
|
|
54923
54923
|
let startCol = 0;
|
|
54924
54924
|
let endCol = table.colCount - 1;
|
|
54925
|
-
if ((table.isPivotTable()
|
|
54925
|
+
if (((table.isPivotTable() && !table.isPivotChart()) ||
|
|
54926
|
+
(table.isPivotChart() && !table.internalProps.layoutMap.indicatorsAsCol)) &&
|
|
54927
|
+
checkPivotFixedStyleAndNoWrap(table, row)) {
|
|
54926
54928
|
startCol = 0;
|
|
54927
54929
|
endCol = table.rowHeaderLevelCount;
|
|
54928
54930
|
}
|
|
@@ -55042,7 +55044,7 @@
|
|
|
55042
55044
|
let actualHeaderHeight = 0;
|
|
55043
55045
|
for (let row = 0; row < table.rowCount; row++) {
|
|
55044
55046
|
const rowHeight = update ? newHeights[row] : table.getRowHeight(row);
|
|
55045
|
-
if (row < table.frozenRowCount || row >= table.rowCount - table.bottomFrozenRowCount) {
|
|
55047
|
+
if (row < table.frozenRowCount || (table.isPivotChart() && row >= table.rowCount - table.bottomFrozenRowCount)) {
|
|
55046
55048
|
actualHeaderHeight += rowHeight;
|
|
55047
55049
|
}
|
|
55048
55050
|
actualHeight += rowHeight;
|
|
@@ -55283,8 +55285,14 @@
|
|
|
55283
55285
|
let iconInlineFrontHeight = 0;
|
|
55284
55286
|
const iconInlineEnd = [];
|
|
55285
55287
|
let iconInlineEndHeight = 0;
|
|
55286
|
-
|
|
55287
|
-
|
|
55288
|
+
let mayHaveIcon = false;
|
|
55289
|
+
if (table.getCellLocation(col, row) !== 'body') {
|
|
55290
|
+
mayHaveIcon = true;
|
|
55291
|
+
}
|
|
55292
|
+
else {
|
|
55293
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
55294
|
+
mayHaveIcon = !!define?.icon || !!define?.tree;
|
|
55295
|
+
}
|
|
55288
55296
|
if (mayHaveIcon) {
|
|
55289
55297
|
const icons = table.getCellIcons(col, row);
|
|
55290
55298
|
icons?.forEach(icon => {
|
|
@@ -57135,7 +57143,7 @@
|
|
|
57135
57143
|
isValid$5(cellGroup.mergeEndRow)) {
|
|
57136
57144
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
57137
57145
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
57138
|
-
const key = isCellHover(table.stateManager, col, row);
|
|
57146
|
+
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
57139
57147
|
if (key && (!colorKey || key === 'cellBgColor')) {
|
|
57140
57148
|
colorKey = key;
|
|
57141
57149
|
}
|
|
@@ -57143,7 +57151,7 @@
|
|
|
57143
57151
|
}
|
|
57144
57152
|
}
|
|
57145
57153
|
else if (cellGroup.role === 'cell') {
|
|
57146
|
-
colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row);
|
|
57154
|
+
colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
|
|
57147
57155
|
}
|
|
57148
57156
|
if (!colorKey) {
|
|
57149
57157
|
return undefined;
|
|
@@ -57175,7 +57183,7 @@
|
|
|
57175
57183
|
const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
57176
57184
|
return fillColor;
|
|
57177
57185
|
}
|
|
57178
|
-
function isCellHover(state, col, row) {
|
|
57186
|
+
function isCellHover(state, col, row, cellGroup) {
|
|
57179
57187
|
const { highlightScope, disableHeader, cellPos } = state.hover;
|
|
57180
57188
|
const table = state.table;
|
|
57181
57189
|
const isHeader = table.isHeader(col, row);
|
|
@@ -57208,6 +57216,9 @@
|
|
|
57208
57216
|
if (isHeader) {
|
|
57209
57217
|
const define = table.getHeaderDefine(col, row);
|
|
57210
57218
|
cellDisable = define?.disableHeaderHover;
|
|
57219
|
+
if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
|
|
57220
|
+
cellDisable = true;
|
|
57221
|
+
}
|
|
57211
57222
|
}
|
|
57212
57223
|
else {
|
|
57213
57224
|
const define = table.getBodyColumnDefine(col, row);
|
|
@@ -57753,7 +57764,7 @@
|
|
|
57753
57764
|
let actualWidth = 0;
|
|
57754
57765
|
for (let col = 0; col < table.colCount; col++) {
|
|
57755
57766
|
const colWidth = update ? newWidths[col] : table.getColWidth(col);
|
|
57756
|
-
if (col < table.frozenColCount || col >= table.colCount - table.rightFrozenColCount) {
|
|
57767
|
+
if (col < table.frozenColCount || (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)) {
|
|
57757
57768
|
actualHeaderWidth += colWidth;
|
|
57758
57769
|
}
|
|
57759
57770
|
actualWidth += colWidth;
|
|
@@ -57944,8 +57955,14 @@
|
|
|
57944
57955
|
const cellValue = table.getCellValue(col, row);
|
|
57945
57956
|
const actStyle = table._getCellStyle(col, row);
|
|
57946
57957
|
let iconWidth = 0;
|
|
57947
|
-
|
|
57948
|
-
|
|
57958
|
+
let mayHaveIcon = false;
|
|
57959
|
+
if (table.getCellLocation(col, row) !== 'body') {
|
|
57960
|
+
mayHaveIcon = true;
|
|
57961
|
+
}
|
|
57962
|
+
else {
|
|
57963
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
57964
|
+
mayHaveIcon = !!define?.icon || !!define?.tree;
|
|
57965
|
+
}
|
|
57949
57966
|
if (mayHaveIcon) {
|
|
57950
57967
|
const icons = table.getCellIcons(col, row);
|
|
57951
57968
|
icons?.forEach(icon => {
|
|
@@ -58015,7 +58032,7 @@
|
|
|
58015
58032
|
}
|
|
58016
58033
|
return widthDefined;
|
|
58017
58034
|
}
|
|
58018
|
-
function getAdaptiveWidth(totalDrawWidth, startCol, endColPlus1, update, newWidths, table) {
|
|
58035
|
+
function getAdaptiveWidth(totalDrawWidth, startCol, endColPlus1, update, newWidths, table, fromScenegraph) {
|
|
58019
58036
|
let actualWidth = 0;
|
|
58020
58037
|
const adaptiveColumns = [];
|
|
58021
58038
|
for (let col = startCol; col < endColPlus1; col++) {
|
|
@@ -58050,6 +58067,9 @@
|
|
|
58050
58067
|
if (update) {
|
|
58051
58068
|
newWidths[col] = table._adjustColWidth(col, colWidth);
|
|
58052
58069
|
}
|
|
58070
|
+
else if (fromScenegraph) {
|
|
58071
|
+
table.scenegraph.setColWidth(col, table._adjustColWidth(col, colWidth));
|
|
58072
|
+
}
|
|
58053
58073
|
else {
|
|
58054
58074
|
table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);
|
|
58055
58075
|
}
|
|
@@ -59456,24 +59476,39 @@
|
|
|
59456
59476
|
? scene.bottomFrozenGroup
|
|
59457
59477
|
: scene.rightBottomCornerGroup);
|
|
59458
59478
|
}
|
|
59459
|
-
|
|
59479
|
+
let diffSize = 0;
|
|
59480
|
+
if (typeof selectComp.rect.attribute.lineWidth === 'number') {
|
|
59481
|
+
diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2);
|
|
59482
|
+
}
|
|
59460
59483
|
if (endCol === scene.table.colCount - 1) {
|
|
59484
|
+
if (Array.isArray(selectComp.rect.attribute.lineWidth)) {
|
|
59485
|
+
diffSize = Math.ceil((selectComp.rect.attribute.lineWidth[1] ?? 0) / 2);
|
|
59486
|
+
}
|
|
59461
59487
|
selectComp.rect.setAttributes({
|
|
59462
59488
|
width: selectComp.rect.attribute.width - diffSize
|
|
59463
59489
|
});
|
|
59464
59490
|
}
|
|
59465
59491
|
if (startCol === 0) {
|
|
59492
|
+
if (Array.isArray(selectComp.rect.attribute.lineWidth)) {
|
|
59493
|
+
diffSize = Math.ceil((selectComp.rect.attribute.lineWidth[3] ?? 0) / 2);
|
|
59494
|
+
}
|
|
59466
59495
|
selectComp.rect.setAttributes({
|
|
59467
59496
|
x: selectComp.rect.attribute.x + diffSize,
|
|
59468
59497
|
width: selectComp.rect.attribute.width - diffSize
|
|
59469
59498
|
});
|
|
59470
59499
|
}
|
|
59471
59500
|
if (endRow === scene.table.rowCount - 1) {
|
|
59501
|
+
if (Array.isArray(selectComp.rect.attribute.lineWidth)) {
|
|
59502
|
+
diffSize = Math.ceil((selectComp.rect.attribute.lineWidth[2] ?? 0) / 2);
|
|
59503
|
+
}
|
|
59472
59504
|
selectComp.rect.setAttributes({
|
|
59473
59505
|
height: selectComp.rect.attribute.height - diffSize
|
|
59474
59506
|
});
|
|
59475
59507
|
}
|
|
59476
59508
|
if (startRow === 0) {
|
|
59509
|
+
if (Array.isArray(selectComp.rect.attribute.lineWidth)) {
|
|
59510
|
+
diffSize = Math.ceil((selectComp.rect.attribute.lineWidth[0] ?? 0) / 2);
|
|
59511
|
+
}
|
|
59477
59512
|
selectComp.rect.setAttributes({
|
|
59478
59513
|
y: selectComp.rect.attribute.y + diffSize,
|
|
59479
59514
|
height: selectComp.rect.attribute.height - diffSize
|
|
@@ -59784,7 +59819,7 @@
|
|
|
59784
59819
|
if (addRows.length) {
|
|
59785
59820
|
if (!isNumber$7(updateAfter)) {
|
|
59786
59821
|
const minRow = Math.min(...addRows);
|
|
59787
|
-
scene.proxy.rowUpdatePos = minRow;
|
|
59822
|
+
scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
|
|
59788
59823
|
}
|
|
59789
59824
|
scene.proxy.rowUpdateDirection = 'up';
|
|
59790
59825
|
scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);
|
|
@@ -62156,50 +62191,35 @@
|
|
|
62156
62191
|
dealWidthMode() {
|
|
62157
62192
|
const table = this.table;
|
|
62158
62193
|
if (table.widthMode === 'adaptive') {
|
|
62159
|
-
|
|
62160
|
-
|
|
62161
|
-
|
|
62162
|
-
|
|
62163
|
-
|
|
62164
|
-
|
|
62165
|
-
|
|
62166
|
-
let colWidth;
|
|
62167
|
-
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
62168
|
-
colWidth =
|
|
62169
|
-
totalDrawWidth - table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2);
|
|
62170
|
-
}
|
|
62171
|
-
else {
|
|
62172
|
-
colWidth = Math.round(table.getColWidth(col) * factor);
|
|
62194
|
+
table._clearColRangeWidthsMap();
|
|
62195
|
+
const canvasWidth = table.tableNoFrameWidth;
|
|
62196
|
+
let actualHeaderWidth = 0;
|
|
62197
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
62198
|
+
const colWidth = table.getColWidth(col);
|
|
62199
|
+
if (col < table.frozenColCount || col >= table.colCount - table.rightFrozenColCount) {
|
|
62200
|
+
actualHeaderWidth += colWidth;
|
|
62173
62201
|
}
|
|
62174
|
-
this.setColWidth(col, colWidth);
|
|
62175
62202
|
}
|
|
62203
|
+
const startCol = table.frozenColCount;
|
|
62204
|
+
const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;
|
|
62205
|
+
getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, false, [], table, true);
|
|
62176
62206
|
}
|
|
62177
62207
|
else if (table.autoFillWidth) {
|
|
62208
|
+
table._clearColRangeWidthsMap();
|
|
62178
62209
|
const canvasWidth = table.tableNoFrameWidth;
|
|
62179
|
-
let actualWidth = 0;
|
|
62180
62210
|
let actualHeaderWidth = 0;
|
|
62211
|
+
let actualWidth = 0;
|
|
62181
62212
|
for (let col = 0; col < table.colCount; col++) {
|
|
62182
62213
|
const colWidth = table.getColWidth(col);
|
|
62183
|
-
if (col < table.frozenColCount || col >= table.colCount - table.rightFrozenColCount) {
|
|
62214
|
+
if (col < table.frozenColCount || (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)) {
|
|
62184
62215
|
actualHeaderWidth += colWidth;
|
|
62185
62216
|
}
|
|
62186
62217
|
actualWidth += colWidth;
|
|
62187
62218
|
}
|
|
62188
|
-
if (actualWidth < canvasWidth && actualWidth
|
|
62189
|
-
const
|
|
62190
|
-
|
|
62191
|
-
|
|
62192
|
-
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
62193
|
-
colWidth =
|
|
62194
|
-
canvasWidth -
|
|
62195
|
-
actualHeaderWidth -
|
|
62196
|
-
table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2);
|
|
62197
|
-
}
|
|
62198
|
-
else {
|
|
62199
|
-
colWidth = Math.round(table.getColWidth(col) * factor);
|
|
62200
|
-
}
|
|
62201
|
-
this.setColWidth(col, colWidth);
|
|
62202
|
-
}
|
|
62219
|
+
if (actualWidth < canvasWidth && actualWidth > actualHeaderWidth) {
|
|
62220
|
+
const startCol = table.frozenColCount;
|
|
62221
|
+
const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;
|
|
62222
|
+
getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, false, [], table, true);
|
|
62203
62223
|
}
|
|
62204
62224
|
}
|
|
62205
62225
|
let bodyWidth = 0;
|
|
@@ -62233,18 +62253,20 @@
|
|
|
62233
62253
|
const table = this.table;
|
|
62234
62254
|
if (table.heightMode === 'adaptive') {
|
|
62235
62255
|
table._clearRowRangeHeightsMap();
|
|
62236
|
-
const
|
|
62256
|
+
const columnHeaderHeight = table.getRowsHeight(0, table.columnHeaderLevelCount - 1);
|
|
62257
|
+
const bottomHeaderHeight = table.isPivotChart() ? table.getBottomFrozenRowsHeight() : 0;
|
|
62258
|
+
const totalDrawHeight = table.tableNoFrameHeight - columnHeaderHeight - bottomHeaderHeight;
|
|
62259
|
+
const startRow = table.columnHeaderLevelCount;
|
|
62260
|
+
const endRow = table.isPivotChart() ? table.rowCount - table.bottomFrozenRowCount : table.rowCount;
|
|
62237
62261
|
let actualHeight = 0;
|
|
62238
|
-
for (let row =
|
|
62262
|
+
for (let row = startRow; row < endRow; row++) {
|
|
62239
62263
|
actualHeight += table.getRowHeight(row);
|
|
62240
62264
|
}
|
|
62241
62265
|
const factor = totalDrawHeight / actualHeight;
|
|
62242
|
-
for (let row =
|
|
62266
|
+
for (let row = startRow; row < endRow; row++) {
|
|
62243
62267
|
let rowHeight;
|
|
62244
|
-
if (row ===
|
|
62245
|
-
rowHeight =
|
|
62246
|
-
totalDrawHeight -
|
|
62247
|
-
table.getRowsHeight(table.frozenRowCount, table.rowCount - table.bottomFrozenRowCount - 2);
|
|
62268
|
+
if (row === endRow - 1) {
|
|
62269
|
+
rowHeight = totalDrawHeight - table.getRowsHeight(startRow, endRow - 2);
|
|
62248
62270
|
}
|
|
62249
62271
|
else {
|
|
62250
62272
|
rowHeight = Math.round(table.getRowHeight(row) * factor);
|
|
@@ -62253,12 +62275,14 @@
|
|
|
62253
62275
|
}
|
|
62254
62276
|
}
|
|
62255
62277
|
else if (table.autoFillHeight) {
|
|
62278
|
+
table._clearRowRangeHeightsMap();
|
|
62256
62279
|
const canvasHeight = table.tableNoFrameHeight;
|
|
62257
62280
|
let actualHeight = 0;
|
|
62258
62281
|
let actualHeaderHeight = 0;
|
|
62259
62282
|
for (let row = 0; row < table.rowCount; row++) {
|
|
62260
62283
|
const rowHeight = table.getRowHeight(row);
|
|
62261
|
-
if (row < table.frozenRowCount ||
|
|
62284
|
+
if (row < table.frozenRowCount ||
|
|
62285
|
+
(table.isPivotChart() && row >= table.rowCount - table.bottomFrozenRowCount)) {
|
|
62262
62286
|
actualHeaderHeight += rowHeight;
|
|
62263
62287
|
}
|
|
62264
62288
|
actualHeight += rowHeight;
|
|
@@ -64661,6 +64685,10 @@
|
|
|
64661
64685
|
}
|
|
64662
64686
|
});
|
|
64663
64687
|
table.scenegraph.tableGroup.addEventListener('pointerupoutside', (e) => {
|
|
64688
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
64689
|
+
if (stateManager.menu.isShow && eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
64690
|
+
stateManager.hideMenu();
|
|
64691
|
+
}
|
|
64664
64692
|
if (stateManager.isResizeCol()) {
|
|
64665
64693
|
endResizeCol(table);
|
|
64666
64694
|
}
|
|
@@ -64718,9 +64746,7 @@
|
|
|
64718
64746
|
if (table.isPivotChart() && eventArgsSet?.eventArgs?.target.type !== 'chart') {
|
|
64719
64747
|
table.scenegraph.updateChartState(null);
|
|
64720
64748
|
}
|
|
64721
|
-
if (stateManager.menu.isShow &&
|
|
64722
|
-
eventArgsSet.eventArgs &&
|
|
64723
|
-
eventArgsSet.eventArgs.target !== stateManager.residentHoverIcon?.icon) {
|
|
64749
|
+
if (stateManager.menu.isShow && eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
64724
64750
|
stateManager.hideMenu();
|
|
64725
64751
|
}
|
|
64726
64752
|
const hitIcon = eventArgsSet?.eventArgs?.target?.role?.startsWith('icon')
|
|
@@ -64915,6 +64941,12 @@
|
|
|
64915
64941
|
}
|
|
64916
64942
|
}
|
|
64917
64943
|
});
|
|
64944
|
+
table.scenegraph.stage.addEventListener('pointerdown', (e) => {
|
|
64945
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
64946
|
+
if (stateManager.menu.isShow && eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
64947
|
+
stateManager.hideMenu();
|
|
64948
|
+
}
|
|
64949
|
+
});
|
|
64918
64950
|
table.scenegraph.stage.addEventListener('pointertap', (e) => {
|
|
64919
64951
|
const target = e.target;
|
|
64920
64952
|
if (!isDraging &&
|
|
@@ -68555,7 +68587,7 @@
|
|
|
68555
68587
|
return TABLE_EVENT_TYPE;
|
|
68556
68588
|
}
|
|
68557
68589
|
options;
|
|
68558
|
-
version = "0.
|
|
68590
|
+
version = "0.17.0";
|
|
68559
68591
|
pagination;
|
|
68560
68592
|
id = `VTable${Date.now()}`;
|
|
68561
68593
|
headerStyleCache;
|
|
@@ -69694,8 +69726,7 @@
|
|
|
69694
69726
|
if (internalProps.menu.renderMode === 'html' && !internalProps.menuHandler) {
|
|
69695
69727
|
internalProps.menuHandler = new MenuHandler(this);
|
|
69696
69728
|
}
|
|
69697
|
-
this.
|
|
69698
|
-
this.bodyStyleCache = new Map();
|
|
69729
|
+
this.clearCellStyleCache();
|
|
69699
69730
|
this.clearColWidthCache();
|
|
69700
69731
|
this.clearRowHeightCache();
|
|
69701
69732
|
}
|
|
@@ -69703,8 +69734,7 @@
|
|
|
69703
69734
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
69704
69735
|
this.refreshHeader();
|
|
69705
69736
|
this.scenegraph.clearCells();
|
|
69706
|
-
this.
|
|
69707
|
-
this.bodyStyleCache = new Map();
|
|
69737
|
+
this.clearCellStyleCache();
|
|
69708
69738
|
this.scenegraph.createSceneGraph();
|
|
69709
69739
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
69710
69740
|
this.render();
|
|
@@ -69963,8 +69993,7 @@
|
|
|
69963
69993
|
this.internalProps.autoWrapText = autoWrapText;
|
|
69964
69994
|
this.options.autoWrapText = autoWrapText;
|
|
69965
69995
|
this.scenegraph.clearCells();
|
|
69966
|
-
this.
|
|
69967
|
-
this.bodyStyleCache = new Map();
|
|
69996
|
+
this.clearCellStyleCache();
|
|
69968
69997
|
this.scenegraph.createSceneGraph();
|
|
69969
69998
|
this.render();
|
|
69970
69999
|
}
|
|
@@ -69981,8 +70010,7 @@
|
|
|
69981
70010
|
this.options.theme = theme;
|
|
69982
70011
|
this.scenegraph.updateStageBackground();
|
|
69983
70012
|
this.scenegraph.clearCells();
|
|
69984
|
-
this.
|
|
69985
|
-
this.bodyStyleCache = new Map();
|
|
70013
|
+
this.clearCellStyleCache();
|
|
69986
70014
|
this.scenegraph.createSceneGraph();
|
|
69987
70015
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
69988
70016
|
this.render();
|
|
@@ -70196,7 +70224,19 @@
|
|
|
70196
70224
|
const { layoutMap } = this.internalProps;
|
|
70197
70225
|
const isHeader = layoutMap.isHeader(col, row);
|
|
70198
70226
|
if (isHeader) {
|
|
70199
|
-
let
|
|
70227
|
+
let cacheKey;
|
|
70228
|
+
if (this.isPivotTable() && !this.isBottomFrozenRow(row) && !this.isRightFrozenColumn(col)) {
|
|
70229
|
+
const define = this.getHeaderDefine(col, row);
|
|
70230
|
+
cacheKey = define?.dimensionKey
|
|
70231
|
+
? `dim-${define.dimensionKey}`
|
|
70232
|
+
: define?.indicatorKey
|
|
70233
|
+
? `ind-${define.indicatorKey}`
|
|
70234
|
+
: `${col}-${row}`;
|
|
70235
|
+
}
|
|
70236
|
+
else {
|
|
70237
|
+
cacheKey = `${col}-${row}`;
|
|
70238
|
+
}
|
|
70239
|
+
let cacheStyle = this.headerStyleCache.get(cacheKey);
|
|
70200
70240
|
if (cacheStyle) {
|
|
70201
70241
|
return cacheStyle;
|
|
70202
70242
|
}
|
|
@@ -70258,7 +70298,7 @@
|
|
|
70258
70298
|
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
70259
70299
|
}, styleClass, this.options.autoWrapText);
|
|
70260
70300
|
}
|
|
70261
|
-
this.headerStyleCache.set(
|
|
70301
|
+
this.headerStyleCache.set(cacheKey, cacheStyle);
|
|
70262
70302
|
return cacheStyle;
|
|
70263
70303
|
}
|
|
70264
70304
|
let cacheKey;
|
|
@@ -70291,6 +70331,7 @@
|
|
|
70291
70331
|
}
|
|
70292
70332
|
clearCellStyleCache() {
|
|
70293
70333
|
this.headerStyleCache.clear();
|
|
70334
|
+
this.bodyStyleCache.clear();
|
|
70294
70335
|
}
|
|
70295
70336
|
clearRowHeightCache() {
|
|
70296
70337
|
this.internalProps._rowHeightsMap.clear();
|
|
@@ -72717,6 +72758,7 @@
|
|
|
72717
72758
|
_setRecords(this, records);
|
|
72718
72759
|
}
|
|
72719
72760
|
this.stateManager.initCheckedState(records);
|
|
72761
|
+
this.clearCellStyleCache();
|
|
72720
72762
|
this.scenegraph.createSceneGraph();
|
|
72721
72763
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
72722
72764
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
@@ -73136,21 +73178,33 @@
|
|
|
73136
73178
|
}
|
|
73137
73179
|
searchPath(index, node, path, maxDeep) {
|
|
73138
73180
|
if (!node) {
|
|
73139
|
-
return
|
|
73181
|
+
return;
|
|
73140
73182
|
}
|
|
73141
73183
|
if (index < node.startIndex || index >= node.startIndex + node.size) {
|
|
73142
|
-
return
|
|
73184
|
+
return;
|
|
73143
73185
|
}
|
|
73144
73186
|
path.push(node);
|
|
73145
|
-
if (!node.children || node.children.length === 0) {
|
|
73146
|
-
return
|
|
73147
|
-
}
|
|
73148
|
-
if (node.level >= maxDeep) {
|
|
73149
|
-
return true;
|
|
73187
|
+
if (!node.children || node.children.length === 0 || node.level >= maxDeep) {
|
|
73188
|
+
return;
|
|
73150
73189
|
}
|
|
73151
73190
|
const cIndex = index - node.startIndex;
|
|
73152
|
-
|
|
73153
|
-
|
|
73191
|
+
let left = 0;
|
|
73192
|
+
let right = node.children.length - 1;
|
|
73193
|
+
while (left <= right) {
|
|
73194
|
+
const middle = Math.floor((left + right) / 2);
|
|
73195
|
+
const element = node.children[middle];
|
|
73196
|
+
if (cIndex >= element.startIndex && cIndex < element.startIndex + element.size) {
|
|
73197
|
+
this.searchPath(cIndex, element, path, maxDeep);
|
|
73198
|
+
break;
|
|
73199
|
+
}
|
|
73200
|
+
else if (cIndex < element.startIndex) {
|
|
73201
|
+
right = middle - 1;
|
|
73202
|
+
}
|
|
73203
|
+
else {
|
|
73204
|
+
left = middle + 1;
|
|
73205
|
+
}
|
|
73206
|
+
}
|
|
73207
|
+
return;
|
|
73154
73208
|
}
|
|
73155
73209
|
movePosition(level, sourceIndex, targetIndex) {
|
|
73156
73210
|
let parNode;
|
|
@@ -73422,6 +73476,7 @@
|
|
|
73422
73476
|
colDimensionKeys = [];
|
|
73423
73477
|
indicatorKeys = [];
|
|
73424
73478
|
indicatorDimensionKey = IndicatorDimensionKeyPlaceholder;
|
|
73479
|
+
_largeCellRangeCache;
|
|
73425
73480
|
_CellHeaderPathMap;
|
|
73426
73481
|
_table;
|
|
73427
73482
|
extensionRows;
|
|
@@ -73445,6 +73500,7 @@
|
|
|
73445
73500
|
this.extensionRows = table.options.extensionRows;
|
|
73446
73501
|
}
|
|
73447
73502
|
this.dataset = dataset;
|
|
73503
|
+
this._largeCellRangeCache = [];
|
|
73448
73504
|
this._CellHeaderPathMap = new Map();
|
|
73449
73505
|
this.rowTree = table.internalProps.rowTree;
|
|
73450
73506
|
this.columnTree = table.internalProps.columnTree;
|
|
@@ -73512,6 +73568,7 @@
|
|
|
73512
73568
|
this.columnHeaderObjs = this._addHeaders(this._columnHeaderCellIds, 0, this.columnDimensionTree.tree.children, []);
|
|
73513
73569
|
}
|
|
73514
73570
|
if (this.columnHeaderTitle) {
|
|
73571
|
+
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
73515
73572
|
const id = ++this.sharedVar.seqId;
|
|
73516
73573
|
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
73517
73574
|
this._columnHeaderCellIds.unshift(firstRowIds);
|
|
@@ -73545,6 +73602,7 @@
|
|
|
73545
73602
|
: this._addHeaders(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, []);
|
|
73546
73603
|
}
|
|
73547
73604
|
if (this.rowHeaderTitle) {
|
|
73605
|
+
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
73548
73606
|
const id = ++this.sharedVar.seqId;
|
|
73549
73607
|
const firstColIds = Array(this._rowHeaderCellIds_FULL[0]?.length ?? this.rowDimensionTree.tree.size).fill(id);
|
|
73550
73608
|
this._rowHeaderCellIds_FULL.unshift(firstColIds);
|
|
@@ -73598,6 +73656,7 @@
|
|
|
73598
73656
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
|
|
73599
73657
|
});
|
|
73600
73658
|
}
|
|
73659
|
+
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
73601
73660
|
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
73602
73661
|
this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [''].concat(this.colDimensionKeys) : this.colDimensionKeys, this.columnsDefine);
|
|
73603
73662
|
}
|
|
@@ -74349,6 +74408,12 @@
|
|
|
74349
74408
|
if (this.isRightFrozenColumn(col, row) || this.isBottomFrozenRow(col, row)) {
|
|
74350
74409
|
return result;
|
|
74351
74410
|
}
|
|
74411
|
+
for (let i = 0; i < this._largeCellRangeCache.length; i++) {
|
|
74412
|
+
const range = this._largeCellRangeCache[i];
|
|
74413
|
+
if (col >= range.start.col && col <= range.end.col && row >= range.start.row && row <= range.end.row) {
|
|
74414
|
+
return range;
|
|
74415
|
+
}
|
|
74416
|
+
}
|
|
74352
74417
|
if (this.isHeader(col, row) && col !== -1 && row !== -1) {
|
|
74353
74418
|
const id = this.getCellId(col, row);
|
|
74354
74419
|
for (let c = col - 1; c >= 0; c--) {
|
|
@@ -74376,6 +74441,9 @@
|
|
|
74376
74441
|
result.end.row = r;
|
|
74377
74442
|
}
|
|
74378
74443
|
}
|
|
74444
|
+
if (result.end.col - result.start.col > 100 || result.end.row - result.start.row > 100) {
|
|
74445
|
+
this._largeCellRangeCache.push(result);
|
|
74446
|
+
}
|
|
74379
74447
|
return result;
|
|
74380
74448
|
}
|
|
74381
74449
|
isCellRangeEqual(col, row, targetCol, targetRow) {
|
|
@@ -74426,6 +74494,12 @@
|
|
|
74426
74494
|
if (this._CellHeaderPathMap.has(`${col}-${row}`)) {
|
|
74427
74495
|
return this._CellHeaderPathMap.get(`${col}-${row}`);
|
|
74428
74496
|
}
|
|
74497
|
+
for (let i = 0; i < this._largeCellRangeCache.length; i++) {
|
|
74498
|
+
const range = this._largeCellRangeCache[i];
|
|
74499
|
+
if (col >= range.start.col && col <= range.end.col && row >= range.start.row && row <= range.end.row) {
|
|
74500
|
+
break;
|
|
74501
|
+
}
|
|
74502
|
+
}
|
|
74429
74503
|
const recordCol = this.getBodyIndexByCol(col);
|
|
74430
74504
|
const recordRow = this.getBodyIndexByRow(row) + this.currentPageStartIndex;
|
|
74431
74505
|
let colPath = [];
|
|
@@ -74601,6 +74675,7 @@
|
|
|
74601
74675
|
return o;
|
|
74602
74676
|
}, {});
|
|
74603
74677
|
this._CellHeaderPathMap = new Map();
|
|
74678
|
+
this._largeCellRangeCache.length = 0;
|
|
74604
74679
|
const diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map(oldCellId => oldCellId[col]), this._rowHeaderCellIds_FULL.map(newCellId => newCellId[col]), oldRowHeaderCellPositons, this);
|
|
74605
74680
|
this._rowHeaderCellIds = this._rowHeaderCellIds_FULL;
|
|
74606
74681
|
return diffCell;
|
|
@@ -74818,6 +74893,7 @@
|
|
|
74818
74893
|
this.columnDimensionTree.movePosition(source.row, sourceCellRange.start.col - this.rowHeaderLevelCount, targetIndex - this.rowHeaderLevelCount);
|
|
74819
74894
|
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children, true);
|
|
74820
74895
|
this._CellHeaderPathMap = new Map();
|
|
74896
|
+
this._largeCellRangeCache.length = 0;
|
|
74821
74897
|
return {
|
|
74822
74898
|
sourceIndex: sourceCellRange.start.col,
|
|
74823
74899
|
targetIndex,
|
|
@@ -74851,6 +74927,7 @@
|
|
|
74851
74927
|
this.rowDimensionTree.movePosition(this.getCellHeaderPathsWidthTreeNode(source.col, source.row).rowHeaderPaths.length - 1, sourceCellRange.start.row - this.columnHeaderLevelCount, targetIndex + (target.row > source.row ? sourceRowHeaderNode.size - 1 : 0));
|
|
74852
74928
|
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, true);
|
|
74853
74929
|
this._CellHeaderPathMap = new Map();
|
|
74930
|
+
this._largeCellRangeCache.length = 0;
|
|
74854
74931
|
return {
|
|
74855
74932
|
sourceIndex: sourceCellRange.start.row,
|
|
74856
74933
|
targetIndex: targetIndex + this.columnHeaderLevelCount,
|
|
@@ -75153,6 +75230,7 @@
|
|
|
75153
75230
|
return undefined;
|
|
75154
75231
|
}
|
|
75155
75232
|
clearCellRangeMap() {
|
|
75233
|
+
this._largeCellRangeCache.length = 0;
|
|
75156
75234
|
this._CellHeaderPathMap = new Map();
|
|
75157
75235
|
}
|
|
75158
75236
|
getDimensionKeyInChartSpec(_col, _row) {
|
|
@@ -77649,6 +77727,7 @@
|
|
|
77649
77727
|
}
|
|
77650
77728
|
this.refreshHeader();
|
|
77651
77729
|
this.scenegraph.clearCells();
|
|
77730
|
+
this.clearCellStyleCache();
|
|
77652
77731
|
this.scenegraph.createSceneGraph();
|
|
77653
77732
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
77654
77733
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
@@ -78544,6 +78623,7 @@
|
|
|
78544
78623
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset);
|
|
78545
78624
|
this.refreshHeader();
|
|
78546
78625
|
this.scenegraph.clearCells();
|
|
78626
|
+
this.clearCellStyleCache();
|
|
78547
78627
|
this.scenegraph.createSceneGraph();
|
|
78548
78628
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
78549
78629
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
@@ -79061,7 +79141,7 @@
|
|
|
79061
79141
|
return new Tag$1(params ? params.attribute : {});
|
|
79062
79142
|
}
|
|
79063
79143
|
|
|
79064
|
-
const version = "0.
|
|
79144
|
+
const version = "0.17.0";
|
|
79065
79145
|
function getIcons() {
|
|
79066
79146
|
return get$2();
|
|
79067
79147
|
}
|