@visactor/vtable-calendar 1.25.1-alpha.1 → 1.26.1-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.
@@ -1789,6 +1789,20 @@
1789
1789
  function crossProduct(dir1, dir2) {
1790
1790
  return dir1[0] * dir2[1] - dir1[1] * dir2[0];
1791
1791
  }
1792
+ function fixPrecision$1(num, precision = 10) {
1793
+ return Math.round(num * precision) / precision;
1794
+ }
1795
+ function getDecimalPlaces(n) {
1796
+ const dStr = n.toString().split(/[eE]/),
1797
+ s = (dStr[0].split(".")[1] || "").length - (+dStr[1] || 0);
1798
+ return s > 0 ? s : 0;
1799
+ }
1800
+ function precisionAdd(a, b) {
1801
+ return fixPrecision$1(a + b, 10 ** Math.max(getDecimalPlaces(a), getDecimalPlaces(b)));
1802
+ }
1803
+ function precisionSub(a, b) {
1804
+ return fixPrecision$1(a - b, 10 ** Math.max(getDecimalPlaces(a), getDecimalPlaces(b)));
1805
+ }
1792
1806
 
1793
1807
  class Point {
1794
1808
  constructor(x = 0, y = 0, x1, y1) {
@@ -33714,42 +33728,54 @@
33714
33728
  if (record) if (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && this.children) {
33715
33729
  this.children.push(record);
33716
33730
  const value = record.value();
33717
- this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
33731
+ this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
33718
33732
  } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
33719
33733
  const value = parseFloat(record[this.field]);
33720
- this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
33734
+ this.sum = precisionAdd(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
33721
33735
  }
33722
33736
  this.clearCacheValue();
33723
33737
  }
33724
33738
  deleteRecord(record) {
33725
- if (record) if (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && this.children) {
33726
- this.children = this.children.filter(item => item !== record);
33727
- const value = record.value();
33728
- this.sum -= null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum -= value : value < 0 && (this.nagetiveSum -= value));
33729
- } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
33730
- const value = parseFloat(record[this.field]);
33731
- this.sum -= value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum -= value : value < 0 && (this.nagetiveSum -= value));
33739
+ if (record) {
33740
+ if (this.isRecord && this.records) {
33741
+ const index = this.records.indexOf(record);
33742
+ -1 !== index && this.records.splice(index, 1);
33743
+ }
33744
+ if (record.isAggregator && this.children) {
33745
+ const index = this.children.indexOf(record);
33746
+ -1 !== index && this.children.splice(index, 1);
33747
+ const value = record.value();
33748
+ this.sum = precisionSub(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionSub(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, value)));
33749
+ } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
33750
+ const value = parseFloat(record[this.field]);
33751
+ this.sum = precisionSub(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionSub(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, value)));
33752
+ }
33732
33753
  }
33733
33754
  this.clearCacheValue();
33734
33755
  }
