@visactor/vtable-gantt 1.22.4-alpha.6 → 1.22.4-alpha.8
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-gantt.js +10 -7
- package/dist/vtable-gantt.min.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.22.4-alpha.
|
|
9
|
+
export declare const version = "1.22.4-alpha.8";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.4-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.4-alpha.8\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -59412,20 +59412,23 @@
|
|
|
59412
59412
|
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
59413
59413
|
});
|
|
59414
59414
|
}
|
|
59415
|
-
|
|
59415
|
+
removeOrAddPlugins(plugins) {
|
|
59416
59416
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
59417
59417
|
var _a;
|
|
59418
59418
|
null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
|
|
59419
59419
|
this.table.off(id);
|
|
59420
59420
|
}), this.release(), this.plugins.delete(plugin.id);
|
|
59421
|
-
}), this.plugins.forEach(plugin => {
|
|
59422
|
-
plugin.update && plugin.update();
|
|
59423
59421
|
});
|
|
59424
59422
|
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
59425
59423
|
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
59426
59424
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
59427
59425
|
});
|
|
59428
59426
|
}
|
|
59427
|
+
updatePlugins() {
|
|
59428
|
+
this.plugins.forEach(plugin => {
|
|
59429
|
+
plugin.update && plugin.update();
|
|
59430
|
+
});
|
|
59431
|
+
}
|
|
59429
59432
|
release() {
|
|
59430
59433
|
this.plugins.forEach(plugin => {
|
|
59431
59434
|
var _a;
|
|
@@ -59448,7 +59451,7 @@
|
|
|
59448
59451
|
}
|
|
59449
59452
|
constructor(container, options = {}) {
|
|
59450
59453
|
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;
|
|
59451
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.
|
|
59454
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.4-alpha.8", 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");
|
|
59452
59455
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
59453
59456
|
options: options,
|
|
59454
59457
|
container: container
|
|
@@ -64913,7 +64916,7 @@
|
|
|
64913
64916
|
}) {
|
|
64914
64917
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
64915
64918
|
const internalProps = this.internalProps;
|
|
64916
|
-
if (this.pluginManager.
|
|
64919
|
+
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) : {
|
|
64917
64920
|
addRecordRule: options.addRecordRule
|
|
64918
64921
|
}, 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--) {
|
|
64919
64922
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -64929,7 +64932,7 @@
|
|
|
64929
64932
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
64930
64933
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_j = this.internalProps.emptyTip) || void 0 === _j || _j.resetVisible();
|
|
64931
64934
|
}
|
|
64932
|
-
return setTimeout(() => {
|
|
64935
|
+
return this.pluginManager.updatePlugins(), setTimeout(() => {
|
|
64933
64936
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
64934
64937
|
}, 0), new Promise(resolve => {
|
|
64935
64938
|
setTimeout(resolve, 0);
|
|
@@ -77367,7 +77370,7 @@
|
|
|
77367
77370
|
PluginManager: PluginManager
|
|
77368
77371
|
});
|
|
77369
77372
|
|
|
77370
|
-
const version = "1.22.4-alpha.
|
|
77373
|
+
const version = "1.22.4-alpha.8";
|
|
77371
77374
|
|
|
77372
77375
|
exports.Gantt = Gantt;
|
|
77373
77376
|
exports.TYPES = index$4;
|