@visactor/vtable-calendar 1.13.1-alpha.6 → 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.
@@ -5653,7 +5653,7 @@
5653
5653
  return null;
5654
5654
  }
5655
5655
 
5656
- var __awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$7(this, void 0, void 0, function* () {
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$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$6(this, void 0, void 0, function* () {
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$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
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$5(this, void 0, void 0, function* () {
15894
- yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$5(this, void 0, void 0, function* () {
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$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$4(this, void 0, void 0, function* () {
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$4(this, void 0, void 0, function* () {
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$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$3(this, void 0, void 0, function* () {
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$3(this, void 0, void 0, function* () {
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$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$2(this, void 0, void 0, function* () {
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$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
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$1(this, void 0, void 0, function* () {
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
  }
@@ -41524,10 +41524,8 @@
41524
41524
  function setCheckedState(col, row, field, checked, state) {
41525
41525
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
41526
41526
  if (recordIndex >= 0) {
41527
- const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
41528
- state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
41529
- [field]: checked
41530
- });
41527
+ const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
41528
+ state.checkedState[dataIndex] || (state.checkedState[dataIndex] = {}), state.checkedState[dataIndex][field] = checked;
41531
41529
  }
41532
41530
  }
41533
41531
  function setHeaderCheckedState(field, checked, state) {
@@ -41541,23 +41539,21 @@
41541
41539
  if (state.table.isHeader(col, row)) {
41542
41540
  if (isValid$1(state.headerCheckedState[field])) return state.headerCheckedState[field];
41543
41541
  if ("function" == typeof checked) return;
41544
- if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.size) > 0) {
41542
+ if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.length) > 0) {
41545
41543
  return state.updateHeaderCheckedState(field, col, row);
41546
41544
  }
41547
41545
  return state.headerCheckedState[field];
41548
41546
  }
41549
41547
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
41550
41548
  if (recordIndex >= 0) {
41551
- const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
41552
- if (isValid$1(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
41553
- state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
41554
- [field]: checked
41555
- });
41549
+ const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
41550
+ if (isValid$1(null === (_b = state.checkedState[dataIndex]) || void 0 === _b ? void 0 : _b[field])) return state.checkedState[dataIndex][field];
41551
+ state.checkedState[dataIndex] || (state.checkedState[dataIndex] = {}), state.checkedState[dataIndex][field] = checked;
41556
41552
  }
41557
41553
  return checked;
41558
41554
  }
41559
41555
  function initCheckedState(records, state) {
41560
- state.checkedState.clear(), state.headerCheckedState = {}, state.radioState = {};
41556
+ state.checkedState = [], state.headerCheckedState = {}, state.radioState = {};
41561
41557
  let isNeedInitHeaderCheckedStateFromRecord = !1;
41562
41558
  if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
41563
41559
  if ("checkbox" === hd.headerType) {
@@ -41585,32 +41581,29 @@
41585
41581
  });
41586
41582
  }
41587
41583
  }
41588
- const dataIndex = state.table.dataSource.getIndexKey(index).toString();
41589
- state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
41584
+ state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
41590
41585
  });
41591
41586
  }));
41592
41587
  }
41593
41588
  function updateHeaderCheckedState(field, state, col, row) {
41594
- let allChecked = !0,
41595
- allUnChecked = !0,
41596
- hasChecked = !1;
41597
- return state.checkedState.forEach((check_state, index) => {
41598
- index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
41599
- const tableIndex = state.table.getTableIndexByRecordIndex(index),
41600
- mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
41601
- data = state.table.dataSource.get(index);
41602
- mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
41603
- }), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
41589
+ const allChecked = state.checkedState.every((check_state, index) => {
41590
+ const tableIndex = state.table.getTableIndexByRecordIndex(index);
41591
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !0 === (null == check_state ? void 0 : check_state[field]);
41592
+ });
41593
+ if (allChecked) return state.headerCheckedState[field] = !0, allChecked;
41594
+ if (state.checkedState.every((check_state, index) => {
41595
+ const tableIndex = state.table.getTableIndexByRecordIndex(index);
41596
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !1 === (null == check_state ? void 0 : check_state[field]);
41597
+ })) return state.headerCheckedState[field] = !1, !1;
41598
+ return !!state.checkedState.find(check_state => !0 === (null == check_state ? void 0 : check_state[field])) && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
41604
41599
  }
41605
41600
  function initLeftRecordsCheckState(records, state) {
41606
- for (let index = state.checkedState.size; index < records.length; index++) {
41601
+ for (let index = state.checkedState.length; index < records.length; index++) {
41607
41602
  const record = records[index];
41608
41603
  state._checkboxCellTypeFields.forEach(field => {
41609
41604
  const value = record[field];
41610
41605
  let isChecked;
41611
- isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value);
41612
- const dataIndex = index.toString();
41613
- state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
41606
+ isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
41614
41607
  });
41615
41608
  }
41616
41609
  }
@@ -41643,35 +41636,14 @@
41643
41636
  checkedState: checkedState,
41644
41637
  table: table
41645
41638
  } = state;
41646
- let source, target;
41647
- if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.getRecordIndexByCell(0, sourceIndex), target = table.getRecordIndexByCell(0, targetIndex)), isNumber$2(source) && isNumber$2(target)) {
41648
- if (sourceIndex > targetIndex) {
41649
- const sourceRecord = checkedState.get(sourceIndex.toString());
41650
- for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
41651
- checkedState.set(targetIndex.toString(), sourceRecord);
41652
- } else if (sourceIndex < targetIndex) {
41653
- const sourceRecord = checkedState.get(sourceIndex.toString());
41654
- for (let i = sourceIndex; i < targetIndex; i++) checkedState.set(i.toString(), checkedState.get((i + 1).toString()));
41655
- checkedState.set(targetIndex.toString(), sourceRecord);
41656
- }
41657
- } else if (isArray$1(source) && isArray$1(target)) if ((sourceIndex = source[source.length - 1]) > (targetIndex = target[target.length - 1])) {
41658
- const sourceRecord = checkedState.get(source.toString());
41659
- for (let i = sourceIndex; i > targetIndex; i--) {
41660
- const now = [...source];
41661
- now[now.length - 1] = i;
41662
- const last = [...source];
41663
- last[last.length - 1] = i - 1, checkedState.set(now.toString(), checkedState.get(last.toString()));
41664
- }
41665
- checkedState.set(target.toString(), sourceRecord);
41639
+ if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex), targetIndex = table.getRecordShowIndexByCell(0, targetIndex)), sourceIndex > targetIndex) {
41640
+ const sourceRecord = checkedState[sourceIndex];
41641
+ for (let i = sourceIndex; i > targetIndex; i--) checkedState[i] = checkedState[i - 1];
41642
+ checkedState[targetIndex] = sourceRecord;
41666
41643
  } else if (sourceIndex < targetIndex) {
41667
- const sourceRecord = checkedState.get(source.toString());
41668
- for (let i = sourceIndex; i < targetIndex; i++) {
41669
- const now = [...source];
41670
- now[now.length - 1] = i;
41671
- const next = [...source];
41672
- next[next.length - 1] = i + 1, checkedState.set(now.toString(), checkedState.get(next.toString()));
41673
- }
41674
- checkedState.set(target.toString(), sourceRecord);
41644
+ const sourceRecord = checkedState[sourceIndex];
41645
+ for (let i = sourceIndex; i < targetIndex; i++) checkedState[i] = checkedState[i + 1];
41646
+ checkedState[targetIndex] = sourceRecord;
41675
41647
  }
41676
41648
  }
