eligius 1.0.11 → 1.0.12

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.
@@ -3310,6 +3310,25 @@ 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
+ console.log('cache', cache);
3327
+ }
3328
+
3329
+ var getGlobals = /*#__PURE__*/_getGlobals.bind(null, cache$1);
3330
+ var setGlobals = /*#__PURE__*/_setGlobals.bind(null, cache$1);
3331
+
3313
3332
  function extractOperationDataArgumentValues(sourceObject, argumentValue) {
3314
3333
  if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('operationdata.')) {
3315
3334
  var propNames = argumentValue.split('.');
@@ -3317,6 +3336,14 @@ function extractOperationDataArgumentValues(sourceObject, argumentValue) {
3317
3336
  return getNestedValue(propNames, sourceObject);
3318
3337
  }
3319
3338
 
3339
+ if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('globaldata.')) {
3340
+ var _propNames = argumentValue.split('.');
3341
+
3342
+ _propNames.shift();
3343
+
3344
+ return getNestedValue(_propNames, getGlobals());
3345
+ }
3346
+
3320
3347
  return argumentValue;
3321
3348
  }
3322
3349
 
@@ -4214,6 +4241,24 @@ var setElementContent$1 = function setElementContent(operationData) {
4214
4241
  return operationData;
4215
4242
  };
4216
4243
 
4244
+ /**
4245
+ * This operation copies the specified values from the operationData to the global data.
4246
+ *
4247
+ * @param operationData
4248
+ * @returns
4249
+ */
4250
+
4251
+ var setGlobalData$1 = function setGlobalData(operationData) {
4252
+ var properties = operationData.properties;
4253
+ var newGlobals = Object.fromEntries(Object.entries(operationData).filter(function (_ref) {
4254
+ var name = _ref[0];
4255
+ return properties.includes(name);
4256
+ }));
4257
+ setGlobals(newGlobals);
4258
+ delete operationData.properties;
4259
+ return operationData;
4260
+ };
4261
+
4217
4262
  /**
4218
4263
  * This operation assigns the specified properties to the current operation data.
4219
4264
  * When override is set to true the properties replace the current operation data entirely.
@@ -4390,6 +4435,7 @@ var ops = {
4390
4435
  selectElement: selectElement$1,
4391
4436
  setElementAttributes: setElementAttributes$1,
4392
4437
  setElementContent: setElementContent$1,
4438
+ setGlobalData: setGlobalData$1,
4393
4439
  setOperationData: setOperationData$1,
4394
4440
  setStyle: setStyle$1,
4395
4441
  startAction: startAction$1,
@@ -5408,6 +5454,18 @@ function setElementContent() {
5408
5454
  };
5409
5455
  }
5410
5456
 
5457
+ function setGlobalData() {
5458
+ return {
5459
+ description: 'Copies the specified values from the operationData to the global data',
5460
+ properties: {
5461
+ properties: {
5462
+ type: 'ParameterType:array',
5463
+ required: true
5464
+ }
5465
+ }
5466
+ };
5467
+ }
5468
+
5411
5469
  function setOperationData() {
5412
5470
  return {
5413
5471
  description: 'Sets the given properties on the current operation data',
@@ -5523,6 +5581,7 @@ var index = {
5523
5581
  selectElement: selectElement,
5524
5582
  setElementAttributes: setElementAttributes,
5525
5583
  setElementContent: setElementContent,
5584
+ setGlobalData: setGlobalData,
5526
5585
  setOperationData: setOperationData,
5527
5586
  setStyle: setStyle,
5528
5587
  startAction: startAction,
@@ -5532,5 +5591,5 @@ var index = {
5532
5591
  wait: wait
5533
5592
  };
5534
5593
 
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 };
5594
+ 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
5595
  //# sourceMappingURL=eligius.esm.js.map