@visactor/vtable-calendar 1.22.7-alpha.0 → 1.22.7-alpha.10

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.
@@ -9498,7 +9498,7 @@
9498
9498
  }
9499
9499
  }]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
9500
9500
  type: AttributeUpdateType.STATE
9501
- }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
9501
+ });
9502
9502
  } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
9503
9503
  type: AttributeUpdateType.STATE
9504
9504
  }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
@@ -9524,7 +9524,7 @@
9524
9524
  getNormalAttribute(key) {
9525
9525
  var _a, _b;
9526
9526
  const value = this.attribute[key];
9527
- return this.animates && this.animates.size ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
9527
+ return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
9528
9528
  }
9529
9529
  clearStates(hasAnimation) {
9530
9530
  this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
@@ -34932,7 +34932,9 @@
34932
34932
  DELETE_RECORD: "delete_record",
34933
34933
  UPDATE_RECORD: "update_record",
34934
34934
  ADD_COLUMN: "add_column",
34935
- DELETE_COLUMN: "delete_column"
34935
+ DELETE_COLUMN: "delete_column",
34936
+ FILTER_MENU_SHOW: "filter_menu_show",
34937
+ FILTER_MENU_HIDE: "filter_menu_hide"
34936
34938
  };
34937
34939
 
34938
34940
  const judgeType = value => {
@@ -37236,9 +37238,9 @@
37236
37238
  length: this._sourceLength
37237
37239
  }, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
37238
37240
  }
37239
- updateFilterRules(filterRules) {
37241
+ updateFilterRules(filterRules, onFilterRecordsEnd) {
37240
37242
  var _a, _b, _c;
37241
- this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.currentIndexedData = Array.from({
37243
+ this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), onFilterRecordsEnd && (this._source = onFilterRecordsEnd(this._source)), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.currentIndexedData = Array.from({
37242
37244
  length: this._sourceLength
37243
37245
  }, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, "tree" === this.rowHierarchyType && this.initTreeHierarchyState()), this.updatePagerData();
37244
37246
  }
@@ -43786,53 +43788,39 @@
43786
43788
  for (let i = rowStart; i <= rowEnd; i++) {
43787
43789
  const cellGroup = table.scenegraph.getCell(col, i),
43788
43790
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43789
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
43791
+ chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || setTimeout(() => {
43790
43792
  var _a, _b, _c, _d;
43791
43793
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43792
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
43794
+ const absolutePosition = table.getCellRelativeRect(col, i),
43795
+ chartDimensionLinkage = table.options.chartDimensionLinkage;
43793
43796
  let isShowTooltip = !isScatter;
43794
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
43795
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow,
43797
+ if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip)) {
43798
+ const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow,
43796
43799
  {
43797
43800
  rowEnd: rowEnd1
43798
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43801
+ } = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
43799
43802
  if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43800
43803
  const {
43801
43804
  rowEnd: rowEnd2
43802
- } = table.getBodyVisibleRowRange(0, 5);
43805
+ } = table.getBodyVisibleRowRange(5);
43803
43806
  isShowTooltip = rowEnd2 !== rowEnd;
43804
43807
  }
43805
- } else if (i === rowStart && isShowTooltip) {
43806
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow,
43807
- {
43808
- rowStart: rowStart1
43809
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43810
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
43811
- const {
43812
- rowStart: rowStart2
43813
- } = table.getBodyVisibleRowRange(0, -5);
43814
- isShowTooltip = rowStart2 !== rowStart;
43815
- }
43816
- }
43817
- if (isScatter) null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43818
- const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43819
- absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
43820
- hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43821
- tooltip: !1,
43822
- showTooltipOption: {
43823
- x: canvasXY.x,
43824
- y: absolutePositionTop,
43825
- activeType: "dimension"
43826
- }
43827
- })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43828
- tooltip: isShowTooltip,
43829
- showTooltipOption: {
43830
- x: canvasXY.x,
43831
- y: absolutePositionTop,
43832
- activeType: "dimension"
43833
- }
43834
- });
43835
43808
  }