33735
33756
  updateRecord(oldRecord, newRecord) {
33736
33757
  if (oldRecord && newRecord) {
33737
- if (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && this.children) {
33738
- const oldValue = oldRecord.value();
33739
- this.children = this.children.filter(item => item !== oldRecord);
33758
+ if (this.isRecord && this.records) {
33759
+ const index = this.records.indexOf(oldRecord);
33760
+ -1 !== index && (this.records[index] = newRecord);
33761
+ }
33762
+ if (oldRecord.isAggregator && this.children) {
33763
+ const oldValue = oldRecord.value(),
33764
+ index = this.children.indexOf(oldRecord);
33765
+ -1 !== index && (this.children[index] = newRecord);
33740
33766
  const newValue = newRecord.value();
33741
- this.children.push(newRecord), this.sum += newValue - oldValue, this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum -= oldValue : oldValue < 0 && (this.nagetiveSum -= oldValue), newValue > 0 ? this.positiveSum += newValue : newValue < 0 && (this.nagetiveSum += newValue));
33767
+ this.sum = precisionAdd(this.sum, precisionSub(newValue, oldValue)), this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum = precisionSub(this.positiveSum, oldValue) : oldValue < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, oldValue)), newValue > 0 ? this.positiveSum = precisionAdd(this.positiveSum, newValue) : newValue < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, newValue)));
33742
33768
  } else if (this.field && !isNaN(parseFloat(oldRecord[this.field]))) {
33743
33769
  const oldValue = parseFloat(oldRecord[this.field]),
33744
33770
  newValue = parseFloat(newRecord[this.field]);
33745
- this.sum += newValue - oldValue, this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum -= oldValue : oldValue < 0 && (this.nagetiveSum -= oldValue), newValue > 0 ? this.positiveSum += newValue : newValue < 0 && (this.nagetiveSum += newValue));
33771
+ this.sum = precisionAdd(this.sum, precisionSub(newValue, oldValue)), this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum = precisionSub(this.positiveSum, oldValue) : oldValue < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, oldValue)), newValue > 0 ? this.positiveSum = precisionAdd(this.positiveSum, newValue) : newValue < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, newValue)));
33746
33772
  }
33747
33773
  this.clearCacheValue();
33748
33774
  }
33749
33775
  }
33750
33776
  value() {
33751
- var _a, _b;
33752
- return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.sum : void 0;
33777
+ var _a;
33778
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.records && this.records.length >= 1 || !1 === this.isRecord ? this.sum : void 0;
33753
33779
  }
33754
33780
  positiveValue() {
33755
33781
  return this.positiveSum;
@@ -33765,16 +33791,16 @@
33765
33791
  const child = this.children[i];
33766
33792
  if (child.isAggregator) {
33767
33793
  const value = child.value();
33768
- this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
33794
+ this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
33769
33795
  }
33770
33796
  } else if (this.records) for (let i = 0; i < this.records.length; i++) {
33771
33797
  const record = this.records[i];
33772
33798
  if (record.isAggregator) {
33773
33799
  const value = record.value();
33774
- this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
33800
+ this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
33775
33801
  } else if (this.field && !isNaN(parseFloat(record[this.field]))) {
33776
33802
  const value = parseFloat(record[this.field]);
33777
- this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
33803
+ this.sum = precisionAdd(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
33778
33804
  }
33779
33805
  }
33780
33806
  }
@@ -33817,17 +33843,43 @@
33817
33843
  super(...arguments), this.type = AggregationType.AVG, this.sum = 0, this.count = 0;
33818
33844
  }
33819
33845
  push(record) {
33820
- record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && this.children.push(record), this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++)), this.clearCacheValue();
33846
+ record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && this.children.push(record), this.sum = precisionAdd(this.sum, record.sum), this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionAdd(this.sum, parseFloat(record[this.field])), this.count++)), this.clearCacheValue();
33821
33847
  }
33822
33848
  deleteRecord(record) {
33823
- record && (this.isRecord && this.records && (this.records = this.records.filter(item => item !== record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && (this.children = this.children.filter(item => item !== record)), this.sum -= record.sum, this.count -= record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum -= parseFloat(record[this.field]), this.count--)), this.clearCacheValue();
33849
+ if (record) {
33850
+ if (this.isRecord && this.records) {
33851
+ const index = this.records.indexOf(record);
33852
+ -1 !== index && this.records.splice(index, 1);
33853
+ }
33854
+ if (record.isAggregator && record.type === AggregationType.AVG) {
33855
+ if (this.children) {
33856
+ const index = this.children.indexOf(record);
33857
+ -1 !== index && this.children.splice(index, 1);
33858
+ }
33859
+ this.sum = precisionSub(this.sum, record.sum), this.count -= record.count;
33860
+ } else this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionSub(this.sum, parseFloat(record[this.field])), this.count--);
33861
+ }
33862
+ this.clearCacheValue();
33824
33863
  }
