@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.js
CHANGED
|
@@ -15189,9 +15189,10 @@
|
|
|
15189
15189
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
15190
15190
|
}), extraAttrs;
|
|
15191
15191
|
}
|
|
15192
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
15192
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
15193
15193
|
const delta = new Map();
|
|
15194
15194
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
15195
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
15195
15196
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
15196
15197
|
previousValue = target[key];
|
|
15197
15198
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -15205,17 +15206,17 @@
|
|
|
15205
15206
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
15206
15207
|
}), delta;
|
|
15207
15208
|
}
|
|
15208
|
-
_syncAttribute() {
|
|
15209
|
+
_syncAttribute(excludedKeys) {
|
|
15209
15210
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
15210
15211
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
15211
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
15212
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
15212
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
15213
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
15213
15214
|
}
|
|
15214
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
15215
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
15215
15216
|
const target = this.finalAttribute;
|
|
15216
15217
|
if (!target) return;
|
|
15217
15218
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
15218
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
15219
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
15219
15220
|
}
|
|
15220
15221
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
15221
15222
|
var _a;
|
|
@@ -15272,6 +15273,25 @@
|
|
|
15272
15273
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
15273
15274
|
}
|
|
15274
15275
|
}
|
|
15276
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
15277
|
+
if (!params) return;
|
|
15278
|
+
const source = params,
|
|
15279
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
15280
|
+
target = this.attribute,
|
|
15281
|
+
delta = new Map();
|
|
15282
|
+
let hasKeys = !1;
|
|
15283
|
+
for (const key in source) {
|
|
15284
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
15285
|
+
hasKeys = !0;
|
|
15286
|
+
const previousValue = target[key],
|
|
15287
|
+
nextValue = source[key];
|
|
15288
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
15289
|
+
prev: previousValue,
|
|
15290
|
+
next: nextValue
|
|
15291
|
+
});
|
|
15292
|
+
}
|
|
15293
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
15294
|
+
}
|
|
15275
15295
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
15276
15296
|
const source = params;
|
|
15277
15297
|
let target,
|
|
@@ -15294,9 +15314,9 @@
|
|
|
15294
15314
|
}
|
|
15295
15315
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
15296
15316
|
}
|
|
15297
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
15298
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
15299
|
-
const delta = this._syncAttribute();
|
|
15317
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
15318
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
15319
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
15300
15320
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
15301
15321
|
}
|
|
15302
15322
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -22047,14 +22067,18 @@
|
|
|
22047
22067
|
}
|
|
22048
22068
|
class ContributionStore {
|
|
22049
22069
|
static getStore(id) {
|
|
22050
|
-
|
|
22070
|
+
var _a;
|
|
22071
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
22051
22072
|
}
|
|
22052
22073
|
static setStore(id, cache) {
|
|
22053
|
-
this.store.
|
|
22074
|
+
let caches = this.store.get(id);
|
|
22075
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
22054
22076
|
}
|
|
22055
22077
|
static refreshAllContributions() {
|
|
22056
|
-
this.store.forEach(
|
|
22057
|
-
|
|
22078
|
+
this.store.forEach(caches => {
|
|
22079
|
+
caches.forEach(cache => {
|
|
22080
|
+
cache.refresh();
|
|
22081
|
+
});
|
|
22058
22082
|
});
|
|
22059
22083
|
}
|
|
22060
22084
|
}
|
|
@@ -23355,6 +23379,9 @@
|
|
|
23355
23379
|
}
|
|
23356
23380
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
23357
23381
|
|
|
23382
|
+
function hasDisabledStrokeSide(stroke) {
|
|
23383
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
23384
|
+
}
|
|
23358
23385
|
class DefaultRectRenderContribution {
|
|
23359
23386
|
constructor() {
|
|
23360
23387
|
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -23410,7 +23437,7 @@
|
|
|
23410
23437
|
const {
|
|
23411
23438
|
stroke = groupAttribute.stroke
|
|
23412
23439
|
} = group.attribute;
|
|
23413
|
-
|
|
23440
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
23414
23441
|
}
|
|
23415
23442
|
}
|
|
23416
23443
|
class SplitRectAfterRenderContribution {
|
|
@@ -23431,7 +23458,7 @@
|
|
|
23431
23458
|
width: width,
|
|
23432
23459
|
height: height
|
|
23433
23460
|
} = rect.attribute;
|
|
23434
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
23461
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
23435
23462
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
23436
23463
|
let lastStroke,
|
|
23437
23464
|
lastStrokeI = 0;
|
|
@@ -26213,8 +26240,13 @@
|
|
|
26213
26240
|
const runtimeInstallerContext = createLegacyBindingContext();
|
|
26214
26241
|
let runtimeGlobal,
|
|
26215
26242
|
runtimeInstallerPreloaded = !1;
|
|
26216
|
-
const
|
|
26217
|
-
|
|
26243
|
+
const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
26244
|
+
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
26245
|
+
runtimeEntryKeys = new WeakMap(),
|
|
26246
|
+
runtimeDrawContributions = new WeakMap(),
|
|
26247
|
+
loadedRuntimeContributionModules = new WeakMap(),
|
|
26248
|
+
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
26249
|
+
noopUnbindRuntimeContributionService = () => {};
|
|
26218
26250
|
function ensureRuntimeInstallerPreloaded() {
|
|
26219
26251
|
runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, bindCoreModules({
|
|
26220
26252
|
bind: runtimeInstallerContext.bind
|
|
@@ -26275,11 +26307,11 @@
|
|
|
26275
26307
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26276
26308
|
refreshRuntimeInstallerContributions();
|
|
26277
26309
|
const renderers = bindingContext.getAll(GraphicRender),
|
|
26278
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer,
|
|
26279
|
-
clearTrackedEntryKeys$1(app.registry.renderer,
|
|
26310
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE);
|
|
26311
|
+
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) => {
|
|
26280
26312
|
var _a;
|
|
26281
26313
|
null === (_a = null == renderer ? void 0 : renderer.reInit) || void 0 === _a || _a.call(renderer), app.registry.renderer.register(key, renderer), registeredKeys.add(key);
|
|
26282
|
-
}, renderers,
|
|
26314
|
+
}, renderers, RUNTIME_RENDERER_NAMESPACE);
|
|
26283
26315
|
}
|
|
26284
26316
|
function installRuntimeDrawContributionsToApp(app) {
|
|
26285
26317
|
var _a;
|
|
@@ -26301,10 +26333,45 @@
|
|
|
26301
26333
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26302
26334
|
refreshRuntimeInstallerContributions();
|
|
26303
26335
|
const pickers = bindingContext.getAll(serviceIdentifier),
|
|
26304
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.picker,
|
|
26305
|
-
clearTrackedEntryKeys$1(app.registry.picker,
|
|
26336
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE);
|
|
26337
|
+
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) => {
|
|
26306
26338
|
app.registry.picker.register(key, picker), registeredKeys.add(key);
|
|
26307
|
-
}, pickers,
|
|
26339
|
+
}, pickers, RUNTIME_PICKER_NAMESPACE);
|
|
26340
|
+
}
|
|
26341
|
+
function getRuntimeContributionModuleIdentity(module) {
|
|
26342
|
+
return module;
|
|
26343
|
+
}
|
|
26344
|
+
function hasLoadedRuntimeContributionModule(context, module) {
|
|
26345
|
+
var _a, _b;
|
|
26346
|
+
return null !== (_b = null === (_a = loadedRuntimeContributionModules.get(context)) || void 0 === _a ? void 0 : _a.has(getRuntimeContributionModuleIdentity(module))) && void 0 !== _b && _b;
|
|
26347
|
+
}
|
|
26348
|
+
function markRuntimeContributionModuleLoaded(context, module) {
|
|
26349
|
+
let modules = loadedRuntimeContributionModules.get(context);
|
|
26350
|
+
modules || (modules = new WeakSet(), loadedRuntimeContributionModules.set(context, modules)), modules.add(getRuntimeContributionModuleIdentity(module));
|
|
26351
|
+
}
|
|
26352
|
+
function loadRuntimeContributionModuleToContext(context, module) {
|
|
26353
|
+
hasLoadedRuntimeContributionModule(context, module) || ("function" == typeof module ? module(context) : module.registry(context.bind, noopUnbindRuntimeContributionService, context.isBound, context.rebind), markRuntimeContributionModuleLoaded(context, module));
|
|
26354
|
+
}
|
|
26355
|
+
function isRuntimePickerTarget(target) {
|
|
26356
|
+
return "object" == typeof target && null !== target && "picker" in target;
|
|
26357
|
+
}
|
|
26358
|
+
function installRuntimeContributionTargetsToApp(app, targets) {
|
|
26359
|
+
const resolvedTargets = null != targets ? targets : DEFAULT_RUNTIME_CONTRIBUTION_TARGETS;
|
|
26360
|
+
let installGraphicRenderers = !1,
|
|
26361
|
+
installDrawContributions = !1;
|
|
26362
|
+
const pickerTargets = new Set();
|
|
26363
|
+
resolvedTargets.forEach(target => {
|
|
26364
|
+
"graphic-renderer" === target ? installGraphicRenderers = !0 : "draw-contribution" === target ? installDrawContributions = !0 : isRuntimePickerTarget(target) && pickerTargets.add(target.picker);
|
|
26365
|
+
}), installDrawContributions && installRuntimeDrawContributionsToApp(app), installGraphicRenderers && installRuntimeGraphicRenderersToApp(app), pickerTargets.forEach(serviceIdentifier => {
|
|
26366
|
+
installRuntimePickersToApp(app, serviceIdentifier);
|
|
26367
|
+
});
|
|
26368
|
+
}
|
|
26369
|
+
function installRuntimeContributionModule(module, {
|
|
26370
|
+
app: app,
|
|
26371
|
+
legacy = !0,
|
|
26372
|
+
targets: targets
|
|
26373
|
+
} = {}) {
|
|
26374
|
+
loadRuntimeContributionModuleToContext(getRuntimeInstallerBindingContext(), module), legacy && (preLoadAllModule(), loadRuntimeContributionModuleToContext(getLegacyBindingContext(), module)), refreshRuntimeInstallerContributions(), app && installRuntimeContributionTargetsToApp(app, targets);
|
|
26308
26375
|
}
|
|
26309
26376
|
|
|
26310
26377
|
function simplifyRadialDist(points, sqTolerance) {
|
|
@@ -34898,6 +34965,30 @@
|
|
|
34898
34965
|
return 2;
|
|
34899
34966
|
}
|
|
34900
34967
|
|
|
34968
|
+
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
34969
|
+
var _a;
|
|
34970
|
+
const commitTarget = target,
|
|
34971
|
+
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
34972
|
+
finalAttribute = commitTarget.getFinalAttribute();
|
|
34973
|
+
let commitAttrs = null;
|
|
34974
|
+
for (let i = 0; i < keys.length; i++) {
|
|
34975
|
+
const key = keys[i];
|
|
34976
|
+
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]));
|
|
34977
|
+
}
|
|
34978
|
+
return commitAttrs;
|
|
34979
|
+
}
|
|
34980
|
+
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
34981
|
+
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
34982
|
+
if (!commitAttrs) return !1;
|
|
34983
|
+
target.setFinalAttributes(commitAttrs);
|
|
34984
|
+
const commitStaticAttributes = target._commitAnimationStaticAttributes;
|
|
34985
|
+
return "function" == typeof commitStaticAttributes ? commitStaticAttributes.call(target, commitAttrs, {
|
|
34986
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34987
|
+
}) : target.setAttributes(commitAttrs, !1, {
|
|
34988
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34989
|
+
}), !0;
|
|
34990
|
+
}
|
|
34991
|
+
|
|
34901
34992
|
class AnimateExecutor {
|
|
34902
34993
|
static registerBuiltInAnimate(name, animate) {
|
|
34903
34994
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -35077,7 +35168,7 @@
|
|
|
35077
35168
|
props = params.to,
|
|
35078
35169
|
from = params.from;
|
|
35079
35170
|
const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
|
|
35080
|
-
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);
|
|
35171
|
+
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);
|
|
35081
35172
|
let totalDelay = 0;
|
|
35082
35173
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
35083
35174
|
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;
|
|
@@ -35159,6 +35250,25 @@
|
|
|
35159
35250
|
shouldCommitAttrOutChannel(type) {
|
|
35160
35251
|
return "update" !== type;
|
|
35161
35252
|
}
|
|
35253
|
+
commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props) {
|
|
35254
|
+
if ("update" === type || !props || !this.isUpdateDiffContext(graphic)) return;
|
|
35255
|
+
const keys = this.collectAnimatedUpdateDiffAttrKeys(graphic, props);
|
|
35256
|
+
(null == keys ? void 0 : keys.length) && animate.onEnd(() => {
|
|
35257
|
+
commitAnimationStaticAttrs(graphic, keys, animate, props);
|
|
35258
|
+
});
|
|
35259
|
+
}
|
|
35260
|
+
isUpdateDiffContext(graphic) {
|
|
35261
|
+
const context = graphic.context;
|
|
35262
|
+
return "update" === (null == context ? void 0 : context.diffState) || "update" === (null == context ? void 0 : context.animationState);
|
|
35263
|
+
}
|
|
35264
|
+
collectAnimatedUpdateDiffAttrKeys(graphic, props) {
|
|
35265
|
+
var _a;
|
|
35266
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
35267
|
+
if (!diffAttrs) return null;
|
|
35268
|
+
let keys = null;
|
|
35269
|
+
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));
|
|
35270
|
+
return keys;
|
|
35271
|
+
}
|
|
35162
35272
|
createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
|
|
35163
35273
|
const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
|
|
35164
35274
|
animate.play(customAnimate);
|
|
@@ -36124,6 +36234,24 @@
|
|
|
36124
36234
|
for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
|
|
36125
36235
|
return nextRecord;
|
|
36126
36236
|
}
|
|
36237
|
+
function collectActiveSiblingAttrKeys(target, currentAnimate) {
|
|
36238
|
+
var _a;
|
|
36239
|
+
const getTrackedAnimates = null == target ? void 0 : target.getTrackedAnimates;
|
|
36240
|
+
if ("function" == typeof getTrackedAnimates) {
|
|
36241
|
+
const trackedAnimates = getTrackedAnimates.call(target);
|
|
36242
|
+
if (trackedAnimates && trackedAnimates.size <= 1) return;
|
|
36243
|
+
}
|
|
36244
|
+
const forEachTrackedAnimate = null == target ? void 0 : target.forEachTrackedAnimate;
|
|
36245
|
+
if ("function" != typeof forEachTrackedAnimate) return;
|
|
36246
|
+
let keys;
|
|
36247
|
+
const currentEndProps = null === (_a = currentAnimate.getEndProps) || void 0 === _a ? void 0 : _a.call(currentAnimate);
|
|
36248
|
+
return forEachTrackedAnimate.call(target, animate => {
|
|
36249
|
+
var _a;
|
|
36250
|
+
if (animate === currentAnimate || animate.status === AnimateStatus.END) return;
|
|
36251
|
+
const endProps = null === (_a = animate.getEndProps) || void 0 === _a ? void 0 : _a.call(animate);
|
|
36252
|
+
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);
|
|
36253
|
+
}), keys;
|
|
36254
|
+
}
|
|
36127
36255
|
class Animate {
|
|
36128
36256
|
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
36129
36257
|
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;
|
|
@@ -36147,7 +36275,7 @@
|
|
|
36147
36275
|
this.target = target;
|
|
36148
36276
|
const trackerTarget = this.target;
|
|
36149
36277
|
return trackerTarget.detachAttributeFromBaseAttributes(), trackerTarget.trackAnimate(this), this.onRemove(() => {
|
|
36150
|
-
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(), trackerTarget.untrackAnimate(this.id);
|
|
36278
|
+
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), trackerTarget.untrackAnimate(this.id);
|
|
36151
36279
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
36152
36280
|
}
|
|
36153
36281
|
to(props, duration = 300, easing = "linear") {
|
|
@@ -36284,7 +36412,8 @@
|
|
|
36284
36412
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
36285
36413
|
if (nextTime >= this._startTime + this._totalDuration) {
|
|
36286
36414
|
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;
|
|
36287
|
-
|
|
36415
|
+
const trackerTarget = this.target;
|
|
36416
|
+
return trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), void (this.__skipRestoreStaticAttributeOnRemove = !0);
|
|
36288
36417
|
}
|
|
36289
36418
|
this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
36290
36419
|
let cycleTime = nextTime - this._startTime,
|
|
@@ -36498,10 +36627,10 @@
|
|
|
36498
36627
|
type: AttributeUpdateType.ANIMATE_BIND
|
|
36499
36628
|
});
|
|
36500
36629
|
}
|
|
36501
|
-
restoreStaticAttribute() {
|
|
36630
|
+
restoreStaticAttribute(excludedKeys) {
|
|
36502
36631
|
this._restoreAttributeFromStaticTruth({
|
|
36503
36632
|
type: AttributeUpdateType.ANIMATE_END
|
|
36504
|
-
});
|
|
36633
|
+
}, excludedKeys);
|
|
36505
36634
|
}
|
|
36506
36635
|
executeAnimation(config) {
|
|
36507
36636
|
return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
|
|
@@ -36653,12 +36782,36 @@
|
|
|
36653
36782
|
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);
|
|
36654
36783
|
}
|
|
36655
36784
|
|
|
36785
|
+
undefined && undefined.__rest || function (s, e) {
|
|
36786
|
+
var t = {};
|
|
36787
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
36788
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
36789
|
+
var i = 0;
|
|
36790
|
+
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]]);
|
|
36791
|
+
}
|
|
36792
|
+
return t;
|
|
36793
|
+
};
|
|
36794
|
+
const installCoreRuntimeContributionModule = installRuntimeContributionModule,
|
|
36795
|
+
pendingRuntimeContributionModules = [];
|
|
36796
|
+
function installPendingRuntimeContributionModulesToApp(app) {
|
|
36797
|
+
pendingRuntimeContributionModules.forEach(({
|
|
36798
|
+
module: module,
|
|
36799
|
+
options: options
|
|
36800
|
+
}) => {
|
|
36801
|
+
installCoreRuntimeContributionModule(module, Object.assign(Object.assign({}, options), {
|
|
36802
|
+
app: app
|
|
36803
|
+
}));
|
|
36804
|
+
});
|
|
36805
|
+
}
|
|
36806
|
+
|
|
36656
36807
|
function createSharedBrowserApp(options) {
|
|
36657
36808
|
const {
|
|
36658
36809
|
envParams: envParams
|
|
36659
36810
|
} = options,
|
|
36660
36811
|
entryOptions = Object.assign({}, options);
|
|
36661
|
-
|
|
36812
|
+
delete entryOptions.env, delete entryOptions.envParams, delete entryOptions.key;
|
|
36813
|
+
const app = bootstrapVRenderSharedBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
36814
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
36662
36815
|
}
|
|
36663
36816
|
function acquireSharedBrowserVRenderApp(options = {}) {
|
|
36664
36817
|
return acquireSharedApp("browser-shared", options, createSharedBrowserApp, "browser");
|
|
@@ -46424,25 +46577,6 @@
|
|
|
46424
46577
|
}
|
|
46425
46578
|
}
|
|
46426
46579
|
|
|
46427
|
-
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
46428
|
-
var _a;
|
|
46429
|
-
const commitTarget = target,
|
|
46430
|
-
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
46431
|
-
finalAttribute = commitTarget.getFinalAttribute();
|
|
46432
|
-
let commitAttrs = null;
|
|
46433
|
-
for (let i = 0; i < keys.length; i++) {
|
|
46434
|
-
const key = keys[i];
|
|
46435
|
-
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]));
|
|
46436
|
-
}
|
|
46437
|
-
return commitAttrs;
|
|
46438
|
-
}
|
|
46439
|
-
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
46440
|
-
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
46441
|
-
return !!commitAttrs && (target.setFinalAttributes(commitAttrs), target.setAttributes(commitAttrs, !1, {
|
|
46442
|
-
type: AttributeUpdateType.ANIMATE_END
|
|
46443
|
-
}), !0);
|
|
46444
|
-
}
|
|
46445
|
-
|
|
46446
46580
|
class TagPointsUpdate extends ACustomAnimate {
|
|
46447
46581
|
constructor(from, to, duration, easing, params) {
|
|
46448
46582
|
var _a, _b;
|
|
@@ -47430,6 +47564,9 @@
|
|
|
47430
47564
|
};
|
|
47431
47565
|
this._updateSpec = (spec, forceMerge = false, userUpdateOptions) => {
|
|
47432
47566
|
var _a;
|
|
47567
|
+
if (this._isReleased) {
|
|
47568
|
+
return undefined;
|
|
47569
|
+
}
|
|
47433
47570
|
this._reSetRenderState();
|
|
47434
47571
|
const lastSpec = this._spec;
|
|
47435
47572
|
const result = {
|
|
@@ -47930,6 +48067,9 @@
|
|
|
47930
48067
|
});
|
|
47931
48068
|
}
|
|
47932
48069
|
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
48070
|
+
if (this._isReleased) {
|
|
48071
|
+
return this;
|
|
48072
|
+
}
|
|
47933
48073
|
this._reSetRenderState();
|
|
47934
48074
|
if (isNil$1(this._dataSet)) {
|
|
47935
48075
|
return this;
|
|
@@ -47948,6 +48088,9 @@
|
|
|
47948
48088
|
return this;
|
|
47949
48089
|
}
|
|
47950
48090
|
updateFullDataSync(data, reRender = true, userUpdateOptions) {
|
|
48091
|
+
if (this._isReleased) {
|
|
48092
|
+
return this;
|
|
48093
|
+
}
|
|
47951
48094
|
this._reSetRenderState();
|
|
47952
48095
|
if (this._chart) {
|
|
47953
48096
|
this._chart.updateFullData(data);
|
|
@@ -48706,6 +48849,9 @@
|
|
|
48706
48849
|
}
|
|
48707
48850
|
_reSetRenderState() {
|
|
48708
48851
|
var _a, _b;
|
|
48852
|
+
if (this._isReleased || !this._compiler) {
|
|
48853
|
+
return;
|
|
48854
|
+
}
|
|
48709
48855
|
this._renderState = RenderStateEnum.render;
|
|
48710
48856
|
(_b = (_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.eventSystem) === null || _b === void 0 ? void 0 : _b.resumeTriggerEvent();
|
|
48711
48857
|
}
|
|
@@ -49054,7 +49200,7 @@
|
|
|
49054
49200
|
});
|
|
49055
49201
|
};
|
|
49056
49202
|
|
|
49057
|
-
const version = "2.1.
|
|
49203
|
+
const version = "2.1.1";
|
|
49058
49204
|
|
|
49059
49205
|
const addVChartProperty = (data, op) => {
|
|
49060
49206
|
const context = op.beforeCall();
|
|
@@ -106857,7 +107003,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
106857
107003
|
};
|
|
106858
107004
|
this.autoPlayCallback = () => {
|
|
106859
107005
|
var _a;
|
|
106860
|
-
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
107006
|
+
if (((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) && this._playerComponent) {
|
|
106861
107007
|
this._playerComponent.pause();
|
|
106862
107008
|
this._playerComponent.play();
|
|
106863
107009
|
}
|
|
@@ -107055,7 +107201,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
107055
107201
|
return rect.height - this._height;
|
|
107056
107202
|
}
|
|
107057
107203
|
changePlayerIndex(index) {
|
|
107058
|
-
|
|
107204
|
+
var _a, _b;
|
|
107205
|
+
const spec = (_a = this._specs) === null || _a === void 0 ? void 0 : _a[index];
|
|
107206
|
+
if (!spec || !((_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance)) {
|
|
107207
|
+
return;
|
|
107208
|
+
}
|
|
107059
107209
|
this._option.globalInstance.updateFullData(spec.data);
|
|
107060
107210
|
this.event.emit(exports.ChartEvent.playerChange, {
|
|
107061
107211
|
model: this,
|
|
@@ -107067,7 +107217,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
107067
107217
|
});
|
|
107068
107218
|
}
|
|
107069
107219
|
release() {
|
|
107070
|
-
|
|
107220
|
+
var _a, _b, _c, _d;
|
|
107221
|
+
(_b = (_a = this._playerComponent) === null || _a === void 0 ? void 0 : _a.pause) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
107222
|
+
(_d = (_c = this._option) === null || _c === void 0 ? void 0 : _c.globalInstance) === null || _d === void 0 ? void 0 : _d.off(exports.ChartEvent.rendered, this.autoPlayCallback);
|
|
107223
|
+
super.release();
|
|
107224
|
+
this._playerComponent = null;
|
|
107225
|
+
this._cacheAttrs = null;
|
|
107226
|
+
this._specs = [];
|
|
107071
107227
|
}
|
|
107072
107228
|
}
|
|
107073
107229
|
Player.builtInTheme = {
|