43809
+ isScatter ? null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43810
+ tooltip: !1,
43811
+ showTooltipOption: {
43812
+ x: canvasXY.x,
43813
+ y: absolutePosition.top + 3,
43814
+ activeType: "dimension"
43815
+ }
43816
+ })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43817
+ tooltip: isShowTooltip,
43818
+ showTooltipOption: {
43819
+ x: canvasXY.x,
43820
+ y: absolutePosition.top + 3,
43821
+ activeType: "dimension"
43822
+ }
43823
+ });
43836
43824
  }
43837
43825
  }, 0), table.scenegraph.updateNextFrame();
43838
43826
  }
@@ -43864,53 +43852,39 @@
43864
43852
  for (let i = colStart; i <= colEnd; i++) {
43865
43853
  const cellGroup = table.scenegraph.getCell(i, row),
43866
43854
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43867
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
43855
+ chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || setTimeout(() => {
43868
43856
  var _a, _b, _c, _d;
43869
43857
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
43870
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
43858
+ const absolutePosition = table.getCellRelativeRect(i, row),
43859
+ chartDimensionLinkage = table.options.chartDimensionLinkage;
43871
43860
  let isShowTooltip = !isScatter;
43872
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
43873
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43861
+ if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip)) {
43862
+ const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn,
43874
43863
  {
43875
43864
  colEnd: colEnd1
43876
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43865
+ } = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
43877
43866
  if (colEnd1 === colEnd) isShowTooltip = !0;else {
43878
43867
  const {
43879
43868
  colEnd: colEnd2
43880
- } = table.getBodyVisibleColRange(0, 5);
43869
+ } = table.getBodyVisibleColRange(5);
43881
43870
  isShowTooltip = colEnd2 !== colEnd;
43882
43871
  }
43883
- } else if (i === colStart && isShowTooltip) {
43884
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43885
- {
43886
- colStart: colStart1
43887
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43888
- if (colStart1 === colStart) isShowTooltip = !0;else {
43889
- const {
43890
- colStart: colStart2
43891
- } = table.getBodyVisibleColRange(0, -5);
43892
- isShowTooltip = colStart2 !== colStart;
43893
- }
43894
- }
43895
- if (isScatter) null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43896
- const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43897
- absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
43898
- hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43899
- tooltip: !1,
43900
- showTooltipOption: {
43901
- x: absolutePositionLeft,
43902
- y: canvasXY.y,
43903
- activeType: "dimension"
43904
- }
43905
- })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43906
- tooltip: isShowTooltip,
43907
- showTooltipOption: {
43908
- x: absolutePositionLeft,
43909
- y: canvasXY.y,
43910
- activeType: "dimension"
43911
- }
43912
- });
43913
43872
  }
43873
+ isScatter ? null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43874
+ tooltip: !1,
43875
+ showTooltipOption: {
43876
+ x: absolutePosition.left + 3,
43877
+ y: canvasXY.y,
43878
+ activeType: "dimension"
43879
+ }
43880
+ })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43881
+ tooltip: isShowTooltip,
43882
+ showTooltipOption: {
43883
+ x: absolutePosition.left + 3,
43884
+ y: canvasXY.y,
43885
+ activeType: "dimension"
43886
+ }
43887
+ });
43914
43888
  }
43915
43889
  }, 0), table.scenegraph.updateNextFrame();
43916
43890
  }
@@ -44634,14 +44608,7 @@
44634
44608
  } = drawParams;
44635
44609
  layer.main && drawParams.clear && hoverColor && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
44636
44610
  }
44637
- },
44638
- componentShowContent: table.options.chartDimensionLinkage ? {
44639
- tooltip: {
44640
- dimension: !1,
44641
- mark: !0
44642
- },
44643
- crosshair: !1
44644
- } : void 0
44611
+ }
44645
44612
  }));
44646
44613
  const chartStage = this.activeChartInstance.getStage(),
44647
44614
  matrix = this.globalTransMatrix.clone(),
@@ -51637,13 +51604,14 @@
51637
51604
  }), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
51638
51605
  }
