@visactor/vtable 1.22.7-alpha.4 → 1.22.7-alpha.6

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.
Files changed (57) hide show
  1. package/cjs/ListTable.js +5 -2
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/core/BaseTable.d.ts +2 -2
  4. package/cjs/core/BaseTable.js +9 -7
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  7. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  8. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  9. package/cjs/index.d.ts +1 -1
  10. package/cjs/index.js +1 -1
  11. package/cjs/index.js.map +1 -1
  12. package/cjs/plugins/plugin-manager.d.ts +2 -0
  13. package/cjs/plugins/plugin-manager.js +13 -6
  14. package/cjs/plugins/plugin-manager.js.map +1 -1
  15. package/cjs/scenegraph/graphic/active-cell-chart-list.js +45 -63
  16. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  17. package/cjs/scenegraph/graphic/chart.js +3 -10
  18. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  19. package/cjs/state/state.js +9 -9
  20. package/cjs/state/state.js.map +1 -1
  21. package/cjs/ts-types/base-table.d.ts +2 -2
  22. package/cjs/ts-types/base-table.js.map +1 -1
  23. package/cjs/ts-types/events.d.ts +8 -0
  24. package/cjs/ts-types/events.js.map +1 -1
  25. package/cjs/ts-types/table-engine.d.ts +2 -2
  26. package/cjs/ts-types/table-engine.js.map +1 -1
  27. package/cjs/vrender.js.map +1 -1
  28. package/dist/vtable.js +132 -162
  29. package/dist/vtable.min.js +2 -2
  30. package/es/ListTable.js +5 -2
  31. package/es/ListTable.js.map +1 -1
  32. package/es/core/BaseTable.d.ts +2 -2
  33. package/es/core/BaseTable.js +9 -7
  34. package/es/core/BaseTable.js.map +1 -1
  35. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  36. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  37. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  38. package/es/index.d.ts +1 -1
  39. package/es/index.js +1 -1
  40. package/es/index.js.map +1 -1
  41. package/es/plugins/plugin-manager.d.ts +2 -0
  42. package/es/plugins/plugin-manager.js +13 -6
  43. package/es/plugins/plugin-manager.js.map +1 -1
  44. package/es/scenegraph/graphic/active-cell-chart-list.js +45 -63
  45. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  46. package/es/scenegraph/graphic/chart.js +3 -10
  47. package/es/scenegraph/graphic/chart.js.map +1 -1
  48. package/es/state/state.js +9 -9
  49. package/es/state/state.js.map +1 -1
  50. package/es/ts-types/base-table.d.ts +2 -2
  51. package/es/ts-types/base-table.js.map +1 -1
  52. package/es/ts-types/events.d.ts +8 -0
  53. package/es/ts-types/events.js.map +1 -1
  54. package/es/ts-types/table-engine.d.ts +2 -2
  55. package/es/ts-types/table-engine.js.map +1 -1
  56. package/es/vrender.js.map +1 -1
  57. package/package.json +7 -7
package/dist/vtable.js CHANGED
@@ -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;
@@ -36463,7 +36463,9 @@
36463
36463
  DELETE_RECORD: 'delete_record',
36464
36464
  UPDATE_RECORD: 'update_record',
36465
36465
  ADD_COLUMN: 'add_column',
36466
- DELETE_COLUMN: 'delete_column'
36466
+ DELETE_COLUMN: 'delete_column',
36467
+ FILTER_MENU_SHOW: 'filter_menu_show',
36468
+ FILTER_MENU_HIDE: 'filter_menu_hide'
36467
36469
  };
36468
36470
 
36469
36471
  const judgeType = (value) => {
@@ -49026,76 +49028,57 @@
49026
49028
  chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
49027
49029
  }
49028
49030
  }
