@visactor/vtable-calendar 1.14.4-alpha.0 → 1.14.4-alpha.1
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 +19 -17
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
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;
|
|
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);
|
|
36066
36066
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36067
36067
|
const spec = formatResult.spec;
|
|
36068
|
-
chartInstance.updateSpecSync(spec), updateSpec =
|
|
36068
|
+
chartInstance.updateSpecSync(spec), updateSpec = !0;
|
|
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 === (_b = null === (_a = table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.updateDataStateToActiveChartInstance) || void 0 === _b || _b.call(_a, 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 !== (_c = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _c ? _c : [] : null != data ? data : [],
|
|
36099
|
+
fields: null === (_d = null == series ? void 0 : series.data) || void 0 === _d ? void 0 : _d.fields
|
|
36100
|
+
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (_e = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _e ? _e : [] : null != data ? data : []);
|
|
36101
36101
|
}
|
|
36102
|
-
null === (
|
|
36102
|
+
null === (_f = chartInstance.updateFullDataSync) || void 0 === _f || _f.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);
|
|
36225
36225
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36226
36226
|
const spec = formatResult.spec;
|
|
36227
|
-
activeChartInstance.updateSpecSync(spec);
|
|
36227
|
+
return void activeChartInstance.updateSpecSync(spec);
|
|
36228
36228
|
}
|
|
36229
36229
|
}
|
|
36230
36230
|
const viewBox = chart.getViewBox();
|
|
@@ -46622,6 +46622,10 @@
|
|
|
46622
46622
|
}
|
|
46623
46623
|
}
|
|
46624
46624
|
|
|
46625
|
+
function getCustomMergeCellFunc(customMergeCell) {
|
|
46626
|
+
return isFunction$1(customMergeCell) ? customMergeCell : isArray$1(customMergeCell) ? (col, row) => customMergeCell.find(item => item.range.start.col <= col && item.range.end.col >= col && item.range.start.row <= row && item.range.end.row >= row) : void 0;
|
|
46627
|
+
}
|
|
46628
|
+
|
|
46625
46629
|
const {
|
|
46626
46630
|
toBoxArray: toBoxArray
|
|
46627
46631
|
} = style,
|
|
@@ -46637,7 +46641,7 @@
|
|
|
46637
46641
|
constructor(container) {
|
|
46638
46642
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46639
46643
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46640
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.
|
|
46644
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.1", 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
46645
|
const {
|
|
46642
46646
|
frozenColCount = 0,
|
|
46643
46647
|
frozenRowCount: frozenRowCount,
|
|
@@ -46721,7 +46725,7 @@
|
|
|
46721
46725
|
}
|
|
46722
46726
|
this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyMergeTitleCache = new Map(), this.bodyBottomStyleCache = new Map(), internalProps.stick = {
|
|
46723
46727
|
changedCells: new Map()
|
|
46724
|
-
}, internalProps.customMergeCell = options.customMergeCell;
|
|
46728
|
+
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
46725
46729
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
46726
46730
|
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_j = options.customCellStyle) && void 0 !== _j ? _j : [], null !== (_k = options.customCellStyleArrangement) && void 0 !== _k ? _k : []));
|
|
46727
46731
|
}
|
|
@@ -47474,7 +47478,7 @@
|
|
|
47474
47478
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
47475
47479
|
internalProps.menuHandler = new MenuHandler(this);
|
|
47476
47480
|
}
|
|
47477
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = options.customMergeCell, null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
|
|
47481
|
+
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
|
|
47478
47482
|
}
|
|
47479
47483
|
renderWithRecreateCells() {
|
|
47480
47484
|
const oldHoverState = {
|
|
@@ -54113,7 +54117,7 @@
|
|
|
54113
54117
|
canvas: null !== (_0 = table.canvas) && void 0 !== _0 ? _0 : table.scenegraph.stage.window.getContext().canvas,
|
|
54114
54118
|
mode: table.options.mode,
|
|
54115
54119
|
modeParams: table.options.modeParams,
|
|
54116
|
-
spec:
|
|
54120
|
+
spec: chartSpec,
|
|
54117
54121
|
ClassType: ClassType,
|
|
54118
54122
|
width: width - padding[3] - padding[1],
|
|
54119
54123
|
height: height - padding[2] - padding[0],
|
|
@@ -54123,9 +54127,7 @@
|
|
|
54123
54127
|
cellPadding: padding,
|
|
54124
54128
|
dpr: table.internalProps.pixelRatio,
|
|
54125
54129
|
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
54126
|
-
tableChartOption: table.options.chartOption
|
|
54127
|
-
col: col,
|
|
54128
|
-
row: row
|
|
54130
|
+
tableChartOption: table.options.chartOption
|
|
54129
54131
|
});
|
|
54130
54132
|
cellGroup.appendChild(chartGroup), table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
54131
54133
|
}
|