@visactor/vtable-gantt 1.22.11-alpha.10 → 1.22.11-alpha.11

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.
package/cjs/index.d.ts CHANGED
@@ -6,5 +6,5 @@ import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
8
  import * as plugins from './plugins';
9
- export declare const version = "1.22.11-alpha.10";
9
+ export declare const version = "1.22.11-alpha.11";
10
10
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
package/cjs/index.js CHANGED
@@ -56,5 +56,5 @@ exports.VTable = VTable;
56
56
 
57
57
  const plugins = __importStar(require("./plugins"));
58
58
 
59
- exports.plugins = plugins, exports.version = "1.22.11-alpha.10";
59
+ exports.plugins = plugins, exports.version = "1.22.11-alpha.11";
60
60
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,kBAAkB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.11-alpha.10\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,kBAAkB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.11-alpha.11\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
@@ -47623,8 +47623,17 @@
47623
47623
  row: row
47624
47624
  };
47625
47625
  }
47626
- function clearBrushingChartInstance() {
47627
- brushingChartInstance = void 0, brushingChartInstanceCellPos = {
47626
+ function clearAndReleaseBrushingChartInstance(scenegraph) {
47627
+ var _a, _b, _c;
47628
+ enableTooltipToAllChartInstances();
47629
+ const cellGroup = scenegraph.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
47630
+ (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, scenegraph.table, {
47631
+ forceRelease: !0,
47632
+ releaseChartInstance: !0,
47633
+ releaseColumnChartInstance: !1,
47634
+ releaseRowChartInstance: !1,
47635
+ releaseAllChartInstance: !1
47636
+ })), isValid$1(chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col]) && delete chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col][brushingChartInstanceCellPos.row], isValid$1(chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row]) && delete chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row][brushingChartInstanceCellPos.col], brushingChartInstance = void 0, brushingChartInstanceCellPos = {
47628
47637
  col: -1,
47629
47638
  row: -1
47630
47639
  };
@@ -47637,10 +47646,12 @@
47637
47646
  }
47638
47647
  const chartInstanceListColumnByColumnDirection = {};
47639
47648
  const chartInstanceListRowByRowDirection = {};
47640
- const delayRunDimensionHoverTimer = [];
47649
+ const delayRunDimensionHoverTimerForColumnDirection = [],
47650
+ delayRunDimensionHoverTimerForRowDirection = [],
47651
+ delayRunDimensionHoverTimerForViewRange = [];
47641
47652
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47642
47653
  var _a;
47643
- clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47654
+ clearDelayRunDimensionHoverTimerForColumnDirection(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47644
47655
  const {
47645
47656
  rowStart: rowStart
47646
47657
  } = table.getBodyVisibleRowRange();
@@ -47677,12 +47688,12 @@
47677
47688
  }
47678
47689
  }
47679
47690
  }, 0);
47680
- delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47691
+ delayRunDimensionHoverTimerForColumnDirection.push(timer), table.scenegraph.updateNextFrame();
47681
47692
  }
47682
47693
  }
47683
47694
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47684
47695
  var _a;
47685
- clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47696
+ clearDelayRunDimensionHoverTimerForRowDirection(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47686
47697
  const {
47687
47698
  colStart: colStart
47688
47699
  } = table.getBodyVisibleColRange();
@@ -47719,12 +47730,12 @@
47719
47730
  }
47720
47731
  }
47721
47732
  }, 0);
47722
- delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47733
+ delayRunDimensionHoverTimerForRowDirection.push(timer), table.scenegraph.updateNextFrame();
47723
47734
  }
47724
47735
  }
47725
47736
  function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
47726
47737
  var _a;
47727
- clearDelayRunDimensionHoverTimers();
47738
+ clearDelayRunDimensionHoverTimerForViewRange();
47728
47739
  const {
47729
47740
  rowStart: rowStart
47730
47741
  } = table.getBodyVisibleRowRange();
@@ -47751,7 +47762,7 @@
47751
47762
  })));
47752
47763
  }
47753
47764
  }, 0);
47754
- delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47765
+ delayRunDimensionHoverTimerForViewRange.push(timer), table.scenegraph.updateNextFrame();
47755
47766
  }
47756
47767
  }
47757
47768
  }
@@ -47854,9 +47865,25 @@
47854
47865
  }
47855
47866
  delete chartInstanceListRowByRowDirection[row];
47856
47867
  }
47868
+ function clearDelayRunDimensionHoverTimerForColumnDirection() {
47869
+ for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
47870
+ delayRunDimensionHoverTimerForColumnDirection.length = 0;
47871
+ }
47872
+ function clearDelayRunDimensionHoverTimerForRowDirection() {
47873
+ for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
47874
+ delayRunDimensionHoverTimerForRowDirection.length = 0;
47875
+ }
47876
+ function clearDelayRunDimensionHoverTimerForViewRange() {
47877
+ for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
47878
+ delayRunDimensionHoverTimerForViewRange.length = 0;
47879
+ }
47857
47880
  function clearDelayRunDimensionHoverTimers() {
47858
- for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
47859
- delayRunDimensionHoverTimer.length = 0;
47881
+ for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
47882
+ delayRunDimensionHoverTimerForColumnDirection.length = 0;
47883
+ for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
47884
+ delayRunDimensionHoverTimerForRowDirection.length = 0;
47885
+ for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
47886
+ delayRunDimensionHoverTimerForViewRange.length = 0;
47860
47887
  }
