eligius 1.0.3 → 1.0.4

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.
@@ -1,4 +1,6 @@
1
1
  import { isDefined } from 'ts-is-present';
2
+ import fs from 'fs';
3
+ import path from 'path';
2
4
  import lottie from 'lottie-web';
3
5
  import $ from 'jquery';
4
6
  import Mousetrap from 'mousetrap';
@@ -581,6 +583,203 @@ var TimelineAction = /*#__PURE__*/function (_EndableAction) {
581
583
  return TimelineAction;
582
584
  }(EndableAction);
583
585
 
586
+ function dashToCamelCase(input) {
587
+ return input.replace(/-([a-z])/g, function (g) {
588
+ return g[1].toUpperCase();
589
+ });
590
+ }
591
+
592
+ /**
593
+ * This function takes an Eligius engine configuration, a root path for the config and an arbitrary list of asset info.
594
+ * The asset info determines a number of subdirectories in the root path that contain the different assets used by the presentation.
595
+ * I.e. html, json, etc.
596
+ *
597
+ * @param config
598
+ * @param configPath
599
+ * @param assetInfo
600
+ */
601
+
602
+ function generateImporterSourceCode(config, configPath, assetInfo) {
603
+ var importPaths = _gatherImportPaths(config, configPath, assetInfo);
604
+
605
+ var importerSourceCode = _generateSourceCode(importPaths);
606
+
607
+ return importerSourceCode;
608
+ }
609
+
610
+ function _generateSourceCode(importPaths) {
611
+ var result = importPaths.filter(function (x) {
612
+ return x.defaultImport;
613
+ }).map(function (imp) {
614
+ return "import " + imp.systemName + " from '" + imp.path + "';";
615
+ }).concat(importPaths.filter(function (x) {
616
+ return !x.defaultImport;
617
+ }).map(function (imp) {
618
+ var _imp$path;
619
+
620
+ return "import {" + imp.systemName + "} from '" + ((_imp$path = imp.path) != null ? _imp$path : 'eligius') + "';";
621
+ }));
622
+ result.push('const imports: Record<string, any> = {');
623
+ result.push.apply(result, importPaths.map(function (imp) {
624
+ return imp.systemName + ": { '" + imp.systemName + "': " + imp.systemName + " },";
625
+ }));
626
+ result.push('};');
627
+ result.push('class EligiusResourceImporter implements ISimpleResourceImporter {');
628
+ result.push('import(name: string): Record<string, any> {');
629
+ result.push('if (imports.hasOwnProperty(name)) { return imports[name]; }');
630
+ result.push('throw Error(`Unknown systemName: ${name}`);');
631
+ result.push('}}');
632
+ result.push('export default EligiusResourceImporter;');
633
+ return result.join('\n');
634
+ }
635
+
636
+ function _gatherImportPaths(config, configPath, assetInfo) {
637
+ return [].concat(_gatherOperations(config), assetInfo.flatMap(function (info) {
638
+ return _gatherAssets(configPath, info.path, info.extension);
639
+ }), _gatherControllers(config), _gatherProviders(config), _gatherEngines(config));
640
+ }
641
+
642
+ function _gatherAssets(assetPath, subdir, extension) {
643
+ var entries = fs.readdirSync(path.join(assetPath, subdir));
644
+ return entries.map(function (file) {
645
+ var importName = "" + dashToCamelCase(path.basename(file, extension));
646
+ return {
647
+ systemName: importName,
648
+ path: "./" + subdir + "/" + file,
649
+ defaultImport: true
650
+ };
651
+ });
652
+ }
653
+
654
+ function _gatherControllers(config) {
655
+ var _importPaths, _importPaths2, _importPaths3, _importPaths4;
656
+
657
+ var importPaths = [];
658
+
659
+ (_importPaths = importPaths).push.apply(_importPaths, _gatherControllerImportPathsFromActions(config.initActions));
660
+
661
+ (_importPaths2 = importPaths).push.apply(_importPaths2, _gatherControllerImportPathsFromActions(config.actions));
662
+
663
+ (_importPaths3 = importPaths).push.apply(_importPaths3, _gatherControllerImportPathsFromActions(config.timelines.flatMap(function (x) {
664
+ return x.timelineActions;
665
+ })));
666
+
667
+ (_importPaths4 = importPaths).push.apply(_importPaths4, _gatherControllerImportPathsFromActions(config.eventActions));
668
+
669
+ importPaths = dedupe(importPaths);
670
+ return importPaths;
671
+ }
672
+
673
+ function _gatherProviders(config) {
674
+ if (config.timelineProviderSettings) {
675
+ return Object.values(config.timelineProviderSettings).map(function (settings) {
676
+ return {
677
+ systemName: settings.systemName
678
+ };
679
+ });
680
+ }
681
+
682
+ return [];
683
+ }
684
+
685
+ function _gatherEngines(config) {
686
+ if (config.engine) {
687
+ var systemName = config.engine.systemName;
688
+ return [{
689
+ systemName: systemName
690
+ }];
691
+ }
692
+
693
+ return [];
694
+ }
695
+
696
+ function _gatherOperations(config) {
697
+ var _config$eventActions;
698
+
699
+ var importPaths = _gatherOperationImportPathsFromActions(config.initActions.concat(config.actions).concat((_config$eventActions = config.eventActions) != null ? _config$eventActions : []));
700
+
701
+ if (config.timelines) {
702
+ var timelineActions = config.timelines.flatMap(function (x) {
703
+ return x.timelineActions;
704
+ });
705
+ importPaths = importPaths.concat(_gatherOperationImportPathsFromActions(timelineActions));
706
+ }
707
+
708
+ return dedupe(importPaths);
709
+ }
710
+
711
+ function _gatherControllerImportPathsFromActions(actionsConfig) {
712
+ if (!actionsConfig) {
713
+ return [];
714
+ }
715
+
716
+ var operations = actionsConfig.flatMap(function (x) {
717
+ var _x$endOperations;
718
+
719
+ return [].concat(x.startOperations, (_x$endOperations = x.endOperations) != null ? _x$endOperations : []);
720
+ });
721
+ return _gatherControllerImportPaths(operations);
722
+ }
723
+
724
+ function _gatherOperationImportPathsFromActions(actionsConfig) {
725
+ if (!actionsConfig) {
726
+ return [];
727
+ }
728
+
729
+ var operations = actionsConfig.flatMap(function (x) {
730
+ var _x$endOperations2;
731
+
732
+ return [].concat(x.startOperations, (_x$endOperations2 = x.endOperations) != null ? _x$endOperations2 : []);
733
+ });
734
+ return _gatherOperationImportPaths(operations);
735
+ }
736
+
737
+ function _gatherControllerImportPaths(operationConfigs) {
738
+ if (!operationConfigs) {
739
+ return [];
740
+ }
741
+
742
+ return operationConfigs.filter(function (operationConfig) {
743
+ var _operationConfig$oper;
744
+
745
+ if ((_operationConfig$oper = operationConfig.operationData) != null && _operationConfig$oper.hasOwnProperty('systemName')) {
746
+ return operationConfig.operationData.systemName.endsWith('Controller');
747
+ }
748
+
749
+ return false;
750
+ }).map(function (operationConfig) {
751
+ var systemName = operationConfig.operationData.systemName;
752
+ return {
753
+ systemName: systemName
754
+ };
755
+ });
756
+ }
757
+
758
+ function _gatherOperationImportPaths(operationConfigs) {
759
+ if (!operationConfigs) {
760
+ return [];
761
+ }
762
+
763
+ return operationConfigs.map(function (operationConfig) {
764
+ var systemName = operationConfig.systemName;
765
+ return {
766
+ systemName: systemName
767
+ };
768
+ });
769
+ }
770
+
771
+ function dedupe(importPaths) {
772
+ var lookup = {};
773
+ return importPaths.filter(function (imp) {
774
+ if (lookup[imp.systemName]) {
775
+ return false;
776
+ }
777
+
778
+ lookup[imp.systemName] = true;
779
+ return true;
780
+ });
781
+ }
782
+
584
783
  function getNestedValue(properties, sourceObject) {
585
784
  if (!properties) {
586
785
  throw Error('properties arg cannot be null');
@@ -1749,6 +1948,34 @@ var ctrls = {
1749
1948
  SubtitlesController: SubtitlesController
1750
1949
  };
1751
1950
 
1951
+ var DevToolEventListener = /*#__PURE__*/function () {
1952
+ function DevToolEventListener(agent) {
1953
+ this.agent = void 0;
1954
+ this.agent = agent;
1955
+ }
1956
+
1957
+ var _proto = DevToolEventListener.prototype;
1958
+
1959
+ _proto.handleEvent = function handleEvent(eventName, eventTopic, args) {
1960
+ this.agent.postMessage('eligius-diagnostics-event', {
1961
+ eventName: eventName,
1962
+ eventTopic: eventTopic
1963
+ });
1964
+ };
1965
+
1966
+ return DevToolEventListener;
1967
+ }();
1968
+
1969
+ var Diagnostics = /*#__PURE__*/function () {
1970
+ function Diagnostics() {}
1971
+
1972
+ Diagnostics.send = function send(_name, _data) {};
1973
+
1974
+ return Diagnostics;
1975
+ }();
1976
+
1977
+ var DEV_TOOLS_KEY = '__ELIGIUS_DEV_TOOLS__';
1978
+
1752
1979
  /**
1753
1980
  * EligiusEngine, this is where the magic happens. The engine is responsible for starting and stopping
1754
1981
  * the given timeline provider and triggering the actions associated with it.
@@ -1810,6 +2037,7 @@ var EligiusEngine = /*#__PURE__*/function () {
1810
2037
 
1811
2038
  _proto._initializeTimelineProvider = function _initializeTimelineProvider() {
1812
2039
  var _this$configuration$t,
2040
+ _this$_activeTimeline,
1813
2041
  _this = this;
1814
2042
 
1815
2043
  if (!((_this$configuration$t = this.configuration.timelines) != null && _this$configuration$t.length)) {
@@ -1823,10 +2051,7 @@ var EligiusEngine = /*#__PURE__*/function () {
1823
2051
  throw new Error("No timeline provider configured for type " + firstTimeline.type);
1824
2052
  }
1825
2053
 
1826
- if (this._activeTimelineProvider) {
1827
- this._activeTimelineProvider.destroy();
1828
- }
1829
-
2054
+ (_this$_activeTimeline = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline.destroy();
1830
2055
  this._activeTimelineProvider = providerSettings.provider;
1831
2056
  return new Promise( /*#__PURE__*/function () {
1832
2057
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
@@ -1898,6 +2123,7 @@ var EligiusEngine = /*#__PURE__*/function () {
1898
2123
 
1899
2124
  _proto.destroy = /*#__PURE__*/function () {
1900
2125
  var _destroy = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
2126
+ var containerSelector, container;
1901
2127
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1902
2128
  while (1) {
1903
2129
  switch (_context3.prev = _context3.next) {
@@ -1913,12 +2139,16 @@ var EligiusEngine = /*#__PURE__*/function () {
1913
2139
  });
1914
2140
 
1915
2141
  if (this.timelineProviders) {
1916
- Object.values(this.timelineProviders).forEach(function (info) {
1917
- return info.provider.destroy();
2142
+ Object.values(this.timelineProviders).forEach(function (providerInfo) {
2143
+ return providerInfo.provider.destroy();
1918
2144
  });
1919
2145
  }
1920
2146
 
1921
- case 5:
2147
+ containerSelector = this.configuration.containerSelector;
2148
+ container = $(containerSelector);
2149
+ container.empty();
2150
+
2151
+ case 8:
1922
2152
  case "end":
1923
2153
  return _context3.stop();
1924
2154
  }
@@ -2187,9 +2417,9 @@ var EligiusEngine = /*#__PURE__*/function () {
2187
2417
  };
2188
2418
 
2189
2419
  _proto._handleRequestTimelinePosition = function _handleRequestTimelinePosition(floor, resultCallback) {
2190
- var _this$_activeTimeline;
2420
+ var _this$_activeTimeline2;
2191
2421
 
2192
- resultCallback(floor(((_this$_activeTimeline = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline.getPosition()) || -1));
2422
+ resultCallback(floor(((_this$_activeTimeline2 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline2.getPosition()) || -1));
2193
2423
  };
2194
2424
 
2195
2425
  _proto._handleTimelineComplete = function _handleTimelineComplete() {
@@ -2235,19 +2465,19 @@ var EligiusEngine = /*#__PURE__*/function () {
2235
2465
 
2236
2466
  _proto._onTimeHandler = function _onTimeHandler(floor, event) {
2237
2467
  if (!isNaN(event.position)) {
2238
- var _this$_activeTimeline3;
2468
+ var _this$_activeTimeline4;
2239
2469
 
2240
2470
  var pos = floor(event.position);
2241
2471
 
2242
2472
  if (this._lastPosition !== pos) {
2243
- var _this$_activeTimeline2;
2473
+ var _this$_activeTimeline3;
2244
2474
 
2245
2475
  this._executeActionsForPosition(pos);
2246
2476
 
2247
- this.eventbus.broadcast(TimelineEventNames.POSITION_UPDATE, [pos, (_this$_activeTimeline2 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline2.getDuration()]);
2477
+ this.eventbus.broadcast(TimelineEventNames.POSITION_UPDATE, [pos, (_this$_activeTimeline3 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline3.getDuration()]);
2248
2478
  }
2249
2479
 
2250
- this.eventbus.broadcast(TimelineEventNames.TIME_UPDATE, [event.position, (_this$_activeTimeline3 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline3.getDuration()]);
2480
+ this.eventbus.broadcast(TimelineEventNames.TIME_UPDATE, [event.position, (_this$_activeTimeline4 = this._activeTimelineProvider) == null ? void 0 : _this$_activeTimeline4.getDuration()]);
2251
2481
  }
2252
2482
  };
2253
2483
 
@@ -2602,6 +2832,9 @@ var EngineFactory = /*#__PURE__*/function () {
2602
2832
  this.eventbus = void 0;
2603
2833
  this.importer = importer;
2604
2834
  this.eventbus = eventbus || new Eventbus();
2835
+
2836
+ this._initializeDevtools(this.eventbus);
2837
+
2605
2838
  this.eventbus.on(TimelineEventNames.REQUEST_INSTANCE, this._requestInstanceHandler.bind(this));
2606
2839
  this.eventbus.on(TimelineEventNames.REQUEST_ACTION, this._requestActionHandler.bind(this));
2607
2840
  this.eventbus.on(TimelineEventNames.REQUEST_FUNCTION, this._requestFunctionHandler.bind(this));
@@ -2610,6 +2843,20 @@ var EngineFactory = /*#__PURE__*/function () {
2610
2843
 
2611
2844
  var _proto = EngineFactory.prototype;
2612
2845
 
2846
+ _proto._initializeDevtools = function _initializeDevtools(eventbus) {
2847
+ var diagnosticInfo = window[DEV_TOOLS_KEY];
2848
+
2849
+ if (diagnosticInfo) {
2850
+ var agent = diagnosticInfo.agent;
2851
+ var eventbusListener = new DevToolEventListener(agent);
2852
+ eventbus.registerEventlistener(eventbusListener);
2853
+
2854
+ Diagnostics.send = function (name, data) {
2855
+ agent.postMessage(name, data);
2856
+ };
2857
+ }
2858
+ };
2859
+
2613
2860
  _proto.destroy = function destroy() {
2614
2861
  this.eventbus.clear();
2615
2862
  };
@@ -2884,7 +3131,6 @@ function resolveEventArguments(operationData, eventArgs) {
2884
3131
  * event argumetns and optional event topic.
2885
3132
  *
2886
3133
  * @param operationData
2887
- * @returns
2888
3134
  */
2889
3135
 
2890
3136
  var broadcastEvent$1 = function broadcastEvent(operationData) {
@@ -2903,33 +3149,6 @@ var broadcastEvent$1 = function broadcastEvent(operationData) {
2903
3149
  return operationData;
2904
3150
  };
2905
3151
 
2906
- /**
2907
- * This operation removes all of the children from the specified selected element.
2908
- */
2909
- var clearElement$1 = function clearElement(operationData) {
2910
- var selectedElement = operationData.selectedElement;
2911
- selectedElement.empty();
2912
- return operationData;
2913
- };
2914
-
2915
- /**
2916
- * This operation removes all of the properties on the current operation date.
2917
- * Or, if the properties property is set only removes the properties defined by that list.
2918
- */
2919
- var clearOperationData$1 = function clearOperationData(operationData) {
2920
- var properties = operationData.properties;
2921
-
2922
- if (properties) {
2923
- properties.forEach(function (name) {
2924
- delete operationData[name];
2925
- });
2926
- delete operationData.properties;
2927
- return operationData;
2928
- }
2929
-
2930
- return {};
2931
- };
2932
-
2933
3152
  var cache = [];
2934
3153
  function resolvePropertyValues(operationData, properties) {
2935
3154
  var copy = properties !== operationData ? deepCopy(properties) : properties;
@@ -2974,6 +3193,71 @@ function resolveProperties(properties, copy, extract) {
2974
3193
  }
2975
3194
  }
2976
3195
 
3196
+ var calcFunctions = {
3197
+ '+': function _(left, right) {
3198
+ return left + right;
3199
+ },
3200
+ '-': function _(left, right) {
3201
+ return left - right;
3202
+ },
3203
+ '*': function _(left, right) {
3204
+ return left * right;
3205
+ },
3206
+ '/': function _(left, right) {
3207
+ return left / right;
3208
+ },
3209
+ '%': function _(left, right) {
3210
+ return left % right;
3211
+ },
3212
+ '**': function _(left, right) {
3213
+ return Math.pow(left, right);
3214
+ }
3215
+ };
3216
+ /**
3217
+ * This operation calculates the given left and right hand sides using the specified operator.
3218
+ *
3219
+ * @param operationData
3220
+ */
3221
+
3222
+ var calc$1 = function calc(operationData) {
3223
+ operationData = resolvePropertyValues(operationData, operationData);
3224
+ var _operationData = operationData,
3225
+ left = _operationData.left,
3226
+ right = _operationData.right,
3227
+ operator = _operationData.operator,
3228
+ _operationData$proper = _operationData.propertyName,
3229
+ propertyName = _operationData$proper === void 0 ? 'calculationResult' : _operationData$proper;
3230
+ operationData[propertyName] = calcFunctions[operator](+left, +right);
3231
+ return operationData;
3232
+ };
3233
+
3234
+ /**
3235
+ * This operation removes all of the children from the specified selected element.
3236
+ */
3237
+ var clearElement$1 = function clearElement(operationData) {
3238
+ var selectedElement = operationData.selectedElement;
3239
+ selectedElement.empty();
3240
+ return operationData;
3241
+ };
3242
+
3243
+ /**
3244
+ * This operation removes all of the properties on the current operation date.
3245
+ * Or, if the properties property is set only removes the properties defined by that list.
3246
+ */
3247
+ var clearOperationData$1 = function clearOperationData(operationData) {
3248
+ var properties = operationData.properties;
3249
+
3250
+ if (properties) {
3251
+ properties.forEach(function (name) {
3252
+ delete operationData[name];
3253
+ });
3254
+ delete operationData.properties;
3255
+ return operationData;
3256
+ }
3257
+
3258
+ return {};
3259
+ };
3260
+
2977
3261
  /**
2978
3262
  * This operation creates the DOM element defined by the given properties and assigns
2979
3263
  * the instance to the give property name on the current operation data.
@@ -3448,6 +3732,38 @@ var log$1 = function log(operationData) {
3448
3732
  return operationData;
3449
3733
  };
3450
3734
 
3735
+ /**
3736
+ * This operation performs the given math function of the specified arguments.
3737
+ *
3738
+ * @param operationData
3739
+ */
3740
+
3741
+ var math$1 = function math(operationData) {
3742
+ operationData = resolvePropertyValues(operationData, operationData);
3743
+ operationData.args = resolveMathConstants(operationData.args);
3744
+ var _operationData = operationData,
3745
+ args = _operationData.args,
3746
+ functionName = _operationData.functionName,
3747
+ _operationData$proper = _operationData.propertyName,
3748
+ propertyName = _operationData$proper === void 0 ? 'mathResult' : _operationData$proper;
3749
+ operationData[propertyName] = Math[functionName].apply(null, args);
3750
+ return operationData;
3751
+ };
3752
+
3753
+ function resolveMathConstants(args) {
3754
+ return args.map(function (arg) {
3755
+ if (isMathProperty(arg)) {
3756
+ return Math[arg];
3757
+ }
3758
+
3759
+ return arg;
3760
+ });
3761
+ }
3762
+
3763
+ function isMathProperty(value) {
3764
+ return typeof value === 'string' && value in Math && typeof Math[value] !== 'function';
3765
+ }
3766
+
3451
3767
  /**
3452
3768
  * This operation removes the spcified class name from the specified selected element.
3453
3769
  *
@@ -3825,6 +4141,7 @@ var ops = {
3825
4141
  animate: animate$1,
3826
4142
  animateWithClass: animateWithClass$1,
3827
4143
  broadcastEvent: broadcastEvent$1,
4144
+ calc: calc$1,
3828
4145
  clearElement: clearElement$1,
3829
4146
  clearOperationData: clearOperationData$1,
3830
4147
  createElement: createElement$1,
@@ -3838,6 +4155,7 @@ var ops = {
3838
4155
  getImport: getImport$1,
3839
4156
  loadJSON: loadJSON$1,
3840
4157
  log: log$1,
4158
+ math: math$1,
3841
4159
  removeClass: removeClass$1,
3842
4160
  removeControllerFromElement: removeControllerFromElement$1,
3843
4161
  removeElement: removeElement$1,
@@ -4364,13 +4682,13 @@ var operations = ops;
4364
4682
  var controllers = ctrls;
4365
4683
  var providers = prvdrs;
4366
4684
  var eventbus = evtb;
4367
- var WebpackResourceImporter = /*#__PURE__*/function () {
4368
- function WebpackResourceImporter() {
4685
+ var EligiusResourceImporter = /*#__PURE__*/function () {
4686
+ function EligiusResourceImporter() {
4369
4687
  this.engines = new Map();
4370
4688
  this.engines.set('EligiusEngine', EligiusEngine);
4371
4689
  }
4372
4690
 
4373
- var _proto = WebpackResourceImporter.prototype;
4691
+ var _proto = EligiusResourceImporter.prototype;
4374
4692
 
4375
4693
  _proto.getOperationNames = function getOperationNames() {
4376
4694
  return Object.keys(operations);
@@ -4391,7 +4709,7 @@ var WebpackResourceImporter = /*#__PURE__*/function () {
4391
4709
  return _ref4 = {}, _ref4[name] = value, _ref4;
4392
4710
  };
4393
4711
 
4394
- return WebpackResourceImporter;
4712
+ return EligiusResourceImporter;
4395
4713
  }();
4396
4714
 
4397
4715
  function addClass() {
@@ -4460,6 +4778,53 @@ function broadcastEvent() {
4460
4778
  };
4461
4779
  }
4462
4780
 
4781
+ function calc() {
4782
+ return {
4783
+ description: 'clears the given element',
4784
+ properties: {
4785
+ left: {
4786
+ type: 'ParameterType:integer',
4787
+ description: 'The left operand',
4788
+ required: true
4789
+ },
4790
+ right: {
4791
+ type: 'ParameterType:integer',
4792
+ description: 'The right operand',
4793
+ required: true
4794
+ },
4795
+ operator: [{
4796
+ value: '+',
4797
+ description: 'Adds the left and right operands'
4798
+ }, {
4799
+ value: '-',
4800
+ description: 'Subtracts the left and right operands'
4801
+ }, {
4802
+ value: '*',
4803
+ description: 'Multiplies the left and right operands'
4804
+ }, {
4805
+ value: '/',
4806
+ description: 'Divides the left and right operands'
4807
+ }, {
4808
+ value: '%',
4809
+ description: 'Returns the remainder left over after the left number is divided into a number of integer portions equal to the right number'
4810
+ }, {
4811
+ value: '**',
4812
+ description: 'Exponent: Raises a base number to the exponent power, that is, the base number multiplied by itself, exponent times.'
4813
+ }],
4814
+ propertyName: {
4815
+ type: 'ParameterType:string',
4816
+ defaultValue: 'calculationResult'
4817
+ }
4818
+ }
4819
+ /*outputProperties: {
4820
+ propertyName: {
4821
+ type: 'ParameterType:integer',
4822
+ },
4823
+ },*/
4824
+
4825
+ };
4826
+ }
4827
+
4463
4828
  function clearElement() {
4464
4829
  return {
4465
4830
  description: 'clears the given element',
@@ -4620,6 +4985,33 @@ function log() {
4620
4985
  };
4621
4986
  }
4622
4987
 
4988
+ function math() {
4989
+ return {
4990
+ description: 'This operation performs the given math function of the specified arguments.',
4991
+ properties: {
4992
+ args: {
4993
+ type: 'ParameterType:array',
4994
+ required: true
4995
+ },
4996
+ functionName: createMathFunctionNames(),
4997
+ propertyName: {
4998
+ type: 'ParameterType:string',
4999
+ defaultValue: 'mathResult'
5000
+ }
5001
+ }
5002
+ };
5003
+ }
5004
+
5005
+ function createMathFunctionNames() {
5006
+ return Object.getOwnPropertyNames(Math).filter(function (x) {
5007
+ return typeof Math[x] === 'function';
5008
+ }).map(function (functionName) {
5009
+ return {
5010
+ value: functionName
5011
+ };
5012
+ });
5013
+ }
5014
+
4623
5015
  function removeClass() {
4624
5016
  return {
4625
5017
  description: 'Removes the specified class from the selected element',
@@ -4680,7 +5072,8 @@ function requestAction() {
4680
5072
  description: 'Retrieves an instance of the specified action',
4681
5073
  properties: {
4682
5074
  systemName: {
4683
- type: 'ParameterType:actionName'
5075
+ type: 'ParameterType:actionName',
5076
+ required: true
4684
5077
  }
4685
5078
  },
4686
5079
  outputProperties: {
@@ -4847,6 +5240,7 @@ var index = {
4847
5240
  animate: animate,
4848
5241
  animateWithClass: animateWithClass,
4849
5242
  broadcastEvent: broadcastEvent,
5243
+ calc: calc,
4850
5244
  clearElement: clearElement,
4851
5245
  clearOperationData: clearOperationData,
4852
5246
  createElement: createElement,
@@ -4860,6 +5254,7 @@ var index = {
4860
5254
  getImport: getImport,
4861
5255
  loadJSON: loadJSON,
4862
5256
  log: log,
5257
+ math: math,
4863
5258
  removeClass: removeClass,
4864
5259
  removeControllerFromElement: removeControllerFromElement,
4865
5260
  removeElement: removeElement,
@@ -4879,5 +5274,5 @@ var index = {
4879
5274
  wait: wait
4880
5275
  };
4881
5276
 
4882
- export { Action, ActionRegistryEventbusListener, ConfigurationResolver, EligiusEngine, EndableAction, EngineFactory, EventListenerController, Eventbus, JwPlayerTimelineProvider, LabelController, LanguageManager, LottieController, NavigationController, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RoutingController, SubtitlesController, TimelineAction, TimelineEventNames, WebpackResourceImporter, addClass$1 as addClass, addControllerToElement$1 as addControllerToElement, animate$1 as animate, animateWithClass$1 as animateWithClass, broadcastEvent$1 as broadcastEvent, 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, getControllerFromElement$1 as getControllerFromElement, getControllerInstance$1 as getControllerInstance, getElementDimensions$1 as getElementDimensions, getImport$1 as getImport, loadJSON$1 as loadJSON, log$1 as log, 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 };
5277
+ 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, 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 };
4883
5278
  //# sourceMappingURL=eligius.esm.js.map