k-vtable 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +5 -0
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/DataSource.js +2 -11
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.js +20 -18
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/helper.js +30 -22
- package/cjs/event/helper.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/scenegraph/component/table-component.d.ts +4 -0
- package/cjs/scenegraph/component/table-component.js +72 -2
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +2 -0
- package/cjs/scenegraph/component/util.js +11 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js +7 -2
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +19 -15
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +2 -0
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +9 -4
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +11 -4
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +2 -2
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/cell-move/index.js +13 -4
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/hover/update-position.js +2 -2
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +1 -0
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/state.d.ts +2 -0
- package/cjs/state/state.js +4 -0
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/util.d.ts +2 -1
- package/cjs/tools/util.js +14 -3
- package/cjs/tools/util.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +348 -186
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +5 -0
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/DataSource.js +3 -12
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.js +20 -18
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/helper.js +30 -22
- package/es/event/helper.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/scenegraph/component/table-component.d.ts +4 -0
- package/es/scenegraph/component/table-component.js +73 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +2 -0
- package/es/scenegraph/component/util.js +8 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/chart.js +8 -1
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +19 -15
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +3 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +2 -0
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +8 -3
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +9 -2
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +2 -2
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/cell-move/index.js +14 -3
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/hover/update-position.js +2 -2
- package/es/state/hover/update-position.js.map +1 -1
- package/es/state/resize/update-resize-column.js +1 -0
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/state.d.ts +2 -0
- package/es/state/state.js +4 -0
- package/es/state/state.js.map +1 -1
- package/es/tools/util.d.ts +2 -1
- package/es/tools/util.js +13 -0
- package/es/tools/util.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -34605,6 +34605,21 @@
|
|
|
34605
34605
|
obj[childrenProperty].forEach((child) => traverseObject(child, childrenProperty, callback));
|
|
34606
34606
|
}
|
|
34607
34607
|
}
|
|
34608
|
+
function computeChildrenNodeLength(indexKey, hierarchyState, nodeData) {
|
|
34609
|
+
let size = 0;
|
|
34610
|
+
if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
|
|
34611
|
+
return size;
|
|
34612
|
+
}
|
|
34613
|
+
const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
|
|
34614
|
+
if (children) {
|
|
34615
|
+
for (let i = 0; i < children.length; i++) {
|
|
34616
|
+
size += 1;
|
|
34617
|
+
const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
|
|
34618
|
+
size += computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
|
|
34619
|
+
}
|
|
34620
|
+
}
|
|
34621
|
+
return size;
|
|
34622
|
+
}
|
|
34608
34623
|
|
|
34609
34624
|
const isNode = typeof window === 'undefined' || typeof window.window === 'undefined';
|
|
34610
34625
|
let arrayFind;
|
|
@@ -37286,21 +37301,7 @@
|
|
|
37286
37301
|
this.hasHierarchyStateExpand = true;
|
|
37287
37302
|
}
|
|
37288
37303
|
else if (state === HierarchyState.expand) {
|
|
37289
|
-
|
|
37290
|
-
const computeChildrenNodeLength = (indexKey, hierarchyState, nodeData) => {
|
|
37291
|
-
if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
|
|
37292
|
-
return;
|
|
37293
|
-
}
|
|
37294
|
-
const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
|
|
37295
|
-
if (children) {
|
|
37296
|
-
for (let i = 0; i < children.length; i++) {
|
|
37297
|
-
childrenLength += 1;
|
|
37298
|
-
const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
|
|
37299
|
-
computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
|
|
37300
|
-
}
|
|
37301
|
-
}
|
|
37302
|
-
};
|
|
37303
|
-
computeChildrenNodeLength(indexed, state, data);
|
|
37304
|
+
const childrenLength = computeChildrenNodeLength(indexed, state, data);
|
|
37304
37305
|
this.currentIndexedData.splice(this.currentIndexedData.indexOf(indexed) + 1, childrenLength);
|
|
37305
37306
|
data.hierarchyState = HierarchyState.collapse;
|
|
37306
37307
|
}
|
|
@@ -43660,8 +43661,11 @@
|
|
|
43660
43661
|
});
|
|
43661
43662
|
const textMark = oldCellGroup.getChildByName('text');
|
|
43662
43663
|
if (forceFastUpdate && textMark) {
|
|
43664
|
+
const textAlign = cellTheme.text.textAlign;
|
|
43665
|
+
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
43663
43666
|
const attribute = {
|
|
43664
|
-
textBaseline: 'top'
|
|
43667
|
+
textBaseline: 'top',
|
|
43668
|
+
dx: textAlign === 'left' ? hierarchyOffset : 0
|
|
43665
43669
|
};
|
|
43666
43670
|
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
43667
43671
|
}
|
|
@@ -43722,8 +43726,8 @@
|
|
|
43722
43726
|
const type = isVtableMerge || isCustomMerge
|
|
43723
43727
|
? 'text'
|
|
43724
43728
|
: table.isHeader(col, row)
|
|
43725
|
-
?
|
|
43726
|
-
:
|
|
43729
|
+
? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
|
|
43730
|
+
: table.getBodyColumnType(col, row) ?? 'text';
|
|
43727
43731
|
const padding = cellTheme._vtable.padding;
|
|
43728
43732
|
const textAlign = cellTheme.text.textAlign;
|
|
43729
43733
|
const textBaseline = cellTheme.text.textBaseline;
|
|
@@ -46099,6 +46103,12 @@
|
|
|
46099
46103
|
}
|
|
46100
46104
|
return rowY;
|
|
46101
46105
|
}
|
|
46106
|
+
function getRowBottomY(table) {
|
|
46107
|
+
return table.tableNoFrameHeight - table.getBottomFrozenRowsHeight();
|
|
46108
|
+
}
|
|
46109
|
+
function getRowTopY(table) {
|
|
46110
|
+
return table.getFrozenRowsHeight();
|
|
46111
|
+
}
|
|
46102
46112
|
|
|
46103
46113
|
class TableComponent {
|
|
46104
46114
|
table;
|
|
@@ -46114,6 +46124,8 @@
|
|
|
46114
46124
|
hScrollBar;
|
|
46115
46125
|
frozenShadowLine;
|
|
46116
46126
|
rightFrozenShadowLine;
|
|
46127
|
+
topFrozenShadowLine;
|
|
46128
|
+
bottonFrozenShadowLine;
|
|
46117
46129
|
drillIcon;
|
|
46118
46130
|
cellMover;
|
|
46119
46131
|
labelVisible;
|
|
@@ -46250,6 +46262,7 @@
|
|
|
46250
46262
|
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
46251
46263
|
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
46252
46264
|
const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
|
|
46265
|
+
theme.cellBorder?.borderColor ?? 'red';
|
|
46253
46266
|
const visible = theme.frozenColumnLine?.shadow?.visible;
|
|
46254
46267
|
this.frozenShadowLine = createRect({
|
|
46255
46268
|
visible: visible === 'always',
|
|
@@ -46289,12 +46302,52 @@
|
|
|
46289
46302
|
]
|
|
46290
46303
|
}
|
|
46291
46304
|
});
|
|
46305
|
+
this.topFrozenShadowLine = createRect({
|
|
46306
|
+
visible: visible === 'always',
|
|
46307
|
+
pickable: false,
|
|
46308
|
+
x: 0,
|
|
46309
|
+
y: 0,
|
|
46310
|
+
width: 0,
|
|
46311
|
+
height: shadowWidth,
|
|
46312
|
+
fill: {
|
|
46313
|
+
gradient: 'linear',
|
|
46314
|
+
x0: 0,
|
|
46315
|
+
y0: 0,
|
|
46316
|
+
x1: 0,
|
|
46317
|
+
y1: 1,
|
|
46318
|
+
stops: [
|
|
46319
|
+
{ color: shadowStartColor, offset: 0 },
|
|
46320
|
+
{ color: shadowEndColor, offset: 1 }
|
|
46321
|
+
]
|
|
46322
|
+
}
|
|
46323
|
+
});
|
|
46324
|
+
this.bottonFrozenShadowLine = createRect({
|
|
46325
|
+
visible: visible === 'always',
|
|
46326
|
+
pickable: false,
|
|
46327
|
+
x: 0,
|
|
46328
|
+
y: 0,
|
|
46329
|
+
width: 0,
|
|
46330
|
+
height: shadowWidth,
|
|
46331
|
+
fill: {
|
|
46332
|
+
gradient: 'linear',
|
|
46333
|
+
x0: 0,
|
|
46334
|
+
y0: 0,
|
|
46335
|
+
x1: 0,
|
|
46336
|
+
y1: 1,
|
|
46337
|
+
stops: [
|
|
46338
|
+
{ color: shadowEndColor, offset: 0 },
|
|
46339
|
+
{ color: shadowStartColor, offset: 1 }
|
|
46340
|
+
]
|
|
46341
|
+
}
|
|
46342
|
+
});
|
|
46292
46343
|
this.menu = new MenuHandler$1(this.table);
|
|
46293
46344
|
this.drillIcon = new DrillIcon();
|
|
46294
46345
|
}
|
|
46295
46346
|
addToGroup(componentGroup) {
|
|
46296
46347
|
componentGroup.addChild(this.frozenShadowLine);
|
|
46297
46348
|
componentGroup.addChild(this.rightFrozenShadowLine);
|
|
46349
|
+
componentGroup.addChild(this.bottonFrozenShadowLine);
|
|
46350
|
+
componentGroup.addChild(this.topFrozenShadowLine);
|
|
46298
46351
|
componentGroup.addChild(this.columnResizeBgLine);
|
|
46299
46352
|
componentGroup.addChild(this.columnResizeLine);
|
|
46300
46353
|
componentGroup.addChild(this.columnResizeLabel);
|
|
@@ -46622,6 +46675,40 @@
|
|
|
46622
46675
|
});
|
|
46623
46676
|
}
|
|
46624
46677
|
}
|
|
46678
|
+
setBottonFrozenColumnShadow() {
|
|
46679
|
+
const rowY = getRowBottomY(this.table);
|
|
46680
|
+
if (this.table.bottomFrozenRowCount === 0 || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
46681
|
+
this.bottonFrozenShadowLine.setAttributes({
|
|
46682
|
+
visible: false,
|
|
46683
|
+
y: 0,
|
|
46684
|
+
width: 0
|
|
46685
|
+
});
|
|
46686
|
+
}
|
|
46687
|
+
else {
|
|
46688
|
+
this.bottonFrozenShadowLine.setAttributes({
|
|
46689
|
+
visible: true,
|
|
46690
|
+
y: rowY - (this.table.theme.frozenColumnLine?.shadow?.width ?? 2),
|
|
46691
|
+
width: this.table.getDrawRange().width
|
|
46692
|
+
});
|
|
46693
|
+
}
|
|
46694
|
+
}
|
|
46695
|
+
setTopFrozenColumnShadow() {
|
|
46696
|
+
const rowY = getRowTopY(this.table);
|
|
46697
|
+
if (this.table.columnHeaderLevelCount === this.table.frozenRowCount || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
46698
|
+
this.bottonFrozenShadowLine.setAttributes({
|
|
46699
|
+
visible: false,
|
|
46700
|
+
y: 0,
|
|
46701
|
+
width: 0
|
|
46702
|
+
});
|
|
46703
|
+
}
|
|
46704
|
+
else {
|
|
46705
|
+
this.topFrozenShadowLine.setAttributes({
|
|
46706
|
+
visible: true,
|
|
46707
|
+
y: rowY,
|
|
46708
|
+
width: this.table.getDrawRange().width
|
|
46709
|
+
});
|
|
46710
|
+
}
|
|
46711
|
+
}
|
|
46625
46712
|
hideFrozenColumnShadow() {
|
|
46626
46713
|
const visible1 = this.table.theme.frozenColumnLine?.shadow?.visible;
|
|
46627
46714
|
const visible = this.table.theme.frozenColumnLine?.shadow?.visible ?? visible1;
|
|
@@ -47131,6 +47218,114 @@
|
|
|
47131
47218
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
47132
47219
|
}
|
|
47133
47220
|
|
|
47221
|
+
function getCellHoverColor(cellGroup, table) {
|
|
47222
|
+
let colorKey;
|
|
47223
|
+
if (cellGroup.role === 'cell' &&
|
|
47224
|
+
isValid$3(cellGroup.mergeStartCol) &&
|
|
47225
|
+
isValid$3(cellGroup.mergeStartRow) &&
|
|
47226
|
+
isValid$3(cellGroup.mergeEndCol) &&
|
|
47227
|
+
isValid$3(cellGroup.mergeEndRow)) {
|
|
47228
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
47229
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
47230
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
47231
|
+
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
47232
|
+
if (key && (!colorKey || key === 'cellBgColor')) {
|
|
47233
|
+
colorKey = key;
|
|
47234
|
+
}
|
|
47235
|
+
}
|
|
47236
|
+
}
|
|
47237
|
+
}
|
|
47238
|
+
else if (cellGroup.role === 'cell') {
|
|
47239
|
+
colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
|
|
47240
|
+
}
|
|
47241
|
+
if (!colorKey) {
|
|
47242
|
+
return undefined;
|
|
47243
|
+
}
|
|
47244
|
+
let hoverStyle;
|
|
47245
|
+
const layout = table.internalProps.layoutMap;
|
|
47246
|
+
if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
|
|
47247
|
+
hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
|
|
47248
|
+
}
|
|
47249
|
+
else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
|
|
47250
|
+
hoverStyle = table.theme.headerStyle?.hover;
|
|
47251
|
+
}
|
|
47252
|
+
else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
|
|
47253
|
+
hoverStyle = table.theme.rowHeaderStyle?.hover;
|
|
47254
|
+
}
|
|
47255
|
+
else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
|
|
47256
|
+
hoverStyle =
|
|
47257
|
+
table.theme.bottomFrozenStyle?.hover ||
|
|
47258
|
+
(table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
|
|
47259
|
+
}
|
|
47260
|
+
else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
|
|
47261
|
+
hoverStyle =
|
|
47262
|
+
table.theme.rightFrozenStyle?.hover ||
|
|
47263
|
+
(table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
|
|
47264
|
+
}
|
|
47265
|
+
else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
|
|
47266
|
+
hoverStyle = table.theme.bodyStyle?.hover;
|
|
47267
|
+
}
|
|
47268
|
+
const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
47269
|
+
return fillColor;
|
|
47270
|
+
}
|
|
47271
|
+
function isCellHover(state, col, row, cellGroup) {
|
|
47272
|
+
const { highlightScope, disableHeader, cellPos } = state.hover;
|
|
47273
|
+
const table = state.table;
|
|
47274
|
+
const isHeader = table.isHeader(col, row);
|
|
47275
|
+
if (isHeader && disableHeader) {
|
|
47276
|
+
return undefined;
|
|
47277
|
+
}
|
|
47278
|
+
let hoverMode;
|
|
47279
|
+
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
|
|
47280
|
+
hoverMode = 'cellBgColor';
|
|
47281
|
+
}
|
|
47282
|
+
else if (highlightScope === HighlightScope.column && cellPos.col === col) {
|
|
47283
|
+
if (cellPos.col === col && cellPos.row === row) {
|
|
47284
|
+
hoverMode = 'cellBgColor';
|
|
47285
|
+
}
|
|
47286
|
+
else {
|
|
47287
|
+
hoverMode = 'inlineColumnBgColor';
|
|
47288
|
+
}
|
|
47289
|
+
}
|
|
47290
|
+
else if (highlightScope === HighlightScope.row && cellPos.row === row) {
|
|
47291
|
+
if (cellPos.col === col && cellPos.row === row) {
|
|
47292
|
+
hoverMode = 'cellBgColor';
|
|
47293
|
+
}
|
|
47294
|
+
else {
|
|
47295
|
+
hoverMode = 'inlineRowBgColor';
|
|
47296
|
+
}
|
|
47297
|
+
}
|
|
47298
|
+
else if (highlightScope === HighlightScope.cross) {
|
|
47299
|
+
if (cellPos.col === col && cellPos.row === row) {
|
|
47300
|
+
hoverMode = 'cellBgColor';
|
|
47301
|
+
}
|
|
47302
|
+
else if (cellPos.col === col) {
|
|
47303
|
+
hoverMode = 'inlineColumnBgColor';
|
|
47304
|
+
}
|
|
47305
|
+
else if (cellPos.row === row) {
|
|
47306
|
+
hoverMode = 'inlineRowBgColor';
|
|
47307
|
+
}
|
|
47308
|
+
}
|
|
47309
|
+
if (hoverMode) {
|
|
47310
|
+
let cellDisable;
|
|
47311
|
+
if (isHeader) {
|
|
47312
|
+
const define = table.getHeaderDefine(col, row);
|
|
47313
|
+
cellDisable = define?.disableHeaderHover;
|
|
47314
|
+
if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
|
|
47315
|
+
cellDisable = true;
|
|
47316
|
+
}
|
|
47317
|
+
}
|
|
47318
|
+
else {
|
|
47319
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
47320
|
+
cellDisable = define?.disableHover;
|
|
47321
|
+
}
|
|
47322
|
+
if (cellDisable) {
|
|
47323
|
+
hoverMode = undefined;
|
|
47324
|
+
}
|
|
47325
|
+
}
|
|
47326
|
+
return hoverMode;
|
|
47327
|
+
}
|
|
47328
|
+
|
|
47134
47329
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
47135
47330
|
class Chart extends Rect$2 {
|
|
47136
47331
|
type = 'chart';
|
|
@@ -47166,6 +47361,7 @@
|
|
|
47166
47361
|
activate(table) {
|
|
47167
47362
|
this.active = true;
|
|
47168
47363
|
const { col, row } = this.parent;
|
|
47364
|
+
const hoverColor = getCellHoverColor(this.parent, table);
|
|
47169
47365
|
const { x1, y1, x2, y2 } = this.getViewBox();
|
|
47170
47366
|
const tableBound = getTableBounds(col, row, table);
|
|
47171
47367
|
const clipBound = tableBound.intersect({
|
|
@@ -47214,6 +47410,15 @@
|
|
|
47214
47410
|
ctx.inuse = false;
|
|
47215
47411
|
stage.needRender = false;
|
|
47216
47412
|
chartStage.resumeRender();
|
|
47413
|
+
},
|
|
47414
|
+
afterClearScreen(drawParams) {
|
|
47415
|
+
const { context, layer, viewBox } = drawParams;
|
|
47416
|
+
if (layer.main) {
|
|
47417
|
+
context.beginPath();
|
|
47418
|
+
context.fillStyle = hoverColor;
|
|
47419
|
+
context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1);
|
|
47420
|
+
context.fill();
|
|
47421
|
+
}
|
|
47217
47422
|
}
|
|
47218
47423
|
}));
|
|
47219
47424
|
const chartStage = this.activeChartInstance.getStage();
|
|
@@ -47684,114 +47889,6 @@
|
|
|
47684
47889
|
injectable()
|
|
47685
47890
|
], AfterGifImageRenderContribution);
|
|
47686
47891
|
|
|
47687
|
-
function getCellHoverColor(cellGroup, table) {
|
|
47688
|
-
let colorKey;
|
|
47689
|
-
if (cellGroup.role === 'cell' &&
|
|
47690
|
-
isValid$3(cellGroup.mergeStartCol) &&
|
|
47691
|
-
isValid$3(cellGroup.mergeStartRow) &&
|
|
47692
|
-
isValid$3(cellGroup.mergeEndCol) &&
|
|
47693
|
-
isValid$3(cellGroup.mergeEndRow)) {
|
|
47694
|
-
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
47695
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
47696
|
-
for (let row = rowStart; row <= rowEnd; row++) {
|
|
47697
|
-
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
47698
|
-
if (key && (!colorKey || key === 'cellBgColor')) {
|
|
47699
|
-
colorKey = key;
|
|
47700
|
-
}
|
|
47701
|
-
}
|
|
47702
|
-
}
|
|
47703
|
-
}
|
|
47704
|
-
else if (cellGroup.role === 'cell') {
|
|
47705
|
-
colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
|
|
47706
|
-
}
|
|
47707
|
-
if (!colorKey) {
|
|
47708
|
-
return undefined;
|
|
47709
|
-
}
|
|
47710
|
-
let hoverStyle;
|
|
47711
|
-
const layout = table.internalProps.layoutMap;
|
|
47712
|
-
if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
|
|
47713
|
-
hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
|
|
47714
|
-
}
|
|
47715
|
-
else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
|
|
47716
|
-
hoverStyle = table.theme.headerStyle?.hover;
|
|
47717
|
-
}
|
|
47718
|
-
else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
|
|
47719
|
-
hoverStyle = table.theme.rowHeaderStyle?.hover;
|
|
47720
|
-
}
|
|
47721
|
-
else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
|
|
47722
|
-
hoverStyle =
|
|
47723
|
-
table.theme.bottomFrozenStyle?.hover ||
|
|
47724
|
-
(table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
|
|
47725
|
-
}
|
|
47726
|
-
else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
|
|
47727
|
-
hoverStyle =
|
|
47728
|
-
table.theme.rightFrozenStyle?.hover ||
|
|
47729
|
-
(table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
|
|
47730
|
-
}
|
|
47731
|
-
else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
|
|
47732
|
-
hoverStyle = table.theme.bodyStyle?.hover;
|
|
47733
|
-
}
|
|
47734
|
-
const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
47735
|
-
return fillColor;
|
|
47736
|
-
}
|
|
47737
|
-
function isCellHover(state, col, row, cellGroup) {
|
|
47738
|
-
const { highlightScope, disableHeader, cellPos } = state.hover;
|
|
47739
|
-
const table = state.table;
|
|
47740
|
-
const isHeader = table.isHeader(col, row);
|
|
47741
|
-
if (isHeader && disableHeader) {
|
|
47742
|
-
return undefined;
|
|
47743
|
-
}
|
|
47744
|
-
let hoverMode;
|
|
47745
|
-
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
|
|
47746
|
-
hoverMode = 'cellBgColor';
|
|
47747
|
-
}
|
|
47748
|
-
else if (highlightScope === HighlightScope.column && cellPos.col === col) {
|
|
47749
|
-
if (cellPos.col === col && cellPos.row === row) {
|
|
47750
|
-
hoverMode = 'cellBgColor';
|
|
47751
|
-
}
|
|
47752
|
-
else {
|
|
47753
|
-
hoverMode = 'inlineColumnBgColor';
|
|
47754
|
-
}
|
|
47755
|
-
}
|
|
47756
|
-
else if (highlightScope === HighlightScope.row && cellPos.row === row) {
|
|
47757
|
-
if (cellPos.col === col && cellPos.row === row) {
|
|
47758
|
-
hoverMode = 'cellBgColor';
|
|
47759
|
-
}
|
|
47760
|
-
else {
|
|
47761
|
-
hoverMode = 'inlineRowBgColor';
|
|
47762
|
-
}
|
|
47763
|
-
}
|
|
47764
|
-
else if (highlightScope === HighlightScope.cross) {
|
|
47765
|
-
if (cellPos.col === col && cellPos.row === row) {
|
|
47766
|
-
hoverMode = 'cellBgColor';
|
|
47767
|
-
}
|
|
47768
|
-
else if (cellPos.col === col) {
|
|
47769
|
-
hoverMode = 'inlineColumnBgColor';
|
|
47770
|
-
}
|
|
47771
|
-
else if (cellPos.row === row) {
|
|
47772
|
-
hoverMode = 'inlineRowBgColor';
|
|
47773
|
-
}
|
|
47774
|
-
}
|
|
47775
|
-
if (hoverMode) {
|
|
47776
|
-
let cellDisable;
|
|
47777
|
-
if (isHeader) {
|
|
47778
|
-
const define = table.getHeaderDefine(col, row);
|
|
47779
|
-
cellDisable = define?.disableHeaderHover;
|
|
47780
|
-
if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
|
|
47781
|
-
cellDisable = true;
|
|
47782
|
-
}
|
|
47783
|
-
}
|
|
47784
|
-
else {
|
|
47785
|
-
const define = table.getBodyColumnDefine(col, row);
|
|
47786
|
-
cellDisable = define?.disableHover;
|
|
47787
|
-
}
|
|
47788
|
-
if (cellDisable) {
|
|
47789
|
-
hoverMode = undefined;
|
|
47790
|
-
}
|
|
47791
|
-
}
|
|
47792
|
-
return hoverMode;
|
|
47793
|
-
}
|
|
47794
|
-
|
|
47795
47892
|
function getCellSelectColor(cellGroup, table) {
|
|
47796
47893
|
let colorKey;
|
|
47797
47894
|
if (cellGroup.role === 'cell' &&
|
|
@@ -48493,7 +48590,7 @@
|
|
|
48493
48590
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
|
|
48494
48591
|
if (group.__customInfoBefore) {
|
|
48495
48592
|
const table = group.stage.table;
|
|
48496
|
-
if (table) {
|
|
48593
|
+
if (table && table.stateManager.interactionState !== InteractionState.scrolling) {
|
|
48497
48594
|
group.__customInfoBefore({
|
|
48498
48595
|
group,
|
|
48499
48596
|
context,
|
|
@@ -48522,20 +48619,23 @@
|
|
|
48522
48619
|
order = 0;
|
|
48523
48620
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
48524
48621
|
if (group.__customInfo) {
|
|
48525
|
-
group.
|
|
48526
|
-
|
|
48527
|
-
|
|
48528
|
-
|
|
48529
|
-
|
|
48530
|
-
|
|
48531
|
-
|
|
48532
|
-
|
|
48533
|
-
|
|
48534
|
-
|
|
48535
|
-
|
|
48536
|
-
|
|
48537
|
-
|
|
48538
|
-
|
|
48622
|
+
const table = group.stage.table;
|
|
48623
|
+
if (table && table.stateManager.interactionState !== InteractionState.scrolling) {
|
|
48624
|
+
group.__customInfo({
|
|
48625
|
+
group,
|
|
48626
|
+
context,
|
|
48627
|
+
x,
|
|
48628
|
+
y,
|
|
48629
|
+
doFill,
|
|
48630
|
+
doStroke,
|
|
48631
|
+
fVisible,
|
|
48632
|
+
sVisible,
|
|
48633
|
+
groupAttribute,
|
|
48634
|
+
drawContext,
|
|
48635
|
+
fillCb,
|
|
48636
|
+
strokeCb
|
|
48637
|
+
});
|
|
48638
|
+
}
|
|
48539
48639
|
}
|
|
48540
48640
|
}
|
|
48541
48641
|
};
|
|
@@ -49797,9 +49897,9 @@
|
|
|
49797
49897
|
}
|
|
49798
49898
|
const type = isVtableMerge || isCustomMerge
|
|
49799
49899
|
? 'text'
|
|
49800
|
-
: (
|
|
49801
|
-
?
|
|
49802
|
-
: table.getBodyColumnType(col, row)) ?? 'text'
|
|
49900
|
+
: (table.isHeader(col, row)
|
|
49901
|
+
? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
|
|
49902
|
+
: table.getBodyColumnType(col, row)) ?? 'text';
|
|
49803
49903
|
if (isPromise(value)) {
|
|
49804
49904
|
createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
|
|
49805
49905
|
dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
|
|
@@ -51787,8 +51887,8 @@
|
|
|
51787
51887
|
selectComp.rect.setAttributes({
|
|
51788
51888
|
x: firstCellBound.x1 - scene.tableGroup.attribute.x,
|
|
51789
51889
|
y: firstCellBound.y1 - scene.tableGroup.attribute.y,
|
|
51790
|
-
width: colsWidth,
|
|
51791
|
-
height: rowsHeight,
|
|
51890
|
+
width: colsWidth - 1,
|
|
51891
|
+
height: rowsHeight - 1,
|
|
51792
51892
|
visible: true
|
|
51793
51893
|
});
|
|
51794
51894
|
if (selectComp.fillhandle) {
|
|
@@ -52455,6 +52555,7 @@
|
|
|
52455
52555
|
const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);
|
|
52456
52556
|
rowUpdatePos = isValid$3(rowUpdatePos) ? (isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
|
|
52457
52557
|
}
|
|
52558
|
+
const batchMergePos = new Set();
|
|
52458
52559
|
for (let col = 0; col < table.colCount; col++) {
|
|
52459
52560
|
updateRows.forEach(row => {
|
|
52460
52561
|
if (row < table.frozenRowCount) {
|
|
@@ -52462,7 +52563,11 @@
|
|
|
52462
52563
|
if (mergeInfo) {
|
|
52463
52564
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
52464
52565
|
for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
52465
|
-
|
|
52566
|
+
const key = `${col}-${row}`;
|
|
52567
|
+
if (!batchMergePos.has(key)) {
|
|
52568
|
+
updateCell$1(col, row, scene.table, false);
|
|
52569
|
+
batchMergePos.add(key);
|
|
52570
|
+
}
|
|
52466
52571
|
}
|
|
52467
52572
|
}
|
|
52468
52573
|
}
|
|
@@ -52480,7 +52585,11 @@
|
|
|
52480
52585
|
if (mergeInfo) {
|
|
52481
52586
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
52482
52587
|
for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
52483
|
-
|
|
52588
|
+
const key = `${col}-${row}`;
|
|
52589
|
+
if (!batchMergePos.has(key)) {
|
|
52590
|
+
updateCell$1(col, row, scene.table, false);
|
|
52591
|
+
batchMergePos.add(key);
|
|
52592
|
+
}
|
|
52484
52593
|
}
|
|
52485
52594
|
}
|
|
52486
52595
|
}
|
|
@@ -53077,6 +53186,8 @@
|
|
|
53077
53186
|
else if (scene.table.options.frozenColCount) {
|
|
53078
53187
|
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
53079
53188
|
}
|
|
53189
|
+
scene.component.setBottonFrozenColumnShadow();
|
|
53190
|
+
scene.component.setTopFrozenColumnShadow();
|
|
53080
53191
|
scene.hasFrozen = true;
|
|
53081
53192
|
scene.frozenColCount = scene.table.frozenColCount;
|
|
53082
53193
|
scene.frozenRowCount =
|
|
@@ -53127,6 +53238,8 @@
|
|
|
53127
53238
|
else if (scene.table.options.rightFrozenColCount) {
|
|
53128
53239
|
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);
|
|
53129
53240
|
}
|
|
53241
|
+
scene.component.setBottonFrozenColumnShadow();
|
|
53242
|
+
scene.component.setTopFrozenColumnShadow();
|
|
53130
53243
|
scene.hasFrozen = true;
|
|
53131
53244
|
}
|
|
53132
53245
|
function moveColumnFromBodyToRowHeader(scene) {
|
|
@@ -54230,13 +54343,18 @@
|
|
|
54230
54343
|
colWidthsMap.addAndReorder(col);
|
|
54231
54344
|
});
|
|
54232
54345
|
resetColNumberAndX(scene);
|
|
54346
|
+
const batchMergePos = new Set();
|
|
54233
54347
|
updateCols.forEach(col => {
|
|
54234
54348
|
for (let row = 0; row < table.rowCount; row++) {
|
|
54235
54349
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
54236
54350
|
if (mergeInfo) {
|
|
54237
54351
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
54238
54352
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
54239
|
-
|
|
54353
|
+
const key = `${col}-${row}`;
|
|
54354
|
+
if (!batchMergePos.has(key)) {
|
|
54355
|
+
updateCell$1(col, row, scene.table, false);
|
|
54356
|
+
batchMergePos.add(key);
|
|
54357
|
+
}
|
|
54240
54358
|
}
|
|
54241
54359
|
}
|
|
54242
54360
|
}
|
|
@@ -55536,6 +55654,8 @@
|
|
|
55536
55654
|
if (!this.isPivot && !this.table.transpose) {
|
|
55537
55655
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
55538
55656
|
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
55657
|
+
this.component.setBottonFrozenColumnShadow();
|
|
55658
|
+
this.component.setTopFrozenColumnShadow();
|
|
55539
55659
|
}
|
|
55540
55660
|
else if (this.table.options.frozenColCount) {
|
|
55541
55661
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
@@ -56050,6 +56170,8 @@
|
|
|
56050
56170
|
if (!this.isPivot && !this.table.transpose) {
|
|
56051
56171
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
56052
56172
|
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
56173
|
+
this.component.setBottonFrozenColumnShadow();
|
|
56174
|
+
this.component.setTopFrozenColumnShadow();
|
|
56053
56175
|
}
|
|
56054
56176
|
else if (this.table.options.frozenColCount) {
|
|
56055
56177
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
@@ -56068,6 +56190,8 @@
|
|
|
56068
56190
|
if (!this.isPivot && !this.table.transpose) {
|
|
56069
56191
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
56070
56192
|
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount);
|
|
56193
|
+
this.component.setBottonFrozenColumnShadow();
|
|
56194
|
+
this.component.setTopFrozenColumnShadow();
|
|
56071
56195
|
}
|
|
56072
56196
|
else if (this.table.options.frozenColCount) {
|
|
56073
56197
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
@@ -56266,6 +56390,8 @@
|
|
|
56266
56390
|
if (prevHoverCellCol === col && prevHoverCellRow === row) {
|
|
56267
56391
|
return;
|
|
56268
56392
|
}
|
|
56393
|
+
cellPos.col = col;
|
|
56394
|
+
cellPos.row = row;
|
|
56269
56395
|
if (!state.table.options.customConfig?.disableBuildInChartActive) {
|
|
56270
56396
|
scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow);
|
|
56271
56397
|
scenegraph.activateChart(col, row);
|
|
@@ -56306,8 +56432,6 @@
|
|
|
56306
56432
|
if (highlightScope !== HighlightScope.none && !disableHeader) {
|
|
56307
56433
|
scenegraph.showHoverIcon(col, row);
|
|
56308
56434
|
}
|
|
56309
|
-
cellPos.col = col;
|
|
56310
|
-
cellPos.row = row;
|
|
56311
56435
|
if (updateScenegraph) {
|
|
56312
56436
|
state.table.scenegraph.updateNextFrame();
|
|
56313
56437
|
}
|
|
@@ -57055,6 +57179,12 @@
|
|
|
57055
57179
|
state.columnMove.moving = true;
|
|
57056
57180
|
state.columnMove.colSource = col;
|
|
57057
57181
|
state.columnMove.rowSource = row;
|
|
57182
|
+
if (state.table.isListTable()) {
|
|
57183
|
+
const nodeIndex = state.table.getRecordIndexByCell(col, row);
|
|
57184
|
+
const nodeData = state.table.getRecordByCell(col, row);
|
|
57185
|
+
const hierarchyState = state.table.getRecordHierarchyState(col, row);
|
|
57186
|
+
state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
|
|
57187
|
+
}
|
|
57058
57188
|
state.columnMove.x = x - state.table.tableX;
|
|
57059
57189
|
state.columnMove.y = y - state.table.tableY;
|
|
57060
57190
|
const cellLocation = state.table.getCellLocation(col, row);
|
|
@@ -57097,6 +57227,12 @@
|
|
|
57097
57227
|
state.columnMove.y = y - state.table.tableY;
|
|
57098
57228
|
state.columnMove.colTarget = targetCell.col;
|
|
57099
57229
|
state.columnMove.rowTarget = targetCell.row;
|
|
57230
|
+
if (state.table.isListTable()) {
|
|
57231
|
+
const nodeIndex = state.table.getRecordIndexByCell(targetCell.col, targetCell.row);
|
|
57232
|
+
const nodeData = state.table.getRecordByCell(targetCell.col, targetCell.row);
|
|
57233
|
+
const hierarchyState = state.table.getRecordHierarchyState(targetCell.col, targetCell.row);
|
|
57234
|
+
state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
|
|
57235
|
+
}
|
|
57100
57236
|
state.updateCursor('grabbing');
|
|
57101
57237
|
let lineX;
|
|
57102
57238
|
let backX;
|
|
@@ -57270,6 +57406,8 @@
|
|
|
57270
57406
|
else if (state.table.options.rightFrozenColCount) {
|
|
57271
57407
|
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
57272
57408
|
}
|
|
57409
|
+
state.table.scenegraph.component.setBottonFrozenColumnShadow();
|
|
57410
|
+
state.table.scenegraph.component.setTopFrozenColumnShadow();
|
|
57273
57411
|
state.table.scenegraph.updateNextFrame();
|
|
57274
57412
|
if (state.table.options.customConfig?.notUpdateInColumnRowMove === true) {
|
|
57275
57413
|
return true;
|
|
@@ -57409,6 +57547,8 @@
|
|
|
57409
57547
|
else if (state.table.options.rightFrozenColCount) {
|
|
57410
57548
|
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
57411
57549
|
}
|
|
57550
|
+
state.table.scenegraph.component.setBottonFrozenColumnShadow();
|
|
57551
|
+
state.table.scenegraph.component.setTopFrozenColumnShadow();
|
|
57412
57552
|
state.table.scenegraph.updateNextFrame();
|
|
57413
57553
|
}
|
|
57414
57554
|
function updateResizeColForColumn(detaX, state) {
|
|
@@ -58220,6 +58360,8 @@
|
|
|
58220
58360
|
colTarget: -1,
|
|
58221
58361
|
rowSource: -1,
|
|
58222
58362
|
rowTarget: -1,
|
|
58363
|
+
rowSourceSize: 0,
|
|
58364
|
+
rowTargetSize: 0,
|
|
58223
58365
|
x: 0,
|
|
58224
58366
|
y: 0,
|
|
58225
58367
|
moving: false
|
|
@@ -58300,6 +58442,8 @@
|
|
|
58300
58442
|
colTarget: -1,
|
|
58301
58443
|
rowSource: -1,
|
|
58302
58444
|
rowTarget: -1,
|
|
58445
|
+
rowSourceSize: 0,
|
|
58446
|
+
rowTargetSize: 0,
|
|
58303
58447
|
x: 0,
|
|
58304
58448
|
y: 0,
|
|
58305
58449
|
moving: false
|
|
@@ -59729,11 +59873,14 @@
|
|
|
59729
59873
|
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
59730
59874
|
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
59731
59875
|
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
59876
|
+
const { colSource, rowSource, colTarget, rowTarget } = table.stateManager.columnMove;
|
|
59877
|
+
const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
|
|
59878
|
+
const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
|
|
59732
59879
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
59733
|
-
target: { col:
|
|
59880
|
+
target: { col: colTarget, row: rowTarget + rowTargetSize - rowSourceSize },
|
|
59734
59881
|
source: {
|
|
59735
|
-
col:
|
|
59736
|
-
row:
|
|
59882
|
+
col: colSource,
|
|
59883
|
+
row: rowSource
|
|
59737
59884
|
},
|
|
59738
59885
|
event: e
|
|
59739
59886
|
});
|
|
@@ -59741,8 +59888,13 @@
|
|
|
59741
59888
|
}
|
|
59742
59889
|
else if (!endMoveColSuccess) {
|
|
59743
59890
|
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL)) {
|
|
59891
|
+
const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
|
|
59892
|
+
const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
|
|
59744
59893
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL, {
|
|
59745
|
-
target: {
|
|
59894
|
+
target: {
|
|
59895
|
+
col: table.stateManager.columnMove.colTarget,
|
|
59896
|
+
row: table.stateManager.columnMove.rowTarget + rowTargetSize - rowSourceSize
|
|
59897
|
+
},
|
|
59746
59898
|
source: {
|
|
59747
59899
|
col: table.stateManager.columnMove.colSource,
|
|
59748
59900
|
row: table.stateManager.columnMove.rowSource
|
|
@@ -67079,7 +67231,7 @@
|
|
|
67079
67231
|
return TABLE_EVENT_TYPE;
|
|
67080
67232
|
}
|
|
67081
67233
|
options;
|
|
67082
|
-
version = "1.0.
|
|
67234
|
+
version = "1.0.9";
|
|
67083
67235
|
pagination;
|
|
67084
67236
|
id = `VTable${Date.now()}`;
|
|
67085
67237
|
headerStyleCache;
|
|
@@ -74857,6 +75009,16 @@
|
|
|
74857
75009
|
const index = this.getRecordShowIndexByCell(col, row);
|
|
74858
75010
|
return this.dataSource.getHierarchyState(index);
|
|
74859
75011
|
}
|
|
75012
|
+
getRecordHierarchyState(col, row) {
|
|
75013
|
+
let recordIndex;
|
|
75014
|
+
if (this.transpose) {
|
|
75015
|
+
this.getRecordShowIndexByCell(col, 0);
|
|
75016
|
+
}
|
|
75017
|
+
else {
|
|
75018
|
+
recordIndex = this.getRecordShowIndexByCell(0, row);
|
|
75019
|
+
}
|
|
75020
|
+
return this.dataSource.getHierarchyState(recordIndex);
|
|
75021
|
+
}
|
|
74860
75022
|
toggleHierarchyState(col, row, recalculateColWidths = true) {
|
|
74861
75023
|
this.stateManager.updateHoverIcon(col, row, undefined, undefined);
|
|
74862
75024
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
@@ -87061,7 +87223,7 @@
|
|
|
87061
87223
|
const newCellAggregator = new SumAggregator({
|
|
87062
87224
|
key: indicator,
|
|
87063
87225
|
field: indicator,
|
|
87064
|
-
isRecord: true
|
|
87226
|
+
isRecord: true
|
|
87065
87227
|
});
|
|
87066
87228
|
newCellAggregator.changedValue = newValue;
|
|
87067
87229
|
this.recalculateTotals(rowKey, colKey, indicator, newCellAggregator);
|
|
@@ -87134,6 +87296,25 @@
|
|
|
87134
87296
|
if (this.totals?.row?.showGrandTotals) {
|
|
87135
87297
|
if (this.tree[this.rowGrandTotalLabel]?.[flatColKey]?.[indicatorIndex]) {
|
|
87136
87298
|
addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey);
|
|
87299
|
+
if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
|
|
87300
|
+
for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
|
|
87301
|
+
const colDimension = this.totals.column.subTotalsDimensions[j];
|
|
87302
|
+
const colDimensionIndex = this.columns.indexOf(colDimension);
|
|
87303
|
+
if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
|
|
87304
|
+
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
87305
|
+
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
87306
|
+
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
87307
|
+
if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
|
|
87308
|
+
addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
|
|
87309
|
+
}
|
|
87310
|
+
}
|
|
87311
|
+
}
|
|
87312
|
+
}
|
|
87313
|
+
if (this.totals?.column?.showGrandTotals) {
|
|
87314
|
+
if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
|
|
87315
|
+
addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
|
|
87316
|
+
}
|
|
87317
|
+
}
|
|
87137
87318
|
}
|
|
87138
87319
|
if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
|
|
87139
87320
|
for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
|
|
@@ -87143,43 +87324,24 @@
|
|
|
87143
87324
|
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
87144
87325
|
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
87145
87326
|
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
87146
|
-
if (this.tree[
|
|
87147
|
-
addAggregatorToResetSet(this.tree[
|
|
87327
|
+
if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
|
|
87328
|
+
addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
|
|
87148
87329
|
}
|
|
87149
87330
|
}
|
|
87150
87331
|
}
|
|
87151
87332
|
}
|
|
87152
87333
|
if (this.totals?.column?.showGrandTotals) {
|
|
87153
|
-
if (this.tree[
|
|
87154
|
-
addAggregatorToResetSet(this.tree[
|
|
87334
|
+
if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
|
|
87335
|
+
addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
|
|
87155
87336
|
}
|
|
87156
87337
|
}
|
|
87157
|
-
|
|
87158
|
-
|
|
87159
|
-
|
|
87160
|
-
const colDimension = this.totals.column.subTotalsDimensions[j];
|
|
87161
|
-
const colDimensionIndex = this.columns.indexOf(colDimension);
|
|
87162
|
-
if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
|
|
87163
|
-
const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
|
|
87164
|
-
colSubTotalKeyParts.push(this.colSubTotalLabel);
|
|
87165
|
-
const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
|
|
87166
|
-
if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
|
|
87167
|
-
addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
|
|
87168
|
-
}
|
|
87338
|
+
aggregatorsToReset.forEach(agg => {
|
|
87339
|
+
if (newCellAggregator && subTotalAggregators.has(agg)) {
|
|
87340
|
+
agg.push(newCellAggregator);
|
|
87169
87341
|
}
|
|
87170
|
-
|
|
87171
|
-
|
|
87172
|
-
if (this.totals?.column?.showGrandTotals) {
|
|
87173
|
-
if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
|
|
87174
|
-
addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
|
|
87175
|
-
}
|
|
87342
|
+
agg.recalculate();
|
|
87343
|
+
});
|
|
87176
87344
|
}
|
|
87177
|
-
aggregatorsToReset.forEach(agg => {
|
|
87178
|
-
if (newCellAggregator && subTotalAggregators.has(agg)) {
|
|
87179
|
-
agg.push(newCellAggregator);
|
|
87180
|
-
}
|
|
87181
|
-
agg.recalculate();
|
|
87182
|
-
});
|
|
87183
87345
|
}
|
|
87184
87346
|
changeRecordFieldValue(fieldName, oldValue, value) {
|
|
87185
87347
|
let isIndicatorName = false;
|
|
@@ -90752,7 +90914,7 @@
|
|
|
90752
90914
|
}
|
|
90753
90915
|
|
|
90754
90916
|
registerForVrender();
|
|
90755
|
-
const version = "1.0.
|
|
90917
|
+
const version = "1.0.9";
|
|
90756
90918
|
function getIcons() {
|
|
90757
90919
|
return get$2();
|
|
90758
90920
|
}
|