47861
47888
  function clearAllChartInstanceList(table, forceRelease = !1) {
47862
47889
  clearDelayRunDimensionHoverTimers();
@@ -47867,6 +47894,11 @@
47867
47894
  function isDisabledTooltipToAllChartInstances() {
47868
47895
  return disabledTooltipToAllChartInstances;
47869
47896
  }
47897
+ function enableTooltipToAllChartInstances() {
47898
+ disabledTooltipToAllChartInstances = !1;
47899
+ for (const col in chartInstanceListColumnByColumnDirection) for (const row in chartInstanceListColumnByColumnDirection[col]) chartInstanceListColumnByColumnDirection[col][row].disableTooltip(!1);
47900
+ for (const row in chartInstanceListRowByRowDirection) for (const col in chartInstanceListRowByRowDirection[row]) chartInstanceListRowByRowDirection[row][col].disableTooltip(!1);
47901
+ }
47870
47902
 
47871
47903
  function isValidAlignDomain(domain) {
47872
47904
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -48593,9 +48625,8 @@
48593
48625
  var _a;
48594
48626
  brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
48595
48627
  })), this.activeChartInstance.on("brushStart", params => {
48596
- var _a;
48597
48628
  const brushingChartInstance = getBrushingChartInstance();
48598
- brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && (null === (_a = brushingChartInstance.getChart()) || void 0 === _a || _a.getComponentsByKey("brush")[0].clearBrushStateAndMask()), setBrushingChartInstance(this.activeChartInstance, col, row));
48629
+ brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && clearAndReleaseBrushingChartInstance(table.scenegraph), setBrushingChartInstance(this.activeChartInstance, col, row));
48599
48630
  }), this.activeChartInstance.on("brushEnd", params => {
48600
48631
  var _a;
48601
48632
  null == brushChangeThrottle || brushChangeThrottle.cancel(), table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush"), Chart.temp = 0, setTimeout(() => {
@@ -53259,25 +53290,16 @@
53259
53290
  resetResidentHoverIcon(col, row, this);
53260
53291
  }
53261
53292
  deactivateChart(col, row, forceRelease = !1) {
53262
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
53293
+ var _a, _b, _c, _d, _e, _f;
53263
53294
  if (forceRelease) {
53264
53295
  const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
53265
53296
  brushingChartInstance = getBrushingChartInstance();
53266
- if (brushingChartInstanceCellPos && brushingChartInstance) {
53267
- const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
53268
- (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
53269
- forceRelease: !0,
53270
- releaseChartInstance: !0,
53271
- releaseColumnChartInstance: !0,
53272
- releaseRowChartInstance: !0,
53273
- releaseAllChartInstance: !0
53274
- })), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this), clearBrushingChartInstance();
53275
- }
53297
+ brushingChartInstanceCellPos && brushingChartInstance && (clearAndReleaseBrushingChartInstance(this), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this));
53276
53298
  }
53277
53299
  if (-1 === col || -1 === row) return;
53278
53300
  const cellGroup = this.getCell(col, row);
53279
- if (null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) {
53280
- if (forceRelease) return void (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _e ? void 0 : _e.deactivate) || void 0 === _f || _f.call(_e, this.table, {
53301
+ if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
53302
+ if (forceRelease) return void (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
53281
53303
  forceRelease: !0,
53282
53304
  releaseChartInstance: !0,
53283
53305
  releaseColumnChartInstance: !0,
@@ -53285,7 +53307,7 @@
53285
53307
  releaseAllChartInstance: !0
53286
53308
  }));
53287
53309
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
53288
- null === (_h = null === (_g = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _g ? void 0 : _g.deactivate) || void 0 === _h || _h.call(_g, this.table, (null === (_j = this.table.options.chartDimensionLinkage) || void 0 === _j ? void 0 : _j.showTooltip) ? {
53310
+ null === (_e = null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) || void 0 === _e || _e.call(_d, this.table, (null === (_f = this.table.options.chartDimensionLinkage) || void 0 === _f ? void 0 : _f.showTooltip) ? {
53289
53311
  releaseChartInstance: "pie" !== chartType && ("scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53290
53312
  releaseColumnChartInstance: "pie" !== chartType && (col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53291
53313
  releaseRowChartInstance: "pie" !== chartType && (row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount)
@@ -60110,7 +60132,7 @@
60110
60132
  }
60111
60133
  constructor(container, options = {}) {
60112
60134
  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;
60113
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-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");
60135
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.11", 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");
60114
60136
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60115
60137
  options: options,
60116
60138
  container: container
@@ -76415,7 +76437,7 @@
76415
76437
  PluginManager: PluginManager
76416
76438
  });
76417
76439
 
76418
- const version = "1.22.11-alpha.10";
76440
+ const version = "1.22.11-alpha.11";
76419
76441
 
76420
76442
  exports.Gantt = Gantt;
76421
76443
  exports.TYPES = index$4;