@visactor/vtable 1.6.2-alpha.4 → 1.6.2-alpha.6
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.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +0 -1
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/scroll.js +2 -2
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js +4 -2
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/render.d.ts +5 -0
- package/cjs/scenegraph/graphic/contributions/render.js +21 -0
- package/cjs/scenegraph/graphic/contributions/render.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +6 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +8 -6
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +6 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.d.ts +2 -2
- package/cjs/state/state.js +2 -6
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +0 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +0 -1
- package/cjs/ts-types/table-engine.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 +52 -26
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +0 -1
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/scroll.js +2 -2
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.js +6 -2
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/render.d.ts +5 -0
- package/es/scenegraph/graphic/contributions/render.js +13 -0
- package/es/scenegraph/graphic/contributions/render.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.js +6 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +8 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +8 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.d.ts +2 -2
- package/es/state/state.js +2 -6
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +0 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +0 -1
- package/es/ts-types/table-engine.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 +3 -3
package/dist/vtable.js
CHANGED
|
@@ -56799,6 +56799,16 @@
|
|
|
56799
56799
|
injectable()
|
|
56800
56800
|
], SuffixTextBeforeRenderContribution);
|
|
56801
56801
|
|
|
56802
|
+
class VTableDefaultRenderService extends DefaultRenderService {
|
|
56803
|
+
_prepare(g, updateBounds) {
|
|
56804
|
+
g.role !== 'cell' &&
|
|
56805
|
+
g.forEachChildren(g => {
|
|
56806
|
+
this._prepare(g, updateBounds);
|
|
56807
|
+
});
|
|
56808
|
+
g.update({ bounds: updateBounds, trans: true });
|
|
56809
|
+
}
|
|
56810
|
+
}
|
|
56811
|
+
|
|
56802
56812
|
var splitModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
56803
56813
|
if (isBound(SplitRectBeforeRenderContribution$1)) {
|
|
56804
56814
|
rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope();
|
|
@@ -56845,6 +56855,14 @@
|
|
|
56845
56855
|
bind(DrawItemInterceptor).toService(VTableDrawItemInterceptorContribution);
|
|
56846
56856
|
bind(SuffixTextBeforeRenderContribution).toSelf().inSingletonScope();
|
|
56847
56857
|
bind(TextRenderContribution).toService(SuffixTextBeforeRenderContribution);
|
|
56858
|
+
if (isBound(RenderService)) {
|
|
56859
|
+
unbind(RenderService);
|
|
56860
|
+
rebind(RenderService).to(VTableDefaultRenderService);
|
|
56861
|
+
}
|
|
56862
|
+
else {
|
|
56863
|
+
unbind(RenderService);
|
|
56864
|
+
bind(RenderService).to(VTableDefaultRenderService);
|
|
56865
|
+
}
|
|
56848
56866
|
});
|
|
56849
56867
|
|
|
56850
56868
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
@@ -57864,8 +57882,8 @@
|
|
|
57864
57882
|
return;
|
|
57865
57883
|
}
|
|
57866
57884
|
const screenTopRow = proxy.screenTopRow;
|
|
57867
|
-
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
57868
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount *
|
|
57885
|
+
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - Math.ceil(proxy.screenRowCount * (proxy.table.options.rowUpdateBufferCount ?? 1)));
|
|
57886
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + Math.ceil(proxy.screenRowCount * (1 + (proxy.table.options.rowUpdateBufferCount ?? 1))));
|
|
57869
57887
|
for (let row = topRow; row <= bottomRow; row++) {
|
|
57870
57888
|
const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, true);
|
|
57871
57889
|
proxy.updateCellGroupContent(cellGroup);
|
|
@@ -58079,8 +58097,8 @@
|
|
|
58079
58097
|
syncBottomRow = distEndRow;
|
|
58080
58098
|
}
|
|
58081
58099
|
else {
|
|
58082
|
-
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
58083
|
-
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount *
|
|
58100
|
+
const topRow = Math.max(proxy.bodyTopRow, screenTopRow - Math.ceil(proxy.screenRowCount * (proxy.table.options.rowUpdateBufferCount ?? 1)));
|
|
58101
|
+
const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + Math.ceil(proxy.screenRowCount * (1 + (proxy.table.options.rowUpdateBufferCount ?? 1))));
|
|
58084
58102
|
syncTopRow = topRow;
|
|
58085
58103
|
syncBottomRow = bottomRow;
|
|
58086
58104
|
}
|
|
@@ -58118,8 +58136,8 @@
|
|
|
58118
58136
|
syncBottomRow = distEndRow;
|
|
58119
58137
|
}
|
|
58120
58138
|
else {
|
|
58121
|
-
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);
|
|
58122
|
-
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount *
|
|
58139
|
+
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - Math.ceil(proxy.screenRowCount * (proxy.table.options.rowUpdateBufferCount ?? 1)));
|
|
58140
|
+
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + Math.ceil(proxy.screenRowCount * (1 + (proxy.table.options.rowUpdateBufferCount ?? 1))));
|
|
58123
58141
|
}
|
|
58124
58142
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, false);
|
|
58125
58143
|
updateAllRowPosition(distStartRowY, count, direction, proxy);
|
|
@@ -58231,8 +58249,8 @@
|
|
|
58231
58249
|
let sync = true;
|
|
58232
58250
|
if (async) {
|
|
58233
58251
|
const screenLeftCol = proxy.screenLeftCol;
|
|
58234
|
-
leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - proxy.screenColCount * 1);
|
|
58235
|
-
rightCol = Math.min(proxy.bodyRightCol, screenLeftCol + proxy.screenColCount *
|
|
58252
|
+
leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - Math.ceil(proxy.screenColCount * (proxy.table.options.columnUpdateBufferCount ?? 1)));
|
|
58253
|
+
rightCol = Math.min(proxy.bodyRightCol, screenLeftCol + Math.ceil(proxy.screenColCount * (1 + (proxy.table.options.columnUpdateBufferCount ?? 1))));
|
|
58236
58254
|
if (leftCol !== proxy.bodyLeftCol || rightCol !== proxy.bodyRightCol) {
|
|
58237
58255
|
sync = false;
|
|
58238
58256
|
}
|
|
@@ -58677,8 +58695,11 @@
|
|
|
58677
58695
|
else if (this.table.isPivotTable()) {
|
|
58678
58696
|
this.mode = 'pivot';
|
|
58679
58697
|
}
|
|
58680
|
-
if (this.table.options.maintainedDataCount) {
|
|
58681
|
-
this.rowLimit = this.table.options.maintainedDataCount;
|
|
58698
|
+
if (this.table.options.maintainedDataCount || this.table.options.maintainedRowCount) {
|
|
58699
|
+
this.rowLimit = this.table.options.maintainedDataCount || this.table.options.maintainedRowCount;
|
|
58700
|
+
}
|
|
58701
|
+
if (this.table.options.maintainedColumnCount) {
|
|
58702
|
+
this.colLimit = this.table.options.maintainedColumnCount;
|
|
58682
58703
|
}
|
|
58683
58704
|
}
|
|
58684
58705
|
get bodyLeftCol() {
|
|
@@ -58692,7 +58713,8 @@
|
|
|
58692
58713
|
this.colStart = this.bodyLeftCol;
|
|
58693
58714
|
this.colEnd = this.totalCol;
|
|
58694
58715
|
const defaultColWidth = this.table.defaultColWidth;
|
|
58695
|
-
this.taskColCount =
|
|
58716
|
+
this.taskColCount =
|
|
58717
|
+
this.table.options.progressColumnUpdateCount ?? Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;
|
|
58696
58718
|
const totalBodyWidth = defaultColWidth * totalActualBodyColCount;
|
|
58697
58719
|
const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
|
|
58698
58720
|
this.xLimitLeft = totalBodyWidth / 2;
|
|
@@ -58711,7 +58733,8 @@
|
|
|
58711
58733
|
this.rowStart = this.bodyTopRow;
|
|
58712
58734
|
this.rowEnd = this.totalRow;
|
|
58713
58735
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
58714
|
-
this.taskRowCount =
|
|
58736
|
+
this.taskRowCount =
|
|
58737
|
+
this.table.options.progressRowUpdateCount ?? Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
|
|
58715
58738
|
const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;
|
|
58716
58739
|
const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
|
|
58717
58740
|
this.yLimitTop = totalBodyHeight / 2;
|
|
@@ -61591,6 +61614,7 @@
|
|
|
61591
61614
|
mergeMap;
|
|
61592
61615
|
_dealAutoFillHeightOriginRowsHeight;
|
|
61593
61616
|
_needUpdateContainer = false;
|
|
61617
|
+
needRender = false;
|
|
61594
61618
|
constructor(table) {
|
|
61595
61619
|
this.table = table;
|
|
61596
61620
|
this.hasFrozen = false;
|
|
@@ -61906,9 +61930,15 @@
|
|
|
61906
61930
|
return { width, height };
|
|
61907
61931
|
}
|
|
61908
61932
|
updateNextFrame() {
|
|
61909
|
-
this.
|
|
61910
|
-
|
|
61911
|
-
|
|
61933
|
+
if (!this.needRender) {
|
|
61934
|
+
this.needRender = true;
|
|
61935
|
+
setTimeout(() => {
|
|
61936
|
+
this.needRender = false;
|
|
61937
|
+
this.updateContainerSync();
|
|
61938
|
+
this.resetAllSelectComponent();
|
|
61939
|
+
this.stage.renderNextFrame();
|
|
61940
|
+
}, 16);
|
|
61941
|
+
}
|
|
61912
61942
|
}
|
|
61913
61943
|
resetAllSelectComponent() {
|
|
61914
61944
|
if (this.table.stateManager.select?.ranges?.length > 0) {
|
|
@@ -65065,7 +65095,6 @@
|
|
|
65065
65095
|
this.table.scenegraph.proxy.deltaY = 0;
|
|
65066
65096
|
this.updateHoverPos(-1, -1);
|
|
65067
65097
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65068
|
-
event: undefined,
|
|
65069
65098
|
scrollTop: this.scroll.verticalBarPos,
|
|
65070
65099
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
65071
65100
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -65091,7 +65120,6 @@
|
|
|
65091
65120
|
this.table.scenegraph.proxy.deltaX = 0;
|
|
65092
65121
|
this.updateHoverPos(-1, -1);
|
|
65093
65122
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65094
|
-
event: undefined,
|
|
65095
65123
|
scrollTop: this.scroll.verticalBarPos,
|
|
65096
65124
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
65097
65125
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -65105,7 +65133,7 @@
|
|
|
65105
65133
|
this.checkHorizontalScrollBarEnd();
|
|
65106
65134
|
}
|
|
65107
65135
|
}
|
|
65108
|
-
setScrollTop(top
|
|
65136
|
+
setScrollTop(top) {
|
|
65109
65137
|
const totalHeight = this.table.getAllRowsHeight();
|
|
65110
65138
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
65111
65139
|
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
|
|
@@ -65123,7 +65151,6 @@
|
|
|
65123
65151
|
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
65124
65152
|
if (oldVerticalBarPos !== top) {
|
|
65125
65153
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65126
|
-
event,
|
|
65127
65154
|
scrollTop: this.scroll.verticalBarPos,
|
|
65128
65155
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
65129
65156
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -65136,7 +65163,7 @@
|
|
|
65136
65163
|
this.checkVerticalScrollBarEnd();
|
|
65137
65164
|
}
|
|
65138
65165
|
}
|
|
65139
|
-
setScrollLeft(left
|
|
65166
|
+
setScrollLeft(left) {
|
|
65140
65167
|
this.table.scrollLeft;
|
|
65141
65168
|
const totalWidth = this.table.getAllColsWidth();
|
|
65142
65169
|
this.table.getFrozenColsWidth();
|
|
@@ -65156,7 +65183,6 @@
|
|
|
65156
65183
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
65157
65184
|
if (oldHorizontalBarPos !== left) {
|
|
65158
65185
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
65159
|
-
event: wheelEvent,
|
|
65160
65186
|
scrollTop: this.scroll.verticalBarPos,
|
|
65161
65187
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
65162
65188
|
scrollHeight: this.table.theme.scrollStyle?.width,
|
|
@@ -66545,11 +66571,11 @@
|
|
|
66545
66571
|
}
|
|
66546
66572
|
}
|
|
66547
66573
|
if (optimizedDeltaX) {
|
|
66548
|
-
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX
|
|
66574
|
+
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX);
|
|
66549
66575
|
state.showHorizontalScrollBar(true);
|
|
66550
66576
|
}
|
|
66551
66577
|
if (optimizedDeltaY) {
|
|
66552
|
-
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY
|
|
66578
|
+
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY);
|
|
66553
66579
|
state.showVerticalScrollBar(true);
|
|
66554
66580
|
}
|
|
66555
66581
|
isWheelEvent && state.resetInteractionState();
|
|
@@ -66680,7 +66706,7 @@
|
|
|
66680
66706
|
handler.on(table.getElement(), 'blur', (e) => {
|
|
66681
66707
|
eventManager.dealTableHover();
|
|
66682
66708
|
});
|
|
66683
|
-
handler.on(table.
|
|
66709
|
+
handler.on(table.getElement(), 'wheel', (e) => {
|
|
66684
66710
|
table.editorManager?.completeEdit();
|
|
66685
66711
|
if (table.eventManager._enableTableScroll) {
|
|
66686
66712
|
handleWhell(e, stateManager);
|
|
@@ -71931,7 +71957,7 @@
|
|
|
71931
71957
|
return TABLE_EVENT_TYPE;
|
|
71932
71958
|
}
|
|
71933
71959
|
options;
|
|
71934
|
-
version = "1.6.2-alpha.
|
|
71960
|
+
version = "1.6.2-alpha.6";
|
|
71935
71961
|
pagination;
|
|
71936
71962
|
id = `VTable${Date.now()}`;
|
|
71937
71963
|
headerStyleCache;
|
|
@@ -92423,7 +92449,7 @@
|
|
|
92423
92449
|
}
|
|
92424
92450
|
|
|
92425
92451
|
registerForVrender();
|
|
92426
|
-
const version = "1.6.2-alpha.
|
|
92452
|
+
const version = "1.6.2-alpha.6";
|
|
92427
92453
|
function getIcons() {
|
|
92428
92454
|
return get$2();
|
|
92429
92455
|
}
|