eligius 1.0.13 → 1.0.15

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 +4719 -3636
  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 +4704 -3636
  10. package/dist/eligius.esm.js.map +1 -1
  11. package/dist/index.d.ts +1 -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 +1 -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 +1 -1
  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
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './action';
2
2
  export * from './action/types';
3
3
  export * from './build';
4
+ export * from './configuration/api';
4
5
  export { ConfigurationResolver } from './configuration/configuration-resolver';
5
6
  export * from './configuration/types';
6
7
  export * from './controllers';
@@ -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;
@@ -28,7 +28,7 @@ export declare class RequestAnimationFrameTimelineProvider implements ITimelineP
28
28
  private _resize;
29
29
  private _container;
30
30
  private _stopAnimationInterval;
31
- init(): Promise<any>;
31
+ init(): Promise<void>;
32
32
  destroy(): void;
33
33
  toggleplay(): void;
34
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.13",
2
+ "version": "1.0.15",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "homepage": "https://rolandzwaga.github.io/eligius/",
@@ -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;