@visactor/vtable 1.18.5-alpha.1 → 1.18.5
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/components/menu/dom/logic/MenuElement.js +7 -3
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/core/BaseTable.js +6 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -0
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/scroll.js +6 -5
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/self-event-listener/base-table/right-button-click.js +2 -2
- package/cjs/event/self-event-listener/base-table/right-button-click.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +2 -2
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +47 -11
- package/dist/vtable.min.js +2 -2
- package/es/components/menu/dom/logic/MenuElement.js +7 -3
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/core/BaseTable.js +6 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -0
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/scroll.js +6 -5
- package/es/event/scroll.js.map +1 -1
- package/es/event/self-event-listener/base-table/right-button-click.js +2 -2
- package/es/event/self-event-listener/base-table/right-button-click.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/simple-header-layout.js +2 -2
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/dist/vtable.js
CHANGED
|
@@ -33501,6 +33501,9 @@
|
|
|
33501
33501
|
this._sourceLength = this._source?.length || 0;
|
|
33502
33502
|
this.sortedIndexMap.clear();
|
|
33503
33503
|
this.currentIndexedData = Array.from({ length: this._sourceLength }, (_, i) => i);
|
|
33504
|
+
if (this.rowHierarchyType === 'tree') {
|
|
33505
|
+
this.initTreeHierarchyState();
|
|
33506
|
+
}
|
|
33504
33507
|
if (!this.userPagination) {
|
|
33505
33508
|
this.pagination.perPageCount = this._sourceLength;
|
|
33506
33509
|
this.pagination.totalCount = this._sourceLength;
|
|
@@ -55189,13 +55192,14 @@
|
|
|
55189
55192
|
state.updateInteractionState(InteractionState.scrolling);
|
|
55190
55193
|
}
|
|
55191
55194
|
}
|
|
55195
|
+
const autoHide = state.table.options.theme?.scrollStyle?.visible === 'scrolling';
|
|
55192
55196
|
if (optimizedDeltaX) {
|
|
55193
55197
|
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
|
|
55194
|
-
state.showHorizontalScrollBar(
|
|
55198
|
+
state.showHorizontalScrollBar(autoHide);
|
|
55195
55199
|
}
|
|
55196
55200
|
if (optimizedDeltaY) {
|
|
55197
55201
|
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event);
|
|
55198
|
-
state.showVerticalScrollBar(
|
|
55202
|
+
state.showVerticalScrollBar(autoHide);
|
|
55199
55203
|
}
|
|
55200
55204
|
isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll);
|
|
55201
55205
|
if (event.nativeEvent?.cancelable &&
|
|
@@ -56890,6 +56894,7 @@
|
|
|
56890
56894
|
});
|
|
56891
56895
|
}
|
|
56892
56896
|
}
|
|
56897
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
56893
56898
|
};
|
|
56894
56899
|
eventManager.globalEventListeners.push({
|
|
56895
56900
|
name: 'pointerup',
|
|
@@ -57615,7 +57620,14 @@
|
|
|
57615
57620
|
if (ranges.length > 0) {
|
|
57616
57621
|
for (let i = 0; i < ranges.length; i++) {
|
|
57617
57622
|
const range = ranges[i];
|
|
57618
|
-
|
|
57623
|
+
const startCol = range.start.col;
|
|
57624
|
+
const endCol = range.end.col;
|
|
57625
|
+
const startRow = range.start.row;
|
|
57626
|
+
const endRow = range.end.row;
|
|
57627
|
+
if ((col >= startCol && col <= endCol && row >= startRow && row <= endRow) ||
|
|
57628
|
+
(col >= endCol && col <= startCol && row >= endRow && row <= startRow) ||
|
|
57629
|
+
(col >= startCol && col <= endCol && row >= endRow && row <= startRow) ||
|
|
57630
|
+
(col >= endCol && col <= startCol && row >= startRow && row <= endRow)) {
|
|
57619
57631
|
cellInRange = true;
|
|
57620
57632
|
break;
|
|
57621
57633
|
}
|
|
@@ -58857,8 +58869,8 @@
|
|
|
58857
58869
|
const secondElement = this._secondElement;
|
|
58858
58870
|
const rootElement = this._rootElement;
|
|
58859
58871
|
const element = table.internalProps.menu.parentElement ?? table.getElement();
|
|
58860
|
-
const { width: containerWidth, left: containerLeft, top: containerTop } = element.getBoundingClientRect();
|
|
58861
|
-
const { x: rootLeft, y: rootTop, width: rootWidth } = rootElement.getBoundingClientRect();
|
|
58872
|
+
const { width: containerWidth, height: containerHeight, left: containerLeft, top: containerTop } = element.getBoundingClientRect();
|
|
58873
|
+
const { x: rootLeft, y: rootTop, width: rootWidth, height: rootHeight } = rootElement.getBoundingClientRect();
|
|
58862
58874
|
if (secondElement) {
|
|
58863
58875
|
if (secondElement.parentElement !== element) {
|
|
58864
58876
|
element.appendChild(secondElement);
|
|
@@ -58867,9 +58879,15 @@
|
|
|
58867
58879
|
const maxWidth = containerWidth * 0.8;
|
|
58868
58880
|
secondElement.style.maxWidth = `${maxWidth}px`;
|
|
58869
58881
|
const secondElementWidth = secondElement.clientWidth;
|
|
58882
|
+
const secondElementHeight = secondElement.clientHeight;
|
|
58870
58883
|
const secondElementTop = y - 4 - containerTop;
|
|
58871
58884
|
const secondElementLeft = x - containerLeft;
|
|
58872
|
-
|
|
58885
|
+
let topStyle = secondElementTop;
|
|
58886
|
+
if (topStyle + secondElementHeight > containerHeight) {
|
|
58887
|
+
const secondElementItem = secondElement.firstElementChild;
|
|
58888
|
+
topStyle = topStyle - secondElementHeight + secondElementItem.clientHeight + 4;
|
|
58889
|
+
}
|
|
58890
|
+
secondElement.style.top = `${topStyle}px`;
|
|
58873
58891
|
let leftStyle = secondElementLeft;
|
|
58874
58892
|
if (leftStyle + secondElementWidth > containerWidth) {
|
|
58875
58893
|
leftStyle = leftStyle - secondElementWidth - rootWidth;
|
|
@@ -62635,7 +62653,7 @@
|
|
|
62635
62653
|
return TABLE_EVENT_TYPE;
|
|
62636
62654
|
}
|
|
62637
62655
|
options;
|
|
62638
|
-
version = "1.18.5
|
|
62656
|
+
version = "1.18.5";
|
|
62639
62657
|
pagination;
|
|
62640
62658
|
id = `VTable${Date.now()}`;
|
|
62641
62659
|
headerStyleCache;
|
|
@@ -65316,8 +65334,26 @@
|
|
|
65316
65334
|
this.render();
|
|
65317
65335
|
const stage = this.scenegraph.stage;
|
|
65318
65336
|
if (stage) {
|
|
65319
|
-
|
|
65320
|
-
|
|
65337
|
+
let contentWidth = this.tableX + this.getAllColsWidth();
|
|
65338
|
+
let contentHeight = this.tableY + this.getAllRowsHeight();
|
|
65339
|
+
if (this.internalProps.legends) {
|
|
65340
|
+
this.internalProps.legends.forEach(legend => {
|
|
65341
|
+
if (legend.orient === 'right') {
|
|
65342
|
+
contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2);
|
|
65343
|
+
}
|
|
65344
|
+
else if (legend.orient === 'bottom') {
|
|
65345
|
+
contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2);
|
|
65346
|
+
}
|
|
65347
|
+
});
|
|
65348
|
+
}
|
|
65349
|
+
if (this.internalProps.title) {
|
|
65350
|
+
if (this.internalProps.title._titleOption.orient === 'right') {
|
|
65351
|
+
contentWidth = Math.max(contentWidth, this.internalProps.title.getComponentGraphic().globalAABBBounds.x2);
|
|
65352
|
+
}
|
|
65353
|
+
else if (this.internalProps.title._titleOption.orient === 'bottom') {
|
|
65354
|
+
contentHeight = Math.max(contentHeight, this.internalProps.title.getComponentGraphic().globalAABBBounds.y2);
|
|
65355
|
+
}
|
|
65356
|
+
}
|
|
65321
65357
|
if (contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
|
|
65322
65358
|
stage.render();
|
|
65323
65359
|
const buffer = stage.window.getImageBuffer(type);
|
|
@@ -67589,7 +67625,7 @@
|
|
|
67589
67625
|
style: rowSeriesNumber.style,
|
|
67590
67626
|
width: rowSeriesNumber.width,
|
|
67591
67627
|
format: rowSeriesNumber.format,
|
|
67592
|
-
field: rowSeriesNumber.field,
|
|
67628
|
+
field: rowSeriesNumber.field ?? '_vtable_rowSeries_number',
|
|
67593
67629
|
icon: rowSeriesNumber.icon,
|
|
67594
67630
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
67595
67631
|
isChildNode: false
|
|
@@ -85786,7 +85822,7 @@
|
|
|
85786
85822
|
}
|
|
85787
85823
|
|
|
85788
85824
|
registerForVrender();
|
|
85789
|
-
const version = "1.18.5
|
|
85825
|
+
const version = "1.18.5";
|
|
85790
85826
|
function getIcons() {
|
|
85791
85827
|
return get$2();
|
|
85792
85828
|
}
|