@visactor/vrender-components 1.1.4-alpha.1 → 1.1.4-alpha.2
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/cjs/legend/discrete/discrete.d.ts +1 -0
- package/cjs/legend/discrete/discrete.js +54 -27
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/cjs/legend/discrete/type.d.ts +1 -0
- package/cjs/legend/discrete/type.js.map +1 -1
- package/dist/index.es.js +156 -55
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/legend/discrete/discrete.d.ts +1 -0
- package/es/legend/discrete/discrete.js +51 -25
- package/es/legend/discrete/discrete.js.map +1 -1
- package/es/legend/discrete/type.d.ts +1 -0
- package/es/legend/discrete/type.js.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -208,7 +208,7 @@ class Node extends EventEmitter {
|
|
|
208
208
|
constructor() {
|
|
209
209
|
super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
|
|
210
210
|
}
|
|
211
|
-
onParentSharedStateTreeChanged(_stage, _layer) {}
|
|
211
|
+
onParentSharedStateTreeChanged(_stage, _layer, _inheritedSharedStateScope) {}
|
|
212
212
|
forEachChildren(cb, reverse = !1) {
|
|
213
213
|
if (reverse) {
|
|
214
214
|
let child = this._lastChild,
|
|
@@ -4449,6 +4449,8 @@ class StateEngine {
|
|
|
4449
4449
|
this.graphic === graphic && this.baseAttributes === baseAttributes || this.invalidateResolverCache(), this.graphic = graphic, this.baseAttributes = baseAttributes;
|
|
4450
4450
|
}
|
|
4451
4451
|
applyStates(stateNames) {
|
|
4452
|
+
const singleStaticStateResult = this.tryApplySingleStaticState(stateNames);
|
|
4453
|
+
if (singleStaticStateResult) return singleStaticStateResult;
|
|
4452
4454
|
const uniqueStates = Array.from(new Set(stateNames)),
|
|
4453
4455
|
sortedStates = this.sortStates(uniqueStates),
|
|
4454
4456
|
adjudicated = this.adjudicate(sortedStates),
|
|
@@ -4463,6 +4465,19 @@ class StateEngine {
|
|
|
4463
4465
|
suppressed: [...this._suppressed]
|
|
4464
4466
|
};
|
|
4465
4467
|
}
|
|
4468
|
+
tryApplySingleStaticState(stateNames) {
|
|
4469
|
+
if (1 !== stateNames.length || "shallow" !== this.mergeMode) return;
|
|
4470
|
+
const stateName = stateNames[0],
|
|
4471
|
+
definition = this.compiledDefinitions.get(stateName);
|
|
4472
|
+
if (definition && (definition.hasResolver || definition.exclude.size || definition.suppress.size)) return;
|
|
4473
|
+
const changed = 1 !== this._activeStates.length || this._activeStates[0] !== stateName || 1 !== this._effectiveStates.length || this._effectiveStates[0] !== stateName || 0 !== this._suppressed.length;
|
|
4474
|
+
return this._activeStates = [stateName], this._effectiveStates = [stateName], this._suppressed = [], !changed && this.resolverCacheValid || (this.resolverPatchCache.clear(), this.resolverCacheKey = stateName, this.resolverCacheValid = !0, this._resolvedPatch = (null == definition ? void 0 : definition.patch) ? cloneValue(definition.patch) : {}), {
|
|
4475
|
+
changed: changed,
|
|
4476
|
+
activeStates: [...this._activeStates],
|
|
4477
|
+
effectiveStates: [...this._effectiveStates],
|
|
4478
|
+
suppressed: []
|
|
4479
|
+
};
|
|
4480
|
+
}
|
|
4466
4481
|
addState(stateName, keepCurrentStates) {
|
|
4467
4482
|
if (this._activeStates.includes(stateName) && (keepCurrentStates || 1 === this._activeStates.length)) return {
|
|
4468
4483
|
changed: !1,
|
|
@@ -4875,14 +4890,17 @@ class GraphicImpl extends Node {
|
|
|
4875
4890
|
}
|
|
4876
4891
|
return null === (_a = this.stage) || void 0 === _a ? void 0 : _a.rootSharedStateScope;
|
|
4877
4892
|
}
|
|
4878
|
-
|
|
4893
|
+
syncSharedStateScopeBinding(nextScope, markDirty = !0) {
|
|
4879
4894
|
var _a;
|
|
4880
|
-
const nextScope = this.resolveBoundSharedStateScope();
|
|
4881
4895
|
return this.boundSharedStateScope === nextScope ? (this.syncSharedStateActiveRegistrations(), !1) : (this.boundSharedStateScope = nextScope, this.boundSharedStateRevision = void 0, this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0, this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.syncSharedStateActiveRegistrations(), markDirty && (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.markSharedStateDirty(), !0);
|
|
4882
4896
|
}
|
|
4883
|
-
|
|
4897
|
+
syncSharedStateScopeBindingFromTree(markDirty = !0, inheritedSharedStateScope) {
|
|
4898
|
+
const nextScope = void 0 === inheritedSharedStateScope ? this.resolveBoundSharedStateScope() : null != inheritedSharedStateScope ? inheritedSharedStateScope : void 0;
|
|
4899
|
+
return this.syncSharedStateScopeBinding(nextScope, markDirty);
|
|
4900
|
+
}
|
|
4901
|
+
syncSharedStateScopeBindingOnTreeChange(markDirty = !0, inheritedSharedStateScope) {
|
|
4884
4902
|
var _a, _b;
|
|
4885
|
-
return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty);
|
|
4903
|
+
return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty, inheritedSharedStateScope);
|
|
4886
4904
|
}
|
|
4887
4905
|
syncSharedStateActiveRegistrations() {
|
|
4888
4906
|
var _a;
|
|
@@ -4890,6 +4908,7 @@ class GraphicImpl extends Node {
|
|
|
4890
4908
|
if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.boundSharedStateScope) return (null == previousScopes ? void 0 : previousScopes.size) && (previousScopes.forEach(scope => {
|
|
4891
4909
|
scope.subtreeActiveDescendants.delete(this);
|
|
4892
4910
|
}), previousScopes.clear()), void (this.registeredActiveScopes = void 0);
|
|
4911
|
+
if ((null == previousScopes ? void 0 : previousScopes.size) && this.isSharedStateScopeChainRegistered(previousScopes)) return;
|
|
4893
4912
|
const nextScopes = new Set(collectSharedStateScopeChain(this.boundSharedStateScope));
|
|
4894
4913
|
null == previousScopes || previousScopes.forEach(scope => {
|
|
4895
4914
|
nextScopes.has(scope) || scope.subtreeActiveDescendants.delete(this);
|
|
@@ -4897,6 +4916,15 @@ class GraphicImpl extends Node {
|
|
|
4897
4916
|
scope.subtreeActiveDescendants.add(this);
|
|
4898
4917
|
}), this.registeredActiveScopes = nextScopes;
|
|
4899
4918
|
}
|
|
4919
|
+
isSharedStateScopeChainRegistered(previousScopes) {
|
|
4920
|
+
let scope = this.boundSharedStateScope,
|
|
4921
|
+
scopeCount = 0;
|
|
4922
|
+
for (; scope;) {
|
|
4923
|
+
if (!previousScopes.has(scope)) return !1;
|
|
4924
|
+
scopeCount += 1, scope = scope.parentScope;
|
|
4925
|
+
}
|
|
4926
|
+
return scopeCount === previousScopes.size;
|
|
4927
|
+
}
|
|
4900
4928
|
clearSharedStateActiveRegistrations() {
|
|
4901
4929
|
const previousScopes = this.registeredActiveScopes;
|
|
4902
4930
|
previousScopes && (previousScopes.forEach(scope => {
|
|
@@ -4906,8 +4934,8 @@ class GraphicImpl extends Node {
|
|
|
4906
4934
|
markSharedStateDirty() {
|
|
4907
4935
|
this.sharedStateDirty = !0, enqueueGraphicSharedStateRefresh(this.stage, this), scheduleStageSharedStateRefresh(this.stage);
|
|
4908
4936
|
}
|
|
4909
|
-
onParentSharedStateTreeChanged(stage, layer) {
|
|
4910
|
-
this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange() : this.setStage(stage, layer);
|
|
4937
|
+
onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
|
|
4938
|
+
this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope) : this.setStage(stage, layer, inheritedSharedStateScope);
|
|
4911
4939
|
}
|
|
4912
4940
|
refreshSharedStateBeforeRender() {
|
|
4913
4941
|
var _a;
|
|
@@ -5558,6 +5586,10 @@ class GraphicImpl extends Node {
|
|
|
5558
5586
|
var _a;
|
|
5559
5587
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
5560
5588
|
}
|
|
5589
|
+
setStateDefinitionsWithCompiled(definitions, compiledDefinitions) {
|
|
5590
|
+
var _a;
|
|
5591
|
+
this.states = definitions, this.localStateDefinitionsSource !== definitions && (this.localStateDefinitionsSource = definitions, this.localStateDefinitionsVersion = (null !== (_a = this.localStateDefinitionsVersion) && void 0 !== _a ? _a : 0) + 1), this.compiledStateDefinitions = compiledDefinitions, this.compiledStateDefinitionsCacheKey = `local:${this.localStateDefinitionsVersion}`;
|
|
5592
|
+
}
|
|
5561
5593
|
getStateResolveBaseAttrs() {
|
|
5562
5594
|
var _a;
|
|
5563
5595
|
return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
|
|
@@ -5751,8 +5783,10 @@ class GraphicImpl extends Node {
|
|
|
5751
5783
|
transition.changed && this.useStates(transition.states, hasAnimation);
|
|
5752
5784
|
}
|
|
5753
5785
|
addState(stateName, keepCurrentStates, hasAnimation) {
|
|
5754
|
-
const
|
|
5755
|
-
|
|
5786
|
+
const currentStates = this.currentStates;
|
|
5787
|
+
if ((null == currentStates ? void 0 : currentStates.includes(stateName)) && (keepCurrentStates || 1 === currentStates.length)) return;
|
|
5788
|
+
const nextStates = keepCurrentStates && (null == currentStates ? void 0 : currentStates.length) ? currentStates.concat([stateName]) : [stateName];
|
|
5789
|
+
this.useStates(nextStates, hasAnimation);
|
|
5756
5790
|
}
|
|
5757
5791
|
setStates(states, options) {
|
|
5758
5792
|
var _a, _b, _c;
|
|
@@ -5905,12 +5939,12 @@ class GraphicImpl extends Node {
|
|
|
5905
5939
|
this._globalTransMatrix.translate(scrollX, scrollY);
|
|
5906
5940
|
}
|
|
5907
5941
|
}
|
|
5908
|
-
setStage(stage, layer) {
|
|
5942
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
5909
5943
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
5910
5944
|
const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
|
|
5911
5945
|
previousStage = this.stage;
|
|
5912
5946
|
if (this.stage !== stage || this.layer !== layer) {
|
|
5913
|
-
if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
|
|
5947
|
+
if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
|
|
5914
5948
|
const previousTimeline = null === (_f = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _f ? void 0 : _f.call(previousStage),
|
|
5915
5949
|
nextTimeline = null === (_g = null == stage ? void 0 : stage.getTimeline) || void 0 === _g ? void 0 : _g.call(stage),
|
|
5916
5950
|
detachedStageAnimates = [];
|
|
@@ -5927,7 +5961,7 @@ class GraphicImpl extends Node {
|
|
|
5927
5961
|
}
|
|
5928
5962
|
return this._onSetStage && this._onSetStage(this, stage, layer), void (null === (_h = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _h || _h.call(graphicService, this, stage));
|
|
5929
5963
|
}
|
|
5930
|
-
((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0);
|
|
5964
|
+
((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope);
|
|
5931
5965
|
}
|
|
5932
5966
|
detachStageForRelease() {
|
|
5933
5967
|
var _a, _b, _c;
|
|
@@ -6316,17 +6350,17 @@ class Group extends Graphic {
|
|
|
6316
6350
|
}
|
|
6317
6351
|
incrementalAppendChild(node) {
|
|
6318
6352
|
const data = super.appendChild(node);
|
|
6319
|
-
return data && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
6353
|
+
return data && this.shouldSyncChildSharedStateTreeBinding(data) && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
6320
6354
|
}
|
|
6321
6355
|
incrementalClearChild() {
|
|
6322
6356
|
super.removeAllChild(), this.addUpdateBoundTag(), this.getGraphicService().onClearIncremental(this, this.stage);
|
|
6323
6357
|
}
|
|
6324
6358
|
_updateChildToStage(child) {
|
|
6325
|
-
return child && this.syncChildSharedStateTreeBinding(child), this.addUpdateBoundTag(), child;
|
|
6359
|
+
return child && this.shouldSyncChildSharedStateTreeBinding(child) && this.syncChildSharedStateTreeBinding(child), this.addUpdateBoundTag(), child;
|
|
6326
6360
|
}
|
|
6327
6361
|
appendChild(node, addStage = !0) {
|
|
6328
6362
|
const data = super.appendChild(node);
|
|
6329
|
-
return data && addStage && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), data;
|
|
6363
|
+
return data && addStage && this.shouldSyncChildSharedStateTreeBinding(data) && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), data;
|
|
6330
6364
|
}
|
|
6331
6365
|
insertBefore(newNode, referenceNode) {
|
|
6332
6366
|
return this._updateChildToStage(super.insertBefore(newNode, referenceNode));
|
|
@@ -6349,13 +6383,13 @@ class Group extends Graphic {
|
|
|
6349
6383
|
child.setStage(null, null);
|
|
6350
6384
|
}), this.addUpdateBoundTag();
|
|
6351
6385
|
}
|
|
6352
|
-
setStage(stage, layer) {
|
|
6386
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
6353
6387
|
var _a, _b, _c, _d, _e, _f;
|
|
6354
6388
|
const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
|
|
6355
6389
|
needsSharedStateTreeSync = this.hasSharedStateDefinitions() || this.sharedStateScope || (null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty;
|
|
6356
|
-
if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged();
|
|
6390
|
+
if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
|
|
6357
6391
|
const layerChanged = this.layer !== layer;
|
|
6358
|
-
layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0), this.notifyChildrenSharedStateTreeChanged()) : layerChanged && this.notifyChildrenSharedStateTreeChanged();
|
|
6392
|
+
layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : layerChanged && this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
|
|
6359
6393
|
}
|
|
6360
6394
|
addUpdatePositionTag() {
|
|
6361
6395
|
super.addUpdatePositionTag(), this.forEachChildren(g => {
|
|
@@ -6414,17 +6448,29 @@ class Group extends Graphic {
|
|
|
6414
6448
|
hasSharedStateDefinitions() {
|
|
6415
6449
|
return !!this._sharedStateDefinitions && Object.keys(this._sharedStateDefinitions).length > 0;
|
|
6416
6450
|
}
|
|
6417
|
-
|
|
6451
|
+
resolveChildSharedStateScope(inheritedSharedStateScope) {
|
|
6452
|
+
var _a;
|
|
6453
|
+
return this.sharedStateScope ? this.sharedStateScope : void 0 !== inheritedSharedStateScope ? inheritedSharedStateScope : null !== (_a = this.resolveBoundSharedStateScope()) && void 0 !== _a ? _a : null;
|
|
6454
|
+
}
|
|
6455
|
+
notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope) {
|
|
6456
|
+
const childSharedStateScope = this.resolveChildSharedStateScope(inheritedSharedStateScope);
|
|
6418
6457
|
this.forEachChildren(item => {
|
|
6419
|
-
this.
|
|
6458
|
+
this.setStageToChild(item, childSharedStateScope);
|
|
6420
6459
|
});
|
|
6421
6460
|
}
|
|
6422
|
-
|
|
6423
|
-
|
|
6461
|
+
shouldSyncChildSharedStateTreeBinding(child) {
|
|
6462
|
+
return !(!this.stage && !this.layer) || child.onParentSharedStateTreeChanged !== Graphic.prototype.onParentSharedStateTreeChanged && child.onParentSharedStateTreeChanged !== Group.prototype.onParentSharedStateTreeChanged;
|
|
6463
|
+
}
|
|
6464
|
+
setStageToChild(child, inheritedSharedStateScope) {
|
|
6465
|
+
const graphic = child;
|
|
6466
|
+
"function" != typeof graphic.setStage || child.onParentSharedStateTreeChanged !== Graphic.prototype.onParentSharedStateTreeChanged && child.onParentSharedStateTreeChanged !== Group.prototype.onParentSharedStateTreeChanged || graphic.stage === this.stage && graphic.layer === this.layer ? child.onParentSharedStateTreeChanged(this.stage, this.layer, inheritedSharedStateScope) : graphic.setStage(this.stage, this.layer, inheritedSharedStateScope);
|
|
6424
6467
|
}
|
|
6425
|
-
|
|
6468
|
+
syncChildSharedStateTreeBinding(child, inheritedSharedStateScope) {
|
|
6469
|
+
void 0 === inheritedSharedStateScope && (inheritedSharedStateScope = this.resolveChildSharedStateScope()), this.setStageToChild(child, inheritedSharedStateScope);
|
|
6470
|
+
}
|
|
6471
|
+
onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
|
|
6426
6472
|
var _a;
|
|
6427
|
-
this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)), this.notifyChildrenSharedStateTreeChanged()) : this.setStage(stage, layer);
|
|
6473
|
+
this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length), inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : this.setStage(stage, layer, inheritedSharedStateScope);
|
|
6428
6474
|
}
|
|
6429
6475
|
}
|
|
6430
6476
|
Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
|
|
@@ -8087,13 +8133,14 @@ function applyFillStyle(ctx, character, b) {
|
|
|
8087
8133
|
}) : fillStyle, setTextStyle(ctx, character);
|
|
8088
8134
|
}
|
|
8089
8135
|
function applyStrokeStyle(ctx, character) {
|
|
8136
|
+
var _a, _b;
|
|
8090
8137
|
const strokeStyle = character && character.stroke || defaultFormatting.stroke;
|
|
8091
8138
|
if (!strokeStyle) return void (ctx.globalAlpha = 0);
|
|
8092
8139
|
const {
|
|
8093
8140
|
strokeOpacity = 1,
|
|
8094
8141
|
opacity = 1
|
|
8095
8142
|
} = character;
|
|
8096
|
-
ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.strokeStyle = strokeStyle, setTextStyle(ctx, character);
|
|
8143
|
+
ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.setLineDash(null !== (_a = character.lineDash) && void 0 !== _a ? _a : []), ctx.lineDashOffset = null !== (_b = character.lineDashOffset) && void 0 !== _b ? _b : 0, ctx.strokeStyle = strokeStyle, setTextStyle(ctx, character);
|
|
8097
8144
|
}
|
|
8098
8145
|
function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter) {
|
|
8099
8146
|
if (desc.length <= 1) return 0;
|
|
@@ -9026,8 +9073,8 @@ class RichText extends Graphic {
|
|
|
9026
9073
|
clone() {
|
|
9027
9074
|
return new RichText(Object.assign({}, this.attribute));
|
|
9028
9075
|
}
|
|
9029
|
-
setStage(stage, layer) {
|
|
9030
|
-
super.setStage(stage, layer);
|
|
9076
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
9077
|
+
super.setStage(stage, layer, inheritedSharedStateScope);
|
|
9031
9078
|
this.getFrameCache().icons.forEach(icon => {
|
|
9032
9079
|
icon.setStage(stage, layer);
|
|
9033
9080
|
});
|
|
@@ -30003,6 +30050,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
30003
30050
|
this._itemHeight = 0;
|
|
30004
30051
|
this._itemMaxWidth = 0;
|
|
30005
30052
|
this._contentMaxHeight = 0;
|
|
30053
|
+
this._stateDefinitionsCache = new WeakMap();
|
|
30006
30054
|
this._onHover = (e) => {
|
|
30007
30055
|
const target = e.target;
|
|
30008
30056
|
if (target && target.name && target.name.startsWith(LEGEND_ELEMENT_NAME.item)) {
|
|
@@ -30089,6 +30137,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
30089
30137
|
};
|
|
30090
30138
|
}
|
|
30091
30139
|
render() {
|
|
30140
|
+
this._stateDefinitionsCache = new WeakMap();
|
|
30092
30141
|
super.render();
|
|
30093
30142
|
this._lastActiveItem = null;
|
|
30094
30143
|
}
|
|
@@ -30367,7 +30416,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
30367
30416
|
}
|
|
30368
30417
|
else {
|
|
30369
30418
|
itemGroup = graphicCreator.group(Object.assign({ x: 0, y: 0 }, backgroundStyle.style));
|
|
30370
|
-
this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup, backgroundStyle.state);
|
|
30419
|
+
this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup, backgroundStyle.state, backgroundStyle.reuseStateDefinitions);
|
|
30371
30420
|
}
|
|
30372
30421
|
itemGroup.id = `${id !== null && id !== void 0 ? id : label}-${index}`;
|
|
30373
30422
|
itemGroup.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
|
|
@@ -30390,17 +30439,23 @@ class DiscreteLegend extends LegendBase {
|
|
|
30390
30439
|
}
|
|
30391
30440
|
shapeSpace = get(shapeAttr, 'space', DEFAULT_SHAPE_SPACE);
|
|
30392
30441
|
const itemShape = graphicCreator.symbol(Object.assign(Object.assign({ x: 0, y: 0, symbolType: 'circle', strokeBoundsBuffer: 0 }, shape), shapeStyle.style));
|
|
30393
|
-
Object.keys(shapeStyle.state || {}).
|
|
30394
|
-
const
|
|
30395
|
-
|
|
30396
|
-
|
|
30397
|
-
|
|
30442
|
+
const shapeStateNeedsItemColor = Object.keys(shapeStyle.state || {}).some(key => {
|
|
30443
|
+
const state = shapeStyle.state[key];
|
|
30444
|
+
const color = state.fill || state.stroke;
|
|
30445
|
+
return !!color && ((!!shape.fill && isNil(state.fill)) || (!!shape.stroke && isNil(state.stroke)));
|
|
30446
|
+
});
|
|
30447
|
+
const shapeStates = shapeStateNeedsItemColor ? merge({}, shapeStyle.state) : shapeStyle.state;
|
|
30448
|
+
Object.keys(shapeStates || {}).forEach(key => {
|
|
30449
|
+
const state = shapeStates[key];
|
|
30450
|
+
const color = state.fill || state.stroke;
|
|
30451
|
+
if (shape.fill && isNil(state.fill) && color) {
|
|
30452
|
+
state.fill = color;
|
|
30398
30453
|
}
|
|
30399
|
-
if (shape.stroke && isNil(
|
|
30400
|
-
|
|
30454
|
+
if (shape.stroke && isNil(state.stroke) && color) {
|
|
30455
|
+
state.stroke = color;
|
|
30401
30456
|
}
|
|
30402
30457
|
});
|
|
30403
|
-
this._appendDataToShape(itemShape, LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeStyle.
|
|
30458
|
+
this._appendDataToShape(itemShape, LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeStates, !shapeStateNeedsItemColor && shapeStyle.reuseStateDefinitions !== false);
|
|
30404
30459
|
itemShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
|
|
30405
30460
|
innerGroup.add(itemShape);
|
|
30406
30461
|
}
|
|
@@ -30415,7 +30470,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
30415
30470
|
const text = labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label;
|
|
30416
30471
|
const labelAttributes = Object.assign(Object.assign({ x: shapeSize / 2 + shapeSpace, y: 0, textAlign: 'start', textBaseline: 'middle', lineHeight: (_b = labelStyle.style) === null || _b === void 0 ? void 0 : _b.fontSize }, labelStyle.style), { text, _originText: labelAttr.formatMethod ? label : undefined });
|
|
30417
30472
|
const labelShape = createTextGraphicByType(labelAttributes);
|
|
30418
|
-
this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state);
|
|
30473
|
+
this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state, labelStyle.reuseStateDefinitions);
|
|
30419
30474
|
labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
|
|
30420
30475
|
innerGroup.add(labelShape);
|
|
30421
30476
|
const labelSpace = get(labelAttr, 'space', DEFAULT_LABEL_SPACE);
|
|
@@ -30424,7 +30479,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
30424
30479
|
const valueText = valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value;
|
|
30425
30480
|
const valueAttributes = Object.assign(Object.assign({ x: 0, y: 0, textAlign: 'start', textBaseline: 'middle', lineHeight: valueStyle.style.fontSize }, valueStyle.style), { text: valueText, _originText: valueAttr.formatMethod ? value : undefined });
|
|
30426
30481
|
const valueShape = createTextGraphicByType(valueAttributes);
|
|
30427
|
-
this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state);
|
|
30482
|
+
this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state, valueStyle.reuseStateDefinitions);
|
|
30428
30483
|
valueShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
|
|
30429
30484
|
if (this._itemWidthByUser) {
|
|
30430
30485
|
const layoutWidth = this._itemWidthByUser -
|
|
@@ -30522,9 +30577,12 @@ class DiscreteLegend extends LegendBase {
|
|
|
30522
30577
|
: new ScrollBar(Object.assign(Object.assign({ direction: 'vertical', width: compStyle.visible === false ? 0 : 12, range: [0, 0.5] }, compStyle), { height: compSize, disableTriggerEvent }));
|
|
30523
30578
|
}
|
|
30524
30579
|
_updatePositionOfPager(renderStartY, compWidth, compHeight) {
|
|
30580
|
+
var _a;
|
|
30525
30581
|
const { pager } = this.attribute;
|
|
30526
30582
|
const { totalPage, isHorizontal } = this._itemContext;
|
|
30527
30583
|
const position = (pager && pager.position) || 'middle';
|
|
30584
|
+
const hugContent = !!(pager && pager.hugContent);
|
|
30585
|
+
const pagerSpace = (_a = (pager && pager.space)) !== null && _a !== void 0 ? _a : DEFAULT_PAGER_SPACE;
|
|
30528
30586
|
this._pagerComponent.setTotal(totalPage);
|
|
30529
30587
|
if (isHorizontal) {
|
|
30530
30588
|
let y;
|
|
@@ -30537,8 +30595,12 @@ class DiscreteLegend extends LegendBase {
|
|
|
30537
30595
|
else {
|
|
30538
30596
|
y = renderStartY + compHeight / 2 - this._pagerComponent.AABBBounds.height() / 2;
|
|
30539
30597
|
}
|
|
30598
|
+
let x = compWidth - this._pagerComponent.AABBBounds.width();
|
|
30599
|
+
if (hugContent) {
|
|
30600
|
+
x = Math.max(0, Math.min(this._itemsContainer.AABBBounds.width() + pagerSpace, x));
|
|
30601
|
+
}
|
|
30540
30602
|
this._pagerComponent.setAttributes({
|
|
30541
|
-
x
|
|
30603
|
+
x,
|
|
30542
30604
|
y
|
|
30543
30605
|
});
|
|
30544
30606
|
}
|
|
@@ -30553,9 +30615,13 @@ class DiscreteLegend extends LegendBase {
|
|
|
30553
30615
|
else {
|
|
30554
30616
|
x = (compWidth - this._pagerComponent.AABBBounds.width()) / 2;
|
|
30555
30617
|
}
|
|
30618
|
+
let y = compHeight - this._pagerComponent.AABBBounds.height();
|
|
30619
|
+
if (hugContent) {
|
|
30620
|
+
y = Math.max(0, Math.min(renderStartY + this._itemsContainer.AABBBounds.height() + pagerSpace, y));
|
|
30621
|
+
}
|
|
30556
30622
|
this._pagerComponent.setAttributes({
|
|
30557
30623
|
x,
|
|
30558
|
-
y
|
|
30624
|
+
y
|
|
30559
30625
|
});
|
|
30560
30626
|
}
|
|
30561
30627
|
}
|
|
@@ -30771,11 +30837,22 @@ class DiscreteLegend extends LegendBase {
|
|
|
30771
30837
|
itemsContainer.setAttribute('x', -(defaultCurrent - 1) * (compWidth + spaceCol));
|
|
30772
30838
|
}
|
|
30773
30839
|
}
|
|
30840
|
+
const hugContent = !!pager.hugContent;
|
|
30841
|
+
let clipWidth = isHorizontal ? contentWidth : compWidth;
|
|
30842
|
+
let clipHeight = isHorizontal ? compHeight : contentHeight;
|
|
30843
|
+
if (hugContent) {
|
|
30844
|
+
if (isHorizontal) {
|
|
30845
|
+
clipWidth = Math.max(0, Math.min(clipWidth, itemsContainer.AABBBounds.width()));
|
|
30846
|
+
}
|
|
30847
|
+
else {
|
|
30848
|
+
clipHeight = Math.max(0, Math.min(clipHeight, itemsContainer.AABBBounds.height()));
|
|
30849
|
+
}
|
|
30850
|
+
}
|
|
30774
30851
|
const clipGroup = graphicCreator.group({
|
|
30775
30852
|
x: 0,
|
|
30776
30853
|
y: renderStartY,
|
|
30777
|
-
width:
|
|
30778
|
-
height:
|
|
30854
|
+
width: clipWidth,
|
|
30855
|
+
height: clipHeight,
|
|
30779
30856
|
clip: true,
|
|
30780
30857
|
pickable: false
|
|
30781
30858
|
});
|
|
@@ -31054,11 +31131,29 @@ class DiscreteLegend extends LegendBase {
|
|
|
31054
31131
|
});
|
|
31055
31132
|
return selectedData;
|
|
31056
31133
|
}
|
|
31057
|
-
_appendDataToShape(shape, name, data, delegateShape, states =
|
|
31134
|
+
_appendDataToShape(shape, name, data, delegateShape, states, reuseStateDefinitions = true) {
|
|
31058
31135
|
shape.name = name;
|
|
31059
31136
|
shape.data = data;
|
|
31060
31137
|
shape.delegate = delegateShape;
|
|
31061
|
-
|
|
31138
|
+
if (!reuseStateDefinitions) {
|
|
31139
|
+
shape.states = merge({}, DEFAULT_STATES, states);
|
|
31140
|
+
return;
|
|
31141
|
+
}
|
|
31142
|
+
const source = states !== null && states !== void 0 ? states : DEFAULT_STATES;
|
|
31143
|
+
const cached = this._stateDefinitionsCache.get(source);
|
|
31144
|
+
if (cached) {
|
|
31145
|
+
shape.states = cached.definitions;
|
|
31146
|
+
shape.setStateDefinitionsWithCompiled(cached.definitions, cached.compiledDefinitions);
|
|
31147
|
+
return;
|
|
31148
|
+
}
|
|
31149
|
+
const definitions = states ? merge({}, DEFAULT_STATES, states) : DEFAULT_STATES;
|
|
31150
|
+
const entry = {
|
|
31151
|
+
definitions,
|
|
31152
|
+
compiledDefinitions: new StateDefinitionCompiler().compile(definitions)
|
|
31153
|
+
};
|
|
31154
|
+
this._stateDefinitionsCache.set(source, entry);
|
|
31155
|
+
shape.states = entry.definitions;
|
|
31156
|
+
shape.setStateDefinitionsWithCompiled(entry.definitions, entry.compiledDefinitions);
|
|
31062
31157
|
}
|
|
31063
31158
|
_dispatchLegendEvent(eventName, legendItem, event) {
|
|
31064
31159
|
const currentSelectedItems = this._getSelectedLegends();
|
|
@@ -31084,21 +31179,27 @@ class DiscreteLegend extends LegendBase {
|
|
|
31084
31179
|
}
|
|
31085
31180
|
}
|
|
31086
31181
|
if (config.state) {
|
|
31087
|
-
|
|
31088
|
-
|
|
31089
|
-
|
|
31090
|
-
|
|
31091
|
-
|
|
31092
|
-
|
|
31093
|
-
|
|
31094
|
-
|
|
31182
|
+
const stateKeys = Object.keys(config.state);
|
|
31183
|
+
const hasStateFunction = stateKeys.some(key => isFunction(config.state[key]));
|
|
31184
|
+
newConfig.reuseStateDefinitions = !hasStateFunction;
|
|
31185
|
+
if (!hasStateFunction) {
|
|
31186
|
+
newConfig.state = config.state;
|
|
31187
|
+
}
|
|
31188
|
+
else {
|
|
31189
|
+
newConfig.state = {};
|
|
31190
|
+
stateKeys.forEach(key => {
|
|
31191
|
+
if (config.state[key]) {
|
|
31192
|
+
newConfig.state[key] = isFunction(config.state[key])
|
|
31193
|
+
? config.state[key](item, isSelected, index, items)
|
|
31194
|
+
: config.state[key];
|
|
31095
31195
|
}
|
|
31096
|
-
}
|
|
31097
|
-
}
|
|
31196
|
+
});
|
|
31197
|
+
}
|
|
31098
31198
|
}
|
|
31099
31199
|
return newConfig;
|
|
31100
31200
|
}
|
|
31101
31201
|
release() {
|
|
31202
|
+
this._stateDefinitionsCache = new WeakMap();
|
|
31102
31203
|
super.release();
|
|
31103
31204
|
this.removeAllEventListeners();
|
|
31104
31205
|
}
|
|
@@ -36601,6 +36702,6 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
36601
36702
|
select: true
|
|
36602
36703
|
};
|
|
36603
36704
|
|
|
36604
|
-
const version = "1.1.4-alpha.
|
|
36705
|
+
const version = "1.1.4-alpha.2";
|
|
36605
36706
|
|
|
36606
36707
|
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, IDataZoomEvent, IDataZoomInteractiveEvent, 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, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, 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, installPoptipToApp, installScrollbarToApp, 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, 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,eAAe,CAAC;AAEvC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,cAAc,OAAO,C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AC5E,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,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,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.4-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAEvC,cA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AAC;AAC5D,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.4-alpha.2\";\n\nexport * from './core/base';\nexport { AbstractComponent } from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport { ScrollBar } from './scrollbar/scrollbar';\nexport { loadScrollbar } from './scrollbar/module';\nexport * from './tag';\nexport * from './poptip';\nexport { loadPoptip } from './poptip/module';\nexport * from './crosshair';\nexport { LineCrosshair } from './crosshair/line';\nexport { CircleCrosshair } from './crosshair/circle';\nexport { SectorCrosshair } from './crosshair/sector';\nexport { PolygonCrosshair } from './crosshair/polygon';\nexport * from './label';\nexport { DataLabel } from './label/dataLabel';\nexport { registerSymbolDataLabel } from './label/symbol';\nexport * from './axis';\nexport { LineAxis } from './axis/line';\nexport { CircleAxis } from './axis/circle';\nexport { continuousTicks } from './axis/tick-data/continuous';\nexport { polarAngleAxisDiscreteTicks } from './axis/tick-data/discrete/polar-angle';\nexport * from './axis/grid';\nexport { LineAxisGrid } from './axis/grid/line';\nexport { CircleAxisGrid } from './axis/grid/circle';\nexport * from './segment';\nexport { Segment } from './segment/segment';\nexport * from './data-zoom';\nexport { DataZoom } from './data-zoom/data-zoom';\nexport * from './marker';\nexport { MarkLine, registerMarkLineAnimate } from './marker/line';\nexport { MarkArea, registerMarkAreaAnimate } from './marker/area';\nexport { MarkArcLine, registerMarkArcLineAnimate } from './marker/arc-line';\nexport { MarkArcArea, registerMarkArcAreaAnimate } from './marker/arc-area';\nexport { MarkPoint, registerMarkPointAnimate } from './marker/point';\nexport * from './pager';\nexport * from './legend';\nexport { ColorContinuousLegend } from './legend/color/color';\nexport { SizeContinuousLegend } from './legend/size/size';\nexport * from './title';\nexport { Title } from './title/title';\nexport * from './indicator';\nexport { Indicator } from './indicator/indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport { DiscretePlayer } from './player/discrete-player';\nexport { ContinuousPlayer } from './player/continuous-player';\nexport { PlayerEventEnum } from './player/type/event';\nexport * from './brush';\nexport { Brush } from './brush/brush';\nexport { IOperateType } from './brush/type';\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 { labelSmartInvert } from './util/label-smartInvert';\nexport * from './switch';\nexport * from './label-item';\nexport * from './table-series-number';\n"]}
|
|
@@ -15,6 +15,7 @@ export declare class DiscreteLegend extends LegendBase<DiscreteLegendAttrs> {
|
|
|
15
15
|
private _itemContext;
|
|
16
16
|
private _scrollMask;
|
|
17
17
|
private _scrollMaskContext;
|
|
18
|
+
private _stateDefinitionsCache;
|
|
18
19
|
static defaultAttributes: Partial<DiscreteLegendAttrs>;
|
|
19
20
|
constructor(attributes: DiscreteLegendAttrs, options?: ComponentOptions);
|
|
20
21
|
render(): void;
|