@visactor/vtable-calendar 1.24.0 → 1.25.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +759 -231
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +9 -9
package/dist/vtable-calendar.js
CHANGED
|
@@ -39534,12 +39534,14 @@
|
|
|
39534
39534
|
return limits ? limits.min && limits.min > orgWidth ? limits.min : limits.max && limits.max < orgWidth ? limits.max : orgWidth : orgWidth;
|
|
39535
39535
|
}
|
|
39536
39536
|
function _getScrollableVisibleRect(table) {
|
|
39537
|
+
var _a, _b;
|
|
39537
39538
|
let frozenColsWidth = 0,
|
|
39539
|
+
frozenColsContentWidth = 0,
|
|
39538
39540
|
rightFrozenColsWidth = 0;
|
|
39539
|
-
table.frozenColCount > 0 && (frozenColsWidth = table.getFrozenColsWidth()), table.rightFrozenColCount > 0 && (rightFrozenColsWidth = table.getRightFrozenColsWidth());
|
|
39541
|
+
table.frozenColCount > 0 && (frozenColsWidth = table.getFrozenColsWidth(), frozenColsContentWidth = null !== (_b = null === (_a = table.getFrozenColsContentWidth) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : frozenColsWidth), table.rightFrozenColCount > 0 && (rightFrozenColsWidth = table.getRightFrozenColsWidth());
|
|
39540
39542
|
let frozenRowsHeight = 0,
|
|
39541
39543
|
bottomFrozenRowsHeight = 0;
|
|
39542
|
-
return table.frozenRowCount > 0 && (frozenRowsHeight = table.getFrozenRowsHeight()), table.bottomFrozenRowCount > 0 && (bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight()), new Rect(table.scrollLeft +
|
|
39544
|
+
return table.frozenRowCount > 0 && (frozenRowsHeight = table.getFrozenRowsHeight()), table.bottomFrozenRowCount > 0 && (bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight()), new Rect(table.scrollLeft + frozenColsContentWidth, table.scrollTop + frozenRowsHeight, table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth, table.tableNoFrameHeight - frozenRowsHeight - bottomFrozenRowsHeight);
|
|
39543
39545
|
}
|
|
39544
39546
|
function getStyleTheme(headerStyle, table, col, row, getProp, needGetTheme = !0) {
|
|
39545
39547
|
const padding = getQuadProps(getProp("padding", headerStyle, col, row, table)),
|
|
@@ -40190,6 +40192,32 @@
|
|
|
40190
40192
|
target: e.target
|
|
40191
40193
|
}), tableEvent;
|
|
40192
40194
|
}
|
|
40195
|
+
function getCellEventArgsSetWithTable(e, table) {
|
|
40196
|
+
var _a;
|
|
40197
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
40198
|
+
if (!eventArgsSet.eventArgs) return eventArgsSet;
|
|
40199
|
+
if (!table.options.scrollFrozenCols || 0 === (null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table))) return eventArgsSet;
|
|
40200
|
+
const xInTable = e.x - table.tableX,
|
|
40201
|
+
yInTable = e.y - table.tableY;
|
|
40202
|
+
if (xInTable < 0 || yInTable < 0 || xInTable > table.tableNoFrameWidth || yInTable > table.tableNoFrameHeight) return eventArgsSet;
|
|
40203
|
+
const frozenViewportWidth = table.getFrozenColsWidth(),
|
|
40204
|
+
pickedCol = eventArgsSet.eventArgs.col,
|
|
40205
|
+
pickedRow = eventArgsSet.eventArgs.row;
|
|
40206
|
+
if (pickedCol >= 0 && pickedCol < table.frozenColCount && !table.isRightFrozenColumn(pickedCol, pickedRow) && xInTable >= frozenViewportWidth) {
|
|
40207
|
+
const cell = table.getCellAtRelativePosition(e.x, e.y);
|
|
40208
|
+
if (-1 === cell.col || -1 === cell.row) return eventArgsSet;
|
|
40209
|
+
const targetCell = table.scenegraph.getCell(cell.col, cell.row);
|
|
40210
|
+
eventArgsSet.eventArgs = {
|
|
40211
|
+
col: cell.col,
|
|
40212
|
+
row: cell.row,
|
|
40213
|
+
event: e,
|
|
40214
|
+
targetCell: targetCell,
|
|
40215
|
+
mergeInfo: getMergeCellInfo(targetCell),
|
|
40216
|
+
target: targetCell
|
|
40217
|
+
};
|
|
40218
|
+
}
|
|
40219
|
+
return eventArgsSet;
|
|
40220
|
+
}
|
|
40193
40221
|
function getTargetCell(target) {
|
|
40194
40222
|
for (; target && target.parent;) {
|
|
40195
40223
|
if ("cell" === target.role) return target;
|
|
@@ -43155,9 +43183,12 @@
|
|
|
43155
43183
|
}
|
|
43156
43184
|
|
|
43157
43185
|
function getColX(col, table, isRightFrozen) {
|
|
43158
|
-
|
|
43186
|
+
var _a, _b, _c, _d, _e, _f;
|
|
43187
|
+
if (isRightFrozen) return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1) + (null !== (_b = null === (_a = table.getRightFrozenColsScrollLeft) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : 0);
|
|
43188
|
+
const frozenOffset = null !== (_d = null === (_c = table.getFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(table)) && void 0 !== _d ? _d : 0,
|
|
43189
|
+
frozenScrollLeft = null !== (_f = null === (_e = table.getFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(table)) && void 0 !== _f ? _f : 0;
|
|
43159
43190
|
let colX = table.getColsWidth(0, col);
|
|
43160
|
-
return col >= table.frozenColCount
|
|
43191
|
+
return col >= table.frozenColCount ? colX -= table.scrollLeft + frozenOffset : colX -= frozenScrollLeft, colX;
|
|
43161
43192
|
}
|
|
43162
43193
|
function getRowY(row, table, isBottomFrozen) {
|
|
43163
43194
|
if (isBottomFrozen) return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);
|
|
@@ -43350,7 +43381,7 @@
|
|
|
43350
43381
|
}
|
|
43351
43382
|
addToGroup(componentGroup) {
|
|
43352
43383
|
componentGroup.addChild(this.frozenShadowLine), componentGroup.addChild(this.rightFrozenShadowLine), componentGroup.addChild(this.columnResizeBgLine), componentGroup.addChild(this.columnResizeLine), componentGroup.addChild(this.columnResizeLabel), componentGroup.addChild(this.rowResizeBgLine), componentGroup.addChild(this.rowResizeLine), componentGroup.addChild(this.rowResizeLabel);
|
|
43353
|
-
this.table.theme.scrollStyle.hoverOn && !this.table.theme.scrollStyle.barToSide ? (componentGroup.addChild(this.hScrollBar), componentGroup.addChild(this.vScrollBar)) : (componentGroup.stage.defaultLayer.addChild(this.hScrollBar), componentGroup.stage.defaultLayer.addChild(this.vScrollBar)), this.menu.bindTableComponent(componentGroup), this.drillIcon.appand(componentGroup), this.cellMover.appand(componentGroup);
|
|
43384
|
+
this.table.theme.scrollStyle.hoverOn && !this.table.theme.scrollStyle.barToSide ? (componentGroup.addChild(this.hScrollBar), componentGroup.addChild(this.frozenHScrollBar), componentGroup.addChild(this.rightFrozenHScrollBar), componentGroup.addChild(this.vScrollBar)) : (componentGroup.stage.defaultLayer.addChild(this.hScrollBar), componentGroup.stage.defaultLayer.addChild(this.frozenHScrollBar), componentGroup.stage.defaultLayer.addChild(this.rightFrozenHScrollBar), componentGroup.stage.defaultLayer.addChild(this.vScrollBar)), this.menu.bindTableComponent(componentGroup), this.drillIcon.appand(componentGroup), this.cellMover.appand(componentGroup);
|
|
43354
43385
|
}
|
|
43355
43386
|
createScrollBar() {
|
|
43356
43387
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -43380,7 +43411,33 @@
|
|
|
43380
43411
|
sliderStyle: sliderStyle,
|
|
43381
43412
|
range: [0, .1],
|
|
43382
43413
|
visible: !1
|
|
43383
|
-
}), this.hScrollBar.render(), this.hScrollBar.hideAll(), this.
|
|
43414
|
+
}), this.hScrollBar.render(), this.hScrollBar.hideAll(), this.frozenHScrollBar = new ScrollBar({
|
|
43415
|
+
direction: "horizontal",
|
|
43416
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43417
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43418
|
+
width: this.table.tableNoFrameWidth,
|
|
43419
|
+
height: width,
|
|
43420
|
+
padding: horizontalPadding,
|
|
43421
|
+
railStyle: {
|
|
43422
|
+
fill: scrollRailColor
|
|
43423
|
+
},
|
|
43424
|
+
sliderStyle: sliderStyle,
|
|
43425
|
+
range: [0, .1],
|
|
43426
|
+
visible: !1
|
|
43427
|
+
}), this.frozenHScrollBar.render(), this.frozenHScrollBar.hideAll(), this.rightFrozenHScrollBar = new ScrollBar({
|
|
43428
|
+
direction: "horizontal",
|
|
43429
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43430
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43431
|
+
width: this.table.tableNoFrameWidth,
|
|
43432
|
+
height: width,
|
|
43433
|
+
padding: horizontalPadding,
|
|
43434
|
+
railStyle: {
|
|
43435
|
+
fill: scrollRailColor
|
|
43436
|
+
},
|
|
43437
|
+
sliderStyle: sliderStyle,
|
|
43438
|
+
range: [0, .1],
|
|
43439
|
+
visible: !1
|
|
43440
|
+
}), this.rightFrozenHScrollBar.render(), this.rightFrozenHScrollBar.hideAll(), this.vScrollBar = new ScrollBar({
|
|
43384
43441
|
direction: "vertical",
|
|
43385
43442
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
43386
43443
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
@@ -43396,9 +43453,11 @@
|
|
|
43396
43453
|
}), this.vScrollBar.render(), this.vScrollBar.hideAll();
|
|
43397
43454
|
}
|
|
43398
43455
|
updateScrollBar() {
|
|
43399
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
43456
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
43400
43457
|
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos,
|
|
43401
43458
|
oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos,
|
|
43459
|
+
oldFrozenHorizontalBarPos = this.table.stateManager.scroll.frozenHorizontalBarPos,
|
|
43460
|
+
oldRightFrozenHorizontalBarPos = this.table.stateManager.scroll.rightFrozenHorizontalBarPos,
|
|
43402
43461
|
theme = this.table.theme,
|
|
43403
43462
|
width = null === (_a = theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
43404
43463
|
visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible,
|
|
@@ -43410,18 +43469,23 @@
|
|
|
43410
43469
|
totalWidth = this.table.getAllColsWidth(),
|
|
43411
43470
|
frozenRowsHeight = this.table.getFrozenRowsHeight(),
|
|
43412
43471
|
frozenColsWidth = this.table.getFrozenColsWidth(),
|
|
43472
|
+
frozenColsContentWidth = null !== (_j = null === (_h = (_g = this.table).getFrozenColsContentWidth) || void 0 === _h ? void 0 : _h.call(_g)) && void 0 !== _j ? _j : frozenColsWidth,
|
|
43413
43473
|
bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(),
|
|
43414
43474
|
rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
|
|
43475
|
+
rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth,
|
|
43415
43476
|
hoverOn = this.table.theme.scrollStyle.hoverOn,
|
|
43416
|
-
sizeTolerance = (null === (
|
|
43477
|
+
sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
43417
43478
|
if (totalWidth > tableWidth + sizeTolerance) {
|
|
43418
43479
|
const y = Math.min(tableHeight, totalHeight),
|
|
43419
|
-
|
|
43480
|
+
bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth,
|
|
43481
|
+
bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth,
|
|
43482
|
+
rangeEnd = bodyContentWidth > 0 ? Math.max(.05, bodyViewportWidth / bodyContentWidth) : 1;
|
|
43420
43483
|
let attrY = 0;
|
|
43421
43484
|
attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
43422
43485
|
let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
|
|
43423
43486
|
hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
43424
|
-
null !== (
|
|
43487
|
+
const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
|
|
43488
|
+
ignoreFrozenCols ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x, hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
|
|
43425
43489
|
x: hScrollBarx,
|
|
43426
43490
|
y: attrY,
|
|
43427
43491
|
width: hScrollBarWidth,
|
|
@@ -43433,11 +43497,65 @@
|
|
|
43433
43497
|
x: bounds.x1,
|
|
43434
43498
|
y: bounds.y1
|
|
43435
43499
|
}, "always" === horizontalVisible && this.hScrollBar.showAll();
|
|
43500
|
+
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
43501
|
+
if (!ignoreFrozenCols && frozenScrollable) {
|
|
43502
|
+
const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
|
|
43503
|
+
x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
|
|
43504
|
+
this.frozenHScrollBar.setAttributes({
|
|
43505
|
+
x: x,
|
|
43506
|
+
y: attrY,
|
|
43507
|
+
width: frozenColsWidth,
|
|
43508
|
+
range: [0, frozenRangeEnd],
|
|
43509
|
+
visible: "always" === horizontalVisible
|
|
43510
|
+
});
|
|
43511
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
43512
|
+
this.frozenHScrollBar._viewPosition = {
|
|
43513
|
+
x: bounds.x1,
|
|
43514
|
+
y: bounds.y1
|
|
43515
|
+
}, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
|
|
43516
|
+
} else this.frozenHScrollBar.setAttributes({
|
|
43517
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43518
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43519
|
+
width: 0,
|
|
43520
|
+
visible: !1
|
|
43521
|
+
});
|
|
43522
|
+
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
43523
|
+
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
43524
|
+
const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
|
|
43525
|
+
x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
|
|
43526
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
43527
|
+
x: x,
|
|
43528
|
+
y: attrY,
|
|
43529
|
+
width: rightFrozenColsWidth,
|
|
43530
|
+
range: [0, rightFrozenRangeEnd],
|
|
43531
|
+
visible: "always" === horizontalVisible
|
|
43532
|
+
});
|
|
43533
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
43534
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
43535
|
+
x: bounds.x1,
|
|
43536
|
+
y: bounds.y1
|
|
43537
|
+
}, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
|
|
43538
|
+
} else this.rightFrozenHScrollBar.setAttributes({
|
|
43539
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43540
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43541
|
+
width: 0,
|
|
43542
|
+
visible: !1
|
|
43543
|
+
});
|
|
43436
43544
|
} else this.hScrollBar.setAttributes({
|
|
43437
43545
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
43438
43546
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
43439
43547
|
width: 0,
|
|
43440
43548
|
visible: !1
|
|
43549
|
+
}), this.frozenHScrollBar.setAttributes({
|
|
43550
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43551
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43552
|
+
width: 0,
|
|
43553
|
+
visible: !1
|
|
43554
|
+
}), this.rightFrozenHScrollBar.setAttributes({
|
|
43555
|
+
x: 2 * -this.table.tableNoFrameWidth,
|
|
43556
|
+
y: 2 * -this.table.tableNoFrameHeight,
|
|
43557
|
+
width: 0,
|
|
43558
|
+
visible: !1
|
|
43441
43559
|
});
|
|
43442
43560
|
if (totalHeight > tableHeight + sizeTolerance) {
|
|
43443
43561
|
const x = Math.min(tableWidth, totalWidth),
|
|
@@ -43461,7 +43579,7 @@
|
|
|
43461
43579
|
height: 0,
|
|
43462
43580
|
visible: !1
|
|
43463
43581
|
});
|
|
43464
|
-
this.table.stateManager.setScrollLeft(oldHorizontalBarPos), this.table.stateManager.setScrollTop(oldVerticalBarPos);
|
|
43582
|
+
this.table.stateManager.setScrollLeft(oldHorizontalBarPos), this.table.stateManager.setFrozenColsScrollLeft(oldFrozenHorizontalBarPos, !1), this.table.stateManager.setRightFrozenColsScrollLeft(oldRightFrozenHorizontalBarPos, !1), this.table.stateManager.setScrollTop(oldVerticalBarPos);
|
|
43465
43583
|
}
|
|
43466
43584
|
hideResizeCol() {
|
|
43467
43585
|
this.columnResizeLine.setAttribute("visible", !1), this.columnResizeBgLine.setAttribute("visible", !1), this.columnResizeLabel.setAttribute("visible", !1), this.columnResizeLabel.hideAll();
|
|
@@ -43585,9 +43703,9 @@
|
|
|
43585
43703
|
this.cellMover.update(backX, lineX, backY, lineY);
|
|
43586
43704
|
}
|
|
43587
43705
|
setFrozenColumnShadow(col, isRightFrozen) {
|
|
43588
|
-
var _a, _b;
|
|
43589
|
-
const colX = getColX(col, this.table, isRightFrozen);
|
|
43590
|
-
col < 0 || "always" !== (null === (
|
|
43706
|
+
var _a, _b, _c, _d, _e;
|
|
43707
|
+
const colX = !isRightFrozen && col === this.table.frozenColCount - 1 && (null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0) > 0 ? this.table.getFrozenColsWidth() : getColX(col, this.table, isRightFrozen);
|
|
43708
|
+
col < 0 || "always" !== (null === (_e = null === (_d = this.table.theme.frozenColumnLine) || void 0 === _d ? void 0 : _d.shadow) || void 0 === _e ? void 0 : _e.visible) ? this.frozenShadowLine.setAttributes({
|
|
43591
43709
|
visible: !1,
|
|
43592
43710
|
x: colX,
|
|
43593
43711
|
height: this.table.getDrawRange().height
|
|
@@ -43598,9 +43716,9 @@
|
|
|
43598
43716
|
});
|
|
43599
43717
|
}
|
|
43600
43718
|
setRightFrozenColumnShadow(col) {
|
|
43601
|
-
var _a, _b;
|
|
43602
|
-
const colX = getColX(col, this.table, !0);
|
|
43603
|
-
col >= this.table.colCount || "always" !== (null === (
|
|
43719
|
+
var _a, _b, _c, _d, _e;
|
|
43720
|
+
const colX = this.table.options.scrollRightFrozenCols && (null !== (_c = null === (_b = (_a = this.table).getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0) > 0 ? this.table.tableNoFrameWidth - this.table.getRightFrozenColsWidth() : getColX(col, this.table, !0);
|
|
43721
|
+
col >= this.table.colCount || "always" !== (null === (_e = null === (_d = this.table.theme.frozenColumnLine) || void 0 === _d ? void 0 : _d.shadow) || void 0 === _e ? void 0 : _e.visible) ? this.rightFrozenShadowLine.setAttributes({
|
|
43604
43722
|
visible: !1,
|
|
43605
43723
|
x: colX - this.rightFrozenShadowLine.attribute.width,
|
|
43606
43724
|
height: this.table.getDrawRange().height
|
|
@@ -43636,13 +43754,23 @@
|
|
|
43636
43754
|
var _a;
|
|
43637
43755
|
const visible1 = this.table.theme.scrollStyle.visible,
|
|
43638
43756
|
horizontalVisible = null !== (_a = this.table.theme.scrollStyle.horizontalVisible) && void 0 !== _a ? _a : visible1;
|
|
43639
|
-
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible || (this.hScrollBar.setAttribute("visible", !1), this.hScrollBar.hideAll(), this.table.scenegraph.updateNextFrame());
|
|
43757
|
+
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible || (this.hScrollBar.setAttribute("visible", !1), this.hScrollBar.hideAll(), this.frozenHScrollBar.setAttribute("visible", !1), this.frozenHScrollBar.hideAll(), this.rightFrozenHScrollBar.setAttribute("visible", !1), this.rightFrozenHScrollBar.hideAll(), this._horizontalScrollBarTarget = void 0, this.table.scenegraph.updateNextFrame());
|
|
43640
43758
|
}
|
|
43641
|
-
showHorizontalScrollBar() {
|
|
43759
|
+
showHorizontalScrollBar(target = "all") {
|
|
43642
43760
|
var _a;
|
|
43643
43761
|
const visible1 = this.table.theme.scrollStyle.visible,
|
|
43644
43762
|
horizontalVisible = null !== (_a = this.table.theme.scrollStyle.horizontalVisible) && void 0 !== _a ? _a : visible1;
|
|
43645
|
-
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible
|
|
43763
|
+
if ("focus" !== horizontalVisible && "scrolling" !== horizontalVisible) return;
|
|
43764
|
+
if (this._horizontalScrollBarTarget === target) return;
|
|
43765
|
+
this._horizontalScrollBarTarget = target;
|
|
43766
|
+
const showFrozen = "all" === target || "frozen" === target,
|
|
43767
|
+
showRightFrozen = "all" === target || "rightFrozen" === target,
|
|
43768
|
+
bodyVisible = ("all" === target || "body" === target) && this.hScrollBar.attribute.width > 0;
|
|
43769
|
+
this.hScrollBar.setAttribute("visible", bodyVisible), bodyVisible ? this.hScrollBar.showAll() : this.hScrollBar.hideAll();
|
|
43770
|
+
const frozenVisible = showFrozen && this.frozenHScrollBar.attribute.width > 0;
|
|
43771
|
+
this.frozenHScrollBar.setAttribute("visible", frozenVisible), frozenVisible ? this.frozenHScrollBar.showAll() : this.frozenHScrollBar.hideAll();
|
|
43772
|
+
const rightFrozenVisible = showRightFrozen && this.rightFrozenHScrollBar.attribute.width > 0;
|
|
43773
|
+
this.rightFrozenHScrollBar.setAttribute("visible", rightFrozenVisible), rightFrozenVisible ? this.rightFrozenHScrollBar.showAll() : this.rightFrozenHScrollBar.hideAll(), this.table.scenegraph.updateNextFrame();
|
|
43646
43774
|
}
|
|
43647
43775
|
updateVerticalScrollBarPos(topRatio) {
|
|
43648
43776
|
const range = this.vScrollBar.attribute.range,
|
|
@@ -43666,6 +43794,28 @@
|
|
|
43666
43794
|
y: bounds.y1
|
|
43667
43795
|
};
|
|
43668
43796
|
}
|
|
43797
|
+
updateFrozenHorizontalScrollBarPos(leftRatio) {
|
|
43798
|
+
const range = this.frozenHScrollBar.attribute.range,
|
|
43799
|
+
size = range[1] - range[0],
|
|
43800
|
+
range0 = leftRatio * (1 - size);
|
|
43801
|
+
this.frozenHScrollBar.setAttribute("range", [range0, range0 + size]);
|
|
43802
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
43803
|
+
this.frozenHScrollBar._viewPosition = {
|
|
43804
|
+
x: bounds.x1,
|
|
43805
|
+
y: bounds.y1
|
|
43806
|
+
};
|
|
43807
|
+
}
|
|
43808
|
+
updateRightFrozenHorizontalScrollBarPos(leftRatio) {
|
|
43809
|
+
const range = this.rightFrozenHScrollBar.attribute.range,
|
|
43810
|
+
size = range[1] - range[0],
|
|
43811
|
+
range0 = leftRatio * (1 - size);
|
|
43812
|
+
this.rightFrozenHScrollBar.setAttribute("range", [range0, range0 + size]);
|
|
43813
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
43814
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
43815
|
+
x: bounds.x1,
|
|
43816
|
+
y: bounds.y1
|
|
43817
|
+
};
|
|
43818
|
+
}
|
|
43669
43819
|
updateStyle() {
|
|
43670
43820
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
43671
43821
|
const theme = this.table.theme,
|
|
@@ -43695,6 +43845,20 @@
|
|
|
43695
43845
|
fill: scrollRailColor
|
|
43696
43846
|
},
|
|
43697
43847
|
sliderStyle: sliderStyle
|
|
43848
|
+
}), this.frozenHScrollBar.setAttributes({
|
|
43849
|
+
height: width,
|
|
43850
|
+
padding: horizontalPadding,
|
|
43851
|
+
railStyle: {
|
|
43852
|
+
fill: scrollRailColor
|
|
43853
|
+
},
|
|
43854
|
+
sliderStyle: sliderStyle
|
|
43855
|
+
}), this.rightFrozenHScrollBar.setAttributes({
|
|
43856
|
+
height: width,
|
|
43857
|
+
padding: horizontalPadding,
|
|
43858
|
+
railStyle: {
|
|
43859
|
+
fill: scrollRailColor
|
|
43860
|
+
},
|
|
43861
|
+
sliderStyle: sliderStyle
|
|
43698
43862
|
});
|
|
43699
43863
|
const columnResizeColor = null === (_g = theme.columnResize) || void 0 === _g ? void 0 : _g.lineColor,
|
|
43700
43864
|
columnResizeWidth = null === (_h = theme.columnResize) || void 0 === _h ? void 0 : _h.lineWidth,
|
|
@@ -45808,29 +45972,50 @@
|
|
|
45808
45972
|
drawShape(group, context, xOrigin, yOrigin, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
|
|
45809
45973
|
var _a, _b, _c, _d, _e, _f;
|
|
45810
45974
|
const table = group.stage.table;
|
|
45811
|
-
if (table)
|
|
45812
|
-
|
|
45975
|
+
if (!table) return;
|
|
45976
|
+
const clipInflate = getSelectOverlayClipInflate(group, table);
|
|
45977
|
+
if ("body" === group.role) {
|
|
45978
|
+
drawClipRect(context, -(null !== (_a = group.attribute.x) && void 0 !== _a ? _a : 0) + table.getFrozenColsWidth() - clipInflate.left, -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight() - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45813
45979
|
} else if ("row-header" === group.role) {
|
|
45814
|
-
drawClipRect(context, 0, -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight(), table.getFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
|
|
45980
|
+
drawClipRect(context, 0 - clipInflate.left, -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight() - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45815
45981
|
} else if ("col-header" === group.role) {
|
|
45816
|
-
drawClipRect(context, -(null !== (_d = group.attribute.x) && void 0 !== _d ? _d : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
45982
|
+
drawClipRect(context, -(null !== (_d = group.attribute.x) && void 0 !== _d ? _d : 0) + table.getFrozenColsWidth() - clipInflate.left, 0 - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45817
45983
|
} else if ("right-frozen" === group.role) {
|
|
45818
|
-
drawClipRect(context, 0, -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight(), table.getRightFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
|
|
45984
|
+
drawClipRect(context, 0 - clipInflate.left, -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight() - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45819
45985
|
} else if ("bottom-frozen" === group.role) {
|
|
45820
|
-
drawClipRect(context, -(null !== (_f = group.attribute.x) && void 0 !== _f ? _f : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
45986
|
+
drawClipRect(context, -(null !== (_f = group.attribute.x) && void 0 !== _f ? _f : 0) + table.getFrozenColsWidth() - clipInflate.left, 0 - clipInflate.top, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45821
45987
|
} else if ("corner-header" === group.role) {
|
|
45822
|
-
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
45988
|
+
drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45823
45989
|
} else if ("corner-right-top-header" === group.role) {
|
|
45824
|
-
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
45990
|
+
drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45825
45991
|
} else if ("corner-right-bottom-header" === group.role) {
|
|
45826
|
-
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
45992
|
+
drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45827
45993
|
} else if ("corner-left-bottom-header" === group.role) {
|
|
45828
|
-
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
45994
|
+
drawClipRect(context, 0 - clipInflate.left, 0 - clipInflate.top, table.getFrozenColsWidth() + clipInflate.left + clipInflate.right, table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom);
|
|
45829
45995
|
}
|
|
45830
45996
|
}
|
|
45831
45997
|
};
|
|
45832
45998
|
ClipBodyGroupBeforeRenderContribution = __decorate$4([injectable()], ClipBodyGroupBeforeRenderContribution);
|
|
45833
45999
|
const precision = Math.pow(2, 24);
|
|
46000
|
+
function getSelectOverlayClipInflate(group, table) {
|
|
46001
|
+
var _a, _b, _c;
|
|
46002
|
+
if (!("select-overlay" === group.name)) return {
|
|
46003
|
+
left: 0,
|
|
46004
|
+
top: 0,
|
|
46005
|
+
right: 0,
|
|
46006
|
+
bottom: 0
|
|
46007
|
+
};
|
|
46008
|
+
const lineWidth = null === (_a = table.theme.selectionStyle) || void 0 === _a ? void 0 : _a.cellBorderLineWidth,
|
|
46009
|
+
maxLineWidth = Array.isArray(lineWidth) ? Math.max(...lineWidth.filter(v => "number" == typeof v)) : "number" == typeof lineWidth ? lineWidth : 0,
|
|
46010
|
+
baseInflate = Math.max(1, Math.ceil(maxLineWidth / 2) + 1),
|
|
46011
|
+
handleInflate = !!(null === (_b = table.options.excelOptions) || void 0 === _b ? void 0 : _b.fillHandle) && 1 === (null === (_c = table.stateManager.select.ranges) || void 0 === _c ? void 0 : _c.length) ? 3 : 0;
|
|
46012
|
+
return {
|
|
46013
|
+
left: baseInflate,
|
|
46014
|
+
top: baseInflate,
|
|
46015
|
+
right: Math.max(baseInflate, handleInflate),
|
|
46016
|
+
bottom: Math.max(baseInflate, handleInflate)
|
|
46017
|
+
};
|
|
46018
|
+
}
|
|
45834
46019
|
function drawClipRect(context, x, y, width, height) {
|
|
45835
46020
|
context.beginPath();
|
|
45836
46021
|
const matrix = context.applyedMatrix;
|
|
@@ -47555,10 +47740,11 @@
|
|
|
47555
47740
|
});
|
|
47556
47741
|
}
|
|
47557
47742
|
setX(x, isEnd = !1) {
|
|
47743
|
+
var _a, _b, _c;
|
|
47558
47744
|
return __awaiter$3(this, void 0, void 0, function* () {
|
|
47559
47745
|
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2,
|
|
47560
47746
|
xLimitRight = this.table.getAllColsWidth() - xLimitLeft,
|
|
47561
|
-
screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);
|
|
47747
|
+
screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width + (null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0));
|
|
47562
47748
|
screenLeft && (this.screenLeftCol = screenLeft.col), x < xLimitLeft && this.colStart === this.bodyLeftCol || x > xLimitRight && this.colEnd === this.bodyRightCol || this.table.scenegraph.bodyGroup.firstChild && "group" === this.table.scenegraph.bodyGroup.firstChild.type && 0 === this.table.scenegraph.bodyGroup.firstChild.childrenCount ? (this.updateDeltaX(x), this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX)) : this.dynamicSetX(x, screenLeft, isEnd);
|
|
47563
47749
|
});
|
|
47564
47750
|
}
|
|
@@ -47660,6 +47846,7 @@
|
|
|
47660
47846
|
}
|
|
47661
47847
|
}
|
|
47662
47848
|
updateDeltaX(x, screenLeftX, screenLeftCol) {
|
|
47849
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47663
47850
|
if (this.colStart === this.bodyLeftCol) {
|
|
47664
47851
|
const colGroup = this.table.scenegraph.getColGroup(this.colStart);
|
|
47665
47852
|
if (colGroup) {
|
|
@@ -47669,7 +47856,7 @@
|
|
|
47669
47856
|
} else if (this.colEnd === this.bodyRightCol) {
|
|
47670
47857
|
const colGroup = this.table.scenegraph.getColGroup(this.colEnd);
|
|
47671
47858
|
if (colGroup) {
|
|
47672
|
-
const deltaX = colGroup.attribute.x + colGroup.attribute.width - (this.table.getAllColsWidth() - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth());
|
|
47859
|
+
const deltaX = colGroup.attribute.x + colGroup.attribute.width - (this.table.getAllColsWidth() - (null !== (_c = null === (_b = (_a = this.table).getFrozenColsContentWidth) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : this.table.getFrozenColsWidth()) - (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsContentWidth) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : this.table.getRightFrozenColsWidth()));
|
|
47673
47860
|
this.deltaX = -deltaX;
|
|
47674
47861
|
}
|
|
47675
47862
|
} else if (isValid$1(screenLeftX) && isValid$1(screenLeftCol)) {
|
|
@@ -47748,7 +47935,7 @@
|
|
|
47748
47935
|
});
|
|
47749
47936
|
}
|
|
47750
47937
|
function updateComponent(selectComp, key, scene) {
|
|
47751
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
47938
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47752
47939
|
const table = scene.table,
|
|
47753
47940
|
[startColStr, startRowStr, endColStr, endRowStr] = key.split("-"),
|
|
47754
47941
|
startCol = parseInt(startColStr, 10),
|
|
@@ -47781,10 +47968,13 @@
|
|
|
47781
47968
|
}
|
|
47782
47969
|
const colsWidth = table.getColsWidth(computeRectCellRangeStartCol, computeRectCellRangeEndCol),
|
|
47783
47970
|
rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow),
|
|
47971
|
+
overlayGroup = scene.getSelectOverlayGroup(selectComp.role),
|
|
47972
|
+
offsetX = scene.tableGroup.attribute.x + (null !== (_a = overlayGroup.attribute.x) && void 0 !== _a ? _a : 0),
|
|
47973
|
+
offsetY = scene.tableGroup.attribute.y + (null !== (_b = overlayGroup.attribute.y) && void 0 !== _b ? _b : 0),
|
|
47784
47974
|
firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
|
|
47785
47975
|
if (selectComp.rect.setAttributes({
|
|
47786
|
-
x: firstCellBound.x1 -
|
|
47787
|
-
y: firstCellBound.y1 -
|
|
47976
|
+
x: firstCellBound.x1 - offsetX,
|
|
47977
|
+
y: firstCellBound.y1 - offsetY,
|
|
47788
47978
|
width: colsWidth,
|
|
47789
47979
|
height: rowsHeight,
|
|
47790
47980
|
visible: !0
|
|
@@ -47794,16 +47984,16 @@
|
|
|
47794
47984
|
currentHeight: rowsHeight,
|
|
47795
47985
|
selectComp: selectComp
|
|
47796
47986
|
}), selectComp.fillhandle) {
|
|
47797
|
-
const fillHandle = null === (
|
|
47987
|
+
const fillHandle = null === (_c = scene.table.options.excelOptions) || void 0 === _c ? void 0 : _c.fillHandle;
|
|
47798
47988
|
let lastCellBound,
|
|
47799
47989
|
handlerX,
|
|
47800
47990
|
visible = !0;
|
|
47801
47991
|
"function" == typeof fillHandle && (visible = fillHandle({
|
|
47802
47992
|
selectRanges: scene.table.stateManager.select.ranges,
|
|
47803
47993
|
table: scene.table
|
|
47804
|
-
})), endCol < table.colCount - 1 ? (lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds, handlerX = lastCellBound.x2 -
|
|
47805
|
-
const handlerY = lastCellBound.y2 -
|
|
47806
|
-
null === (
|
|
47994
|
+
})), endCol < table.colCount - 1 ? (lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - offsetX - 3) : 0 === startCol ? (lastCellBound = scene.highPerformanceGetCell(0, endRow).globalAABBBounds, handlerX = lastCellBound.x1 - offsetX) : (lastCellBound = scene.highPerformanceGetCell(startCol - 1, endRow).globalAABBBounds, handlerX = lastCellBound.x2 - offsetX - 3), lastCellBound = endRow < table.rowCount - 1 ? scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds : scene.highPerformanceGetCell(endCol, startRow - 1).globalAABBBounds;
|
|
47995
|
+
const handlerY = lastCellBound.y2 - offsetY - 3;
|
|
47996
|
+
null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
|
|
47807
47997
|
x: handlerX,
|
|
47808
47998
|
y: handlerY,
|
|
47809
47999
|
width: 6,
|
|
@@ -47811,72 +48001,15 @@
|
|
|
47811
48001
|
visible: visible
|
|
47812
48002
|
});
|
|
47813
48003
|
}
|
|
47814
|
-
let isNearRowHeader = !!table.frozenColCount && startCol === table.frozenColCount;
|
|
47815
|
-
if (!isNearRowHeader && table.frozenColCount && table.scrollLeft > 0 && startCol >= table.frozenColCount) {
|
|
47816
|
-
table.getColsWidth(0, startCol - 1) - table.scrollLeft < table.getFrozenColsWidth() && (isNearRowHeader = !0);
|
|
47817
|
-
}
|
|
47818
|
-
let isNearRightRowHeader = !!table.rightFrozenColCount && table.rightFrozenColCount > 0 && endCol === table.colCount - table.rightFrozenColCount - 1;
|
|
47819
|
-
if (!isNearRightRowHeader && table.rightFrozenColCount && endCol < table.colCount - table.rightFrozenColCount) {
|
|
47820
|
-
table.getColsWidth(0, endCol) - table.scrollLeft > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && (isNearRightRowHeader = !0);
|
|
47821
|
-
}
|
|
47822
|
-
let isNearColHeader = !table.frozenRowCount || startRow === table.frozenRowCount;
|
|
47823
|
-
if (!isNearColHeader && table.frozenRowCount && table.scrollTop > 0 && startRow >= table.frozenRowCount) {
|
|
47824
|
-
table.getRowsHeight(0, startRow - 1) - table.scrollTop < table.getFrozenRowsHeight() && (isNearColHeader = !0);
|
|
47825
|
-
}
|
|
47826
|
-
let isNearBottomColHeader = !!table.bottomFrozenRowCount && endRow === table.rowCount - table.bottomFrozenRowCount - 1;
|
|
47827
|
-
if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
|
|
47828
|
-
table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
|
|
47829
|
-
}
|
|
47830
|
-
const {
|
|
47831
|
-
dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
|
|
47832
|
-
} = table.theme.selectionStyle;
|
|
47833
|
-
if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
|
|
47834
|
-
if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
|
|
47835
|
-
const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
|
|
47836
|
-
selectComp.rect.setAttributes({
|
|
47837
|
-
x: selectComp.rect.attribute.x + (table.getFrozenColsWidth() - selectComp.rect.attribute.x),
|
|
47838
|
-
width: width > 0 ? width : 0
|
|
47839
|
-
}), null === (_c = selectComp.fillhandle) || void 0 === _c || _c.setAttributes({
|
|
47840
|
-
visible: width > 0
|
|
47841
|
-
});
|
|
47842
|
-
}
|
|
47843
|
-
if (table.getRightFrozenColsWidth() > 0 && scene.rightFrozenGroup.attribute.height > 0 && selectComp.rect.attribute.x + selectComp.rect.attribute.width > scene.rightFrozenGroup.attribute.x && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
|
|
47844
|
-
const width = scene.rightFrozenGroup.attribute.x - selectComp.rect.attribute.x;
|
|
47845
|
-
selectComp.rect.setAttributes({
|
|
47846
|
-
x: selectComp.rect.attribute.x,
|
|
47847
|
-
width: width > 0 ? width : 0
|
|
47848
|
-
}), null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
|
|
47849
|
-
visible: width - colsWidth > 0
|
|
47850
|
-
});
|
|
47851
|
-
}
|
|
47852
|
-
if (selectComp.rect.attribute.y < scene.colHeaderGroup.attribute.height && table.scrollTop > 0 && ("body" === selectComp.role || "rowHeader" === selectComp.role || "rightFrozen" === selectComp.role)) {
|
|
47853
|
-
const height = selectComp.rect.attribute.height - (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y);
|
|
47854
|
-
selectComp.rect.setAttributes({
|
|
47855
|
-
y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
|
|
47856
|
-
height: height > 0 ? height : 0
|
|
47857
|
-
}), null === (_e = selectComp.fillhandle) || void 0 === _e || _e.setAttributes({
|
|
47858
|
-
visible: height > 0
|
|
47859
|
-
});
|
|
47860
|
-
}
|
|
47861
|
-
if (scene.bottomFrozenGroup.attribute.width > 0 && scene.bottomFrozenGroup.attribute.height > 0 && selectComp.rect.attribute.y + selectComp.rect.attribute.height > scene.bottomFrozenGroup.attribute.y && ("body" === selectComp.role || "rowHeader" === selectComp.role || "rightFrozen" === selectComp.role)) {
|
|
47862
|
-
const height = scene.bottomFrozenGroup.attribute.y - selectComp.rect.attribute.y;
|
|
47863
|
-
selectComp.rect.setAttributes({
|
|
47864
|
-
y: selectComp.rect.attribute.y,
|
|
47865
|
-
height: height > 0 ? height : 0
|
|
47866
|
-
}), null === (_f = selectComp.fillhandle) || void 0 === _f || _f.setAttributes({
|
|
47867
|
-
visible: height - rowsHeight > 0
|
|
47868
|
-
});
|
|
47869
|
-
}
|
|
47870
|
-
} else scene.tableGroup.insertAfter(selectComp.rect, "body" === selectComp.role ? scene.bodyGroup : "columnHeader" === selectComp.role ? scene.colHeaderGroup : "rowHeader" === selectComp.role ? scene.rowHeaderGroup : "cornerHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightTopCorner" === selectComp.role ? scene.rightTopCornerGroup : "rightFrozen" === selectComp.role ? scene.rightFrozenGroup : "leftBottomCorner" === selectComp.role ? scene.leftBottomCornerGroup : "bottomFrozen" === selectComp.role ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup);
|
|
47871
48004
|
let diffSize = 0;
|
|
47872
|
-
"number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
48005
|
+
"number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_e = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _e ? _e : 0) / 2)), selectComp.rect.setAttributes({
|
|
47873
48006
|
width: selectComp.rect.attribute.width - diffSize
|
|
47874
|
-
})), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
48007
|
+
})), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_f = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _f ? _f : 0) / 2)), selectComp.rect.setAttributes({
|
|
47875
48008
|
x: selectComp.rect.attribute.x + diffSize,
|
|
47876
48009
|
width: selectComp.rect.attribute.width - diffSize
|
|
47877
|
-
})), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
48010
|
+
})), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
|
|
47878
48011
|
height: selectComp.rect.attribute.height - diffSize
|
|
47879
|
-
})), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
48012
|
+
})), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
|
|
47880
48013
|
y: selectComp.rect.attribute.y + diffSize,
|
|
47881
48014
|
height: selectComp.rect.attribute.height - diffSize
|
|
47882
48015
|
}));
|
|
@@ -48026,7 +48159,7 @@
|
|
|
48026
48159
|
}
|
|
48027
48160
|
|
|
48028
48161
|
function createCellSelectBorder(scene, start_Col, start_Row, end_Col, end_Row, selectRangeType, selectId, strokes) {
|
|
48029
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48162
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
48030
48163
|
let isHasFillHandleRect = !!(null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle);
|
|
48031
48164
|
if ((null === (_b = scene.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) > 1) isHasFillHandleRect = !1, scene.removeFillHandleFromSelectComponents();else if (1 === (null === (_c = scene.table.stateManager.select.ranges) || void 0 === _c ? void 0 : _c.length)) {
|
|
48032
48165
|
const maxRow = Math.max(scene.table.stateManager.select.ranges[0].start.row, scene.table.stateManager.select.ranges[0].end.row),
|
|
@@ -48038,30 +48171,33 @@
|
|
|
48038
48171
|
startRow = Math.min(start_Row, end_Row),
|
|
48039
48172
|
endCol = Math.max(start_Col, end_Col),
|
|
48040
48173
|
endRow = Math.max(start_Row, end_Row),
|
|
48174
|
+
overlayGroup = scene.getSelectOverlayGroup(selectRangeType),
|
|
48175
|
+
offsetX = scene.tableGroup.attribute.x + (null !== (_d = overlayGroup.attribute.x) && void 0 !== _d ? _d : 0),
|
|
48176
|
+
offsetY = scene.tableGroup.attribute.y + (null !== (_e = overlayGroup.attribute.y) && void 0 !== _e ? _e : 0),
|
|
48041
48177
|
firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds,
|
|
48042
48178
|
lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds,
|
|
48043
48179
|
theme = scene.table.theme,
|
|
48044
|
-
bodyClickBorderColor = null === (
|
|
48045
|
-
bodyClickLineWidth = null === (
|
|
48180
|
+
bodyClickBorderColor = null === (_f = theme.selectionStyle) || void 0 === _f ? void 0 : _f.cellBorderColor,
|
|
48181
|
+
bodyClickLineWidth = null === (_g = theme.selectionStyle) || void 0 === _g ? void 0 : _g.cellBorderLineWidth,
|
|
48046
48182
|
rect = createRect({
|
|
48047
48183
|
pickable: !1,
|
|
48048
|
-
fill: "replace" !== (null === (
|
|
48184
|
+
fill: "replace" !== (null === (_h = theme.selectionStyle) || void 0 === _h ? void 0 : _h.selectionFillMode) && (null !== (_k = null === (_j = theme.selectionStyle) || void 0 === _j ? void 0 : _j.cellBgColor) && void 0 !== _k ? _k : "rgba(0, 0, 255,0.1)"),
|
|
48049
48185
|
lineWidth: bodyClickLineWidth,
|
|
48050
48186
|
stroke: strokes.map(stroke => !!stroke && bodyClickBorderColor),
|
|
48051
|
-
x: firstCellBound.x1 -
|
|
48052
|
-
y: firstCellBound.y1 -
|
|
48187
|
+
x: firstCellBound.x1 - offsetX,
|
|
48188
|
+
y: firstCellBound.y1 - offsetY,
|
|
48053
48189
|
width: 0,
|
|
48054
48190
|
height: 0,
|
|
48055
48191
|
visible: !0,
|
|
48056
|
-
cornerRadius: getCornerRadius(selectRangeType, null === (
|
|
48192
|
+
cornerRadius: getCornerRadius(selectRangeType, null === (_l = scene.table.theme.frameStyle) || void 0 === _l ? void 0 : _l.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
|
|
48057
48193
|
});
|
|
48058
48194
|
let fillhandle;
|
|
48059
48195
|
isHasFillHandleRect && (fillhandle = createRect({
|
|
48060
48196
|
pickable: !1,
|
|
48061
48197
|
fill: bodyClickBorderColor,
|
|
48062
48198
|
stroke: bodyClickBorderColor,
|
|
48063
|
-
x: lastCellBound.x2 - 3,
|
|
48064
|
-
y: lastCellBound.y2 - 3,
|
|
48199
|
+
x: lastCellBound.x2 - offsetX - 3,
|
|
48200
|
+
y: lastCellBound.y2 - offsetY - 3,
|
|
48065
48201
|
width: 6,
|
|
48066
48202
|
height: 6,
|
|
48067
48203
|
visible: !0
|
|
@@ -48069,7 +48205,7 @@
|
|
|
48069
48205
|
rect: rect,
|
|
48070
48206
|
fillhandle: fillhandle,
|
|
48071
48207
|
role: selectRangeType
|
|
48072
|
-
}),
|
|
48208
|
+
}), overlayGroup.addChild(rect), isHasFillHandleRect && overlayGroup.addChild(fillhandle);
|
|
48073
48209
|
}
|
|
48074
48210
|
function getCornerRadius(selectRangeType, cornerRadius, start_Col, start_Row, end_Col, end_Row, table) {
|
|
48075
48211
|
if (!cornerRadius) return;
|
|
@@ -48950,7 +49086,25 @@
|
|
|
48950
49086
|
const rightBottomCornerGroup = createContainerGroup(0, 0, !0);
|
|
48951
49087
|
rightBottomCornerGroup.role = "corner-right-bottom-header", scene.rightBottomCornerGroup = rightBottomCornerGroup;
|
|
48952
49088
|
const leftBottomCornerGroup = createContainerGroup(0, 0, !0);
|
|
48953
|
-
leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup
|
|
49089
|
+
leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup;
|
|
49090
|
+
const bodySelectGroup = createContainerGroup(width, 0, !0);
|
|
49091
|
+
bodySelectGroup.role = "body", bodySelectGroup.name = "select-overlay", scene.bodySelectGroup = bodySelectGroup;
|
|
49092
|
+
const rowHeaderSelectGroup = createContainerGroup(0, 0, !0);
|
|
49093
|
+
rowHeaderSelectGroup.role = "row-header", rowHeaderSelectGroup.name = "select-overlay", scene.rowHeaderSelectGroup = rowHeaderSelectGroup;
|
|
49094
|
+
const bottomFrozenSelectGroup = createContainerGroup(0, 0, !0);
|
|
49095
|
+
bottomFrozenSelectGroup.role = "bottom-frozen", bottomFrozenSelectGroup.name = "select-overlay", scene.bottomFrozenSelectGroup = bottomFrozenSelectGroup;
|
|
49096
|
+
const colHeaderSelectGroup = createContainerGroup(0, 0, !0);
|
|
49097
|
+
colHeaderSelectGroup.role = "col-header", colHeaderSelectGroup.name = "select-overlay", scene.colHeaderSelectGroup = colHeaderSelectGroup;
|
|
49098
|
+
const rightFrozenSelectGroup = createContainerGroup(0, 0, !0);
|
|
49099
|
+
rightFrozenSelectGroup.role = "right-frozen", rightFrozenSelectGroup.name = "select-overlay", scene.rightFrozenSelectGroup = rightFrozenSelectGroup;
|
|
49100
|
+
const rightTopCornerSelectGroup = createContainerGroup(0, 0, !0);
|
|
49101
|
+
rightTopCornerSelectGroup.role = "corner-right-top-header", rightTopCornerSelectGroup.name = "select-overlay", scene.rightTopCornerSelectGroup = rightTopCornerSelectGroup;
|
|
49102
|
+
const rightBottomCornerSelectGroup = createContainerGroup(0, 0, !0);
|
|
49103
|
+
rightBottomCornerSelectGroup.role = "corner-right-bottom-header", rightBottomCornerSelectGroup.name = "select-overlay", scene.rightBottomCornerSelectGroup = rightBottomCornerSelectGroup;
|
|
49104
|
+
const leftBottomCornerSelectGroup = createContainerGroup(0, 0, !0);
|
|
49105
|
+
leftBottomCornerSelectGroup.role = "corner-left-bottom-header", leftBottomCornerSelectGroup.name = "select-overlay", scene.leftBottomCornerSelectGroup = leftBottomCornerSelectGroup;
|
|
49106
|
+
const cornerHeaderSelectGroup = createContainerGroup(0, 0, !0);
|
|
49107
|
+
cornerHeaderSelectGroup.role = "corner-header", cornerHeaderSelectGroup.name = "select-overlay", scene.cornerHeaderSelectGroup = cornerHeaderSelectGroup, scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rowHeaderGroup), scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(colHeaderGroup), scene.tableGroup.addChild(rightFrozenGroup), scene.tableGroup.addChild(rightBottomCornerGroup), scene.tableGroup.addChild(rightTopCornerGroup), scene.tableGroup.addChild(leftBottomCornerGroup), scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(bodySelectGroup), scene.tableGroup.addChild(rowHeaderSelectGroup), scene.tableGroup.addChild(bottomFrozenSelectGroup), scene.tableGroup.addChild(colHeaderSelectGroup), scene.tableGroup.addChild(rightFrozenSelectGroup), scene.tableGroup.addChild(rightBottomCornerSelectGroup), scene.tableGroup.addChild(rightTopCornerSelectGroup), scene.tableGroup.addChild(leftBottomCornerSelectGroup), scene.tableGroup.addChild(cornerHeaderSelectGroup), scene.tableGroup.addChild(componentGroup);
|
|
48954
49108
|
}
|
|
48955
49109
|
function createContainerGroup(width, height, clip) {
|
|
48956
49110
|
return new Group({
|
|
@@ -49465,10 +49619,10 @@
|
|
|
49465
49619
|
});
|
|
49466
49620
|
}
|
|
49467
49621
|
clearCells() {
|
|
49468
|
-
var _a, _b;
|
|
49622
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
49469
49623
|
this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
|
|
49470
49624
|
plugin.deactivate(this.stage.pluginService);
|
|
49471
|
-
}), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
|
|
49625
|
+
}), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(), null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(), null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(), null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(), null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(), null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
|
|
49472
49626
|
x: 0,
|
|
49473
49627
|
y: 0,
|
|
49474
49628
|
width: 0,
|
|
@@ -49516,12 +49670,62 @@
|
|
|
49516
49670
|
width: 0,
|
|
49517
49671
|
height: 0,
|
|
49518
49672
|
visible: !1
|
|
49673
|
+
}), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
|
|
49674
|
+
x: 0,
|
|
49675
|
+
y: 0,
|
|
49676
|
+
width: 0,
|
|
49677
|
+
height: 0
|
|
49678
|
+
}), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
|
|
49679
|
+
x: 0,
|
|
49680
|
+
y: 0,
|
|
49681
|
+
width: 0,
|
|
49682
|
+
height: 0
|
|
49683
|
+
}), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
|
|
49684
|
+
x: 0,
|
|
49685
|
+
y: 0,
|
|
49686
|
+
width: 0,
|
|
49687
|
+
height: 0,
|
|
49688
|
+
visible: !1
|
|
49689
|
+
}), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
|
|
49690
|
+
x: 0,
|
|
49691
|
+
y: 0,
|
|
49692
|
+
width: 0,
|
|
49693
|
+
height: 0
|
|
49694
|
+
}), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
|
|
49695
|
+
x: 0,
|
|
49696
|
+
y: 0,
|
|
49697
|
+
width: 0,
|
|
49698
|
+
height: 0,
|
|
49699
|
+
visible: !1
|
|
49700
|
+
}), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
|
|
49701
|
+
x: 0,
|
|
49702
|
+
y: 0,
|
|
49703
|
+
width: 0,
|
|
49704
|
+
height: 0,
|
|
49705
|
+
visible: !1
|
|
49706
|
+
}), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
|
|
49707
|
+
x: 0,
|
|
49708
|
+
y: 0,
|
|
49709
|
+
width: 0,
|
|
49710
|
+
height: 0,
|
|
49711
|
+
visible: !1
|
|
49712
|
+
}), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
|
|
49713
|
+
x: 0,
|
|
49714
|
+
y: 0,
|
|
49715
|
+
width: 0,
|
|
49716
|
+
height: 0,
|
|
49717
|
+
visible: !1
|
|
49718
|
+
}), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
|
|
49719
|
+
x: 0,
|
|
49720
|
+
y: 0,
|
|
49721
|
+
width: 0,
|
|
49722
|
+
height: 0
|
|
49519
49723
|
}), this.tableGroup.setAttributes({
|
|
49520
49724
|
x: this.table.tableX,
|
|
49521
49725
|
y: this.table.tableY,
|
|
49522
49726
|
width: 0,
|
|
49523
49727
|
height: 0
|
|
49524
|
-
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border), delete this.tableGroup.border), null === (
|
|
49728
|
+
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border), delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(), null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
|
|
49525
49729
|
}
|
|
49526
49730
|
updateStageBackground() {
|
|
49527
49731
|
this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
|
|
@@ -49877,16 +50081,16 @@
|
|
|
49877
50081
|
var _a, _b, _c, _d, _e, _f;
|
|
49878
50082
|
const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild,
|
|
49879
50083
|
lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
|
|
49880
|
-
0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
|
|
50084
|
+
0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y), this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y), this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y), this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y), this.updateNextFrame());
|
|
49881
50085
|
}
|
|
49882
50086
|
setBodyAndColHeaderX(x) {
|
|
49883
50087
|
const firstBodyCol = this.bodyGroup.firstChild,
|
|
49884
50088
|
lastBodyCol = this.bodyGroup.lastChild;
|
|
49885
|
-
0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.updateNextFrame());
|
|
50089
|
+
0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x), this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x), this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x), this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x), this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x), this.updateNextFrame());
|
|
49886
50090
|
}
|
|
49887
50091
|
afterScenegraphCreated() {
|
|
49888
|
-
var _a;
|
|
49889
|
-
this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), this.updateNextFrame();
|
|
50092
|
+
var _a, _b;
|
|
50093
|
+
this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(), this.updateNextFrame();
|
|
49890
50094
|
}
|
|
49891
50095
|
dealWidthMode() {
|
|
49892
50096
|
const table = this.table;
|
|
@@ -50008,13 +50212,23 @@
|
|
|
50008
50212
|
moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
|
|
50009
50213
|
}
|
|
50010
50214
|
updateContainerAttrWidthAndX() {
|
|
50011
|
-
var _a, _b, _c;
|
|
50012
|
-
const
|
|
50013
|
-
|
|
50014
|
-
|
|
50015
|
-
|
|
50016
|
-
|
|
50017
|
-
this.
|
|
50215
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
50216
|
+
const frozenStartX = -(null !== (_c = null === (_b = (_a = this.table).getFrozenColsScrollLeft) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0),
|
|
50217
|
+
frozenViewportWidth = this.table.getFrozenColsWidth(),
|
|
50218
|
+
rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0),
|
|
50219
|
+
rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
|
|
50220
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
|
|
50221
|
+
const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_g = this.table.frozenColCount) && void 0 !== _g ? _g : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0,
|
|
50222
|
+
bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_h = this.table.frozenColCount) && void 0 !== _h ? _h : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0;
|
|
50223
|
+
this.rightFrozenGroup.childrenCount > 0 && updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX), this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_j = this.table.frozenColCount) && void 0 !== _j ? _j : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0), updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX), updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX), this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width), this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width), this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width), this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width), this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width), this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width), this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width), this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width), this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
|
|
50224
|
+
}
|
|
50225
|
+
setFrozenColsScrollLeft(left) {
|
|
50226
|
+
const frozenStartX = -left;
|
|
50227
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX), updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), this.updateNextFrame();
|
|
50228
|
+
}
|
|
50229
|
+
setRightFrozenColsScrollLeft(left) {
|
|
50230
|
+
const rightStartX = -this.table.getRightFrozenColsOffset() + left;
|
|
50231
|
+
updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX), updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
|
|
50018
50232
|
}
|
|
50019
50233
|
updateContainerAttrHeightAndY() {
|
|
50020
50234
|
var _a, _b, _c;
|
|
@@ -50039,7 +50253,82 @@
|
|
|
50039
50253
|
}, 0)) : (this._needUpdateContainer = !0, this.updateContainerSync(null !== (_a = updateConfig.needUpdateCellY) && void 0 !== _a && _a));
|
|
50040
50254
|
}
|
|
50041
50255
|
updateContainerSync(needUpdateCellY = !1) {
|
|
50042
|
-
this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(), this.component.updateScrollBar(), this.updateNextFrame());
|
|
50256
|
+
this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(), needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(), this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
|
|
50257
|
+
}
|
|
50258
|
+
syncSelectOverlayGroups() {
|
|
50259
|
+
this.bodySelectGroup.setAttributes({
|
|
50260
|
+
x: this.bodyGroup.attribute.x,
|
|
50261
|
+
y: this.bodyGroup.attribute.y,
|
|
50262
|
+
width: this.bodyGroup.attribute.width,
|
|
50263
|
+
height: this.bodyGroup.attribute.height
|
|
50264
|
+
}), this.rowHeaderSelectGroup.setAttributes({
|
|
50265
|
+
x: this.rowHeaderGroup.attribute.x,
|
|
50266
|
+
y: this.rowHeaderGroup.attribute.y,
|
|
50267
|
+
width: this.rowHeaderGroup.attribute.width,
|
|
50268
|
+
height: this.rowHeaderGroup.attribute.height
|
|
50269
|
+
}), this.colHeaderSelectGroup.setAttributes({
|
|
50270
|
+
x: this.colHeaderGroup.attribute.x,
|
|
50271
|
+
y: this.colHeaderGroup.attribute.y,
|
|
50272
|
+
width: this.colHeaderGroup.attribute.width,
|
|
50273
|
+
height: this.colHeaderGroup.attribute.height
|
|
50274
|
+
}), this.cornerHeaderSelectGroup.setAttributes({
|
|
50275
|
+
x: this.cornerHeaderGroup.attribute.x,
|
|
50276
|
+
y: this.cornerHeaderGroup.attribute.y,
|
|
50277
|
+
width: this.cornerHeaderGroup.attribute.width,
|
|
50278
|
+
height: this.cornerHeaderGroup.attribute.height
|
|
50279
|
+
}), this.rightFrozenSelectGroup.setAttributes({
|
|
50280
|
+
x: this.rightFrozenGroup.attribute.x,
|
|
50281
|
+
y: this.rightFrozenGroup.attribute.y,
|
|
50282
|
+
width: this.rightFrozenGroup.attribute.width,
|
|
50283
|
+
height: this.rightFrozenGroup.attribute.height,
|
|
50284
|
+
visible: this.rightFrozenGroup.attribute.visible
|
|
50285
|
+
}), this.bottomFrozenSelectGroup.setAttributes({
|
|
50286
|
+
x: this.bottomFrozenGroup.attribute.x,
|
|
50287
|
+
y: this.bottomFrozenGroup.attribute.y,
|
|
50288
|
+
width: this.bottomFrozenGroup.attribute.width,
|
|
50289
|
+
height: this.bottomFrozenGroup.attribute.height,
|
|
50290
|
+
visible: this.bottomFrozenGroup.attribute.visible
|
|
50291
|
+
}), this.rightTopCornerSelectGroup.setAttributes({
|
|
50292
|
+
x: this.rightTopCornerGroup.attribute.x,
|
|
50293
|
+
y: this.rightTopCornerGroup.attribute.y,
|
|
50294
|
+
width: this.rightTopCornerGroup.attribute.width,
|
|
50295
|
+
height: this.rightTopCornerGroup.attribute.height,
|
|
50296
|
+
visible: this.rightTopCornerGroup.attribute.visible
|
|
50297
|
+
}), this.leftBottomCornerSelectGroup.setAttributes({
|
|
50298
|
+
x: this.leftBottomCornerGroup.attribute.x,
|
|
50299
|
+
y: this.leftBottomCornerGroup.attribute.y,
|
|
50300
|
+
width: this.leftBottomCornerGroup.attribute.width,
|
|
50301
|
+
height: this.leftBottomCornerGroup.attribute.height,
|
|
50302
|
+
visible: this.leftBottomCornerGroup.attribute.visible
|
|
50303
|
+
}), this.rightBottomCornerSelectGroup.setAttributes({
|
|
50304
|
+
x: this.rightBottomCornerGroup.attribute.x,
|
|
50305
|
+
y: this.rightBottomCornerGroup.attribute.y,
|
|
50306
|
+
width: this.rightBottomCornerGroup.attribute.width,
|
|
50307
|
+
height: this.rightBottomCornerGroup.attribute.height,
|
|
50308
|
+
visible: this.rightBottomCornerGroup.attribute.visible
|
|
50309
|
+
});
|
|
50310
|
+
}
|
|
50311
|
+
getSelectOverlayGroup(selectRangeType) {
|
|
50312
|
+
switch (selectRangeType) {
|
|
50313
|
+
case "body":
|
|
50314
|
+
return this.bodySelectGroup;
|
|
50315
|
+
case "rowHeader":
|
|
50316
|
+
return this.rowHeaderSelectGroup;
|
|
50317
|
+
case "bottomFrozen":
|
|
50318
|
+
return this.bottomFrozenSelectGroup;
|
|
50319
|
+
case "columnHeader":
|
|
50320
|
+
return this.colHeaderSelectGroup;
|
|
50321
|
+
case "rightFrozen":
|
|
50322
|
+
return this.rightFrozenSelectGroup;
|
|
50323
|
+
case "rightTopCorner":
|
|
50324
|
+
return this.rightTopCornerSelectGroup;
|
|
50325
|
+
case "leftBottomCorner":
|
|
50326
|
+
return this.leftBottomCornerSelectGroup;
|
|
50327
|
+
case "rightBottomCorner":
|
|
50328
|
+
return this.rightBottomCornerSelectGroup;
|
|
50329
|
+
default:
|
|
50330
|
+
return this.cornerHeaderSelectGroup;
|
|
50331
|
+
}
|
|
50043
50332
|
}
|
|
50044
50333
|
updateCellContentWhileResize(col, row) {
|
|
50045
50334
|
var _a;
|
|
@@ -51518,29 +51807,32 @@
|
|
|
51518
51807
|
}
|
|
51519
51808
|
}
|
|
51520
51809
|
function createCustomCellSelectBorder(scene, start_Col, start_Row, end_Col, end_Row, selectRangeType, selectId, strokes, style) {
|
|
51521
|
-
var _a, _b, _c, _d;
|
|
51810
|
+
var _a, _b, _c, _d, _e, _f;
|
|
51522
51811
|
const startCol = Math.min(start_Col, end_Col),
|
|
51523
51812
|
startRow = Math.min(start_Row, end_Row),
|
|
51524
51813
|
endCol = Math.max(start_Col, end_Col),
|
|
51525
51814
|
endRow = Math.max(start_Row, end_Row),
|
|
51815
|
+
overlayGroup = scene.getSelectOverlayGroup(selectRangeType),
|
|
51816
|
+
offsetX = scene.tableGroup.attribute.x + (null !== (_a = overlayGroup.attribute.x) && void 0 !== _a ? _a : 0),
|
|
51817
|
+
offsetY = scene.tableGroup.attribute.y + (null !== (_b = overlayGroup.attribute.y) && void 0 !== _b ? _b : 0),
|
|
51526
51818
|
firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds,
|
|
51527
51819
|
rect = createRect({
|
|
51528
51820
|
pickable: !1,
|
|
51529
|
-
fill: null !== (
|
|
51530
|
-
lineWidth: null !== (
|
|
51531
|
-
lineDash: null !== (
|
|
51821
|
+
fill: null !== (_c = style.cellBgColor) && void 0 !== _c && _c,
|
|
51822
|
+
lineWidth: null !== (_d = style.cellBorderLineWidth) && void 0 !== _d ? _d : 0,
|
|
51823
|
+
lineDash: null !== (_e = style.cellBorderLineDash) && void 0 !== _e ? _e : [],
|
|
51532
51824
|
stroke: strokes.map(stroke => !!stroke && style.cellBorderColor),
|
|
51533
|
-
x: firstCellBound.x1 -
|
|
51534
|
-
y: firstCellBound.y1 -
|
|
51825
|
+
x: firstCellBound.x1 - offsetX,
|
|
51826
|
+
y: firstCellBound.y1 - offsetY,
|
|
51535
51827
|
width: 0,
|
|
51536
51828
|
height: 0,
|
|
51537
51829
|
visible: !0,
|
|
51538
|
-
cornerRadius: getCornerRadius(selectRangeType, null === (
|
|
51830
|
+
cornerRadius: getCornerRadius(selectRangeType, null === (_f = scene.table.theme.frameStyle) || void 0 === _f ? void 0 : _f.cornerRadius, start_Col, start_Row, end_Col, end_Row, scene.table)
|
|
51539
51831
|
});
|
|
51540
51832
|
scene.customSelectedRangeComponents.set(`${startCol}-${startRow}-${endCol}-${endRow}-${selectId}`, {
|
|
51541
51833
|
rect: rect,
|
|
51542
51834
|
role: selectRangeType
|
|
51543
|
-
}),
|
|
51835
|
+
}), overlayGroup.addChild(rect);
|
|
51544
51836
|
}
|
|
51545
51837
|
|
|
51546
51838
|
function deletaCustomSelectRanges(state) {
|
|
@@ -51561,7 +51853,7 @@
|
|
|
51561
51853
|
constructor(table) {
|
|
51562
51854
|
this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
|
|
51563
51855
|
this.updateInteractionState(null != state ? state : InteractionState.default);
|
|
51564
|
-
}, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
|
|
51856
|
+
}, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this), this.updateFrozenHorizontalScrollBar = this.updateFrozenHorizontalScrollBar.bind(this), this.updateRightFrozenHorizontalScrollBar = this.updateRightFrozenHorizontalScrollBar.bind(this);
|
|
51565
51857
|
}
|
|
51566
51858
|
initState() {
|
|
51567
51859
|
this._initState(), this.setHoverState(), this.setSelectState(), this.setFrozenState();
|
|
@@ -51678,7 +51970,9 @@
|
|
|
51678
51970
|
row: -1
|
|
51679
51971
|
}, this.scroll = {
|
|
51680
51972
|
horizontalBarPos: 0,
|
|
51681
|
-
verticalBarPos: 0
|
|
51973
|
+
verticalBarPos: 0,
|
|
51974
|
+
frozenHorizontalBarPos: 0,
|
|
51975
|
+
rightFrozenHorizontalBarPos: 0
|
|
51682
51976
|
}, this.tablePosition = {
|
|
51683
51977
|
absoluteX: 0,
|
|
51684
51978
|
absoluteY: 0
|
|
@@ -51910,13 +52204,42 @@
|
|
|
51910
52204
|
}), void this._frozenObserver.observe(container);
|
|
51911
52205
|
}
|
|
51912
52206
|
if (this.table.getColsWidth(0, originalFrozenColCount - 1) > this.table._getMaxFrozenWidth()) {
|
|
51913
|
-
if (this.table.internalProps.unfreezeAllOnExceedsMaxWidth) this.table._setFrozenColCount(0), this.setFrozenCol(-1);else {
|
|
52207
|
+
if (this.table.options.scrollFrozenCols) this.table.frozenColCount !== originalFrozenColCount && (this.table._setFrozenColCount(originalFrozenColCount), this.setFrozenCol(originalFrozenColCount));else if (this.table.internalProps.unfreezeAllOnExceedsMaxWidth) this.table._setFrozenColCount(0), this.setFrozenCol(-1);else {
|
|
51914
52208
|
const computedFrozenColCount = this.table._getComputedFrozenColCount(originalFrozenColCount);
|
|
51915
52209
|
this.table._setFrozenColCount(computedFrozenColCount), this.setFrozenCol(computedFrozenColCount);
|
|
51916
52210
|
}
|
|
51917
52211
|
} else this.table.frozenColCount !== originalFrozenColCount && (this.table._setFrozenColCount(originalFrozenColCount), this.setFrozenCol(originalFrozenColCount));
|
|
52212
|
+
this.table.options.scrollFrozenCols && 0 !== this.table.getFrozenColsOffset() ? this.setFrozenColsScrollLeft(this.scroll.frozenHorizontalBarPos, !1) : this.setFrozenColsScrollLeft(0, !1), this.table.options.scrollRightFrozenCols && 0 !== this.table.getRightFrozenColsOffset() ? this.setRightFrozenColsScrollLeft(this.scroll.rightFrozenHorizontalBarPos, !1) : this.setRightFrozenColsScrollLeft(0, !1);
|
|
51918
52213
|
} else this.clearFrozenObserver();
|
|
51919
52214
|
}
|
|
52215
|
+
setFrozenColsScrollLeft(left, triggerRender = !0) {
|
|
52216
|
+
if (!this.table || !this.table.scenegraph) return;
|
|
52217
|
+
const maxScrollLeft = this.table.getFrozenColsOffset();
|
|
52218
|
+
if (left = Math.max(0, Math.min(left, maxScrollLeft)), left = Math.ceil(left), this.scroll.frozenHorizontalBarPos === left) return;
|
|
52219
|
+
this.scroll.frozenHorizontalBarPos = left;
|
|
52220
|
+
const ratio = maxScrollLeft ? left / maxScrollLeft : 0;
|
|
52221
|
+
this.table.scenegraph.component.updateFrozenHorizontalScrollBarPos(ratio), triggerRender && this.table.scenegraph.setFrozenColsScrollLeft(left);
|
|
52222
|
+
}
|
|
52223
|
+
setRightFrozenColsScrollLeft(left, triggerRender = !0) {
|
|
52224
|
+
if (!this.table || !this.table.scenegraph) return;
|
|
52225
|
+
const maxScrollLeft = this.table.getRightFrozenColsOffset();
|
|
52226
|
+
if (left = Math.max(0, Math.min(left, maxScrollLeft)), left = Math.ceil(left), this.scroll.rightFrozenHorizontalBarPos === left) return;
|
|
52227
|
+
this.scroll.rightFrozenHorizontalBarPos = left;
|
|
52228
|
+
const ratio = maxScrollLeft ? 1 - left / maxScrollLeft : 1;
|
|
52229
|
+
this.table.scenegraph.component.updateRightFrozenHorizontalScrollBarPos(ratio), triggerRender && this.table.scenegraph.setRightFrozenColsScrollLeft(left);
|
|
52230
|
+
}
|
|
52231
|
+
updateFrozenHorizontalScrollBar(xRatio) {
|
|
52232
|
+
var _a, _b, _c;
|
|
52233
|
+
const maxScrollLeft = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0;
|
|
52234
|
+
let left = Math.ceil(xRatio * maxScrollLeft);
|
|
52235
|
+
isValid$1(left) && !isNaN(left) || (left = 0), this.setFrozenColsScrollLeft(left, !0);
|
|
52236
|
+
}
|
|
52237
|
+
updateRightFrozenHorizontalScrollBar(xRatio) {
|
|
52238
|
+
var _a, _b, _c;
|
|
52239
|
+
const maxScrollLeft = null !== (_c = null === (_b = (_a = this.table).getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0;
|
|
52240
|
+
let left = Math.ceil((1 - xRatio) * maxScrollLeft);
|
|
52241
|
+
isValid$1(left) && !isNaN(left) || (left = 0), this.setRightFrozenColsScrollLeft(left, !0);
|
|
52242
|
+
}
|
|
51920
52243
|
clearFrozenObserver() {
|
|
51921
52244
|
this._frozenObserver && (this._frozenObserver.disconnect(), this._frozenObserver = null);
|
|
51922
52245
|
}
|
|
@@ -51989,32 +52312,35 @@
|
|
|
51989
52312
|
}), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
|
|
51990
52313
|
}
|
|
51991
52314
|
updateHorizontalScrollBar(xRatio) {
|
|
51992
|
-
var _a, _b, _c, _d;
|
|
52315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51993
52316
|
const totalWidth = this.table.getAllColsWidth(),
|
|
51994
|
-
oldHorizontalBarPos = this.scroll.horizontalBarPos
|
|
51995
|
-
|
|
52317
|
+
oldHorizontalBarPos = this.scroll.horizontalBarPos,
|
|
52318
|
+
frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
52319
|
+
rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
|
|
52320
|
+
scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
52321
|
+
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
51996
52322
|
isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
51997
52323
|
const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
|
|
51998
52324
|
if (this.table.fireListeners(TABLE_EVENT_TYPE.CAN_SCROLL, {
|
|
51999
52325
|
event: void 0,
|
|
52000
52326
|
scrollTop: this.scroll.verticalBarPos,
|
|
52001
52327
|
scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
|
|
52002
|
-
scrollHeight: null === (
|
|
52003
|
-
scrollWidth: null === (
|
|
52328
|
+
scrollHeight: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
|
|
52329
|
+
scrollWidth: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
|
|
52004
52330
|
viewHeight: this.table.tableNoFrameHeight,
|
|
52005
52331
|
viewWidth: this.table.tableNoFrameWidth,
|
|
52006
52332
|
scrollDirection: "horizontal",
|
|
52007
52333
|
scrollRatioX: xRatio,
|
|
52008
52334
|
dx: dx
|
|
52009
52335
|
}).some(value => !1 === value)) {
|
|
52010
|
-
const xRatio = this.scroll.horizontalBarPos /
|
|
52336
|
+
const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
|
|
52011
52337
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
52012
52338
|
} else this.scroll.horizontalBarPos = horizontalBarPos, this.table.scenegraph.setX(-this.scroll.horizontalBarPos, 1 === xRatio), this.scroll.horizontalBarPos -= this.table.scenegraph.proxy.deltaX, this.table.scenegraph.proxy.deltaX = 0, this.updateHoverPos(-1, -1), this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
52013
52339
|
event: void 0,
|
|
52014
52340
|
scrollTop: this.scroll.verticalBarPos,
|
|
52015
52341
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
52016
|
-
scrollHeight: null === (
|
|
52017
|
-
scrollWidth: null === (
|
|
52342
|
+
scrollHeight: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
|
|
52343
|
+
scrollWidth: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
|
|
52018
52344
|
viewHeight: this.table.tableNoFrameHeight,
|
|
52019
52345
|
viewWidth: this.table.tableNoFrameWidth,
|
|
52020
52346
|
scrollDirection: "horizontal",
|
|
@@ -52066,15 +52392,18 @@
|
|
|
52066
52392
|
}), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
|
|
52067
52393
|
}
|
|
52068
52394
|
setScrollLeft(left, event, triggerEvent = !0) {
|
|
52069
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
52395
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
52070
52396
|
if (!this.table || !this.table.scenegraph) return;
|
|
52071
52397
|
this.table.scrollLeft;
|
|
52072
52398
|
const totalWidth = this.table.getAllColsWidth(),
|
|
52073
|
-
|
|
52074
|
-
|
|
52399
|
+
frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
52400
|
+
rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
|
|
52401
|
+
scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset),
|
|
52402
|
+
sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
52403
|
+
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
|
|
52075
52404
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos,
|
|
52076
|
-
xRatio = left /
|
|
52077
|
-
if ((oldHorizontalBarPos !== left || !0 === (null === (
|
|
52405
|
+
xRatio = scrollRange ? left / scrollRange : 0;
|
|
52406
|
+
if ((oldHorizontalBarPos !== left || !0 === (null === (_j = null === (_h = this.table.options) || void 0 === _h ? void 0 : _h.customConfig) || void 0 === _j ? void 0 : _j.scrollEventAlwaysTrigger)) && triggerEvent) {
|
|
52078
52407
|
let horizontalBarPos = left;
|
|
52079
52408
|
isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
52080
52409
|
const dx = horizontalBarPos - oldHorizontalBarPos;
|
|
@@ -52082,15 +52411,15 @@
|
|
|
52082
52411
|
event: null == event ? void 0 : event.nativeEvent,
|
|
52083
52412
|
scrollTop: this.scroll.verticalBarPos,
|
|
52084
52413
|
scrollLeft: horizontalBarPos,
|
|
52085
|
-
scrollHeight: null === (
|
|
52086
|
-
scrollWidth: null === (
|
|
52414
|
+
scrollHeight: null === (_k = this.table.theme.scrollStyle) || void 0 === _k ? void 0 : _k.width,
|
|
52415
|
+
scrollWidth: null === (_l = this.table.theme.scrollStyle) || void 0 === _l ? void 0 : _l.width,
|
|
52087
52416
|
viewHeight: this.table.tableNoFrameHeight,
|
|
52088
52417
|
viewWidth: this.table.tableNoFrameWidth,
|
|
52089
52418
|
scrollDirection: "horizontal",
|
|
52090
52419
|
scrollRatioX: xRatio,
|
|
52091
52420
|
dx: dx
|
|
52092
52421
|
}).some(value => !1 === value)) {
|
|
52093
|
-
const xRatio = this.scroll.horizontalBarPos /
|
|
52422
|
+
const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
|
|
52094
52423
|
return void this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
52095
52424
|
}
|
|
52096
52425
|
}
|
|
@@ -52100,8 +52429,8 @@
|
|
|
52100
52429
|
event: null == event ? void 0 : event.nativeEvent,
|
|
52101
52430
|
scrollTop: this.scroll.verticalBarPos,
|
|
52102
52431
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
52103
|
-
scrollHeight: null === (
|
|
52104
|
-
scrollWidth: null === (
|
|
52432
|
+
scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
|
|
52433
|
+
scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
|
|
52105
52434
|
viewHeight: this.table.tableNoFrameHeight,
|
|
52106
52435
|
viewWidth: this.table.tableNoFrameWidth,
|
|
52107
52436
|
scrollDirection: "horizontal",
|
|
@@ -52113,7 +52442,7 @@
|
|
|
52113
52442
|
this.table.scenegraph.component.hideVerticalScrollBar();
|
|
52114
52443
|
}
|
|
52115
52444
|
showVerticalScrollBar(autoHide) {
|
|
52116
|
-
this.table.scenegraph.component.showVerticalScrollBar(),
|
|
52445
|
+
this.table.scenegraph.component.showVerticalScrollBar(), clearTimeout(this._clearVerticalScrollBar), autoHide && (this._clearVerticalScrollBar = setTimeout(() => {
|
|
52117
52446
|
var _a;
|
|
52118
52447
|
null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideVerticalScrollBar();
|
|
52119
52448
|
}, 1e3));
|
|
@@ -52121,9 +52450,9 @@
|
|
|
52121
52450
|
hideHorizontalScrollBar() {
|
|
52122
52451
|
this.table.scenegraph.component.hideHorizontalScrollBar();
|
|
52123
52452
|
}
|
|
52124
|
-
showHorizontalScrollBar(autoHide) {
|
|
52453
|
+
showHorizontalScrollBar(autoHide, target = "all") {
|
|
52125
52454
|
var _a;
|
|
52126
|
-
this.table.scenegraph.component.showHorizontalScrollBar(), null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.showFrozenColumnShadow(),
|
|
52455
|
+
this.table.scenegraph.component.showHorizontalScrollBar(target), null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.showFrozenColumnShadow(), clearTimeout(this._clearHorizontalScrollBar), autoHide && (this._clearHorizontalScrollBar = setTimeout(() => {
|
|
52127
52456
|
var _a, _b;
|
|
52128
52457
|
null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideFrozenColumnShadow(), null === (_b = this.table.scenegraph) || void 0 === _b || _b.component.hideHorizontalScrollBar();
|
|
52129
52458
|
}, 1e3));
|
|
@@ -52494,7 +52823,7 @@
|
|
|
52494
52823
|
}
|
|
52495
52824
|
|
|
52496
52825
|
function handleWhell(event, state, isWheelEvent = !0) {
|
|
52497
|
-
var _a, _b, _c;
|
|
52826
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
52498
52827
|
let {
|
|
52499
52828
|
deltaX: deltaX,
|
|
52500
52829
|
deltaY: deltaY
|
|
@@ -52505,8 +52834,39 @@
|
|
|
52505
52834
|
vertical: 1
|
|
52506
52835
|
});
|
|
52507
52836
|
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
|
|
52508
|
-
const
|
|
52509
|
-
|
|
52837
|
+
const visible1 = null === (_a = state.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.visible,
|
|
52838
|
+
horizontalAutoHide = "scrolling" === (null !== (_c = null === (_b = state.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.horizontalVisible) && void 0 !== _c ? _c : visible1),
|
|
52839
|
+
verticalAutoHide = "scrolling" === (null !== (_e = null === (_d = state.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.verticalVisible) && void 0 !== _e ? _e : visible1);
|
|
52840
|
+
let usedFrozenHorizontal = !1,
|
|
52841
|
+
usedRightFrozenHorizontal = !1,
|
|
52842
|
+
blockedFrozenHorizontal = !1,
|
|
52843
|
+
blockedRightFrozenHorizontal = !1;
|
|
52844
|
+
if (optimizedDeltaX) {
|
|
52845
|
+
const pxEvent = event.x,
|
|
52846
|
+
pyEvent = event.y,
|
|
52847
|
+
pxFallback = null === (_g = null === (_f = state.table.eventManager) || void 0 === _f ? void 0 : _f.LastBodyPointerXY) || void 0 === _g ? void 0 : _g.x,
|
|
52848
|
+
pyFallback = null === (_j = null === (_h = state.table.eventManager) || void 0 === _h ? void 0 : _h.LastBodyPointerXY) || void 0 === _j ? void 0 : _j.y,
|
|
52849
|
+
px = "number" == typeof pxEvent ? pxEvent : pxFallback,
|
|
52850
|
+
py = "number" == typeof pyEvent ? pyEvent : pyFallback,
|
|
52851
|
+
relativeX = "number" == typeof px ? px - state.table.tableX : NaN,
|
|
52852
|
+
relativeY = "number" == typeof py ? py - state.table.tableY : NaN,
|
|
52853
|
+
isInTable = isFinite(relativeX) && isFinite(relativeY) && relativeX >= 0 && relativeY >= 0 && relativeX <= state.table.tableNoFrameWidth && relativeY <= state.table.tableNoFrameHeight,
|
|
52854
|
+
frozenColsScrollable = state.table.options.scrollFrozenCols && state.table.getFrozenColsOffset() > 0,
|
|
52855
|
+
rightFrozenColsScrollable = state.table.options.scrollRightFrozenCols && state.table.getRightFrozenColsOffset() > 0,
|
|
52856
|
+
isInFrozenViewport = isInTable && relativeX > 0 && relativeX < state.table.getFrozenColsWidth(),
|
|
52857
|
+
isInRightFrozenViewport = isInTable && relativeX > state.table.tableNoFrameWidth - state.table.getRightFrozenColsWidth();
|
|
52858
|
+
if (frozenColsScrollable && isInFrozenViewport) {
|
|
52859
|
+
const maxFrozenScrollLeft = state.table.getFrozenColsOffset(),
|
|
52860
|
+
nextFrozenScrollLeft = state.scroll.frozenHorizontalBarPos + optimizedDeltaX;
|
|
52861
|
+
optimizedDeltaX < 0 && state.scroll.frozenHorizontalBarPos > 0 || optimizedDeltaX > 0 && state.scroll.frozenHorizontalBarPos < maxFrozenScrollLeft ? (state.setFrozenColsScrollLeft(nextFrozenScrollLeft), usedFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "frozen")) : state.table.options.scrollFrozenColsPassThroughToBody ? (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body")) : (blockedFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "frozen"));
|
|
52862
|
+
} else if (rightFrozenColsScrollable && isInRightFrozenViewport) {
|
|
52863
|
+
const maxRightFrozenScrollLeft = state.table.getRightFrozenColsOffset(),
|
|
52864
|
+
rightFrozenDelta = -optimizedDeltaX,
|
|
52865
|
+
nextRightFrozenScrollLeft = state.scroll.rightFrozenHorizontalBarPos + rightFrozenDelta;
|
|
52866
|
+
rightFrozenDelta < 0 && state.scroll.rightFrozenHorizontalBarPos > 0 || rightFrozenDelta > 0 && state.scroll.rightFrozenHorizontalBarPos < maxRightFrozenScrollLeft ? (state.setRightFrozenColsScrollLeft(nextRightFrozenScrollLeft), usedRightFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "rightFrozen")) : state.table.options.scrollFrozenColsPassThroughToBody ? (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body")) : (blockedRightFrozenHorizontal = !0, state.showHorizontalScrollBar(horizontalAutoHide, "rightFrozen"));
|
|
52867
|
+
} else state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(horizontalAutoHide, "body");
|
|
52868
|
+
}
|
|
52869
|
+
optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(verticalAutoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_k = event.nativeEvent) || void 0 === _k ? void 0 : _k.cancelable) && ("none" === state.table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(state) || deltaX && isHorizontalExistScrollBar(state)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && !blockedFrozenHorizontal && !blockedRightFrozenHorizontal && (usedFrozenHorizontal ? state.table.getFrozenColsOffset() > 0 : usedRightFrozenHorizontal ? state.table.getRightFrozenColsOffset() > 0 : isHorizontalScrollable(deltaX, state))) && event.nativeEvent.preventDefault();
|
|
52510
52870
|
}
|
|
52511
52871
|
function optimizeScrollXY(x, y, ratio) {
|
|
52512
52872
|
var _a, _b;
|
|
@@ -52519,13 +52879,19 @@
|
|
|
52519
52879
|
return 0 != state.table.getAllRowsHeight() - state.table.scenegraph.height && !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
|
|
52520
52880
|
}
|
|
52521
52881
|
function isHorizontalScrollable(deltaX, state) {
|
|
52522
|
-
|
|
52882
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52883
|
+
const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
52884
|
+
rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
|
|
52885
|
+
return 0 != state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset && !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
|
|
52523
52886
|
}
|
|
52524
52887
|
function isVerticalExistScrollBar(state) {
|
|
52525
52888
|
return !(state.table.getAllRowsHeight() - state.table.scenegraph.height <= 0);
|
|
52526
52889
|
}
|
|
52527
52890
|
function isHorizontalExistScrollBar(state) {
|
|
52528
|
-
|
|
52891
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52892
|
+
const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
52893
|
+
rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
|
|
52894
|
+
return !(state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset <= 0);
|
|
52529
52895
|
}
|
|
52530
52896
|
function isScrollToTop(deltaY, state) {
|
|
52531
52897
|
return 0 !== state.table.getAllRowsHeight() - state.table.scenegraph.height && deltaY <= 0 && state.scroll.verticalBarPos < 1;
|
|
@@ -52537,12 +52903,17 @@
|
|
|
52537
52903
|
return 0 !== totalHeight && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
|
|
52538
52904
|
}
|
|
52539
52905
|
function isScrollToLeft(deltaX, state) {
|
|
52540
|
-
|
|
52906
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52907
|
+
const frozenOffset = null !== (_c = null === (_b = (_a = state.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
52908
|
+
rightFrozenOffset = null !== (_f = null === (_e = (_d = state.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0;
|
|
52909
|
+
return 0 !== state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
|
|
52541
52910
|
}
|
|
52542
52911
|
function isScrollToRight(deltaX, state) {
|
|
52543
|
-
var _a;
|
|
52912
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
52544
52913
|
const sizeTolerance = (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0,
|
|
52545
|
-
|
|
52914
|
+
frozenOffset = null !== (_d = null === (_c = (_b = state.table).getFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(_b)) && void 0 !== _d ? _d : 0,
|
|
52915
|
+
rightFrozenOffset = null !== (_g = null === (_f = (_e = state.table).getRightFrozenColsOffset) || void 0 === _f ? void 0 : _f.call(_e)) && void 0 !== _g ? _g : 0,
|
|
52916
|
+
totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
|
|
52546
52917
|
return 0 !== totalWidth && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
|
|
52547
52918
|
}
|
|
52548
52919
|
class InertiaScroll {
|
|
@@ -52621,16 +52992,17 @@
|
|
|
52621
52992
|
|
|
52622
52993
|
function bindTableGroupListener(eventManager) {
|
|
52623
52994
|
const table = eventManager.table,
|
|
52624
|
-
stateManager = table.stateManager
|
|
52995
|
+
stateManager = table.stateManager,
|
|
52996
|
+
getEventArgsSet = e => getCellEventArgsSetWithTable(e, table);
|
|
52625
52997
|
table.scenegraph.tableGroup.addEventListener("pointermove", e => {
|
|
52626
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
52998
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
52627
52999
|
const lastX = null !== (_b = null === (_a = table.eventManager.LastPointerXY) || void 0 === _a ? void 0 : _a.x) && void 0 !== _b ? _b : e.x,
|
|
52628
53000
|
lastY = null !== (_d = null === (_c = table.eventManager.LastPointerXY) || void 0 === _c ? void 0 : _c.y) && void 0 !== _d ? _d : e.y;
|
|
52629
53001
|
table.eventManager.LastPointerXY = {
|
|
52630
53002
|
x: e.x,
|
|
52631
53003
|
y: e.y
|
|
52632
53004
|
}, eventManager.touchSetTimeout && (clearTimeout(eventManager.touchSetTimeout), eventManager.touchSetTimeout = void 0);
|
|
52633
|
-
const eventArgsSet =
|
|
53005
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52634
53006
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE, {
|
|
52635
53007
|
col: eventArgsSet.eventArgs.col,
|
|
52636
53008
|
row: eventArgsSet.eventArgs.row,
|
|
@@ -52684,14 +53056,19 @@
|
|
|
52684
53056
|
mergeCellInfo: null === (_t = eventArgsSet.eventArgs) || void 0 === _t ? void 0 : _t.mergeInfo
|
|
52685
53057
|
});
|
|
52686
53058
|
}
|
|
53059
|
+
if (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) {
|
|
53060
|
+
const relativeX = e.x - table.tableX,
|
|
53061
|
+
target = table.options.scrollFrozenCols && (null === (_u = table.getFrozenColsOffset) || void 0 === _u ? void 0 : _u.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_v = table.getRightFrozenColsOffset) || void 0 === _v ? void 0 : _v.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
|
|
53062
|
+
stateManager.showHorizontalScrollBar(!1, target);
|
|
53063
|
+
}
|
|
52687
53064
|
}), table.scenegraph.tableGroup.addEventListener("pointerout", e => {
|
|
52688
53065
|
var _a;
|
|
52689
|
-
const eventArgsSet =
|
|
53066
|
+
const eventArgsSet = getEventArgsSet(e),
|
|
52690
53067
|
cellGoup = null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target;
|
|
52691
53068
|
"table" === (null == cellGoup ? void 0 : cellGoup.role) && eventManager.dealTableHover();
|
|
52692
53069
|
}), table.scenegraph.tableGroup.addEventListener("pointerover", e => {
|
|
52693
53070
|
var _a, _b;
|
|
52694
|
-
const eventArgsSet =
|
|
53071
|
+
const eventArgsSet = getEventArgsSet(e),
|
|
52695
53072
|
cellGoup = null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target;
|
|
52696
53073
|
if (cellGoup && table.hasListeners(TABLE_EVENT_TYPE.MOUSEOVER_CHART_SYMBOL) && "symbol" === cellGoup.type) {
|
|
52697
53074
|
const cellGroup = e.composedPath().find(p => "cell" === p.roll);
|
|
@@ -52720,7 +53097,13 @@
|
|
|
52720
53097
|
}
|
|
52721
53098
|
}
|
|
52722
53099
|
}), table.scenegraph.tableGroup.addEventListener("pointerenter", e => {
|
|
52723
|
-
|
|
53100
|
+
var _a, _b;
|
|
53101
|
+
if (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) {
|
|
53102
|
+
const relativeX = e.x - table.tableX,
|
|
53103
|
+
target = table.options.scrollFrozenCols && (null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_b = table.getRightFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
|
|
53104
|
+
stateManager.showHorizontalScrollBar(!1, target);
|
|
53105
|
+
}
|
|
53106
|
+
(table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.showVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE, {
|
|
52724
53107
|
event: e.nativeEvent
|
|
52725
53108
|
});
|
|
52726
53109
|
}), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
|
|
@@ -52750,7 +53133,7 @@
|
|
|
52750
53133
|
x: e.x,
|
|
52751
53134
|
y: e.y
|
|
52752
53135
|
}, 0 !== e.button) return;
|
|
52753
|
-
const eventArgsSet =
|
|
53136
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52754
53137
|
if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
|
|
52755
53138
|
if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && (table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0)), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
|
|
52756
53139
|
const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
|
|
@@ -52787,7 +53170,7 @@
|
|
|
52787
53170
|
}
|
|
52788
53171
|
}
|
|
52789
53172
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL)) {
|
|
52790
|
-
const eventArgsSet =
|
|
53173
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52791
53174
|
eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL, {
|
|
52792
53175
|
col: eventArgsSet.eventArgs.col,
|
|
52793
53176
|
row: eventArgsSet.eventArgs.row,
|
|
@@ -52806,7 +53189,7 @@
|
|
|
52806
53189
|
fireMoveColEventListeners(table, endMoveColSuccess, e.nativeEvent);
|
|
52807
53190
|
} else if (stateManager.isSelecting()) {
|
|
52808
53191
|
table.stateManager.endSelectCells(), table.stateManager.isFillHandle() && table.stateManager.endFillSelect();
|
|
52809
|
-
const eventArgsSet =
|
|
53192
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52810
53193
|
if (table.eventManager.isDraging && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
52811
53194
|
const cellsEvent = {
|
|
52812
53195
|
event: e.nativeEvent,
|
|
@@ -52822,7 +53205,7 @@
|
|
|
52822
53205
|
}
|
|
52823
53206
|
} else stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
52824
53207
|
if (!table.eventManager.isDraging) {
|
|
52825
|
-
const eventArgsSet =
|
|
53208
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52826
53209
|
if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
|
|
52827
53210
|
const {
|
|
52828
53211
|
col: col,
|
|
@@ -52850,7 +53233,7 @@
|
|
|
52850
53233
|
}
|
|
52851
53234
|
}
|
|
52852
53235
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
|
|
52853
|
-
const eventArgsSet =
|
|
53236
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52854
53237
|
eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
|
|
52855
53238
|
col: eventArgsSet.eventArgs.col,
|
|
52856
53239
|
row: eventArgsSet.eventArgs.row,
|
|
@@ -52865,7 +53248,7 @@
|
|
|
52865
53248
|
}
|
|
52866
53249
|
}), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
|
|
52867
53250
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
52868
|
-
const eventArgsSet =
|
|
53251
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52869
53252
|
if (eventArgsSet.eventArgs) {
|
|
52870
53253
|
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
52871
53254
|
const {
|
|
@@ -52912,9 +53295,9 @@
|
|
|
52912
53295
|
}), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
|
|
52913
53296
|
var _a;
|
|
52914
53297
|
if (table.stateManager.columnResize.resizing) return;
|
|
52915
|
-
const eventArgsSet =
|
|
53298
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52916
53299
|
if (!table.stateManager.columnResize.resizing && !table.stateManager.columnMove.moving && (eventManager.dealIconClick(e, eventArgsSet), (null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) && eventManager.touchSetTimeout && "touch" === e.pointerType)) {
|
|
52917
|
-
const eventArgsSet =
|
|
53300
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
52918
53301
|
if (eventManager.touchSetTimeout) {
|
|
52919
53302
|
clearTimeout(eventManager.touchSetTimeout);
|
|
52920
53303
|
const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
@@ -52923,7 +53306,7 @@
|
|
|
52923
53306
|
}
|
|
52924
53307
|
}), table.scenegraph.stage.addEventListener("pointerdown", e => {
|
|
52925
53308
|
var _a, _b, _c, _d;
|
|
52926
|
-
const eventArgsSet =
|
|
53309
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
52927
53310
|
(null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) && (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) === (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) || stateManager.hideMenu();
|
|
52928
53311
|
let isCompleteEdit = !1;
|
|
52929
53312
|
const target = e.target;
|
|
@@ -52955,11 +53338,11 @@
|
|
|
52955
53338
|
}
|
|
52956
53339
|
}), table.scenegraph.stage.addEventListener("pointermove", e => {
|
|
52957
53340
|
var _a, _b, _c;
|
|
52958
|
-
const eventArgsSet =
|
|
53341
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
52959
53342
|
null !== (_c = null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.isDescendantsOf) || void 0 === _b ? void 0 : _b.call(_a, table.scenegraph.tableGroup)) && void 0 !== _c && _c && (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor());
|
|
52960
53343
|
}), table.scenegraph.tableGroup.addEventListener("checkbox_state_change", e => {
|
|
52961
53344
|
var _a, _b;
|
|
52962
|
-
const eventArgsSet =
|
|
53345
|
+
const eventArgsSet = getEventArgsSet(e),
|
|
52963
53346
|
{
|
|
52964
53347
|
col: col,
|
|
52965
53348
|
row: row
|
|
@@ -52994,7 +53377,7 @@
|
|
|
52994
53377
|
table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
|
|
52995
53378
|
}), table.scenegraph.tableGroup.addEventListener("radio_checked", e => {
|
|
52996
53379
|
var _a, _b, _c;
|
|
52997
|
-
const eventArgsSet =
|
|
53380
|
+
const eventArgsSet = getEventArgsSet(e),
|
|
52998
53381
|
{
|
|
52999
53382
|
col: col,
|
|
53000
53383
|
row: row,
|
|
@@ -53045,7 +53428,7 @@
|
|
|
53045
53428
|
table.fireListeners(TABLE_EVENT_TYPE.RADIO_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
|
|
53046
53429
|
}), table.scenegraph.tableGroup.addEventListener("switch_state_change", e => {
|
|
53047
53430
|
var _a, _b;
|
|
53048
|
-
const eventArgsSet =
|
|
53431
|
+
const eventArgsSet = getEventArgsSet(e),
|
|
53049
53432
|
{
|
|
53050
53433
|
col: col,
|
|
53051
53434
|
row: row,
|
|
@@ -53107,7 +53490,7 @@
|
|
|
53107
53490
|
}
|
|
53108
53491
|
function dblclickHandler(e, table) {
|
|
53109
53492
|
var _a, _b, _c, _d, _e, _f;
|
|
53110
|
-
const eventArgsSet =
|
|
53493
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
53111
53494
|
let col = -1,
|
|
53112
53495
|
row = -1;
|
|
53113
53496
|
eventArgsSet.eventArgs && (col = eventArgsSet.eventArgs.col, row = eventArgsSet.eventArgs.row);
|
|
@@ -53137,17 +53520,29 @@
|
|
|
53137
53520
|
}
|
|
53138
53521
|
|
|
53139
53522
|
function bindScrollBarListener(eventManager) {
|
|
53523
|
+
var _a, _b, _c, _d, _e;
|
|
53140
53524
|
const table = eventManager.table,
|
|
53141
53525
|
stateManager = table.stateManager,
|
|
53142
|
-
scenegraph = table.scenegraph
|
|
53526
|
+
scenegraph = table.scenegraph,
|
|
53527
|
+
visible1 = null === (_a = table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.visible,
|
|
53528
|
+
horizontalVisible = null !== (_c = null === (_b = table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.horizontalVisible) && void 0 !== _c ? _c : visible1,
|
|
53529
|
+
verticalVisible = null !== (_e = null === (_d = table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.verticalVisible) && void 0 !== _e ? _e : visible1;
|
|
53143
53530
|
scenegraph.component.vScrollBar.addEventListener("pointerover", e => {
|
|
53144
|
-
stateManager.showVerticalScrollBar();
|
|
53531
|
+
"focus" !== verticalVisible && "scrolling" !== verticalVisible || stateManager.showVerticalScrollBar();
|
|
53145
53532
|
}), scenegraph.component.hScrollBar.addEventListener("pointerover", e => {
|
|
53146
|
-
stateManager.showHorizontalScrollBar();
|
|
53533
|
+
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "body");
|
|
53534
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointerover", e => {
|
|
53535
|
+
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "frozen");
|
|
53536
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerover", e => {
|
|
53537
|
+
"focus" !== horizontalVisible && "scrolling" !== horizontalVisible || stateManager.showHorizontalScrollBar(!1, "rightFrozen");
|
|
53147
53538
|
}), scenegraph.component.vScrollBar.addEventListener("pointerout", e => {
|
|
53148
|
-
stateManager.interactionState !== InteractionState.scrolling && stateManager.hideVerticalScrollBar();
|
|
53539
|
+
stateManager.interactionState !== InteractionState.scrolling && ("focus" === verticalVisible ? stateManager.hideVerticalScrollBar() : "scrolling" === verticalVisible && stateManager.showVerticalScrollBar(!0));
|
|
53149
53540
|
}), scenegraph.component.hScrollBar.addEventListener("pointerout", e => {
|
|
53150
|
-
stateManager.interactionState !== InteractionState.scrolling && stateManager.hideHorizontalScrollBar();
|
|
53541
|
+
stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "body"));
|
|
53542
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointerout", e => {
|
|
53543
|
+
stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "frozen"));
|
|
53544
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerout", e => {
|
|
53545
|
+
stateManager.interactionState !== InteractionState.scrolling && ("focus" === horizontalVisible ? stateManager.hideHorizontalScrollBar() : "scrolling" === horizontalVisible && stateManager.showHorizontalScrollBar(!0, "rightFrozen"));
|
|
53151
53546
|
}), scenegraph.component.vScrollBar.addEventListener("pointermove", e => {
|
|
53152
53547
|
scenegraph.table.stateManager.updateCursor("default"), e.stopPropagation();
|
|
53153
53548
|
}), scenegraph.component.vScrollBar.addEventListener("pointerdown", e => {
|
|
@@ -53170,10 +53565,22 @@
|
|
|
53170
53565
|
scenegraph.table.eventManager.isDraging = !1;
|
|
53171
53566
|
}), scenegraph.component.hScrollBar.addEventListener("pointermove", e => {
|
|
53172
53567
|
scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
|
|
53568
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointermove", e => {
|
|
53569
|
+
scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
|
|
53570
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointermove", e => {
|
|
53571
|
+
scenegraph.table.stateManager.updateCursor(), e.stopPropagation();
|
|
53173
53572
|
}), scenegraph.component.hScrollBar.addEventListener("pointerdown", e => {
|
|
53174
53573
|
e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53175
53574
|
event: e.nativeEvent
|
|
53176
53575
|
});
|
|
53576
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointerdown", e => {
|
|
53577
|
+
e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53578
|
+
event: e.nativeEvent
|
|
53579
|
+
});
|
|
53580
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerdown", e => {
|
|
53581
|
+
e.stopPropagation(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53582
|
+
event: e.nativeEvent
|
|
53583
|
+
});
|
|
53177
53584
|
}), scenegraph.component.hScrollBar.addEventListener("scrollDown", e => {
|
|
53178
53585
|
var _a;
|
|
53179
53586
|
scenegraph.table.eventManager.LastBodyPointerXY = {
|
|
@@ -53182,15 +53589,45 @@
|
|
|
53182
53589
|
}, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53183
53590
|
event: e.nativeEvent
|
|
53184
53591
|
});
|
|
53592
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("scrollDown", e => {
|
|
53593
|
+
var _a;
|
|
53594
|
+
scenegraph.table.eventManager.LastBodyPointerXY = {
|
|
53595
|
+
x: e.x,
|
|
53596
|
+
y: e.y
|
|
53597
|
+
}, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53598
|
+
event: e.nativeEvent
|
|
53599
|
+
});
|
|
53600
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollDown", e => {
|
|
53601
|
+
var _a;
|
|
53602
|
+
scenegraph.table.eventManager.LastBodyPointerXY = {
|
|
53603
|
+
x: e.x,
|
|
53604
|
+
y: e.y
|
|
53605
|
+
}, scenegraph.table.eventManager.isDown = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53606
|
+
event: e.nativeEvent
|
|
53607
|
+
});
|
|
53185
53608
|
}), scenegraph.component.hScrollBar.addEventListener("pointerup", () => {
|
|
53186
53609
|
stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53187
53610
|
}), scenegraph.component.hScrollBar.addEventListener("pointerupoutside", () => {
|
|
53188
53611
|
stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53189
53612
|
}), scenegraph.component.hScrollBar.addEventListener("scrollUp", e => {
|
|
53190
53613
|
scenegraph.table.eventManager.isDraging = !1;
|
|
53614
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointerup", () => {
|
|
53615
|
+
stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53616
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("pointerupoutside", () => {
|
|
53617
|
+
stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53618
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("scrollUp", e => {
|
|
53619
|
+
scenegraph.table.eventManager.isDraging = !1;
|
|
53620
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerup", () => {
|
|
53621
|
+
stateManager.fastScrolling = !1, scenegraph.table.eventManager.isDraging = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53622
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("pointerupoutside", () => {
|
|
53623
|
+
stateManager.fastScrolling = !1, stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
|
|
53624
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollUp", e => {
|
|
53625
|
+
scenegraph.table.eventManager.isDraging = !1;
|
|
53191
53626
|
});
|
|
53192
53627
|
const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
|
|
53193
|
-
throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20)
|
|
53628
|
+
throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20),
|
|
53629
|
+
throttleFrozenHorizontalWheel = throttle(stateManager.updateFrozenHorizontalScrollBar, 20),
|
|
53630
|
+
throttleRightFrozenHorizontalWheel = throttle(stateManager.updateRightFrozenHorizontalScrollBar, 20);
|
|
53194
53631
|
scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
|
|
53195
53632
|
var _a;
|
|
53196
53633
|
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
@@ -53201,6 +53638,16 @@
|
|
|
53201
53638
|
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
53202
53639
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
53203
53640
|
throttleHorizontalWheel(ratio);
|
|
53641
|
+
}), scenegraph.component.frozenHScrollBar.addEventListener("scrollDrag", e => {
|
|
53642
|
+
var _a;
|
|
53643
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
53644
|
+
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
53645
|
+
throttleFrozenHorizontalWheel(ratio);
|
|
53646
|
+
}), scenegraph.component.rightFrozenHScrollBar.addEventListener("scrollDrag", e => {
|
|
53647
|
+
var _a;
|
|
53648
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
53649
|
+
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
53650
|
+
throttleRightFrozenHorizontalWheel(ratio);
|
|
53204
53651
|
});
|
|
53205
53652
|
}
|
|
53206
53653
|
|
|
@@ -53435,18 +53882,20 @@
|
|
|
53435
53882
|
right = !1,
|
|
53436
53883
|
left = !1;
|
|
53437
53884
|
y > drawRange.bottom - bottomFrozenRowHeight && canScrollY && table.scrollTop + table.tableNoFrameHeight < table.getAllRowsHeight() ? (bottom = !0, table.eventManager.scrollYSpeed = -(y - drawRange.bottom + bottomFrozenRowHeight) / 50) : y < drawRange.top + topFrozenRowHeight && canScrollY && table.scrollTop > 0 && (top = !0, table.eventManager.scrollYSpeed = -(y - drawRange.top - topFrozenRowHeight) / 50), x > drawRange.right - rightFrozenColsWidth && canScrollX && table.scrollLeft + table.tableNoFrameWidth < table.getAllColsWidth() ? (right = !0, table.eventManager.scrollXSpeed = -(x - drawRange.right + rightFrozenColsWidth) / 50) : x < drawRange.left + leftFrozenColsWidth && canScrollX && table.scrollLeft > 0 && (left = !0, table.eventManager.scrollXSpeed = -(x - drawRange.left - leftFrozenColsWidth) / 50), table.eventManager.inertiaScroll.startInertia(table.eventManager.scrollXSpeed, table.eventManager.scrollYSpeed, 1), table.eventManager.inertiaScroll.setScrollHandle((dx, dy) => {
|
|
53438
|
-
var _a;
|
|
53885
|
+
var _a, _b, _c;
|
|
53439
53886
|
let selectX, selectY;
|
|
53440
53887
|
handleWhell({
|
|
53441
53888
|
deltaX: -dx,
|
|
53442
53889
|
deltaY: -dy
|
|
53443
|
-
}, table.stateManager, !1)
|
|
53890
|
+
}, table.stateManager, !1);
|
|
53891
|
+
const frozenOffset = null !== (_b = null === (_a = table.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : 0;
|
|
53892
|
+
bottom ? selectY = table.scrollTop + drawRange.height - bottomFrozenRowHeight - 20 : top && (selectY = table.scrollTop + topFrozenRowHeight + 20), right ? selectX = table.scrollLeft + frozenOffset + drawRange.width - rightFrozenColsWidth - 20 : left && (selectX = table.scrollLeft + frozenOffset + leftFrozenColsWidth + 20);
|
|
53444
53893
|
let considerFrozenY = !1,
|
|
53445
53894
|
considerFrozenX = !1;
|
|
53446
|
-
right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
53895
|
+
right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + frozenOffset + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
53447
53896
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
|
|
53448
53897
|
targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
53449
|
-
!(null === (
|
|
53898
|
+
!(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow) && table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
|
|
53450
53899
|
});
|
|
53451
53900
|
} else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
|
|
53452
53901
|
}
|
|
@@ -56072,18 +56521,24 @@
|
|
|
56072
56521
|
})(candRow, bottom);
|
|
56073
56522
|
}
|
|
56074
56523
|
function getTargetColAtConsiderRightFrozen(absoluteX, isConsider, _this) {
|
|
56524
|
+
var _a, _b;
|
|
56075
56525
|
if (0 === absoluteX) return {
|
|
56076
56526
|
left: 0,
|
|
56077
56527
|
col: 0,
|
|
56078
56528
|
right: 0,
|
|
56079
56529
|
width: 0
|
|
56080
56530
|
};
|
|
56081
|
-
|
|
56082
|
-
|
|
56083
|
-
|
|
56084
|
-
|
|
56085
|
-
|
|
56086
|
-
|
|
56531
|
+
absoluteX -= _this.tableX;
|
|
56532
|
+
const rightFrozenScrollLeft = null !== (_b = null === (_a = _this.getRightFrozenColsScrollLeft) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0;
|
|
56533
|
+
if (isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) {
|
|
56534
|
+
absoluteX -= rightFrozenScrollLeft;
|
|
56535
|
+
for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
|
|
56536
|
+
col: _this.colCount - i - 1,
|
|
56537
|
+
left: void 0,
|
|
56538
|
+
right: void 0,
|
|
56539
|
+
width: void 0
|
|
56540
|
+
};
|
|
56541
|
+
}
|
|
56087
56542
|
return getTargetColAt(absoluteX, _this);
|
|
56088
56543
|
}
|
|
56089
56544
|
function getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider, _this) {
|
|
@@ -56121,16 +56576,20 @@
|
|
|
56121
56576
|
return Math.min(Math.ceil(absoluteX / _this.internalProps.defaultColWidth), _this.colCount - 1);
|
|
56122
56577
|
}
|
|
56123
56578
|
function getCellAtRelativePosition(x, y, _this) {
|
|
56124
|
-
|
|
56579
|
+
var _a, _b, _c, _d;
|
|
56580
|
+
x -= _this.tableX, y -= _this.tableY;
|
|
56581
|
+
const frozenColsWidth = _this.getFrozenColsWidth(),
|
|
56582
|
+
frozenColsOffset = null !== (_b = null === (_a = _this.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0,
|
|
56583
|
+
frozenColsScrollLeft = null !== (_d = null === (_c = _this.getFrozenColsScrollLeft) || void 0 === _c ? void 0 : _c.call(_this)) && void 0 !== _d ? _d : 0;
|
|
56125
56584
|
let topFrozen = !1;
|
|
56126
|
-
|
|
56585
|
+
y > 0 && y < _this.getFrozenRowsHeight() && (topFrozen = !0);
|
|
56127
56586
|
let leftFrozen = !1;
|
|
56128
|
-
x > 0 && x <
|
|
56587
|
+
x > 0 && x < frozenColsWidth && (leftFrozen = !0);
|
|
56129
56588
|
let bottomFrozen = !1;
|
|
56130
56589
|
y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight && y <= _this.getAllRowsHeight() && (bottomFrozen = !0);
|
|
56131
56590
|
let rightFrozen = !1;
|
|
56132
56591
|
x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
|
|
56133
|
-
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen
|
|
56592
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this),
|
|
56134
56593
|
rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
|
|
56135
56594
|
if (colInfo && rowInfo) {
|
|
56136
56595
|
const {
|
|
@@ -56164,11 +56623,16 @@
|
|
|
56164
56623
|
};
|
|
56165
56624
|
}
|
|
56166
56625
|
function getColAtRelativePosition(x, _this) {
|
|
56626
|
+
var _a, _b, _c, _d;
|
|
56627
|
+
x -= _this.tableX;
|
|
56628
|
+
const frozenColsWidth = _this.getFrozenColsWidth(),
|
|
56629
|
+
frozenColsOffset = null !== (_b = null === (_a = _this.getFrozenColsOffset) || void 0 === _a ? void 0 : _a.call(_this)) && void 0 !== _b ? _b : 0,
|
|
56630
|
+
frozenColsScrollLeft = null !== (_d = null === (_c = _this.getFrozenColsScrollLeft) || void 0 === _c ? void 0 : _c.call(_this)) && void 0 !== _d ? _d : 0;
|
|
56167
56631
|
let leftFrozen = !1;
|
|
56168
|
-
|
|
56632
|
+
x > 0 && x < frozenColsWidth && (leftFrozen = !0);
|
|
56169
56633
|
let rightFrozen = !1;
|
|
56170
56634
|
x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
|
|
56171
|
-
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen
|
|
56635
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this);
|
|
56172
56636
|
if (colInfo) {
|
|
56173
56637
|
const {
|
|
56174
56638
|
col: col
|
|
@@ -56553,7 +57017,17 @@
|
|
|
56553
57017
|
}
|
|
56554
57018
|
constructor(container, options = {}) {
|
|
56555
57019
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
56556
|
-
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.
|
|
57020
|
+
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
|
|
57021
|
+
const g = window;
|
|
57022
|
+
g[this.id] = this;
|
|
57023
|
+
const registry = g.__vtable__ || (g.__vtable__ = {
|
|
57024
|
+
byId: Object.create(null),
|
|
57025
|
+
list: [],
|
|
57026
|
+
last: null
|
|
57027
|
+
});
|
|
57028
|
+
registry.byId[this.id] = this, registry.list.push(this), registry.last = this, g.__vtable_last_id__ = this.id;
|
|
57029
|
+
}
|
|
57030
|
+
if ("node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
56557
57031
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
56558
57032
|
options: options,
|
|
56559
57033
|
container: container
|
|
@@ -56630,7 +57104,7 @@
|
|
|
56630
57104
|
bottom: 0
|
|
56631
57105
|
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), (isValid$1(canvasHeight) || isValid$1(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.contentOffsetX = null != translateX ? translateX : 0, this.contentOffsetY = null != translateY ? translateY : 0, this.canvasWidth = isNumber$2(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$2(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
56632
57106
|
const internalProps = this.internalProps = {};
|
|
56633
|
-
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$2(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
57107
|
+
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d"), internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id, internalProps.element && (internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id)) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id, internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id, (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$2(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
56634
57108
|
const that = this;
|
|
56635
57109
|
if (internalProps.calcWidthContext = {
|
|
56636
57110
|
_: internalProps,
|
|
@@ -56754,7 +57228,7 @@
|
|
|
56754
57228
|
set frozenColCount(frozenColCount) {
|
|
56755
57229
|
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount, this.options.frozenColCount = frozenColCount;
|
|
56756
57230
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
56757
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
|
|
57231
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
|
|
56758
57232
|
const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
|
|
56759
57233
|
this.internalProps.frozenColCount = computedFrozenColCount;
|
|
56760
57234
|
}
|
|
@@ -56763,7 +57237,7 @@
|
|
|
56763
57237
|
setFrozenColCount(frozenColCount) {
|
|
56764
57238
|
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount, this.options.frozenColCount = frozenColCount;
|
|
56765
57239
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
56766
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
|
|
57240
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0;else {
|
|
56767
57241
|
const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
|
|
56768
57242
|
this.internalProps.frozenColCount = computedFrozenColCount;
|
|
56769
57243
|
}
|
|
@@ -56917,6 +57391,11 @@
|
|
|
56917
57391
|
const maxFrozenWidth = null !== (_a = this.options.maxFrozenWidth) && void 0 !== _a ? _a : "80%";
|
|
56918
57392
|
return _toPxWidth(this, maxFrozenWidth);
|
|
56919
57393
|
}
|
|
57394
|
+
_getMaxRightFrozenWidth() {
|
|
57395
|
+
var _a, _b;
|
|
57396
|
+
const maxRightFrozenWidth = null !== (_b = null !== (_a = this.options.maxRightFrozenWidth) && void 0 !== _a ? _a : this.options.maxFrozenWidth) && void 0 !== _b ? _b : "80%";
|
|
57397
|
+
return _toPxWidth(this, maxRightFrozenWidth);
|
|
57398
|
+
}
|
|
56920
57399
|
_getComputedFrozenColCount(frozenColCount) {
|
|
56921
57400
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
56922
57401
|
let computedfrozenColCount = frozenColCount;
|
|
@@ -57235,21 +57714,26 @@
|
|
|
57235
57714
|
let relativeX = !0,
|
|
57236
57715
|
relativeY = !0;
|
|
57237
57716
|
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
57238
|
-
const cellRect = this.getCellRect(col, row)
|
|
57239
|
-
|
|
57717
|
+
const cellRect = this.getCellRect(col, row),
|
|
57718
|
+
rect = this._toRelativeRect(cellRect, relativeX, relativeY);
|
|
57719
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(col, row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
|
|
57240
57720
|
}
|
|
57241
57721
|
getCellRangeRelativeRect(range) {
|
|
57242
57722
|
if (range.start) {
|
|
57243
57723
|
const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
|
|
57244
57724
|
let relativeX = !0,
|
|
57245
57725
|
relativeY = !0;
|
|
57246
|
-
|
|
57726
|
+
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
57727
|
+
const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
|
|
57728
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.start.col, range.start.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
|
|
57247
57729
|
}
|
|
57248
57730
|
const cellRange = this.getCellRange(range.col, range.row),
|
|
57249
57731
|
isFrozenCell = this.isFrozenCell(range.col, range.row);
|
|
57250
57732
|
let relativeX = !0,
|
|
57251
57733
|
relativeY = !0;
|
|
57252
|
-
|
|
57734
|
+
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1, relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
57735
|
+
const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
|
|
57736
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.col, range.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()), rect;
|
|
57253
57737
|
}
|
|
57254
57738
|
getVisibleCellRangeRelativeRect(range) {
|
|
57255
57739
|
let cellRange;
|
|
@@ -57359,7 +57843,7 @@
|
|
|
57359
57843
|
} = this,
|
|
57360
57844
|
width = this.tableNoFrameWidth,
|
|
57361
57845
|
height = this.tableNoFrameHeight;
|
|
57362
|
-
return new Rect(scrollLeft, scrollTop, width, height);
|
|
57846
|
+
return new Rect(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
|
|
57363
57847
|
}
|
|
57364
57848
|
get visibleRowCount() {
|
|
57365
57849
|
const {
|
|
@@ -57388,7 +57872,8 @@
|
|
|
57388
57872
|
scrollLeft: scrollLeft
|
|
57389
57873
|
} = this,
|
|
57390
57874
|
frozenRowsHeight = this.getFrozenRowsHeight(),
|
|
57391
|
-
|
|
57875
|
+
frozenColsContentWidth = this.getFrozenColsContentWidth(),
|
|
57876
|
+
frozenColsOffset = this.getFrozenColsOffset(),
|
|
57392
57877
|
bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
|
|
57393
57878
|
rightFrozenColsWidth = this.getRightFrozenColsWidth(),
|
|
57394
57879
|
{
|
|
@@ -57396,9 +57881,9 @@
|
|
|
57396
57881
|
} = this.getRowAt(scrollTop + frozenRowsHeight + 1),
|
|
57397
57882
|
{
|
|
57398
57883
|
col: colStart
|
|
57399
|
-
} = this.getColAt(scrollLeft +
|
|
57884
|
+
} = this.getColAt(scrollLeft + frozenColsContentWidth + 1),
|
|
57400
57885
|
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1,
|
|
57401
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
|
|
57886
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
|
|
57402
57887
|
return colEnd < 0 || rowEnd < 0 ? null : {
|
|
57403
57888
|
rowStart: rowStart,
|
|
57404
57889
|
colStart: colStart,
|
|
@@ -57425,12 +57910,13 @@
|
|
|
57425
57910
|
const {
|
|
57426
57911
|
scrollLeft: scrollLeft
|
|
57427
57912
|
} = this,
|
|
57428
|
-
|
|
57913
|
+
frozenColsContentWidth = this.getFrozenColsContentWidth(),
|
|
57914
|
+
frozenColsOffset = this.getFrozenColsOffset(),
|
|
57429
57915
|
rightFrozenColsWidth = this.getRightFrozenColsWidth(),
|
|
57430
57916
|
{
|
|
57431
57917
|
col: colStart
|
|
57432
|
-
} = this.getColAt(scrollLeft +
|
|
57433
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
|
|
57918
|
+
} = this.getColAt(scrollLeft + frozenColsContentWidth + 1 + start_deltaX),
|
|
57919
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
|
|
57434
57920
|
return colEnd < 0 ? null : {
|
|
57435
57921
|
colStart: colStart,
|
|
57436
57922
|
colEnd: colEnd
|
|
@@ -57441,7 +57927,7 @@
|
|
|
57441
57927
|
frozenColCount: frozenColCount
|
|
57442
57928
|
} = this,
|
|
57443
57929
|
visibleRect = this.getVisibleRect(),
|
|
57444
|
-
visibleLeft = frozenColCount > 0 ? visibleRect.left + this.
|
|
57930
|
+
visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left,
|
|
57445
57931
|
initCol = this.getTargetColAt(visibleLeft);
|
|
57446
57932
|
if (!initCol) return 0;
|
|
57447
57933
|
const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
|
|
@@ -57495,18 +57981,30 @@
|
|
|
57495
57981
|
this._scrollToRowCorrectTimer && (clearTimeout(this._scrollToRowCorrectTimer), this._scrollToRowCorrectTimer = null);
|
|
57496
57982
|
}
|
|
57497
57983
|
release() {
|
|
57498
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
57499
|
-
|
|
57500
|
-
|
|
57984
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
57985
|
+
if ("undefined" != typeof window) {
|
|
57986
|
+
const g = window;
|
|
57987
|
+
(null == g ? void 0 : g[this.id]) === this ? delete g[this.id] : (null == g ? void 0 : g[this.id]) && (g[this.id] = null);
|
|
57988
|
+
const registry = null == g ? void 0 : g.__vtable__;
|
|
57989
|
+
(null === (_a = null == registry ? void 0 : registry.byId) || void 0 === _a ? void 0 : _a[this.id]) === this && delete registry.byId[this.id];
|
|
57990
|
+
const list = null == registry ? void 0 : registry.list;
|
|
57991
|
+
if (Array.isArray(list) && list.length) for (let i = list.length - 1; i >= 0; i--) list[i] === this && list.splice(i, 1);
|
|
57992
|
+
(null == registry ? void 0 : registry.last) === this && (registry.last = Array.isArray(list) && list.length ? list[list.length - 1] : null), (null == g ? void 0 : g.__vtable_last_id__) === this.id && (g.__vtable_last_id__ = null !== (_c = null === (_b = null == registry ? void 0 : registry.last) || void 0 === _b ? void 0 : _b.id) && void 0 !== _c ? _c : null);
|
|
57993
|
+
}
|
|
57501
57994
|
if (this.isReleased) return;
|
|
57502
|
-
|
|
57995
|
+
null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.vScrollBar) || void 0 === _f || _f.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.component) || void 0 === _h ? void 0 : _h.hScrollBar) || void 0 === _j || _j.release(), this.animationManager.clear(), this.animationManager.ticker.release(), null === (_m = null === (_l = null === (_k = this.scenegraph) || void 0 === _k ? void 0 : _k.stage) || void 0 === _l ? void 0 : _l.ticker) || void 0 === _m || _m.release();
|
|
57996
|
+
const internalProps = this.internalProps,
|
|
57997
|
+
canvas = null == internalProps ? void 0 : internalProps.canvas;
|
|
57998
|
+
(null == canvas ? void 0 : canvas.__vtable__) === this && (delete canvas.__vtable__, delete canvas.__vtable_id__);
|
|
57999
|
+
const element = null == internalProps ? void 0 : internalProps.element;
|
|
58000
|
+
(null == element ? void 0 : element.__vtable__) === this && (delete element.__vtable__, delete element.__vtable_id__), this.clearCorrectTimer(), null === (_p = null === (_o = internalProps.tooltipHandler) || void 0 === _o ? void 0 : _o.release) || void 0 === _p || _p.call(_o), null === (_r = null === (_q = internalProps.menuHandler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q), null === (_s = super.release) || void 0 === _s || _s.call(this), this.pluginManager.release(), null === (_u = null === (_t = internalProps.handler) || void 0 === _t ? void 0 : _t.release) || void 0 === _u || _u.call(_t), this.eventManager.release(), null === (_w = null === (_v = internalProps.focusControl) || void 0 === _v ? void 0 : _v.release) || void 0 === _w || _w.call(_v), null === (_x = internalProps.legends) || void 0 === _x || _x.forEach(legend => {
|
|
57503
58001
|
null == legend || legend.release();
|
|
57504
|
-
}), null === (
|
|
58002
|
+
}), null === (_y = internalProps.title) || void 0 === _y || _y.release(), internalProps.title = null, null === (_z = internalProps.emptyTip) || void 0 === _z || _z.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
57505
58003
|
var _a;
|
|
57506
58004
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
57507
58005
|
}), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
|
|
57508
|
-
const parentElement = null === (
|
|
57509
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (
|
|
58006
|
+
const parentElement = null === (_0 = internalProps.element) || void 0 === _0 ? void 0 : _0.parentElement;
|
|
58007
|
+
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_3 = null === (_2 = null === (_1 = this.editorManager) || void 0 === _1 ? void 0 : _1.editingEditor) || void 0 === _2 ? void 0 : _2.onEnd) || void 0 === _3 || _3.call(_2), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_4 = this.reactCustomLayout) || void 0 === _4 || _4.clearCache(), clearChartRenderQueue();
|
|
57510
58008
|
}
|
|
57511
58009
|
fireListeners(type, event) {
|
|
57512
58010
|
return super.fireListeners(type, event);
|
|
@@ -57626,8 +58124,23 @@
|
|
|
57626
58124
|
return this.getRowsHeight(0, this.frozenRowCount - 1);
|
|
57627
58125
|
}
|
|
57628
58126
|
getFrozenColsWidth() {
|
|
58127
|
+
const contentWidth = this.getFrozenColsContentWidth();
|
|
58128
|
+
if (!this.options.scrollFrozenCols) return contentWidth;
|
|
58129
|
+
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
58130
|
+
return Math.min(contentWidth, maxFrozenWidth);
|
|
58131
|
+
}
|
|
58132
|
+
getFrozenColsContentWidth() {
|
|
57629
58133
|
return this.getColsWidth(0, this.frozenColCount - 1);
|
|
57630
58134
|
}
|
|
58135
|
+
getFrozenColsOffset() {
|
|
58136
|
+
const contentWidth = this.getFrozenColsContentWidth(),
|
|
58137
|
+
viewportWidth = this.getFrozenColsWidth();
|
|
58138
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
58139
|
+
}
|
|
58140
|
+
getFrozenColsScrollLeft() {
|
|
58141
|
+
var _a;
|
|
58142
|
+
return null !== (_a = this.stateManager.scroll.frozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
|
|
58143
|
+
}
|
|
57631
58144
|
getBottomFrozenRowsHeight() {
|
|
57632
58145
|
if (this.bottomFrozenRowCount > 0) {
|
|
57633
58146
|
let height = 0;
|
|
@@ -57637,6 +58150,12 @@
|
|
|
57637
58150
|
return 0;
|
|
57638
58151
|
}
|
|
57639
58152
|
getRightFrozenColsWidth() {
|
|
58153
|
+
const contentWidth = this.getRightFrozenColsContentWidth();
|
|
58154
|
+
if (!this.options.scrollRightFrozenCols) return contentWidth;
|
|
58155
|
+
const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
|
|
58156
|
+
return Math.min(contentWidth, maxRightFrozenWidth);
|
|
58157
|
+
}
|
|
58158
|
+
getRightFrozenColsContentWidth() {
|
|
57640
58159
|
if (this.rightFrozenColCount > 0) {
|
|
57641
58160
|
let width = 0;
|
|
57642
58161
|
for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) width += this.getColWidth(col);
|
|
@@ -57644,6 +58163,15 @@
|
|
|
57644
58163
|
}
|
|
57645
58164
|
return 0;
|
|
57646
58165
|
}
|
|
58166
|
+
getRightFrozenColsOffset() {
|
|
58167
|
+
const contentWidth = this.getRightFrozenColsContentWidth(),
|
|
58168
|
+
viewportWidth = this.getRightFrozenColsWidth();
|
|
58169
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
58170
|
+
}
|
|
58171
|
+
getRightFrozenColsScrollLeft() {
|
|
58172
|
+
var _a;
|
|
58173
|
+
return null !== (_a = this.stateManager.scroll.rightFrozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
|
|
58174
|
+
}
|
|
57647
58175
|
getDrawRange() {
|
|
57648
58176
|
var _a, _b;
|
|
57649
58177
|
const width = (null === (_a = this.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.tableNoFrameWidth : Math.min(this.tableNoFrameWidth, this.getAllColsWidth()),
|