33825
33864
  updateRecord(oldRecord, newRecord) {
33826
- oldRecord && newRecord && (this.isRecord && this.records && (this.records = this.records.map(item => item === oldRecord ? newRecord : item)), oldRecord.isAggregator && oldRecord.type === AggregationType.AVG ? (this.children && newRecord.isAggregator && (this.children = this.children.map(item => item === oldRecord ? newRecord : item)), this.sum += newRecord.sum - oldRecord.sum, this.count += newRecord.count - oldRecord.count) : this.field && !isNaN(parseFloat(oldRecord[this.field])) && (this.sum += parseFloat(newRecord[this.field]) - parseFloat(oldRecord[this.field])), this.clearCacheValue());
33865
+ if (oldRecord && newRecord) {
33866
+ if (this.isRecord && this.records) {
33867
+ const index = this.records.indexOf(oldRecord);
33868
+ -1 !== index && (this.records[index] = newRecord);
33869
+ }
33870
+ if (oldRecord.isAggregator && oldRecord.type === AggregationType.AVG) {
33871
+ if (this.children && newRecord.isAggregator) {
33872
+ const index = this.children.indexOf(oldRecord);
33873
+ -1 !== index && (this.children[index] = newRecord);
33874
+ }
33875
+ this.sum = precisionAdd(this.sum, precisionSub(newRecord.sum, oldRecord.sum)), this.count += newRecord.count - oldRecord.count;
33876
+ } else this.field && !isNaN(parseFloat(oldRecord[this.field])) && (this.sum = precisionAdd(this.sum, precisionSub(parseFloat(newRecord[this.field]), parseFloat(oldRecord[this.field]))));
33877
+ this.clearCacheValue();
33878
+ }
33827
33879
  }
33828
33880
  value() {
33829
- var _a, _b;
33830
- return null !== (_a = this.changedValue) && void 0 !== _a ? _a : (null === (_b = this.records) || void 0 === _b ? void 0 : _b.length) >= 1 ? this.sum / this.count : void 0;
33881
+ var _a;
33882
+ return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.records && this.records.length >= 1 || !1 === this.isRecord && this.count > 0 ? this.sum / this.count : void 0;
33831
33883
  }
33832
33884
  reset() {
33833
33885
  this.changedValue = void 0, this.children = [], this.records = [], this.sum = 0, this.count = 0;
@@ -33837,11 +33889,11 @@
33837
33889
  const child = this.children[i];
33838
33890
  if (child.isAggregator && child.type === AggregationType.AVG) {
33839
33891
  const childValue = child.value();
33840
- this.sum += childValue * child.count, this.count += child.count;
33892
+ this.sum = precisionAdd(this.sum, childValue * child.count), this.count += child.count;
33841
33893
  }
33842
33894
  } else if (this.records) for (let i = 0; i < this.records.length; i++) {
33843
33895
  const record = this.records[i];
33844
- record.isAggregator && record.type === AggregationType.AVG ? (this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++);
33896
+ record.isAggregator && record.type === AggregationType.AVG ? (this.sum = precisionAdd(this.sum, record.sum), this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionAdd(this.sum, parseFloat(record[this.field])), this.count++);
33845
33897
  }
33846
33898
  }
33847
33899
  }
