@visactor/vtable-calendar 1.22.4-alpha.4 → 1.22.4-alpha.6
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
|
@@ -34810,7 +34810,9 @@
|
|
|
34810
34810
|
DELETE_RECORD: "delete_record",
|
|
34811
34811
|
UPDATE_RECORD: "update_record",
|
|
34812
34812
|
ADD_COLUMN: "add_column",
|
|
34813
|
-
DELETE_COLUMN: "delete_column"
|
|
34813
|
+
DELETE_COLUMN: "delete_column",
|
|
34814
|
+
FILTER_MENU_SHOW: "filter_menu_show",
|
|
34815
|
+
FILTER_MENU_HIDE: "filter_menu_hide"
|
|
34814
34816
|
};
|
|
34815
34817
|
|
|
34816
34818
|
const judgeType = value => {
|
|
@@ -55541,7 +55543,7 @@
|
|
|
55541
55543
|
class PluginManager {
|
|
55542
55544
|
constructor(table, options) {
|
|
55543
55545
|
var _a;
|
|
55544
|
-
this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
55546
|
+
this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
55545
55547
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
55546
55548
|
});
|
|
55547
55549
|
}
|
|
@@ -55560,15 +55562,19 @@
|
|
|
55560
55562
|
_bindTableEventForPlugin(plugin) {
|
|
55561
55563
|
var _a;
|
|
55562
55564
|
null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
|
|
55563
|
-
this.table.on(runTime, (...args) => {
|
|
55565
|
+
const id = this.table.on(runTime, (...args) => {
|
|
55564
55566
|
var _a;
|
|
55565
55567
|
null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.table);
|
|
55566
55568
|
});
|
|
55569
|
+
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
55567
55570
|
});
|
|
55568
55571
|
}
|
|
55569
55572
|
updatePlugins(plugins) {
|
|
55570
55573
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
55571
|
-
|
|
55574
|
+
var _a;
|
|
55575
|
+
null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
|
|
55576
|
+
this.table.off(id);
|
|
55577
|
+
}), this.release(), this.plugins.delete(plugin.id);
|
|
55572
55578
|
}), this.plugins.forEach(plugin => {
|
|
55573
55579
|
plugin.update && plugin.update();
|
|
55574
55580
|
});
|
|
@@ -55599,7 +55605,7 @@
|
|
|
55599
55605
|
}
|
|
55600
55606
|
constructor(container, options = {}) {
|
|
55601
55607
|
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;
|
|
55602
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.
|
|
55608
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.6", 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");
|
|
55603
55609
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
55604
55610
|
options: options,
|
|
55605
55611
|
container: container
|
|
@@ -61028,7 +61034,7 @@
|
|
|
61028
61034
|
}) {
|
|
61029
61035
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
61030
61036
|
const internalProps = this.internalProps;
|
|
61031
|
-
if (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) : {
|
|
61037
|
+
if (this.pluginManager.updatePlugins(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) : {
|
|
61032
61038
|
addRecordRule: options.addRecordRule
|
|
61033
61039
|
}, 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--) {
|
|
61034
61040
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -61044,7 +61050,7 @@
|
|
|
61044
61050
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
61045
61051
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_j = this.internalProps.emptyTip) || void 0 === _j || _j.resetVisible();
|
|
61046
61052
|
}
|
|
61047
|
-
return
|
|
61053
|
+
return setTimeout(() => {
|
|
61048
61054
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
61049
61055
|
}, 0), new Promise(resolve => {
|
|
61050
61056
|
setTimeout(resolve, 0);
|
|
@@ -61274,7 +61280,7 @@
|
|
|
61274
61280
|
}).map(key => this.stateManager.checkedState.get(key));
|
|
61275
61281
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
61276
61282
|
}
|
|
61277
|
-
return
|
|
61283
|
+
return [...this.stateManager.checkedState.values()];
|
|
61278
61284
|
}
|
|
61279
61285
|
getCellCheckboxState(col, row) {
|
|
61280
61286
|
var _a;
|