51639
51606
  setScrollTop(top, event, triggerEvent = !0) {
51640
- var _a, _b, _c, _d, _e, _f, _g;
51607
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
51608
+ if (!this.table || !this.table.scenegraph) return;
51641
51609
  const totalHeight = this.table.getAllRowsHeight(),
51642
51610
  sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
51643
- top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), top = Math.ceil(top);
51611
+ top = Math.max(0, Math.min(top, totalHeight - (null !== (_c = null === (_b = this.table.scenegraph) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : 0) - sizeTolerance)), top = Math.ceil(top);
51644
51612
  const oldVerticalBarPos = this.scroll.verticalBarPos,
51645
- yRatio = top / (totalHeight - this.table.scenegraph.height);
51646
- if ((oldVerticalBarPos !== top || !0 === (null === (_c = null === (_b = this.table.options) || void 0 === _b ? void 0 : _b.customConfig) || void 0 === _c ? void 0 : _c.scrollEventAlwaysTrigger)) && triggerEvent) {
51613
+ yRatio = top / (totalHeight - (null !== (_e = null === (_d = this.table.scenegraph) || void 0 === _d ? void 0 : _d.height) && void 0 !== _e ? _e : 0));
51614
+ if ((oldVerticalBarPos !== top || !0 === (null === (_g = null === (_f = this.table.options) || void 0 === _f ? void 0 : _f.customConfig) || void 0 === _g ? void 0 : _g.scrollEventAlwaysTrigger)) && triggerEvent) {
51647
51615
  let verticalBarPos = top;
51648
51616
  isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
51649
51617
  const dy = verticalBarPos - oldVerticalBarPos;
@@ -51651,15 +51619,15 @@
51651
51619
  event: null == event ? void 0 : event.nativeEvent,
51652
51620
  scrollTop: verticalBarPos,
51653
51621
  scrollLeft: this.scroll.horizontalBarPos,
51654
- scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
51655
- scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
51622
+ scrollHeight: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
51623
+ scrollWidth: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
51656
51624
  viewHeight: this.table.tableNoFrameHeight,
51657
51625
  viewWidth: this.table.tableNoFrameWidth,
51658
51626
  scrollDirection: "vertical",
51659
51627
  scrollRatioY: yRatio,
51660
51628
  dy: dy
51661
51629
  }).some(value => !1 === value)) {
51662
- const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
51630
+ const yRatio = this.scroll.verticalBarPos / (totalHeight - (null !== (_l = null === (_k = this.table.scenegraph) || void 0 === _k ? void 0 : _k.height) && void 0 !== _l ? _l : 0));
51663
51631
  return void this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
51664
51632
  }
51665
51633
  }
@@ -51669,8 +51637,8 @@
51669
51637
  event: null == event ? void 0 : event.nativeEvent,
51670
51638
  scrollTop: this.scroll.verticalBarPos,
51671
51639
  scrollLeft: this.scroll.horizontalBarPos,
51672
- scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
51673
- scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
51640
+ scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
51641
+ scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
51674
51642
  viewHeight: this.table.tableNoFrameHeight,
51675
51643
  viewWidth: this.table.tableNoFrameWidth,
51676
51644
  scrollDirection: "vertical",
@@ -51680,6 +51648,7 @@
51680
51648
  }
51681
51649
  setScrollLeft(left, event, triggerEvent = !0) {
51682
51650
  var _a, _b, _c, _d, _e, _f, _g;
51651
+ if (!this.table || !this.table.scenegraph) return;
51683
51652
  this.table.scrollLeft;
51684
51653
  const totalWidth = this.table.getAllColsWidth(),
51685
51654
  sizeTolerance = (this.table.getFrozenColsWidth(), (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0);
@@ -56012,7 +55981,7 @@
56012
55981
  class PluginManager {
56013
55982
  constructor(table, options) {
56014
55983
  var _a;
56015
- this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
55984
+ this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
56016
55985
  this.register(plugin), this._bindTableEventForPlugin(plugin);
56017
55986
  });
56018
55987
  }
@@ -56031,23 +56000,30 @@
56031
56000
  _bindTableEventForPlugin(plugin) {
56032
56001
  var _a;
56033
56002
  null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
56034
- this.table.on(runTime, (...args) => {
56003
+ const id = this.table.on(runTime, (...args) => {
56035
56004
  var _a;
56036
56005
  null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.table);
56037
56006
  });
56007
+ this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
56038
56008
  });
56039
56009
  }
56040
- updatePlugins(plugins) {
56010
+ removeOrAddPlugins(plugins) {
56041
56011
  Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
56042
- this.release(), this.plugins.delete(plugin.id);
56043
- }), this.plugins.forEach(plugin => {
56044
- plugin.update && plugin.update();
56012
+ var _a;
56013
+ null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
56014
+ this.table.off(id);
56015
+ }), this.release(), this.plugins.delete(plugin.id);
56045
56016
  });
