@visactor/vtable 1.6.2-alpha.3 → 1.7.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/core/BaseTable.d.ts +2 -0
- package/cjs/core/BaseTable.js +8 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.d.ts +1 -1
- package/cjs/core/tableHelper.js +5 -4
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +1 -0
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/event/listener/table-group.js +6 -4
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +18 -14
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +3 -6
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -2
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -8
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/utils/cell-border-stroke-width.js +9 -14
- package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
- package/cjs/state/state.d.ts +2 -2
- package/cjs/state/state.js +4 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +6 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/style.d.ts +2 -1
- package/cjs/tools/style.js +9 -3
- package/cjs/tools/style.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -7
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +46 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.d.ts +1 -1
- package/cjs/vrender.js +4 -13
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +117 -60
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.d.ts +2 -0
- package/es/core/BaseTable.js +9 -6
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.d.ts +1 -1
- package/es/core/tableHelper.js +5 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +1 -0
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/event/listener/table-group.js +6 -4
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/component/table-component.js +18 -14
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +3 -6
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -2
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -8
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/utils/cell-border-stroke-width.js +6 -9
- package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
- package/es/state/state.d.ts +2 -2
- package/es/state/state.js +4 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +6 -0
- package/es/themes/theme.js.map +1 -1
- package/es/tools/style.d.ts +2 -1
- package/es/tools/style.js +7 -2
- package/es/tools/style.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -7
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +46 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.d.ts +1 -1
- package/es/vrender.js +0 -2
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
package/dist/vtable.js
CHANGED
|
@@ -44102,6 +44102,18 @@
|
|
|
44102
44102
|
|
|
44103
44103
|
overflow: hidden; // for react-vtable dom custom element
|
|
44104
44104
|
}
|
|
44105
|
+
|
|
44106
|
+
.vtable-gantt {
|
|
44107
|
+
/* 设置overflow: auto 应该是为了滚动条的某个问题 但设置了auto之后 dom的下拉菜单只能显示在vtable节点中 超出会截断;现在去掉auto 暂时滚动条的问题没有发现 */
|
|
44108
|
+
/* overflow: auto; */
|
|
44109
|
+
position: absolute;
|
|
44110
|
+
width: 100%;
|
|
44111
|
+
height: 100%;
|
|
44112
|
+
text-align: left;
|
|
44113
|
+
-webkit-font-smoothing:auto;
|
|
44114
|
+
|
|
44115
|
+
overflow: hidden; // for react-vtable dom custom element
|
|
44116
|
+
}
|
|
44105
44117
|
.vtable .table-component-container {
|
|
44106
44118
|
pointer-events: none;
|
|
44107
44119
|
overflow: hidden;
|
|
@@ -44139,8 +44151,18 @@
|
|
|
44139
44151
|
document.head.appendChild(styleElement);
|
|
44140
44152
|
}
|
|
44141
44153
|
|
|
44142
|
-
function
|
|
44143
|
-
if (scrollStyle?.hoverOn ||
|
|
44154
|
+
function getHorizontalScrollBarSize(scrollStyle) {
|
|
44155
|
+
if (scrollStyle?.hoverOn ||
|
|
44156
|
+
(scrollStyle?.horizontalVisible && scrollStyle?.horizontalVisible === 'none') ||
|
|
44157
|
+
(!scrollStyle?.horizontalVisible && scrollStyle?.visible === 'none')) {
|
|
44158
|
+
return 0;
|
|
44159
|
+
}
|
|
44160
|
+
return scrollStyle?.width ?? 7;
|
|
44161
|
+
}
|
|
44162
|
+
function getVerticalScrollBarSize(scrollStyle) {
|
|
44163
|
+
if (scrollStyle?.hoverOn ||
|
|
44164
|
+
(scrollStyle?.verticalVisible && scrollStyle?.verticalVisible === 'none') ||
|
|
44165
|
+
(!scrollStyle?.verticalVisible && scrollStyle?.visible === 'none')) {
|
|
44144
44166
|
return 0;
|
|
44145
44167
|
}
|
|
44146
44168
|
return scrollStyle?.width ?? 7;
|
|
@@ -46012,6 +46034,12 @@
|
|
|
46012
46034
|
get visible() {
|
|
46013
46035
|
return scroll.visible ?? 'scrolling';
|
|
46014
46036
|
},
|
|
46037
|
+
get verticalVisible() {
|
|
46038
|
+
return scroll.verticalVisible;
|
|
46039
|
+
},
|
|
46040
|
+
get horizontalVisible() {
|
|
46041
|
+
return scroll.horizontalVisible;
|
|
46042
|
+
},
|
|
46015
46043
|
get width() {
|
|
46016
46044
|
return scroll.width ?? 7;
|
|
46017
46045
|
},
|
|
@@ -48802,10 +48830,10 @@
|
|
|
48802
48830
|
return couldBeValidNumber(v.substring(0, v.length - 1));
|
|
48803
48831
|
}
|
|
48804
48832
|
|
|
48805
|
-
function createRootElement(padding) {
|
|
48833
|
+
function createRootElement(padding, className = 'vtable') {
|
|
48806
48834
|
const element = document.createElement('div');
|
|
48807
48835
|
element.setAttribute('tabindex', '0');
|
|
48808
|
-
element.classList.add(
|
|
48836
|
+
element.classList.add(className);
|
|
48809
48837
|
element.style.outline = 'none';
|
|
48810
48838
|
element.style.margin = `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px`;
|
|
48811
48839
|
const width = (element.offsetWidth || element.parentElement?.offsetWidth || 1) - 1;
|
|
@@ -49021,7 +49049,13 @@
|
|
|
49021
49049
|
underlineDash,
|
|
49022
49050
|
underlineOffset,
|
|
49023
49051
|
lineThrough: lineThrough ? textDecorationWidth : undefined,
|
|
49024
|
-
ellipsis:
|
|
49052
|
+
ellipsis: textOverflow === 'clip'
|
|
49053
|
+
? ''
|
|
49054
|
+
: textOverflow === 'ellipsis'
|
|
49055
|
+
? '...'
|
|
49056
|
+
: isValid$3(textOverflow)
|
|
49057
|
+
? textOverflow
|
|
49058
|
+
: undefined
|
|
49025
49059
|
},
|
|
49026
49060
|
group: {
|
|
49027
49061
|
fill: bgColor,
|
|
@@ -50458,12 +50492,11 @@
|
|
|
50458
50492
|
}
|
|
50459
50493
|
|
|
50460
50494
|
function getCellBorderStrokeWidth(col, row, cellTheme, table) {
|
|
50461
|
-
const frameBorderLineWidths = style.toBoxArray(table.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
50462
50495
|
let strokeArrayWidth = cellTheme?.group?.strokeArrayWidth ?? undefined;
|
|
50463
50496
|
if (table.theme.cellInnerBorder) {
|
|
50464
50497
|
return strokeArrayWidth;
|
|
50465
50498
|
}
|
|
50466
|
-
if (col === 0
|
|
50499
|
+
if (col === 0) {
|
|
50467
50500
|
strokeArrayWidth = strokeArrayWidth ?? [
|
|
50468
50501
|
cellTheme?.group?.lineWidth,
|
|
50469
50502
|
cellTheme?.group?.lineWidth,
|
|
@@ -50472,7 +50505,7 @@
|
|
|
50472
50505
|
];
|
|
50473
50506
|
strokeArrayWidth[3] = 0;
|
|
50474
50507
|
}
|
|
50475
|
-
if (col === table.colCount - 1
|
|
50508
|
+
if (col === table.colCount - 1) {
|
|
50476
50509
|
strokeArrayWidth = strokeArrayWidth ?? [
|
|
50477
50510
|
cellTheme?.group?.lineWidth,
|
|
50478
50511
|
cellTheme?.group?.lineWidth,
|
|
@@ -50481,7 +50514,7 @@
|
|
|
50481
50514
|
];
|
|
50482
50515
|
strokeArrayWidth[1] = 0;
|
|
50483
50516
|
}
|
|
50484
|
-
if (row === 0
|
|
50517
|
+
if (row === 0) {
|
|
50485
50518
|
strokeArrayWidth = strokeArrayWidth ?? [
|
|
50486
50519
|
cellTheme?.group?.lineWidth,
|
|
50487
50520
|
cellTheme?.group?.lineWidth,
|
|
@@ -50490,7 +50523,7 @@
|
|
|
50490
50523
|
];
|
|
50491
50524
|
strokeArrayWidth[0] = 0;
|
|
50492
50525
|
}
|
|
50493
|
-
if (row === table.rowCount - 1
|
|
50526
|
+
if (row === table.rowCount - 1) {
|
|
50494
50527
|
strokeArrayWidth = strokeArrayWidth ?? [
|
|
50495
50528
|
cellTheme?.group?.lineWidth,
|
|
50496
50529
|
cellTheme?.group?.lineWidth,
|
|
@@ -54390,7 +54423,9 @@
|
|
|
54390
54423
|
const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;
|
|
54391
54424
|
const theme = this.table.theme;
|
|
54392
54425
|
const width = theme.scrollStyle?.width;
|
|
54393
|
-
const
|
|
54426
|
+
const visible1 = theme.scrollStyle?.visible;
|
|
54427
|
+
const horizontalVisible = theme.scrollStyle?.horizontalVisible ?? visible1;
|
|
54428
|
+
const verticalVisible = theme.scrollStyle?.verticalVisible ?? visible1;
|
|
54394
54429
|
const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);
|
|
54395
54430
|
const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);
|
|
54396
54431
|
const totalHeight = this.table.getAllRowsHeight();
|
|
@@ -54419,14 +54454,14 @@
|
|
|
54419
54454
|
y: attrY,
|
|
54420
54455
|
width: tableWidth - frozenColsWidth - rightFrozenColsWidth,
|
|
54421
54456
|
range: [0, rangeEnd],
|
|
54422
|
-
visible:
|
|
54457
|
+
visible: horizontalVisible === 'always'
|
|
54423
54458
|
});
|
|
54424
54459
|
const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;
|
|
54425
54460
|
this.hScrollBar._viewPosition = {
|
|
54426
54461
|
x: bounds.x1,
|
|
54427
54462
|
y: bounds.y1
|
|
54428
54463
|
};
|
|
54429
|
-
if (
|
|
54464
|
+
if (horizontalVisible === 'always') {
|
|
54430
54465
|
this.hScrollBar.showAll();
|
|
54431
54466
|
}
|
|
54432
54467
|
}
|
|
@@ -54457,14 +54492,14 @@
|
|
|
54457
54492
|
y: frozenRowsHeight + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.y : 0),
|
|
54458
54493
|
height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,
|
|
54459
54494
|
range: [0, rangeEnd],
|
|
54460
|
-
visible:
|
|
54495
|
+
visible: verticalVisible === 'always'
|
|
54461
54496
|
});
|
|
54462
54497
|
const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;
|
|
54463
54498
|
this.vScrollBar._viewPosition = {
|
|
54464
54499
|
x: bounds.x1,
|
|
54465
54500
|
y: bounds.y1
|
|
54466
54501
|
};
|
|
54467
|
-
if (
|
|
54502
|
+
if (verticalVisible === 'always') {
|
|
54468
54503
|
this.vScrollBar.showAll();
|
|
54469
54504
|
}
|
|
54470
54505
|
}
|
|
@@ -54627,8 +54662,9 @@
|
|
|
54627
54662
|
}
|
|
54628
54663
|
}
|
|
54629
54664
|
hideVerticalScrollBar() {
|
|
54630
|
-
const
|
|
54631
|
-
|
|
54665
|
+
const visible1 = this.table.theme.scrollStyle.visible;
|
|
54666
|
+
const verticalVisible = this.table.theme.scrollStyle.verticalVisible ?? visible1;
|
|
54667
|
+
if (verticalVisible !== 'focus' && verticalVisible !== 'scrolling') {
|
|
54632
54668
|
return;
|
|
54633
54669
|
}
|
|
54634
54670
|
this.vScrollBar.setAttribute('visible', false);
|
|
@@ -54636,8 +54672,9 @@
|
|
|
54636
54672
|
this.table.scenegraph.updateNextFrame();
|
|
54637
54673
|
}
|
|
54638
54674
|
showVerticalScrollBar() {
|
|
54639
|
-
const
|
|
54640
|
-
|
|
54675
|
+
const visible1 = this.table.theme.scrollStyle.visible;
|
|
54676
|
+
const verticalVisible = this.table.theme.scrollStyle.verticalVisible ?? visible1;
|
|
54677
|
+
if (verticalVisible !== 'focus' && verticalVisible !== 'scrolling') {
|
|
54641
54678
|
return;
|
|
54642
54679
|
}
|
|
54643
54680
|
this.vScrollBar.setAttribute('visible', true);
|
|
@@ -54645,8 +54682,9 @@
|
|
|
54645
54682
|
this.table.scenegraph.updateNextFrame();
|
|
54646
54683
|
}
|
|
54647
54684
|
hideHorizontalScrollBar() {
|
|
54648
|
-
const
|
|
54649
|
-
|
|
54685
|
+
const visible1 = this.table.theme.scrollStyle.visible;
|
|
54686
|
+
const horizontalVisible = this.table.theme.scrollStyle.horizontalVisible ?? visible1;
|
|
54687
|
+
if (horizontalVisible !== 'focus' && horizontalVisible !== 'scrolling') {
|
|
54650
54688
|
return;
|
|
54651
54689
|
}
|
|
54652
54690
|
this.hScrollBar.setAttribute('visible', false);
|
|
@@ -54654,8 +54692,9 @@
|
|
|
54654
54692
|
this.table.scenegraph.updateNextFrame();
|
|
54655
54693
|
}
|
|
54656
54694
|
showHorizontalScrollBar() {
|
|
54657
|
-
const
|
|
54658
|
-
|
|
54695
|
+
const visible1 = this.table.theme.scrollStyle.visible;
|
|
54696
|
+
const horizontalVisible = this.table.theme.scrollStyle.horizontalVisible ?? visible1;
|
|
54697
|
+
if (horizontalVisible !== 'focus' && horizontalVisible !== 'scrolling') {
|
|
54659
54698
|
return;
|
|
54660
54699
|
}
|
|
54661
54700
|
this.hScrollBar.setAttribute('visible', true);
|
|
@@ -57864,8 +57903,8 @@
|
|
|
57864
57903
|
return;
|
|
57865
57904
|
}
|
|
57866
57905
|
const screenTopRow = proxy.screenTopRow;
|
|
57867
|
-
const topRow = Math.max(proxy.bodyTopRow, screenTopRow -
|
|
57868
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow +
|
|
57906
|
+
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
57907
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
57869
57908
|
for (let row = topRow; row <= bottomRow; row++) {
|
|
57870
57909
|
const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, true);
|
|
57871
57910
|
proxy.updateCellGroupContent(cellGroup);
|
|
@@ -58079,8 +58118,8 @@
|
|
|
58079
58118
|
syncBottomRow = distEndRow;
|
|
58080
58119
|
}
|
|
58081
58120
|
else {
|
|
58082
|
-
const topRow = Math.max(proxy.bodyTopRow, screenTopRow -
|
|
58083
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow +
|
|
58121
|
+
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
58122
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
58084
58123
|
syncTopRow = topRow;
|
|
58085
58124
|
syncBottomRow = bottomRow;
|
|
58086
58125
|
}
|
|
@@ -58118,8 +58157,8 @@
|
|
|
58118
58157
|
syncBottomRow = distEndRow;
|
|
58119
58158
|
}
|
|
58120
58159
|
else {
|
|
58121
|
-
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow -
|
|
58122
|
-
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow +
|
|
58160
|
+
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
58161
|
+
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);
|
|
58123
58162
|
}
|
|
58124
58163
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, false);
|
|
58125
58164
|
updateAllRowPosition(distStartRowY, count, direction, proxy);
|
|
@@ -58231,8 +58270,8 @@
|
|
|
58231
58270
|
let sync = true;
|
|
58232
58271
|
if (async) {
|
|
58233
58272
|
const screenLeftCol = proxy.screenLeftCol;
|
|
58234
|
-
leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol -
|
|
58235
|
-
rightCol = Math.min(proxy.bodyRightCol, screenLeftCol +
|
|
58273
|
+
leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - proxy.screenColCount * 1);
|
|
58274
|
+
rightCol = Math.min(proxy.bodyRightCol, screenLeftCol + proxy.screenColCount * 2);
|
|
58236
58275
|
if (leftCol !== proxy.bodyLeftCol || rightCol !== proxy.bodyRightCol) {
|
|
58237
58276
|
sync = false;
|
|
58238
58277
|
}
|
|
@@ -58677,11 +58716,8 @@
|
|
|
58677
58716
|
else if (this.table.isPivotTable()) {
|
|
58678
58717
|
this.mode = 'pivot';
|
|
58679
58718
|
}
|
|
58680
|
-
if (this.table.options.maintainedDataCount
|
|
58681
|
-
this.rowLimit = this.table.options.maintainedDataCount
|
|
58682
|
-
}
|
|
58683
|
-
if (this.table.options.maintainedColumnCount) {
|
|
58684
|
-
this.colLimit = this.table.options.maintainedColumnCount;
|
|
58719
|
+
if (this.table.options.maintainedDataCount) {
|
|
58720
|
+
this.rowLimit = this.table.options.maintainedDataCount;
|
|
58685
58721
|
}
|
|
58686
58722
|
}
|
|
58687
58723
|
get bodyLeftCol() {
|
|
@@ -58695,8 +58731,7 @@
|
|
|
58695
58731
|
this.colStart = this.bodyLeftCol;
|
|
58696
58732
|
this.colEnd = this.totalCol;
|
|
58697
58733
|
const defaultColWidth = this.table.defaultColWidth;
|
|
58698
|
-
this.taskColCount =
|
|
58699
|
-
this.table.options.progressColumnUpdateCount ?? Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;
|
|
58734
|
+
this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;
|
|
58700
58735
|
const totalBodyWidth = defaultColWidth * totalActualBodyColCount;
|
|
58701
58736
|
const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
|
|
58702
58737
|
this.xLimitLeft = totalBodyWidth / 2;
|
|
@@ -58715,8 +58750,7 @@
|
|
|
58715
58750
|
this.rowStart = this.bodyTopRow;
|
|
58716
58751
|
this.rowEnd = this.totalRow;
|
|
58717
58752
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
58718
|
-
this.taskRowCount =
|
|
58719
|
-
this.table.options.progressRowUpdateCount ?? Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
|
|
58753
|
+
this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
|
|
58720
58754
|
const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;
|
|
58721
58755
|
const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
|
|
58722
58756
|
this.yLimitTop = totalBodyHeight / 2;
|
|
@@ -65108,7 +65142,7 @@
|
|
|
65108
65142
|
this.checkHorizontalScrollBarEnd();
|
|
65109
65143
|
}
|
|
65110
65144
|
}
|
|
65111
|
-
setScrollTop(top) {
|
|
65145
|
+
setScrollTop(top, triggerEvent = true) {
|
|
65112
65146
|
const totalHeight = this.table.getAllRowsHeight();
|
|
65113
65147
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
65114
65148
|
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
|
|
@@ -65124,7 +65158,7 @@
|
|
|
65124
65158
|
this.table.scenegraph.setY(-top);
|
|
65125
65159
|
const yRatio = top / (totalHeight - this.table.scenegraph.height);
|
|
65126
65160
|
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
65127
|
-
if (oldVerticalBarPos !== top) {
|
|
65161
|
+
if (oldVerticalBarPos !== top && triggerEvent) {
|
|
65128
65162
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65129
65163
|
scrollTop: this.scroll.verticalBarPos,
|
|
65130
65164
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -65138,7 +65172,7 @@
|
|
|
65138
65172
|
this.checkVerticalScrollBarEnd();
|
|
65139
65173
|
}
|
|
65140
65174
|
}
|
|
65141
|
-
setScrollLeft(left) {
|
|
65175
|
+
setScrollLeft(left, triggerEvent = true) {
|
|
65142
65176
|
this.table.scrollLeft;
|
|
65143
65177
|
const totalWidth = this.table.getAllColsWidth();
|
|
65144
65178
|
this.table.getFrozenColsWidth();
|
|
@@ -65156,7 +65190,7 @@
|
|
|
65156
65190
|
this.table.scenegraph.setX(-left);
|
|
65157
65191
|
const xRatio = left / (totalWidth - this.table.scenegraph.width);
|
|
65158
65192
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
65159
|
-
if (oldHorizontalBarPos !== left) {
|
|
65193
|
+
if (oldHorizontalBarPos !== left && triggerEvent) {
|
|
65160
65194
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65161
65195
|
scrollTop: this.scroll.verticalBarPos,
|
|
65162
65196
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -65771,8 +65805,12 @@
|
|
|
65771
65805
|
}
|
|
65772
65806
|
});
|
|
65773
65807
|
table.scenegraph.tableGroup.addEventListener('pointerenter', (e) => {
|
|
65774
|
-
if (table.theme.scrollStyle.
|
|
65808
|
+
if ((table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.horizontalVisible === 'focus') ||
|
|
65809
|
+
(!table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
65775
65810
|
stateManager.showHorizontalScrollBar();
|
|
65811
|
+
}
|
|
65812
|
+
if ((table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.verticalVisible === 'focus') ||
|
|
65813
|
+
(!table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
65776
65814
|
stateManager.showVerticalScrollBar();
|
|
65777
65815
|
}
|
|
65778
65816
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEENTER_TABLE)) {
|
|
@@ -65786,8 +65824,12 @@
|
|
|
65786
65824
|
stateManager.updateInteractionState(InteractionState.default);
|
|
65787
65825
|
stateManager.updateCursor();
|
|
65788
65826
|
}
|
|
65789
|
-
if (table.theme.scrollStyle.
|
|
65827
|
+
if ((table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.horizontalVisible === 'focus') ||
|
|
65828
|
+
(!table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
65790
65829
|
stateManager.hideHorizontalScrollBar();
|
|
65830
|
+
}
|
|
65831
|
+
if ((table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.verticalVisible === 'focus') ||
|
|
65832
|
+
(!table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
65791
65833
|
stateManager.hideVerticalScrollBar();
|
|
65792
65834
|
}
|
|
65793
65835
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL)) {
|
|
@@ -71928,11 +71970,12 @@
|
|
|
71928
71970
|
eventManager;
|
|
71929
71971
|
editorManager;
|
|
71930
71972
|
_pixelRatio;
|
|
71973
|
+
canvasSizeSeted;
|
|
71931
71974
|
static get EVENT_TYPE() {
|
|
71932
71975
|
return TABLE_EVENT_TYPE;
|
|
71933
71976
|
}
|
|
71934
71977
|
options;
|
|
71935
|
-
version = "1.
|
|
71978
|
+
version = "1.7.0-alpha.1";
|
|
71936
71979
|
pagination;
|
|
71937
71980
|
id = `VTable${Date.now()}`;
|
|
71938
71981
|
headerStyleCache;
|
|
@@ -71976,6 +72019,9 @@
|
|
|
71976
72019
|
padding.right && (this.padding.right = padding.right);
|
|
71977
72020
|
}
|
|
71978
72021
|
}
|
|
72022
|
+
if (isValid$3(canvasHeight) && isValid$3(canvasWidth)) {
|
|
72023
|
+
this.canvasSizeSeted = true;
|
|
72024
|
+
}
|
|
71979
72025
|
this.tableNoFrameWidth = 0;
|
|
71980
72026
|
this.tableNoFrameHeight = 0;
|
|
71981
72027
|
this.canvasWidth = canvasWidth;
|
|
@@ -72146,6 +72192,11 @@
|
|
|
72146
72192
|
get canvas() {
|
|
72147
72193
|
return this.internalProps.canvas;
|
|
72148
72194
|
}
|
|
72195
|
+
setCanvasSize(canvasWidth, canvasHeight) {
|
|
72196
|
+
this.canvasWidth = canvasWidth;
|
|
72197
|
+
this.canvasHeight = canvasHeight;
|
|
72198
|
+
this.resize();
|
|
72199
|
+
}
|
|
72149
72200
|
resize() {
|
|
72150
72201
|
this._updateSize();
|
|
72151
72202
|
this.internalProps.legends?.forEach(legend => {
|
|
@@ -72420,16 +72471,22 @@
|
|
|
72420
72471
|
const element = this.getElement();
|
|
72421
72472
|
let widthWithoutPadding = 0;
|
|
72422
72473
|
let heightWithoutPadding = 0;
|
|
72423
|
-
if (
|
|
72424
|
-
|
|
72425
|
-
|
|
72426
|
-
|
|
72427
|
-
|
|
72428
|
-
|
|
72429
|
-
|
|
72430
|
-
|
|
72431
|
-
|
|
72432
|
-
|
|
72474
|
+
if (this.canvasSizeSeted) {
|
|
72475
|
+
widthWithoutPadding = this.canvasWidth;
|
|
72476
|
+
heightWithoutPadding = this.canvasHeight;
|
|
72477
|
+
}
|
|
72478
|
+
else {
|
|
72479
|
+
if (element.parentElement) {
|
|
72480
|
+
const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
|
|
72481
|
+
widthWithoutPadding =
|
|
72482
|
+
element.parentElement.offsetWidth -
|
|
72483
|
+
parseInt(computedStyle.paddingLeft || '0px', 10) -
|
|
72484
|
+
parseInt(computedStyle.paddingRight || '0px', 10);
|
|
72485
|
+
heightWithoutPadding =
|
|
72486
|
+
element.parentElement.offsetHeight -
|
|
72487
|
+
parseInt(computedStyle.paddingTop || '0px', 10) -
|
|
72488
|
+
parseInt(computedStyle.paddingBottom || '0px', 20);
|
|
72489
|
+
}
|
|
72433
72490
|
}
|
|
72434
72491
|
const width1 = widthWithoutPadding ?? 1 - 1;
|
|
72435
72492
|
const height1 = heightWithoutPadding ?? 1 - 1;
|
|
@@ -72462,8 +72519,8 @@
|
|
|
72462
72519
|
widthP = this.canvasWidth - 1;
|
|
72463
72520
|
heightP = this.canvasHeight - 1;
|
|
72464
72521
|
}
|
|
72465
|
-
const width = Math.floor(widthP -
|
|
72466
|
-
const height = Math.floor(heightP -
|
|
72522
|
+
const width = Math.floor(widthP - getVerticalScrollBarSize(this.getTheme().scrollStyle));
|
|
72523
|
+
const height = Math.floor(heightP - getHorizontalScrollBarSize(this.getTheme().scrollStyle));
|
|
72467
72524
|
if (this.internalProps.theme?.frameStyle) {
|
|
72468
72525
|
const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
72469
72526
|
const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
|
|
@@ -92424,7 +92481,7 @@
|
|
|
92424
92481
|
}
|
|
92425
92482
|
|
|
92426
92483
|
registerForVrender();
|
|
92427
|
-
const version = "1.
|
|
92484
|
+
const version = "1.7.0-alpha.1";
|
|
92428
92485
|
function getIcons() {
|
|
92429
92486
|
return get$2();
|
|
92430
92487
|
}
|