@visactor/vtable-calendar 1.18.5-alpha.0 → 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/dist/vtable-calendar.js +28 -14
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
package/dist/vtable-calendar.js
CHANGED
|
@@ -31703,7 +31703,7 @@
|
|
|
31703
31703
|
var _a, _b, _c;
|
|
31704
31704
|
this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.sortedIndexMap.clear(), this.currentIndexedData = Array.from({
|
|
31705
31705
|
length: this._sourceLength
|
|
31706
|
-
}, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
|
|
31706
|
+
}, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
|
|
31707
31707
|
}
|
|
31708
31708
|
updateFilterRules(filterRules) {
|
|
31709
31709
|
var _a, _b, _c;
|
|
@@ -45334,7 +45334,7 @@
|
|
|
45334
45334
|
|
|
45335
45335
|
function handleWhell(event, state) {
|
|
45336
45336
|
let isWheelEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
45337
|
-
var _a;
|
|
45337
|
+
var _a, _b, _c;
|
|
45338
45338
|
let {
|
|
45339
45339
|
deltaX: deltaX,
|
|
45340
45340
|
deltaY: deltaY
|
|
@@ -45344,7 +45344,9 @@
|
|
|
45344
45344
|
horizontal: 1,
|
|
45345
45345
|
vertical: 1
|
|
45346
45346
|
});
|
|
45347
|
-
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling)
|
|
45347
|
+
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
|
|
45348
|
+
const autoHide = "scrolling" === (null === (_b = null === (_a = state.table.options.theme) || void 0 === _a ? void 0 : _a.scrollStyle) || void 0 === _b ? void 0 : _b.visible);
|
|
45349
|
+
optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
|
|
45348
45350
|
}
|
|
45349
45351
|
function optimizeScrollXY(x, y, ratio) {
|
|
45350
45352
|
var _a, _b;
|
|
@@ -45645,7 +45647,7 @@
|
|
|
45645
45647
|
});
|
|
45646
45648
|
}
|
|
45647
45649
|
setTimeout(() => {
|
|
45648
|
-
eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
45650
|
+
eventManager.isDown = !1, eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
45649
45651
|
}, 0);
|
|
45650
45652
|
}
|
|
45651
45653
|
}), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
|
|
@@ -46779,8 +46781,12 @@
|
|
|
46779
46781
|
ranges = table.getSelectedCellRanges();
|
|
46780
46782
|
let cellInRange = !1;
|
|
46781
46783
|
if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
|
|
46782
|
-
const range = ranges[i]
|
|
46783
|
-
|
|
46784
|
+
const range = ranges[i],
|
|
46785
|
+
startCol = range.start.col,
|
|
46786
|
+
endCol = range.end.col,
|
|
46787
|
+
startRow = range.start.row,
|
|
46788
|
+
endRow = range.end.row;
|
|
46789
|
+
if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
|
|
46784
46790
|
cellInRange = !0;
|
|
46785
46791
|
break;
|
|
46786
46792
|
}
|
|
@@ -47493,22 +47499,28 @@
|
|
|
47493
47499
|
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
47494
47500
|
{
|
|
47495
47501
|
width: containerWidth,
|
|
47502
|
+
height: containerHeight,
|
|
47496
47503
|
left: containerLeft,
|
|
47497
47504
|
top: containerTop
|
|
47498
47505
|
} = element.getBoundingClientRect(),
|
|
47499
47506
|
{
|
|
47500
47507
|
x: rootLeft,
|
|
47501
47508
|
y: rootTop,
|
|
47502
|
-
width: rootWidth
|
|
47509
|
+
width: rootWidth,
|
|
47510
|
+
height: rootHeight
|
|
47503
47511
|
} = rootElement.getBoundingClientRect();
|
|
47504
47512
|
if (secondElement) {
|
|
47505
47513
|
secondElement.parentElement !== element && element.appendChild(secondElement), secondElement.style.left = "0px";
|
|
47506
47514
|
const maxWidth = .8 * containerWidth;
|
|
47507
47515
|
secondElement.style.maxWidth = `${maxWidth}px`;
|
|
47508
47516
|
const secondElementWidth = secondElement.clientWidth,
|
|
47509
|
-
|
|
47517
|
+
secondElementHeight = secondElement.clientHeight,
|
|
47510
47518
|
secondElementLeft = x - containerLeft;
|
|
47511
|
-
|
|
47519
|
+
let topStyle = y - 4 - containerTop;
|
|
47520
|
+
if (topStyle + secondElementHeight > containerHeight) {
|
|
47521
|
+
topStyle = topStyle - secondElementHeight + secondElement.firstElementChild.clientHeight + 4;
|
|
47522
|
+
}
|
|
47523
|
+
secondElement.style.top = `${topStyle}px`;
|
|
47512
47524
|
let leftStyle = secondElementLeft;
|
|
47513
47525
|
return leftStyle + secondElementWidth > containerWidth ? leftStyle = leftStyle - secondElementWidth - rootWidth : leftStyle += 4, secondElement.style.left = `${leftStyle}px`, !0;
|
|
47514
47526
|
}
|
|
@@ -49634,7 +49646,7 @@
|
|
|
49634
49646
|
constructor(container) {
|
|
49635
49647
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49636
49648
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
49637
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.18.5
|
|
49649
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.18.5", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "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");
|
|
49638
49650
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
49639
49651
|
options: options,
|
|
49640
49652
|
container: container
|
|
@@ -51395,9 +51407,11 @@
|
|
|
51395
51407
|
this.render();
|
|
51396
51408
|
const stage = this.scenegraph.stage;
|
|
51397
51409
|
if (stage) {
|
|
51398
|
-
|
|
51410
|
+
let contentWidth = this.tableX + this.getAllColsWidth(),
|
|
51399
51411
|
contentHeight = this.tableY + this.getAllRowsHeight();
|
|
51400
|
-
if (
|
|
51412
|
+
if (this.internalProps.legends && this.internalProps.legends.forEach(legend => {
|
|
51413
|
+
"right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
|
|
51414
|
+
}), this.internalProps.title && ("right" === this.internalProps.title._titleOption.orient ? contentWidth = Math.max(contentWidth, this.internalProps.title.getComponentGraphic().globalAABBBounds.x2) : "bottom" === this.internalProps.title._titleOption.orient && (contentHeight = Math.max(contentHeight, this.internalProps.title.getComponentGraphic().globalAABBBounds.y2))), contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
|
|
51401
51415
|
stage.render();
|
|
51402
51416
|
return stage.window.getImageBuffer(type);
|
|
51403
51417
|
}
|
|
@@ -52995,7 +53009,7 @@
|
|
|
52995
53009
|
}, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
52996
53010
|
}
|
|
52997
53011
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
52998
|
-
var _a;
|
|
53012
|
+
var _a, _b;
|
|
52999
53013
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
53000
53014
|
var _a, _b;
|
|
53001
53015
|
return {
|
|
@@ -53025,7 +53039,7 @@
|
|
|
53025
53039
|
style: rowSeriesNumber.style,
|
|
53026
53040
|
width: rowSeriesNumber.width,
|
|
53027
53041
|
format: rowSeriesNumber.format,
|
|
53028
|
-
field: rowSeriesNumber.field,
|
|
53042
|
+
field: null !== (_b = rowSeriesNumber.field) && void 0 !== _b ? _b : "_vtable_rowSeries_number",
|
|
53029
53043
|
icon: rowSeriesNumber.icon,
|
|
53030
53044
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
53031
53045
|
isChildNode: !1
|