@visactor/vtable-calendar 1.13.1 → 1.13.2
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 +100 -54
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -5653,7 +5653,7 @@
|
|
|
5653
5653
|
return null;
|
|
5654
5654
|
}
|
|
5655
5655
|
|
|
5656
|
-
var __awaiter$
|
|
5656
|
+
var __awaiter$8 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5657
5657
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5658
5658
|
function fulfilled(value) {
|
|
5659
5659
|
try {
|
|
@@ -5723,7 +5723,7 @@
|
|
|
5723
5723
|
}
|
|
5724
5724
|
forEachChildrenAsync(cb) {
|
|
5725
5725
|
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
5726
|
-
return __awaiter$
|
|
5726
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
5727
5727
|
if (reverse) {
|
|
5728
5728
|
let child = this._lastChild,
|
|
5729
5729
|
i = 0;
|
|
@@ -15341,7 +15341,7 @@
|
|
|
15341
15341
|
container.load(envModules), container.load(textMeasureModules), container.load(layerHandlerModules);
|
|
15342
15342
|
}
|
|
15343
15343
|
|
|
15344
|
-
var __awaiter$
|
|
15344
|
+
var __awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15345
15345
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15346
15346
|
function fulfilled(value) {
|
|
15347
15347
|
try {
|
|
@@ -15414,7 +15414,7 @@
|
|
|
15414
15414
|
}
|
|
15415
15415
|
function foreachAsync(graphic, defaultZIndex, cb) {
|
|
15416
15416
|
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
15417
|
-
return __awaiter$
|
|
15417
|
+
return __awaiter$7(this, void 0, void 0, function* () {
|
|
15418
15418
|
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
15419
15419
|
});
|
|
15420
15420
|
}
|
|
@@ -15775,7 +15775,7 @@
|
|
|
15775
15775
|
decorator(target, key, paramIndex);
|
|
15776
15776
|
};
|
|
15777
15777
|
},
|
|
15778
|
-
__awaiter$
|
|
15778
|
+
__awaiter$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15779
15779
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15780
15780
|
function fulfilled(value) {
|
|
15781
15781
|
try {
|
|
@@ -15810,7 +15810,7 @@
|
|
|
15810
15810
|
}, this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
|
|
15811
15811
|
}
|
|
15812
15812
|
draw(renderService, drawContext) {
|
|
15813
|
-
return __awaiter$
|
|
15813
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15814
15814
|
if (this.checkingForDrawPromise) return;
|
|
15815
15815
|
this.lastRenderService = renderService, this.lastDrawContext = drawContext, this.checkingForDrawPromise = this.checkForDraw(drawContext);
|
|
15816
15816
|
const skipDraw = yield this.checkingForDrawPromise;
|
|
@@ -15831,15 +15831,15 @@
|
|
|
15831
15831
|
});
|
|
15832
15832
|
}
|
|
15833
15833
|
_increaseRender(group, drawContext) {
|
|
15834
|
-
return __awaiter$
|
|
15834
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15835
15835
|
this.rendering = !0, yield this._renderIncrementalGroup(group, drawContext);
|
|
15836
15836
|
});
|
|
15837
15837
|
}
|
|
15838
15838
|
_renderIncrementalGroup(group, drawContext) {
|
|
15839
|
-
return __awaiter$
|
|
15839
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15840
15840
|
this.count = group.count, yield new Promise(resolve => {
|
|
15841
15841
|
this.renderItem(group, drawContext, {
|
|
15842
|
-
drawingCb: () => __awaiter$
|
|
15842
|
+
drawingCb: () => __awaiter$6(this, void 0, void 0, function* () {
|
|
15843
15843
|
if (2 !== group.count) yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
|
|
15844
15844
|
if (this.status === STATUS.STOP) return !0;
|
|
15845
15845
|
if (item.isContainer) return !1;
|
|
@@ -15860,7 +15860,7 @@
|
|
|
15860
15860
|
});
|
|
15861
15861
|
}
|
|
15862
15862
|
waitToNextFrame() {
|
|
15863
|
-
return __awaiter$
|
|
15863
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15864
15864
|
return new Promise(resolve => {
|
|
15865
15865
|
this.global.getRequestAnimationFrame()(() => {
|
|
15866
15866
|
resolve(!1);
|
|
@@ -15869,13 +15869,13 @@
|
|
|
15869
15869
|
});
|
|
15870
15870
|
}
|
|
15871
15871
|
checkForDraw(drawContext) {
|
|
15872
|
-
return __awaiter$
|
|
15872
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15873
15873
|
let skip = this.rendering;
|
|
15874
15874
|
return drawContext.restartIncremental && (skip = !1, yield this.forceStop(), this.resetToInit()), skip;
|
|
15875
15875
|
});
|
|
15876
15876
|
}
|
|
15877
15877
|
forceStop() {
|
|
15878
|
-
return __awaiter$
|
|
15878
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15879
15879
|
this.rendering && (this.status = STATUS.STOP, yield new Promise(resolve => {
|
|
15880
15880
|
this.hooks.completeDraw.tap("stopCb", () => {
|
|
15881
15881
|
this.status = STATUS.NORMAL, this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => "stopCb" !== item.name), resolve(!1);
|
|
@@ -15887,11 +15887,11 @@
|
|
|
15887
15887
|
this.currFrameStartAt = 0, this.currentIdx = 0;
|
|
15888
15888
|
}
|
|
15889
15889
|
renderGroup(group, drawContext) {
|
|
15890
|
-
return __awaiter$
|
|
15890
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
15891
15891
|
if (!drawContext.break && !1 !== group.attribute.visibleAll) return group.incremental && drawContext.startAtId === group._uid ? (yield this._increaseRender(group, drawContext), void (drawContext.break = !0)) : void (yield new Promise(resolve => {
|
|
15892
15892
|
this.renderItem(group, drawContext, {
|
|
15893
|
-
drawingCb: () => __awaiter$
|
|
15894
|
-
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$
|
|
15893
|
+
drawingCb: () => __awaiter$6(this, void 0, void 0, function* () {
|
|
15894
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$6(this, void 0, void 0, function* () {
|
|
15895
15895
|
drawContext.break || item.isContainer && (yield this.renderGroup(item, drawContext));
|
|
15896
15896
|
})), resolve(!1);
|
|
15897
15897
|
})
|
|
@@ -28557,8 +28557,6 @@
|
|
|
28557
28557
|
const DEFAULTBORDERLINEDASH = [];
|
|
28558
28558
|
const DEFAULTFONTCOLOR = "#000";
|
|
28559
28559
|
const regUrl = /^(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
|
|
28560
|
-
const ResizeColumnHotSpotSize = 16;
|
|
28561
|
-
const ResizeRowHotSpotSize = 16;
|
|
28562
28560
|
const IndicatorDimensionKeyPlaceholder = "$$indicator$$";
|
|
28563
28561
|
const DrillDown = '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM549.333333 288a5.333333 5.333333 0 0 1 5.333334 5.333333V469.333333h176a5.333333 5.333333 0 0 1 5.333333 5.333334v74.666666a5.333333 5.333333 0 0 1-5.333333 5.333334H554.666667v176a5.333333 5.333333 0 0 1-5.333334 5.333333h-74.666666a5.333333 5.333333 0 0 1-5.333334-5.333333V554.666667H293.333333a5.333333 5.333333 0 0 1-5.333333-5.333334v-74.666666a5.333333 5.333333 0 0 1 5.333333-5.333334H469.333333V293.333333a5.333333 5.333333 0 0 1 5.333334-5.333333h74.666666z"></path></svg>';
|
|
28564
28562
|
const DrillUp = '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM693.333333 469.333333a42.666667 42.666667 0 1 1 0 85.333334H330.666667a42.666667 42.666667 0 1 1 0-85.333334h362.666666z"></path></svg>';
|
|
@@ -29071,6 +29069,10 @@
|
|
|
29071
29069
|
var _a;
|
|
29072
29070
|
return null !== (_a = columnResize.width) && void 0 !== _a ? _a : columnResize.lineWidth + 2;
|
|
29073
29071
|
},
|
|
29072
|
+
get resizeHotSpotSize() {
|
|
29073
|
+
var _a;
|
|
29074
|
+
return null !== (_a = columnResize.resizeHotSpotSize) && void 0 !== _a ? _a : 16;
|
|
29075
|
+
},
|
|
29074
29076
|
get labelColor() {
|
|
29075
29077
|
var _a;
|
|
29076
29078
|
return null !== (_a = columnResize.labelColor) && void 0 !== _a ? _a : "#FFF";
|
|
@@ -32501,6 +32503,24 @@
|
|
|
32501
32503
|
cursor: "pointer"
|
|
32502
32504
|
};
|
|
32503
32505
|
},
|
|
32506
|
+
get loading() {
|
|
32507
|
+
return {
|
|
32508
|
+
type: "image",
|
|
32509
|
+
src: "https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/media/loading-circle.gif",
|
|
32510
|
+
width: collapse_size,
|
|
32511
|
+
height: collapse_size,
|
|
32512
|
+
name: "loading",
|
|
32513
|
+
positionType: IconPosition.contentLeft,
|
|
32514
|
+
marginLeft: 0,
|
|
32515
|
+
marginRight: 4,
|
|
32516
|
+
hover: {
|
|
32517
|
+
width: collapse_size_2,
|
|
32518
|
+
height: collapse_size_2,
|
|
32519
|
+
bgColor: "rgba(101, 117, 168, 0.1)"
|
|
32520
|
+
},
|
|
32521
|
+
isGif: !0
|
|
32522
|
+
};
|
|
32523
|
+
},
|
|
32504
32524
|
get drillDown() {
|
|
32505
32525
|
return {
|
|
32506
32526
|
name: "drillDown",
|
|
@@ -37465,7 +37485,7 @@
|
|
|
37465
37485
|
}
|
|
37466
37486
|
}
|
|
37467
37487
|
|
|
37468
|
-
var __awaiter$
|
|
37488
|
+
var __awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37469
37489
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37470
37490
|
function fulfilled(value) {
|
|
37471
37491
|
try {
|
|
@@ -37491,7 +37511,7 @@
|
|
|
37491
37511
|
});
|
|
37492
37512
|
};
|
|
37493
37513
|
function dynamicSetX(x, screenLeft, isEnd, proxy) {
|
|
37494
|
-
return __awaiter$
|
|
37514
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
37495
37515
|
if (!screenLeft) return;
|
|
37496
37516
|
const screenLeftCol = screenLeft.col,
|
|
37497
37517
|
screenLeftX = screenLeft.left;
|
|
@@ -37510,7 +37530,7 @@
|
|
|
37510
37530
|
deltaCol > 0 ? (moveColumn(deltaCol, "left", proxy.screenLeftCol, screenLeftX, x, proxy), proxy.updateDeltaX(x, screenLeftX, screenLeftCol), proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX)) : deltaCol < 0 ? (moveColumn(-deltaCol, "right", proxy.screenLeftCol, screenLeftX, x, proxy), proxy.updateDeltaX(x, screenLeftX, screenLeftCol), proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX)) : (proxy.updateDeltaX(x, screenLeftX, screenLeftCol), proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX));
|
|
37511
37531
|
}
|
|
37512
37532
|
function moveColumn(count, direction, screenLeftCol, screenLeftX, x, proxy) {
|
|
37513
|
-
return __awaiter$
|
|
37533
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
37514
37534
|
if ("left" === direction && proxy.colEnd + count > proxy.bodyRightCol ? count = proxy.bodyRightCol - proxy.colEnd : "right" === direction && proxy.colStart - count < proxy.bodyLeftCol && (count = proxy.colStart - proxy.bodyLeftCol), 0 !== count) if (count < 0 && (direction = "left" === direction ? "right" : "left", count = -count), count < proxy.colEnd - proxy.colStart) {
|
|
37515
37535
|
const startCol = "left" === direction ? proxy.colStart : proxy.colEnd - count + 1,
|
|
37516
37536
|
endCol = "left" === direction ? proxy.colStart + count - 1 : proxy.colEnd,
|
|
@@ -37631,7 +37651,7 @@
|
|
|
37631
37651
|
return y = row < table.frozenRowCount ? table.getRowsHeight(0, row - 1) : row >= table.rowCount - table.bottomFrozenRowCount ? table.getRowsHeight(table.rowCount - table.bottomFrozenRowCount, row - 1) : table.getRowsHeight(table.frozenRowCount, row - 1), y;
|
|
37632
37652
|
}
|
|
37633
37653
|
|
|
37634
|
-
var __awaiter$
|
|
37654
|
+
var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37635
37655
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37636
37656
|
function fulfilled(value) {
|
|
37637
37657
|
try {
|
|
@@ -37657,7 +37677,7 @@
|
|
|
37657
37677
|
});
|
|
37658
37678
|
};
|
|
37659
37679
|
function dynamicSetY(y, screenTop, isEnd, proxy) {
|
|
37660
|
-
return __awaiter$
|
|
37680
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
37661
37681
|
if (!screenTop) return;
|
|
37662
37682
|
const screenTopRow = screenTop.row,
|
|
37663
37683
|
screenTopY = screenTop.top;
|
|
@@ -37675,7 +37695,7 @@
|
|
|
37675
37695
|
deltaRow > 0 ? (moveCell(deltaRow, "up", screenTopRow, screenTopY, y, proxy), proxy.updateDeltaY(y, screenTopY, screenTopRow), proxy.updateBody(y - proxy.deltaY)) : deltaRow < 0 ? (moveCell(-deltaRow, "down", screenTopRow, screenTopY, y, proxy), proxy.updateDeltaY(y, screenTopY, screenTopRow), proxy.updateBody(y - proxy.deltaY)) : (proxy.updateDeltaY(y, screenTopY, screenTopRow), proxy.updateBody(y - proxy.deltaY));
|
|
37676
37696
|
}
|
|
37677
37697
|
function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
|
|
37678
|
-
return __awaiter$
|
|
37698
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
37679
37699
|
if ("up" === direction && proxy.rowEnd + count > proxy.bodyBottomRow ? count = proxy.bodyBottomRow - proxy.rowEnd : "down" === direction && proxy.rowStart - count < proxy.bodyTopRow && (count = proxy.rowStart - proxy.bodyTopRow), 0 !== count) if (count < 0 && (direction = "up" === direction ? "down" : "up", count = -count), count < proxy.rowEnd - proxy.rowStart) {
|
|
37680
37700
|
const startRow = "up" === direction ? proxy.rowStart : proxy.rowEnd - count + 1,
|
|
37681
37701
|
endRow = "up" === direction ? proxy.rowStart + count - 1 : proxy.rowEnd,
|
|
@@ -37766,7 +37786,7 @@
|
|
|
37766
37786
|
return proxy.table.scenegraph.updateNextFrame(), sync;
|
|
37767
37787
|
}
|
|
37768
37788
|
|
|
37769
|
-
var __awaiter$
|
|
37789
|
+
var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37770
37790
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37771
37791
|
function fulfilled(value) {
|
|
37772
37792
|
try {
|
|
@@ -37793,7 +37813,7 @@
|
|
|
37793
37813
|
};
|
|
37794
37814
|
function sortVertical(proxy) {
|
|
37795
37815
|
var _a;
|
|
37796
|
-
return __awaiter$
|
|
37816
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
37797
37817
|
let syncTopRow, syncBottomRow;
|
|
37798
37818
|
proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
|
|
37799
37819
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
@@ -37825,7 +37845,7 @@
|
|
|
37825
37845
|
});
|
|
37826
37846
|
}
|
|
37827
37847
|
|
|
37828
|
-
var __awaiter$
|
|
37848
|
+
var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37829
37849
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37830
37850
|
function fulfilled(value) {
|
|
37831
37851
|
try {
|
|
@@ -37851,7 +37871,7 @@
|
|
|
37851
37871
|
});
|
|
37852
37872
|
};
|
|
37853
37873
|
function sortHorizontal(proxy) {
|
|
37854
|
-
return __awaiter$
|
|
37874
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
|
37855
37875
|
proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
|
|
37856
37876
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
37857
37877
|
cellGroup.needUpdate = !0;
|
|
@@ -38087,7 +38107,7 @@
|
|
|
38087
38107
|
return !!(table.theme.headerStyle.textStick || table.theme.rowHeaderStyle.textStick || table.theme.bodyStyle.textStick);
|
|
38088
38108
|
}
|
|
38089
38109
|
|
|
38090
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
38110
|
+
var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
38091
38111
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38092
38112
|
function fulfilled(value) {
|
|
38093
38113
|
try {
|
|
@@ -38167,21 +38187,21 @@
|
|
|
38167
38187
|
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
38168
38188
|
}
|
|
38169
38189
|
progress() {
|
|
38170
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38190
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38171
38191
|
if (!this.isProgressing) return this.isProgressing = !0, new Promise((resolve, reject) => {
|
|
38172
|
-
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
38192
|
+
setTimeout(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
38173
38193
|
this.isProgressing = !1, this.isRelease || (this.colUpdatePos <= this.colEnd ? (yield this.updateColCellGroupsAsync(), yield this.progress()) : this.rowUpdatePos <= this.rowEnd ? (yield this.updateRowCellGroupsAsync(), yield this.progress()) : this.currentCol < this.totalCol ? (yield this.createCol(), yield this.progress()) : this.currentRow < this.totalRow && (yield this.createRow(), yield this.progress()), handleTextStick(this.table), this.table.scenegraph.updateNextFrame(), resolve());
|
|
38174
38194
|
}), 16);
|
|
38175
38195
|
});
|
|
38176
38196
|
});
|
|
38177
38197
|
}
|
|
38178
38198
|
createRow() {
|
|
38179
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38199
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38180
38200
|
this.taskRowCount && this.createRowCellGroup(this.taskRowCount);
|
|
38181
38201
|
});
|
|
38182
38202
|
}
|
|
38183
38203
|
createCol() {
|
|
38184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38204
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38185
38205
|
this.taskColCount && this.createColGroup(this.taskRowCount);
|
|
38186
38206
|
});
|
|
38187
38207
|
}
|
|
@@ -38246,7 +38266,7 @@
|
|
|
38246
38266
|
}
|
|
38247
38267
|
setY(y) {
|
|
38248
38268
|
let isEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
38249
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38269
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38250
38270
|
const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2,
|
|
38251
38271
|
yLimitBottom = this.table.getAllRowsHeight() - yLimitTop,
|
|
38252
38272
|
screenTop = this.table.getTargetRowAt(y + this.table.scenegraph.colHeaderGroup.attribute.height);
|
|
@@ -38255,7 +38275,7 @@
|
|
|
38255
38275
|
}
|
|
38256
38276
|
setX(x) {
|
|
38257
38277
|
let isEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
38258
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38278
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38259
38279
|
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2,
|
|
38260
38280
|
xLimitRight = this.table.getAllColsWidth() - xLimitLeft,
|
|
38261
38281
|
screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);
|
|
@@ -38264,13 +38284,13 @@
|
|
|
38264
38284
|
}
|
|
38265
38285
|
dynamicSetY(y, screenTop) {
|
|
38266
38286
|
let isEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
38267
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38287
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38268
38288
|
dynamicSetY(y, screenTop, isEnd, this);
|
|
38269
38289
|
});
|
|
38270
38290
|
}
|
|
38271
38291
|
dynamicSetX(x, screenLeft) {
|
|
38272
38292
|
let isEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
38273
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38293
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38274
38294
|
dynamicSetX(x, screenLeft, isEnd, this);
|
|
38275
38295
|
});
|
|
38276
38296
|
}
|
|
@@ -38278,7 +38298,7 @@
|
|
|
38278
38298
|
this.table.scenegraph.setBodyAndRowHeaderY(-y);
|
|
38279
38299
|
}
|
|
38280
38300
|
updateRowCellGroupsAsync() {
|
|
38281
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38301
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38282
38302
|
this.updateCellGroups(this.taskRowCount);
|
|
38283
38303
|
});
|
|
38284
38304
|
}
|
|
@@ -38297,7 +38317,7 @@
|
|
|
38297
38317
|
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), "autoHeight" === this.table.heightMode && updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
|
|
38298
38318
|
}
|
|
38299
38319
|
updateColCellGroupsAsync() {
|
|
38300
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38320
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38301
38321
|
this.updateColGroups(this.taskRowCount);
|
|
38302
38322
|
});
|
|
38303
38323
|
}
|
|
@@ -38314,12 +38334,12 @@
|
|
|
38314
38334
|
return cellGroup.needUpdate = !1, newCellGroup || cellGroup;
|
|
38315
38335
|
}
|
|
38316
38336
|
sortCellVertical() {
|
|
38317
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38337
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38318
38338
|
yield sortVertical(this);
|
|
38319
38339
|
});
|
|
38320
38340
|
}
|
|
38321
38341
|
sortCellHorizontal() {
|
|
38322
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38342
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38323
38343
|
yield sortHorizontal(this);
|
|
38324
38344
|
});
|
|
38325
38345
|
}
|
|
@@ -40526,7 +40546,7 @@
|
|
|
40526
40546
|
createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.rowHeaderGroup, this.isPivot || this.table.internalProps.transpose ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
|
|
40527
40547
|
}
|
|
40528
40548
|
getResizeColAt(abstractX, abstractY, cellGroup) {
|
|
40529
|
-
|
|
40549
|
+
const offset = this.table.theme.columnResize.resizeHotSpotSize / 2;
|
|
40530
40550
|
let cell;
|
|
40531
40551
|
if (!cellGroup) {
|
|
40532
40552
|
const drawRange = this.table.getDrawRange();
|
|
@@ -40552,7 +40572,7 @@
|
|
|
40552
40572
|
};
|
|
40553
40573
|
}
|
|
40554
40574
|
getResizeRowAt(abstractX, abstractY, cellGroup) {
|
|
40555
|
-
|
|
40575
|
+
const offset = this.table.theme.columnResize.resizeHotSpotSize / 2;
|
|
40556
40576
|
if (cellGroup) {
|
|
40557
40577
|
let cell;
|
|
40558
40578
|
if (abstractY < cellGroup.globalAABBBounds.y1 + offset ? cell = {
|
|
@@ -42031,10 +42051,7 @@
|
|
|
42031
42051
|
}, 0), this.table.scenegraph.updateChartSizeForResizeColWidth(this.columnResize.col), this.checkFrozen(), this.table.scenegraph.component.hideResizeCol(), this.table.scenegraph.updateNextFrame();
|
|
42032
42052
|
}
|
|
42033
42053
|
startResizeCol(col, x, y, isRightFrozen) {
|
|
42034
|
-
|
|
42035
|
-
this.columnResize.resizing = !0, this.columnResize.col = col, this.columnResize.x = x, this.columnResize.isRightFrozen = isRightFrozen, this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen);
|
|
42036
|
-
const isHasSelected = !!(null === (_a = this.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
42037
|
-
this.updateSelectPos(-1, -1), this.endSelectCells(!0, isHasSelected), this.table.scenegraph.updateNextFrame();
|
|
42054
|
+
this.columnResize.resizing = !0, this.columnResize.col = col, this.columnResize.x = x, this.columnResize.isRightFrozen = isRightFrozen, this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen), this.table.scenegraph.updateNextFrame();
|
|
42038
42055
|
}
|
|
42039
42056
|
updateResizeCol(xInTable, yInTable) {
|
|
42040
42057
|
updateResizeColumn(xInTable, yInTable, this);
|
|
@@ -42667,7 +42684,7 @@
|
|
|
42667
42684
|
event: e.nativeEvent,
|
|
42668
42685
|
target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
|
|
42669
42686
|
mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
|
|
42670
|
-
}), stateManager.interactionState === InteractionState.grabing && !(null === (_g = table.editorManager) || void 0 === _g ? void 0 : _g.editingEditor)) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || (stateManager.isMoveCol() ? eventManager.dealColumnMover(eventArgsSet) : stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_h = table.options.select) || void 0 === _h ? void 0 : _h.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
|
|
42687
|
+
}), stateManager.interactionState === InteractionState.grabing && !(null === (_g = table.editorManager) || void 0 === _g ? void 0 : _g.editingEditor)) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || stateManager.isResizeRow() || (stateManager.isMoveCol() ? eventManager.dealColumnMover(eventArgsSet) : stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_h = table.options.select) || void 0 === _h ? void 0 : _h.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
|
|
42671
42688
|
!(null === (_j = table.options.select) || void 0 === _j ? void 0 : _j.disableDragSelect) && table.eventManager.isDraging && stateManager.isSelecting() && !(null === (_k = table.editorManager) || void 0 === _k ? void 0 : _k.editingEditor) && eventManager.dealTableSelect(eventArgsSet, !0);
|
|
42672
42689
|
const cellGoup = e.path.find(node => "cell" === node.role);
|
|
42673
42690
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && (-1 === table.stateManager.hover.cellPos.col || -1 === table.stateManager.hover.cellPos.row || (null == cellGoup ? void 0 : cellGoup.col) === table.stateManager.hover.cellPos.col && (null == cellGoup ? void 0 : cellGoup.row) === table.stateManager.hover.cellPos.row || table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
@@ -42752,7 +42769,7 @@
|
|
|
42752
42769
|
event: e.nativeEvent
|
|
42753
42770
|
});
|
|
42754
42771
|
}), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
|
|
42755
|
-
stateManager.isResizeCol() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor()), (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
42772
|
+
stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor()), (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
42756
42773
|
col: table.stateManager.hover.cellPos.col,
|
|
42757
42774
|
row: table.stateManager.hover.cellPos.row,
|
|
42758
42775
|
cellRange: table.getCellRangeRelativeRect({
|
|
@@ -42955,14 +42972,14 @@
|
|
|
42955
42972
|
eventArgs: eventArgs
|
|
42956
42973
|
} = eventArgsSet;
|
|
42957
42974
|
if (!(null == eventArgs ? void 0 : eventArgs.targetCell)) {
|
|
42958
|
-
table.getCellAt(eventArgsSet.abstractPos.x -
|
|
42975
|
+
table.getCellAt(eventArgsSet.abstractPos.x - table.theme.columnResize.resizeHotSpotSize / 2, eventArgsSet.abstractPos.y) && table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
42959
42976
|
event: e.nativeEvent
|
|
42960
42977
|
});
|
|
42961
42978
|
}
|
|
42962
42979
|
}
|
|
42963
42980
|
});
|
|
42964
42981
|
}), table.scenegraph.stage.addEventListener("pointerup", e => {
|
|
42965
|
-
"grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol()
|
|
42982
|
+
"grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol() ? endResizeCol(table) : stateManager.isResizeRow() && endResizeRow(table));
|
|
42966
42983
|
}), table.scenegraph.stage.addEventListener("pointertap", e => {
|
|
42967
42984
|
var _a, _b, _c;
|
|
42968
42985
|
const target = e.target;
|
|
@@ -43193,6 +43210,31 @@
|
|
|
43193
43210
|
}
|
|
43194
43211
|
getPixelRatio();
|
|
43195
43212
|
|
|
43213
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
43214
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
43215
|
+
function fulfilled(value) {
|
|
43216
|
+
try {
|
|
43217
|
+
step(generator.next(value));
|
|
43218
|
+
} catch (e) {
|
|
43219
|
+
reject(e);
|
|
43220
|
+
}
|
|
43221
|
+
}
|
|
43222
|
+
function rejected(value) {
|
|
43223
|
+
try {
|
|
43224
|
+
step(generator.throw(value));
|
|
43225
|
+
} catch (e) {
|
|
43226
|
+
reject(e);
|
|
43227
|
+
}
|
|
43228
|
+
}
|
|
43229
|
+
function step(result) {
|
|
43230
|
+
var value;
|
|
43231
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
43232
|
+
resolve(value);
|
|
43233
|
+
})).then(fulfilled, rejected);
|
|
43234
|
+
}
|
|
43235
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43236
|
+
});
|
|
43237
|
+
};
|
|
43196
43238
|
function bindContainerDomListener(eventManager) {
|
|
43197
43239
|
const table = eventManager.table,
|
|
43198
43240
|
stateManager = table.stateManager,
|
|
@@ -43255,12 +43297,16 @@
|
|
|
43255
43297
|
}
|
|
43256
43298
|
}
|
|
43257
43299
|
handleKeydownListener(e);
|
|
43258
|
-
}), handler.on(table.getElement(), "copy", e => {
|
|
43300
|
+
}), handler.on(table.getElement(), "copy", e => __awaiter(this, void 0, void 0, function* () {
|
|
43259
43301
|
var _a, _b;
|
|
43260
43302
|
if (null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.copySelected) {
|
|
43261
43303
|
const data = table.getCopyValue();
|
|
43262
43304
|
if (isValid$1(data)) {
|
|
43263
|
-
|
|
43305
|
+
e.preventDefault();
|
|
43306
|
+
const permissionState = yield navigator.permissions.query({
|
|
43307
|
+
name: "clipboard-write"
|
|
43308
|
+
});
|
|
43309
|
+
if ((null === (_b = navigator.clipboard) || void 0 === _b ? void 0 : _b.write) && "granted" === permissionState.state) {
|
|
43264
43310
|
const setDataToHTML = data => {
|
|
43265
43311
|
const result = ["<table>"],
|
|
43266
43312
|
META_HEAD = ['<meta name="author" content="Visactor"/>', '<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),
|
|
@@ -43290,7 +43336,7 @@
|
|
|
43290
43336
|
});
|
|
43291
43337
|
}
|
|
43292
43338
|
}
|
|
43293
|
-
}), handler.on(table.getElement(), "paste", e => {
|
|
43339
|
+
})), handler.on(table.getElement(), "paste", e => {
|
|
43294
43340
|
var _a, _b, _c, _d;
|
|
43295
43341
|
if ((null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.pasteValueToCell) && table.changeCellValues) {
|
|
43296
43342
|
if (null === (_b = table.editorManager) || void 0 === _b ? void 0 : _b.editingEditor) return;
|
|
@@ -46326,7 +46372,7 @@
|
|
|
46326
46372
|
constructor(container) {
|
|
46327
46373
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46328
46374
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46329
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.
|
|
46375
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.2", 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");
|
|
46330
46376
|
const {
|
|
46331
46377
|
frozenColCount = 0,
|
|
46332
46378
|
frozenRowCount: frozenRowCount,
|