eligius 1.0.11 → 1.0.13
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/dist/eligius.cjs.development.js +78 -16
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +78 -17
- package/dist/eligius.esm.js.map +1 -1
- package/dist/operation/end-action.d.ts +4 -0
- package/dist/operation/helper/globals.d.ts +3 -0
- package/dist/operation/index.d.ts +1 -0
- package/dist/operation/metadata/index.d.ts +1 -0
- package/dist/operation/metadata/set-global-data.d.ts +4 -0
- package/dist/operation/set-global-data.d.ts +11 -0
- package/dist/timelineproviders/request-animation-frame-timeline-provider.d.ts +1 -0
- package/package.json +5 -5
- package/dist/operation/helper/get-globals.d.ts +0 -1
package/dist/eligius.esm.js
CHANGED
|
@@ -3310,6 +3310,24 @@ function removeEventDataFromOperationData(operationData) {
|
|
|
3310
3310
|
delete operationData.eventArgs;
|
|
3311
3311
|
}
|
|
3312
3312
|
|
|
3313
|
+
var cache$1 = {};
|
|
3314
|
+
|
|
3315
|
+
function _getGlobals(cache, name) {
|
|
3316
|
+
var value = name ? cache[name] : cache;
|
|
3317
|
+
return value && value !== cache ? deepCopy(value) : value;
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
function _setGlobals(cache, newValues) {
|
|
3321
|
+
Object.entries(newValues).forEach(function (_ref) {
|
|
3322
|
+
var name = _ref[0],
|
|
3323
|
+
value = _ref[1];
|
|
3324
|
+
return cache[name] = value;
|
|
3325
|
+
});
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
var getGlobals = /*#__PURE__*/_getGlobals.bind(null, cache$1);
|
|
3329
|
+
var setGlobals = /*#__PURE__*/_setGlobals.bind(null, cache$1);
|
|
3330
|
+
|
|
3313
3331
|
function extractOperationDataArgumentValues(sourceObject, argumentValue) {
|
|
3314
3332
|
if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('operationdata.')) {
|
|
3315
3333
|
var propNames = argumentValue.split('.');
|
|
@@ -3317,6 +3335,14 @@ function extractOperationDataArgumentValues(sourceObject, argumentValue) {
|
|
|
3317
3335
|
return getNestedValue(propNames, sourceObject);
|
|
3318
3336
|
}
|
|
3319
3337
|
|
|
3338
|
+
if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('globaldata.')) {
|
|
3339
|
+
var _propNames = argumentValue.split('.');
|
|
3340
|
+
|
|
3341
|
+
_propNames.shift();
|
|
3342
|
+
|
|
3343
|
+
return getNestedValue(_propNames, getGlobals());
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3320
3346
|
return argumentValue;
|
|
3321
3347
|
}
|
|
3322
3348
|
|
|
@@ -3516,6 +3542,10 @@ var customFunction$1 = function customFunction(operationData) {
|
|
|
3516
3542
|
/**
|
|
3517
3543
|
* This operation invokes the end() method on the specified action instance.
|
|
3518
3544
|
*
|
|
3545
|
+
* The action operation data is first merged with the current operation data before it is
|
|
3546
|
+
* passed on to the action. After the action has completed the action operation data properties
|
|
3547
|
+
* are removed from the current operation data.
|
|
3548
|
+
*
|
|
3519
3549
|
* @param operationData
|
|
3520
3550
|
* @returns
|
|
3521
3551
|
*/
|
|
@@ -3858,22 +3888,10 @@ var getImport$1 = function getImport(operationData) {
|
|
|
3858
3888
|
var getQueryParams$1 = function getQueryParams(operationData) {
|
|
3859
3889
|
var searchParams = new URLSearchParams(window.location.search);
|
|
3860
3890
|
var queryParams = Object.fromEntries(searchParams.entries());
|
|
3861
|
-
var
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
var name = _ref[0];
|
|
3866
|
-
return !(name in queryParams);
|
|
3867
|
-
});
|
|
3868
|
-
defaultEntries.forEach(function (_ref2) {
|
|
3869
|
-
var name = _ref2[0],
|
|
3870
|
-
value = _ref2[1];
|
|
3871
|
-
return queryParams[name] = value;
|
|
3872
|
-
});
|
|
3873
|
-
delete operationData.defaultValues;
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
|
-
operationData.queryParams = queryParams;
|
|
3891
|
+
var _operationData$defaul = operationData.defaultValues,
|
|
3892
|
+
defaultValues = _operationData$defaul === void 0 ? {} : _operationData$defaul;
|
|
3893
|
+
delete operationData.defaultValues;
|
|
3894
|
+
operationData.queryParams = _extends({}, defaultValues, queryParams);
|
|
3877
3895
|
return operationData;
|
|
3878
3896
|
};
|
|
3879
3897
|
|
|
@@ -4214,6 +4232,24 @@ var setElementContent$1 = function setElementContent(operationData) {
|
|
|
4214
4232
|
return operationData;
|
|
4215
4233
|
};
|
|
4216
4234
|
|
|
4235
|
+
/**
|
|
4236
|
+
* This operation copies the specified values from the operationData to the global data.
|
|
4237
|
+
*
|
|
4238
|
+
* @param operationData
|
|
4239
|
+
* @returns
|
|
4240
|
+
*/
|
|
4241
|
+
|
|
4242
|
+
var setGlobalData$1 = function setGlobalData(operationData) {
|
|
4243
|
+
var properties = operationData.properties;
|
|
4244
|
+
var newGlobals = Object.fromEntries(Object.entries(operationData).filter(function (_ref) {
|
|
4245
|
+
var name = _ref[0];
|
|
4246
|
+
return properties.includes(name);
|
|
4247
|
+
}));
|
|
4248
|
+
setGlobals(newGlobals);
|
|
4249
|
+
delete operationData.properties;
|
|
4250
|
+
return operationData;
|
|
4251
|
+
};
|
|
4252
|
+
|
|
4217
4253
|
/**
|
|
4218
4254
|
* This operation assigns the specified properties to the current operation data.
|
|
4219
4255
|
* When override is set to true the properties replace the current operation data entirely.
|
|
@@ -4390,6 +4426,7 @@ var ops = {
|
|
|
4390
4426
|
selectElement: selectElement$1,
|
|
4391
4427
|
setElementAttributes: setElementAttributes$1,
|
|
4392
4428
|
setElementContent: setElementContent$1,
|
|
4429
|
+
setGlobalData: setGlobalData$1,
|
|
4393
4430
|
setOperationData: setOperationData$1,
|
|
4394
4431
|
setStyle: setStyle$1,
|
|
4395
4432
|
startAction: startAction$1,
|
|
@@ -4786,6 +4823,8 @@ var RequestAnimationFrameTimelineProvider = /*#__PURE__*/function () {
|
|
|
4786
4823
|
this._resetToStartPosition();
|
|
4787
4824
|
|
|
4788
4825
|
this.eventbus.broadcast(TimelineEventNames.RESTART);
|
|
4826
|
+
|
|
4827
|
+
this._broadCastPosition();
|
|
4789
4828
|
} else {
|
|
4790
4829
|
this.stop();
|
|
4791
4830
|
this.eventbus.broadcast(TimelineEventNames.COMPLETE);
|
|
@@ -4793,6 +4832,10 @@ var RequestAnimationFrameTimelineProvider = /*#__PURE__*/function () {
|
|
|
4793
4832
|
}
|
|
4794
4833
|
}
|
|
4795
4834
|
|
|
4835
|
+
this._broadCastPosition();
|
|
4836
|
+
};
|
|
4837
|
+
|
|
4838
|
+
_proto._broadCastPosition = function _broadCastPosition() {
|
|
4796
4839
|
this.eventbus.broadcast(TimelineEventNames.TIME, [{
|
|
4797
4840
|
position: this._currentPosition
|
|
4798
4841
|
}]);
|
|
@@ -4812,6 +4855,11 @@ var RequestAnimationFrameTimelineProvider = /*#__PURE__*/function () {
|
|
|
4812
4855
|
this.playState = 'running';
|
|
4813
4856
|
(_this$_abortControlle = this._abortController) == null ? void 0 : _this$_abortControlle.abort();
|
|
4814
4857
|
this._abortController = new AbortController();
|
|
4858
|
+
|
|
4859
|
+
if (this._currentPosition == 0) {
|
|
4860
|
+
this._broadCastPosition();
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4815
4863
|
animationInterval(this._tickInterval, this._abortController.signal, this._updateBound);
|
|
4816
4864
|
};
|
|
4817
4865
|
|
|
@@ -5408,6 +5456,18 @@ function setElementContent() {
|
|
|
5408
5456
|
};
|
|
5409
5457
|
}
|
|
5410
5458
|
|
|
5459
|
+
function setGlobalData() {
|
|
5460
|
+
return {
|
|
5461
|
+
description: 'Copies the specified values from the operationData to the global data',
|
|
5462
|
+
properties: {
|
|
5463
|
+
properties: {
|
|
5464
|
+
type: 'ParameterType:array',
|
|
5465
|
+
required: true
|
|
5466
|
+
}
|
|
5467
|
+
}
|
|
5468
|
+
};
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5411
5471
|
function setOperationData() {
|
|
5412
5472
|
return {
|
|
5413
5473
|
description: 'Sets the given properties on the current operation data',
|
|
@@ -5523,6 +5583,7 @@ var index = {
|
|
|
5523
5583
|
selectElement: selectElement,
|
|
5524
5584
|
setElementAttributes: setElementAttributes,
|
|
5525
5585
|
setElementContent: setElementContent,
|
|
5586
|
+
setGlobalData: setGlobalData,
|
|
5526
5587
|
setOperationData: setOperationData,
|
|
5527
5588
|
setStyle: setStyle,
|
|
5528
5589
|
startAction: startAction,
|
|
@@ -5532,5 +5593,5 @@ var index = {
|
|
|
5532
5593
|
wait: wait
|
|
5533
5594
|
};
|
|
5534
5595
|
|
|
5535
|
-
export { Action, ActionRegistryEventbusListener, ConfigurationResolver, DEV_TOOLS_KEY, DevToolEventListener, Diagnostics, EligiusEngine, EligiusResourceImporter, EndableAction, EngineFactory, EventListenerController, Eventbus, JwPlayerTimelineProvider, LabelController, LanguageManager, LottieController, NavigationController, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RoutingController, SubtitlesController, TimelineAction, TimelineEventNames, addClass$1 as addClass, addControllerToElement$1 as addControllerToElement, animate$1 as animate, animateWithClass$1 as animateWithClass, broadcastEvent$1 as broadcastEvent, calc$1 as calc, clearElement$1 as clearElement, clearOperationData$1 as clearOperationData, createElement$1 as createElement, customFunction$1 as customFunction, endAction$1 as endAction, endLoop$1 as endLoop, extendController$1 as extendController, generateImporterSourceCode, getControllerFromElement$1 as getControllerFromElement, getControllerInstance$1 as getControllerInstance, getElementDimensions$1 as getElementDimensions, getImport$1 as getImport, getQueryParams$1 as getQueryParams, invokeObjectMethod$1 as invokeObjectMethod, loadJSON$1 as loadJSON, log$1 as log, math$1 as math, index as metadata, removeClass$1 as removeClass, removeControllerFromElement$1 as removeControllerFromElement, removeElement$1 as removeElement, removePropertiesFromOperationData$1 as removePropertiesFromOperationData, reparentElement$1 as reparentElement, requestAction$1 as requestAction, resizeAction$1 as resizeAction, selectElement$1 as selectElement, setElementAttributes$1 as setElementAttributes, setElementContent$1 as setElementContent, setOperationData$1 as setOperationData, setStyle$1 as setStyle, startAction$1 as startAction, startLoop$1 as startLoop, toggleClass$1 as toggleClass, toggleElement$1 as toggleElement, wait$1 as wait };
|
|
5596
|
+
export { Action, ActionRegistryEventbusListener, ConfigurationResolver, DEV_TOOLS_KEY, DevToolEventListener, Diagnostics, EligiusEngine, EligiusResourceImporter, EndableAction, EngineFactory, EventListenerController, Eventbus, JwPlayerTimelineProvider, LabelController, LanguageManager, LottieController, NavigationController, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RoutingController, SubtitlesController, TimelineAction, TimelineEventNames, addClass$1 as addClass, addControllerToElement$1 as addControllerToElement, animate$1 as animate, animateWithClass$1 as animateWithClass, broadcastEvent$1 as broadcastEvent, calc$1 as calc, clearElement$1 as clearElement, clearOperationData$1 as clearOperationData, createElement$1 as createElement, customFunction$1 as customFunction, endAction$1 as endAction, endLoop$1 as endLoop, extendController$1 as extendController, generateImporterSourceCode, getControllerFromElement$1 as getControllerFromElement, getControllerInstance$1 as getControllerInstance, getElementDimensions$1 as getElementDimensions, getImport$1 as getImport, getQueryParams$1 as getQueryParams, invokeObjectMethod$1 as invokeObjectMethod, loadJSON$1 as loadJSON, log$1 as log, math$1 as math, index as metadata, removeClass$1 as removeClass, removeControllerFromElement$1 as removeControllerFromElement, removeElement$1 as removeElement, removePropertiesFromOperationData$1 as removePropertiesFromOperationData, reparentElement$1 as reparentElement, requestAction$1 as requestAction, resizeAction$1 as resizeAction, selectElement$1 as selectElement, setElementAttributes$1 as setElementAttributes, setElementContent$1 as setElementContent, setGlobalData$1 as setGlobalData, setOperationData$1 as setOperationData, setStyle$1 as setStyle, startAction$1 as startAction, startLoop$1 as startLoop, toggleClass$1 as toggleClass, toggleElement$1 as toggleElement, wait$1 as wait };
|
|
5536
5597
|
//# sourceMappingURL=eligius.esm.js.map
|