@visactor/vrender-components 0.22.10-alpha.1 → 0.22.11-alpha.1
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/index.es.js +116 -43
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "0.22.
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.22.11-alpha.1", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
|
|
22
22
|
__exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
|
|
23
23
|
__exportStar(require("./crosshair"), exports), __exportStar(require("./label"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.11-alpha.1\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -489,11 +489,14 @@ class Container {
|
|
|
489
489
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
490
490
|
class ContributionProviderCache {
|
|
491
491
|
constructor(serviceIdentifier, container) {
|
|
492
|
-
this.serviceIdentifier = serviceIdentifier, this.container = container;
|
|
492
|
+
this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
|
|
493
493
|
}
|
|
494
494
|
getContributions() {
|
|
495
495
|
return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
|
|
496
496
|
}
|
|
497
|
+
refresh() {
|
|
498
|
+
this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
|
|
499
|
+
}
|
|
497
500
|
}
|
|
498
501
|
function bindContributionProvider(bind, id) {
|
|
499
502
|
bind(ContributionProvider).toDynamicValue(_ref => {
|
|
@@ -511,6 +514,20 @@ function bindContributionProviderNoSingletonScope(bind, id) {
|
|
|
511
514
|
return new ContributionProviderCache(id, container);
|
|
512
515
|
}).whenTargetNamed(id);
|
|
513
516
|
}
|
|
517
|
+
class ContributionStore {
|
|
518
|
+
static getStore(id) {
|
|
519
|
+
return this.store.get(id);
|
|
520
|
+
}
|
|
521
|
+
static setStore(id, cache) {
|
|
522
|
+
this.store.set(id, cache);
|
|
523
|
+
}
|
|
524
|
+
static refreshAllContributions() {
|
|
525
|
+
this.store.forEach(cache => {
|
|
526
|
+
cache.refresh();
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
ContributionStore.store = new Map();
|
|
514
531
|
|
|
515
532
|
class Hook {
|
|
516
533
|
constructor(args, name) {
|
|
@@ -577,6 +594,48 @@ const EnvContribution = Symbol.for("EnvContribution");
|
|
|
577
594
|
const VGlobal = Symbol.for("VGlobal");
|
|
578
595
|
const DEFAULT_TEXT_FONT_FAMILY$1 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
579
596
|
|
|
597
|
+
class EventListenerManager {
|
|
598
|
+
constructor() {
|
|
599
|
+
this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
|
|
600
|
+
}
|
|
601
|
+
setEventListenerTransformer(transformer) {
|
|
602
|
+
this._eventListenerTransformer = transformer || (event => event);
|
|
603
|
+
}
|
|
604
|
+
addEventListener(type, listener, options) {
|
|
605
|
+
if (!listener) return;
|
|
606
|
+
const wrappedListener = event => {
|
|
607
|
+
const transformedEvent = this._eventListenerTransformer(event);
|
|
608
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
609
|
+
};
|
|
610
|
+
this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
|
|
611
|
+
}
|
|
612
|
+
removeEventListener(type, listener, options) {
|
|
613
|
+
var _a;
|
|
614
|
+
if (!listener) return;
|
|
615
|
+
const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
|
|
616
|
+
wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
|
|
617
|
+
}
|
|
618
|
+
dispatchEvent(event) {
|
|
619
|
+
return this._nativeDispatchEvent(event);
|
|
620
|
+
}
|
|
621
|
+
clearAllEventListeners() {
|
|
622
|
+
this._listenerMap.forEach((listenersMap, type) => {
|
|
623
|
+
listenersMap.forEach((wrappedListener, originalListener) => {
|
|
624
|
+
this._nativeRemoveEventListener(type, wrappedListener, void 0);
|
|
625
|
+
});
|
|
626
|
+
}), this._listenerMap.clear();
|
|
627
|
+
}
|
|
628
|
+
_nativeAddEventListener(type, listener, options) {
|
|
629
|
+
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
630
|
+
}
|
|
631
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
632
|
+
throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
|
|
633
|
+
}
|
|
634
|
+
_nativeDispatchEvent(event) {
|
|
635
|
+
throw new Error("_nativeDispatchEvent must be implemented by derived classes");
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
580
639
|
var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
581
640
|
var d,
|
|
582
641
|
c = arguments.length,
|
|
@@ -617,7 +676,7 @@ var __decorate$P = undefined && undefined.__decorate || function (decorators, ta
|
|
|
617
676
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
618
677
|
});
|
|
619
678
|
};
|
|
620
|
-
let DefaultGlobal = class {
|
|
679
|
+
let DefaultGlobal = class extends EventListenerManager {
|
|
621
680
|
get env() {
|
|
622
681
|
return this._env;
|
|
623
682
|
}
|
|
@@ -661,10 +720,19 @@ let DefaultGlobal = class {
|
|
|
661
720
|
this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
|
|
662
721
|
}
|
|
663
722
|
constructor(contributions) {
|
|
664
|
-
this.contributions = contributions, this._isImageAnonymous = !0, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
723
|
+
super(), this.contributions = contributions, this._isImageAnonymous = !0, this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
665
724
|
onSetEnv: new SyncHook(["lastEnv", "env", "global"])
|
|
666
725
|
}, this.measureTextMethod = "native", this.optimizeVisible = !1;
|
|
667
726
|
}
|
|
727
|
+
_nativeAddEventListener(type, listener, options) {
|
|
728
|
+
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
729
|
+
}
|
|
730
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
731
|
+
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
732
|
+
}
|
|
733
|
+
_nativeDispatchEvent(event) {
|
|
734
|
+
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
735
|
+
}
|
|
668
736
|
bindContribution(params) {
|
|
669
737
|
const promiseArr = [];
|
|
670
738
|
if (this.contributions.getContributions().forEach(contribution => {
|
|
@@ -705,15 +773,6 @@ let DefaultGlobal = class {
|
|
|
705
773
|
releaseCanvas(canvas) {
|
|
706
774
|
return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
|
|
707
775
|
}
|
|
708
|
-
addEventListener(type, listener, options) {
|
|
709
|
-
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
710
|
-
}
|
|
711
|
-
removeEventListener(type, listener, options) {
|
|
712
|
-
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
713
|
-
}
|
|
714
|
-
dispatchEvent(event) {
|
|
715
|
-
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
716
|
-
}
|
|
717
776
|
getRequestAnimationFrame() {
|
|
718
777
|
return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
|
|
719
778
|
}
|
|
@@ -3392,7 +3451,7 @@ var __decorate$M = undefined && undefined.__decorate || function (decorators, ta
|
|
|
3392
3451
|
};
|
|
3393
3452
|
const VWindow = Symbol.for("VWindow");
|
|
3394
3453
|
const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
|
|
3395
|
-
let DefaultWindow = class {
|
|
3454
|
+
let DefaultWindow = class extends EventListenerManager {
|
|
3396
3455
|
get width() {
|
|
3397
3456
|
if (this._handler) {
|
|
3398
3457
|
const wh = this._handler.getWH();
|
|
@@ -3411,7 +3470,7 @@ let DefaultWindow = class {
|
|
|
3411
3470
|
return this._handler.getDpr();
|
|
3412
3471
|
}
|
|
3413
3472
|
constructor() {
|
|
3414
|
-
this.hooks = {
|
|
3473
|
+
super(), this.hooks = {
|
|
3415
3474
|
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
3416
3475
|
}, this.active = () => {
|
|
3417
3476
|
const global = this.global;
|
|
@@ -3419,6 +3478,15 @@ let DefaultWindow = class {
|
|
|
3419
3478
|
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
3420
3479
|
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
3421
3480
|
}
|
|
3481
|
+
_nativeAddEventListener(type, listener, options) {
|
|
3482
|
+
return this._handler.addEventListener(type, listener, options);
|
|
3483
|
+
}
|
|
3484
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
3485
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
3486
|
+
}
|
|
3487
|
+
_nativeDispatchEvent(event) {
|
|
3488
|
+
return this._handler.dispatchEvent(event);
|
|
3489
|
+
}
|
|
3422
3490
|
postInit() {
|
|
3423
3491
|
this.global.hooks.onSetEnv.tap("window", this.active), this.active();
|
|
3424
3492
|
}
|
|
@@ -3458,7 +3526,7 @@ let DefaultWindow = class {
|
|
|
3458
3526
|
throw new Error("暂不支持");
|
|
3459
3527
|
}
|
|
3460
3528
|
release() {
|
|
3461
|
-
return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
|
|
3529
|
+
return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
|
|
3462
3530
|
}
|
|
3463
3531
|
getContext() {
|
|
3464
3532
|
return this._handler.getContext();
|
|
@@ -3469,15 +3537,6 @@ let DefaultWindow = class {
|
|
|
3469
3537
|
getImageBuffer(type) {
|
|
3470
3538
|
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
3471
3539
|
}
|
|
3472
|
-
addEventListener(type, listener, options) {
|
|
3473
|
-
return this._handler.addEventListener(type, listener, options);
|
|
3474
|
-
}
|
|
3475
|
-
removeEventListener(type, listener, options) {
|
|
3476
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
3477
|
-
}
|
|
3478
|
-
dispatchEvent(event) {
|
|
3479
|
-
return this._handler.dispatchEvent(event);
|
|
3480
|
-
}
|
|
3481
3540
|
getBoundingClientRect() {
|
|
3482
3541
|
return this._handler.getBoundingClientRect();
|
|
3483
3542
|
}
|
|
@@ -10852,6 +10911,9 @@ class BaseRender {
|
|
|
10852
10911
|
init(contributions) {
|
|
10853
10912
|
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));
|
|
10854
10913
|
}
|
|
10914
|
+
reInit() {
|
|
10915
|
+
this.init(this.graphicRenderContributions);
|
|
10916
|
+
}
|
|
10855
10917
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
10856
10918
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
10857
10919
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -11021,8 +11083,8 @@ var __decorate$G = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11021
11083
|
};
|
|
11022
11084
|
};
|
|
11023
11085
|
let DefaultCanvasArcRender = class extends BaseRender {
|
|
11024
|
-
constructor(
|
|
11025
|
-
super(), this.
|
|
11086
|
+
constructor(graphicRenderContributions) {
|
|
11087
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11026
11088
|
}
|
|
11027
11089
|
drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
|
|
11028
11090
|
const capAngle = _ea - _sa,
|
|
@@ -11198,8 +11260,8 @@ var __decorate$F = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11198
11260
|
};
|
|
11199
11261
|
};
|
|
11200
11262
|
let DefaultCanvasCircleRender = class extends BaseRender {
|
|
11201
|
-
constructor(
|
|
11202
|
-
super(), this.
|
|
11263
|
+
constructor(graphicRenderContributions) {
|
|
11264
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11203
11265
|
}
|
|
11204
11266
|
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11205
11267
|
const circleAttribute = getTheme(circle, null == params ? void 0 : params.theme).circle,
|
|
@@ -11585,8 +11647,8 @@ var __decorate$D = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11585
11647
|
};
|
|
11586
11648
|
};
|
|
11587
11649
|
let DefaultCanvasAreaRender = class extends BaseRender {
|
|
11588
|
-
constructor(
|
|
11589
|
-
super(), this.
|
|
11650
|
+
constructor(graphicRenderContributions) {
|
|
11651
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
11590
11652
|
}
|
|
11591
11653
|
drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
11592
11654
|
var _a, _b, _c;
|
|
@@ -11829,8 +11891,8 @@ var __decorate$C = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11829
11891
|
};
|
|
11830
11892
|
};
|
|
11831
11893
|
let DefaultCanvasPathRender = class extends BaseRender {
|
|
11832
|
-
constructor(
|
|
11833
|
-
super(), this.
|
|
11894
|
+
constructor(graphicRenderContributions) {
|
|
11895
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11834
11896
|
}
|
|
11835
11897
|
drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11836
11898
|
var _a, _b, _c;
|
|
@@ -11885,8 +11947,8 @@ var __decorate$B = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11885
11947
|
};
|
|
11886
11948
|
};
|
|
11887
11949
|
let DefaultCanvasRectRender = class extends BaseRender {
|
|
11888
|
-
constructor(
|
|
11889
|
-
super(), this.
|
|
11950
|
+
constructor(graphicRenderContributions) {
|
|
11951
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11890
11952
|
}
|
|
11891
11953
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11892
11954
|
var _a;
|
|
@@ -11957,8 +12019,8 @@ var __decorate$A = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11957
12019
|
};
|
|
11958
12020
|
};
|
|
11959
12021
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
11960
|
-
constructor(
|
|
11961
|
-
super(), this.
|
|
12022
|
+
constructor(graphicRenderContributions) {
|
|
12023
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
11962
12024
|
}
|
|
11963
12025
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11964
12026
|
var _a;
|
|
@@ -12129,8 +12191,8 @@ var __decorate$z = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12129
12191
|
};
|
|
12130
12192
|
};
|
|
12131
12193
|
let DefaultCanvasTextRender = class extends BaseRender {
|
|
12132
|
-
constructor(
|
|
12133
|
-
super(), this.
|
|
12194
|
+
constructor(graphicRenderContributions) {
|
|
12195
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
12134
12196
|
}
|
|
12135
12197
|
drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12136
12198
|
var _a, _b, _c;
|
|
@@ -12334,8 +12396,8 @@ var __decorate$y = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12334
12396
|
};
|
|
12335
12397
|
};
|
|
12336
12398
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
12337
|
-
constructor(
|
|
12338
|
-
super(), this.
|
|
12399
|
+
constructor(graphicRenderContributions) {
|
|
12400
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
12339
12401
|
}
|
|
12340
12402
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12341
12403
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -12390,6 +12452,9 @@ let DefaultCanvasGroupRender = class {
|
|
|
12390
12452
|
constructor(groupRenderContribitions) {
|
|
12391
12453
|
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
12392
12454
|
}
|
|
12455
|
+
reInit() {
|
|
12456
|
+
this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
|
|
12457
|
+
}
|
|
12393
12458
|
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12394
12459
|
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
12395
12460
|
{
|
|
@@ -12520,8 +12585,8 @@ var __decorate$w = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12520
12585
|
};
|
|
12521
12586
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
12522
12587
|
let DefaultCanvasImageRender = class extends BaseRender {
|
|
12523
|
-
constructor(
|
|
12524
|
-
super(), this.
|
|
12588
|
+
constructor(graphicRenderContributions) {
|
|
12589
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
12525
12590
|
}
|
|
12526
12591
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12527
12592
|
const imageAttribute = getTheme(image).image,
|
|
@@ -12844,6 +12909,9 @@ let DefaultRenderService = class {
|
|
|
12844
12909
|
afterDraw(params) {
|
|
12845
12910
|
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
|
|
12846
12911
|
}
|
|
12912
|
+
reInit() {
|
|
12913
|
+
this.drawContribution.reInit();
|
|
12914
|
+
}
|
|
12847
12915
|
render(groups, params) {
|
|
12848
12916
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
12849
12917
|
const updateBounds = params.updateBounds;
|
|
@@ -13245,6 +13313,11 @@ let DefaultDrawContribution = class {
|
|
|
13245
13313
|
constructor(contributions, drawItemInterceptorContributions) {
|
|
13246
13314
|
this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, 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(this.contributions) || (this.contributions = [this.contributions]), this.init();
|
|
13247
13315
|
}
|
|
13316
|
+
reInit() {
|
|
13317
|
+
this.init(), this.contributions.forEach(item => {
|
|
13318
|
+
item.reInit();
|
|
13319
|
+
});
|
|
13320
|
+
}
|
|
13248
13321
|
init() {
|
|
13249
13322
|
this.contributions.forEach(item => {
|
|
13250
13323
|
if (item.style) {
|
|
@@ -31642,6 +31715,6 @@ StoryLabelItem.defaultAttributes = {
|
|
|
31642
31715
|
theme: 'default'
|
|
31643
31716
|
};
|
|
31644
31717
|
|
|
31645
|
-
const version = "0.22.
|
|
31718
|
+
const version = "0.22.11-alpha.1";
|
|
31646
31719
|
|
|
31647
31720
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.11-alpha.1\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-components",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.11-alpha.1",
|
|
4
4
|
"description": "components library for dp visualization",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@visactor/vutils": "~0.19.5",
|
|
16
16
|
"@visactor/vscale": "~0.19.5",
|
|
17
|
-
"@visactor/vrender-core": "0.22.
|
|
18
|
-
"@visactor/vrender-kits": "0.22.
|
|
17
|
+
"@visactor/vrender-core": "0.22.11-alpha.1",
|
|
18
|
+
"@visactor/vrender-kits": "0.22.11-alpha.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@rushstack/eslint-patch": "~1.1.4",
|