49029
- setTimeout(() => {
49030
- if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
49031
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
49032
- let isShowTooltip = !isScatter;
49033
- if (!isScatter && typeof chartDimensionLinkage === 'object') {
49034
- isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49035
- if (i === rowEnd && isShowTooltip) {
49036
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49037
- const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
49038
- if (rowEnd1 === rowEnd) {
49039
- isShowTooltip = true;
49040
- }
49041
- else {
49042
- const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
49043
- if (rowEnd2 !== rowEnd) {
49031
+ if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
49032
+ setTimeout(() => {
49033
+ if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
49034
+ const absolutePosition = table.getCellRelativeRect(col, i);
49035
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
49036
+ let isShowTooltip = !isScatter;
49037
+ if (!isScatter && typeof chartDimensionLinkage === 'object') {
49038
+ isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49039
+ if (i === rowEnd && isShowTooltip) {
49040
+ const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow;
49041
+ const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
49042
+ if (rowEnd1 === rowEnd) {
49044
49043
  isShowTooltip = true;
49045
49044
  }
49046
49045
  else {
49047
- isShowTooltip = false;
49046
+ const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(5);
49047
+ if (rowEnd2 !== rowEnd) {
49048
+ isShowTooltip = true;
49049
+ }
49050
+ else {
49051
+ isShowTooltip = false;
49052
+ }
49048
49053
  }
49049
49054
  }
49050
49055
  }
49051
- else if (i === rowStart && isShowTooltip) {
49052
- const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
49053
- const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
49054
- if (rowStart1 === rowStart) {
49055
- isShowTooltip = true;
49056
- }
49057
- else {
49058
- const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
49059
- if (rowStart2 !== rowStart) {
49060
- isShowTooltip = true;
49056
+ if (isScatter) {
49057
+ chartInstanceListColumnByColumnDirection[col][i].showCrosshair?.((axis) => {
49058
+ if (axis.layoutOrient === 'left') {
49059
+ return positionValueOrYValue;
49061
49060
  }
49062
- else {
49063
- isShowTooltip = false;
49064
- }
49065
- }
49066
- }
49067
- }
49068
- if (isScatter) {
49069
- chartInstanceListColumnByColumnDirection[col][i].showCrosshair?.((axis) => {
49070
- if (axis.layoutOrient === 'left') {
49071
- return positionValueOrYValue;
49072
- }
49073
- return dimensionValueOrXValue;
49074
- });
49075
- }
49076
- else {
49077
- const bodyBoundryTop = table.frozenRowCount
49078
- ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom
49079
- : 0;
49080
- const absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
49081
- if (hideTooltip) {
49082
- if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
49083
- chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
49084
- }
49085
- chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49086
- tooltip: false,
49087
- showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
49061
+ return dimensionValueOrXValue;
49088
49062
  });
49089
49063
  }
49090
49064
  else {
49091
- chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49092
- tooltip: isShowTooltip,
49093
- showTooltipOption: { x: canvasXY.x, y: absolutePositionTop, activeType: 'dimension' }
49094
- });
49065
+ if (hideTooltip) {
49066
+ chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
49067
+ chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49068
+ tooltip: false,
49069
+ showTooltipOption: { x: canvasXY.x, y: absolutePosition.top + 3, activeType: 'dimension' }
49070
+ });
49071
+ }
49072
+ else {
49073
+ chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
49074
+ tooltip: isShowTooltip,
49075
+ showTooltipOption: { x: canvasXY.x, y: absolutePosition.top + 3, activeType: 'dimension' }
49076
+ });
49077
+ }
49095
49078
  }
49096
49079
  }
49097
- }
49098
- }, 0);
49080
+ }, 0);
49081
+ }
49099
49082
  table.scenegraph.updateNextFrame();
49100
49083
  }
49101
49084
  }
@@ -49141,76 +49124,57 @@
49141
49124
  chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
49142
49125
  }
49143
49126
  }
