@visactor/vtable-gantt 1.22.8-alpha.2 → 1.22.8-alpha.3
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 +156 -72
- 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.8-alpha.
|
|
9
|
+
export declare const version = "1.22.8-alpha.3";
|
|
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.8-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.8-alpha.3\";\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
|
}
|
|
@@ -7192,7 +7223,9 @@
|
|
|
7192
7223
|
var _a;
|
|
7193
7224
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
7194
7225
|
const constructor = event.constructor;
|
|
7195
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
7226
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
7227
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
7228
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
7196
7229
|
}
|
|
7197
7230
|
notifyListeners(e, type) {
|
|
7198
7231
|
const listeners = e.currentTarget._events[type];
|
|
@@ -9612,6 +9645,7 @@
|
|
|
9612
9645
|
var _a;
|
|
9613
9646
|
if (!states.length) return void this.clearStates(hasAnimation);
|
|
9614
9647
|
if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
|
|
9648
|
+
this.stateSort && (states = states.sort(this.stateSort));
|
|
9615
9649
|
const stateAttrs = {};
|
|
9616
9650
|
states.forEach(stateName => {
|
|
9617
9651
|
var _a;
|
|
@@ -9795,7 +9829,7 @@
|
|
|
9795
9829
|
});
|
|
9796
9830
|
}
|
|
9797
9831
|
release() {
|
|
9798
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
9832
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
9799
9833
|
}
|
|
9800
9834
|
_emitCustomEvent(type, context) {
|
|
9801
9835
|
var _a, _b;
|
|
@@ -17301,12 +17335,12 @@
|
|
|
17301
17335
|
throw new Error("暂不支持");
|
|
17302
17336
|
}
|
|
17303
17337
|
release() {
|
|
17304
|
-
var _a, _b;
|
|
17338
|
+
var _a, _b, _d;
|
|
17305
17339
|
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 => {
|
|
17306
17340
|
layer.release();
|
|
17307
17341
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
17308
17342
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
17309
|
-
}), 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 = [];
|
|
17343
|
+
}), 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 = [];
|
|
17310
17344
|
}
|
|
17311
17345
|
setStage(stage) {}
|
|
17312
17346
|
dirty(b, matrix) {
|
|
@@ -18477,9 +18511,11 @@
|
|
|
18477
18511
|
}
|
|
18478
18512
|
emitEvent(type, e) {
|
|
18479
18513
|
if (!this.element) return;
|
|
18480
|
-
const
|
|
18514
|
+
const events = this.element._events;
|
|
18515
|
+
this._callListeners(type, e, events[WILDCARD]), this._callListeners(type, e, events[type]), this.emit(type, e);
|
|
18516
|
+
}
|
|
18517
|
+
_callListeners(type, e, listeners) {
|
|
18481
18518
|
if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
|
|
18482
|
-
this.emit(type, e);
|
|
18483
18519
|
}
|
|
18484
18520
|
}
|
|
18485
18521
|
|
|
@@ -18613,7 +18649,7 @@
|
|
|
18613
18649
|
return !!this._inuse;
|
|
18614
18650
|
}
|
|
18615
18651
|
set inuse(use) {
|
|
18616
|
-
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
|
|
18652
|
+
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
|
|
18617
18653
|
}
|
|
18618
18654
|
constructor(canvas, dpr) {
|
|
18619
18655
|
this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
|
|
@@ -21410,14 +21446,20 @@
|
|
|
21410
21446
|
x: x,
|
|
21411
21447
|
y: y
|
|
21412
21448
|
} = this.stage.eventPointTransform(e);
|
|
21413
|
-
let
|
|
21414
|
-
|
|
21449
|
+
let currentPos,
|
|
21450
|
+
currentScrollValue = 0,
|
|
21415
21451
|
delta = 0;
|
|
21416
21452
|
const {
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21453
|
+
width: width,
|
|
21454
|
+
height: height
|
|
21455
|
+
} = this.getSliderRenderBounds(),
|
|
21456
|
+
track = "vertical" === direction ? height : width,
|
|
21457
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
21458
|
+
{
|
|
21459
|
+
range: range
|
|
21460
|
+
} = this.attribute,
|
|
21461
|
+
ratio = clamp$3(range[1] - range[0], 0, 1);
|
|
21462
|
+
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
|
|
21421
21463
|
}, this._onSliderPointerMove = e => {
|
|
21422
21464
|
const {
|
|
21423
21465
|
stopSliderMovePropagation = !0
|
|
@@ -21561,15 +21603,24 @@
|
|
|
21561
21603
|
}
|
|
21562
21604
|
_getSliderPos(range) {
|
|
21563
21605
|
const {
|
|
21564
|
-
direction: direction
|
|
21606
|
+
direction: direction,
|
|
21607
|
+
minSliderSize = 0
|
|
21565
21608
|
} = this.attribute,
|
|
21566
21609
|
{
|
|
21567
21610
|
width: width,
|
|
21568
21611
|
height: height,
|
|
21569
21612
|
x1: x1,
|
|
21570
21613
|
y1: y1
|
|
21571
|
-
} = this.getSliderRenderBounds()
|
|
21572
|
-
|
|
21614
|
+
} = this.getSliderRenderBounds(),
|
|
21615
|
+
track = "horizontal" === direction ? width : height,
|
|
21616
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
21617
|
+
start = clamp$3(range[0], 0, 1),
|
|
21618
|
+
end = clamp$3(range[1], 0, 1),
|
|
21619
|
+
ratio = clamp$3(end - start, 0, 1),
|
|
21620
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
21621
|
+
T = Math.max(track - L, 0),
|
|
21622
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
21623
|
+
return [pStart, pStart + L];
|
|
21573
21624
|
}
|
|
21574
21625
|
_getScrollRange() {
|
|
21575
21626
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -21600,7 +21651,7 @@
|
|
|
21600
21651
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
21601
21652
|
}
|
|
21602
21653
|
release(all) {
|
|
21603
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
21654
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
21604
21655
|
passive: !1
|
|
21605
21656
|
}), this._clearDragEvents();
|
|
21606
21657
|
}
|
|
@@ -21609,6 +21660,7 @@
|
|
|
21609
21660
|
direction: "horizontal",
|
|
21610
21661
|
round: !0,
|
|
21611
21662
|
sliderSize: 20,
|
|
21663
|
+
minSliderSize: 0,
|
|
21612
21664
|
sliderStyle: {
|
|
21613
21665
|
fill: "rgba(0, 0, 0, .5)"
|
|
21614
21666
|
},
|
|
@@ -23182,17 +23234,21 @@
|
|
|
23182
23234
|
} = this.attribute.label;
|
|
23183
23235
|
textStyle = isFunction$7(textStyle) ? merge$2({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
|
|
23184
23236
|
const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
|
|
23185
|
-
|
|
23237
|
+
textStyle = merge$2(labelAlign, textStyle), isFunction$7(textStyle.text) && (textStyle.text = textStyle.text({
|
|
23186
23238
|
label: tickDatum.label,
|
|
23187
23239
|
value: tickDatum.rawValue,
|
|
23188
23240
|
index: tickDatum.index,
|
|
23189
23241
|
layer: layer
|
|
23190
|
-
}))
|
|
23242
|
+
}));
|
|
23243
|
+
let reactStyle = textStyle.react;
|
|
23244
|
+
return isFunction$7(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
|
|
23191
23245
|
text: null != text ? text : textContent,
|
|
23192
23246
|
_originText: tickDatum.label,
|
|
23193
23247
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
|
|
23194
23248
|
type: type
|
|
23195
|
-
}), textStyle)
|
|
23249
|
+
}), textStyle), {
|
|
23250
|
+
react: reactStyle
|
|
23251
|
+
});
|
|
23196
23252
|
}
|
|
23197
23253
|
getLabelPosition(point, vector, text, style) {
|
|
23198
23254
|
return point;
|
|
@@ -23338,9 +23394,10 @@
|
|
|
23338
23394
|
} = rotateConfig;
|
|
23339
23395
|
if (0 === labelRotateAngle.length || items.some(item => !!item.attribute.angle)) return;
|
|
23340
23396
|
let i = 0,
|
|
23341
|
-
n = 0
|
|
23342
|
-
|
|
23343
|
-
|
|
23397
|
+
n = 0,
|
|
23398
|
+
testAngle = labelRotateAngle;
|
|
23399
|
+
for (items.length > 2 && ("bottom" === orient || "top" === orient ? Math.abs(items[1].attribute.x - items[0].attribute.x) < items[0].attribute.fontSize / 2 && (testAngle = [labelRotateAngle[labelRotateAngle.length - 1]]) : Math.abs(items[1].attribute.y - items[0].attribute.y) < items[0].attribute.fontSize / 2 && (testAngle = [labelRotateAngle[labelRotateAngle.length - 1]])), testAngle && testAngle.length > 0 && (n = testAngle.length); i < n;) {
|
|
23400
|
+
const angle = testAngle[i++];
|
|
23344
23401
|
if (items.forEach(item => {
|
|
23345
23402
|
item.attribute.angle = degreeToRadian$1(angle);
|
|
23346
23403
|
}), tryRotate(orient, items), !hasIntersect(items)) break;
|
|
@@ -24220,6 +24277,8 @@
|
|
|
24220
24277
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
24221
24278
|
timeline.tick(delta);
|
|
24222
24279
|
}), this.emit("tick", delta));
|
|
24280
|
+
}, this._handleGraphTick = () => {
|
|
24281
|
+
this.initHandler(!1);
|
|
24223
24282
|
}, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
|
|
24224
24283
|
}
|
|
24225
24284
|
bindStage(stage) {
|
|
@@ -24229,9 +24288,7 @@
|
|
|
24229
24288
|
this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
|
|
24230
24289
|
}
|
|
24231
24290
|
init() {
|
|
24232
|
-
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker",
|
|
24233
|
-
this.initHandler(!1);
|
|
24234
|
-
}), application.global.env && this.initHandler(!1);
|
|
24291
|
+
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
|
|
24235
24292
|
}
|
|
24236
24293
|
addTimeline(timeline) {
|
|
24237
24294
|
this.timelines.push(timeline);
|
|
@@ -24304,7 +24361,7 @@
|
|
|
24304
24361
|
}
|
|
24305
24362
|
release() {
|
|
24306
24363
|
var _a;
|
|
24307
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
24364
|
+
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);
|
|
24308
24365
|
}
|
|
24309
24366
|
checkSkip(delta) {
|
|
24310
24367
|
var _a, _b, _c;
|
|
@@ -24410,6 +24467,18 @@
|
|
|
24410
24467
|
}
|
|
24411
24468
|
AnimationTransitionRegistry.getInstance();
|
|
24412
24469
|
|
|
24470
|
+
function getCustomType(custom) {
|
|
24471
|
+
if (!custom || !isFunction$7(custom)) return 0;
|
|
24472
|
+
const functionStr = Function.prototype.toString.call(custom);
|
|
24473
|
+
if (/^class\s/.test(functionStr)) return 1;
|
|
24474
|
+
if (!custom.prototype) return 2;
|
|
24475
|
+
if (custom.prototype.constructor === custom) {
|
|
24476
|
+
const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
|
|
24477
|
+
if (descriptor && !descriptor.writable) return 1;
|
|
24478
|
+
}
|
|
24479
|
+
return 2;
|
|
24480
|
+
}
|
|
24481
|
+
|
|
24413
24482
|
class AnimateExecutor {
|
|
24414
24483
|
static registerBuiltInAnimate(name, animate) {
|
|
24415
24484
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -24439,8 +24508,8 @@
|
|
|
24439
24508
|
}
|
|
24440
24509
|
parseParams(params, isTimeline, child) {
|
|
24441
24510
|
var _a, _b;
|
|
24442
|
-
const totalTime = this.resolveValue(params.totalTime,
|
|
24443
|
-
startTime = this.resolveValue(params.startTime,
|
|
24511
|
+
const totalTime = this.resolveValue(params.totalTime, child, void 0),
|
|
24512
|
+
startTime = this.resolveValue(params.startTime, child, 0),
|
|
24444
24513
|
parsedParams = Object.assign({}, params);
|
|
24445
24514
|
parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
|
|
24446
24515
|
const oneByOne = this.resolveValue(params.oneByOne, child, !1);
|
|
@@ -24474,7 +24543,7 @@
|
|
|
24474
24543
|
effects: effects.map(effect => {
|
|
24475
24544
|
var _a, _b;
|
|
24476
24545
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = effect.type) && void 0 !== _b ? _b : "fromTo"],
|
|
24477
|
-
customType =
|
|
24546
|
+
customType = getCustomType(custom);
|
|
24478
24547
|
return Object.assign(Object.assign({}, effect), {
|
|
24479
24548
|
custom: custom,
|
|
24480
24549
|
customType: customType
|
|
@@ -24488,12 +24557,11 @@
|
|
|
24488
24557
|
duration = this.resolveValue(params.duration, child, 300);
|
|
24489
24558
|
let oneByOneDelay = 0;
|
|
24490
24559
|
oneByOne && (oneByOneDelay = "number" == typeof oneByOne ? oneByOne : oneByOne ? delay + delayAfter + duration : 0), parsedParams.oneByOneDelay = oneByOneDelay, parsedParams.custom = null !== (_a = params.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = params.type) && void 0 !== _b ? _b : "fromTo"];
|
|
24491
|
-
const customType =
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
}
|
|
24560
|
+
const customType = getCustomType(parsedParams.custom);
|
|
24561
|
+
parsedParams.customType = customType;
|
|
24562
|
+
const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
|
|
24563
|
+
scale = isValidNumber$3(totalTime) ? totalTime / _totalTime : 1;
|
|
24564
|
+
parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
|
|
24497
24565
|
}
|
|
24498
24566
|
return parsedParams;
|
|
24499
24567
|
}
|
|
@@ -24553,7 +24621,7 @@
|
|
|
24553
24621
|
let parsedFromProps = null,
|
|
24554
24622
|
props = params.to,
|
|
24555
24623
|
from = params.from;
|
|
24556
|
-
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);
|
|
24624
|
+
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);
|
|
24557
24625
|
let totalDelay = 0;
|
|
24558
24626
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
24559
24627
|
const delayAfterValue = isFunction$7(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -24562,6 +24630,7 @@
|
|
|
24562
24630
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
24563
24631
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24564
24632
|
if (custom && customType) {
|
|
24633
|
+
customType = getCustomType(custom);
|
|
24565
24634
|
let customParams = this.resolveValue(customParameters, graphic);
|
|
24566
24635
|
"function" == typeof customParams && (customParams = customParams(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {})), customParams = Object.assign({
|
|
24567
24636
|
width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
|
|
@@ -24615,9 +24684,9 @@
|
|
|
24615
24684
|
let parsedFromProps = null,
|
|
24616
24685
|
props = effect.to,
|
|
24617
24686
|
from = effect.from;
|
|
24618
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
24687
|
+
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);
|
|
24619
24688
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
24620
|
-
customType = effect.customType;
|
|
24689
|
+
customType = effect.custom ? effect.customType : getCustomType(custom);
|
|
24621
24690
|
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
24622
24691
|
}), delayAfterValue > 0 && animate.wait(delayAfterValue);
|
|
24623
24692
|
}
|
|
@@ -24634,22 +24703,31 @@
|
|
|
24634
24703
|
animate.play(customAnimate);
|
|
24635
24704
|
}
|
|
24636
24705
|
createPropsFromChannel(channel, graphic) {
|
|
24706
|
+
var _a;
|
|
24637
24707
|
const props = {};
|
|
24638
24708
|
let from = null;
|
|
24639
|
-
|
|
24640
|
-
|
|
24641
|
-
|
|
24642
|
-
|
|
24643
|
-
}
|
|
24709
|
+
if (!channel) return {
|
|
24710
|
+
from: from,
|
|
24711
|
+
props: props,
|
|
24712
|
+
attrOutChannel: null
|
|
24713
|
+
};
|
|
24714
|
+
const attrOutChannel = {};
|
|
24715
|
+
let hasAttrs = !1;
|
|
24716
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
24717
|
+
if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
|
|
24718
|
+
to: diffAttrs[key]
|
|
24719
|
+
}), res), {})), Object.keys(channel).forEach(key => {
|
|
24644
24720
|
var _a, _b, _c, _d;
|
|
24645
24721
|
const config = channel[key];
|
|
24646
24722
|
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);
|
|
24647
|
-
}), {
|
|
24648
|
-
|
|
24649
|
-
props
|
|
24650
|
-
}
|
|
24723
|
+
}), diffAttrs) for (const key in diffAttrs) {
|
|
24724
|
+
const value = diffAttrs[key];
|
|
24725
|
+
void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
|
|
24726
|
+
}
|
|
24727
|
+
return {
|
|
24651
24728
|
from: from,
|
|
24652
|
-
props: props
|
|
24729
|
+
props: props,
|
|
24730
|
+
attrOutChannel: hasAttrs ? attrOutChannel : null
|
|
24653
24731
|
};
|
|
24654
24732
|
}
|
|
24655
24733
|
resolveValue(value, graphic, defaultValue) {
|
|
@@ -24933,7 +25011,7 @@
|
|
|
24933
25011
|
}
|
|
24934
25012
|
class AStageAnimate extends ACustomAnimate {
|
|
24935
25013
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
24936
|
-
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
|
|
25014
|
+
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
|
|
24937
25015
|
if (!this.willCallBeforeStageRender) return;
|
|
24938
25016
|
this.willCallBeforeStageRender = !1;
|
|
24939
25017
|
const stage = this.target.stage,
|
|
@@ -24946,7 +25024,7 @@
|
|
|
24946
25024
|
const stage = this.target.stage,
|
|
24947
25025
|
canvas = stage.window.getContext().canvas.nativeCanvas,
|
|
24948
25026
|
outputCanvas = this.afterStageRender(stage, canvas);
|
|
24949
|
-
outputCanvas && this.renderToStage(stage, outputCanvas);
|
|
25027
|
+
outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
|
|
24950
25028
|
}, this.props = {};
|
|
24951
25029
|
}
|
|
24952
25030
|
beforeStageRender(stage, canvas) {
|
|
@@ -29407,8 +29485,9 @@
|
|
|
29407
29485
|
let tickLength = 0;
|
|
29408
29486
|
(null === (_b = this.attribute.tick) || void 0 === _b ? void 0 : _b.visible) && !1 === this.attribute.tick.inside && (tickLength = this.attribute.tick.length || 4), (null === (_c = this.attribute.subTick) || void 0 === _c ? void 0 : _c.visible) && !1 === this.attribute.subTick.inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2));
|
|
29409
29487
|
const offset = tickLength + labelLength + space,
|
|
29410
|
-
|
|
29411
|
-
|
|
29488
|
+
actualOffset = this.getActualOffset(offset),
|
|
29489
|
+
titlePoint = this.getVerticalCoord(point, actualOffset, !1),
|
|
29490
|
+
vector = this.getVerticalVector(actualOffset, !1, {
|
|
29412
29491
|
x: 0,
|
|
29413
29492
|
y: 0
|
|
29414
29493
|
});
|
|
@@ -29437,11 +29516,11 @@
|
|
|
29437
29516
|
if (angle !== Math.PI / 2) {
|
|
29438
29517
|
const cosValue = Math.abs(Math.cos(null != angle ? angle : 0));
|
|
29439
29518
|
maxTagWidth = cosValue < 1e-6 ? 1 / 0 : this.attribute.end.x / cosValue;
|
|
29440
|
-
} else maxTagWidth = limitSize -
|
|
29519
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
29441
29520
|
} else if (angle && 0 !== angle) {
|
|
29442
29521
|
const sinValue = Math.abs(Math.sin(angle));
|
|
29443
29522
|
maxTagWidth = sinValue < 1e-6 ? 1 / 0 : this.attribute.end.y / sinValue;
|
|
29444
|
-
} else maxTagWidth = limitSize -
|
|
29523
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
29445
29524
|
}
|
|
29446
29525
|
}
|
|
29447
29526
|
const attrs = Object.assign(Object.assign(Object.assign({}, titlePoint), restAttrs), {
|
|
@@ -29746,6 +29825,10 @@
|
|
|
29746
29825
|
visibleAll: !1
|
|
29747
29826
|
});
|
|
29748
29827
|
}
|
|
29828
|
+
getActualOffset(offset) {
|
|
29829
|
+
const orient = this.attribute.orient;
|
|
29830
|
+
return "left" === orient || "right" === orient ? this.attribute.width ? this.attribute.width : (this.attribute.maxWidth && (offset = Math.min(offset, this.attribute.maxWidth)), this.attribute.minWidth && (offset = Math.max(offset, this.attribute.minWidth)), offset) : offset;
|
|
29831
|
+
}
|
|
29749
29832
|
release() {
|
|
29750
29833
|
super.release(), this._breaks = null;
|
|
29751
29834
|
}
|
|
@@ -31430,7 +31513,7 @@
|
|
|
31430
31513
|
});
|
|
31431
31514
|
}
|
|
31432
31515
|
clearVGlobalEvents() {
|
|
31433
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
31516
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
31434
31517
|
passive: !1
|
|
31435
31518
|
});
|
|
31436
31519
|
}
|
|
@@ -33356,7 +33439,7 @@
|
|
|
33356
33439
|
};
|
|
33357
33440
|
}
|
|
33358
33441
|
release(all) {
|
|
33359
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
33442
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
33360
33443
|
passive: !1
|
|
33361
33444
|
}), this._clearAllDragEvents();
|
|
33362
33445
|
}
|
|
@@ -59933,7 +60016,7 @@
|
|
|
59933
60016
|
}
|
|
59934
60017
|
constructor(container, options = {}) {
|
|
59935
60018
|
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;
|
|
59936
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.8-alpha.
|
|
60019
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.8-alpha.3", 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");
|
|
59937
60020
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
59938
60021
|
options: options,
|
|
59939
60022
|
container: container
|
|
@@ -60862,17 +60945,18 @@
|
|
|
60862
60945
|
this.release();
|
|
60863
60946
|
}
|
|
60864
60947
|
release() {
|
|
60865
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
60948
|
+
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;
|
|
60949
|
+
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();
|
|
60866
60950
|
const internalProps = this.internalProps;
|
|
60867
60951
|
if (this.isReleased) return;
|
|
60868
|
-
null === (
|
|
60952
|
+
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 => {
|
|
60869
60953
|
null == legend || legend.release();
|
|
60870
|
-
}), null === (
|
|
60954
|
+
}), 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 => {
|
|
60871
60955
|
var _a;
|
|
60872
60956
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
60873
60957
|
}), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release(), internalProps.focusControl.release();
|
|
60874
|
-
const parentElement = null === (
|
|
60875
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (
|
|
60958
|
+
const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
|
|
60959
|
+
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();
|
|
60876
60960
|
}
|
|
60877
60961
|
fireListeners(type, event) {
|
|
60878
60962
|
return super.fireListeners(type, event);
|
|
@@ -77863,7 +77947,7 @@
|
|
|
77863
77947
|
PluginManager: PluginManager
|
|
77864
77948
|
});
|
|
77865
77949
|
|
|
77866
|
-
const version = "1.22.8-alpha.
|
|
77950
|
+
const version = "1.22.8-alpha.3";
|
|
77867
77951
|
|
|
77868
77952
|
exports.Gantt = Gantt;
|
|
77869
77953
|
exports.TYPES = index$4;
|