eligius 1.0.12 → 1.0.14

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.
Files changed (32) hide show
  1. package/dist/action/action.d.ts +2 -2
  2. package/dist/action/timeline-action.d.ts +2 -2
  3. package/dist/action/types.d.ts +2 -2
  4. package/dist/eligius-engine.d.ts +9 -1
  5. package/dist/eligius.cjs.development.js +358 -212
  6. package/dist/eligius.cjs.development.js.map +1 -1
  7. package/dist/eligius.cjs.production.min.js +1 -1
  8. package/dist/eligius.cjs.production.min.js.map +1 -1
  9. package/dist/eligius.esm.js +358 -212
  10. package/dist/eligius.esm.js.map +1 -1
  11. package/dist/operation/end-action.d.ts +4 -0
  12. package/dist/operation/get-controller-instance.d.ts +2 -2
  13. package/dist/operation/helper/get-property-chain-value.d.ts +24 -0
  14. package/dist/operation/helper/resolve-operation-or-global-data-property-chain.d.ts +13 -0
  15. package/dist/operation/helper/resolve-property-chain.d.ts +23 -0
  16. package/dist/operation/helper/resolve-property-values.d.ts +1 -1
  17. package/dist/operation/log.d.ts +2 -2
  18. package/dist/operation/math.d.ts +1 -1
  19. package/dist/operation/set-style.d.ts +2 -3
  20. package/dist/operation/types.d.ts +1 -1
  21. package/dist/timelineproviders/jwplayer-timeline-provider.d.ts +2 -2
  22. package/dist/timelineproviders/request-animation-frame-timeline-provider.d.ts +2 -1
  23. package/dist/timelineproviders/types.d.ts +1 -1
  24. package/dist/util/guards/is-function.d.ts +1 -0
  25. package/dist/util/guards/is-object.d.ts +1 -0
  26. package/dist/util/guards/is-promise.d.ts +1 -0
  27. package/dist/util/guards/is-string.d.ts +1 -0
  28. package/package.json +5 -5
  29. package/dist/action/is-promise.d.ts +0 -1
  30. package/dist/operation/helper/extract-operation-data-argument-values.d.ts +0 -1
  31. package/dist/operation/helper/get-nested-property-value.d.ts +0 -1
  32. package/dist/operation/helper/get-nested-value.d.ts +0 -1