49144
- setTimeout(() => {
49145
- if (chartInstanceListRowByRowDirection[row]?.[i]) {
49146
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
49147
- let isShowTooltip = !isScatter;
49148
- if (!isScatter && typeof chartDimensionLinkage === 'object') {
49149
- isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49150
- if (i === colEnd && isShowTooltip) {
49151
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49152
- const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
49153
- if (colEnd1 === colEnd) {
49154
- isShowTooltip = true;
49155
- }
49156
- else {
49157
- const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
49158
- if (colEnd2 !== colEnd) {
49127
+ if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
49128
+ setTimeout(() => {
49129
+ if (chartInstanceListRowByRowDirection[row]?.[i]) {
49130
+ const absolutePosition = table.getCellRelativeRect(i, row);
49131
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
49132
+ let isShowTooltip = !isScatter;
49133
+ if (!isScatter && typeof chartDimensionLinkage === 'object') {
49134
+ isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
49135
+ if (i === colEnd && isShowTooltip) {
49136
+ const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn;
49137
+ const { colEnd: colEnd1 } = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
49138
+ if (colEnd1 === colEnd) {
49159
49139
  isShowTooltip = true;
49160
49140
  }
49161
49141
  else {
49162
- isShowTooltip = false;
49142
+ const { colEnd: colEnd2 } = table.getBodyVisibleColRange(5);
49143
+ if (colEnd2 !== colEnd) {
49144
+ isShowTooltip = true;
49145
+ }
49146
+ else {
49147
+ isShowTooltip = false;
49148
+ }
49163
49149
  }
49164
49150
  }
49165
49151
  }
49166
- else if (i === colStart && isShowTooltip) {
49167
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
49168
- const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
49169
- if (colStart1 === colStart) {
49170
- isShowTooltip = true;
49171
- }
49172
- else {
49173
- const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
49174
- if (colStart2 !== colStart) {
49175
- isShowTooltip = true;
49152
+ if (isScatter) {
49153
+ chartInstanceListRowByRowDirection[row][i].showCrosshair?.((axis) => {
49154
+ if (axis.layoutOrient === 'left') {
49155
+ return positionValueOrYValue;
49176
49156
  }
49177
- else {
49178
- isShowTooltip = false;
49179
- }
49180
- }
49181
- }
49182
- }
49183
- if (isScatter) {
49184
- chartInstanceListRowByRowDirection[row][i].showCrosshair?.((axis) => {
49185
- if (axis.layoutOrient === 'left') {
49186
- return positionValueOrYValue;
49187
- }
49188
- return dimensionValueOrXValue;
49189
- });
49190
- }
49191
- else {
49192
- const bodyBoundryLeft = table.frozenColCount
49193
- ? table.getCellRelativeRect(table.frozenColCount - 1, row).right
49194
- : 0;
49195
- const absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
49196
- if (hideTooltip) {
49197
- if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
49198
- chartInstanceListRowByRowDirection[row][i].hideTooltip();
49199
- }
49200
- chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49201
- tooltip: false,
49202
- showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
49157
+ return dimensionValueOrXValue;
49203
49158
  });
49204
49159
  }
49205
49160
  else {
49206
- chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49207
- tooltip: isShowTooltip,
49208
- showTooltipOption: { x: absolutePositionLeft, y: canvasXY.y, activeType: 'dimension' }
49209
- });
49161
+ if (hideTooltip) {
49162
+ chartInstanceListRowByRowDirection[row][i].hideTooltip();
49163
+ chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49164
+ tooltip: false,
49165
+ showTooltipOption: { x: absolutePosition.left + 3, y: canvasXY.y, activeType: 'dimension' }
49166
+ });
49167
+ }
49168
+ else {
49169
+ chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
49170
+ tooltip: isShowTooltip,
49171
+ showTooltipOption: { x: absolutePosition.left + 3, y: canvasXY.y, activeType: 'dimension' }
49172
+ });
49173
+ }
49210
49174
  }
49211
49175
  }
49212
- }
49213
- }, 0);
49176
+ }, 0);
49177
+ }
49214
49178
  table.scenegraph.updateNextFrame();
49215
49179
  }
49216
49180
  }
@@ -50280,16 +50244,7 @@
50280
50244
  context.fill();
50281
50245
  }
50282
50246
  }
50283
- },
50284
- componentShowContent: table.options.chartDimensionLinkage
50285
- ? {
50286
- tooltip: {
50287
- dimension: false,
50288
- mark: true
50289
- },
50290
- crosshair: false
50291
- }
50292
- : undefined
50247
+ }
50293
50248
  }));
50294
50249
  const chartStage = this.activeChartInstance.getStage();
50295
50250
  const matrix = this.globalTransMatrix.clone();
@@ -50400,7 +50355,10 @@
50400
50355
  }
50401
50356
  if (indicatorsAsCol) {
50402
50357
  const series = dimensionInfo.data[0].series;
50403
- const width = this.attribute.spec.type === 'histogram' || series.type === 'line' || series.type === 'area'
50358
+ const width = this.attribute.spec.type === 'histogram' ||
50359
+ this.attribute.spec.type === 'boxPlot' ||
50360
+ series.type === 'line' ||
50361
+ series.type === 'area'
50404
50362
  ? 0
50405
50363
  : series.getYAxisHelper().getBandwidth(0);
50406
50364
  let y = series.valueToPositionY(dimensionValue);
@@ -50423,7 +50381,10 @@
50423
50381
  }
