@visactor/vchart 2.1.0 → 2.1.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/build/es5/index.js +1 -1
- package/build/index.es.js +208 -52
- package/build/index.js +208 -52
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/player/player.js +10 -5
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/constant/box-plot.js +1 -2
- package/cjs/constant/event.js +2 -1
- package/cjs/constant/layout.js +1 -1
- package/cjs/constant/marker.js +1 -1
- package/cjs/constant/polar.js +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +6 -3
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/esm/component/player/player.js +10 -5
- package/esm/component/player/player.js.map +1 -1
- package/esm/constant/box-plot.js +1 -2
- package/esm/constant/event.js +2 -1
- package/esm/constant/layout.js +1 -1
- package/esm/constant/marker.js +1 -1
- package/esm/constant/polar.js +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +6 -3
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/package.json +9 -9
package/build/index.es.js
CHANGED
|
@@ -15183,9 +15183,10 @@ class Graphic extends Node {
|
|
|
15183
15183
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
15184
15184
|
}), extraAttrs;
|
|
15185
15185
|
}
|
|
15186
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
15186
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
15187
15187
|
const delta = new Map();
|
|
15188
15188
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
15189
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
15189
15190
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
15190
15191
|
previousValue = target[key];
|
|
15191
15192
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -15199,17 +15200,17 @@ class Graphic extends Node {
|
|
|
15199
15200
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
15200
15201
|
}), delta;
|
|
15201
15202
|
}
|
|
15202
|
-
_syncAttribute() {
|
|
15203
|
+
_syncAttribute(excludedKeys) {
|
|
15203
15204
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
15204
15205
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
15205
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
15206
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
15206
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
15207
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
15207
15208
|
}
|
|
15208
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
15209
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
15209
15210
|
const target = this.finalAttribute;
|
|
15210
15211
|
if (!target) return;
|
|
15211
15212
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
15212
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
15213
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
15213
15214
|
}
|
|
15214
15215
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
15215
15216
|
var _a;
|
|
@@ -15266,6 +15267,25 @@ class Graphic extends Node {
|
|
|
15266
15267
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
15267
15268
|
}
|
|
15268
15269
|
}
|
|
15270
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
15271
|
+
if (!params) return;
|
|
15272
|
+
const source = params,
|
|
15273
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
15274
|
+
target = this.attribute,
|
|
15275
|
+
delta = new Map();
|
|
15276
|
+
let hasKeys = !1;
|
|
15277
|
+
for (const key in source) {
|
|
15278
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
15279
|
+
hasKeys = !0;
|
|
15280
|
+
const previousValue = target[key],
|
|
15281
|
+
nextValue = source[key];
|
|
15282
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
15283
|
+
prev: previousValue,
|
|
15284
|
+
next: nextValue
|
|
15285
|
+
});
|
|
15286
|
+
}
|
|
15287
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
15288
|
+
}
|
|
15269
15289
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
15270
15290
|
const source = params;
|
|
15271
15291
|
let target,
|
|
@@ -15288,9 +15308,9 @@ class Graphic extends Node {
|
|
|
15288
15308
|
}
|
|
15289
15309
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
15290
15310
|
}
|
|
15291
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
15292
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
15293
|
-
const delta = this._syncAttribute();
|
|
15311
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
15312
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
15313
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
15294
15314
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
15295
15315
|
}
|
|
15296
15316
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -22041,14 +22061,18 @@ function bindContributionProviderNoSingletonScope(bind, id) {
|
|
|
22041
22061
|
}
|
|
22042
22062
|
class ContributionStore {
|
|
22043
22063
|
static getStore(id) {
|
|
22044
|
-
|
|
22064
|
+
var _a;
|
|
22065
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
22045
22066
|
}
|
|
22046
22067
|
static setStore(id, cache) {
|
|
22047
|
-
this.store.
|
|
22068
|
+
let caches = this.store.get(id);
|
|
22069
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
22048
22070
|
}
|
|
22049
22071
|
static refreshAllContributions() {
|
|
22050
|
-
this.store.forEach(
|
|
22051
|
-
|
|
22072
|
+
this.store.forEach(caches => {
|
|
22073
|
+
caches.forEach(cache => {
|
|
22074
|
+
cache.refresh();
|
|
22075
|
+
});
|
|
22052
22076
|
});
|
|
22053
22077
|
}
|
|
22054
22078
|
}
|
|
@@ -23349,6 +23373,9 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
23349
23373
|
}
|
|
23350
23374
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
23351
23375
|
|
|
23376
|
+
function hasDisabledStrokeSide(stroke) {
|
|
23377
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
23378
|
+
}
|
|
23352
23379
|
class DefaultRectRenderContribution {
|
|
23353
23380
|
constructor() {
|
|
23354
23381
|
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -23404,7 +23431,7 @@ class SplitRectBeforeRenderContribution {
|
|
|
23404
23431
|
const {
|
|
23405
23432
|
stroke = groupAttribute.stroke
|
|
23406
23433
|
} = group.attribute;
|
|
23407
|
-
|
|
23434
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
23408
23435
|
}
|
|
23409
23436
|
}
|
|
23410
23437
|
class SplitRectAfterRenderContribution {
|
|
@@ -23425,7 +23452,7 @@ class SplitRectAfterRenderContribution {
|
|
|
23425
23452
|
width: width,
|
|
23426
23453
|
height: height
|
|
23427
23454
|
} = rect.attribute;
|
|
23428
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
23455
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
23429
23456
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
23430
23457
|
let lastStroke,
|
|
23431
23458
|
lastStrokeI = 0;
|
|
@@ -26207,8 +26234,13 @@ class DefaultIncrementalCanvasLineRender extends DefaultCanvasLineRender {
|
|
|
26207
26234
|
const runtimeInstallerContext = createLegacyBindingContext();
|
|
26208
26235
|
let runtimeGlobal,
|
|
26209
26236
|
runtimeInstallerPreloaded = !1;
|
|
26210
|
-
const
|
|
26211
|
-
|
|
26237
|
+
const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
26238
|
+
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
26239
|
+
runtimeEntryKeys = new WeakMap(),
|
|
26240
|
+
runtimeDrawContributions = new WeakMap(),
|
|
26241
|
+
loadedRuntimeContributionModules = new WeakMap(),
|
|
26242
|
+
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
26243
|
+
noopUnbindRuntimeContributionService = () => {};
|
|
26212
26244
|
function ensureRuntimeInstallerPreloaded() {
|
|
26213
26245
|
runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, bindCoreModules({
|
|
26214
26246
|
bind: runtimeInstallerContext.bind
|
|
@@ -26269,11 +26301,11 @@ function installRuntimeGraphicRenderersToApp(app) {
|
|
|
26269
26301
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26270
26302
|
refreshRuntimeInstallerContributions();
|
|
26271
26303
|
const renderers = bindingContext.getAll(GraphicRender),
|
|
26272
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer,
|
|
26273
|
-
clearTrackedEntryKeys$1(app.registry.renderer,
|
|
26304
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE);
|
|
26305
|
+
clearTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE, null === (_a = app.registry.renderer.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.renderer)), registerRuntimeEntries((key, renderer) => {
|
|
26274
26306
|
var _a;
|
|
26275
26307
|
null === (_a = null == renderer ? void 0 : renderer.reInit) || void 0 === _a || _a.call(renderer), app.registry.renderer.register(key, renderer), registeredKeys.add(key);
|
|
26276
|
-
}, renderers,
|
|
26308
|
+
}, renderers, RUNTIME_RENDERER_NAMESPACE);
|
|
26277
26309
|
}
|
|
26278
26310
|
function installRuntimeDrawContributionsToApp(app) {
|
|
26279
26311
|
var _a;
|
|
@@ -26295,10 +26327,45 @@ function installRuntimePickersToApp(app, serviceIdentifier) {
|
|
|
26295
26327
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26296
26328
|
refreshRuntimeInstallerContributions();
|
|
26297
26329
|
const pickers = bindingContext.getAll(serviceIdentifier),
|
|
26298
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.picker,
|
|
26299
|
-
clearTrackedEntryKeys$1(app.registry.picker,
|
|
26330
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE);
|
|
26331
|
+
clearTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE, null === (_a = app.registry.picker.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.picker)), registerRuntimeEntries((key, picker) => {
|
|
26300
26332
|
app.registry.picker.register(key, picker), registeredKeys.add(key);
|
|
26301
|
-
}, pickers,
|
|
26333
|
+
}, pickers, RUNTIME_PICKER_NAMESPACE);
|
|
26334
|
+
}
|
|
26335
|
+
function getRuntimeContributionModuleIdentity(module) {
|
|
26336
|
+
return module;
|
|
26337
|
+
}
|
|
26338
|
+
function hasLoadedRuntimeContributionModule(context, module) {
|
|
26339
|
+
var _a, _b;
|
|
26340
|
+
return null !== (_b = null === (_a = loadedRuntimeContributionModules.get(context)) || void 0 === _a ? void 0 : _a.has(getRuntimeContributionModuleIdentity(module))) && void 0 !== _b && _b;
|
|
26341
|
+
}
|
|
26342
|
+
function markRuntimeContributionModuleLoaded(context, module) {
|
|
26343
|
+
let modules = loadedRuntimeContributionModules.get(context);
|
|
26344
|
+
modules || (modules = new WeakSet(), loadedRuntimeContributionModules.set(context, modules)), modules.add(getRuntimeContributionModuleIdentity(module));
|
|
26345
|
+
}
|
|
26346
|
+
function loadRuntimeContributionModuleToContext(context, module) {
|
|
26347
|
+
hasLoadedRuntimeContributionModule(context, module) || ("function" == typeof module ? module(context) : module.registry(context.bind, noopUnbindRuntimeContributionService, context.isBound, context.rebind), markRuntimeContributionModuleLoaded(context, module));
|
|
26348
|
+
}
|
|
26349
|
+
function isRuntimePickerTarget(target) {
|
|
26350
|
+
return "object" == typeof target && null !== target && "picker" in target;
|
|
26351
|
+
}
|
|
26352
|
+
function installRuntimeContributionTargetsToApp(app, targets) {
|
|
26353
|
+
const resolvedTargets = null != targets ? targets : DEFAULT_RUNTIME_CONTRIBUTION_TARGETS;
|
|
26354
|
+
let installGraphicRenderers = !1,
|
|
26355
|
+
installDrawContributions = !1;
|
|
26356
|
+
const pickerTargets = new Set();
|
|
26357
|
+
resolvedTargets.forEach(target => {
|
|
26358
|
+
"graphic-renderer" === target ? installGraphicRenderers = !0 : "draw-contribution" === target ? installDrawContributions = !0 : isRuntimePickerTarget(target) && pickerTargets.add(target.picker);
|
|
26359
|
+
}), installDrawContributions && installRuntimeDrawContributionsToApp(app), installGraphicRenderers && installRuntimeGraphicRenderersToApp(app), pickerTargets.forEach(serviceIdentifier => {
|
|
26360
|
+
installRuntimePickersToApp(app, serviceIdentifier);
|
|
26361
|
+
});
|
|
26362
|
+
}
|
|
26363
|
+
function installRuntimeContributionModule(module, {
|
|
26364
|
+
app: app,
|
|
26365
|
+
legacy = !0,
|
|
26366
|
+
targets: targets
|
|
26367
|
+
} = {}) {
|
|
26368
|
+
loadRuntimeContributionModuleToContext(getRuntimeInstallerBindingContext(), module), legacy && (preLoadAllModule(), loadRuntimeContributionModuleToContext(getLegacyBindingContext(), module)), refreshRuntimeInstallerContributions(), app && installRuntimeContributionTargetsToApp(app, targets);
|
|
26302
26369
|
}
|
|
26303
26370
|
|
|
26304
26371
|
function simplifyRadialDist(points, sqTolerance) {
|
|
@@ -34892,6 +34959,30 @@ function getCustomType(custom) {
|
|
|
34892
34959
|
return 2;
|
|
34893
34960
|
}
|
|
34894
34961
|
|
|
34962
|
+
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
34963
|
+
var _a;
|
|
34964
|
+
const commitTarget = target,
|
|
34965
|
+
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
34966
|
+
finalAttribute = commitTarget.getFinalAttribute();
|
|
34967
|
+
let commitAttrs = null;
|
|
34968
|
+
for (let i = 0; i < keys.length; i++) {
|
|
34969
|
+
const key = keys[i];
|
|
34970
|
+
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
34971
|
+
}
|
|
34972
|
+
return commitAttrs;
|
|
34973
|
+
}
|
|
34974
|
+
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
34975
|
+
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
34976
|
+
if (!commitAttrs) return !1;
|
|
34977
|
+
target.setFinalAttributes(commitAttrs);
|
|
34978
|
+
const commitStaticAttributes = target._commitAnimationStaticAttributes;
|
|
34979
|
+
return "function" == typeof commitStaticAttributes ? commitStaticAttributes.call(target, commitAttrs, {
|
|
34980
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34981
|
+
}) : target.setAttributes(commitAttrs, !1, {
|
|
34982
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34983
|
+
}), !0;
|
|
34984
|
+
}
|
|
34985
|
+
|
|
34895
34986
|
class AnimateExecutor {
|
|
34896
34987
|
static registerBuiltInAnimate(name, animate) {
|
|
34897
34988
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -35071,7 +35162,7 @@ class AnimateExecutor {
|
|
|
35071
35162
|
props = params.to,
|
|
35072
35163
|
from = params.from;
|
|
35073
35164
|
const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
|
|
35074
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
35165
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic), this.commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props);
|
|
35075
35166
|
let totalDelay = 0;
|
|
35076
35167
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
35077
35168
|
const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -35153,6 +35244,25 @@ class AnimateExecutor {
|
|
|
35153
35244
|
shouldCommitAttrOutChannel(type) {
|
|
35154
35245
|
return "update" !== type;
|
|
35155
35246
|
}
|
|
35247
|
+
commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props) {
|
|
35248
|
+
if ("update" === type || !props || !this.isUpdateDiffContext(graphic)) return;
|
|
35249
|
+
const keys = this.collectAnimatedUpdateDiffAttrKeys(graphic, props);
|
|
35250
|
+
(null == keys ? void 0 : keys.length) && animate.onEnd(() => {
|
|
35251
|
+
commitAnimationStaticAttrs(graphic, keys, animate, props);
|
|
35252
|
+
});
|
|
35253
|
+
}
|
|
35254
|
+
isUpdateDiffContext(graphic) {
|
|
35255
|
+
const context = graphic.context;
|
|
35256
|
+
return "update" === (null == context ? void 0 : context.diffState) || "update" === (null == context ? void 0 : context.animationState);
|
|
35257
|
+
}
|
|
35258
|
+
collectAnimatedUpdateDiffAttrKeys(graphic, props) {
|
|
35259
|
+
var _a;
|
|
35260
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
35261
|
+
if (!diffAttrs) return null;
|
|
35262
|
+
let keys = null;
|
|
35263
|
+
for (const key in props) Object.prototype.hasOwnProperty.call(props, key) && Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && (null != keys || (keys = []), keys.push(key));
|
|
35264
|
+
return keys;
|
|
35265
|
+
}
|
|
35156
35266
|
createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
|
|
35157
35267
|
const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
|
|
35158
35268
|
animate.play(customAnimate);
|
|
@@ -36118,6 +36228,24 @@ function removeKeysFromRecord(record, keys) {
|
|
|
36118
36228
|
for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
|
|
36119
36229
|
return nextRecord;
|
|
36120
36230
|
}
|
|
36231
|
+
function collectActiveSiblingAttrKeys(target, currentAnimate) {
|
|
36232
|
+
var _a;
|
|
36233
|
+
const getTrackedAnimates = null == target ? void 0 : target.getTrackedAnimates;
|
|
36234
|
+
if ("function" == typeof getTrackedAnimates) {
|
|
36235
|
+
const trackedAnimates = getTrackedAnimates.call(target);
|
|
36236
|
+
if (trackedAnimates && trackedAnimates.size <= 1) return;
|
|
36237
|
+
}
|
|
36238
|
+
const forEachTrackedAnimate = null == target ? void 0 : target.forEachTrackedAnimate;
|
|
36239
|
+
if ("function" != typeof forEachTrackedAnimate) return;
|
|
36240
|
+
let keys;
|
|
36241
|
+
const currentEndProps = null === (_a = currentAnimate.getEndProps) || void 0 === _a ? void 0 : _a.call(currentAnimate);
|
|
36242
|
+
return forEachTrackedAnimate.call(target, animate => {
|
|
36243
|
+
var _a;
|
|
36244
|
+
if (animate === currentAnimate || animate.status === AnimateStatus.END) return;
|
|
36245
|
+
const endProps = null === (_a = animate.getEndProps) || void 0 === _a ? void 0 : _a.call(animate);
|
|
36246
|
+
if (endProps) for (const key in endProps) !Object.prototype.hasOwnProperty.call(endProps, key) || currentEndProps && Object.prototype.hasOwnProperty.call(currentEndProps, key) || ((null != keys ? keys : keys = Object.create(null))[key] = !0);
|
|
36247
|
+
}), keys;
|
|
36248
|
+
}
|
|
36121
36249
|
class Animate {
|
|
36122
36250
|
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
36123
36251
|
this.id = id, this.status = AnimateStatus.INITIAL, this._timeline = timeline, timeline.addAnimate(this), this.slience = slience, this._startTime = 0, this._duration = 0, this._totalDuration = 0, this._loopCount = 0, this._currentLoop = 0, this._bounce = !1, this._firstStep = null, this._lastStep = null, this._startProps = {}, this._endProps = {}, this._preventAttrs = new Set(), this.currentTime = 0, this.interpolateUpdateFunction = null, this.priority = 0;
|
|
@@ -36141,7 +36269,7 @@ class Animate {
|
|
|
36141
36269
|
this.target = target;
|
|
36142
36270
|
const trackerTarget = this.target;
|
|
36143
36271
|
return trackerTarget.detachAttributeFromBaseAttributes(), trackerTarget.trackAnimate(this), this.onRemove(() => {
|
|
36144
|
-
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(), trackerTarget.untrackAnimate(this.id);
|
|
36272
|
+
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), trackerTarget.untrackAnimate(this.id);
|
|
36145
36273
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
36146
36274
|
}
|
|
36147
36275
|
to(props, duration = 300, easing = "linear") {
|
|
@@ -36278,7 +36406,8 @@ class Animate {
|
|
|
36278
36406
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
36279
36407
|
if (nextTime >= this._startTime + this._totalDuration) {
|
|
36280
36408
|
null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = AnimateStatus.END;
|
|
36281
|
-
|
|
36409
|
+
const trackerTarget = this.target;
|
|
36410
|
+
return trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), void (this.__skipRestoreStaticAttributeOnRemove = !0);
|
|
36282
36411
|
}
|
|
36283
36412
|
this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
36284
36413
|
let cycleTime = nextTime - this._startTime,
|
|
@@ -36492,10 +36621,10 @@ class AnimateExtension {
|
|
|
36492
36621
|
type: AttributeUpdateType.ANIMATE_BIND
|
|
36493
36622
|
});
|
|
36494
36623
|
}
|
|
36495
|
-
restoreStaticAttribute() {
|
|
36624
|
+
restoreStaticAttribute(excludedKeys) {
|
|
36496
36625
|
this._restoreAttributeFromStaticTruth({
|
|
36497
36626
|
type: AttributeUpdateType.ANIMATE_END
|
|
36498
|
-
});
|
|
36627
|
+
}, excludedKeys);
|
|
36499
36628
|
}
|
|
36500
36629
|
executeAnimation(config) {
|
|
36501
36630
|
return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
|
|
@@ -36647,12 +36776,36 @@ function acquireSharedApp(registryEnv, options, createApp, handleEnv = registryE
|
|
|
36647
36776
|
return (null == record ? void 0 : record.app.released) && (releaseSharedAppRecord(registryEnv, key, record), record = void 0), record || (record = createSharedAppRecord(registryEnv, key, options, createApp), envRegistry.set(key, record)), record.refCount += 1, createSharedAppHandle(registryEnv, handleEnv, key, record);
|
|
36648
36777
|
}
|
|
36649
36778
|
|
|
36779
|
+
undefined && undefined.__rest || function (s, e) {
|
|
36780
|
+
var t = {};
|
|
36781
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
36782
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
36783
|
+
var i = 0;
|
|
36784
|
+
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
36785
|
+
}
|
|
36786
|
+
return t;
|
|
36787
|
+
};
|
|
36788
|
+
const installCoreRuntimeContributionModule = installRuntimeContributionModule,
|
|
36789
|
+
pendingRuntimeContributionModules = [];
|
|
36790
|
+
function installPendingRuntimeContributionModulesToApp(app) {
|
|
36791
|
+
pendingRuntimeContributionModules.forEach(({
|
|
36792
|
+
module: module,
|
|
36793
|
+
options: options
|
|
36794
|
+
}) => {
|
|
36795
|
+
installCoreRuntimeContributionModule(module, Object.assign(Object.assign({}, options), {
|
|
36796
|
+
app: app
|
|
36797
|
+
}));
|
|
36798
|
+
});
|
|
36799
|
+
}
|
|
36800
|
+
|
|
36650
36801
|
function createSharedBrowserApp(options) {
|
|
36651
36802
|
const {
|
|
36652
36803
|
envParams: envParams
|
|
36653
36804
|
} = options,
|
|
36654
36805
|
entryOptions = Object.assign({}, options);
|
|
36655
|
-
|
|
36806
|
+
delete entryOptions.env, delete entryOptions.envParams, delete entryOptions.key;
|
|
36807
|
+
const app = bootstrapVRenderSharedBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
36808
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
36656
36809
|
}
|
|
36657
36810
|
function acquireSharedBrowserVRenderApp(options = {}) {
|
|
36658
36811
|
return acquireSharedApp("browser-shared", options, createSharedBrowserApp, "browser");
|
|
@@ -46418,25 +46571,6 @@ class State extends ACustomAnimate {
|
|
|
46418
46571
|
}
|
|
46419
46572
|
}
|
|
46420
46573
|
|
|
46421
|
-
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
46422
|
-
var _a;
|
|
46423
|
-
const commitTarget = target,
|
|
46424
|
-
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
46425
|
-
finalAttribute = commitTarget.getFinalAttribute();
|
|
46426
|
-
let commitAttrs = null;
|
|
46427
|
-
for (let i = 0; i < keys.length; i++) {
|
|
46428
|
-
const key = keys[i];
|
|
46429
|
-
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
46430
|
-
}
|
|
46431
|
-
return commitAttrs;
|
|
46432
|
-
}
|
|
46433
|
-
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
46434
|
-
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
46435
|
-
return !!commitAttrs && (target.setFinalAttributes(commitAttrs), target.setAttributes(commitAttrs, !1, {
|
|
46436
|
-
type: AttributeUpdateType.ANIMATE_END
|
|
46437
|
-
}), !0);
|
|
46438
|
-
}
|
|
46439
|
-
|
|
46440
46574
|
class TagPointsUpdate extends ACustomAnimate {
|
|
46441
46575
|
constructor(from, to, duration, easing, params) {
|
|
46442
46576
|
var _a, _b;
|
|
@@ -47424,6 +47558,9 @@ class VChart {
|
|
|
47424
47558
|
};
|
|
47425
47559
|
this._updateSpec = (spec, forceMerge = false, userUpdateOptions) => {
|
|
47426
47560
|
var _a;
|
|
47561
|
+
if (this._isReleased) {
|
|
47562
|
+
return undefined;
|
|
47563
|
+
}
|
|
47427
47564
|
this._reSetRenderState();
|
|
47428
47565
|
const lastSpec = this._spec;
|
|
47429
47566
|
const result = {
|
|
@@ -47924,6 +48061,9 @@ class VChart {
|
|
|
47924
48061
|
});
|
|
47925
48062
|
}
|
|
47926
48063
|
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
48064
|
+
if (this._isReleased) {
|
|
48065
|
+
return this;
|
|
48066
|
+
}
|
|
47927
48067
|
this._reSetRenderState();
|
|
47928
48068
|
if (isNil$1(this._dataSet)) {
|
|
47929
48069
|
return this;
|
|
@@ -47942,6 +48082,9 @@ class VChart {
|
|
|
47942
48082
|
return this;
|
|
47943
48083
|
}
|
|
47944
48084
|
updateFullDataSync(data, reRender = true, userUpdateOptions) {
|
|
48085
|
+
if (this._isReleased) {
|
|
48086
|
+
return this;
|
|
48087
|
+
}
|
|
47945
48088
|
this._reSetRenderState();
|
|
47946
48089
|
if (this._chart) {
|
|
47947
48090
|
this._chart.updateFullData(data);
|
|
@@ -48700,6 +48843,9 @@ class VChart {
|
|
|
48700
48843
|
}
|
|
48701
48844
|
_reSetRenderState() {
|
|
48702
48845
|
var _a, _b;
|
|
48846
|
+
if (this._isReleased || !this._compiler) {
|
|
48847
|
+
return;
|
|
48848
|
+
}
|
|
48703
48849
|
this._renderState = RenderStateEnum.render;
|
|
48704
48850
|
(_b = (_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.eventSystem) === null || _b === void 0 ? void 0 : _b.resumeTriggerEvent();
|
|
48705
48851
|
}
|
|
@@ -49048,7 +49194,7 @@ const lookup = (data, opt) => {
|
|
|
49048
49194
|
});
|
|
49049
49195
|
};
|
|
49050
49196
|
|
|
49051
|
-
const version = "2.1.
|
|
49197
|
+
const version = "2.1.1";
|
|
49052
49198
|
|
|
49053
49199
|
const addVChartProperty = (data, op) => {
|
|
49054
49200
|
const context = op.beforeCall();
|
|
@@ -106851,7 +106997,7 @@ class Player extends BaseComponent {
|
|
|
106851
106997
|
};
|
|
106852
106998
|
this.autoPlayCallback = () => {
|
|
106853
106999
|
var _a;
|
|
106854
|
-
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
107000
|
+
if (((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) && this._playerComponent) {
|
|
106855
107001
|
this._playerComponent.pause();
|
|
106856
107002
|
this._playerComponent.play();
|
|
106857
107003
|
}
|
|
@@ -107049,7 +107195,11 @@ class Player extends BaseComponent {
|
|
|
107049
107195
|
return rect.height - this._height;
|
|
107050
107196
|
}
|
|
107051
107197
|
changePlayerIndex(index) {
|
|
107052
|
-
|
|
107198
|
+
var _a, _b;
|
|
107199
|
+
const spec = (_a = this._specs) === null || _a === void 0 ? void 0 : _a[index];
|
|
107200
|
+
if (!spec || !((_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance)) {
|
|
107201
|
+
return;
|
|
107202
|
+
}
|
|
107053
107203
|
this._option.globalInstance.updateFullData(spec.data);
|
|
107054
107204
|
this.event.emit(ChartEvent.playerChange, {
|
|
107055
107205
|
model: this,
|
|
@@ -107061,7 +107211,13 @@ class Player extends BaseComponent {
|
|
|
107061
107211
|
});
|
|
107062
107212
|
}
|
|
107063
107213
|
release() {
|
|
107064
|
-
|
|
107214
|
+
var _a, _b, _c, _d;
|
|
107215
|
+
(_b = (_a = this._playerComponent) === null || _a === void 0 ? void 0 : _a.pause) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
107216
|
+
(_d = (_c = this._option) === null || _c === void 0 ? void 0 : _c.globalInstance) === null || _d === void 0 ? void 0 : _d.off(ChartEvent.rendered, this.autoPlayCallback);
|
|
107217
|
+
super.release();
|
|
107218
|
+
this._playerComponent = null;
|
|
107219
|
+
this._cacheAttrs = null;
|
|
107220
|
+
this._specs = [];
|
|
107065
107221
|
}
|
|
107066
107222
|
}
|
|
107067
107223
|
Player.builtInTheme = {
|