@visactor/vtable-calendar 1.16.3-alpha.2 → 1.16.3-alpha.3
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 +17 -35
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -43831,7 +43831,7 @@
|
|
|
43831
43831
|
!1 !== (null === (_a = table.eventOptions) || void 0 === _a ? void 0 : _a.preventDefaultContextMenu) && e.preventDefault();
|
|
43832
43832
|
}), table.options.canvas || handler.on(table.getContainer(), "resize", e => {
|
|
43833
43833
|
var _a;
|
|
43834
|
-
0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$3(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio()), e.windowSizeNotChange || table.resize());
|
|
43834
|
+
table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$3(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio()), e.windowSizeNotChange || table.resize());
|
|
43835
43835
|
});
|
|
43836
43836
|
const regex = /<tr[^>]*>([\s\S]*?)<\/tr>/g,
|
|
43837
43837
|
cellRegex = /<td[^>]*>([\s\S]*?)<\/td>/g;
|
|
@@ -46047,15 +46047,13 @@
|
|
|
46047
46047
|
})(candCol, right);
|
|
46048
46048
|
}
|
|
46049
46049
|
function getTargetRowAt(absoluteY, _this) {
|
|
46050
|
-
var _a;
|
|
46051
46050
|
if (0 === absoluteY) return {
|
|
46052
46051
|
top: 0,
|
|
46053
46052
|
row: 0,
|
|
46054
46053
|
bottom: 0,
|
|
46055
46054
|
height: 0
|
|
46056
46055
|
};
|
|
46057
|
-
const
|
|
46058
|
-
candRow = computeTargetRowByY(absoluteY, _this),
|
|
46056
|
+
const candRow = computeTargetRowByY(absoluteY, _this),
|
|
46059
46057
|
bottom = _this.getRowsHeight(0, candRow);
|
|
46060
46058
|
return absoluteY >= bottom ? ((startRow, startBottom) => {
|
|
46061
46059
|
let top = startBottom - _this.getRowHeight(startRow);
|
|
@@ -46065,7 +46063,7 @@
|
|
|
46065
46063
|
for (let row = startRow; row < rowCount; row++) {
|
|
46066
46064
|
const height = _this.getRowHeight(row),
|
|
46067
46065
|
bottom = top + height;
|
|
46068
|
-
if (
|
|
46066
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
46069
46067
|
top: top,
|
|
46070
46068
|
row: row,
|
|
46071
46069
|
bottom: bottom,
|
|
@@ -46079,7 +46077,7 @@
|
|
|
46079
46077
|
for (let row = startRow; row >= 0; row--) {
|
|
46080
46078
|
const height = _this.getRowHeight(row),
|
|
46081
46079
|
top = bottom - height;
|
|
46082
|
-
if (
|
|
46080
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
46083
46081
|
top: top,
|
|
46084
46082
|
row: row,
|
|
46085
46083
|
bottom: bottom,
|
|
@@ -46097,7 +46095,7 @@
|
|
|
46097
46095
|
right: 0,
|
|
46098
46096
|
width: 0
|
|
46099
46097
|
};
|
|
46100
|
-
if (isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
|
|
46098
|
+
if (absoluteX -= _this.tableX, isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
|
|
46101
46099
|
col: _this.colCount - i - 1,
|
|
46102
46100
|
left: void 0,
|
|
46103
46101
|
right: void 0,
|
|
@@ -46149,8 +46147,8 @@
|
|
|
46149
46147
|
y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight && y <= _this.getAllRowsHeight() && (bottomFrozen = !0);
|
|
46150
46148
|
let rightFrozen = !1;
|
|
46151
46149
|
x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
|
|
46152
|
-
const colInfo = getTargetColAtConsiderRightFrozen(leftFrozen || rightFrozen ? x : x + _this.scrollLeft, rightFrozen, _this),
|
|
46153
|
-
rowInfo = getTargetRowAtConsiderBottomFrozen(topFrozen || bottomFrozen ? y : y + _this.scrollTop, bottomFrozen, _this);
|
|
46150
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen || rightFrozen ? x : x + _this.scrollLeft) + _this.tableX, rightFrozen, _this),
|
|
46151
|
+
rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
|
|
46154
46152
|
if (colInfo && rowInfo) {
|
|
46155
46153
|
const {
|
|
46156
46154
|
row: row,
|
|
@@ -46932,9 +46930,6 @@
|
|
|
46932
46930
|
})), isFunction$5(style) || (layoutMap.isBottomFrozenRow(row) ? table.bodyBottomStyleCache.set(cacheKey, cacheStyle) : table.bodyStyleCache.set(cacheKey, cacheStyle)), customCellStyle ? mergeStyle(cacheStyle, customCellStyle) : cacheStyle;
|
|
46933
46931
|
}
|
|
46934
46932
|
|
|
46935
|
-
function isInteger(value) {
|
|
46936
|
-
return Math.floor(value) === value;
|
|
46937
|
-
}
|
|
46938
46933
|
class Animateaaa extends ACustomAnimate {
|
|
46939
46934
|
onUpdate(end, ratio, out) {
|
|
46940
46935
|
if (this.from.x !== this.to.x) {
|
|
@@ -46953,32 +46948,18 @@
|
|
|
46953
46948
|
this.ticker.setFPS(60), this.tempGraphic = createRect({});
|
|
46954
46949
|
}
|
|
46955
46950
|
scrollTo(position, animationOption) {
|
|
46956
|
-
var _a, _b;
|
|
46951
|
+
var _a, _b, _c, _d;
|
|
46957
46952
|
const from = {
|
|
46958
46953
|
x: this.table.scrollLeft,
|
|
46959
46954
|
y: this.table.scrollTop
|
|
46960
46955
|
},
|
|
46961
|
-
|
|
46962
|
-
|
|
46963
|
-
|
|
46964
|
-
|
|
46965
|
-
let colDecimal,
|
|
46966
|
-
rowDecimal,
|
|
46967
|
-
colInt = col,
|
|
46968
|
-
rowInt = row;
|
|
46969
|
-
isNumber$4(col) && !isInteger(col) && (colInt = Math.floor(col), colDecimal = col - colInt), isNumber$4(row) && !isInteger(row) && (rowInt = Math.floor(row), rowDecimal = row - rowInt);
|
|
46970
|
-
const cellRect = this.table.getCellRect(null != colInt ? colInt : 0, null != rowInt ? rowInt : 0);
|
|
46971
|
-
let {
|
|
46972
|
-
left: left,
|
|
46973
|
-
top: top
|
|
46974
|
-
} = cellRect;
|
|
46975
|
-
colDecimal && (left += colDecimal * cellRect.width), rowDecimal && (top += rowDecimal * cellRect.height);
|
|
46976
|
-
const to = {
|
|
46977
|
-
x: isNumber$4(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
46978
|
-
y: isNumber$4(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
46956
|
+
cellRect = this.table.getCellRect(null !== (_a = position.col) && void 0 !== _a ? _a : 0, null !== (_b = position.row) && void 0 !== _b ? _b : 0),
|
|
46957
|
+
to = {
|
|
46958
|
+
x: isNumber$4(position.col) ? cellRect.left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
46959
|
+
y: isNumber$4(position.row) ? cellRect.top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
46979
46960
|
},
|
|
46980
|
-
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (
|
|
46981
|
-
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (
|
|
46961
|
+
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (_c = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _c ? _c : 3e3,
|
|
46962
|
+
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (_d = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _d ? _d : "linear";
|
|
46982
46963
|
new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
46983
46964
|
graphic: this.tempGraphic,
|
|
46984
46965
|
table: this.table
|
|
@@ -47009,7 +46990,7 @@
|
|
|
47009
46990
|
constructor(container) {
|
|
47010
46991
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47011
46992
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
47012
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.
|
|
46993
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
47013
46994
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47014
46995
|
const {
|
|
47015
46996
|
frozenColCount = 0,
|
|
@@ -47348,7 +47329,8 @@
|
|
|
47348
47329
|
return this.internalProps.pixelRatio;
|
|
47349
47330
|
}
|
|
47350
47331
|
setPixelRatio(pixelRatio) {
|
|
47351
|
-
|
|
47332
|
+
var _a;
|
|
47333
|
+
if (pixelRatio !== (null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.pixelRatio)) {
|
|
47352
47334
|
this.internalProps.pixelRatio = pixelRatio;
|
|
47353
47335
|
const canvasWidth = this.canvasWidth;
|
|
47354
47336
|
this.internalProps.calcWidthContext = {
|