@visactor/vtable-calendar 1.17.6-alpha.2 → 1.17.6-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38098,7 +38098,7 @@
38098
38098
  rightBottomCornerGroup: rightBottomCornerGroup
38099
38099
  } = table.scenegraph;
38100
38100
  let distCol, distRow, distColForCompute, distRowForCompute;
38101
- proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
38101
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
38102
38102
  x: table.getFrozenColsWidth(),
38103
38103
  y: table.getFrozenRowsHeight()
38104
38104
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
@@ -38934,7 +38934,7 @@
38934
38934
  }
38935
38935
  createColGroup(onceCount) {
38936
38936
  const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
38937
- "adaptive" !== this.table.widthMode && computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
38937
+ computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
38938
38938
  for (let row = 0; row < this.table.rowCount; row++) {
38939
38939
  const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
38940
38940
  "cell" === cellGroup.role && isNumber$4(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol && this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
@@ -39016,7 +39016,7 @@
39016
39016
  }
39017
39017
  updateColGroups(count) {
39018
39018
  const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);
39019
- "autoWidth" === this.table.widthMode && computeColsWidth(this.table, this.colUpdatePos, distCol), updateColContent(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
39019
+ computeColsWidth(this.table, this.colUpdatePos, distCol), updateColContent(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
39020
39020
  }
39021
39021
  updateCellGroupPosition(cellGroup, newRow, y) {
39022
39022
  cellGroup.row = newRow, cellGroup.mergeStartCol = void 0, cellGroup.mergeStartRow = void 0, cellGroup.mergeEndCol = void 0, cellGroup.mergeEndRow = void 0, cellGroup.setAttribute("y", y), cellGroup.needUpdate = !0, cellGroup.needUpdateForAutoRowHeight = !0;
@@ -43940,7 +43940,7 @@
43940
43940
  var _a;
43941
43941
  if (!1 === isCompleteEdit) return;
43942
43942
  const hitIcon = (null === (_a = e.target.role) || void 0 === _a ? void 0 : _a.startsWith("icon")) ? e.target : void 0;
43943
- if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
43943
+ if (eventManager.downIcon = hitIcon, hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
43944
43944
  table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
43945
43945
  const {
43946
43946
  eventArgs: eventArgs
@@ -47703,7 +47703,7 @@
47703
47703
  constructor(container) {
47704
47704
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47705
47705
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47706
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.6-alpha.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");
47706
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.6-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47707
47707
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47708
47708
  const {
47709
47709
  frozenColCount = 0,
@@ -51922,7 +51922,7 @@
51922
51922
  return {};
51923
51923
  }
51924
51924
 
51925
- function listTableChangeCellValue(col, row, value, workOnEditableCell, table) {
51925
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
51926
51926
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
51927
51927
  const recordIndex = table.getRecordShowIndexByCell(col, row),
51928
51928
  {
@@ -51953,7 +51953,7 @@
51953
51953
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
51954
51954
  }
51955
51955
  const changedValue = table.getCellOriginValue(col, row);
51956
- oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
51956
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
51957
51957
  col: col,
51958
51958
  row: row,
51959
51959
  rawValue: beforeChangeValue,
@@ -51962,7 +51962,7 @@
51962
51962
  }), table.scenegraph.updateNextFrame();
51963
51963
  }
51964
51964
  }
51965
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, table) {
51965
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
51966
51966
  var _a, _b;
51967
51967
  let pasteColEnd = startCol,
51968
51968
  pasteRowEnd = startRow;
@@ -52006,7 +52006,7 @@
52006
52006
  oldValue = oldValues[i][j];
52007
52007
  table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
52008
52008
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
52009
- oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
52009
+ oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
52010
52010
  col: startCol + j,
52011
52011
  row: startRow + i,
52012
52012
  rawValue: beforeChangeValue,
@@ -52958,11 +52958,13 @@
52958
52958
  }
52959
52959
  changeCellValue(col, row, value) {
52960
52960
  let workOnEditableCell = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
52961
- return listTableChangeCellValue(col, row, value, workOnEditableCell, this);
52961
+ let triggerEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
52962
+ return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
52962
52963
  }
52963
52964
  changeCellValues(startCol, startRow, values) {
52964
52965
  let workOnEditableCell = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
52965
- return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
52966
+ let triggerEvent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
52967
+ return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this);
52966
52968
  }
52967
52969
  addRecord(record, recordIndex) {
52968
52970
  var _a;