@@ -41490,15 +41542,17 @@
41490
41542
  } else if ("sparkline" === type) {
41491
41543
  cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
41492
41544
  } else if ("checkbox" === type) {
41493
- const isAggregation = "isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row),
41494
- isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
41495
- if (isAggregation && isSeriesNumber) {
41545
+ if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
41496
41546
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
41497
41547
  } else {
41498
41548
  cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
41499
41549
  }
41500
41550
  } else if ("radio" === type) {
41501
- cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
41551
+ if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
41552
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
41553
+ } else {
41554
+ cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
41555
+ }
41502
41556
  } else if ("switch" === type) {
41503
41557
  cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
41504
41558
  } else if ("button" === type) {
@@ -50679,6 +50733,7 @@
50679
50733
  } else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) {
50680
50734
  if (interactionState !== InteractionState.default || table.eventManager.isDraging || table.stateManager.isResizeCol()) {
50681
50735
  if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) && !table.stateManager.isResizeCol()) {
50736
+ if (col >= 0 && row >= 0 && isCellDisableSelect(table, col, row)) return void scenegraph.updateNextFrame();
50682
50737
  let extendSelectRange = !isValid$1(skipBodyMerge) || !skipBodyMerge;
50683
50738
  -1 === cellPos.col && (cellPos.col = col), -1 === cellPos.row && (cellPos.row = row), cellPos.col = col, cellPos.row = row;
50684
50739
  const currentRange = state.select.ranges[state.select.ranges.length - 1];
@@ -51874,8 +51929,11 @@
51874
51929
  updateOptionSetState() {
51875
51930
  this._updateOptionSetState(), this.setHoverState(), this.setSelectState(), this.setFrozenState();
51876
51931
  }
51932
+ endResizeIfResizing() {
51933
+ this.columnResize.resizing && (this.table.scenegraph.component.hideResizeCol(), this.columnResize.resizing = !1), this.rowResize.resizing && (this.table.scenegraph.component.hideResizeRow(), this.rowResize.resizing = !1), this.interactionState === InteractionState.grabing && (this.interactionState = InteractionState.default);
51934
+ }
51877
51935
  _updateOptionSetState() {
51878
- this.interactionState = InteractionState.default, this.hoverIcon = {
51936
+ this.endResizeIfResizing(), this.interactionState = InteractionState.default, this.hoverIcon = {
51879
51937
  col: -1,
51880
51938
  row: -1,
51881
51939
  icon: null
@@ -53004,6 +53062,7 @@
53004
53062
  }
53005
53063
 
53006
53064
  function bindTableGroupListener(eventManager) {
53065
+ var _a, _b, _c;
53007
53066
  const table = eventManager.table,
53008
53067
  stateManager = table.stateManager,
53009
53068
  getEventArgsSet = e => getCellEventArgsSetWithTable(e, table);
@@ -53120,7 +53179,13 @@
53120
53179
  event: e.nativeEvent
53121
53180
  });
53122
53181
  }), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
