@visactor/vrender-components 0.22.8-alpha.0 → 0.22.9-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/axis/util.js +2 -1
- package/cjs/brush/brush.js +1 -2
- 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/axis/util.js +2 -1
- package/es/brush/brush.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/axis/util.js
CHANGED
|
@@ -104,4 +104,5 @@ exports.getAxisBreakSymbolAttrs = getAxisBreakSymbolAttrs, exports.getElMap = ge
|
|
|
104
104
|
exports.getVerticalCoord = getVerticalCoord, exports.getCircleVerticalVector = getCircleVerticalVector,
|
|
105
105
|
exports.angleLabelOrientAttribute = angleLabelOrientAttribute, exports.getPolarAngleLabelPosition = getPolarAngleLabelPosition,
|
|
106
106
|
exports.getCirclePoints = getCirclePoints, exports.getPolygonPath = getPolygonPath,
|
|
107
|
-
exports.textIntersect = textIntersect, exports.hasOverlap = hasOverlap;
|
|
107
|
+
exports.textIntersect = textIntersect, exports.hasOverlap = hasOverlap;
|
|
108
|
+
//# sourceMappingURL=util.js.map
|
package/cjs/brush/brush.js
CHANGED
|
@@ -190,5 +190,4 @@ class Brush extends base_1.AbstractComponent {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
exports.Brush = Brush, Brush.defaultAttributes = config_1.DEFAULT_BRUSH_ATTRIBUTES;
|
|
194
|
-
//# sourceMappingURL=brush.js.map
|
|
193
|
+
exports.Brush = Brush, Brush.defaultAttributes = config_1.DEFAULT_BRUSH_ATTRIBUTES;
|
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.9-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,gBAAgB,CAAC;AAExC,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,gBAAgB,CAAC;AAExC,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.9-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
|
}
|
|
@@ -3375,7 +3434,7 @@ var __decorate$M = undefined && undefined.__decorate || function (decorators, ta
|
|
|
3375
3434
|
};
|
|
3376
3435
|
const VWindow = Symbol.for("VWindow");
|
|
3377
3436
|
const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
|
|
3378
|
-
let DefaultWindow = class {
|
|
3437
|
+
let DefaultWindow = class extends EventListenerManager {
|
|
3379
3438
|
get width() {
|
|
3380
3439
|
if (this._handler) {
|
|
3381
3440
|
const wh = this._handler.getWH();
|
|
@@ -3394,7 +3453,7 @@ let DefaultWindow = class {
|
|
|
3394
3453
|
return this._handler.getDpr();
|
|
3395
3454
|
}
|
|
3396
3455
|
constructor() {
|
|
3397
|
-
this.hooks = {
|
|
3456
|
+
super(), this.hooks = {
|
|
3398
3457
|
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
3399
3458
|
}, this.active = () => {
|
|
3400
3459
|
const global = this.global;
|
|
@@ -3402,6 +3461,15 @@ let DefaultWindow = class {
|
|
|
3402
3461
|
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
3403
3462
|
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
3404
3463
|
}
|
|
3464
|
+
_nativeAddEventListener(type, listener, options) {
|
|
3465
|
+
return this._handler.addEventListener(type, listener, options);
|
|
3466
|
+
}
|
|
3467
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
3468
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
3469
|
+
}
|
|
3470
|
+
_nativeDispatchEvent(event) {
|
|
3471
|
+
return this._handler.dispatchEvent(event);
|
|
3472
|
+
}
|
|
3405
3473
|
postInit() {
|
|
3406
3474
|
this.global.hooks.onSetEnv.tap("window", this.active), this.active();
|
|
3407
3475
|
}
|
|
@@ -3441,7 +3509,7 @@ let DefaultWindow = class {
|
|
|
3441
3509
|
throw new Error("暂不支持");
|
|
3442
3510
|
}
|
|
3443
3511
|
release() {
|
|
3444
|
-
return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
|
|
3512
|
+
return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
|
|
3445
3513
|
}
|
|
3446
3514
|
getContext() {
|
|
3447
3515
|
return this._handler.getContext();
|
|
@@ -3452,15 +3520,6 @@ let DefaultWindow = class {
|
|
|
3452
3520
|
getImageBuffer(type) {
|
|
3453
3521
|
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
3454
3522
|
}
|
|
3455
|
-
addEventListener(type, listener, options) {
|
|
3456
|
-
return this._handler.addEventListener(type, listener, options);
|
|
3457
|
-
}
|
|
3458
|
-
removeEventListener(type, listener, options) {
|
|
3459
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
3460
|
-
}
|
|
3461
|
-
dispatchEvent(event) {
|
|
3462
|
-
return this._handler.dispatchEvent(event);
|
|
3463
|
-
}
|
|
3464
3523
|
getBoundingClientRect() {
|
|
3465
3524
|
return this._handler.getBoundingClientRect();
|
|
3466
3525
|
}
|
|
@@ -10848,6 +10907,9 @@ class BaseRender {
|
|
|
10848
10907
|
init(contributions) {
|
|
10849
10908
|
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));
|
|
10850
10909
|
}
|
|
10910
|
+
reInit() {
|
|
10911
|
+
this.init(this.graphicRenderContributions);
|
|
10912
|
+
}
|
|
10851
10913
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
10852
10914
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
10853
10915
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -11017,8 +11079,8 @@ var __decorate$G = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11017
11079
|
};
|
|
11018
11080
|
};
|
|
11019
11081
|
let DefaultCanvasArcRender = class extends BaseRender {
|
|
11020
|
-
constructor(
|
|
11021
|
-
super(), this.
|
|
11082
|
+
constructor(graphicRenderContributions) {
|
|
11083
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11022
11084
|
}
|
|
11023
11085
|
drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
|
|
11024
11086
|
const capAngle = _ea - _sa,
|
|
@@ -11194,8 +11256,8 @@ var __decorate$F = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11194
11256
|
};
|
|
11195
11257
|
};
|
|
11196
11258
|
let DefaultCanvasCircleRender = class extends BaseRender {
|
|
11197
|
-
constructor(
|
|
11198
|
-
super(), this.
|
|
11259
|
+
constructor(graphicRenderContributions) {
|
|
11260
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11199
11261
|
}
|
|
11200
11262
|
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11201
11263
|
const circleAttribute = getTheme(circle, null == params ? void 0 : params.theme).circle,
|
|
@@ -11581,8 +11643,8 @@ var __decorate$D = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11581
11643
|
};
|
|
11582
11644
|
};
|
|
11583
11645
|
let DefaultCanvasAreaRender = class extends BaseRender {
|
|
11584
|
-
constructor(
|
|
11585
|
-
super(), this.
|
|
11646
|
+
constructor(graphicRenderContributions) {
|
|
11647
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
11586
11648
|
}
|
|
11587
11649
|
drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
11588
11650
|
var _a, _b, _c;
|
|
@@ -11825,8 +11887,8 @@ var __decorate$C = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11825
11887
|
};
|
|
11826
11888
|
};
|
|
11827
11889
|
let DefaultCanvasPathRender = class extends BaseRender {
|
|
11828
|
-
constructor(
|
|
11829
|
-
super(), this.
|
|
11890
|
+
constructor(graphicRenderContributions) {
|
|
11891
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11830
11892
|
}
|
|
11831
11893
|
drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11832
11894
|
var _a, _b, _c;
|
|
@@ -11881,8 +11943,8 @@ var __decorate$B = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11881
11943
|
};
|
|
11882
11944
|
};
|
|
11883
11945
|
let DefaultCanvasRectRender = class extends BaseRender {
|
|
11884
|
-
constructor(
|
|
11885
|
-
super(), this.
|
|
11946
|
+
constructor(graphicRenderContributions) {
|
|
11947
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11886
11948
|
}
|
|
11887
11949
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11888
11950
|
var _a;
|
|
@@ -11953,8 +12015,8 @@ var __decorate$A = undefined && undefined.__decorate || function (decorators, ta
|
|
|
11953
12015
|
};
|
|
11954
12016
|
};
|
|
11955
12017
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
11956
|
-
constructor(
|
|
11957
|
-
super(), this.
|
|
12018
|
+
constructor(graphicRenderContributions) {
|
|
12019
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
11958
12020
|
}
|
|
11959
12021
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11960
12022
|
var _a;
|
|
@@ -12125,8 +12187,8 @@ var __decorate$z = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12125
12187
|
};
|
|
12126
12188
|
};
|
|
12127
12189
|
let DefaultCanvasTextRender = class extends BaseRender {
|
|
12128
|
-
constructor(
|
|
12129
|
-
super(), this.
|
|
12190
|
+
constructor(graphicRenderContributions) {
|
|
12191
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
12130
12192
|
}
|
|
12131
12193
|
drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12132
12194
|
var _a, _b, _c;
|
|
@@ -12330,8 +12392,8 @@ var __decorate$y = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12330
12392
|
};
|
|
12331
12393
|
};
|
|
12332
12394
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
12333
|
-
constructor(
|
|
12334
|
-
super(), this.
|
|
12395
|
+
constructor(graphicRenderContributions) {
|
|
12396
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
12335
12397
|
}
|
|
12336
12398
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12337
12399
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -12386,6 +12448,9 @@ let DefaultCanvasGroupRender = class {
|
|
|
12386
12448
|
constructor(groupRenderContribitions) {
|
|
12387
12449
|
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
12388
12450
|
}
|
|
12451
|
+
reInit() {
|
|
12452
|
+
this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
|
|
12453
|
+
}
|
|
12389
12454
|
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12390
12455
|
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
12391
12456
|
{
|
|
@@ -12516,8 +12581,8 @@ var __decorate$w = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12516
12581
|
};
|
|
12517
12582
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
12518
12583
|
let DefaultCanvasImageRender = class extends BaseRender {
|
|
12519
|
-
constructor(
|
|
12520
|
-
super(), this.
|
|
12584
|
+
constructor(graphicRenderContributions) {
|
|
12585
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
12521
12586
|
}
|
|
12522
12587
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
12523
12588
|
const imageAttribute = getTheme(image).image,
|
|
@@ -12840,6 +12905,9 @@ let DefaultRenderService = class {
|
|
|
12840
12905
|
afterDraw(params) {
|
|
12841
12906
|
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
|
|
12842
12907
|
}
|
|
12908
|
+
reInit() {
|
|
12909
|
+
this.drawContribution.reInit();
|
|
12910
|
+
}
|
|
12843
12911
|
render(groups, params) {
|
|
12844
12912
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
12845
12913
|
const updateBounds = params.updateBounds;
|
|
@@ -13241,6 +13309,11 @@ let DefaultDrawContribution = class {
|
|
|
13241
13309
|
constructor(contributions, drawItemInterceptorContributions) {
|
|
13242
13310
|
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();
|
|
13243
13311
|
}
|
|
13312
|
+
reInit() {
|
|
13313
|
+
this.init(), this.contributions.forEach(item => {
|
|
13314
|
+
item.reInit();
|
|
13315
|
+
});
|
|
13316
|
+
}
|
|
13244
13317
|
init() {
|
|
13245
13318
|
this.contributions.forEach(item => {
|
|
13246
13319
|
if (item.style) {
|
|
@@ -31619,6 +31692,6 @@ StoryLabelItem.defaultAttributes = {
|
|
|
31619
31692
|
theme: 'default'
|
|
31620
31693
|
};
|
|
31621
31694
|
|
|
31622
|
-
const version = "0.22.
|
|
31695
|
+
const version = "0.22.9-alpha.1";
|
|
31623
31696
|
|
|
31624
31697
|
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/axis/util.js
CHANGED
package/es/brush/brush.js
CHANGED
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,gBAAgB,CAAC;AAExC,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,gBAAgB,CAAC;AAExC,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.9-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.9-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.9-alpha.1",
|
|
18
|
+
"@visactor/vrender-kits": "0.22.9-alpha.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@rushstack/eslint-patch": "~1.1.4",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"vite": "3.2.6",
|
|
30
30
|
"typescript": "4.9.5",
|
|
31
31
|
"cross-env": "^7.0.3",
|
|
32
|
-
"@internal/eslint-config": "0.0.1",
|
|
33
32
|
"@internal/bundler": "0.0.1",
|
|
34
|
-
"@internal/ts-config": "0.0.1"
|
|
33
|
+
"@internal/ts-config": "0.0.1",
|
|
34
|
+
"@internal/eslint-config": "0.0.1"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|
|
37
37
|
"VisActor",
|