@visactor/vtable-calendar 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/dist/vtable-calendar.js +28 -13
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
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;
|
|
@@ -46333,6 +46335,7 @@
|
|
|
46333
46335
|
!1 !== isCompleteEdit && (stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover());
|
|
46334
46336
|
});
|
|
46335
46337
|
}
|
|
46338
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
46336
46339
|
};
|
|
46337
46340
|
eventManager.globalEventListeners.push({
|
|
46338
46341
|
name: "pointerup",
|
|
@@ -46778,8 +46781,12 @@
|
|
|
46778
46781
|
ranges = table.getSelectedCellRanges();
|
|
46779
46782
|
let cellInRange = !1;
|
|
46780
46783
|
if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
|
|
46781
|
-
const range = ranges[i]
|
|
46782
|
-
|
|
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) {
|
|
46783
46790
|
cellInRange = !0;
|
|
46784
46791
|
break;
|
|
46785
46792
|
}
|
|
@@ -47492,22 +47499,28 @@
|
|
|
47492
47499
|
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
47493
47500
|
{
|
|
47494
47501
|
width: containerWidth,
|
|
47502
|
+
height: containerHeight,
|
|
47495
47503
|
left: containerLeft,
|
|
47496
47504
|
top: containerTop
|
|
47497
47505
|
} = element.getBoundingClientRect(),
|
|
47498
47506
|
{
|
|
47499
47507
|
x: rootLeft,
|
|
47500
47508
|
y: rootTop,
|
|
47501
|
-
width: rootWidth
|
|
47509
|
+
width: rootWidth,
|
|
47510
|
+
height: rootHeight
|
|
47502
47511
|
} = rootElement.getBoundingClientRect();
|
|
47503
47512
|
if (secondElement) {
|
|
47504
47513
|
secondElement.parentElement !== element && element.appendChild(secondElement), secondElement.style.left = "0px";
|
|
47505
47514
|
const maxWidth = .8 * containerWidth;
|
|
47506
47515
|
secondElement.style.maxWidth = `${maxWidth}px`;
|
|
47507
47516
|
const secondElementWidth = secondElement.clientWidth,
|
|
47508
|
-
|
|
47517
|
+
secondElementHeight = secondElement.clientHeight,
|
|
47509
47518
|
secondElementLeft = x - containerLeft;
|
|
47510
|
-
|
|
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`;
|
|
47511
47524
|
let leftStyle = secondElementLeft;
|
|
47512
47525
|
return leftStyle + secondElementWidth > containerWidth ? leftStyle = leftStyle - secondElementWidth - rootWidth : leftStyle += 4, secondElement.style.left = `${leftStyle}px`, !0;
|
|
47513
47526
|
}
|
|
@@ -49633,7 +49646,7 @@
|
|
|
49633
49646
|
constructor(container) {
|
|
49634
49647
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
49635
49648
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
49636
|
-
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");
|
|
49637
49650
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
49638
49651
|
options: options,
|
|
49639
49652
|
container: container
|
|
@@ -51394,9 +51407,11 @@
|
|
|
51394
51407
|
this.render();
|
|
51395
51408
|
const stage = this.scenegraph.stage;
|
|
51396
51409
|
if (stage) {
|
|
51397
|
-
|
|
51410
|
+
let contentWidth = this.tableX + this.getAllColsWidth(),
|
|
51398
51411
|
contentHeight = this.tableY + this.getAllRowsHeight();
|
|
51399
|
-
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) {
|
|
51400
51415
|
stage.render();
|
|
51401
51416
|
return stage.window.getImageBuffer(type);
|
|
51402
51417
|
}
|
|
@@ -52994,7 +53009,7 @@
|
|
|
52994
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);
|
|
52995
53010
|
}
|
|
52996
53011
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
52997
|
-
var _a;
|
|
53012
|
+
var _a, _b;
|
|
52998
53013
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
52999
53014
|
var _a, _b;
|
|
53000
53015
|
return {
|
|
@@ -53024,7 +53039,7 @@
|
|
|
53024
53039
|
style: rowSeriesNumber.style,
|
|
53025
53040
|
width: rowSeriesNumber.width,
|
|
53026
53041
|
format: rowSeriesNumber.format,
|
|
53027
|
-
field: rowSeriesNumber.field,
|
|
53042
|
+
field: null !== (_b = rowSeriesNumber.field) && void 0 !== _b ? _b : "_vtable_rowSeries_number",
|
|
53028
53043
|
icon: rowSeriesNumber.icon,
|
|
53029
53044
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
53030
53045
|
isChildNode: !1
|