41677
41649
  function getGroupCheckboxState(table) {
@@ -41683,7 +41655,7 @@
41683
41655
  const {
41684
41656
  vtableOriginIndex: vtableOriginIndex
41685
41657
  } = dataSource.getRawRecord(indexArr);
41686
- result[vtableOriginIndex] = table.stateManager.checkedState.get(indexArr.toString());
41658
+ result[vtableOriginIndex] = table.stateManager.checkedState[indexArr];
41687
41659
  }
41688
41660
  }), result;
41689
41661
  }
@@ -41774,7 +41746,7 @@
41774
41746
 
41775
41747
  class StateManager {
41776
41748
  constructor(table) {
41777
- this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
41749
+ this.fastScrolling = !1, this.checkedState = [], this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
41778
41750
  this.updateInteractionState(null != state ? state : InteractionState.default);
41779
41751
  }, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
41780
41752
  }
@@ -42457,7 +42429,7 @@
42457
42429
  return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
42458
42430
  }
42459
42431
  changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
42460
- this.checkedState.size && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
42432
+ this.checkedState.length && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
42461
42433
  }
42462
42434
  setCustomSelectRanges(customSelectRanges) {
42463
42435
  deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
@@ -43221,6 +43193,31 @@
43221
43193
  }
43222
43194
  getPixelRatio();
