@visactor/vrender-components 1.0.0-alpha.3 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +90 -67
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "1.0.0-alpha.
|
|
20
|
+
}), exports.version = void 0, exports.version = "1.0.0-alpha.5", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
|
|
22
22
|
__exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
|
|
23
23
|
__exportStar(require("./crosshair"), exports), __exportStar(require("./label"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.0-alpha.5\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -18156,7 +18156,7 @@ class Step {
|
|
|
18156
18156
|
tryPreventConflict() {
|
|
18157
18157
|
const animate = this.animate;
|
|
18158
18158
|
this.target.animates.forEach(a => {
|
|
18159
|
-
if (a === animate || a.priority > animate.priority) return;
|
|
18159
|
+
if (a === animate || a.priority > animate.priority || a.priority === 1 / 0) return;
|
|
18160
18160
|
const fromProps = a.getStartProps();
|
|
18161
18161
|
this.propKeys.forEach(key => {
|
|
18162
18162
|
null != fromProps[key] && a.preventAttr(key);
|
|
@@ -18202,6 +18202,13 @@ class WaitStep extends Step {
|
|
|
18202
18202
|
constructor(type, props, duration, easing) {
|
|
18203
18203
|
super(type, props, duration, easing);
|
|
18204
18204
|
}
|
|
18205
|
+
onStart() {
|
|
18206
|
+
super.onStart();
|
|
18207
|
+
}
|
|
18208
|
+
onFirstRun() {
|
|
18209
|
+
const fromProps = this.getFromProps();
|
|
18210
|
+
this.target.setAttributes(fromProps);
|
|
18211
|
+
}
|
|
18205
18212
|
update(end, ratio, out) {
|
|
18206
18213
|
this.onStart();
|
|
18207
18214
|
}
|
|
@@ -18210,19 +18217,29 @@ class WaitStep extends Step {
|
|
|
18210
18217
|
|
|
18211
18218
|
class DefaultTimeline {
|
|
18212
18219
|
get animateCount() {
|
|
18213
|
-
return this.
|
|
18220
|
+
return this._animateCount;
|
|
18214
18221
|
}
|
|
18215
18222
|
constructor() {
|
|
18216
|
-
this.
|
|
18223
|
+
this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
18217
18224
|
}
|
|
18218
18225
|
isRunning() {
|
|
18219
|
-
return !this.paused && this.
|
|
18226
|
+
return !this.paused && this._animateCount > 0;
|
|
18220
18227
|
}
|
|
18221
18228
|
forEachAccessAnimate(cb) {
|
|
18222
|
-
|
|
18229
|
+
let current = this.head,
|
|
18230
|
+
index = 0;
|
|
18231
|
+
for (; current;) {
|
|
18232
|
+
const next = current.next;
|
|
18233
|
+
cb(current.animate, index), index++, current = next;
|
|
18234
|
+
}
|
|
18223
18235
|
}
|
|
18224
18236
|
addAnimate(animate) {
|
|
18225
|
-
|
|
18237
|
+
const newNode = {
|
|
18238
|
+
animate: animate,
|
|
18239
|
+
next: null,
|
|
18240
|
+
prev: null
|
|
18241
|
+
};
|
|
18242
|
+
this.head ? this.tail && (this.tail.next = newNode, newNode.prev = this.tail, this.tail = newNode) : (this.head = newNode, this.tail = newNode), this.animateMap.set(animate, newNode), this._animateCount++, this._totalDuration = Math.max(this._totalDuration, animate.getStartTime() + animate.getDuration());
|
|
18226
18243
|
}
|
|
18227
18244
|
pause() {
|
|
18228
18245
|
this.paused = !0;
|
|
@@ -18234,21 +18251,21 @@ class DefaultTimeline {
|
|
|
18234
18251
|
if (this.paused) return;
|
|
18235
18252
|
const scaledDelta = delta * this._playSpeed;
|
|
18236
18253
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
18237
|
-
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0
|
|
18254
|
+
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
18238
18255
|
});
|
|
18239
18256
|
}
|
|
18240
18257
|
clear() {
|
|
18241
18258
|
this.forEachAccessAnimate(animate => {
|
|
18242
18259
|
animate.release();
|
|
18243
|
-
}), this.
|
|
18260
|
+
}), this.head = null, this.tail = null, this.animateMap.clear(), this._animateCount = 0, this._totalDuration = 0;
|
|
18244
18261
|
}
|
|
18245
18262
|
removeAnimate(animate) {
|
|
18246
18263
|
let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
18247
|
-
|
|
18248
|
-
|
|
18264
|
+
const node = this.animateMap.get(animate);
|
|
18265
|
+
node && (release && (animate._onRemove && animate._onRemove.forEach(cb => cb()), animate.release()), node.prev ? node.prev.next = node.next : this.head = node.next, node.next ? node.next.prev = node.prev : this.tail = node.prev, this.animateMap.delete(animate), this._animateCount--, animate.getStartTime() + animate.getDuration() >= this._totalDuration && this.recalculateTotalDuration());
|
|
18249
18266
|
}
|
|
18250
18267
|
recalculateTotalDuration() {
|
|
18251
|
-
this._totalDuration = 0, this.
|
|
18268
|
+
this._totalDuration = 0, this.forEachAccessAnimate(animate => {
|
|
18252
18269
|
this._totalDuration = Math.max(this._totalDuration, animate.getStartTime() + animate.getDuration());
|
|
18253
18270
|
});
|
|
18254
18271
|
}
|
|
@@ -18433,11 +18450,11 @@ class Animate {
|
|
|
18433
18450
|
return this._bounce = b, this;
|
|
18434
18451
|
}
|
|
18435
18452
|
advance(delta) {
|
|
18436
|
-
var _a;
|
|
18453
|
+
var _a, _b, _c;
|
|
18437
18454
|
if (this.status === AnimateStatus.END) return void console.warn("aaa 动画已经结束,不能推进");
|
|
18438
18455
|
const nextTime = this.currentTime + delta;
|
|
18439
18456
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
18440
|
-
if (nextTime >= this._startTime + this._totalDuration) return null === (_a = this._lastStep) || void 0 === _a || _a.onEnd(), this.onEnd(), void (this.status = AnimateStatus.END);
|
|
18457
|
+
if (nextTime >= this._startTime + this._totalDuration) return null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), void (this.status = AnimateStatus.END);
|
|
18441
18458
|
this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
18442
18459
|
let cycleTime = nextTime - this._startTime,
|
|
18443
18460
|
newLoop = !1,
|
|
@@ -18462,9 +18479,10 @@ class Animate {
|
|
|
18462
18479
|
}
|
|
18463
18480
|
}
|
|
18464
18481
|
if (!targetStep) return;
|
|
18482
|
+
targetStep !== this.lastRunStep && (null === (_c = this.lastRunStep) || void 0 === _c || _c.onEnd()), this.lastRunStep = targetStep;
|
|
18465
18483
|
const ratio = (cycleTime - targetStep.getStartTime()) / targetStep.getDuration(),
|
|
18466
18484
|
isEnd = ratio >= 1;
|
|
18467
|
-
targetStep.update(isEnd, ratio, {}), isEnd && targetStep.onEnd();
|
|
18485
|
+
targetStep.update(isEnd, ratio, {}), isEnd && (targetStep.onEnd(), this.lastRunStep = null);
|
|
18468
18486
|
}
|
|
18469
18487
|
updateDuration() {
|
|
18470
18488
|
this._lastStep ? (this._duration = this._lastStep.getStartTime() + this._lastStep.getDuration(), this._totalDuration = this._duration * (this._loopCount + 1)) : this._duration = 0;
|
|
@@ -18501,47 +18519,49 @@ class AnimateExecutor {
|
|
|
18501
18519
|
index >= 0 && this._animates.splice(index, 1), 0 === this._activeCount && this._started && (this._started = !1, this.onEnd());
|
|
18502
18520
|
});
|
|
18503
18521
|
}
|
|
18504
|
-
parseParams(params, isTimeline) {
|
|
18522
|
+
parseParams(params, isTimeline, child) {
|
|
18505
18523
|
var _a, _b;
|
|
18506
18524
|
const totalTime = this.resolveValue(params.totalTime, void 0, void 0),
|
|
18507
18525
|
startTime = this.resolveValue(params.startTime, void 0, 0),
|
|
18508
|
-
parsedParams =
|
|
18526
|
+
parsedParams = cloneDeep(params);
|
|
18509
18527
|
parsedParams.oneByOneDelay = 0, parsedParams.startTime = startTime, parsedParams.totalTime = totalTime;
|
|
18510
|
-
const oneByOne = this.resolveValue(params.oneByOne,
|
|
18528
|
+
const oneByOne = this.resolveValue(params.oneByOne, child, !1);
|
|
18511
18529
|
if (isTimeline) {
|
|
18512
18530
|
const timeSlices = parsedParams.timeSlices;
|
|
18513
18531
|
isArray(timeSlices) || (parsedParams.timeSlices = [timeSlices]);
|
|
18514
18532
|
let sliceTime = 0;
|
|
18515
18533
|
parsedParams.timeSlices.forEach(slice => {
|
|
18516
|
-
slice.delay = this.resolveValue(slice.delay,
|
|
18534
|
+
slice.delay = this.resolveValue(slice.delay, child, 0), slice.delayAfter = this.resolveValue(slice.delayAfter, child, 0), slice.duration = this.resolveValue(slice.duration, child, 300), sliceTime += slice.delay + slice.duration + slice.delayAfter;
|
|
18517
18535
|
});
|
|
18518
18536
|
let oneByOneDelay = 0,
|
|
18519
18537
|
oneByOneTime = 0;
|
|
18520
|
-
|
|
18521
|
-
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
return Array.isArray(effects) || (effects = [effects]), Object.assign(Object.assign({}, slice), {
|
|
18526
|
-
delay: slice.delay * scale,
|
|
18527
|
-
delayAfter: slice.delayAfter * scale,
|
|
18528
|
-
duration: slice.duration * scale,
|
|
18529
|
-
effects: effects.map(effect => {
|
|
18530
|
-
var _a, _b;
|
|
18531
|
-
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = effect.type) && void 0 !== _b ? _b : "fromTo"],
|
|
18532
|
-
customType = custom && isFunction(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
|
|
18533
|
-
return Object.assign(Object.assign({}, effect), {
|
|
18534
|
-
custom: custom,
|
|
18535
|
-
customType: customType
|
|
18536
|
-
});
|
|
18537
|
-
})
|
|
18538
|
-
});
|
|
18539
|
-
}), parsedParams.oneByOne = oneByOneTime * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime * scale;
|
|
18538
|
+
oneByOne && (oneByOneTime = Number(oneByOne), oneByOneDelay = oneByOneTime), parsedParams.oneByOne = oneByOneTime, parsedParams.oneByOneDelay = oneByOneDelay;
|
|
18539
|
+
let scale = 1;
|
|
18540
|
+
if (totalTime) {
|
|
18541
|
+
const _totalTime = sliceTime + oneByOneDelay * (this._target.count - 2);
|
|
18542
|
+
scale = totalTime ? totalTime / _totalTime : 1;
|
|
18540
18543
|
}
|
|
18544
|
+
parsedParams.timeSlices = parsedParams.timeSlices.map(slice => {
|
|
18545
|
+
let effects = slice.effects;
|
|
18546
|
+
return Array.isArray(effects) || (effects = [effects]), Object.assign(Object.assign({}, slice), {
|
|
18547
|
+
delay: slice.delay * scale,
|
|
18548
|
+
delayAfter: slice.delayAfter * scale,
|
|
18549
|
+
duration: slice.duration * scale,
|
|
18550
|
+
effects: effects.map(effect => {
|
|
18551
|
+
var _a, _b;
|
|
18552
|
+
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = effect.type) && void 0 !== _b ? _b : "fromTo"],
|
|
18553
|
+
customType = custom && isFunction(custom) ? /^class\s/.test(Function.prototype.toString.call(custom)) ? 1 : 2 : 0;
|
|
18554
|
+
return Object.assign(Object.assign({}, effect), {
|
|
18555
|
+
custom: custom,
|
|
18556
|
+
customType: customType
|
|
18557
|
+
});
|
|
18558
|
+
})
|
|
18559
|
+
});
|
|
18560
|
+
}), parsedParams.oneByOne = oneByOneTime * scale, parsedParams.oneByOneDelay = oneByOneDelay * scale, parsedParams.startTime = startTime * scale;
|
|
18541
18561
|
} else {
|
|
18542
|
-
const delay = this.resolveValue(params.delay,
|
|
18543
|
-
delayAfter = this.resolveValue(params.delayAfter,
|
|
18544
|
-
duration = this.resolveValue(params.duration,
|
|
18562
|
+
const delay = this.resolveValue(params.delay, child, 0),
|
|
18563
|
+
delayAfter = this.resolveValue(params.delayAfter, child, 0),
|
|
18564
|
+
duration = this.resolveValue(params.duration, child, 300);
|
|
18545
18565
|
let oneByOneDelay = 0,
|
|
18546
18566
|
oneByOneTime = 0;
|
|
18547
18567
|
oneByOne && (oneByOneTime = Number(oneByOne), oneByOneDelay = duration + oneByOneTime), parsedParams.oneByOne = oneByOneTime, parsedParams.oneByOneDelay = oneByOneDelay, parsedParams.custom = null !== (_a = params.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[null !== (_b = params.type) && void 0 !== _b ? _b : "fromTo"];
|
|
@@ -18562,20 +18582,21 @@ class AnimateExecutor {
|
|
|
18562
18582
|
const isTimeline = ("timeSlices" in params);
|
|
18563
18583
|
let filteredChildren;
|
|
18564
18584
|
isTimeline && params.partitioner && (filteredChildren = (null != filteredChildren ? filteredChildren : this._target.getChildren()).filter(child => {
|
|
18565
|
-
var _a;
|
|
18566
|
-
return params.partitioner(null === (_a = child.context) || void 0 === _a ? void 0 : _a.data, child, {});
|
|
18567
|
-
})), isTimeline && params.sort && (filteredChildren = null != filteredChildren ? filteredChildren : this._target.getChildren(), filteredChildren.sort((a, b) => {
|
|
18568
18585
|
var _a, _b;
|
|
18569
|
-
return params.
|
|
18586
|
+
return params.partitioner(null === (_b = null === (_a = child.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], child, {});
|
|
18587
|
+
})), isTimeline && params.sort && (filteredChildren = null != filteredChildren ? filteredChildren : this._target.getChildren(), filteredChildren.sort((a, b) => {
|
|
18588
|
+
var _a, _b, _c, _d;
|
|
18589
|
+
return params.sort(null === (_b = null === (_a = a.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], null === (_d = null === (_c = b.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], a, b, {});
|
|
18570
18590
|
}));
|
|
18571
|
-
const
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
animate
|
|
18578
|
-
|
|
18591
|
+
const cb = isTimeline ? (child, index, count) => {
|
|
18592
|
+
const parsedParams = this.parseParams(params, isTimeline, child),
|
|
18593
|
+
animate = this.executeTimelineItem(parsedParams, child, index, count);
|
|
18594
|
+
animate && this._trackAnimation(animate);
|
|
18595
|
+
} : (child, index, count) => {
|
|
18596
|
+
const parsedParams = this.parseParams(params, isTimeline, child),
|
|
18597
|
+
animate = this.executeTypeConfigItem(parsedParams, child, index, count);
|
|
18598
|
+
animate && this._trackAnimation(animate);
|
|
18599
|
+
};
|
|
18579
18600
|
filteredChildren ? filteredChildren.forEach((child, index) => cb(child, index, filteredChildren.length)) : this._target.count <= 1 ? cb(this._target, 0, 1) : this._target.forEachChildren((child, index) => cb(child, index, this._target.count - 1));
|
|
18580
18601
|
}
|
|
18581
18602
|
executeTypeConfigItem(params, graphic, index, count) {
|
|
@@ -18603,22 +18624,24 @@ class AnimateExecutor {
|
|
|
18603
18624
|
const delayValue = isFunction(delay) ? delay(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : delay,
|
|
18604
18625
|
datum = null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0],
|
|
18605
18626
|
indexKey = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.indexKey;
|
|
18606
|
-
datum && indexKey && (index = null !== (_f = datum[indexKey]) && void 0 !== _f ? _f : index), animate.startAt(startTime
|
|
18607
|
-
const wait = index * oneByOneDelay;
|
|
18627
|
+
datum && indexKey && (index = null !== (_f = datum[indexKey]) && void 0 !== _f ? _f : index), animate.startAt(startTime);
|
|
18628
|
+
const wait = index * oneByOneDelay + delayValue;
|
|
18608
18629
|
wait > 0 && animate.wait(wait);
|
|
18609
18630
|
let parsedFromProps = null,
|
|
18610
18631
|
props = params.to,
|
|
18611
18632
|
from = params.from;
|
|
18612
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, options, type, graphic)
|
|
18633
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
18634
|
+
let totalDelay = 0;
|
|
18635
|
+
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
18613
18636
|
const delayAfterValue = isFunction(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
18614
|
-
return delayAfterValue > 0 && animate.wait(
|
|
18637
|
+
return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
|
|
18615
18638
|
}
|
|
18616
|
-
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, options, type, graphic) {
|
|
18639
|
+
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
18617
18640
|
var _a, _b, _c, _d;
|
|
18618
18641
|
if (custom && customType) {
|
|
18619
18642
|
const customParams = this.resolveValue(customParameters, graphic, {}),
|
|
18620
18643
|
objOptions = isFunction(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
|
|
18621
|
-
customParams.options = objOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
18644
|
+
customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
18622
18645
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
18623
18646
|
}
|
|
18624
18647
|
executeTimelineItem(params, graphic, index, count) {
|
|
@@ -18653,7 +18676,7 @@ class AnimateExecutor {
|
|
|
18653
18676
|
delayAfterValue = isFunction(delayAfter) ? delayAfter(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : delayAfter;
|
|
18654
18677
|
delayValue > 0 && animate.wait(delayValue);
|
|
18655
18678
|
(Array.isArray(effects) ? effects : [effects]).forEach(effect => {
|
|
18656
|
-
var _a
|
|
18679
|
+
var _a;
|
|
18657
18680
|
const {
|
|
18658
18681
|
type = "fromTo",
|
|
18659
18682
|
channel: channel,
|
|
@@ -18666,8 +18689,8 @@ class AnimateExecutor {
|
|
|
18666
18689
|
from = effect.from;
|
|
18667
18690
|
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
18668
18691
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
18669
|
-
customType =
|
|
18670
|
-
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, options, type, graphic);
|
|
18692
|
+
customType = effect.customType;
|
|
18693
|
+
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, null, options, type, graphic);
|
|
18671
18694
|
}), delayAfterValue > 0 && animate.wait(delayAfterValue);
|
|
18672
18695
|
}
|
|
18673
18696
|
createCustomInterpolatorAnimation(animate, interpolator, props, duration, easing, customParams) {
|
|
@@ -18690,9 +18713,9 @@ class AnimateExecutor {
|
|
|
18690
18713
|
const value = null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs) || void 0 === _b ? void 0 : _b[key];
|
|
18691
18714
|
void 0 !== value && (props[key] = value);
|
|
18692
18715
|
}) : Object.keys(channel).forEach(key => {
|
|
18693
|
-
var _a, _b;
|
|
18716
|
+
var _a, _b, _c, _d;
|
|
18694
18717
|
const config = channel[key];
|
|
18695
|
-
void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data, graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (
|
|
18718
|
+
void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : from[key] = config.from);
|
|
18696
18719
|
}), {
|
|
18697
18720
|
from: from,
|
|
18698
18721
|
props: props
|
|
@@ -18702,8 +18725,8 @@ class AnimateExecutor {
|
|
|
18702
18725
|
};
|
|
18703
18726
|
}
|
|
18704
18727
|
resolveValue(value, graphic, defaultValue) {
|
|
18705
|
-
var _a;
|
|
18706
|
-
return void 0 === value ? defaultValue : "function" == typeof value && graphic ? value(null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data, graphic, {}) : value;
|
|
18728
|
+
var _a, _b;
|
|
18729
|
+
return void 0 === value ? defaultValue : "function" == typeof value && graphic ? value(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : value;
|
|
18707
18730
|
}
|
|
18708
18731
|
executeItem(params, graphic) {
|
|
18709
18732
|
let index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -31909,6 +31932,6 @@ StoryLabelItem.defaultAttributes = {
|
|
|
31909
31932
|
theme: 'default'
|
|
31910
31933
|
};
|
|
31911
31934
|
|
|
31912
|
-
const version = "1.0.0-alpha.
|
|
31935
|
+
const version = "1.0.0-alpha.5";
|
|
31913
31936
|
|
|
31914
31937
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAEvC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAEvC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.0-alpha.5\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-components",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "components library for dp visualization",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@visactor/vutils": "~0.19.5",
|
|
16
16
|
"@visactor/vscale": "~0.19.5",
|
|
17
|
-
"@visactor/vrender-core": "1.0.0-alpha.
|
|
18
|
-
"@visactor/vrender-kits": "1.0.0-alpha.
|
|
19
|
-
"@visactor/vrender-animate": "1.0.0-alpha.
|
|
17
|
+
"@visactor/vrender-core": "1.0.0-alpha.5",
|
|
18
|
+
"@visactor/vrender-kits": "1.0.0-alpha.5",
|
|
19
|
+
"@visactor/vrender-animate": "1.0.0-alpha.5"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@rushstack/eslint-patch": "~1.1.4",
|