@visactor/vtable-gantt 1.22.13-alpha.0 → 1.22.13-alpha.10
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 +1 -2
- package/cjs/event/touch.js +1 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/ts-types/zoom-scale.js +1 -2
- package/cjs/zoom-scale/ZoomScaleManager.js +2 -1
- package/dist/vtable-gantt.js +98 -46
- package/dist/vtable-gantt.min.js +2 -2
- package/es/data/DataSource.js +1 -2
- package/es/event/touch.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/ts-types/zoom-scale.js +1 -2
- package/es/zoom-scale/ZoomScaleManager.js +2 -1
- package/package.json +4 -4
package/cjs/data/DataSource.js
CHANGED
package/cjs/event/touch.js
CHANGED
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.13-alpha.
|
|
9
|
+
export declare const version = "1.22.13-alpha.10";
|
|
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,
|
|
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,kBAAkB,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.13-alpha.10\";\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
|
@@ -685,28 +685,59 @@
|
|
|
685
685
|
}
|
|
686
686
|
addEventListener(type, listener, options) {
|
|
687
687
|
if (!listener) return;
|
|
688
|
+
const capture = this._resolveCapture(options),
|
|
689
|
+
once = this._resolveOnce(options),
|
|
690
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
691
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
692
|
+
if (wrappedMap.has(capture)) return;
|
|
688
693
|
const wrappedListener = event => {
|
|
689
694
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
690
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
695
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
691
696
|
};
|
|
692
|
-
|
|
697
|
+
wrappedMap.set(capture, {
|
|
698
|
+
wrappedListener: wrappedListener,
|
|
699
|
+
options: options
|
|
700
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
693
701
|
}
|
|
694
702
|
removeEventListener(type, listener, options) {
|
|
695
|
-
var _a;
|
|
703
|
+
var _a, _b;
|
|
696
704
|
if (!listener) return;
|
|
697
|
-
const
|
|
698
|
-
|
|
705
|
+
const capture = this._resolveCapture(options),
|
|
706
|
+
wrappedRecord = null === (_b = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener)) || void 0 === _b ? void 0 : _b.get(capture);
|
|
707
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
699
708
|
}
|
|
700
709
|
dispatchEvent(event) {
|
|
701
710
|
return this._nativeDispatchEvent(event);
|
|
702
711
|
}
|
|
703
712
|
clearAllEventListeners() {
|
|
704
|
-
this._listenerMap.forEach((
|
|
705
|
-
|
|
706
|
-
|
|
713
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
714
|
+
listenerMap.forEach(wrappedMap => {
|
|
715
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
716
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
717
|
+
});
|
|
707
718
|
});
|
|
708
719
|
}), this._listenerMap.clear();
|
|
709
720
|
}
|
|
721
|
+
_resolveCapture(options) {
|
|
722
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
723
|
+
}
|
|
724
|
+
_resolveOnce(options) {
|
|
725
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
726
|
+
}
|
|
727
|
+
_getOrCreateListenerTypeMap(type) {
|
|
728
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
729
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
730
|
+
}
|
|
731
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
732
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
733
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
734
|
+
}
|
|
735
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
736
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
737
|
+
if (!listenerTypeMap) return;
|
|
738
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
739
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
740
|
+
}
|
|
710
741
|
_nativeAddEventListener(type, listener, options) {
|
|
711
742
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
712
743
|
}
|
|
@@ -7220,7 +7251,9 @@
|
|
|
7220
7251
|
var _a;
|
|
7221
7252
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
7222
7253
|
const constructor = event.constructor;
|
|
7223
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
7254
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
7255
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
7256
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
7224
7257
|
}
|
|
7225
7258
|
notifyListeners(e, type) {
|
|
7226
7259
|
const listeners = e.currentTarget._events[type];
|
|
@@ -9824,7 +9857,7 @@
|
|
|
9824
9857
|
});
|
|
9825
9858
|
}
|
|
9826
9859
|
release() {
|
|
9827
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
9860
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
9828
9861
|
}
|
|
9829
9862
|
_emitCustomEvent(type, context) {
|
|
9830
9863
|
var _a, _b;
|
|
@@ -17330,12 +17363,12 @@
|
|
|
17330
17363
|
throw new Error("暂不支持");
|
|
17331
17364
|
}
|
|
17332
17365
|
release() {
|
|
17333
|
-
var _a, _b;
|
|
17366
|
+
var _a, _b, _d;
|
|
17334
17367
|
super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
|
|
17335
17368
|
layer.release();
|
|
17336
17369
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
17337
17370
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
17338
|
-
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.renderService.renderTreeRoots = [];
|
|
17371
|
+
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.params.ticker || null === (_d = this._ticker) || void 0 === _d || _d.release(), this.renderService.renderTreeRoots = [];
|
|
17339
17372
|
}
|
|
17340
17373
|
setStage(stage) {}
|
|
17341
17374
|
dirty(b, matrix) {
|
|
@@ -21646,7 +21679,7 @@
|
|
|
21646
21679
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
21647
21680
|
}
|
|
21648
21681
|
release(all) {
|
|
21649
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
21682
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
21650
21683
|
passive: !1
|
|
21651
21684
|
}), this._clearDragEvents();
|
|
21652
21685
|
}
|
|
@@ -23229,17 +23262,21 @@
|
|
|
23229
23262
|
} = this.attribute.label;
|
|
23230
23263
|
textStyle = isFunction$3(textStyle) ? merge({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
|
|
23231
23264
|
const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
|
|
23232
|
-
|
|
23265
|
+
textStyle = merge(labelAlign, textStyle), isFunction$3(textStyle.text) && (textStyle.text = textStyle.text({
|
|
23233
23266
|
label: tickDatum.label,
|
|
23234
23267
|
value: tickDatum.rawValue,
|
|
23235
23268
|
index: tickDatum.index,
|
|
23236
23269
|
layer: layer
|
|
23237
|
-
}))
|
|
23270
|
+
}));
|
|
23271
|
+
let reactStyle = textStyle.react;
|
|
23272
|
+
return isFunction$3(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
|
|
23238
23273
|
text: null != text ? text : textContent,
|
|
23239
23274
|
_originText: tickDatum.label,
|
|
23240
23275
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
|
|
23241
23276
|
type: type
|
|
23242
|
-
}), textStyle)
|
|
23277
|
+
}), textStyle), {
|
|
23278
|
+
react: reactStyle
|
|
23279
|
+
});
|
|
23243
23280
|
}
|
|
23244
23281
|
getLabelPosition(point, vector, text, style) {
|
|
23245
23282
|
return point;
|
|
@@ -24268,6 +24305,8 @@
|
|
|
24268
24305
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
24269
24306
|
timeline.tick(delta);
|
|
24270
24307
|
}), this.emit("tick", delta));
|
|
24308
|
+
}, this._handleGraphTick = () => {
|
|
24309
|
+
this.initHandler(!1);
|
|
24271
24310
|
}, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
|
|
24272
24311
|
}
|
|
24273
24312
|
bindStage(stage) {
|
|
@@ -24277,9 +24316,7 @@
|
|
|
24277
24316
|
this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
|
|
24278
24317
|
}
|
|
24279
24318
|
init() {
|
|
24280
|
-
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker",
|
|
24281
|
-
this.initHandler(!1);
|
|
24282
|
-
}), application.global.env && this.initHandler(!1);
|
|
24319
|
+
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
|
|
24283
24320
|
}
|
|
24284
24321
|
addTimeline(timeline) {
|
|
24285
24322
|
this.timelines.push(timeline);
|
|
@@ -24352,7 +24389,7 @@
|
|
|
24352
24389
|
}
|
|
24353
24390
|
release() {
|
|
24354
24391
|
var _a;
|
|
24355
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
24392
|
+
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
|
|
24356
24393
|
}
|
|
24357
24394
|
checkSkip(delta) {
|
|
24358
24395
|
var _a, _b, _c;
|
|
@@ -24612,7 +24649,7 @@
|
|
|
24612
24649
|
let parsedFromProps = null,
|
|
24613
24650
|
props = params.to,
|
|
24614
24651
|
from = params.from;
|
|
24615
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
24652
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
24616
24653
|
let totalDelay = 0;
|
|
24617
24654
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
24618
24655
|
const delayAfterValue = isFunction$3(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -24675,7 +24712,7 @@
|
|
|
24675
24712
|
let parsedFromProps = null,
|
|
24676
24713
|
props = effect.to,
|
|
24677
24714
|
from = effect.from;
|
|
24678
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
24715
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
|
|
24679
24716
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
24680
24717
|
customType = effect.custom ? effect.customType : getCustomType(custom);
|
|
24681
24718
|
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
@@ -24694,22 +24731,31 @@
|
|
|
24694
24731
|
animate.play(customAnimate);
|
|
24695
24732
|
}
|
|
24696
24733
|
createPropsFromChannel(channel, graphic) {
|
|
24734
|
+
var _a;
|
|
24697
24735
|
const props = {};
|
|
24698
24736
|
let from = null;
|
|
24699
|
-
|
|
24700
|
-
|
|
24701
|
-
|
|
24702
|
-
|
|
24703
|
-
}
|
|
24737
|
+
if (!channel) return {
|
|
24738
|
+
from: from,
|
|
24739
|
+
props: props,
|
|
24740
|
+
attrOutChannel: null
|
|
24741
|
+
};
|
|
24742
|
+
const attrOutChannel = {};
|
|
24743
|
+
let hasAttrs = !1;
|
|
24744
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
24745
|
+
if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
|
|
24746
|
+
to: diffAttrs[key]
|
|
24747
|
+
}), res), {})), Object.keys(channel).forEach(key => {
|
|
24704
24748
|
var _a, _b, _c, _d;
|
|
24705
24749
|
const config = channel[key];
|
|
24706
24750
|
void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : from[key] = config.from);
|
|
24707
|
-
}), {
|
|
24708
|
-
|
|
24709
|
-
props
|
|
24710
|
-
}
|
|
24751
|
+
}), diffAttrs) for (const key in diffAttrs) {
|
|
24752
|
+
const value = diffAttrs[key];
|
|
24753
|
+
void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
|
|
24754
|
+
}
|
|
24755
|
+
return {
|
|
24711
24756
|
from: from,
|
|
24712
|
-
props: props
|
|
24757
|
+
props: props,
|
|
24758
|
+
attrOutChannel: hasAttrs ? attrOutChannel : null
|
|
24713
24759
|
};
|
|
24714
24760
|
}
|
|
24715
24761
|
resolveValue(value, graphic, defaultValue) {
|
|
@@ -31981,7 +32027,7 @@
|
|
|
31981
32027
|
});
|
|
31982
32028
|
}
|
|
31983
32029
|
clearVGlobalEvents() {
|
|
31984
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
32030
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
31985
32031
|
passive: !1
|
|
31986
32032
|
});
|
|
31987
32033
|
}
|
|
@@ -33907,7 +33953,7 @@
|
|
|
33907
33953
|
};
|
|
33908
33954
|
}
|
|
33909
33955
|
release(all) {
|
|
33910
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
33956
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
33911
33957
|
passive: !1
|
|
33912
33958
|
}), this._clearAllDragEvents();
|
|
33913
33959
|
}
|
|
@@ -60091,11 +60137,11 @@
|
|
|
60091
60137
|
onUpdate(end, ratio, out) {
|
|
60092
60138
|
if (this.from.x !== this.to.x) {
|
|
60093
60139
|
const x = end ? this.to.x : this.from.x + Math.floor((this.to.x - this.from.x) * ratio);
|
|
60094
|
-
this.params.table.scrollLeft = x;
|
|
60140
|
+
this.params.table.scrollLeft = x, 1 === ratio && -1 !== this.to.targetCol && this.params.table.scrollToCol(this.to.targetCol, !1);
|
|
60095
60141
|
}
|
|
60096
60142
|
if (this.from.y !== this.to.y) {
|
|
60097
60143
|
const y = end ? this.to.y : this.from.y + Math.floor((this.to.y - this.from.y) * ratio);
|
|
60098
|
-
this.params.table.scrollTop = y;
|
|
60144
|
+
this.params.table.scrollTop = y, 1 === ratio && -1 !== this.to.targetRow && this.params.table.scrollToRow(this.to.targetRow, !1);
|
|
60099
60145
|
}
|
|
60100
60146
|
}
|
|
60101
60147
|
}
|
|
@@ -60127,7 +60173,9 @@
|
|
|
60127
60173
|
colDecimal && (left += colDecimal * cellRect.width), rowDecimal && (top += rowDecimal * cellRect.height);
|
|
60128
60174
|
const to = {
|
|
60129
60175
|
x: isNumber$2(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
60130
|
-
y: isNumber$2(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
60176
|
+
y: isNumber$2(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop,
|
|
60177
|
+
targetCol: null != col ? col : -1,
|
|
60178
|
+
targetRow: null != row ? row : -1
|
|
60131
60179
|
},
|
|
60132
60180
|
duration = isBoolean$2(animationOption) ? animationOption ? 3e3 : 0 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3,
|
|
60133
60181
|
easing = isBoolean$2(animationOption) ? animationOption ? "linear" : "" : null !== (_b = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _b ? _b : "linear";
|
|
@@ -60214,7 +60262,7 @@
|
|
|
60214
60262
|
}
|
|
60215
60263
|
constructor(container, options = {}) {
|
|
60216
60264
|
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;
|
|
60217
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.
|
|
60265
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.10", 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");
|
|
60218
60266
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
60219
60267
|
options: options,
|
|
60220
60268
|
container: container
|
|
@@ -61143,17 +61191,18 @@
|
|
|
61143
61191
|
this.release();
|
|
61144
61192
|
}
|
|
61145
61193
|
release() {
|
|
61146
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
61194
|
+
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, _0, _1;
|
|
61195
|
+
null === (_c = null === (_b = null === (_a = this.scenegraph) || void 0 === _a ? void 0 : _a.component) || void 0 === _b ? void 0 : _b.vScrollBar) || void 0 === _c || _c.release(), null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.hScrollBar) || void 0 === _f || _f.release(), this.animationManager.clear(), this.animationManager.ticker.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.stage) || void 0 === _h ? void 0 : _h.ticker) || void 0 === _j || _j.release();
|
|
61147
61196
|
const internalProps = this.internalProps;
|
|
61148
61197
|
if (this.isReleased) return;
|
|
61149
|
-
null === (
|
|
61198
|
+
null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k), null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m), null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(), null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q), this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s), null === (_u = internalProps.legends) || void 0 === _u || _u.forEach(legend => {
|
|
61150
61199
|
null == legend || legend.release();
|
|
61151
|
-
}), null === (
|
|
61200
|
+
}), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null, null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
61152
61201
|
var _a;
|
|
61153
61202
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
61154
61203
|
}), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
|
|
61155
|
-
const parentElement = null === (
|
|
61156
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (
|
|
61204
|
+
const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
|
|
61205
|
+
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_0 = null === (_z = null === (_y = this.editorManager) || void 0 === _y ? void 0 : _y.editingEditor) || void 0 === _z ? void 0 : _z.onEnd) || void 0 === _0 || _0.call(_z), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(), clearChartRenderQueue();
|
|
61157
61206
|
}
|
|
61158
61207
|
fireListeners(type, event) {
|
|
61159
61208
|
return super.fireListeners(type, event);
|
|
@@ -62322,6 +62371,7 @@
|
|
|
62322
62371
|
});
|
|
62323
62372
|
}
|
|
62324
62373
|
scrollToCell(cellAddr, animationOption) {
|
|
62374
|
+
var _a;
|
|
62325
62375
|
if (animationOption) return void this.animationManager.scrollTo(cellAddr, animationOption);
|
|
62326
62376
|
const drawRange = this.getDrawRange();
|
|
62327
62377
|
if (isValid$1(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
|
|
@@ -62331,8 +62381,10 @@
|
|
|
62331
62381
|
}
|
|
62332
62382
|
if (isValid$1(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
62333
62383
|
const frozenHeight = this.getFrozenRowsHeight(),
|
|
62334
|
-
|
|
62335
|
-
|
|
62384
|
+
rowInt = Math.floor(cellAddr.row),
|
|
62385
|
+
rowFloat = cellAddr.row - rowInt;
|
|
62386
|
+
let top = this.internalProps._rowHeightsMap.getSumInRange(0, rowInt - 1);
|
|
62387
|
+
rowFloat > 0 && (top += (null !== (_a = this.internalProps._rowHeightsMap.get(rowInt)) && void 0 !== _a ? _a : this.getRowHeight(rowInt)) * rowFloat), this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
62336
62388
|
}
|
|
62337
62389
|
this.render();
|
|
62338
62390
|
}
|
|
@@ -76532,7 +76584,7 @@
|
|
|
76532
76584
|
PluginManager: PluginManager
|
|
76533
76585
|
});
|
|
76534
76586
|
|
|
76535
|
-
const version = "1.22.13-alpha.
|
|
76587
|
+
const version = "1.22.13-alpha.10";
|
|
76536
76588
|
|
|
76537
76589
|
exports.Gantt = Gantt;
|
|
76538
76590
|
exports.TYPES = index$4;
|