@visactor/vchart 2.0.0-alpha.1 → 2.0.0-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/build/es5/index.js +1 -1
- package/build/index.es.js +205 -107
- package/build/index.js +205 -107
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.d.ts +2 -2
- package/cjs/chart/mosaic/mosaic-transformer.js +1 -1
- package/cjs/chart/mosaic/mosaic-transformer.js.map +1 -1
- package/cjs/chart/mosaic/mosaic.js.map +1 -1
- package/cjs/chart/util.js +1 -2
- package/cjs/component/data-zoom/util.js +7 -7
- package/cjs/component/data-zoom/util.js.map +1 -1
- package/cjs/component/player/player.d.ts +1 -1
- package/cjs/component/player/player.js +1 -1
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +5 -7
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/component/util.js +2 -1
- package/cjs/constant/hierarchy.js +2 -1
- package/cjs/constant/sunburst.js +1 -2
- package/cjs/constant/waterfall.js +1 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +2 -2
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +1 -1
- package/cjs/mark/base/base-mark.js +5 -4
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/component.d.ts +0 -1
- package/cjs/mark/component.js +1 -5
- package/cjs/mark/component.js.map +1 -1
- package/cjs/mark/group.js +2 -2
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +1 -0
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/mark/interface/mark.d.ts +0 -1
- package/cjs/mark/interface/mark.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +3 -0
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/series/bar/bar.d.ts +1 -0
- package/cjs/series/bar/bar.js +4 -0
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/mosaic/interface.d.ts +1 -0
- package/cjs/series/mosaic/interface.js.map +1 -1
- package/cjs/series/mosaic/mosaic.d.ts +2 -0
- package/cjs/series/mosaic/mosaic.js +5 -2
- package/cjs/series/mosaic/mosaic.js.map +1 -1
- package/cjs/typings/tooltip/handler.d.ts +1 -0
- package/cjs/typings/tooltip/handler.js.map +1 -1
- package/cjs/util/data.js +7 -3
- package/cjs/util/data.js.map +1 -1
- package/esm/animation/utils.d.ts +2 -2
- package/esm/chart/mosaic/mosaic-transformer.js +1 -1
- package/esm/chart/mosaic/mosaic-transformer.js.map +1 -1
- package/esm/chart/mosaic/mosaic.js.map +1 -1
- package/esm/chart/util.js +1 -2
- package/esm/component/data-zoom/util.js +7 -6
- package/esm/component/data-zoom/util.js.map +1 -1
- package/esm/component/player/player.d.ts +1 -1
- package/esm/component/player/player.js +1 -1
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +5 -7
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/component/util.js +2 -1
- package/esm/constant/hierarchy.js +2 -1
- package/esm/constant/sunburst.js +1 -2
- package/esm/constant/waterfall.js +1 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +2 -2
- package/esm/core/vchart.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +1 -1
- package/esm/mark/base/base-mark.js +4 -4
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/component.d.ts +0 -1
- package/esm/mark/component.js +0 -6
- package/esm/mark/component.js.map +1 -1
- package/esm/mark/group.js +1 -3
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/interface/common.d.ts +1 -0
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/mark/interface/mark.d.ts +0 -1
- package/esm/mark/interface/mark.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +3 -0
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/series/bar/bar.d.ts +1 -0
- package/esm/series/bar/bar.js +4 -0
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/mosaic/interface.d.ts +1 -0
- package/esm/series/mosaic/interface.js.map +1 -1
- package/esm/series/mosaic/mosaic.d.ts +2 -0
- package/esm/series/mosaic/mosaic.js +5 -2
- package/esm/series/mosaic/mosaic.js.map +1 -1
- package/esm/typings/tooltip/handler.d.ts +1 -0
- package/esm/typings/tooltip/handler.js.map +1 -1
- package/esm/util/data.js +6 -3
- package/esm/util/data.js.map +1 -1
- package/package.json +9 -9
package/build/index.es.js
CHANGED
|
@@ -7618,11 +7618,14 @@ class Container {
|
|
|
7618
7618
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
7619
7619
|
class ContributionProviderCache {
|
|
7620
7620
|
constructor(serviceIdentifier, container) {
|
|
7621
|
-
this.serviceIdentifier = serviceIdentifier, this.container = container;
|
|
7621
|
+
this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
|
|
7622
7622
|
}
|
|
7623
7623
|
getContributions() {
|
|
7624
7624
|
return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
|
|
7625
7625
|
}
|
|
7626
|
+
refresh() {
|
|
7627
|
+
this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
|
|
7628
|
+
}
|
|
7626
7629
|
}
|
|
7627
7630
|
function bindContributionProvider(bind, id) {
|
|
7628
7631
|
bind(ContributionProvider).toDynamicValue(_ref => {
|
|
@@ -7640,6 +7643,20 @@ function bindContributionProviderNoSingletonScope(bind, id) {
|
|
|
7640
7643
|
return new ContributionProviderCache(id, container);
|
|
7641
7644
|
}).whenTargetNamed(id);
|
|
7642
7645
|
}
|
|
7646
|
+
class ContributionStore {
|
|
7647
|
+
static getStore(id) {
|
|
7648
|
+
return this.store.get(id);
|
|
7649
|
+
}
|
|
7650
|
+
static setStore(id, cache) {
|
|
7651
|
+
this.store.set(id, cache);
|
|
7652
|
+
}
|
|
7653
|
+
static refreshAllContributions() {
|
|
7654
|
+
this.store.forEach(cache => {
|
|
7655
|
+
cache.refresh();
|
|
7656
|
+
});
|
|
7657
|
+
}
|
|
7658
|
+
}
|
|
7659
|
+
ContributionStore.store = new Map();
|
|
7643
7660
|
|
|
7644
7661
|
class Hook {
|
|
7645
7662
|
constructor(args, name) {
|
|
@@ -7728,6 +7745,48 @@ class PerformanceRAF {
|
|
|
7728
7745
|
}
|
|
7729
7746
|
}
|
|
7730
7747
|
|
|
7748
|
+
class EventListenerManager {
|
|
7749
|
+
constructor() {
|
|
7750
|
+
this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
|
|
7751
|
+
}
|
|
7752
|
+
setEventListenerTransformer(transformer) {
|
|
7753
|
+
this._eventListenerTransformer = transformer || (event => event);
|
|
7754
|
+
}
|
|
7755
|
+
addEventListener(type, listener, options) {
|
|
7756
|
+
if (!listener) return;
|
|
7757
|
+
const wrappedListener = event => {
|
|
7758
|
+
const transformedEvent = this._eventListenerTransformer(event);
|
|
7759
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
7760
|
+
};
|
|
7761
|
+
this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
|
|
7762
|
+
}
|
|
7763
|
+
removeEventListener(type, listener, options) {
|
|
7764
|
+
var _a;
|
|
7765
|
+
if (!listener) return;
|
|
7766
|
+
const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
|
|
7767
|
+
wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
|
|
7768
|
+
}
|
|
7769
|
+
dispatchEvent(event) {
|
|
7770
|
+
return this._nativeDispatchEvent(event);
|
|
7771
|
+
}
|
|
7772
|
+
clearAllEventListeners() {
|
|
7773
|
+
this._listenerMap.forEach((listenersMap, type) => {
|
|
7774
|
+
listenersMap.forEach((wrappedListener, originalListener) => {
|
|
7775
|
+
this._nativeRemoveEventListener(type, wrappedListener, void 0);
|
|
7776
|
+
});
|
|
7777
|
+
}), this._listenerMap.clear();
|
|
7778
|
+
}
|
|
7779
|
+
_nativeAddEventListener(type, listener, options) {
|
|
7780
|
+
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
7781
|
+
}
|
|
7782
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
7783
|
+
throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
|
|
7784
|
+
}
|
|
7785
|
+
_nativeDispatchEvent(event) {
|
|
7786
|
+
throw new Error("_nativeDispatchEvent must be implemented by derived classes");
|
|
7787
|
+
}
|
|
7788
|
+
}
|
|
7789
|
+
|
|
7731
7790
|
var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
7732
7791
|
var d,
|
|
7733
7792
|
c = arguments.length,
|
|
@@ -7768,7 +7827,7 @@ var __decorate$1v = undefined && undefined.__decorate || function (decorators, t
|
|
|
7768
7827
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7769
7828
|
});
|
|
7770
7829
|
};
|
|
7771
|
-
let DefaultGlobal = class {
|
|
7830
|
+
let DefaultGlobal = class extends EventListenerManager {
|
|
7772
7831
|
get env() {
|
|
7773
7832
|
return this._env;
|
|
7774
7833
|
}
|
|
@@ -7812,10 +7871,19 @@ let DefaultGlobal = class {
|
|
|
7812
7871
|
this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
|
|
7813
7872
|
}
|
|
7814
7873
|
constructor(contributions) {
|
|
7815
|
-
this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
7874
|
+
super(), this.contributions = contributions, this._isImageAnonymous = !0, this._performanceRAFList = [], this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
7816
7875
|
onSetEnv: new SyncHook(["lastEnv", "env", "global"])
|
|
7817
7876
|
}, this.measureTextMethod = "native", this.optimizeVisible = !1;
|
|
7818
7877
|
}
|
|
7878
|
+
_nativeAddEventListener(type, listener, options) {
|
|
7879
|
+
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
7880
|
+
}
|
|
7881
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
7882
|
+
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
7883
|
+
}
|
|
7884
|
+
_nativeDispatchEvent(event) {
|
|
7885
|
+
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
7886
|
+
}
|
|
7819
7887
|
bindContribution(params) {
|
|
7820
7888
|
const promiseArr = [];
|
|
7821
7889
|
if (this.contributions.getContributions().forEach(contribution => {
|
|
@@ -7856,15 +7924,6 @@ let DefaultGlobal = class {
|
|
|
7856
7924
|
releaseCanvas(canvas) {
|
|
7857
7925
|
return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
|
|
7858
7926
|
}
|
|
7859
|
-
addEventListener(type, listener, options) {
|
|
7860
|
-
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
7861
|
-
}
|
|
7862
|
-
removeEventListener(type, listener, options) {
|
|
7863
|
-
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
7864
|
-
}
|
|
7865
|
-
dispatchEvent(event) {
|
|
7866
|
-
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
7867
|
-
}
|
|
7868
7927
|
getRequestAnimationFrame() {
|
|
7869
7928
|
return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
|
|
7870
7929
|
}
|
|
@@ -10914,7 +10973,7 @@ var __decorate$1s = undefined && undefined.__decorate || function (decorators, t
|
|
|
10914
10973
|
};
|
|
10915
10974
|
const VWindow = Symbol.for("VWindow");
|
|
10916
10975
|
const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
|
|
10917
|
-
let DefaultWindow = class {
|
|
10976
|
+
let DefaultWindow = class extends EventListenerManager {
|
|
10918
10977
|
get width() {
|
|
10919
10978
|
if (this._handler) {
|
|
10920
10979
|
const wh = this._handler.getWH();
|
|
@@ -10933,7 +10992,7 @@ let DefaultWindow = class {
|
|
|
10933
10992
|
return this._handler.getDpr();
|
|
10934
10993
|
}
|
|
10935
10994
|
constructor() {
|
|
10936
|
-
this.hooks = {
|
|
10995
|
+
super(), this.hooks = {
|
|
10937
10996
|
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
10938
10997
|
}, this.active = () => {
|
|
10939
10998
|
const global = this.global;
|
|
@@ -10941,6 +11000,15 @@ let DefaultWindow = class {
|
|
|
10941
11000
|
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
10942
11001
|
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
10943
11002
|
}
|
|
11003
|
+
_nativeAddEventListener(type, listener, options) {
|
|
11004
|
+
return this._handler.addEventListener(type, listener, options);
|
|
11005
|
+
}
|
|
11006
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
11007
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
11008
|
+
}
|
|
11009
|
+
_nativeDispatchEvent(event) {
|
|
11010
|
+
return this._handler.dispatchEvent(event);
|
|
11011
|
+
}
|
|
10944
11012
|
postInit() {
|
|
10945
11013
|
this.global.hooks.onSetEnv.tap("window", this.active), this.active();
|
|
10946
11014
|
}
|
|
@@ -10980,7 +11048,7 @@ let DefaultWindow = class {
|
|
|
10980
11048
|
throw new Error("暂不支持");
|
|
10981
11049
|
}
|
|
10982
11050
|
release() {
|
|
10983
|
-
return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
|
|
11051
|
+
return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
|
|
10984
11052
|
}
|
|
10985
11053
|
getContext() {
|
|
10986
11054
|
return this._handler.getContext();
|
|
@@ -10991,15 +11059,6 @@ let DefaultWindow = class {
|
|
|
10991
11059
|
getImageBuffer(type) {
|
|
10992
11060
|
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
10993
11061
|
}
|
|
10994
|
-
addEventListener(type, listener, options) {
|
|
10995
|
-
return this._handler.addEventListener(type, listener, options);
|
|
10996
|
-
}
|
|
10997
|
-
removeEventListener(type, listener, options) {
|
|
10998
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
10999
|
-
}
|
|
11000
|
-
dispatchEvent(event) {
|
|
11001
|
-
return this._handler.dispatchEvent(event);
|
|
11002
|
-
}
|
|
11003
11062
|
getBoundingClientRect() {
|
|
11004
11063
|
return this._handler.getBoundingClientRect();
|
|
11005
11064
|
}
|
|
@@ -12208,19 +12267,17 @@ class EventSystem {
|
|
|
12208
12267
|
globalObj: globalObj,
|
|
12209
12268
|
domElement: domElement
|
|
12210
12269
|
} = this;
|
|
12211
|
-
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.
|
|
12270
|
+
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.addEventListener("pointermove", this.onPointerMove, !0), globalObj.addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.addEventListener("mousemove", this.onPointerMove, !0), globalObj.addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
|
|
12212
12271
|
capture: !0
|
|
12213
12272
|
}), this.eventsAdded = !0;
|
|
12214
12273
|
}
|
|
12215
12274
|
removeEvents() {
|
|
12216
|
-
var _a;
|
|
12217
12275
|
if (!this.eventsAdded || !this.domElement) return;
|
|
12218
12276
|
const {
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
this.supportsPointerEvents ? (globalDocument.removeEventListener("pointermove", this.onPointerMove, !0), globalDocument.removeEventListener("pointerup", this.onPointerUp, !0), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalDocument.removeEventListener("mousemove", this.onPointerMove, !0), globalDocument.removeEventListener("mouseup", this.onPointerUp, !0), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
|
|
12277
|
+
globalObj: globalObj,
|
|
12278
|
+
domElement: domElement
|
|
12279
|
+
} = this;
|
|
12280
|
+
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.removeEventListener("pointermove", this.onPointerMove, !0), globalObj.removeEventListener("pointerup", this.onPointerUp, !0)) : (domElement.removeEventListener("pointermove", this.onPointerMove, !0), domElement.removeEventListener("pointerup", this.onPointerUp, !0)), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.removeEventListener("mousemove", this.onPointerMove, !0), globalObj.removeEventListener("mouseup", this.onPointerUp, !0)) : (domElement.removeEventListener("mousemove", this.onPointerMove, !0), domElement.removeEventListener("mouseup", this.onPointerUp, !0)), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
|
|
12224
12281
|
}
|
|
12225
12282
|
mapToViewportPoint(event) {
|
|
12226
12283
|
return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
|
|
@@ -18787,6 +18844,9 @@ class BaseRender {
|
|
|
18787
18844
|
init(contributions) {
|
|
18788
18845
|
contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke));
|
|
18789
18846
|
}
|
|
18847
|
+
reInit() {
|
|
18848
|
+
this.init(this.graphicRenderContributions);
|
|
18849
|
+
}
|
|
18790
18850
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
18791
18851
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
18792
18852
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -18956,8 +19016,8 @@ var __decorate$1l = undefined && undefined.__decorate || function (decorators, t
|
|
|
18956
19016
|
};
|
|
18957
19017
|
};
|
|
18958
19018
|
let DefaultCanvasArcRender = class extends BaseRender {
|
|
18959
|
-
constructor(
|
|
18960
|
-
super(), this.
|
|
19019
|
+
constructor(graphicRenderContributions) {
|
|
19020
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
|
|
18961
19021
|
}
|
|
18962
19022
|
drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
|
|
18963
19023
|
const capAngle = _ea - _sa,
|
|
@@ -19128,8 +19188,8 @@ var __decorate$1k = undefined && undefined.__decorate || function (decorators, t
|
|
|
19128
19188
|
};
|
|
19129
19189
|
};
|
|
19130
19190
|
let DefaultCanvasCircleRender = class extends BaseRender {
|
|
19131
|
-
constructor(
|
|
19132
|
-
super(), this.
|
|
19191
|
+
constructor(graphicRenderContributions) {
|
|
19192
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
19133
19193
|
}
|
|
19134
19194
|
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
19135
19195
|
const circleAttribute = getTheme$1(circle, null == params ? void 0 : params.theme).circle,
|
|
@@ -19515,8 +19575,8 @@ var __decorate$1i = undefined && undefined.__decorate || function (decorators, t
|
|
|
19515
19575
|
};
|
|
19516
19576
|
};
|
|
19517
19577
|
let DefaultCanvasAreaRender = class extends BaseRender {
|
|
19518
|
-
constructor(
|
|
19519
|
-
super(), this.
|
|
19578
|
+
constructor(graphicRenderContributions) {
|
|
19579
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
19520
19580
|
}
|
|
19521
19581
|
drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
19522
19582
|
var _a, _b, _c;
|
|
@@ -19759,8 +19819,8 @@ var __decorate$1h = undefined && undefined.__decorate || function (decorators, t
|
|
|
19759
19819
|
};
|
|
19760
19820
|
};
|
|
19761
19821
|
let DefaultCanvasPathRender = class extends BaseRender {
|
|
19762
|
-
constructor(
|
|
19763
|
-
super(), this.
|
|
19822
|
+
constructor(graphicRenderContributions) {
|
|
19823
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
|
|
19764
19824
|
}
|
|
19765
19825
|
drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
19766
19826
|
var _a, _b, _c;
|
|
@@ -19815,8 +19875,8 @@ var __decorate$1g = undefined && undefined.__decorate || function (decorators, t
|
|
|
19815
19875
|
};
|
|
19816
19876
|
};
|
|
19817
19877
|
let DefaultCanvasRectRender = class extends BaseRender {
|
|
19818
|
-
constructor(
|
|
19819
|
-
super(), this.
|
|
19878
|
+
constructor(graphicRenderContributions) {
|
|
19879
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
|
|
19820
19880
|
}
|
|
19821
19881
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb, rectAttribute) {
|
|
19822
19882
|
rectAttribute = null != rectAttribute ? rectAttribute : getTheme$1(rect, null == params ? void 0 : params.theme).rect;
|
|
@@ -19885,8 +19945,8 @@ var __decorate$1f = undefined && undefined.__decorate || function (decorators, t
|
|
|
19885
19945
|
};
|
|
19886
19946
|
};
|
|
19887
19947
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
19888
|
-
constructor(
|
|
19889
|
-
super(), this.
|
|
19948
|
+
constructor(graphicRenderContributions) {
|
|
19949
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
19890
19950
|
}
|
|
19891
19951
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb, symbolAttribute) {
|
|
19892
19952
|
var _a;
|
|
@@ -20056,8 +20116,8 @@ var __decorate$1e = undefined && undefined.__decorate || function (decorators, t
|
|
|
20056
20116
|
};
|
|
20057
20117
|
};
|
|
20058
20118
|
let DefaultCanvasTextRender = class extends BaseRender {
|
|
20059
|
-
constructor(
|
|
20060
|
-
super(), this.
|
|
20119
|
+
constructor(graphicRenderContributions) {
|
|
20120
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
20061
20121
|
}
|
|
20062
20122
|
drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20063
20123
|
var _a, _b, _c;
|
|
@@ -20261,8 +20321,8 @@ var __decorate$1d = undefined && undefined.__decorate || function (decorators, t
|
|
|
20261
20321
|
};
|
|
20262
20322
|
};
|
|
20263
20323
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
20264
|
-
constructor(
|
|
20265
|
-
super(), this.
|
|
20324
|
+
constructor(graphicRenderContributions) {
|
|
20325
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
20266
20326
|
}
|
|
20267
20327
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20268
20328
|
const polygonAttribute = getTheme$1(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -20317,6 +20377,9 @@ let DefaultCanvasGroupRender = class {
|
|
|
20317
20377
|
constructor(groupRenderContribitions) {
|
|
20318
20378
|
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
20319
20379
|
}
|
|
20380
|
+
reInit() {
|
|
20381
|
+
this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
|
|
20382
|
+
}
|
|
20320
20383
|
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb, groupAttribute) {
|
|
20321
20384
|
const {
|
|
20322
20385
|
clip: clip,
|
|
@@ -20459,8 +20522,8 @@ var __decorate$1b = undefined && undefined.__decorate || function (decorators, t
|
|
|
20459
20522
|
};
|
|
20460
20523
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
20461
20524
|
let DefaultCanvasImageRender = class extends BaseRender {
|
|
20462
|
-
constructor(
|
|
20463
|
-
super(), this.
|
|
20525
|
+
constructor(graphicRenderContributions) {
|
|
20526
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
20464
20527
|
}
|
|
20465
20528
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
20466
20529
|
const imageAttribute = getTheme$1(image).image,
|
|
@@ -20785,6 +20848,9 @@ let DefaultRenderService = class {
|
|
|
20785
20848
|
afterDraw(params) {
|
|
20786
20849
|
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
|
|
20787
20850
|
}
|
|
20851
|
+
reInit() {
|
|
20852
|
+
this.drawContribution.reInit();
|
|
20853
|
+
}
|
|
20788
20854
|
render(groups, params) {
|
|
20789
20855
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
20790
20856
|
const updateBounds = params.updateBounds;
|
|
@@ -21193,6 +21259,11 @@ let DefaultDrawContribution = class {
|
|
|
21193
21259
|
}, !1, !!(null === (_a = drawContext.context) || void 0 === _a ? void 0 : _a.camera));
|
|
21194
21260
|
}, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray$1(this.contributions) || (this.contributions = [this.contributions]), this.init();
|
|
21195
21261
|
}
|
|
21262
|
+
reInit() {
|
|
21263
|
+
this.init(), this.contributions.forEach(item => {
|
|
21264
|
+
item.reInit();
|
|
21265
|
+
});
|
|
21266
|
+
}
|
|
21196
21267
|
init() {
|
|
21197
21268
|
this.contributions.forEach(item => {
|
|
21198
21269
|
if (item.style) {
|
|
@@ -22328,6 +22399,9 @@ class Stage extends Group$1 {
|
|
|
22328
22399
|
getPickerService() {
|
|
22329
22400
|
return this.pickerService || (this.pickerService = container.get(PickerService)), this.pickerService;
|
|
22330
22401
|
}
|
|
22402
|
+
reInit() {
|
|
22403
|
+
this.renderService.reInit(), this.pickerService.reInit();
|
|
22404
|
+
}
|
|
22331
22405
|
}
|
|
22332
22406
|
|
|
22333
22407
|
var __decorate$11 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -22513,6 +22587,9 @@ let DefaultPickService = class {
|
|
|
22513
22587
|
constructor(pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
22514
22588
|
this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.type = "default", this.global = application.global;
|
|
22515
22589
|
}
|
|
22590
|
+
reInit() {
|
|
22591
|
+
this._init();
|
|
22592
|
+
}
|
|
22516
22593
|
_init() {
|
|
22517
22594
|
this.InterceptorContributions = this.pickItemInterceptorContributions.getContributions().sort((a, b) => a.order - b.order), this.pickerServiceInterceptorContributions = this.pickServiceInterceptorContributions.getContributions().sort((a, b) => a.order - b.order);
|
|
22518
22595
|
}
|
|
@@ -23193,6 +23270,7 @@ let DefaultCanvasGlyphRender = class {
|
|
|
23193
23270
|
constructor() {
|
|
23194
23271
|
this.numberType = GLYPH_NUMBER_TYPE;
|
|
23195
23272
|
}
|
|
23273
|
+
reInit() {}
|
|
23196
23274
|
drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
23197
23275
|
drawContext.drawContribution && glyph.getSubGraphic().forEach(item => {
|
|
23198
23276
|
const renderer = drawContext.drawContribution.getRenderContribution(item);
|
|
@@ -28823,7 +28901,9 @@ const delayMap$3 = {
|
|
|
28823
28901
|
loadScrollbarComponent();
|
|
28824
28902
|
let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
28825
28903
|
constructor(attributes, options) {
|
|
28826
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this.
|
|
28904
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._handleTouchMove = e => {
|
|
28905
|
+
isValid$1(this._prePos) && e.preventDefault();
|
|
28906
|
+
}, this._onRailPointerDown = e => {
|
|
28827
28907
|
const {
|
|
28828
28908
|
viewX: viewX,
|
|
28829
28909
|
viewY: viewY
|
|
@@ -28867,8 +28947,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
28867
28947
|
const triggers = getEndTriggersOfDrag(),
|
|
28868
28948
|
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
28869
28949
|
obj.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
28870
|
-
capture: !0
|
|
28871
|
-
passive: !0
|
|
28950
|
+
capture: !0
|
|
28872
28951
|
}), triggers.forEach(trigger => {
|
|
28873
28952
|
obj.addEventListener(trigger, this._onSliderPointerUp);
|
|
28874
28953
|
});
|
|
@@ -28889,7 +28968,6 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
28889
28968
|
} = this.getSliderRenderBounds();
|
|
28890
28969
|
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = x, delta = currentPos - this._prePos, currentScrollValue = delta / width), [currentPos, currentScrollValue];
|
|
28891
28970
|
}, this._onSliderPointerMove = e => {
|
|
28892
|
-
e.preventDefault();
|
|
28893
28971
|
const {
|
|
28894
28972
|
stopSliderMovePropagation = !0
|
|
28895
28973
|
} = this.attribute;
|
|
@@ -28905,7 +28983,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
28905
28983
|
preScrollRange = this.getScrollRange(),
|
|
28906
28984
|
[currentPos, currentScrollValue] = this._computeScrollValue(e),
|
|
28907
28985
|
range = [preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue];
|
|
28908
|
-
this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
|
|
28986
|
+
this._prePos = null, this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
|
|
28909
28987
|
pre: preRange,
|
|
28910
28988
|
value: clampRange$1(range, limitRange[0], limitRange[1])
|
|
28911
28989
|
}), this._clearDragEvents();
|
|
@@ -28947,7 +29025,9 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
28947
29025
|
delayType = "throttle",
|
|
28948
29026
|
delayTime = 0
|
|
28949
29027
|
} = this.attribute;
|
|
28950
|
-
this._rail && this._rail.addEventListener("pointerdown", delayMap$3[delayType](this._onRailPointerDown, delayTime)), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown)
|
|
29028
|
+
this._rail && this._rail.addEventListener("pointerdown", delayMap$3[delayType](this._onRailPointerDown, delayTime)), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
29029
|
+
passive: !1
|
|
29030
|
+
});
|
|
28951
29031
|
}
|
|
28952
29032
|
render() {
|
|
28953
29033
|
this._reset();
|
|
@@ -29061,8 +29141,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
29061
29141
|
const triggers = getEndTriggersOfDrag(),
|
|
29062
29142
|
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
29063
29143
|
obj.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
29064
|
-
capture: !0
|
|
29065
|
-
passive: !1
|
|
29144
|
+
capture: !0
|
|
29066
29145
|
}), triggers.forEach(trigger => {
|
|
29067
29146
|
obj.removeEventListener(trigger, this._onSliderPointerUp);
|
|
29068
29147
|
});
|
|
@@ -29070,6 +29149,11 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
|
|
|
29070
29149
|
_reset() {
|
|
29071
29150
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
29072
29151
|
}
|
|
29152
|
+
release(all) {
|
|
29153
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
29154
|
+
passive: !1
|
|
29155
|
+
}), this._clearDragEvents();
|
|
29156
|
+
}
|
|
29073
29157
|
};
|
|
29074
29158
|
ScrollBar$1.defaultAttributes = {
|
|
29075
29159
|
direction: "horizontal",
|
|
@@ -33697,6 +33781,9 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
33697
33781
|
isValidNumber$1(lastClipRange * this.clipRange) && (this.clipRange *= lastClipRange);
|
|
33698
33782
|
}
|
|
33699
33783
|
onUpdate(end, ratio, out) {
|
|
33784
|
+
if (end) return Object.keys(this.to).forEach(k => {
|
|
33785
|
+
this.target.attribute[k] = this.to[k];
|
|
33786
|
+
}), this.target.addUpdatePositionTag(), void this.target.addUpdateShapeAndBoundsTag();
|
|
33700
33787
|
if (this.points = this.points.map((point, index) => {
|
|
33701
33788
|
const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
|
|
33702
33789
|
return newPoint.context = point.context, newPoint;
|
|
@@ -41350,7 +41437,6 @@ let DataZoom$1 = class DataZoom extends AbstractComponent {
|
|
|
41350
41437
|
evtTarget.addEventListener(trigger, this._onHandlerPointerUp);
|
|
41351
41438
|
});
|
|
41352
41439
|
}, this._pointerMove = e => {
|
|
41353
|
-
e.preventDefault();
|
|
41354
41440
|
const {
|
|
41355
41441
|
start: startAttr,
|
|
41356
41442
|
end: endAttr,
|
|
@@ -44919,14 +45005,13 @@ class Slider extends AbstractComponent {
|
|
|
44919
45005
|
const triggers = getEndTriggersOfDrag(),
|
|
44920
45006
|
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
44921
45007
|
obj.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
44922
|
-
capture: !0
|
|
44923
|
-
passive: !1
|
|
45008
|
+
capture: !0
|
|
44924
45009
|
}), triggers.forEach(trigger => {
|
|
44925
45010
|
obj.addEventListener(trigger, this._onHandlerPointerUp);
|
|
44926
45011
|
});
|
|
44927
45012
|
}, this._onHandlerPointerMove = e => {
|
|
44928
45013
|
var _a, _b;
|
|
44929
|
-
|
|
45014
|
+
this._isChanging = !0;
|
|
44930
45015
|
const {
|
|
44931
45016
|
railWidth: railWidth,
|
|
44932
45017
|
railHeight: railHeight,
|
|
@@ -44960,13 +45045,12 @@ class Slider extends AbstractComponent {
|
|
|
44960
45045
|
const triggers = getEndTriggersOfDrag(),
|
|
44961
45046
|
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
44962
45047
|
obj.addEventListener("pointermove", this._onTrackPointerMove, {
|
|
44963
|
-
capture: !0
|
|
44964
|
-
passive: !1
|
|
45048
|
+
capture: !0
|
|
44965
45049
|
}), triggers.forEach(trigger => {
|
|
44966
45050
|
obj.addEventListener(trigger, this._onTrackPointerUp);
|
|
44967
45051
|
});
|
|
44968
45052
|
}, this._onTrackPointerMove = e => {
|
|
44969
|
-
|
|
45053
|
+
this._isChanging = !0;
|
|
44970
45054
|
const {
|
|
44971
45055
|
railWidth: railWidth,
|
|
44972
45056
|
railHeight: railHeight,
|
|
@@ -45341,13 +45425,11 @@ class Slider extends AbstractComponent {
|
|
|
45341
45425
|
const triggers = getEndTriggersOfDrag(),
|
|
45342
45426
|
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
45343
45427
|
obj.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
45344
|
-
capture: !0
|
|
45345
|
-
passive: !1
|
|
45428
|
+
capture: !0
|
|
45346
45429
|
}), triggers.forEach(trigger => {
|
|
45347
45430
|
obj.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
45348
45431
|
}), obj.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
45349
|
-
capture: !0
|
|
45350
|
-
passive: !1
|
|
45432
|
+
capture: !0
|
|
45351
45433
|
}), triggers.forEach(trigger => {
|
|
45352
45434
|
obj.removeEventListener(trigger, this._onTrackPointerUp);
|
|
45353
45435
|
});
|
|
@@ -49116,11 +49198,20 @@ function stackMosaic(s, stackCache, mosaicData) {
|
|
|
49116
49198
|
const mosaicStackData = {
|
|
49117
49199
|
key: `${stackCache.groupField}`,
|
|
49118
49200
|
values: groupValues.map(group => {
|
|
49201
|
+
var _a, _b;
|
|
49119
49202
|
const groupValues = stackCache.nodes[group];
|
|
49203
|
+
let value;
|
|
49204
|
+
if (s.bandWidthField) {
|
|
49205
|
+
value =
|
|
49206
|
+
(_b = (_a = groupValues.values.find(v => isValid$1(v[s.bandWidthField]))) === null || _a === void 0 ? void 0 : _a[s.bandWidthField]) !== null && _b !== void 0 ? _b : groupValues.total;
|
|
49207
|
+
}
|
|
49208
|
+
else {
|
|
49209
|
+
value = groupValues.total;
|
|
49210
|
+
}
|
|
49120
49211
|
return {
|
|
49121
49212
|
groupValue: group,
|
|
49122
|
-
value
|
|
49123
|
-
end:
|
|
49213
|
+
value,
|
|
49214
|
+
end: value
|
|
49124
49215
|
};
|
|
49125
49216
|
})
|
|
49126
49217
|
};
|
|
@@ -54568,12 +54659,9 @@ class BaseMark extends GrammarItem {
|
|
|
54568
54659
|
});
|
|
54569
54660
|
return this.runTransforms(transforms, data);
|
|
54570
54661
|
}
|
|
54571
|
-
|
|
54662
|
+
renderInner() {
|
|
54572
54663
|
var _a, _b, _c;
|
|
54573
|
-
|
|
54574
|
-
(this._skipBeforeLayouted && this.getCompiler().getLayoutState() === LayoutState.before)) {
|
|
54575
|
-
return;
|
|
54576
|
-
}
|
|
54664
|
+
this._updateEncoderByState();
|
|
54577
54665
|
const data = (_b = (_a = this._data) === null || _a === void 0 ? void 0 : _a.getProduct()) !== null && _b !== void 0 ? _b : [{}];
|
|
54578
54666
|
const transformData = this._runBeforeTransform(data);
|
|
54579
54667
|
let markData;
|
|
@@ -54607,10 +54695,12 @@ class BaseMark extends GrammarItem {
|
|
|
54607
54695
|
this._updateAttrsOfGroup();
|
|
54608
54696
|
}
|
|
54609
54697
|
render() {
|
|
54610
|
-
if (this.
|
|
54611
|
-
this.
|
|
54612
|
-
|
|
54613
|
-
|
|
54698
|
+
if (this.isCommited()) {
|
|
54699
|
+
if (this.getVisible() &&
|
|
54700
|
+
(!this._skipBeforeLayouted || this.getCompiler().getLayoutState() !== LayoutState.before)) {
|
|
54701
|
+
log(`render mark: ${this.getProductId()}, type is ${this.type}`);
|
|
54702
|
+
this.renderInner();
|
|
54703
|
+
}
|
|
54614
54704
|
this.uncommit();
|
|
54615
54705
|
}
|
|
54616
54706
|
}
|
|
@@ -54896,9 +54986,6 @@ class GroupMark extends BaseMark {
|
|
|
54896
54986
|
const style = (_a = this._simpleStyle) !== null && _a !== void 0 ? _a : this.getAttributesOfState({});
|
|
54897
54987
|
this._product.context = Object.assign(Object.assign({}, this._product.context), this._getCommonContext());
|
|
54898
54988
|
this._product.setAttributes(this._getAttrsFromConfig(style));
|
|
54899
|
-
if (this.getCompiler().getLayoutState() !== LayoutState.before) {
|
|
54900
|
-
this._runStateAnimation(this.getGraphics());
|
|
54901
|
-
}
|
|
54902
54989
|
}
|
|
54903
54990
|
render() {
|
|
54904
54991
|
if (this._isCommited) {
|
|
@@ -55921,7 +56008,7 @@ class VChart {
|
|
|
55921
56008
|
this._updateCurrentTheme();
|
|
55922
56009
|
this._currentSize = this.getCurrentSize();
|
|
55923
56010
|
const pluginList = [];
|
|
55924
|
-
if (
|
|
56011
|
+
if (poptip !== false) {
|
|
55925
56012
|
pluginList.push('poptipForText');
|
|
55926
56013
|
}
|
|
55927
56014
|
if (spec.type === "sankey") {
|
|
@@ -57126,7 +57213,7 @@ const lookup = (data, opt) => {
|
|
|
57126
57213
|
});
|
|
57127
57214
|
};
|
|
57128
57215
|
|
|
57129
|
-
const version = "2.0.0-alpha.
|
|
57216
|
+
const version = "2.0.0-alpha.3";
|
|
57130
57217
|
|
|
57131
57218
|
const addVChartProperty = (data, op) => {
|
|
57132
57219
|
const context = op.beforeCall();
|
|
@@ -61397,14 +61484,6 @@ class ComponentMark extends BaseMark {
|
|
|
61397
61484
|
model: this.model
|
|
61398
61485
|
});
|
|
61399
61486
|
}
|
|
61400
|
-
render() {
|
|
61401
|
-
if (!this._isCommited) {
|
|
61402
|
-
return;
|
|
61403
|
-
}
|
|
61404
|
-
log(`render mark: ${this.getProductId()}, type is ${this.type}`);
|
|
61405
|
-
this.renderInner();
|
|
61406
|
-
this.uncommit();
|
|
61407
|
-
}
|
|
61408
61487
|
release() {
|
|
61409
61488
|
super.release();
|
|
61410
61489
|
this.removeProduct();
|
|
@@ -68456,6 +68535,11 @@ class BarSeries extends CartesianSeries {
|
|
|
68456
68535
|
this.compile();
|
|
68457
68536
|
}
|
|
68458
68537
|
}
|
|
68538
|
+
onDataUpdate() {
|
|
68539
|
+
super.onDataUpdate();
|
|
68540
|
+
const region = this.getRegion();
|
|
68541
|
+
region._bar_series_position_calculated = false;
|
|
68542
|
+
}
|
|
68459
68543
|
compile() {
|
|
68460
68544
|
super.compile();
|
|
68461
68545
|
if (this._spec.sampling) {
|
|
@@ -86588,11 +86672,14 @@ class MosaicSeries extends BarSeries {
|
|
|
86588
86672
|
this.type = SeriesTypeEnum.mosaic;
|
|
86589
86673
|
this.transformerConstructor = BarSeriesSpecTransformer;
|
|
86590
86674
|
}
|
|
86675
|
+
get bandWidthField() {
|
|
86676
|
+
return this._bandWidthField;
|
|
86677
|
+
}
|
|
86591
86678
|
getStack() {
|
|
86592
86679
|
return true;
|
|
86593
86680
|
}
|
|
86594
86681
|
getPercent() {
|
|
86595
|
-
return
|
|
86682
|
+
return this._spec.percent;
|
|
86596
86683
|
}
|
|
86597
86684
|
getGroupFields() {
|
|
86598
86685
|
return this.direction === 'vertical' ? this._specXField : this._specYField;
|
|
@@ -86616,6 +86703,9 @@ class MosaicSeries extends BarSeries {
|
|
|
86616
86703
|
this.setFieldX(MOSAIC_CAT_END_PERCENT);
|
|
86617
86704
|
this.setFieldX2(MOSAIC_CAT_START_PERCENT);
|
|
86618
86705
|
}
|
|
86706
|
+
if (this._spec.bandWidthField) {
|
|
86707
|
+
this._bandWidthField = this._spec.bandWidthField;
|
|
86708
|
+
}
|
|
86619
86709
|
}
|
|
86620
86710
|
parseLabelStyle(labelStyle, labelSpec) {
|
|
86621
86711
|
if ((labelSpec === null || labelSpec === void 0 ? void 0 : labelSpec.filterByGroup) && isNil$1(labelStyle.dataFilter)) {
|
|
@@ -90206,18 +90296,17 @@ class Tooltip extends BaseComponent {
|
|
|
90206
90296
|
if (!this._needInitEventOfTooltip) {
|
|
90207
90297
|
return;
|
|
90208
90298
|
}
|
|
90209
|
-
const container = (_b = (_a = this.tooltipHandler).
|
|
90210
|
-
|
|
90211
|
-
|
|
90212
|
-
element.addEventListener('pointerenter', () => {
|
|
90299
|
+
const container = (_b = (_a = this.tooltipHandler).getRootDom) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
90300
|
+
if (container) {
|
|
90301
|
+
container.addEventListener('pointerenter', () => {
|
|
90213
90302
|
var _a;
|
|
90214
90303
|
if (!this._enterable) {
|
|
90215
90304
|
return;
|
|
90216
90305
|
}
|
|
90217
90306
|
this._isEnterTooltip = true;
|
|
90218
|
-
const rect = (_a =
|
|
90307
|
+
const rect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
|
|
90219
90308
|
if (rect) {
|
|
90220
|
-
this._cacheEnterableRect = {
|
|
90309
|
+
this._cacheEnterableRect = { width: rect.width, height: rect.height };
|
|
90221
90310
|
}
|
|
90222
90311
|
if (this._outTimer) {
|
|
90223
90312
|
clearTimeout(this._outTimer);
|
|
@@ -90228,14 +90317,14 @@ class Tooltip extends BaseComponent {
|
|
|
90228
90317
|
this._showTimer = null;
|
|
90229
90318
|
}
|
|
90230
90319
|
});
|
|
90231
|
-
|
|
90320
|
+
container.addEventListener('pointerleave', () => {
|
|
90232
90321
|
var _a, _b, _c;
|
|
90233
90322
|
if (!this._enterable) {
|
|
90234
90323
|
return;
|
|
90235
90324
|
}
|
|
90236
90325
|
this._isEnterTooltip = false;
|
|
90237
90326
|
if (this._cacheEnterableRect) {
|
|
90238
|
-
const newRect = (_a =
|
|
90327
|
+
const newRect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
|
|
90239
90328
|
if (newRect &&
|
|
90240
90329
|
Object.keys(this._cacheEnterableRect).every(k => this._cacheEnterableRect[k] === newRect[k])) {
|
|
90241
90330
|
this._cacheEnterableRect = null;
|
|
@@ -91568,6 +91657,7 @@ const dataFilterComputeDomain = (data, op) => {
|
|
|
91568
91657
|
const { stateField, valueField } = op.output;
|
|
91569
91658
|
const resultObj = {};
|
|
91570
91659
|
const resultData = [];
|
|
91660
|
+
const stateValues = [];
|
|
91571
91661
|
dataCollection.forEach((dv, i) => {
|
|
91572
91662
|
var _a;
|
|
91573
91663
|
if (isNil$1(stateFields[i])) {
|
|
@@ -91576,13 +91666,17 @@ const dataFilterComputeDomain = (data, op) => {
|
|
|
91576
91666
|
const stateFieldInfo = (_a = dv.getFields()) === null || _a === void 0 ? void 0 : _a[stateFields[i]];
|
|
91577
91667
|
if (stateFieldInfo && stateFieldInfo.lockStatisticsByDomain) {
|
|
91578
91668
|
stateFieldInfo.domain.forEach((d) => {
|
|
91579
|
-
resultObj[d]
|
|
91669
|
+
if (isNil$1(resultObj[d])) {
|
|
91670
|
+
stateValues.push(d);
|
|
91671
|
+
resultObj[d] = 0;
|
|
91672
|
+
}
|
|
91580
91673
|
});
|
|
91581
91674
|
}
|
|
91582
91675
|
dv.latestData.forEach((d) => {
|
|
91583
91676
|
array(stateFields[i]).forEach(state => {
|
|
91584
91677
|
if (!isNil$1(d[state])) {
|
|
91585
91678
|
if (isNil$1(resultObj[d[state]])) {
|
|
91679
|
+
stateValues.push(d[state]);
|
|
91586
91680
|
resultObj[d[state]] = 0;
|
|
91587
91681
|
}
|
|
91588
91682
|
if (!isNil$1(valueFields[i])) {
|
|
@@ -91592,10 +91686,10 @@ const dataFilterComputeDomain = (data, op) => {
|
|
|
91592
91686
|
});
|
|
91593
91687
|
});
|
|
91594
91688
|
});
|
|
91595
|
-
|
|
91596
|
-
const res = { [stateField]:
|
|
91689
|
+
stateValues.forEach(state => {
|
|
91690
|
+
const res = { [stateField]: state };
|
|
91597
91691
|
if (valueField) {
|
|
91598
|
-
res[valueField] = resultObj[
|
|
91692
|
+
res[valueField] = resultObj[state];
|
|
91599
91693
|
}
|
|
91600
91694
|
resultData.push(res);
|
|
91601
91695
|
});
|
|
@@ -95586,7 +95680,7 @@ class Player extends BaseComponent {
|
|
|
95586
95680
|
});
|
|
95587
95681
|
}
|
|
95588
95682
|
}
|
|
95589
|
-
Player.
|
|
95683
|
+
Player.builtInTheme = {
|
|
95590
95684
|
player
|
|
95591
95685
|
};
|
|
95592
95686
|
Player.specKey = 'player';
|
|
@@ -98270,6 +98364,9 @@ class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
98270
98364
|
this._rootDom.style.visibility = _value ? 'visible' : 'hidden';
|
|
98271
98365
|
}
|
|
98272
98366
|
}
|
|
98367
|
+
getRootDom() {
|
|
98368
|
+
return this._rootDom;
|
|
98369
|
+
}
|
|
98273
98370
|
constructor() {
|
|
98274
98371
|
super(DomTooltipHandler.type);
|
|
98275
98372
|
this.type = TooltipHandlerType.dom;
|
|
@@ -99609,7 +99706,8 @@ class MosaicChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
99609
99706
|
'barBackground',
|
|
99610
99707
|
'barMinHeight',
|
|
99611
99708
|
'stackCornerRadius',
|
|
99612
|
-
'bar'
|
|
99709
|
+
'bar',
|
|
99710
|
+
'bandWidthField'
|
|
99613
99711
|
]);
|
|
99614
99712
|
}
|
|
99615
99713
|
transformSpec(spec) {
|