43223
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
+ };
43224
43221
  function bindContainerDomListener(eventManager) {
43225
43222
  const table = eventManager.table,
43226
43223
  stateManager = table.stateManager,
@@ -43283,12 +43280,16 @@
43283
43280
  }
43284
43281
  }
43285
43282
  handleKeydownListener(e);
43286
- }), handler.on(table.getElement(), "copy", e => {
43283
+ }), handler.on(table.getElement(), "copy", e => __awaiter(this, void 0, void 0, function* () {
43287
43284
  var _a, _b;
43288
43285
  if (null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.copySelected) {
43289
43286
  const data = table.getCopyValue();
43290
43287
  if (isValid$1(data)) {
43291
- if (e.preventDefault(), null === (_b = navigator.clipboard) || void 0 === _b ? void 0 : _b.write) {
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) {
43292
43293
  const setDataToHTML = data => {
43293
43294
  const result = ["<table>"],
43294
43295
  META_HEAD = ['<meta name="author" content="Visactor"/>', '<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),
@@ -43318,7 +43319,7 @@
43318
43319
  });
43319
43320
  }
43320
43321
  }
43321
- }), handler.on(table.getElement(), "paste", e => {
43322
+ })), handler.on(table.getElement(), "paste", e => {
43322
43323
  var _a, _b, _c, _d;
43323
43324
  if ((null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.pasteValueToCell) && table.changeCellValues) {
43324
43325
  if (null === (_b = table.editorManager) || void 0 === _b ? void 0 : _b.editingEditor) return;
@@ -46354,7 +46355,7 @@
46354
46355
  constructor(container) {
46355
46356
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46356
46357
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46357
- if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.6", 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");
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");
46358
46359
  const {
46359
46360
  frozenColCount = 0,
46360
46361
  frozenRowCount: frozenRowCount,
@@ -50556,11 +50557,11 @@
50556
50557
  this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph();
50557
50558
  }
50558
50559
  getCheckboxState(field) {
50559
- if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
50560
- let stateArr = this.stateManager.checkedState.values();
50560
+ if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
50561
+ let stateArr = this.stateManager.checkedState;
50561
50562
  return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), stateArr.map(state => state[field]);
50562
50563
  }
50563
- return new Array(...this.stateManager.checkedState.values());
50564
+ return this.stateManager.checkedState;
50564
50565
  }
50565
50566
  getCellCheckboxState(col, row) {
50566
50567
  var _a;
@@ -50568,8 +50569,8 @@
50568
50569
  field = null == define ? void 0 : define.field,
50569
50570
  cellType = this.getCellType(col, row);
50570
50571
  if (isValid$1(field) && "checkbox" === cellType) {
50571
- const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)).toString();
50572
- return null === (_a = this.stateManager.checkedState.get(dataIndex)) || void 0 === _a ? void 0 : _a[field];
50572
+ const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row));
50573
+ return null === (_a = this.stateManager.checkedState[dataIndex]) || void 0 === _a ? void 0 : _a[field];
50573
50574
  }
50574
50575
  }
50575
50576
  getRadioState(field) {