53123
- 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, {
53182
+ var _a, _b, _c;
53183
+ stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor());
53184
+ const scrollStyle = table.theme.scrollStyle,
53185
+ horizontalVisible = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _a ? _a : null == scrollStyle ? void 0 : scrollStyle.visible,
53186
+ verticalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
53187
+ barToSide = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _c && _c;
53188
+ barToSide || "focus" !== horizontalVisible || stateManager.hideHorizontalScrollBar(), barToSide || "focus" !== verticalVisible || 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, {
53124
53189
  col: table.stateManager.hover.cellPos.col,
53125
53190
  row: table.stateManager.hover.cellPos.row,
53126
53191
  cellRange: table.getCellRangeRelativeRect({
@@ -53349,7 +53414,29 @@
53349
53414
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
53350
53415
  (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
53351
53416
  }
53352
- }), table.scenegraph.stage.addEventListener("pointermove", e => {
53417
+ });
53418
+ const scrollStyle = table.theme.scrollStyle,
53419
+ barToSide = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _a && _a,
53420
+ horizontalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
53421
+ verticalVisible = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _c ? _c : null == scrollStyle ? void 0 : scrollStyle.visible,
53422
+ shouldShowScrollOnCanvasHover = barToSide && "focus" === horizontalVisible,
53423
+ shouldShowVScrollOnCanvasHover = barToSide && "focus" === verticalVisible;
53424
+ (shouldShowScrollOnCanvasHover || shouldShowVScrollOnCanvasHover) && (table.scenegraph.stage.addEventListener("pointerenter", e => {
53425
+ var _a, _b, _c;
53426
+ const target = e.target;
53427
+ if (target === table.scenegraph.stage || (null === (_a = null == target ? void 0 : target.isDescendantsOf) || void 0 === _a ? void 0 : _a.call(target, table.scenegraph.stage))) {
53428
+ if (shouldShowScrollOnCanvasHover) {
53429
+ const relativeX = e.x - table.tableX,
53430
+ target = table.options.scrollFrozenCols && (null === (_b = table.getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_c = table.getRightFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
53431
+ stateManager.showHorizontalScrollBar(!1, target);
53432
+ }
53433
+ shouldShowVScrollOnCanvasHover && stateManager.showVerticalScrollBar();
53434
+ }
53435
+ }), table.scenegraph.stage.addEventListener("pointerleave", e => {
53436
+ var _a;
53437
+ const relatedTarget = e.relatedTarget;
53438
+ (!relatedTarget || relatedTarget !== table.scenegraph.stage && !(null === (_a = relatedTarget.isDescendantsOf) || void 0 === _a ? void 0 : _a.call(relatedTarget, table.scenegraph.stage))) && (shouldShowScrollOnCanvasHover && stateManager.hideHorizontalScrollBar(), shouldShowVScrollOnCanvasHover && stateManager.hideVerticalScrollBar());
53439
+ })), table.scenegraph.stage.addEventListener("pointermove", e => {
53353
53440
  var _a, _b, _c;
53354
53441
  const eventArgsSet = getCellEventArgsSetWithTable(e, table);
53355
53442
  null !== (_c = null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.isDescendantsOf) || void 0 === _b ? void 0 : _b.call(_a, table.scenegraph.tableGroup)) && void 0 !== _c && _c && (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor());
@@ -53908,7 +53995,10 @@
53908
53995
  right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + frozenOffset + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
53909
53996
  const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
53910
53997
  targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
53911
- !(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow) && table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
53998
+ if (!(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow)) {
53999
+ if (isCellDisableSelect(table, targetCol.col, targetRow.row)) return;
54000
+ table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
54001
+ }
53912
54002
  });
53913
54003
  } else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
53914
54004
  }
@@ -55984,6 +56074,7 @@
55984
56074
  switch (headerType) {
55985
56075
  case "text":
55986
56076
  case "link":
56077
+ default:
55987
56078
  return TextHeaderStyle;
55988
56079
  case "image":
55989
56080
  case "video":
@@ -57030,7 +57121,7 @@
57030
57121
  }
57031
57122
  constructor(container, options = {}) {
57032
57123
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
57033
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.1-alpha.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
57124
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
57034
57125
  const g = window;
57035
57126
  g[this.id] = this;
57036
57127
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -58435,9 +58526,13 @@
58435
58526
  }
58436
58527
  getCellType(col, row) {
58437
58528
  let cellType;
58438
- return this.isSeriesNumberInHeader(col, row) ? this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType : (cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
58529
+ if (this.isSeriesNumberInHeader(col, row)) {
58530
+ const seriesHeaderCellType = this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType;
58531
+ return "radio" === seriesHeaderCellType ? "text" : seriesHeaderCellType;
58532
+ }
58533
+ return cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
58439
58534
  cellType: cellType
58440
- }, col, row, this));
58535
+ }, col, row, this);
58441
58536
  }
58442
58537
  getHeaderField(col, row) {
58443
58538
  return this.internalProps.layoutMap.getHeaderField(col, row);
@@ -62397,7 +62492,7 @@
62397
62492
  setRecords(records, option) {
62398
62493
  var _a, _b, _c, _d, _e;
62399
62494
  let sort;
62400
- clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
62495
+ this.stateManager.endResizeIfResizing(), clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
62401
62496
  "undefined" != typeof window && window.performance.now();
62402
62497
  const oldHoverState = {
62403
62498
  col: this.stateManager.hover.cellPos.col,