@visactor/vtable 1.26.2 → 1.26.3-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/cjs/dataset/DataStatistics.js +1 -2
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventTarget.js +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/helper.js +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.js +1 -1
- package/cjs/header-helper/style.js +2 -1
- package/cjs/layout/pivot-header-layout.js +0 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/component/table-component.js +41 -50
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +9 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.js +16 -16
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -1
- package/dist/vtable.js +80 -78
- package/dist/vtable.min.js +1 -1
- package/es/dataset/DataStatistics.js +1 -2
- package/es/edit/edit-manager.js +2 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventTarget.js +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/event.js +1 -1
- package/es/event/helper.js +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.js +1 -1
- package/es/header-helper/style.js +2 -1
- package/es/layout/pivot-header-layout.js +1 -2
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/component/table-component.js +41 -51
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +6 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.js +16 -14
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -1
- package/package.json +4 -4
package/es/edit/edit-manager.js
CHANGED
|
@@ -163,4 +163,5 @@ function dealWithValidateValue(validateValue, editManager, oldValue, resolve) {
|
|
|
163
163
|
editManager.doExit(), null == resolve || resolve(!0), !0) : "validate-not-exit" === validateValue || "invalidate-not-exit" === validateValue ? (null == resolve || resolve(!1),
|
|
164
164
|
!1) : !0 === validateValue ? (editManager.doExit(), null == resolve || resolve(!0),
|
|
165
165
|
!0) : (null == resolve || resolve(!1), !1);
|
|
166
|
-
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=edit-manager.js.map
|
package/es/event/EventHandler.js
CHANGED
package/es/event/EventTarget.js
CHANGED
package/es/event/drill.js
CHANGED
package/es/event/event.js
CHANGED
package/es/event/helper.js
CHANGED
package/es/event/media-click.js
CHANGED
package/es/event/scroll.js
CHANGED
package/es/event/util.js
CHANGED
|
@@ -70,4 +70,4 @@ export function setDataToHTML(data) {
|
|
|
70
70
|
})), result.push("<tr>", ...rowValues, "</tr>"), rowIndex === rows.length - 1 && result.push("</tbody>");
|
|
71
71
|
})), result.push("</table>"), [ META_HEAD, result.join("") ].join("");
|
|
72
72
|
}
|
|
73
|
-
//# sourceMappingURL=util.js.map
|
|
73
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -13,4 +13,5 @@ export function of(headerStyle, defaultHeaderStyle, styleArg, StyleClass, global
|
|
|
13
13
|
return headerStyle || defaultHeaderStyle ? headerStyle instanceof Style ? headerStyle : "function" == typeof headerStyle ? of(headerStyle(styleArg), defaultHeaderStyle, styleArg, StyleClass, globalAutoWrapText, theme) : (headerStyle || (headerStyle = {}),
|
|
14
14
|
globalAutoWrapText && !isValid(headerStyle.autoWrapText) && (headerStyle.autoWrapText = !0),
|
|
15
15
|
StyleClass === CheckboxStyle ? new CheckboxStyle(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClass(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {})) : StyleClass.DEFAULT;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -2025,5 +2025,4 @@ function bandSpace(count, paddingInner, paddingOuter) {
|
|
|
2025
2025
|
let space;
|
|
2026
2026
|
return space = 1 === count ? count + 2 * paddingOuter : count - paddingInner + 2 * paddingOuter,
|
|
2027
2027
|
count ? space > 0 ? space : 1 : 0;
|
|
2028
|
-
}
|
|
2029
|
-
//# sourceMappingURL=pivot-header-layout.js.map
|
|
2028
|
+
}
|
package/es/plugins/index.js
CHANGED
package/es/plugins/interface.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { };
|
|
2
|
-
//# sourceMappingURL=interface.js.map
|
|
2
|
+
//# sourceMappingURL=interface.js.map
|
|
@@ -205,4 +205,4 @@ function keepRowAtVisiblePosition(col, row, visibleTop, table) {
|
|
|
205
205
|
export const registerListTreeStickCellPlugin = () => {
|
|
206
206
|
Factory.registerComponent("listTreeStickCellPlugin", ListTreeStickCellPlugin);
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=list-tree-stick-cell.js.map
|
|
208
|
+
//# sourceMappingURL=list-tree-stick-cell.js.map
|
|
@@ -8,7 +8,7 @@ import { DrillIcon } from "./drill-icon";
|
|
|
8
8
|
|
|
9
9
|
import { CellMover } from "./cell-mover";
|
|
10
10
|
|
|
11
|
-
import { getColX, getRowY } from "./util";
|
|
11
|
+
import { getBodyHorizontalScrollRange, getColX, getRowY } from "./util";
|
|
12
12
|
|
|
13
13
|
import { isValid } from "@visactor/vutils";
|
|
14
14
|
|
|
@@ -260,13 +260,13 @@ export class TableComponent {
|
|
|
260
260
|
}
|
|
261
261
|
updateScrollBar() {
|
|
262
262
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
263
|
-
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos, oldFrozenHorizontalBarPos = this.table.stateManager.scroll.frozenHorizontalBarPos, oldRightFrozenHorizontalBarPos = this.table.stateManager.scroll.rightFrozenHorizontalBarPos, theme = this.table.theme, width = null === (_a = theme.scrollStyle) || void 0 === _a ? void 0 : _a.width, visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible, horizontalVisible = null !== (_d = null === (_c = theme.scrollStyle) || void 0 === _c ? void 0 : _c.horizontalVisible) && void 0 !== _d ? _d : visible1, verticalVisible = null !== (_f = null === (_e = theme.scrollStyle) || void 0 === _e ? void 0 : _e.verticalVisible) && void 0 !== _f ? _f : visible1, tableWidth = Math.ceil(this.table.tableNoFrameWidth), tableHeight = Math.ceil(this.table.tableNoFrameHeight), totalHeight = this.table.getAllRowsHeight(), totalWidth = this.table.getAllColsWidth(), frozenRowsHeight = this.table.getFrozenRowsHeight(), frozenColsWidth = this.table.getFrozenColsWidth(), frozenColsContentWidth = null !== (_j = null === (_h = (_g = this.table).getFrozenColsContentWidth) || void 0 === _h ? void 0 : _h.call(_g)) && void 0 !== _j ? _j : frozenColsWidth, bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.table.getRightFrozenColsWidth(), rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth, hoverOn = this.table.theme.scrollStyle.hoverOn, sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos, oldFrozenHorizontalBarPos = this.table.stateManager.scroll.frozenHorizontalBarPos, oldRightFrozenHorizontalBarPos = this.table.stateManager.scroll.rightFrozenHorizontalBarPos, theme = this.table.theme, width = null === (_a = theme.scrollStyle) || void 0 === _a ? void 0 : _a.width, visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible, horizontalVisible = null !== (_d = null === (_c = theme.scrollStyle) || void 0 === _c ? void 0 : _c.horizontalVisible) && void 0 !== _d ? _d : visible1, verticalVisible = null !== (_f = null === (_e = theme.scrollStyle) || void 0 === _e ? void 0 : _e.verticalVisible) && void 0 !== _f ? _f : visible1, tableWidth = Math.ceil(this.table.tableNoFrameWidth), tableHeight = Math.ceil(this.table.tableNoFrameHeight), totalHeight = this.table.getAllRowsHeight(), totalWidth = this.table.getAllColsWidth(), frozenRowsHeight = this.table.getFrozenRowsHeight(), frozenColsWidth = this.table.getFrozenColsWidth(), frozenColsContentWidth = null !== (_j = null === (_h = (_g = this.table).getFrozenColsContentWidth) || void 0 === _h ? void 0 : _h.call(_g)) && void 0 !== _j ? _j : frozenColsWidth, bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.table.getRightFrozenColsWidth(), rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth, hoverOn = this.table.theme.scrollStyle.hoverOn, sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0, bodyScrollRange = getBodyHorizontalScrollRange(this.table), y = Math.min(tableHeight, totalHeight);
|
|
264
|
+
let attrY = 0;
|
|
265
|
+
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);
|
|
266
|
+
const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
|
|
267
|
+
if (bodyScrollRange > sizeTolerance) {
|
|
268
|
+
const bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth, bodyContentWidth = bodyViewportWidth + bodyScrollRange, rangeEnd = bodyContentWidth > 0 ? Math.max(.05, bodyViewportWidth / bodyContentWidth) : 1;
|
|
268
269
|
let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
269
|
-
const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
|
|
270
270
|
ignoreFrozenCols ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x,
|
|
271
271
|
hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
|
|
272
272
|
hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
|
|
@@ -281,59 +281,49 @@ export class TableComponent {
|
|
|
281
281
|
x: bounds.x1,
|
|
282
282
|
y: bounds.y1
|
|
283
283
|
}, "always" === horizontalVisible && this.hScrollBar.showAll();
|
|
284
|
-
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
285
|
-
if (!ignoreFrozenCols && frozenScrollable) {
|
|
286
|
-
const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth), x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
|
|
287
|
-
this.frozenHScrollBar.setAttributes({
|
|
288
|
-
x: x,
|
|
289
|
-
y: attrY,
|
|
290
|
-
width: frozenColsWidth,
|
|
291
|
-
range: [ 0, frozenRangeEnd ],
|
|
292
|
-
visible: "always" === horizontalVisible
|
|
293
|
-
});
|
|
294
|
-
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
295
|
-
this.frozenHScrollBar._viewPosition = {
|
|
296
|
-
x: bounds.x1,
|
|
297
|
-
y: bounds.y1
|
|
298
|
-
}, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
|
|
299
|
-
} else this.frozenHScrollBar.setAttributes({
|
|
300
|
-
x: 2 * -this.table.tableNoFrameWidth,
|
|
301
|
-
y: 2 * -this.table.tableNoFrameHeight,
|
|
302
|
-
width: 0,
|
|
303
|
-
visible: !1
|
|
304
|
-
});
|
|
305
|
-
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
306
|
-
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
307
|
-
const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth), x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
|
|
308
|
-
this.rightFrozenHScrollBar.setAttributes({
|
|
309
|
-
x: x,
|
|
310
|
-
y: attrY,
|
|
311
|
-
width: rightFrozenColsWidth,
|
|
312
|
-
range: [ 0, rightFrozenRangeEnd ],
|
|
313
|
-
visible: "always" === horizontalVisible
|
|
314
|
-
});
|
|
315
|
-
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
316
|
-
this.rightFrozenHScrollBar._viewPosition = {
|
|
317
|
-
x: bounds.x1,
|
|
318
|
-
y: bounds.y1
|
|
319
|
-
}, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
|
|
320
|
-
} else this.rightFrozenHScrollBar.setAttributes({
|
|
321
|
-
x: 2 * -this.table.tableNoFrameWidth,
|
|
322
|
-
y: 2 * -this.table.tableNoFrameHeight,
|
|
323
|
-
width: 0,
|
|
324
|
-
visible: !1
|
|
325
|
-
});
|
|
326
284
|
} else this.hScrollBar.setAttributes({
|
|
327
285
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
328
286
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
329
287
|
width: 0,
|
|
330
288
|
visible: !1
|
|
331
|
-
})
|
|
289
|
+
});
|
|
290
|
+
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
291
|
+
if (!ignoreFrozenCols && frozenScrollable) {
|
|
292
|
+
const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth), x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
|
|
293
|
+
this.frozenHScrollBar.setAttributes({
|
|
294
|
+
x: x,
|
|
295
|
+
y: attrY,
|
|
296
|
+
width: frozenColsWidth,
|
|
297
|
+
range: [ 0, frozenRangeEnd ],
|
|
298
|
+
visible: "always" === horizontalVisible
|
|
299
|
+
});
|
|
300
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
301
|
+
this.frozenHScrollBar._viewPosition = {
|
|
302
|
+
x: bounds.x1,
|
|
303
|
+
y: bounds.y1
|
|
304
|
+
}, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
|
|
305
|
+
} else this.frozenHScrollBar.setAttributes({
|
|
332
306
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
333
307
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
334
308
|
width: 0,
|
|
335
309
|
visible: !1
|
|
336
|
-
})
|
|
310
|
+
});
|
|
311
|
+
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
312
|
+
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
313
|
+
const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth), x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
|
|
314
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
315
|
+
x: x,
|
|
316
|
+
y: attrY,
|
|
317
|
+
width: rightFrozenColsWidth,
|
|
318
|
+
range: [ 0, rightFrozenRangeEnd ],
|
|
319
|
+
visible: "always" === horizontalVisible
|
|
320
|
+
});
|
|
321
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
322
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
323
|
+
x: bounds.x1,
|
|
324
|
+
y: bounds.y1
|
|
325
|
+
}, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
|
|
326
|
+
} else this.rightFrozenHScrollBar.setAttributes({
|
|
337
327
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
338
328
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
339
329
|
width: 0,
|