@visactor/vtable-sheet 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-sheet.js +155 -71
- package/dist/vtable-sheet.min.js +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/cjs/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
|
|
|
2
2
|
import type { ISheetDefine, IVTableSheetOptions } from './ts-types';
|
|
3
3
|
import * as TYPES from './ts-types';
|
|
4
4
|
import * as VTable from './vtable';
|
|
5
|
-
export declare const version = "1.22.8-alpha.
|
|
5
|
+
export declare const version = "1.22.8-alpha.3";
|
|
6
6
|
export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.22.8-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.22.8-alpha.3\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };\n"]}
|
package/dist/vtable-sheet.js
CHANGED
|
@@ -3606,28 +3606,59 @@
|
|
|
3606
3606
|
}
|
|
3607
3607
|
addEventListener(type, listener, options) {
|
|
3608
3608
|
if (!listener) return;
|
|
3609
|
+
const capture = this._resolveCapture(options),
|
|
3610
|
+
once = this._resolveOnce(options),
|
|
3611
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
3612
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
3613
|
+
if (wrappedMap.has(capture)) return;
|
|
3609
3614
|
const wrappedListener = event => {
|
|
3610
3615
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
3611
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
3616
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
3612
3617
|
};
|
|
3613
|
-
|
|
3618
|
+
wrappedMap.set(capture, {
|
|
3619
|
+
wrappedListener: wrappedListener,
|
|
3620
|
+
options: options
|
|
3621
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
3614
3622
|
}
|
|
3615
3623
|
removeEventListener(type, listener, options) {
|
|
3616
|
-
var _a;
|
|
3624
|
+
var _a, _b;
|
|
3617
3625
|
if (!listener) return;
|
|
3618
|
-
const
|
|
3619
|
-
|
|
3626
|
+
const capture = this._resolveCapture(options),
|
|
3627
|
+
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);
|
|
3628
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
3620
3629
|
}
|
|
3621
3630
|
dispatchEvent(event) {
|
|
3622
3631
|
return this._nativeDispatchEvent(event);
|
|
3623
3632
|
}
|
|
3624
3633
|
clearAllEventListeners() {
|
|
3625
|
-
this._listenerMap.forEach((
|
|
3626
|
-
|
|
3627
|
-
|
|
3634
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
3635
|
+
listenerMap.forEach(wrappedMap => {
|
|
3636
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
3637
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
3638
|
+
});
|
|
3628
3639
|
});
|
|
3629
3640
|
}), this._listenerMap.clear();
|
|
3630
3641
|
}
|
|
3642
|
+
_resolveCapture(options) {
|
|
3643
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
3644
|
+
}
|
|
3645
|
+
_resolveOnce(options) {
|
|
3646
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
3647
|
+
}
|
|
3648
|
+
_getOrCreateListenerTypeMap(type) {
|
|
3649
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
3650
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
3651
|
+
}
|
|
3652
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
3653
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
3654
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
3655
|
+
}
|
|
3656
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
3657
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
3658
|
+
if (!listenerTypeMap) return;
|
|
3659
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
3660
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
3661
|
+
}
|
|
3631
3662
|
_nativeAddEventListener(type, listener, options) {
|
|
3632
3663
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
3633
3664
|
}
|
|
@@ -10113,7 +10144,9 @@
|
|
|
10113
10144
|
var _a;
|
|
10114
10145
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
10115
10146
|
const constructor = event.constructor;
|
|
10116
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
10147
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
10148
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
10149
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
10117
10150
|
}
|
|
10118
10151
|
notifyListeners(e, type) {
|
|
10119
10152
|
const listeners = e.currentTarget._events[type];
|
|
@@ -12533,6 +12566,7 @@
|
|
|
12533
12566
|
var _a;
|
|
12534
12567
|
if (!states.length) return void this.clearStates(hasAnimation);
|
|
12535
12568
|
if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
|
|
12569
|
+
this.stateSort && (states = states.sort(this.stateSort));
|
|
12536
12570
|
const stateAttrs = {};
|
|
12537
12571
|
states.forEach(stateName => {
|
|
12538
12572
|
var _a;
|
|
@@ -12716,7 +12750,7 @@
|
|
|
12716
12750
|
});
|
|
12717
12751
|
}
|
|
12718
12752
|
release() {
|
|
12719
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
12753
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
12720
12754
|
}
|
|
12721
12755
|
_emitCustomEvent(type, context) {
|
|
12722
12756
|
var _a, _b;
|
|
@@ -20123,12 +20157,12 @@
|
|
|
20123
20157
|
throw new Error("暂不支持");
|
|
20124
20158
|
}
|
|
20125
20159
|
release() {
|
|
20126
|
-
var _a, _b;
|
|
20160
|
+
var _a, _b, _d;
|
|
20127
20161
|
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 => {
|
|
20128
20162
|
layer.release();
|
|
20129
20163
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
20130
20164
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
20131
|
-
}), 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 = [];
|
|
20165
|
+
}), 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 = [];
|
|
20132
20166
|
}
|
|
20133
20167
|
setStage(stage) {}
|
|
20134
20168
|
dirty(b, matrix) {
|
|
@@ -21274,9 +21308,11 @@
|
|
|
21274
21308
|
}
|
|
21275
21309
|
emitEvent(type, e) {
|
|
21276
21310
|
if (!this.element) return;
|
|
21277
|
-
const
|
|
21311
|
+
const events = this.element._events;
|
|
21312
|
+
this._callListeners(type, e, events[WILDCARD]), this._callListeners(type, e, events[type]), this.emit(type, e);
|
|
21313
|
+
}
|
|
21314
|
+
_callListeners(type, e, listeners) {
|
|
21278
21315
|
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);
|
|
21279
|
-
this.emit(type, e);
|
|
21280
21316
|
}
|
|
21281
21317
|
}
|
|
21282
21318
|
|
|
@@ -21410,7 +21446,7 @@
|
|
|
21410
21446
|
return !!this._inuse;
|
|
21411
21447
|
}
|
|
21412
21448
|
set inuse(use) {
|
|
21413
|
-
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : this.nativeContext.restore());
|
|
21449
|
+
use !== !!this._inuse && (this._inuse = use, use ? (this.nativeContext.save(), this.reset()) : (this.nativeContext.restore(), this._font = ""));
|
|
21414
21450
|
}
|
|
21415
21451
|
constructor(canvas, dpr) {
|
|
21416
21452
|
this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), {
|
|
@@ -24147,14 +24183,20 @@
|
|
|
24147
24183
|
x: x,
|
|
24148
24184
|
y: y
|
|
24149
24185
|
} = this.stage.eventPointTransform(e);
|
|
24150
|
-
let
|
|
24151
|
-
|
|
24186
|
+
let currentPos,
|
|
24187
|
+
currentScrollValue = 0,
|
|
24152
24188
|
delta = 0;
|
|
24153
24189
|
const {
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24190
|
+
width: width,
|
|
24191
|
+
height: height
|
|
24192
|
+
} = this.getSliderRenderBounds(),
|
|
24193
|
+
track = "vertical" === direction ? height : width,
|
|
24194
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
24195
|
+
{
|
|
24196
|
+
range: range
|
|
24197
|
+
} = this.attribute,
|
|
24198
|
+
ratio = clamp$3(range[1] - range[0], 0, 1);
|
|
24199
|
+
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];
|
|
24158
24200
|
}, this._onSliderPointerMove = e => {
|
|
24159
24201
|
const {
|
|
24160
24202
|
stopSliderMovePropagation = !0
|
|
@@ -24298,15 +24340,24 @@
|
|
|
24298
24340
|
}
|
|
24299
24341
|
_getSliderPos(range) {
|
|
24300
24342
|
const {
|
|
24301
|
-
direction: direction
|
|
24343
|
+
direction: direction,
|
|
24344
|
+
minSliderSize = 0
|
|
24302
24345
|
} = this.attribute,
|
|
24303
24346
|
{
|
|
24304
24347
|
width: width,
|
|
24305
24348
|
height: height,
|
|
24306
24349
|
x1: x1,
|
|
24307
24350
|
y1: y1
|
|
24308
|
-
} = this.getSliderRenderBounds()
|
|
24309
|
-
|
|
24351
|
+
} = this.getSliderRenderBounds(),
|
|
24352
|
+
track = "horizontal" === direction ? width : height,
|
|
24353
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
24354
|
+
start = clamp$3(range[0], 0, 1),
|
|
24355
|
+
end = clamp$3(range[1], 0, 1),
|
|
24356
|
+
ratio = clamp$3(end - start, 0, 1),
|
|
24357
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
24358
|
+
T = Math.max(track - L, 0),
|
|
24359
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
24360
|
+
return [pStart, pStart + L];
|
|
24310
24361
|
}
|
|
24311
24362
|
_getScrollRange() {
|
|
24312
24363
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -24337,7 +24388,7 @@
|
|
|
24337
24388
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
24338
24389
|
}
|
|
24339
24390
|
release(all) {
|
|
24340
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
24391
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
24341
24392
|
passive: !1
|
|
24342
24393
|
}), this._clearDragEvents();
|
|
24343
24394
|
}
|
|
@@ -24346,6 +24397,7 @@
|
|
|
24346
24397
|
direction: "horizontal",
|
|
24347
24398
|
round: !0,
|
|
24348
24399
|
sliderSize: 20,
|
|
24400
|
+
minSliderSize: 0,
|
|
24349
24401
|
sliderStyle: {
|
|
24350
24402
|
fill: "rgba(0, 0, 0, .5)"
|
|
24351
24403
|
},
|
|
@@ -25919,17 +25971,21 @@
|
|
|
25919
25971
|
} = this.attribute.label;
|
|
25920
25972
|
textStyle = isFunction$8(textStyle) ? merge$2({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
|
|
25921
25973
|
const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
|
|
25922
|
-
|
|
25974
|
+
textStyle = merge$2(labelAlign, textStyle), isFunction$8(textStyle.text) && (textStyle.text = textStyle.text({
|
|
25923
25975
|
label: tickDatum.label,
|
|
25924
25976
|
value: tickDatum.rawValue,
|
|
25925
25977
|
index: tickDatum.index,
|
|
25926
25978
|
layer: layer
|
|
25927
|
-
}))
|
|
25979
|
+
}));
|
|
25980
|
+
let reactStyle = textStyle.react;
|
|
25981
|
+
return isFunction$8(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
|
|
25928
25982
|
text: null != text ? text : textContent,
|
|
25929
25983
|
_originText: tickDatum.label,
|
|
25930
25984
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
|
|
25931
25985
|
type: type
|
|
25932
|
-
}), textStyle)
|
|
25986
|
+
}), textStyle), {
|
|
25987
|
+
react: reactStyle
|
|
25988
|
+
});
|
|
25933
25989
|
}
|
|
25934
25990
|
getLabelPosition(point, vector, text, style) {
|
|
25935
25991
|
return point;
|
|
@@ -26075,9 +26131,10 @@
|
|
|
26075
26131
|
} = rotateConfig;
|
|
26076
26132
|
if (0 === labelRotateAngle.length || items.some(item => !!item.attribute.angle)) return;
|
|
26077
26133
|
let i = 0,
|
|
26078
|
-
n = 0
|
|
26079
|
-
|
|
26080
|
-
|
|
26134
|
+
n = 0,
|
|
26135
|
+
testAngle = labelRotateAngle;
|
|
26136
|
+
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;) {
|
|
26137
|
+
const angle = testAngle[i++];
|
|
26081
26138
|
if (items.forEach(item => {
|
|
26082
26139
|
item.attribute.angle = degreeToRadian$1(angle);
|
|
26083
26140
|
}), tryRotate(orient, items), !hasIntersect(items)) break;
|
|
@@ -26957,6 +27014,8 @@
|
|
|
26957
27014
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
26958
27015
|
timeline.tick(delta);
|
|
26959
27016
|
}), this.emit("tick", delta));
|
|
27017
|
+
}, this._handleGraphTick = () => {
|
|
27018
|
+
this.initHandler(!1);
|
|
26960
27019
|
}, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
|
|
26961
27020
|
}
|
|
26962
27021
|
bindStage(stage) {
|
|
@@ -26966,9 +27025,7 @@
|
|
|
26966
27025
|
this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
|
|
26967
27026
|
}
|
|
26968
27027
|
init() {
|
|
26969
|
-
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker",
|
|
26970
|
-
this.initHandler(!1);
|
|
26971
|
-
}), application.global.env && this.initHandler(!1);
|
|
27028
|
+
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
|
|
26972
27029
|
}
|
|
26973
27030
|
addTimeline(timeline) {
|
|
26974
27031
|
this.timelines.push(timeline);
|
|
@@ -27041,7 +27098,7 @@
|
|
|
27041
27098
|
}
|
|
27042
27099
|
release() {
|
|
27043
27100
|
var _a;
|
|
27044
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
27101
|
+
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);
|
|
27045
27102
|
}
|
|
27046
27103
|
checkSkip(delta) {
|
|
27047
27104
|
var _a, _b, _c;
|
|
@@ -27147,6 +27204,18 @@
|
|
|
27147
27204
|
}
|
|
27148
27205
|
AnimationTransitionRegistry.getInstance();
|
|
27149
27206
|
|
|
27207
|
+
function getCustomType(custom) {
|
|
27208
|
+
if (!custom || !isFunction$8(custom)) return 0;
|
|
27209
|
+
const functionStr = Function.prototype.toString.call(custom);
|
|
27210
|
+
if (/^class\s/.test(functionStr)) return 1;
|
|
27211
|
+
if (!custom.prototype) return 2;
|
|
27212
|
+
if (custom.prototype.constructor === custom) {
|
|
27213
|
+
const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
|
|
27214
|
+
if (descriptor && !descriptor.writable) return 1;
|
|
27215
|
+
}
|
|
27216
|
+
return 2;
|
|
27217
|
+
}
|
|
27218
|
+
|
|
27150
27219
|
class AnimateExecutor {
|
|
27151
27220
|
static registerBuiltInAnimate(name, animate) {
|
|
27152
27221
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -27176,8 +27245,8 @@
|
|
|
27176
27245
|
}
|
|
27177
27246
|
parseParams(params, isTimeline, child) {
|
|
27178
27247
|
var _a, _b;
|
|
27179
|
-
const totalTime = this.resolveValue(params.totalTime,
|
|
27180
|
-
startTime = this.resolveValue(params.startTime,
|
|
27248
|
+
const totalTime = this.resolveValue(params.totalTime, child, void 0),
|
|
27249
|
+
startTime = this.resolveValue(params.startTime, child, 0),
|
|
27181
27250
|
parsedParams = Object.assign({}, params);
|
|
27182
27251
|
parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
|
|
27183
27252
|
const oneByOne = this.resolveValue(params.oneByOne, child, !1);
|
|
@@ -27211,7 +27280,7 @@
|
|
|
27211
27280
|
effects: effects.map(effect => {
|
|
27212
27281
|
var _a, _b;
|
|
27213
27282
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = effect.type) && void 0 !== _b ? _b : "fromTo"],
|
|
27214
|
-
customType =
|
|
27283
|
+
customType = getCustomType(custom);
|
|
27215
27284
|
return Object.assign(Object.assign({}, effect), {
|
|
27216
27285
|
custom: custom,
|
|
27217
27286
|
customType: customType
|
|
@@ -27225,12 +27294,11 @@
|
|
|
27225
27294
|
duration = this.resolveValue(params.duration, child, 300);
|
|
27226
27295
|
let oneByOneDelay = 0;
|
|
27227
27296
|
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"];
|
|
27228
|
-
const customType =
|
|
27229
|
-
|
|
27230
|
-
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
}
|
|
27297
|
+
const customType = getCustomType(parsedParams.custom);
|
|
27298
|
+
parsedParams.customType = customType;
|
|
27299
|
+
const _totalTime = delay + delayAfter + duration + oneByOneDelay * (this._target.count - 2),
|
|
27300
|
+
scale = isValidNumber$3(totalTime) ? totalTime / _totalTime : 1;
|
|
27301
|
+
parsedParams.delay = delay * scale, parsedParams.delayAfter = delayAfter * scale, parsedParams.duration = duration * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime;
|
|
27234
27302
|
}
|
|
27235
27303
|
return parsedParams;
|
|
27236
27304
|
}
|
|
@@ -27290,7 +27358,7 @@
|
|
|
27290
27358
|
let parsedFromProps = null,
|
|
27291
27359
|
props = params.to,
|
|
27292
27360
|
from = params.from;
|
|
27293
|
-
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);
|
|
27361
|
+
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);
|
|
27294
27362
|
let totalDelay = 0;
|
|
27295
27363
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
27296
27364
|
const delayAfterValue = isFunction$8(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -27299,6 +27367,7 @@
|
|
|
27299
27367
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
27300
27368
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
27301
27369
|
if (custom && customType) {
|
|
27370
|
+
customType = getCustomType(custom);
|
|
27302
27371
|
let customParams = this.resolveValue(customParameters, graphic);
|
|
27303
27372
|
"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({
|
|
27304
27373
|
width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
|
|
@@ -27352,9 +27421,9 @@
|
|
|
27352
27421
|
let parsedFromProps = null,
|
|
27353
27422
|
props = effect.to,
|
|
27354
27423
|
from = effect.from;
|
|
27355
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
27424
|
+
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);
|
|
27356
27425
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
27357
|
-
customType = effect.customType;
|
|
27426
|
+
customType = effect.custom ? effect.customType : getCustomType(custom);
|
|
27358
27427
|
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
27359
27428
|
}), delayAfterValue > 0 && animate.wait(delayAfterValue);
|
|
27360
27429
|
}
|
|
@@ -27371,22 +27440,31 @@
|
|
|
27371
27440
|
animate.play(customAnimate);
|
|
27372
27441
|
}
|
|
27373
27442
|
createPropsFromChannel(channel, graphic) {
|
|
27443
|
+
var _a;
|
|
27374
27444
|
const props = {};
|
|
27375
27445
|
let from = null;
|
|
27376
|
-
|
|
27377
|
-
|
|
27378
|
-
|
|
27379
|
-
|
|
27380
|
-
}
|
|
27446
|
+
if (!channel) return {
|
|
27447
|
+
from: from,
|
|
27448
|
+
props: props,
|
|
27449
|
+
attrOutChannel: null
|
|
27450
|
+
};
|
|
27451
|
+
const attrOutChannel = {};
|
|
27452
|
+
let hasAttrs = !1;
|
|
27453
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
27454
|
+
if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
|
|
27455
|
+
to: diffAttrs[key]
|
|
27456
|
+
}), res), {})), Object.keys(channel).forEach(key => {
|
|
27381
27457
|
var _a, _b, _c, _d;
|
|
27382
27458
|
const config = channel[key];
|
|
27383
27459
|
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);
|
|
27384
|
-
}), {
|
|
27385
|
-
|
|
27386
|
-
props
|
|
27387
|
-
}
|
|
27460
|
+
}), diffAttrs) for (const key in diffAttrs) {
|
|
27461
|
+
const value = diffAttrs[key];
|
|
27462
|
+
void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
|
|
27463
|
+
}
|
|
27464
|
+
return {
|
|
27388
27465
|
from: from,
|
|
27389
|
-
props: props
|
|
27466
|
+
props: props,
|
|
27467
|
+
attrOutChannel: hasAttrs ? attrOutChannel : null
|
|
27390
27468
|
};
|
|
27391
27469
|
}
|
|
27392
27470
|
resolveValue(value, graphic, defaultValue) {
|
|
@@ -27670,7 +27748,7 @@
|
|
|
27670
27748
|
}
|
|
27671
27749
|
class AStageAnimate extends ACustomAnimate {
|
|
27672
27750
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
27673
|
-
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this._beforeStageRender = () => {
|
|
27751
|
+
super(customFrom, customTo, duration, easing, params), this.willCallBeforeStageRender = !0, this.willCallAfterStageRender = !0, this.checkStatusAfterRender = !0, this._beforeStageRender = () => {
|
|
27674
27752
|
if (!this.willCallBeforeStageRender) return;
|
|
27675
27753
|
this.willCallBeforeStageRender = !1;
|
|
27676
27754
|
const stage = this.target.stage,
|
|
@@ -27683,7 +27761,7 @@
|
|
|
27683
27761
|
const stage = this.target.stage,
|
|
27684
27762
|
canvas = stage.window.getContext().canvas.nativeCanvas,
|
|
27685
27763
|
outputCanvas = this.afterStageRender(stage, canvas);
|
|
27686
|
-
outputCanvas && this.renderToStage(stage, outputCanvas);
|
|
27764
|
+
outputCanvas && this.renderToStage(stage, outputCanvas), this.checkStatusAfterRender && this.animate.status === AnimateStatus.END && this.animate.timeline.removeAnimate(this.animate);
|
|
27687
27765
|
}, this.props = {};
|
|
27688
27766
|
}
|
|
27689
27767
|
beforeStageRender(stage, canvas) {
|
|
@@ -32144,8 +32222,9 @@
|
|
|
32144
32222
|
let tickLength = 0;
|
|
32145
32223
|
(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));
|
|
32146
32224
|
const offset = tickLength + labelLength + space,
|
|
32147
|
-
|
|
32148
|
-
|
|
32225
|
+
actualOffset = this.getActualOffset(offset),
|
|
32226
|
+
titlePoint = this.getVerticalCoord(point, actualOffset, !1),
|
|
32227
|
+
vector = this.getVerticalVector(actualOffset, !1, {
|
|
32149
32228
|
x: 0,
|
|
32150
32229
|
y: 0
|
|
32151
32230
|
});
|
|
@@ -32174,11 +32253,11 @@
|
|
|
32174
32253
|
if (angle !== Math.PI / 2) {
|
|
32175
32254
|
const cosValue = Math.abs(Math.cos(null != angle ? angle : 0));
|
|
32176
32255
|
maxTagWidth = cosValue < 1e-6 ? 1 / 0 : this.attribute.end.x / cosValue;
|
|
32177
|
-
} else maxTagWidth = limitSize -
|
|
32256
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
32178
32257
|
} else if (angle && 0 !== angle) {
|
|
32179
32258
|
const sinValue = Math.abs(Math.sin(angle));
|
|
32180
32259
|
maxTagWidth = sinValue < 1e-6 ? 1 / 0 : this.attribute.end.y / sinValue;
|
|
32181
|
-
} else maxTagWidth = limitSize -
|
|
32260
|
+
} else maxTagWidth = limitSize - actualOffset;
|
|
32182
32261
|
}
|
|
32183
32262
|
}
|
|
32184
32263
|
const attrs = Object.assign(Object.assign(Object.assign({}, titlePoint), restAttrs), {
|
|
@@ -32483,6 +32562,10 @@
|
|
|
32483
32562
|
visibleAll: !1
|
|
32484
32563
|
});
|
|
32485
32564
|
}
|
|
32565
|
+
getActualOffset(offset) {
|
|
32566
|
+
const orient = this.attribute.orient;
|
|
32567
|
+
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;
|
|
32568
|
+
}
|
|
32486
32569
|
release() {
|
|
32487
32570
|
super.release(), this._breaks = null;
|
|
32488
32571
|
}
|
|
@@ -35008,7 +35091,7 @@
|
|
|
35008
35091
|
};
|
|
35009
35092
|
}
|
|
35010
35093
|
release(all) {
|
|
35011
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
35094
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
35012
35095
|
passive: !1
|
|
35013
35096
|
}), this._clearAllDragEvents();
|
|
35014
35097
|
}
|
|
@@ -59993,7 +60076,7 @@
|
|
|
59993
60076
|
}
|
|
59994
60077
|
constructor(container, options = {}) {
|
|
59995
60078
|
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;
|
|
59996
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.8-alpha.
|
|
60079
|
+
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$1.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");
|
|
59997
60080
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
59998
60081
|
options: options,
|
|
59999
60082
|
container: container
|
|
@@ -60922,17 +61005,18 @@
|
|
|
60922
61005
|
this.release();
|
|
60923
61006
|
}
|
|
60924
61007
|
release() {
|
|
60925
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
61008
|
+
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;
|
|
61009
|
+
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();
|
|
60926
61010
|
const internalProps = this.internalProps;
|
|
60927
61011
|
if (this.isReleased) return;
|
|
60928
|
-
null === (
|
|
61012
|
+
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 => {
|
|
60929
61013
|
null == legend || legend.release();
|
|
60930
|
-
}), null === (
|
|
61014
|
+
}), 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 => {
|
|
60931
61015
|
var _a;
|
|
60932
61016
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
60933
61017
|
}), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release(), internalProps.focusControl.release();
|
|
60934
|
-
const parentElement = null === (
|
|
60935
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (
|
|
61018
|
+
const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
|
|
61019
|
+
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();
|
|
60936
61020
|
}
|
|
60937
61021
|
fireListeners(type, event) {
|
|
60938
61022
|
return super.fireListeners(type, event);
|
|
@@ -92547,7 +92631,7 @@
|
|
|
92547
92631
|
importStyle();
|
|
92548
92632
|
}
|
|
92549
92633
|
|
|
92550
|
-
const version = "1.22.8-alpha.
|
|
92634
|
+
const version = "1.22.8-alpha.3";
|
|
92551
92635
|
importStyles();
|
|
92552
92636
|
|
|
92553
92637
|
exports.TYPES = index;
|