56046
56017
  const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
56047
56018
  null == addedPlugins || addedPlugins.forEach(plugin => {
56048
56019
  this.register(plugin), this._bindTableEventForPlugin(plugin);
56049
56020
  });
56050
56021
  }
56022
+ updatePlugins(plugins) {
56023
+ null == plugins || plugins.forEach(plugin => {
56024
+ plugin.update && plugin.update();
56025
+ });
56026
+ }
56051
56027
  release() {
56052
56028
  this.plugins.forEach(plugin => {
56053
56029
  var _a;
@@ -56070,7 +56046,7 @@
56070
56046
  }
56071
56047
  constructor(container, options = {}) {
56072
56048
  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;
56073
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56049
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.10", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56074
56050
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56075
56051
  options: options,
56076
56052
  container: container
@@ -56686,11 +56662,13 @@
56686
56662
  this.colContentWidthsMap.put(col, width);
56687
56663
  }
56688
56664
  getAllRowsHeight() {
56689
- if (this.internalProps.rowCount <= 0) return 0;
56665
+ var _a;
56666
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
56690
56667
  return this.getRowsHeight(0, this.internalProps.rowCount - 1);
56691
56668
  }
56692
56669
  getAllColsWidth() {
56693
- if (this.internalProps.colCount <= 0) return 0;
56670
+ var _a;
56671
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
56694
56672
  return this.getColsWidth(0, this.internalProps.colCount - 1);
56695
56673
  }
56696
56674
  getColsWidths() {
@@ -56911,7 +56889,7 @@
56911
56889
  colEnd: colEnd
56912
56890
  };
56913
56891
  }
56914
- getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
56892
+ getBodyVisibleRowRange(deltaY = 0) {
56915
56893
  const {
56916
56894
  scrollTop: scrollTop
56917
56895
  } = this,
@@ -56919,14 +56897,14 @@
56919
56897
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
56920
56898
  {
56921
56899
  row: rowStart
56922
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY),
56923
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
56900
+ } = this.getRowAt(scrollTop + frozenRowsHeight + 1),
56901
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
56924
56902
  return rowEnd < 0 ? null : {
56925
56903
  rowStart: rowStart,
56926
56904
  rowEnd: rowEnd
56927
56905
  };
56928
56906
  }
56929
- getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
56907
+ getBodyVisibleColRange(deltaX = 0) {
56930
56908
  const {
56931
56909
  scrollLeft: scrollLeft
56932
56910
  } = this,
@@ -56934,8 +56912,8 @@
56934
56912
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
56935
56913
  {
56936
56914
  col: colStart
56937
- } = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX),
56938
- colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
56915
+ } = this.getColAt(scrollLeft + frozenColsWidth + 1),
56916
+ colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
56939
56917
  return colEnd < 0 ? null : {
56940
56918
  colStart: colStart,
56941
56919
  colEnd: colEnd
@@ -61502,7 +61480,7 @@
61502
61480
  }) {
61503
61481
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
61504
61482
  const internalProps = this.internalProps;
61505
- if (super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
61483
+ if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
61506
61484
  addRecordRule: options.addRecordRule
61507
61485
  }, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
61508
61486
  const releaseObj = internalProps.releaseList[i];
@@ -61727,7 +61705,8 @@
61727
61705
  updateFilterRules(filterRules, options = {
61728
61706
  clearRowHeightCache: !0
61729
61707
  }) {
61730
- 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(!(null == options ? void 0 : options.clearRowHeightCache)), this.resize();
61708
+ var _a;
61709
+ this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), this.resize();
61731
61710
  }
61732
61711
  getFilteredRecords() {
61733
61712
  return this.dataSource.records;
@@ -61748,7 +61727,7 @@
61748
61727
  }).map(key => this.stateManager.checkedState.get(key));
61749
61728
  return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
61750
61729
  }
61751
- return new Array(...this.stateManager.checkedState.values());
61730
+ return [...this.stateManager.checkedState.values()];
61752
61731
  }
61753
61732
  getCellCheckboxState(col, row) {
61754
61733
  var _a;