@visactor/vtable-calendar 1.13.1 → 1.13.2-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/dist/vtable-calendar.js +71 -42
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
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
|
})
|
|
@@ -37465,7 +37465,7 @@
|
|
|
37465
37465
|
}
|
|
37466
37466
|
}
|
|
37467
37467
|
|
|
37468
|
-
var __awaiter$
|
|
37468
|
+
var __awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37469
37469
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37470
37470
|
function fulfilled(value) {
|
|
37471
37471
|
try {
|
|
@@ -37491,7 +37491,7 @@
|
|
|
37491
37491
|
});
|
|
37492
37492
|
};
|
|
37493
37493
|
function dynamicSetX(x, screenLeft, isEnd, proxy) {
|
|
37494
|
-
return __awaiter$
|
|
37494
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
37495
37495
|
if (!screenLeft) return;
|
|
37496
37496
|
const screenLeftCol = screenLeft.col,
|
|
37497
37497
|
screenLeftX = screenLeft.left;
|
|
@@ -37510,7 +37510,7 @@
|
|
|
37510
37510
|
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
37511
|
}
|
|
37512
37512
|
function moveColumn(count, direction, screenLeftCol, screenLeftX, x, proxy) {
|
|
37513
|
-
return __awaiter$
|
|
37513
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
37514
37514
|
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
37515
|
const startCol = "left" === direction ? proxy.colStart : proxy.colEnd - count + 1,
|
|
37516
37516
|
endCol = "left" === direction ? proxy.colStart + count - 1 : proxy.colEnd,
|
|
@@ -37631,7 +37631,7 @@
|
|
|
37631
37631
|
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
37632
|
}
|
|
37633
37633
|
|
|
37634
|
-
var __awaiter$
|
|
37634
|
+
var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37635
37635
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37636
37636
|
function fulfilled(value) {
|
|
37637
37637
|
try {
|
|
@@ -37657,7 +37657,7 @@
|
|
|
37657
37657
|
});
|
|
37658
37658
|
};
|
|
37659
37659
|
function dynamicSetY(y, screenTop, isEnd, proxy) {
|
|
37660
|
-
return __awaiter$
|
|
37660
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
37661
37661
|
if (!screenTop) return;
|
|
37662
37662
|
const screenTopRow = screenTop.row,
|
|
37663
37663
|
screenTopY = screenTop.top;
|
|
@@ -37675,7 +37675,7 @@
|
|
|
37675
37675
|
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
37676
|
}
|
|
37677
37677
|
function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
|
|
37678
|
-
return __awaiter$
|
|
37678
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
37679
37679
|
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
37680
|
const startRow = "up" === direction ? proxy.rowStart : proxy.rowEnd - count + 1,
|
|
37681
37681
|
endRow = "up" === direction ? proxy.rowStart + count - 1 : proxy.rowEnd,
|
|
@@ -37766,7 +37766,7 @@
|
|
|
37766
37766
|
return proxy.table.scenegraph.updateNextFrame(), sync;
|
|
37767
37767
|
}
|
|
37768
37768
|
|
|
37769
|
-
var __awaiter$
|
|
37769
|
+
var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37770
37770
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37771
37771
|
function fulfilled(value) {
|
|
37772
37772
|
try {
|
|
@@ -37793,7 +37793,7 @@
|
|
|
37793
37793
|
};
|
|
37794
37794
|
function sortVertical(proxy) {
|
|
37795
37795
|
var _a;
|
|
37796
|
-
return __awaiter$
|
|
37796
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
37797
37797
|
let syncTopRow, syncBottomRow;
|
|
37798
37798
|
proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
|
|
37799
37799
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
@@ -37825,7 +37825,7 @@
|
|
|
37825
37825
|
});
|
|
37826
37826
|
}
|
|
37827
37827
|
|
|
37828
|
-
var __awaiter$
|
|
37828
|
+
var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37829
37829
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37830
37830
|
function fulfilled(value) {
|
|
37831
37831
|
try {
|
|
@@ -37851,7 +37851,7 @@
|
|
|
37851
37851
|
});
|
|
37852
37852
|
};
|
|
37853
37853
|
function sortHorizontal(proxy) {
|
|
37854
|
-
return __awaiter$
|
|
37854
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
|
37855
37855
|
proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
|
|
37856
37856
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
37857
37857
|
cellGroup.needUpdate = !0;
|
|
@@ -38087,7 +38087,7 @@
|
|
|
38087
38087
|
return !!(table.theme.headerStyle.textStick || table.theme.rowHeaderStyle.textStick || table.theme.bodyStyle.textStick);
|
|
38088
38088
|
}
|
|
38089
38089
|
|
|
38090
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
38090
|
+
var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
38091
38091
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38092
38092
|
function fulfilled(value) {
|
|
38093
38093
|
try {
|
|
@@ -38167,21 +38167,21 @@
|
|
|
38167
38167
|
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
38168
38168
|
}
|
|
38169
38169
|
progress() {
|
|
38170
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38170
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38171
38171
|
if (!this.isProgressing) return this.isProgressing = !0, new Promise((resolve, reject) => {
|
|
38172
|
-
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
38172
|
+
setTimeout(() => __awaiter$1(this, void 0, void 0, function* () {
|
|
38173
38173
|
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
38174
|
}), 16);
|
|
38175
38175
|
});
|
|
38176
38176
|
});
|
|
38177
38177
|
}
|
|
38178
38178
|
createRow() {
|
|
38179
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38179
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38180
38180
|
this.taskRowCount && this.createRowCellGroup(this.taskRowCount);
|
|
38181
38181
|
});
|
|
38182
38182
|
}
|
|
38183
38183
|
createCol() {
|
|
38184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38184
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38185
38185
|
this.taskColCount && this.createColGroup(this.taskRowCount);
|
|
38186
38186
|
});
|
|
38187
38187
|
}
|
|
@@ -38246,7 +38246,7 @@
|
|
|
38246
38246
|
}
|
|
38247
38247
|
setY(y) {
|
|
38248
38248
|
let isEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
38249
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38249
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38250
38250
|
const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2,
|
|
38251
38251
|
yLimitBottom = this.table.getAllRowsHeight() - yLimitTop,
|
|
38252
38252
|
screenTop = this.table.getTargetRowAt(y + this.table.scenegraph.colHeaderGroup.attribute.height);
|
|
@@ -38255,7 +38255,7 @@
|
|
|
38255
38255
|
}
|
|
38256
38256
|
setX(x) {
|
|
38257
38257
|
let isEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
38258
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38258
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38259
38259
|
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2,
|
|
38260
38260
|
xLimitRight = this.table.getAllColsWidth() - xLimitLeft,
|
|
38261
38261
|
screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);
|
|
@@ -38264,13 +38264,13 @@
|
|
|
38264
38264
|
}
|
|
38265
38265
|
dynamicSetY(y, screenTop) {
|
|
38266
38266
|
let isEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
38267
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38267
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38268
38268
|
dynamicSetY(y, screenTop, isEnd, this);
|
|
38269
38269
|
});
|
|
38270
38270
|
}
|
|
38271
38271
|
dynamicSetX(x, screenLeft) {
|
|
38272
38272
|
let isEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
38273
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38273
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38274
38274
|
dynamicSetX(x, screenLeft, isEnd, this);
|
|
38275
38275
|
});
|
|
38276
38276
|
}
|
|
@@ -38278,7 +38278,7 @@
|
|
|
38278
38278
|
this.table.scenegraph.setBodyAndRowHeaderY(-y);
|
|
38279
38279
|
}
|
|
38280
38280
|
updateRowCellGroupsAsync() {
|
|
38281
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38281
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38282
38282
|
this.updateCellGroups(this.taskRowCount);
|
|
38283
38283
|
});
|
|
38284
38284
|
}
|
|
@@ -38297,7 +38297,7 @@
|
|
|
38297
38297
|
"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
38298
|
}
|
|
38299
38299
|
updateColCellGroupsAsync() {
|
|
38300
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38300
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38301
38301
|
this.updateColGroups(this.taskRowCount);
|
|
38302
38302
|
});
|
|
38303
38303
|
}
|
|
@@ -38314,12 +38314,12 @@
|
|
|
38314
38314
|
return cellGroup.needUpdate = !1, newCellGroup || cellGroup;
|
|
38315
38315
|
}
|
|
38316
38316
|
sortCellVertical() {
|
|
38317
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38317
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38318
38318
|
yield sortVertical(this);
|
|
38319
38319
|
});
|
|
38320
38320
|
}
|
|
38321
38321
|
sortCellHorizontal() {
|
|
38322
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38322
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
38323
38323
|
yield sortHorizontal(this);
|
|
38324
38324
|
});
|
|
38325
38325
|
}
|
|
@@ -43193,6 +43193,31 @@
|
|
|
43193
43193
|
}
|
|
43194
43194
|
getPixelRatio();
|
|
43195
43195
|
|
|
43196
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
43197
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
43198
|
+
function fulfilled(value) {
|
|
43199
|
+
try {
|
|
43200
|
+
step(generator.next(value));
|
|
43201
|
+
} catch (e) {
|
|
43202
|
+
reject(e);
|
|
43203
|
+
}
|
|
43204
|
+
}
|
|
43205
|
+
function rejected(value) {
|
|
43206
|
+
try {
|
|
43207
|
+
step(generator.throw(value));
|
|
43208
|
+
} catch (e) {
|
|
43209
|
+
reject(e);
|
|
43210
|
+
}
|
|
43211
|
+
}
|
|
43212
|
+
function step(result) {
|
|
43213
|
+
var value;
|
|
43214
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
43215
|
+
resolve(value);
|
|
43216
|
+
})).then(fulfilled, rejected);
|
|
43217
|
+
}
|
|
43218
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43219
|
+
});
|
|
43220
|
+
};
|
|
43196
43221
|
function bindContainerDomListener(eventManager) {
|
|
43197
43222
|
const table = eventManager.table,
|
|
43198
43223
|
stateManager = table.stateManager,
|
|
@@ -43255,12 +43280,16 @@
|
|
|
43255
43280
|
}
|
|
43256
43281
|
}
|
|
43257
43282
|
handleKeydownListener(e);
|
|
43258
|
-
}), handler.on(table.getElement(), "copy", e => {
|
|
43283
|
+
}), handler.on(table.getElement(), "copy", e => __awaiter(this, void 0, void 0, function* () {
|
|
43259
43284
|
var _a, _b;
|
|
43260
43285
|
if (null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.copySelected) {
|
|
43261
43286
|
const data = table.getCopyValue();
|
|
43262
43287
|
if (isValid$1(data)) {
|
|
43263
|
-
|
|
43288
|
+
e.preventDefault();
|
|
43289
|
+
const permissionState = yield navigator.permissions.query({
|
|
43290
|
+
name: "clipboard-write"
|
|
43291
|
+
});
|
|
43292
|
+
if ((null === (_b = navigator.clipboard) || void 0 === _b ? void 0 : _b.write) && "granted" === permissionState.state) {
|
|
43264
43293
|
const setDataToHTML = data => {
|
|
43265
43294
|
const result = ["<table>"],
|
|
43266
43295
|
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 +43319,7 @@
|
|
|
43290
43319
|
});
|
|
43291
43320
|
}
|
|
43292
43321
|
}
|
|
43293
|
-
}), handler.on(table.getElement(), "paste", e => {
|
|
43322
|
+
})), handler.on(table.getElement(), "paste", e => {
|
|
43294
43323
|
var _a, _b, _c, _d;
|
|
43295
43324
|
if ((null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.pasteValueToCell) && table.changeCellValues) {
|
|
43296
43325
|
if (null === (_b = table.editorManager) || void 0 === _b ? void 0 : _b.editingEditor) return;
|
|
@@ -46326,7 +46355,7 @@
|
|
|
46326
46355
|
constructor(container) {
|
|
46327
46356
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46328
46357
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46329
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.
|
|
46358
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.2-alpha.0", 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
46359
|
const {
|
|
46331
46360
|
frozenColCount = 0,
|
|
46332
46361
|
frozenRowCount: frozenRowCount,
|