@visactor/vtable-calendar 1.22.4-alpha.7 → 1.22.4-alpha.9
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
CHANGED
|
@@ -55569,20 +55569,23 @@
|
|
|
55569
55569
|
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
55570
55570
|
});
|
|
55571
55571
|
}
|
|
55572
|
-
|
|
55572
|
+
removeOrAddPlugins(plugins) {
|
|
55573
55573
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
55574
55574
|
var _a;
|
|
55575
55575
|
null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
|
|
55576
55576
|
this.table.off(id);
|
|
55577
55577
|
}), this.release(), this.plugins.delete(plugin.id);
|
|
55578
|
-
}), this.plugins.forEach(plugin => {
|
|
55579
|
-
plugin.update && plugin.update();
|
|
55580
55578
|
});
|
|
55581
55579
|
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
55582
55580
|
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
55583
55581
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
55584
55582
|
});
|
|
55585
55583
|
}
|
|
55584
|
+
updatePlugins() {
|
|
55585
|
+
this.plugins.forEach(plugin => {
|
|
55586
|
+
plugin.update && plugin.update();
|
|
55587
|
+
});
|
|
55588
|
+
}
|
|
55586
55589
|
release() {
|
|
55587
55590
|
this.plugins.forEach(plugin => {
|
|
55588
55591
|
var _a;
|
|
@@ -55605,7 +55608,7 @@
|
|
|
55605
55608
|
}
|
|
55606
55609
|
constructor(container, options = {}) {
|
|
55607
55610
|
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;
|
|
55608
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.
|
|
55611
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.9", 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");
|
|
55609
55612
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
55610
55613
|
options: options,
|
|
55611
55614
|
container: container
|
|
@@ -61034,7 +61037,7 @@
|
|
|
61034
61037
|
}) {
|
|
61035
61038
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
61036
61039
|
const internalProps = this.internalProps;
|
|
61037
|
-
if (this.pluginManager.
|
|
61040
|
+
if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
|
|
61038
61041
|
addRecordRule: options.addRecordRule
|
|
61039
61042
|
}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
61040
61043
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -61050,7 +61053,7 @@
|
|
|
61050
61053
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
61051
61054
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_j = this.internalProps.emptyTip) || void 0 === _j || _j.resetVisible();
|
|
61052
61055
|
}
|
|
61053
|
-
return setTimeout(() => {
|
|
61056
|
+
return this.pluginManager.updatePlugins(), setTimeout(() => {
|
|
61054
61057
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
61055
61058
|
}, 0), new Promise(resolve => {
|
|
61056
61059
|
setTimeout(resolve, 0);
|