@visactor/vtable-calendar 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/dist/vtable-calendar.js +50 -28
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -43770,8 +43770,17 @@
|
|
|
43770
43770
|
row: row
|
|
43771
43771
|
};
|
|
43772
43772
|
}
|
|
43773
|
-
function
|
|
43774
|
-
|
|
43773
|
+
function clearAndReleaseBrushingChartInstance(scenegraph) {
|
|
43774
|
+
var _a, _b, _c;
|
|
43775
|
+
enableTooltipToAllChartInstances();
|
|
43776
|
+
const cellGroup = scenegraph.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
43777
|
+
(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, {
|
|
43778
|
+
forceRelease: !0,
|
|
43779
|
+
releaseChartInstance: !0,
|
|
43780
|
+
releaseColumnChartInstance: !1,
|
|
43781
|
+
releaseRowChartInstance: !1,
|
|
43782
|
+
releaseAllChartInstance: !1
|
|
43783
|
+
})), 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 = {
|
|
43775
43784
|
col: -1,
|
|
43776
43785
|
row: -1
|
|
43777
43786
|
};
|
|
@@ -43784,10 +43793,12 @@
|
|
|
43784
43793
|
}
|
|
43785
43794
|
const chartInstanceListColumnByColumnDirection = {};
|
|
43786
43795
|
const chartInstanceListRowByRowDirection = {};
|
|
43787
|
-
const
|
|
43796
|
+
const delayRunDimensionHoverTimerForColumnDirection = [],
|
|
43797
|
+
delayRunDimensionHoverTimerForRowDirection = [],
|
|
43798
|
+
delayRunDimensionHoverTimerForViewRange = [];
|
|
43788
43799
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43789
43800
|
var _a;
|
|
43790
|
-
|
|
43801
|
+
clearDelayRunDimensionHoverTimerForColumnDirection(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
43791
43802
|
const {
|
|
43792
43803
|
rowStart: rowStart
|
|
43793
43804
|
} = table.getBodyVisibleRowRange();
|
|
@@ -43824,12 +43835,12 @@
|
|
|
43824
43835
|
}
|
|
43825
43836
|
}
|
|
43826
43837
|
}, 0);
|
|
43827
|
-
|
|
43838
|
+
delayRunDimensionHoverTimerForColumnDirection.push(timer), table.scenegraph.updateNextFrame();
|
|
43828
43839
|
}
|
|
43829
43840
|
}
|
|
43830
43841
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43831
43842
|
var _a;
|
|
43832
|
-
|
|
43843
|
+
clearDelayRunDimensionHoverTimerForRowDirection(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
43833
43844
|
const {
|
|
43834
43845
|
colStart: colStart
|
|
43835
43846
|
} = table.getBodyVisibleColRange();
|
|
@@ -43866,12 +43877,12 @@
|
|
|
43866
43877
|
}
|
|
43867
43878
|
}
|
|
43868
43879
|
}, 0);
|
|
43869
|
-
|
|
43880
|
+
delayRunDimensionHoverTimerForRowDirection.push(timer), table.scenegraph.updateNextFrame();
|
|
43870
43881
|
}
|
|
43871
43882
|
}
|
|
43872
43883
|
function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
|
|
43873
43884
|
var _a;
|
|
43874
|
-
|
|
43885
|
+
clearDelayRunDimensionHoverTimerForViewRange();
|
|
43875
43886
|
const {
|
|
43876
43887
|
rowStart: rowStart
|
|
43877
43888
|
} = table.getBodyVisibleRowRange();
|
|
@@ -43898,7 +43909,7 @@
|
|
|
43898
43909
|
})));
|
|
43899
43910
|
}
|
|
43900
43911
|
}, 0);
|
|
43901
|
-
|
|
43912
|
+
delayRunDimensionHoverTimerForViewRange.push(timer), table.scenegraph.updateNextFrame();
|
|
43902
43913
|
}
|
|
43903
43914
|
}
|
|
43904
43915
|
}
|
|
@@ -44001,9 +44012,25 @@
|
|
|
44001
44012
|
}
|
|
44002
44013
|
delete chartInstanceListRowByRowDirection[row];
|
|
44003
44014
|
}
|
|
44015
|
+
function clearDelayRunDimensionHoverTimerForColumnDirection() {
|
|
44016
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
|
|
44017
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
44018
|
+
}
|
|
44019
|
+
function clearDelayRunDimensionHoverTimerForRowDirection() {
|
|
44020
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
|
|
44021
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
44022
|
+
}
|
|
44023
|
+
function clearDelayRunDimensionHoverTimerForViewRange() {
|
|
44024
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
|
|
44025
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
44026
|
+
}
|
|
44004
44027
|
function clearDelayRunDimensionHoverTimers() {
|
|
44005
|
-
for (const timer of
|
|
44006
|
-
|
|
44028
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
|
|
44029
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
44030
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
|
|
44031
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
44032
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
|
|
44033
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
44007
44034
|
}
|
|
44008
44035
|
function clearAllChartInstanceList(table, forceRelease = !1) {
|
|
44009
44036
|
clearDelayRunDimensionHoverTimers();
|
|
@@ -44014,6 +44041,11 @@
|
|
|
44014
44041
|
function isDisabledTooltipToAllChartInstances() {
|
|
44015
44042
|
return disabledTooltipToAllChartInstances;
|
|
44016
44043
|
}
|
|
44044
|
+
function enableTooltipToAllChartInstances() {
|
|
44045
|
+
disabledTooltipToAllChartInstances = !1;
|
|
44046
|
+
for (const col in chartInstanceListColumnByColumnDirection) for (const row in chartInstanceListColumnByColumnDirection[col]) chartInstanceListColumnByColumnDirection[col][row].disableTooltip(!1);
|
|
44047
|
+
for (const row in chartInstanceListRowByRowDirection) for (const col in chartInstanceListRowByRowDirection[row]) chartInstanceListRowByRowDirection[row][col].disableTooltip(!1);
|
|
44048
|
+
}
|
|
44017
44049
|
|
|
44018
44050
|
function isValidAlignDomain(domain) {
|
|
44019
44051
|
return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -44740,9 +44772,8 @@
|
|
|
44740
44772
|
var _a;
|
|
44741
44773
|
brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
|
|
44742
44774
|
})), this.activeChartInstance.on("brushStart", params => {
|
|
44743
|
-
var _a;
|
|
44744
44775
|
const brushingChartInstance = getBrushingChartInstance();
|
|
44745
|
-
brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && (
|
|
44776
|
+
brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && clearAndReleaseBrushingChartInstance(table.scenegraph), setBrushingChartInstance(this.activeChartInstance, col, row));
|
|
44746
44777
|
}), this.activeChartInstance.on("brushEnd", params => {
|
|
44747
44778
|
var _a;
|
|
44748
44779
|
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(() => {
|
|
@@ -49406,25 +49437,16 @@
|
|
|
49406
49437
|
resetResidentHoverIcon(col, row, this);
|
|
49407
49438
|
}
|
|
49408
49439
|
deactivateChart(col, row, forceRelease = !1) {
|
|
49409
|
-
var _a, _b, _c, _d, _e, _f
|
|
49440
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49410
49441
|
if (forceRelease) {
|
|
49411
49442
|
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
|
|
49412
49443
|
brushingChartInstance = getBrushingChartInstance();
|
|
49413
|
-
|
|
49414
|
-
const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
49415
|
-
(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, {
|
|
49416
|
-
forceRelease: !0,
|
|
49417
|
-
releaseChartInstance: !0,
|
|
49418
|
-
releaseColumnChartInstance: !0,
|
|
49419
|
-
releaseRowChartInstance: !0,
|
|
49420
|
-
releaseAllChartInstance: !0
|
|
49421
|
-
})), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this), clearBrushingChartInstance();
|
|
49422
|
-
}
|
|
49444
|
+
brushingChartInstanceCellPos && brushingChartInstance && (clearAndReleaseBrushingChartInstance(this), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this));
|
|
49423
49445
|
}
|
|
49424
49446
|
if (-1 === col || -1 === row) return;
|
|
49425
49447
|
const cellGroup = this.getCell(col, row);
|
|
49426
|
-
if (null === (
|
|
49427
|
-
if (forceRelease) return void (null === (
|
|
49448
|
+
if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
|
|
49449
|
+
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, {
|
|
49428
49450
|
forceRelease: !0,
|
|
49429
49451
|
releaseChartInstance: !0,
|
|
49430
49452
|
releaseColumnChartInstance: !0,
|
|
@@ -49432,7 +49454,7 @@
|
|
|
49432
49454
|
releaseAllChartInstance: !0
|
|
49433
49455
|
}));
|
|
49434
49456
|
const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
|
|
49435
|
-
null === (
|
|
49457
|
+
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) ? {
|
|
49436
49458
|
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),
|
|
49437
49459
|
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),
|
|
49438
49460
|
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)
|
|
@@ -56257,7 +56279,7 @@
|
|
|
56257
56279
|
}
|
|
56258
56280
|
constructor(container, options = {}) {
|
|
56259
56281
|
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;
|
|
56260
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.
|
|
56282
|
+
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");
|
|
56261
56283
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
56262
56284
|
options: options,
|
|
56263
56285
|
container: container
|