@visactor/vtable-gantt 1.18.2-alpha.3 → 1.18.2
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/data/DataSource.js +2 -0
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/gantt-helper.js +56 -56
- package/cjs/gantt-helper.js.map +1 -1
- 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 +69 -46
- package/dist/vtable-gantt.min.js +2 -2
- package/es/data/DataSource.js +2 -0
- package/es/data/DataSource.js.map +1 -1
- package/es/gantt-helper.js +54 -54
- package/es/gantt-helper.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/dist/vtable-gantt.js
CHANGED
|
@@ -29510,9 +29510,10 @@
|
|
|
29510
29510
|
gantt.parsedOptions.minDate = options?.minDate
|
|
29511
29511
|
? getStartDateByTimeUnit(new Date(options.minDate), minTimeUnit, startOfWeek)
|
|
29512
29512
|
: undefined;
|
|
29513
|
-
gantt.parsedOptions.maxDate =
|
|
29514
|
-
|
|
29515
|
-
|
|
29513
|
+
gantt.parsedOptions.maxDate =
|
|
29514
|
+
options?.maxDate && gantt.parsedOptions?.minDate
|
|
29515
|
+
? getEndDateByTimeUnit(gantt.parsedOptions?.minDate, new Date(options.maxDate), minTimeUnit, step)
|
|
29516
|
+
: undefined;
|
|
29516
29517
|
gantt.parsedOptions._minDateTime = gantt.parsedOptions.minDate?.getTime();
|
|
29517
29518
|
gantt.parsedOptions._maxDateTime = gantt.parsedOptions.maxDate?.getTime();
|
|
29518
29519
|
gantt.parsedOptions.overscrollBehavior = options?.overscrollBehavior ?? 'auto';
|
|
@@ -50336,6 +50337,9 @@
|
|
|
50336
50337
|
mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
|
|
50337
50338
|
});
|
|
50338
50339
|
}
|
|
50340
|
+
setTimeout(() => {
|
|
50341
|
+
eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
50342
|
+
}, 0);
|
|
50339
50343
|
}
|
|
50340
50344
|
}), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
|
|
50341
50345
|
var _a, _b, _c, _d;
|
|
@@ -50937,6 +50941,7 @@
|
|
|
50937
50941
|
}
|
|
50938
50942
|
const globalPointerdownCallback = e => {
|
|
50939
50943
|
var _a;
|
|
50944
|
+
if (table.isReleased) return;
|
|
50940
50945
|
table.eventManager.LastBodyPointerXY = {
|
|
50941
50946
|
x: e.x,
|
|
50942
50947
|
y: e.y
|
|
@@ -50960,6 +50965,7 @@
|
|
|
50960
50965
|
}), vglobal.addEventListener("pointerdown", globalPointerdownCallback);
|
|
50961
50966
|
const globalPointerupCallback = e => {
|
|
50962
50967
|
var _a;
|
|
50968
|
+
if (table.isReleased) return;
|
|
50963
50969
|
const target = e.target;
|
|
50964
50970
|
if (target !== table.canvas && (e => {
|
|
50965
50971
|
var _a, _b;
|
|
@@ -51008,7 +51014,7 @@
|
|
|
51008
51014
|
const {
|
|
51009
51015
|
x: x,
|
|
51010
51016
|
y: y
|
|
51011
|
-
} = table._getMouseAbstractPoint(e
|
|
51017
|
+
} = table._getMouseAbstractPoint(e);
|
|
51012
51018
|
stateManager.interactionState === InteractionState.grabing && (stateManager.isResizeCol() ? (eventManager.dealColumnResize(x, y), table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN) && table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN, {
|
|
51013
51019
|
col: table.stateManager.columnResize.col,
|
|
51014
51020
|
colWidth: table.getColWidth(table.stateManager.columnResize.col)
|
|
@@ -51114,7 +51120,7 @@
|
|
|
51114
51120
|
}, table.stateManager);
|
|
51115
51121
|
});
|
|
51116
51122
|
}
|
|
51117
|
-
eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.touchMovePoints = [];
|
|
51123
|
+
eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
51118
51124
|
}
|
|
51119
51125
|
};
|
|
51120
51126
|
vglobal.addEventListener("touchend", globalTouchEndCallback), eventManager.globalEventListeners.push({
|
|
@@ -51123,7 +51129,7 @@
|
|
|
51123
51129
|
callback: globalTouchEndCallback
|
|
51124
51130
|
});
|
|
51125
51131
|
const globalTouchCancelCallback = e => {
|
|
51126
|
-
eventManager.touchEnd = !0, eventManager.isLongTouch = !1, eventManager.isTouchdown && (eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.touchMovePoints = []);
|
|
51132
|
+
eventManager.touchEnd = !0, eventManager.isLongTouch = !1, eventManager.isTouchdown && (eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.touchMovePoints = [], eventManager.isDraging = !1);
|
|
51127
51133
|
};
|
|
51128
51134
|
vglobal.addEventListener("touchcancel", globalTouchCancelCallback), eventManager.globalEventListeners.push({
|
|
51129
51135
|
name: "touchcancel",
|
|
@@ -54199,8 +54205,8 @@
|
|
|
54199
54205
|
constructor(table, options) {
|
|
54200
54206
|
var _a;
|
|
54201
54207
|
this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
54202
|
-
this.register(plugin);
|
|
54203
|
-
})
|
|
54208
|
+
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
54209
|
+
});
|
|
54204
54210
|
}
|
|
54205
54211
|
register(plugin) {
|
|
54206
54212
|
this.plugins.set(plugin.id, plugin);
|
|
@@ -54211,23 +54217,31 @@
|
|
|
54211
54217
|
getPlugin(id) {
|
|
54212
54218
|
return this.plugins.get(id);
|
|
54213
54219
|
}
|
|
54214
|
-
|
|
54215
|
-
this.plugins.
|
|
54216
|
-
|
|
54217
|
-
|
|
54218
|
-
|
|
54219
|
-
|
|
54220
|
-
|
|
54221
|
-
|
|
54222
|
-
|
|
54223
|
-
|
|
54224
|
-
|
|
54220
|
+
getPluginByName(name) {
|
|
54221
|
+
return Array.from(this.plugins.values()).find(plugin => plugin.name === name);
|
|
54222
|
+
}
|
|
54223
|
+
_bindTableEventForPlugin(plugin) {
|
|
54224
|
+
var _this = this;
|
|
54225
|
+
var _a;
|
|
54226
|
+
null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
|
|
54227
|
+
this.table.on(runTime, function () {
|
|
54228
|
+
var _a;
|
|
54229
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54230
|
+
args[_key] = arguments[_key];
|
|
54231
|
+
}
|
|
54232
|
+
null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, _this.table);
|
|
54225
54233
|
});
|
|
54226
54234
|
});
|
|
54227
54235
|
}
|
|
54228
|
-
updatePlugins() {
|
|
54229
|
-
this.plugins.forEach(plugin => {
|
|
54230
|
-
|
|
54236
|
+
updatePlugins(plugins) {
|
|
54237
|
+
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
54238
|
+
this.release(), this.plugins.delete(plugin.id);
|
|
54239
|
+
}), this.plugins.forEach(plugin => {
|
|
54240
|
+
plugin.update && plugin.update();
|
|
54241
|
+
});
|
|
54242
|
+
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
54243
|
+
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
54244
|
+
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
54231
54245
|
});
|
|
54232
54246
|
}
|
|
54233
54247
|
release() {
|
|
@@ -54253,7 +54267,7 @@
|
|
|
54253
54267
|
constructor(container) {
|
|
54254
54268
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
54255
54269
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
54256
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.18.2
|
|
54270
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.18.2", 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");
|
|
54257
54271
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
54258
54272
|
options: options,
|
|
54259
54273
|
container: container
|
|
@@ -55097,8 +55111,8 @@
|
|
|
55097
55111
|
return super.fireListeners(type, event);
|
|
55098
55112
|
}
|
|
55099
55113
|
updateOption(options) {
|
|
55100
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
55101
|
-
this.options = options, this._hasAutoImageColumn = void 0;
|
|
55114
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
55115
|
+
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options, this._hasAutoImageColumn = void 0;
|
|
55102
55116
|
const {
|
|
55103
55117
|
frozenColCount = 0,
|
|
55104
55118
|
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
@@ -55138,9 +55152,9 @@
|
|
|
55138
55152
|
} = options;
|
|
55139
55153
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
55140
55154
|
const internalProps = this.internalProps;
|
|
55141
|
-
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (
|
|
55155
|
+
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_b = options.columnWidthComputeMode) && void 0 !== _b ? _b : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.columnResizeMode = null !== (_c = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _c ? _c : columnResizeMode, internalProps.rowResizeMode = null !== (_d = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _d ? _d : rowResizeMode, internalProps.dragHeaderMode = null !== (_f = null !== (_e = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _e ? _e : dragHeaderMode) && void 0 !== _f ? _f : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_g = options.theme) && void 0 !== _g ? _g : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_h = options.allowFrozenColCount) && void 0 !== _h ? _h : 0, internalProps.limitMaxAutoWidth = null !== (_j = options.limitMaxAutoWidth) && void 0 !== _j ? _j : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_k = internalProps.legends) || void 0 === _k || _k.forEach(legend => {
|
|
55142
55156
|
null == legend || legend.release();
|
|
55143
|
-
}), null === (
|
|
55157
|
+
}), null === (_l = internalProps.title) || void 0 === _l || _l.release(), internalProps.title = null, null === (_m = internalProps.emptyTip) || void 0 === _m || _m.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
55144
55158
|
internalProps.legends = [];
|
|
55145
55159
|
const createLegend = Factory.getFunction("createLegend");
|
|
55146
55160
|
if (Array.isArray(options.legends)) {
|
|
@@ -55166,11 +55180,11 @@
|
|
|
55166
55180
|
}
|
|
55167
55181
|
if (internalProps.menu = Object.assign({
|
|
55168
55182
|
renderMode: "html"
|
|
55169
|
-
}, options.menu), Array.isArray(null === (
|
|
55183
|
+
}, options.menu), Array.isArray(null === (_o = options.menu) || void 0 === _o ? void 0 : _o.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_p = options.menu) || void 0 === _p ? void 0 : _p.dropDownMenuHighlight), (Array.isArray(null === (_q = options.menu) || void 0 === _q ? void 0 : _q.defaultHeaderMenuItems) || "function" == typeof (null === (_r = options.menu) || void 0 === _r ? void 0 : _r.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
55170
55184
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
55171
55185
|
internalProps.menuHandler = new MenuHandler(this);
|
|
55172
55186
|
}
|
|
55173
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (
|
|
55187
|
+
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_s = this.customCellStylePlugin) || void 0 === _s || _s.updateCustomCell(null !== (_t = options.customCellStyle) && void 0 !== _t ? _t : [], null !== (_u = options.customCellStyleArrangement) && void 0 !== _u ? _u : []), this._adjustCanvasSizeByOption();
|
|
55174
55188
|
}
|
|
55175
55189
|
renderWithRecreateCells() {
|
|
55176
55190
|
this.internalProps.stick.changedCells.clear();
|
|
@@ -55208,8 +55222,7 @@
|
|
|
55208
55222
|
return new Rect$1(this.tableX, this.tableY, width, height);
|
|
55209
55223
|
}
|
|
55210
55224
|
_getMouseAbstractPoint(evt) {
|
|
55211
|
-
|
|
55212
|
-
var _a, _b, _c, _d;
|
|
55225
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
55213
55226
|
let e;
|
|
55214
55227
|
if (!evt) return {
|
|
55215
55228
|
inTable: !1,
|
|
@@ -55223,16 +55236,25 @@
|
|
|
55223
55236
|
let inTable = !0;
|
|
55224
55237
|
rect.right <= clientX && (inTable = !1), rect.bottom <= clientY && (inTable = !1);
|
|
55225
55238
|
const currentWidth = rect.width,
|
|
55226
|
-
widthRatio = currentWidth / (this.canvas.offsetWidth || currentWidth),
|
|
55239
|
+
widthRatio = currentWidth / ((90 === this.rotateDegree ? this.canvas.offsetHeight : this.canvas.offsetWidth) || currentWidth),
|
|
55227
55240
|
currentHeight = rect.height,
|
|
55228
|
-
heightRatio = currentHeight / (this.canvas.offsetHeight || currentHeight),
|
|
55229
|
-
|
|
55230
|
-
|
|
55231
|
-
|
|
55241
|
+
heightRatio = currentHeight / ((90 === this.rotateDegree ? this.canvas.offsetWidth : this.canvas.offsetHeight) || currentHeight),
|
|
55242
|
+
rotateTablePlugin = this.pluginManager.getPluginByName("Rotate Table");
|
|
55243
|
+
if (rotateTablePlugin && 90 === this.rotateDegree) {
|
|
55244
|
+
const point = {
|
|
55245
|
+
x: clientX / widthRatio - (null !== (_b = null === (_a = this.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0),
|
|
55246
|
+
y: clientY / heightRatio - (null !== (_d = null === (_c = this.options.viewBox) || void 0 === _c ? void 0 : _c.y1) && void 0 !== _d ? _d : 0),
|
|
55232
55247
|
inTable: inTable
|
|
55233
55248
|
};
|
|
55249
|
+
return rotateTablePlugin.matrix.transformPoint(point, point), point;
|
|
55250
|
+
}
|
|
55251
|
+
const point = {
|
|
55252
|
+
x: (clientX - rect.left) / widthRatio - (null !== (_f = null === (_e = this.options.viewBox) || void 0 === _e ? void 0 : _e.x1) && void 0 !== _f ? _f : 0),
|
|
55253
|
+
y: (clientY - rect.top) / heightRatio - (null !== (_h = null === (_g = this.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0),
|
|
55254
|
+
inTable: inTable
|
|
55255
|
+
};
|
|
55234
55256
|
if (this.internalProps.modifiedViewBoxTransform && this.scenegraph.stage.window.getViewBoxTransform()) {
|
|
55235
|
-
this.scenegraph.stage.window.getViewBoxTransform().transformPoint(point, point);
|
|
55257
|
+
return this.scenegraph.stage.window.getViewBoxTransform().transformPoint(point, point), point;
|
|
55236
55258
|
}
|
|
55237
55259
|
return point;
|
|
55238
55260
|
}
|
|
@@ -59236,14 +59258,11 @@
|
|
|
59236
59258
|
return ifCan;
|
|
59237
59259
|
}
|
|
59238
59260
|
updateOption(options) {
|
|
59239
|
-
let updateConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
59240
|
-
keepData: !1
|
|
59241
|
-
};
|
|
59242
59261
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
59243
59262
|
const internalProps = this.internalProps;
|
|
59244
59263
|
if (super.updateOption(options), 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 = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, 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(options.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, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
59245
59264
|
const releaseObj = internalProps.releaseList[i];
|
|
59246
|
-
|
|
59265
|
+
releaseObj instanceof DataSource$1 ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
|
|
59247
59266
|
}
|
|
59248
59267
|
if (options.dataSource && this.dataSource !== options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
59249
59268
|
sortState: options.sortState
|
|
@@ -59255,7 +59274,7 @@
|
|
|
59255
59274
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
59256
59275
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_j = this.internalProps.emptyTip) || void 0 === _j || _j.resetVisible();
|
|
59257
59276
|
}
|
|
59258
|
-
return new Promise(resolve => {
|
|
59277
|
+
return this.pluginManager.updatePlugins(options.plugins), new Promise(resolve => {
|
|
59259
59278
|
setTimeout(resolve, 0);
|
|
59260
59279
|
});
|
|
59261
59280
|
}
|
|
@@ -59277,7 +59296,7 @@
|
|
|
59277
59296
|
} = table.internalProps;
|
|
59278
59297
|
if (!layoutMap) return;
|
|
59279
59298
|
const dataCount = null !== (_b = null === (_a = table.internalProps.dataSource) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
|
|
59280
|
-
layoutMap.recordsCount = dataCount + (dataCount > 0 ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
59299
|
+
layoutMap.recordsCount = dataCount + (dataCount > 0 || this.options.showAggregationWhenEmpty ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
59281
59300
|
}
|
|
59282
59301
|
getFieldData(field, col, row) {
|
|
59283
59302
|
if (null === field) return null;
|
|
@@ -62044,7 +62063,7 @@
|
|
|
62044
62063
|
}), table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
|
|
62045
62064
|
var _a, _b, _c, _d;
|
|
62046
62065
|
if ("html" === (null === (_a = table.internalProps.menu) || void 0 === _a ? void 0 : _a.renderMode)) {
|
|
62047
|
-
const abstractPos = table._getMouseAbstractPoint(e.event
|
|
62066
|
+
const abstractPos = table._getMouseAbstractPoint(e.event);
|
|
62048
62067
|
let menu = null;
|
|
62049
62068
|
abstractPos.inTable && "function" == typeof (null === (_b = table.internalProps.menu) || void 0 === _b ? void 0 : _b.contextMenuItems) ? menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table) : abstractPos.inTable && Array.isArray(null === (_c = table.internalProps.menu) || void 0 === _c ? void 0 : _c.contextMenuItems) && (menu = null === (_d = table.internalProps.menu) || void 0 === _d ? void 0 : _d.contextMenuItems), this._bindToCell(e.col, e.row, "context-menu", {
|
|
62050
62069
|
content: menu,
|
|
@@ -62446,7 +62465,7 @@
|
|
|
62446
62465
|
top: top,
|
|
62447
62466
|
bottom: bottom
|
|
62448
62467
|
} = position.rect,
|
|
62449
|
-
abstractPos = table._getMouseAbstractPoint(event
|
|
62468
|
+
abstractPos = table._getMouseAbstractPoint(event);
|
|
62450
62469
|
abstractPos.inTable && abstractPos.x >= left - 5 && abstractPos.x <= right + 5 && abstractPos.y >= top - 5 && abstractPos.y <= bottom + 5 || this._unbindFromCell();
|
|
62451
62470
|
}
|
|
62452
62471
|
this._attachInfo && table.stateManager.menu.isShow && this._bindToCell(e.col, e.row);
|
|
@@ -66493,6 +66512,10 @@
|
|
|
66493
66512
|
this._gantt.parsedOptions.minDate = getStartDateByTimeUnit(new Date(minDate), minTimeUnit, startOfWeek);
|
|
66494
66513
|
this._gantt.parsedOptions._minDateTime = this._gantt.parsedOptions.minDate.getTime();
|
|
66495
66514
|
}
|
|
66515
|
+
if (needMinDate && !needMaxDate) {
|
|
66516
|
+
this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(this._gantt.parsedOptions.minDate, new Date(this._gantt.options.maxDate), minTimeUnit, step);
|
|
66517
|
+
this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();
|
|
66518
|
+
}
|
|
66496
66519
|
if (needMaxDate) {
|
|
66497
66520
|
this._gantt.parsedOptions.maxDate = getEndDateByTimeUnit(this._gantt.parsedOptions.minDate, new Date(maxDate), minTimeUnit, step);
|
|
66498
66521
|
this._gantt.parsedOptions._maxDateTime = this._gantt.parsedOptions.maxDate.getTime();
|
|
@@ -67411,7 +67434,7 @@
|
|
|
67411
67434
|
themes: themes$1
|
|
67412
67435
|
});
|
|
67413
67436
|
|
|
67414
|
-
const version = "1.18.2
|
|
67437
|
+
const version = "1.18.2";
|
|
67415
67438
|
|
|
67416
67439
|
exports.Gantt = Gantt;
|
|
67417
67440
|
exports.TYPES = index$3;
|