@visactor/vtable-calendar 1.14.3 → 1.14.4-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.
- package/dist/vtable-calendar.js +17 -15
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
package/dist/vtable-calendar.js
CHANGED
|
@@ -36015,7 +36015,7 @@
|
|
|
36015
36015
|
return isHandlingChartQueue;
|
|
36016
36016
|
}
|
|
36017
36017
|
function renderChart(chart) {
|
|
36018
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36018
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36019
36019
|
const {
|
|
36020
36020
|
axes: axes,
|
|
36021
36021
|
dataId: dataId,
|
|
@@ -36062,10 +36062,10 @@
|
|
|
36062
36062
|
} = chart.getRootNode();
|
|
36063
36063
|
let updateSpec = !1;
|
|
36064
36064
|
if (table.options.specFormat) {
|
|
36065
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
36065
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, chartInstance, chart);
|
|
36066
36066
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36067
36067
|
const spec = formatResult.spec;
|
|
36068
|
-
chartInstance.updateSpecSync(spec), updateSpec =
|
|
36068
|
+
chartInstance.updateSpecSync(spec), updateSpec = null === (_a = formatResult.updateSpec) || void 0 === _a || _a;
|
|
36069
36069
|
}
|
|
36070
36070
|
}
|
|
36071
36071
|
if (!updateSpec) if (null == axes || axes.forEach((axis, index) => {
|
|
@@ -36085,7 +36085,7 @@
|
|
|
36085
36085
|
tickMode: null === (_e = axis.tick) || void 0 === _e ? void 0 : _e.tickMode
|
|
36086
36086
|
}
|
|
36087
36087
|
}, !0);
|
|
36088
|
-
}), null === (
|
|
36088
|
+
}), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, chartInstance), "string" == typeof dataId) chartInstance.updateDataSync(dataId, null != data ? data : []);else {
|
|
36089
36089
|
const dataBatch = [];
|
|
36090
36090
|
for (const dataIdStr in dataId) {
|
|
36091
36091
|
const dataIdAndField = dataId[dataIdStr],
|
|
@@ -36095,11 +36095,11 @@
|
|
|
36095
36095
|
});
|
|
36096
36096
|
dataBatch.push({
|
|
36097
36097
|
id: dataIdStr,
|
|
36098
|
-
values: dataIdAndField ? null !== (
|
|
36099
|
-
fields: null === (
|
|
36100
|
-
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (
|
|
36098
|
+
values: dataIdAndField ? null !== (_d = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _d ? _d : [] : null != data ? data : [],
|
|
36099
|
+
fields: null === (_e = null == series ? void 0 : series.data) || void 0 === _e ? void 0 : _e.fields
|
|
36100
|
+
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (_f = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _f ? _f : [] : null != data ? data : []);
|
|
36101
36101
|
}
|
|
36102
|
-
null === (
|
|
36102
|
+
null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
|
|
36103
36103
|
}
|
|
36104
36104
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36105
36105
|
}
|
|
@@ -36221,10 +36221,10 @@
|
|
|
36221
36221
|
context.drawImage(canvas, x, y, width, height);
|
|
36222
36222
|
}) : context.drawImage(cacheCanvas, x, y, width, height);else if (activeChartInstance) {
|
|
36223
36223
|
if (table.options.specFormat) {
|
|
36224
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
36224
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, activeChartInstance, chart);
|
|
36225
36225
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36226
36226
|
const spec = formatResult.spec;
|
|
36227
|
-
|
|
36227
|
+
activeChartInstance.updateSpecSync(spec);
|
|
36228
36228
|
}
|
|
36229
36229
|
}
|
|
36230
36230
|
const viewBox = chart.getViewBox();
|
|
@@ -46637,7 +46637,7 @@
|
|
|
46637
46637
|
constructor(container) {
|
|
46638
46638
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46639
46639
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46640
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
46640
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46641
46641
|
const {
|
|
46642
46642
|
frozenColCount = 0,
|
|
46643
46643
|
frozenRowCount: frozenRowCount,
|
|
@@ -49738,7 +49738,7 @@
|
|
|
49738
49738
|
sourceIds.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
49739
49739
|
}
|
|
49740
49740
|
const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
49741
|
-
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children
|
|
49741
|
+
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
49742
49742
|
sourceIndex: sourceCellRange.start.col,
|
|
49743
49743
|
targetIndex: targetIndex,
|
|
49744
49744
|
sourceSize: sourceSize,
|
|
@@ -49757,7 +49757,7 @@
|
|
|
49757
49757
|
sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
49758
49758
|
}
|
|
49759
49759
|
const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
|
|
49760
|
-
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children
|
|
49760
|
+
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
49761
49761
|
sourceIndex: sourceCellRange.start.row,
|
|
49762
49762
|
targetIndex: targetIndex,
|
|
49763
49763
|
sourceSize: sourceSize,
|
|
@@ -54113,7 +54113,7 @@
|
|
|
54113
54113
|
canvas: null !== (_0 = table.canvas) && void 0 !== _0 ? _0 : table.scenegraph.stage.window.getContext().canvas,
|
|
54114
54114
|
mode: table.options.mode,
|
|
54115
54115
|
modeParams: table.options.modeParams,
|
|
54116
|
-
spec: chartSpec,
|
|
54116
|
+
spec: table.options.specTransformInCell ? table.options.specTransformInCell(chartSpec, col, row) : chartSpec,
|
|
54117
54117
|
ClassType: ClassType,
|
|
54118
54118
|
width: width - padding[3] - padding[1],
|
|
54119
54119
|
height: height - padding[2] - padding[0],
|
|
@@ -54123,7 +54123,9 @@
|
|
|
54123
54123
|
cellPadding: padding,
|
|
54124
54124
|
dpr: table.internalProps.pixelRatio,
|
|
54125
54125
|
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
54126
|
-
tableChartOption: table.options.chartOption
|
|
54126
|
+
tableChartOption: table.options.chartOption,
|
|
54127
|
+
col: col,
|
|
54128
|
+
row: row
|
|
54127
54129
|
});
|
|
54128
54130
|
cellGroup.appendChild(chartGroup), table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
54129
54131
|
}
|