50424
50382
  else {
50425
50383
  const series = dimensionInfo.data[0].series;
50426
- const width = this.attribute.spec.type === 'histogram' || series.type === 'line' || series.type === 'area'
50384
+ const width = this.attribute.spec.type === 'histogram' ||
50385
+ this.attribute.spec.type === 'boxPlot' ||
50386
+ series.type === 'line' ||
50387
+ series.type === 'area'
50427
50388
  ? 0
50428
50389
  : series.getXAxisHelper().getBandwidth(0);
50429
50390
  let x = series.valueToPositionX(dimensionValue);
@@ -61963,7 +61924,7 @@
61963
61924
  function flatten(cols, parentStartIndex = 0) {
61964
61925
  cols.forEach((col) => {
61965
61926
  const startIndex = col.startInTotal
61966
- ? col.startInTotal + state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0
61927
+ ? (col.startInTotal + state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0)
61967
61928
  : parentStartIndex;
61968
61929
  if (col.columns) {
61969
61930
  flatten(col.columns, startIndex);
@@ -62447,10 +62408,10 @@
62447
62408
  setScrollTop(top, event, triggerEvent = true) {
62448
62409
  const totalHeight = this.table.getAllRowsHeight();
62449
62410
  const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
62450
- top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
62411
+ top = Math.max(0, Math.min(top, totalHeight - (this.table.scenegraph?.height ?? 0) - sizeTolerance));
62451
62412
  top = Math.ceil(top);
62452
62413
  const oldVerticalBarPos = this.scroll.verticalBarPos;
62453
- const yRatio = top / (totalHeight - this.table.scenegraph.height);
62414
+ const yRatio = top / (totalHeight - (this.table.scenegraph?.height ?? 0));
62454
62415
  if ((oldVerticalBarPos !== top || this.table.options?.customConfig?.scrollEventAlwaysTrigger === true) &&
62455
62416
  triggerEvent) {
62456
62417
  let verticalBarPos = top;
@@ -62471,7 +62432,7 @@
62471
62432
  dy
62472
62433
  });
62473
62434
  if (canScroll.some(value => value === false)) {
62474
- const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
62435
+ const yRatio = this.scroll.verticalBarPos / (totalHeight - (this.table.scenegraph?.height ?? 0));
62475
62436
  this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
62476
62437
  return;
62477
62438
  }
@@ -70063,6 +70024,7 @@
70063
70024
  class PluginManager {
70064
70025
  plugins = new Map();
70065
70026
  table;
70027
+ pluginEventMap = new Map();
70066
70028
  constructor(table, options) {
70067
70029
  this.table = table;
70068
70030
  options.plugins?.map(plugin => {
@@ -70083,29 +70045,35 @@
70083
70045
  return Array.from(this.plugins.values()).find(plugin => plugin.name === name);
70084
70046
  }
70085
70047
  _bindTableEventForPlugin(plugin) {
70086
- plugin.runTime?.forEach(runTime => {
70087
- this.table.on(runTime, (...args) => {
70048
+ plugin.runTime?.forEach((runTime) => {
70049
+ const id = this.table.on(runTime, (...args) => {
70088
70050
  plugin.run?.(...args, runTime, this.table);
70089
70051
  });
70052
+ this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
70090
70053
  });
70091
70054
  }
70092
- updatePlugins(plugins) {
70055
+ removeOrAddPlugins(plugins) {
70093
70056
  const removedPlugins = Array.from(this.plugins.values()).filter(plugin => !plugins?.some(p => p.id === plugin.id));
70094
70057
  removedPlugins.forEach(plugin => {
70058
+ this.pluginEventMap.get(plugin.id)?.forEach(id => {
70059
+ this.table.off(id);
70060
+ });
70095
70061
  this.release();
70096
70062
  this.plugins.delete(plugin.id);
70097
70063
  });
70098
- this.plugins.forEach(plugin => {
70099
- if (plugin.update) {
70100
- plugin.update();
70101
- }
70102
- });
70103
70064
  const addedPlugins = plugins?.filter(plugin => !this.plugins.has(plugin.id));
70104
70065
  addedPlugins?.forEach(plugin => {
70105
70066
  this.register(plugin);
70106
70067
  this._bindTableEventForPlugin(plugin);
70107
70068
  });
70108
70069
  }
70070
+ updatePlugins(plugins) {
70071
+ plugins?.forEach(plugin => {
70072
+ if (plugin.update) {
70073
+ plugin.update();
70074
+ }
70075
+ });
70076
+ }
70109
70077
  release() {
70110
70078
  this.plugins.forEach(plugin => {
70111
70079
  plugin.release?.(this.table);
@@ -70150,7 +70118,7 @@
70150
70118
  return TABLE_EVENT_TYPE;
70151
70119
  }
70152
70120
  options;
70153
- version = "1.22.7-alpha.4";
70121
+ version = "1.22.7-alpha.6";
70154
70122
  pagination;
70155
70123
  id = `VTable${Date.now()}`;
70156
70124
  headerStyleCache;
@@ -71028,13 +70996,13 @@
71028
70996
  getDefaultColumnWidth(col) {
71029
70997
  if (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)) {
71030
70998
  return Array.isArray(this.defaultHeaderColWidth)
71031
- ? this.defaultHeaderColWidth[col] ?? this.defaultColWidth
70999
+ ? (this.defaultHeaderColWidth[col] ?? this.defaultColWidth)
71032
71000
  : this.defaultHeaderColWidth;
71033
71001
  }
71034
71002
  else if (this.isRightFrozenColumn(col, this.columnHeaderLevelCount)) {
71035
71003
  if (this.isPivotTable()) {
71036
71004
  return Array.isArray(this.defaultHeaderColWidth)
71037
- ? this.defaultHeaderColWidth[this.rowHeaderLevelCount - this.rightFrozenColCount] ?? this.defaultColWidth
71005
+ ? (this.defaultHeaderColWidth[this.rowHeaderLevelCount - this.rightFrozenColCount] ?? this.defaultColWidth)
71038
71006
  : this.defaultHeaderColWidth;
71039
71007
  }
71040
71008
  return this.defaultColWidth;
@@ -71044,12 +71012,12 @@
71044
71012
  getDefaultRowHeight(row) {
71045
71013
  if (this.isColumnHeader(0, row) || this.isCornerHeader(0, row) || this.isSeriesNumberInHeader(0, row)) {
71046
71014
  return Array.isArray(this.defaultHeaderRowHeight)
71047
- ? this.defaultHeaderRowHeight[row] ?? this.internalProps.defaultRowHeight
71015
+ ? (this.defaultHeaderRowHeight[row] ?? this.internalProps.defaultRowHeight)
71048
71016
  : this.defaultHeaderRowHeight;
71049
71017
  }
71050
71018
  if (this.isBottomFrozenRow(row)) {
71051
71019
  return Array.isArray(this.defaultHeaderRowHeight)
71052
- ? this.defaultHeaderRowHeight[this.columnHeaderLevelCount > 0 ? this.columnHeaderLevelCount - this.bottomFrozenRowCount : 0] ?? this.internalProps.defaultRowHeight
71020
+ ? (this.defaultHeaderRowHeight[this.columnHeaderLevelCount > 0 ? this.columnHeaderLevelCount - this.bottomFrozenRowCount : 0] ?? this.internalProps.defaultRowHeight)
71053
71021
  : this.defaultHeaderRowHeight;
71054
71022
  }
71055
71023
  return this.internalProps.defaultRowHeight;
@@ -71253,14 +71221,14 @@
71253
71221
  this.colContentWidthsMap.put(col, width);
71254
71222
  }
71255
71223
  getAllRowsHeight() {
71256
- if (this.internalProps.rowCount <= 0) {
71224
+ if (!this.internalProps?.rowCount || this.internalProps.rowCount <= 0) {
71257
71225
  return 0;
71258
71226
  }
71259
71227
  const h = this.getRowsHeight(0, this.internalProps.rowCount - 1);
71260
71228
  return h;
71261
71229
  }
71262
71230
  getAllColsWidth() {
71263
- if (this.internalProps.colCount <= 0) {
71231
+ if (!this.internalProps?.colCount || this.internalProps.colCount <= 0) {
71264
71232
  return 0;
71265
71233
  }
71266
71234
  const w = this.getColsWidth(0, this.internalProps.colCount - 1);
@@ -71622,26 +71590,26 @@
71622
71590
  }
71623
71591
  return { rowStart, colStart, rowEnd, colEnd };
71624
71592
  }
71625
- getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
71593
+ getBodyVisibleRowRange(deltaY = 0) {
71626
71594
  const { scrollTop } = this;
71627
71595
  const frozenRowsHeight = this.getFrozenRowsHeight();
71628
71596
  const bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight();
71629
- const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY);
71597
+ const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1);
71630
71598
  const rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight
71631
- ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row
71599
+ ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row
71632
71600
  : this.rowCount - 1;
71633
71601
  if (rowEnd < 0) {
71634
71602
  return null;
71635
71603
  }
71636
71604
  return { rowStart, rowEnd };
71637
71605
  }
71638
- getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
71606
+ getBodyVisibleColRange(deltaX = 0) {
71639
71607
  const { scrollLeft } = this;
71640
71608
  const frozenColsWidth = this.getFrozenColsWidth();
71641
71609
  const rightFrozenColsWidth = this.getRightFrozenColsWidth();
71642
- const { col: colStart } = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX);
71610
+ const { col: colStart } = this.getColAt(scrollLeft + frozenColsWidth + 1);
71643
71611
  const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
71644
- ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col
71612
+ ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col
71645
71613
  : this.colCount - 1;
71646
71614
  if (colEnd < 0) {
71647
71615
  return null;
@@ -78315,6 +78283,7 @@
78315
78283
  clearRowHeightCache: true
78316
78284
  }) {
78317
78285
  const internalProps = this.internalProps;
78286
+ this.pluginManager.removeOrAddPlugins(options.plugins);
78318
78287
  super.updateOption(options, updateConfig);
78319
78288
  internalProps.frozenColDragHeaderMode =
78320
78289
  options.dragOrder?.frozenColDragHeaderMode ?? options.frozenColDragHeaderMode;
@@ -78779,6 +78748,7 @@
78779
78748
  this.refreshRowColCount();
78780
78749
  this.stateManager.initCheckedState(this.records);
78781
78750
  this.scenegraph.createSceneGraph(!!!options?.clearRowHeightCache);
78751
+ this.internalProps.emptyTip?.resetVisible();
78782
78752
  this.resize();
78783
78753
  }
78784
78754
  getFilteredRecords() {
@@ -78810,7 +78780,7 @@
78810
78780
  return state && state[field];
78811
78781
  });
78812
78782
  }
78813
- return new Array(...this.stateManager.checkedState.values());
78783
+ return [...this.stateManager.checkedState.values()];
78814
78784
  }
78815
78785
  getCellCheckboxState(col, row) {
78816
78786
  const define = this.getBodyColumnDefine(col, row);
@@ -78945,8 +78915,8 @@
78945
78915
  getEditor(col, row) {
78946
78916
  const define = this.getBodyColumnDefine(col, row);
78947
78917
  let editorDefine = this.isHeader(col, row)
78948
- ? define?.headerEditor ?? this.options.headerEditor
78949
- : define?.editor ?? this.options.editor;
78918
+ ? (define?.headerEditor ?? this.options.headerEditor)
78919
+ : (define?.editor ?? this.options.editor);
78950
78920
  if (typeof editorDefine === 'function') {
78951
78921
  const arg = {
78952
78922
  col,
@@ -78965,8 +78935,8 @@
78965
78935
  isHasEditorDefine(col, row) {
78966
78936
  const define = this.getBodyColumnDefine(col, row);
78967
78937
  let editorDefine = this.isHeader(col, row)
78968
- ? define?.headerEditor ?? this.options.headerEditor
78969
- : define?.editor ?? this.options.editor;
78938
+ ? (define?.headerEditor ?? this.options.headerEditor)
78939
+ : (define?.editor ?? this.options.editor);
78970
78940
  if (typeof editorDefine === 'function') {
78971
78941
  const arg = {
78972
78942
  col,
@@ -94882,7 +94852,7 @@
94882
94852
  }
94883
94853
 
94884
94854
  registerForVrender();
94885
- const version = "1.22.7-alpha.4";
94855
+ const version = "1.22.7-alpha.6";
94886
94856
  function getIcons() {
94887
94857
  return get$2();
94888
94858
  }