@@ -7,6 +7,10 @@ export interface IEndActionOperationData {
7
7
  /**
8
8
  * This operation invokes the end() method on the specified action instance.
9
9
  *
10
+ * The action operation data is first merged with the current operation data before it is
11
+ * passed on to the action. After the action has completed the action operation data properties
12
+ * are removed from the current operation data.
13
+ *
10
14
  * @param operationData
11
15
  * @returns
12
16
  */
@@ -1,10 +1,10 @@
1
1
  import * as controllers from '../controllers';
2
2
  import { IController } from '../controllers/types';
3
- import { TOperation } from './types';
3
+ import { TOperation, TOperationData } from './types';
4
4
  declare type TSystemName = keyof typeof controllers;
5
5
  export interface IGetControllerInstanceOperationData {
6
6
  systemName: TSystemName;
7
- controllerInstance?: IController<unknown>;
7
+ controllerInstance?: IController<TOperationData>;
8
8
  }
9
9
  /**
10
10
  * This operation retrieves an instance of the given controller name.
@@ -0,0 +1,24 @@
1
+ /**
2
+ /**
3
+ * Gets the value for the given property chain. A property chain is defined by a string array.
4
+ *
5
+ * For example, this property chain: `[mySource, subSource, element, value]` should be extracted from an object of this shape:
6
+ * ```ts
7
+ * const foo = {
8
+ * mySource: {
9
+ * subSource: {
10
+ * element: {
11
+ * value: 'bar'
12
+ * }
13
+ * }
14
+ * }
15
+ * }
16
+ * ```
17
+ *
18
+ * The result of the invocation `getPropertyChainValue([mySource, subSource, element, value], foo)` would then yield the value `bar`.
19
+ *
20
+ * @param propertyChain
21
+ * @param sourceObject
22
+ * @returns
23
+ */
24
+ export declare function getPropertyChainValue(propertyChain: string[], sourceObject: any): any;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Resolves operation and global data property chains.
3
+ *
4
+ * An operation data property chain is designated by a `operationdata.` suffix, followed by an arbitrary property chain.
5
+ * For global data the suffix should be `globaldata.`
6
+ *
7
+ * If the propertyChainOrRegularObject is not a property chain, this value is returned instead.
8
+ *
9
+ * @param sourceObject The object that represents the operation data
10
+ * @param propertyChainOrRegularObject A period delimited string, or just a regular object
11
+ * @returns
12
+ */
13
+ export declare function resolveOperationOrGlobalDataPropertyChain(sourceObject: any, propertyChainOrRegularObject: string | any): any;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Gets the value for the given property chain. A property chain is defined by a period delimited string.
3
+ *
4
+ * For example, this property chain: `mySource.subSource.element.value` should be extracted from an object of this shape:
5
+ * ```ts
6
+ * const foo = {
7
+ * mySource: {
8
+ * subSource: {
9
+ * element: {
10
+ * value: 'bar'
11
+ * }
12
+ * }
13
+ * }
14
+ * }
15
+ * ```
16
+ *
17
+ * The result of the invocation `resolvePropertyChain('mySource.subSource.element.value', foo)` would then yield the value `bar`.
18
+ *
19
+ * @param propertyChain the specified property chain
20
+ * @param sourceObject the given source object
21
+ * @returns
22
+ */
23
+ export declare function resolvePropertyChain(propertyChain: string, sourceObject: any): any;
@@ -1,2 +1,2 @@
1
1
  import { TOperationData } from '../../operation/types';
2
- export declare function resolvePropertyValues(operationData: TOperationData, properties: any): any;
2
+ export declare function resolvePropertyValues<T extends TOperationData>(operationData: T, properties: Record<string, any>): T;
@@ -1,8 +1,8 @@
1
- import { TOperation } from './types';
1
+ import { TOperation, TOperationData } from './types';
2
2
  /**
3
3
  * This operation logs the current operation data and context.
4
4
  *
5
5
  * @param operationData
6
6
  * @returns
7
7
  */
8
- export declare const log: TOperation;
8
+ export declare const log: TOperation<TOperationData>;
@@ -5,7 +5,7 @@ export interface IMathOperationData {
5
5
  mathResult?: number;
6
6
  }
7
7
  /**
8
- * This operation performs the given math function of the specified arguments.
8
+ * This operation performs the given math function with the specified arguments.
9
9
  *
10
10
  * @param operationData
11
11
  */
@@ -1,13 +1,12 @@
1
1
  /// <reference types="jquery" />
2
2
  import { TOperation } from './types';
3
3
  export interface ISetStyleOperationData {
4
- properties: Record<string, unknown>;
4
+ properties: Record<string, any>;
5
5
  selectedElement: JQuery;
6
6
  }
7
7
  /**
8
8
  * This operation assigns the specified CSS style properties to the
9
- * specified selected element. The selected element is assigned to
10
- * the `selectedElement` property.
9
+ * specified selected element.
11
10
  *
12
11
  * @param operationData
13
12
  * @returns
@@ -1,5 +1,5 @@
1
1
  import { IEventbus } from '../eventbus';
2
- export declare type TOperationData = any;
2
+ export declare type TOperationData = Record<string, any>;
3
3
  export declare type TOperationResult<T = TOperationData> = Promise<T> | T;
4
4
  export interface IOperationContext {
5
5
  loopIndex?: number;
@@ -14,8 +14,8 @@ export declare class JwPlayerTimelineProvider implements ITimelineProvider {
14
14
  loop: boolean;
15
15
  constructor(eventbus: IEventbus, config: IResolvedEngineConfiguration);
16
16
  _extractUrls(configuration: IResolvedEngineConfiguration): string[];
17
- init(): Promise<any>;
18
- _handlePlayerReady(resolve: (value: any | PromiseLike<any>) => void): void;
17
+ init(): Promise<void>;
18
+ _handlePlayerReady(resolve: (value: void | PromiseLike<void>) => void): void;
19
19
  _handlePlayerComplete(): void;
20
20
  _seekedHandler(): void;
21
21
  destroy(): void;
@@ -22,12 +22,13 @@ export declare class RequestAnimationFrameTimelineProvider implements ITimelineP
22
22
  playlistItem(uri: string): void;
23
23
  private _addEventListeners;
24
24
  private _update;
25
+ private _broadCastPosition;
25
26
  private _start;
26
27
  private _resetToStartPosition;
27
28
  private _resize;
28
29
  private _container;
29
30
  private _stopAnimationInterval;
30
- init(): Promise<any>;
31
+ init(): Promise<void>;
31
32
  destroy(): void;
32
33
  toggleplay(): void;
33
34
  start(): void;
@@ -1,6 +1,6 @@
1
1
  export interface ITimelineProvider {
2
2
  loop: boolean;
3
- init(): Promise<any>;
3
+ init(): Promise<void>;
4
4
  start(): void;
5
5
  stop(): void;
6
6
  pause(): void;
@@ -0,0 +1 @@
1
+ export declare function isFunction(value: any): value is Function;
@@ -0,0 +1 @@
1
+ export declare function isObject(value: any): value is Object;
@@ -0,0 +1 @@
1
+ export declare function isPromise(obj: any): obj is Promise<any>;
@@ -0,0 +1 @@
1
+ export declare function isString(value: any): value is string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.12",
2
+ "version": "1.0.14",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "homepage": "https://rolandzwaga.github.io/eligius/",
@@ -50,14 +50,14 @@
50
50
  "@types/jasmine": "4.3.0",
51
51
  "@types/jquery": "3.5.14",
52
52
  "@types/jsdom": "^20.0.0",
53
- "@types/node": "18.11.5",
53
+ "@types/node": "18.11.7",
54
54
  "@types/sinon": "10.0.13",
55
55
  "@types/uuid": "8.3.4",
56
56
  "acorn": "8.8.1",
57
57
  "ajv": "8.11.0",
58
58
  "astring": "1.8.3",
59
59
  "babel-jest": "29.2.2",
60
- "canvas": "2.10.1",
60
+ "canvas": "2.10.2",
61
61
  "chai": "4.3.6",
62
62
  "cross-env": "7.0.3",
63
63
  "dts-cli": "1.6.0",
@@ -72,9 +72,9 @@
72
72
  "size-limit": "8.1.0",
73
73
  "ts-morph": "16.0.0",
74
74
  "ts-node": "10.9.1",
75
- "tsconfig-paths": "^4.1.0",
75
+ "tsconfig-paths": "4.1.0",
76
76
  "tslib": "2.4.0",
77
- "typedoc": "0.23.18",
77
+ "typedoc": "0.23.19",
78
78
  "typedoc-plugin-missing-exports": "1.0.0",
79
79
  "typescript": "4.8.4",
80
80
  "uvu": "0.5.6"
@@ -1 +0,0 @@
1
- export declare function isPromise(obj: any): obj is Promise<unknown>;
@@ -1 +0,0 @@
1
- export declare function extractOperationDataArgumentValues(sourceObject: any, argumentValue: string | any): any;
@@ -1 +0,0 @@
1
- export declare function getNestedPropertyValue(propertyChain: string, sourceObject: any): any;
@@ -1 +0,0 @@
1
- export declare function getNestedValue(properties: any, sourceObject: any): any;