@zcomponent/core 1.29.0 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/css/zcomponent.css +121 -122
- package/index.js +0 -3
- package/lib/actionbehavior.d.ts +3 -3
- package/lib/actionbehavior.js +20 -19
- package/lib/animation/animation.d.ts +13 -6
- package/lib/animation/animation.js +56 -43
- package/lib/animation/bezier.d.ts +6 -0
- package/lib/animation/bezier.js +8 -2
- package/lib/animation/clips/clip.d.ts +13 -1
- package/lib/animation/clips/clip.js +34 -14
- package/lib/animation/index.d.ts +4 -4
- package/lib/animation/index.js +4 -4
- package/lib/animation/layer.d.ts +9 -0
- package/lib/animation/layer.js +28 -12
- package/lib/animation/layerclip.d.ts +21 -0
- package/lib/animation/layerclip.js +82 -45
- package/lib/animation/tracks/cliptrack.d.ts +18 -0
- package/lib/animation/tracks/cliptrack.js +27 -6
- package/lib/animation/tracks/functiontrack.d.ts +9 -0
- package/lib/animation/tracks/functiontrack.js +16 -3
- package/lib/animation/tracks/propertytrack.d.ts +20 -1
- package/lib/animation/tracks/propertytrack.js +48 -11
- package/lib/animation/tracks/streamtrack.d.ts +18 -0
- package/lib/animation/tracks/streamtrack.js +32 -6
- package/lib/animation/tracks/track.d.ts +8 -2
- package/lib/animation/tracks/track.js +3 -2
- package/lib/behavior.js +13 -10
- package/lib/behaviors/ActivateState.d.ts +22 -24
- package/lib/behaviors/ActivateState.js +145 -35
- package/lib/behaviors/CallFunction.d.ts +2 -4
- package/lib/behaviors/CallFunction.js +69 -11
- package/lib/behaviors/ChangeRootScene.d.ts +35 -0
- package/lib/behaviors/ChangeRootScene.js +123 -0
- package/lib/behaviors/ConsoleLog.d.ts +6 -5
- package/lib/behaviors/ConsoleLog.js +95 -12
- package/lib/behaviors/DownloadSnapshot.d.ts +7 -12
- package/lib/behaviors/DownloadSnapshot.js +70 -19
- package/lib/behaviors/EmitComponentPropEvent.d.ts +1 -3
- package/lib/behaviors/EmitComponentPropEvent.js +80 -12
- package/lib/behaviors/LaunchURL.d.ts +5 -5
- package/lib/behaviors/LaunchURL.js +92 -10
- package/lib/behaviors/LogAnalyticsEvent.d.ts +10 -4
- package/lib/behaviors/LogAnalyticsEvent.js +88 -7
- package/lib/behaviors/PauseLayerClip.d.ts +7 -9
- package/lib/behaviors/PauseLayerClip.js +89 -21
- package/lib/behaviors/PlayLayerClip.d.ts +35 -32
- package/lib/behaviors/PlayLayerClip.js +202 -48
- package/lib/behaviors/PlaySound.d.ts +19 -25
- package/lib/behaviors/PlaySound.js +122 -28
- package/lib/behaviors/SetLayerOff.d.ts +7 -9
- package/lib/behaviors/SetLayerOff.js +88 -21
- package/lib/behaviors/ShareSnapshot.d.ts +5 -9
- package/lib/behaviors/ShareSnapshot.js +70 -17
- package/lib/behaviors/ShowTextAlert.d.ts +16 -29
- package/lib/behaviors/ShowTextAlert.js +116 -48
- package/lib/behaviors/TakeSnapshot.d.ts +22 -26
- package/lib/behaviors/TakeSnapshot.js +131 -56
- package/lib/behaviors/ToggleLayerClips.d.ts +45 -62
- package/lib/behaviors/ToggleLayerClips.js +233 -64
- package/lib/behaviors/stream/PauseStream.d.ts +5 -16
- package/lib/behaviors/stream/PauseStream.js +94 -34
- package/lib/behaviors/stream/PlayStream.d.ts +14 -27
- package/lib/behaviors/stream/PlayStream.js +123 -34
- package/lib/behaviors/stream/SeekStream.d.ts +8 -18
- package/lib/behaviors/stream/SeekStream.js +97 -31
- package/lib/behaviors/stream/StopStream.d.ts +6 -15
- package/lib/behaviors/stream/StopStream.js +89 -27
- package/lib/component.d.ts +36 -13
- package/lib/component.js +237 -151
- package/lib/components/AnimatedLoader.d.ts +51 -0
- package/lib/components/AnimatedLoader.js +159 -0
- package/lib/components/Audio.d.ts +35 -37
- package/lib/components/Audio.js +264 -151
- package/lib/components/AudioLayerSettings.d.ts +13 -11
- package/lib/components/AudioLayerSettings.js +76 -18
- package/lib/components/Children.d.ts +2 -1
- package/lib/components/Children.js +66 -13
- package/lib/components/ConditionalConstruct.d.ts +44 -0
- package/lib/components/ConditionalConstruct.js +142 -0
- package/lib/components/DefaultCookieConsent.d.ts +53 -73
- package/lib/components/DefaultCookieConsent.js +382 -264
- package/lib/components/DefaultLoader.d.ts +40 -28
- package/lib/components/DefaultLoader.js +198 -46
- package/lib/components/Gamepad.d.ts +5 -26
- package/lib/components/Gamepad.js +201 -65
- package/lib/components/LoaderScope.d.ts +15 -0
- package/lib/components/LoaderScope.js +71 -0
- package/lib/components/LongLoad.d.ts +11 -15
- package/lib/components/LongLoad.js +89 -34
- package/lib/components/SnapshotUI.d.ts +19 -24
- package/lib/components/SnapshotUI.js +202 -105
- package/lib/context.d.ts +23 -5
- package/lib/context.js +12 -6
- package/lib/contexts/analyticscontext.d.ts +12 -2
- package/lib/contexts/analyticscontext.js +68 -10
- package/lib/contexts/audiocontextcontext.d.ts +1 -1
- package/lib/contexts/audiocontextcontext.js +9 -8
- package/lib/contexts/canvascontext.d.ts +32 -18
- package/lib/contexts/canvascontext.js +195 -120
- package/lib/contexts/cookieconsentcontext.d.ts +38 -28
- package/lib/contexts/cookieconsentcontext.js +35 -32
- package/lib/contexts/documentflagmanager.js +15 -11
- package/lib/contexts/environmentcontext.d.ts +22 -6
- package/lib/contexts/environmentcontext.js +135 -21
- package/lib/contexts/gamepadcontext.d.ts +29 -26
- package/lib/contexts/gamepadcontext.js +46 -46
- package/lib/contexts/gesturecontext.d.ts +31 -6
- package/lib/contexts/gesturecontext.js +110 -85
- package/lib/contexts/globaltagcontext.d.ts +1 -1
- package/lib/contexts/globaltagcontext.js +8 -11
- package/lib/contexts/loadcontext.d.ts +45 -8
- package/lib/contexts/loadcontext.js +232 -82
- package/lib/contexts/orientationcontext.d.ts +13 -15
- package/lib/contexts/orientationcontext.js +150 -67
- package/lib/contexts/rootcomponentscontext.d.ts +16 -0
- package/lib/contexts/rootcomponentscontext.js +65 -0
- package/lib/contexts/snapshotContext.d.ts +0 -3
- package/lib/contexts/snapshotContext.js +78 -23
- package/lib/contexts/tagcontext.d.ts +5 -5
- package/lib/contexts/tagcontext.js +16 -16
- package/lib/contexts/textalertcontext.d.ts +1 -5
- package/lib/contexts/textalertcontext.js +1 -5
- package/lib/contexts/usereventcontext.d.ts +1 -1
- package/lib/contexts/usereventcontext.js +12 -12
- package/lib/data/animation.d.ts +10 -2
- package/lib/data/change.d.ts +1 -1
- package/lib/data/change.js +7 -0
- package/lib/data/core.d.ts +9 -1
- package/lib/data/index.d.ts +1 -1
- package/lib/data/index.js +1 -1
- package/lib/decorators.d.ts +348 -0
- package/lib/decorators.js +239 -0
- package/lib/decoratorutils.d.ts +3 -0
- package/lib/decoratorutils.js +8 -0
- package/lib/emitter.d.ts +15 -2
- package/lib/emitter.js +15 -6
- package/lib/entity.d.ts +43 -25
- package/lib/entity.js +104 -71
- package/lib/event.d.ts +2 -1
- package/lib/event.js +1 -4
- package/lib/groups.d.ts +18 -0
- package/lib/groups.js +19 -0
- package/lib/icons.d.ts +3372 -0
- package/lib/icons.js +1 -0
- package/lib/index.d.ts +18 -13
- package/lib/index.js +17 -13
- package/lib/inflate.d.ts +7 -7
- package/lib/inflate.js +5 -5
- package/lib/observable.d.ts +9 -2
- package/lib/observable.js +5 -4
- package/lib/observe.d.ts +18 -0
- package/lib/observe.js +177 -0
- package/lib/profile.d.ts +9 -5
- package/lib/profile.js +27 -17
- package/lib/selectors.d.ts +1 -1
- package/lib/selectors.js +5 -4
- package/lib/types.d.ts +161 -19
- package/lib/types.js +22 -1
- package/lib/values/values.d.ts +7 -8
- package/lib/values/values.js +1 -2
- package/lib/values/valuesmutator.d.ts +4 -1
- package/lib/values/valuesmutator.js +10 -8
- package/lib/zcomponent.d.ts +21 -10
- package/lib/zcomponent.js +717 -540
- package/package.json +22 -5
- package/lib/behaviors/ChangeCursor.d.ts +0 -39
- package/lib/behaviors/ChangeCursor.js +0 -44
|
@@ -1,78 +1,247 @@
|
|
|
1
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
+
var useValue = arguments.length > 2;
|
|
3
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
+
}
|
|
6
|
+
return useValue ? value : void 0;
|
|
7
|
+
};
|
|
8
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
+
var _, done = false;
|
|
14
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
+
var context = {};
|
|
16
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
+
if (kind === "accessor") {
|
|
21
|
+
if (result === void 0) continue;
|
|
22
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
+
}
|
|
27
|
+
else if (_ = accept(result)) {
|
|
28
|
+
if (kind === "field") initializers.unshift(_);
|
|
29
|
+
else descriptor[key] = _;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
+
done = true;
|
|
34
|
+
};
|
|
1
35
|
import { ActionBehavior } from '../actionbehavior';
|
|
2
|
-
import {
|
|
36
|
+
import { zBehavior, zUI } from '../decorators';
|
|
37
|
+
import { BehaviorGroups } from '../groups';
|
|
38
|
+
const playSettingsGroup = {
|
|
39
|
+
name: 'Play Settings',
|
|
40
|
+
priority: 20,
|
|
41
|
+
};
|
|
42
|
+
const overrideFadeGroup = {
|
|
43
|
+
name: 'Override Fade',
|
|
44
|
+
priority: 10,
|
|
45
|
+
};
|
|
3
46
|
/**
|
|
4
47
|
* Toggles between two layer clips.
|
|
5
48
|
* @zbehavior
|
|
6
49
|
* @zicon play_circle
|
|
7
50
|
* @zgroup Animation Actions
|
|
8
51
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
52
|
+
let ToggleLayerClips = (() => {
|
|
53
|
+
let _classDecorators = [zBehavior({ icon: 'play_circle', group: BehaviorGroups.AnimationActions, runAtDesignTime: true })];
|
|
54
|
+
let _classDescriptor;
|
|
55
|
+
let _classExtraInitializers = [];
|
|
56
|
+
let _classThis;
|
|
57
|
+
let _classSuper = ActionBehavior;
|
|
58
|
+
let _instanceExtraInitializers = [];
|
|
59
|
+
let _layerClipA_decorators;
|
|
60
|
+
let _layerClipA_initializers = [];
|
|
61
|
+
let _layerClipA_extraInitializers = [];
|
|
62
|
+
let _layerOffA_decorators;
|
|
63
|
+
let _layerOffA_initializers = [];
|
|
64
|
+
let _layerOffA_extraInitializers = [];
|
|
65
|
+
let _layerClipB_decorators;
|
|
66
|
+
let _layerClipB_initializers = [];
|
|
67
|
+
let _layerClipB_extraInitializers = [];
|
|
68
|
+
let _layerOffB_decorators;
|
|
69
|
+
let _layerOffB_initializers = [];
|
|
70
|
+
let _layerOffB_extraInitializers = [];
|
|
71
|
+
let _loop_decorators;
|
|
72
|
+
let _loop_initializers = [];
|
|
73
|
+
let _loop_extraInitializers = [];
|
|
74
|
+
let _speed_decorators;
|
|
75
|
+
let _speed_initializers = [];
|
|
76
|
+
let _speed_extraInitializers = [];
|
|
77
|
+
let _queue_decorators;
|
|
78
|
+
let _queue_initializers = [];
|
|
79
|
+
let _queue_extraInitializers = [];
|
|
80
|
+
let _fromStart_decorators;
|
|
81
|
+
let _fromStart_initializers = [];
|
|
82
|
+
let _fromStart_extraInitializers = [];
|
|
83
|
+
let _fadeTime_decorators;
|
|
84
|
+
let _fadeTime_initializers = [];
|
|
85
|
+
let _fadeTime_extraInitializers = [];
|
|
86
|
+
let _pin_decorators;
|
|
87
|
+
let _pin_initializers = [];
|
|
88
|
+
let _pin_extraInitializers = [];
|
|
89
|
+
let _easing_decorators;
|
|
90
|
+
let _easing_initializers = [];
|
|
91
|
+
let _easing_extraInitializers = [];
|
|
92
|
+
let _perform_decorators;
|
|
93
|
+
let _preview_decorators;
|
|
94
|
+
var ToggleLayerClips = class extends _classSuper {
|
|
95
|
+
static { _classThis = this; }
|
|
96
|
+
static {
|
|
97
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
98
|
+
_layerClipA_decorators = [zUI({ values: 'layerclipids' })];
|
|
99
|
+
_layerOffA_decorators = [zUI({ values: 'layerids' })];
|
|
100
|
+
_layerClipB_decorators = [zUI({ values: 'layerclipids' })];
|
|
101
|
+
_layerOffB_decorators = [zUI({ values: 'layerids' })];
|
|
102
|
+
_loop_decorators = [zUI(playSettingsGroup)];
|
|
103
|
+
_speed_decorators = [zUI(playSettingsGroup)];
|
|
104
|
+
_queue_decorators = [zUI(playSettingsGroup)];
|
|
105
|
+
_fromStart_decorators = [zUI(playSettingsGroup)];
|
|
106
|
+
_fadeTime_decorators = [zUI({ ...overrideFadeGroup, type: 'time-milliseconds' })];
|
|
107
|
+
_pin_decorators = [zUI(overrideFadeGroup)];
|
|
108
|
+
_easing_decorators = [zUI({ ...overrideFadeGroup, values: 'easings' })];
|
|
109
|
+
_perform_decorators = [zUI()];
|
|
110
|
+
_preview_decorators = [zUI()];
|
|
111
|
+
__esDecorate(this, null, _perform_decorators, { kind: "method", name: "perform", static: false, private: false, access: { has: obj => "perform" in obj, get: obj => obj.perform }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
112
|
+
__esDecorate(this, null, _preview_decorators, { kind: "method", name: "preview", static: false, private: false, access: { has: obj => "preview" in obj, get: obj => obj.preview }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
113
|
+
__esDecorate(null, null, _layerClipA_decorators, { kind: "field", name: "layerClipA", static: false, private: false, access: { has: obj => "layerClipA" in obj, get: obj => obj.layerClipA, set: (obj, value) => { obj.layerClipA = value; } }, metadata: _metadata }, _layerClipA_initializers, _layerClipA_extraInitializers);
|
|
114
|
+
__esDecorate(null, null, _layerOffA_decorators, { kind: "field", name: "layerOffA", static: false, private: false, access: { has: obj => "layerOffA" in obj, get: obj => obj.layerOffA, set: (obj, value) => { obj.layerOffA = value; } }, metadata: _metadata }, _layerOffA_initializers, _layerOffA_extraInitializers);
|
|
115
|
+
__esDecorate(null, null, _layerClipB_decorators, { kind: "field", name: "layerClipB", static: false, private: false, access: { has: obj => "layerClipB" in obj, get: obj => obj.layerClipB, set: (obj, value) => { obj.layerClipB = value; } }, metadata: _metadata }, _layerClipB_initializers, _layerClipB_extraInitializers);
|
|
116
|
+
__esDecorate(null, null, _layerOffB_decorators, { kind: "field", name: "layerOffB", static: false, private: false, access: { has: obj => "layerOffB" in obj, get: obj => obj.layerOffB, set: (obj, value) => { obj.layerOffB = value; } }, metadata: _metadata }, _layerOffB_initializers, _layerOffB_extraInitializers);
|
|
117
|
+
__esDecorate(null, null, _loop_decorators, { kind: "field", name: "loop", static: false, private: false, access: { has: obj => "loop" in obj, get: obj => obj.loop, set: (obj, value) => { obj.loop = value; } }, metadata: _metadata }, _loop_initializers, _loop_extraInitializers);
|
|
118
|
+
__esDecorate(null, null, _speed_decorators, { kind: "field", name: "speed", static: false, private: false, access: { has: obj => "speed" in obj, get: obj => obj.speed, set: (obj, value) => { obj.speed = value; } }, metadata: _metadata }, _speed_initializers, _speed_extraInitializers);
|
|
119
|
+
__esDecorate(null, null, _queue_decorators, { kind: "field", name: "queue", static: false, private: false, access: { has: obj => "queue" in obj, get: obj => obj.queue, set: (obj, value) => { obj.queue = value; } }, metadata: _metadata }, _queue_initializers, _queue_extraInitializers);
|
|
120
|
+
__esDecorate(null, null, _fromStart_decorators, { kind: "field", name: "fromStart", static: false, private: false, access: { has: obj => "fromStart" in obj, get: obj => obj.fromStart, set: (obj, value) => { obj.fromStart = value; } }, metadata: _metadata }, _fromStart_initializers, _fromStart_extraInitializers);
|
|
121
|
+
__esDecorate(null, null, _fadeTime_decorators, { kind: "field", name: "fadeTime", static: false, private: false, access: { has: obj => "fadeTime" in obj, get: obj => obj.fadeTime, set: (obj, value) => { obj.fadeTime = value; } }, metadata: _metadata }, _fadeTime_initializers, _fadeTime_extraInitializers);
|
|
122
|
+
__esDecorate(null, null, _pin_decorators, { kind: "field", name: "pin", static: false, private: false, access: { has: obj => "pin" in obj, get: obj => obj.pin, set: (obj, value) => { obj.pin = value; } }, metadata: _metadata }, _pin_initializers, _pin_extraInitializers);
|
|
123
|
+
__esDecorate(null, null, _easing_decorators, { kind: "field", name: "easing", static: false, private: false, access: { has: obj => "easing" in obj, get: obj => obj.easing, set: (obj, value) => { obj.easing = value; } }, metadata: _metadata }, _easing_initializers, _easing_extraInitializers);
|
|
124
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
125
|
+
ToggleLayerClips = _classThis = _classDescriptor.value;
|
|
126
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
127
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
128
|
+
}
|
|
129
|
+
zcomponent = (__runInitializers(this, _instanceExtraInitializers), this.getZComponentInstance());
|
|
13
130
|
/**
|
|
14
|
-
* @
|
|
15
|
-
* @zgroup Play Settings
|
|
16
|
-
* @zgrouppriority 20
|
|
17
|
-
* @zdefault false
|
|
131
|
+
* @default true
|
|
18
132
|
*/
|
|
19
|
-
|
|
133
|
+
isA = true;
|
|
20
134
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @zprop
|
|
24
|
-
* @zgroup Play Settings
|
|
25
|
-
* @zgrouppriority 20
|
|
26
|
-
* @zdefault false
|
|
135
|
+
* @zui
|
|
136
|
+
* @zvalues layerclipids
|
|
27
137
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
138
|
+
layerClipA = __runInitializers(this, _layerClipA_initializers, void 0);
|
|
139
|
+
/**
|
|
140
|
+
* @zui
|
|
141
|
+
* @zvalues layerids
|
|
142
|
+
*/
|
|
143
|
+
layerOffA = (__runInitializers(this, _layerClipA_extraInitializers), __runInitializers(this, _layerOffA_initializers, void 0));
|
|
144
|
+
/**
|
|
145
|
+
* @zui
|
|
146
|
+
* @zvalues layerclipids
|
|
147
|
+
*/
|
|
148
|
+
layerClipB = (__runInitializers(this, _layerOffA_extraInitializers), __runInitializers(this, _layerClipB_initializers, void 0));
|
|
149
|
+
/**
|
|
150
|
+
* @zui
|
|
151
|
+
* @zvalues layerids
|
|
152
|
+
*/
|
|
153
|
+
layerOffB = (__runInitializers(this, _layerClipB_extraInitializers), __runInitializers(this, _layerOffB_initializers, void 0));
|
|
154
|
+
/**
|
|
155
|
+
* @default false
|
|
156
|
+
* @zui
|
|
157
|
+
*/
|
|
158
|
+
loop = (__runInitializers(this, _layerOffB_extraInitializers), __runInitializers(this, _loop_initializers, false));
|
|
159
|
+
/**
|
|
160
|
+
* @default 1
|
|
161
|
+
* @zui
|
|
162
|
+
*/
|
|
163
|
+
speed = (__runInitializers(this, _loop_extraInitializers), __runInitializers(this, _speed_initializers, 1));
|
|
164
|
+
/**
|
|
165
|
+
* @default false
|
|
166
|
+
* @zui
|
|
167
|
+
*/
|
|
168
|
+
queue = (__runInitializers(this, _speed_extraInitializers), __runInitializers(this, _queue_initializers, false));
|
|
169
|
+
/**
|
|
170
|
+
* Seek the clip to the start before playing.
|
|
171
|
+
* @default false
|
|
172
|
+
* @zui
|
|
173
|
+
*/
|
|
174
|
+
fromStart = (__runInitializers(this, _queue_extraInitializers), __runInitializers(this, _fromStart_initializers, false));
|
|
175
|
+
/**
|
|
176
|
+
* @zui
|
|
177
|
+
* @ztype time-milliseconds
|
|
178
|
+
*/
|
|
179
|
+
fadeTime = (__runInitializers(this, _fromStart_extraInitializers), __runInitializers(this, _fadeTime_initializers, void 0));
|
|
180
|
+
/**
|
|
181
|
+
* @zui
|
|
182
|
+
*/
|
|
183
|
+
pin = (__runInitializers(this, _fadeTime_extraInitializers), __runInitializers(this, _pin_initializers, void 0));
|
|
184
|
+
/**
|
|
185
|
+
* @default "linear"
|
|
186
|
+
* @zui
|
|
187
|
+
* @zvalues easings
|
|
188
|
+
*/
|
|
189
|
+
easing = (__runInitializers(this, _pin_extraInitializers), __runInitializers(this, _easing_initializers, 'linear'));
|
|
190
|
+
/**
|
|
191
|
+
* @zui
|
|
192
|
+
*/
|
|
193
|
+
perform() {
|
|
194
|
+
this.isA = !this.isA;
|
|
195
|
+
const opts = {
|
|
196
|
+
loop: this.loop,
|
|
197
|
+
speed: this.speed,
|
|
198
|
+
fade: {
|
|
199
|
+
time: this.fadeTime,
|
|
200
|
+
pin: this.pin,
|
|
201
|
+
easing: this.easing,
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
const layerID = this.isA ? this.layerOffA : this.layerOffB;
|
|
205
|
+
const layerClipID = this.isA ? this.layerClipA : this.layerClipB;
|
|
206
|
+
if (layerID) {
|
|
207
|
+
const layer = this.zcomponent.animation.layerByID.get(layerID);
|
|
208
|
+
if (!layer)
|
|
209
|
+
return;
|
|
210
|
+
if (this.queue ?? false)
|
|
211
|
+
layer.queue(null, opts);
|
|
212
|
+
else
|
|
213
|
+
layer.setActive(null, opts);
|
|
48
214
|
return;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
215
|
+
}
|
|
216
|
+
if (layerClipID) {
|
|
217
|
+
const layerclip = this.zcomponent.animation.layerClipByID.get(layerClipID);
|
|
218
|
+
if (!layerclip)
|
|
219
|
+
return;
|
|
220
|
+
if (this.fromStart ?? false)
|
|
221
|
+
layerclip.seek(0, { dontActivateLayer: true });
|
|
222
|
+
if (this.queue ?? false)
|
|
223
|
+
layerclip.queue(opts);
|
|
224
|
+
else
|
|
225
|
+
layerclip.play(opts);
|
|
226
|
+
}
|
|
54
227
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
layerclip.seek(0, { dontActivateLayer: true });
|
|
61
|
-
if (this.queue ?? false)
|
|
62
|
-
layerclip.queue(opts);
|
|
63
|
-
else
|
|
64
|
-
layerclip.play(opts);
|
|
228
|
+
/**
|
|
229
|
+
* @zui
|
|
230
|
+
*/
|
|
231
|
+
preview() {
|
|
232
|
+
this.perform();
|
|
65
233
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
234
|
+
constructor() {
|
|
235
|
+
super(...arguments);
|
|
236
|
+
__runInitializers(this, _easing_extraInitializers);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
return ToggleLayerClips = _classThis;
|
|
240
|
+
})();
|
|
241
|
+
export { ToggleLayerClips };
|
|
242
|
+
export const Pin = {
|
|
243
|
+
Start: 0,
|
|
244
|
+
Middle: 0.5,
|
|
245
|
+
End: 1,
|
|
246
|
+
};
|
|
247
|
+
Object.freeze(Pin);
|
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
import { ActionBehavior
|
|
2
|
-
import { Component } from '../../component';
|
|
3
|
-
import { ContextManager } from '../../context';
|
|
1
|
+
import { ActionBehavior } from '../../actionbehavior';
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
3
|
+
* Behavior to pause a specific stream.
|
|
6
4
|
* @zbehavior
|
|
7
5
|
* @zicon pause_circle
|
|
8
6
|
* @zgroup Stream Actions
|
|
9
7
|
*/
|
|
10
8
|
export declare class PauseStream extends ActionBehavior {
|
|
11
|
-
private zcomponent;
|
|
9
|
+
private readonly zcomponent;
|
|
12
10
|
/**
|
|
13
11
|
* The ID of the stream to be paused.
|
|
14
|
-
* @
|
|
12
|
+
* @zui
|
|
15
13
|
* @zgroup Pause Settings
|
|
16
|
-
* @zgrouppriority 20
|
|
17
14
|
* @zvalues streamids
|
|
18
15
|
*/
|
|
19
|
-
stream
|
|
20
|
-
/**
|
|
21
|
-
* Creates an instance of PauseStream.
|
|
22
|
-
* @param contextManager
|
|
23
|
-
* @param instance
|
|
24
|
-
* @param props
|
|
25
|
-
*/
|
|
26
|
-
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
16
|
+
stream?: string;
|
|
27
17
|
/**
|
|
28
18
|
* Executes the action to pause the stream.
|
|
29
19
|
*/
|
|
30
20
|
perform(): void;
|
|
31
21
|
/**
|
|
32
22
|
* Provides a preview of the pause action within the UI.
|
|
33
|
-
* @zprop
|
|
34
23
|
* @zui
|
|
35
24
|
*/
|
|
36
25
|
preview(): void;
|
|
@@ -1,40 +1,100 @@
|
|
|
1
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
+
var useValue = arguments.length > 2;
|
|
3
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
+
}
|
|
6
|
+
return useValue ? value : void 0;
|
|
7
|
+
};
|
|
8
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
+
var _, done = false;
|
|
14
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
+
var context = {};
|
|
16
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
+
if (kind === "accessor") {
|
|
21
|
+
if (result === void 0) continue;
|
|
22
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
+
}
|
|
27
|
+
else if (_ = accept(result)) {
|
|
28
|
+
if (kind === "field") initializers.unshift(_);
|
|
29
|
+
else descriptor[key] = _;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
+
done = true;
|
|
34
|
+
};
|
|
35
|
+
import { zBehavior, zUI } from '../../decorators';
|
|
1
36
|
import { ActionBehavior } from '../../actionbehavior';
|
|
2
|
-
import { registerBehaviorRunAtDesignTime } from '../../behavior';
|
|
3
37
|
/**
|
|
4
|
-
*
|
|
38
|
+
* Behavior to pause a specific stream.
|
|
5
39
|
* @zbehavior
|
|
6
40
|
* @zicon pause_circle
|
|
7
41
|
* @zgroup Stream Actions
|
|
8
42
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
let PauseStream = (() => {
|
|
44
|
+
let _classDecorators = [zBehavior({ icon: 'pause_circle', group: 'Stream Actions', runAtDesignTime: true })];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = ActionBehavior;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _stream_decorators;
|
|
51
|
+
let _stream_initializers = [];
|
|
52
|
+
let _stream_extraInitializers = [];
|
|
53
|
+
let _preview_decorators;
|
|
54
|
+
var PauseStream = class extends _classSuper {
|
|
55
|
+
static { _classThis = this; }
|
|
56
|
+
static {
|
|
57
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
58
|
+
_stream_decorators = [zUI({ values: 'streamids', priority: 20, group: 'Pause Settings' })];
|
|
59
|
+
_preview_decorators = [zUI()];
|
|
60
|
+
__esDecorate(this, null, _preview_decorators, { kind: "method", name: "preview", static: false, private: false, access: { has: obj => "preview" in obj, get: obj => obj.preview }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
61
|
+
__esDecorate(null, null, _stream_decorators, { kind: "field", name: "stream", static: false, private: false, access: { has: obj => "stream" in obj, get: obj => obj.stream, set: (obj, value) => { obj.stream = value; } }, metadata: _metadata }, _stream_initializers, _stream_extraInitializers);
|
|
62
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
63
|
+
PauseStream = _classThis = _classDescriptor.value;
|
|
64
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
65
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
66
|
+
}
|
|
67
|
+
zcomponent = (__runInitializers(this, _instanceExtraInitializers), this.getZComponentInstance());
|
|
68
|
+
/**
|
|
69
|
+
* The ID of the stream to be paused.
|
|
70
|
+
* @zui
|
|
71
|
+
* @zgroup Pause Settings
|
|
72
|
+
* @zvalues streamids
|
|
73
|
+
*/
|
|
74
|
+
stream = __runInitializers(this, _stream_initializers, void 0);
|
|
75
|
+
/**
|
|
76
|
+
* Executes the action to pause the stream.
|
|
77
|
+
*/
|
|
78
|
+
perform() {
|
|
79
|
+
if (!this.stream)
|
|
80
|
+
return;
|
|
81
|
+
const stream = this.zcomponent.resolveStreamID(this.stream);
|
|
82
|
+
if (!stream)
|
|
83
|
+
return;
|
|
84
|
+
stream.pause();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Provides a preview of the pause action within the UI.
|
|
88
|
+
* @zui
|
|
89
|
+
*/
|
|
90
|
+
preview() {
|
|
91
|
+
this.perform();
|
|
92
|
+
}
|
|
93
|
+
constructor() {
|
|
94
|
+
super(...arguments);
|
|
95
|
+
__runInitializers(this, _stream_extraInitializers);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return PauseStream = _classThis;
|
|
99
|
+
})();
|
|
100
|
+
export { PauseStream };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ActionBehavior
|
|
2
|
-
import { Component } from '../../component';
|
|
3
|
-
import { ContextManager } from '../../context';
|
|
1
|
+
import { ActionBehavior } from '../../actionbehavior';
|
|
4
2
|
/**
|
|
5
3
|
* Behavior to play a specified stream.
|
|
6
4
|
* @zbehavior
|
|
@@ -8,49 +6,38 @@ import { ContextManager } from '../../context';
|
|
|
8
6
|
* @zgroup Stream Actions
|
|
9
7
|
*/
|
|
10
8
|
export declare class PlayStream extends ActionBehavior {
|
|
11
|
-
private zcomponent;
|
|
9
|
+
private readonly zcomponent;
|
|
12
10
|
/**
|
|
13
11
|
* The ID of the stream to be played.
|
|
14
|
-
* @
|
|
12
|
+
* @zui
|
|
15
13
|
* @zgroup Play Settings
|
|
16
|
-
* @zgrouppriority 20
|
|
17
14
|
* @zvalues streamids
|
|
18
15
|
*/
|
|
19
|
-
stream
|
|
16
|
+
stream?: string;
|
|
20
17
|
/**
|
|
21
18
|
* Whether the stream should loop.
|
|
22
|
-
* @
|
|
19
|
+
* @default false
|
|
20
|
+
* @zui
|
|
23
21
|
* @zgroup Play Settings
|
|
24
|
-
* @zgrouppriority 20
|
|
25
|
-
* @zdefault false
|
|
26
22
|
*/
|
|
27
|
-
loop
|
|
23
|
+
loop: boolean;
|
|
28
24
|
/**
|
|
29
25
|
* The playback speed of the stream.
|
|
30
|
-
* @
|
|
26
|
+
* @default 1
|
|
27
|
+
* @zui
|
|
31
28
|
* @zgroup Play Settings
|
|
32
|
-
* @zgrouppriority 20
|
|
33
|
-
* @zdefault 1
|
|
34
29
|
*/
|
|
35
|
-
speed
|
|
30
|
+
speed: number;
|
|
36
31
|
/**
|
|
37
32
|
* Whether to seek the stream to the start before playing.
|
|
38
|
-
*
|
|
39
|
-
* @
|
|
33
|
+
* @default false
|
|
34
|
+
* @zui
|
|
40
35
|
* @zgroup Play Settings
|
|
41
|
-
* @zgrouppriority 20
|
|
42
|
-
* @zdefault false
|
|
43
36
|
*/
|
|
44
37
|
fromStart: boolean;
|
|
38
|
+
perform(): void;
|
|
45
39
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @param contextManager - The current ContextManager
|
|
48
|
-
* @param instance - The instance of the component that this behavior is attached to
|
|
49
|
-
* @param props - The constructor properties.
|
|
40
|
+
* @zui
|
|
50
41
|
*/
|
|
51
|
-
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
52
|
-
/** @zprop */
|
|
53
|
-
perform(): void;
|
|
54
|
-
/** @zui */
|
|
55
42
|
preview(): void;
|
|
56
43
|
}
|