eligius 1.0.1 → 1.0.3

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 (66) hide show
  1. package/README.md +281 -4
  2. package/dist/action/endable-action.d.ts +1 -1
  3. package/dist/configuration/types.d.ts +2 -2
  4. package/dist/controllers/metadata/{EventListenerController.d.ts → event-listener-controller.d.ts} +1 -1
  5. package/dist/controllers/metadata/index.d.ts +7 -0
  6. package/dist/controllers/metadata/{LabelController.d.ts → label-controller.d.ts} +1 -1
  7. package/dist/controllers/metadata/{LottieController.d.ts → lottie-controller.d.ts} +1 -1
  8. package/dist/controllers/metadata/{NavigationController.d.ts → navigation-controller.d.ts} +1 -1
  9. package/dist/controllers/metadata/{ProgressbarController.d.ts → progressbar-controller.d.ts} +1 -1
  10. package/dist/controllers/metadata/{RoutingController.d.ts → routing-controller.d.ts} +1 -1
  11. package/dist/controllers/metadata/{SubtitlesController.d.ts → subtitles-controller.d.ts} +1 -1
  12. package/dist/eligius-engine.d.ts +27 -31
  13. package/dist/eligius.cjs.development.js +2935 -2700
  14. package/dist/eligius.cjs.development.js.map +1 -1
  15. package/dist/eligius.cjs.production.min.js +1 -1
  16. package/dist/eligius.cjs.production.min.js.map +1 -1
  17. package/dist/eligius.esm.js +3541 -3310
  18. package/dist/eligius.esm.js.map +1 -1
  19. package/dist/eventbus/types.d.ts +1 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/operation/add-class.d.ts +6 -0
  22. package/dist/operation/add-controller-to-element.d.ts +6 -1
  23. package/dist/operation/add-globals-to-operation.d.ts +7 -0
  24. package/dist/operation/animate-with-class.d.ts +8 -0
  25. package/dist/operation/animate.d.ts +7 -0
  26. package/dist/operation/broadcast-event.d.ts +7 -0
  27. package/dist/operation/clear-element.d.ts +3 -0
  28. package/dist/operation/clear-operation-data.d.ts +4 -0
  29. package/dist/operation/create-element.d.ts +8 -0
  30. package/dist/operation/custom-function.d.ts +7 -0
  31. package/dist/operation/end-action.d.ts +6 -0
  32. package/dist/operation/end-loop.d.ts +8 -1
  33. package/dist/operation/extend-controller.d.ts +3 -0
  34. package/dist/operation/get-controller-from-element.d.ts +6 -0
  35. package/dist/operation/get-controller-instance.d.ts +10 -0
  36. package/dist/operation/get-element-dimensions.d.ts +19 -1
  37. package/dist/operation/get-import.d.ts +8 -1
  38. package/dist/operation/helper/get-element-data.d.ts +1 -0
  39. package/dist/operation/helper/merge-operation-data.d.ts +1 -1
  40. package/dist/operation/helper/modify-dimensions.d.ts +19 -1
  41. package/dist/operation/load-json.d.ts +10 -0
  42. package/dist/operation/log.d.ts +6 -0
  43. package/dist/operation/metadata/add-globals-to-operation.d.ts +2 -2
  44. package/dist/operation/metadata/types.d.ts +11 -3
  45. package/dist/operation/remove-class.d.ts +6 -0
  46. package/dist/operation/remove-controller-from-element.d.ts +6 -0
  47. package/dist/operation/remove-element.d.ts +6 -0
  48. package/dist/operation/remove-properties-from-operation-data.d.ts +6 -0
  49. package/dist/operation/reparent-element.d.ts +7 -0
  50. package/dist/operation/request-action.d.ts +7 -0
  51. package/dist/operation/resize-action.d.ts +6 -0
  52. package/dist/operation/select-element.d.ts +12 -0
  53. package/dist/operation/set-element-attributes.d.ts +7 -1
  54. package/dist/operation/set-element-content.d.ts +13 -1
  55. package/dist/operation/set-operation-data.d.ts +7 -0
  56. package/dist/operation/set-style.d.ts +9 -2
  57. package/dist/operation/start-action.d.ts +10 -0
  58. package/dist/operation/start-loop.d.ts +10 -0
  59. package/dist/operation/toggle-class.d.ts +6 -0
  60. package/dist/operation/toggle-element.d.ts +6 -0
  61. package/dist/operation/types.d.ts +1 -1
  62. package/dist/operation/wait.d.ts +9 -0
  63. package/dist/timelineproviders/index.d.ts +0 -1
  64. package/dist/{test/unit/operation → util}/apply-operation.d.ts +1 -1
  65. package/package.json +89 -96
  66. package/CHANGELOG.md +0 -11
@@ -4,7 +4,7 @@ export interface IEventbus {
4
4
  clear(): void;
5
5
  on(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventHandlerRemover;
6
6
  off(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
7
- once(eventName: string, eventHandler: Function, eventTopic?: string): void;
7
+ once(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
8
8
  broadcast(eventName: string, args?: any[]): void;
9
9
  broadcastForTopic(eventName: string, eventTopic: string, args?: any[]): void;
10
10
  registerEventlistener(eventbusListener: IEventbusListener): void;
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './eventbus/types';
11
11
  export { WebpackResourceImporter } from './importer';
12
12
  export { LanguageManager } from './language-manager';
13
13
  export * from './operation';
14
+ export * as metadata from './operation/metadata';
14
15
  export * from './operation/types';
15
16
  export { TimelineEventNames } from './timeline-event-names';
16
17
  export * from './timelineproviders';
@@ -4,4 +4,10 @@ export interface IAddClassOperationData {
4
4
  selectedElement: JQuery;
5
5
  className: string;
6
6
  }
7
+ /**
8
+ * This operation adds the specified class name to the specified selected element.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const addClass: TOperation<IAddClassOperationData>;
@@ -4,6 +4,11 @@ import { TOperation } from './types';
4
4
  export interface IAddControllerToElementOperationData {
5
5
  selectedElement: JQuery;
6
6
  controllerInstance: IController<any>;
7
- [key: string]: any;
8
7
  }
8
+ /**
9
+ * This operation adds the specified controller instance to the specified selected element.
10
+ *
11
+ * @param operationData
12
+ * @returns
13
+ */
9
14
  export declare const addControllerToElement: TOperation<IAddControllerToElementOperationData>;
@@ -2,4 +2,11 @@ import { TOperation } from './types';
2
2
  export interface IAddGlobalsToOperationData {
3
3
  globalProperties: string[];
4
4
  }
5
+ /**
6
+ * This operation adds the specified global property names to the current operation data.
7
+ * It finally removes the globalProperties property from the current operation data.
8
+ *
9
+ * @param operationData
10
+ * @returns
11
+ */
5
12
  export declare const addGlobalsToOperation: TOperation<IAddGlobalsToOperationData>;
@@ -5,4 +5,12 @@ export interface IAnimateWithClassOperationData {
5
5
  className: string;
6
6
  removeClass?: boolean;
7
7
  }
8
+ /**
9
+ * This operation adds the specified class name to the specified selected element and assumes that this
10
+ * class triggers and animation on the selected element. It then waits for this animation to complete
11
+ * until it resolves.
12
+ *
13
+ * @param operationData
14
+ * @returns
15
+ */
8
16
  export declare const animateWithClass: TOperation<IAnimateWithClassOperationData>;
@@ -6,4 +6,11 @@ export interface IAnimateOperationData {
6
6
  animationProperties: any;
7
7
  animationDuration: number;
8
8
  }
9
+ /**
10
+ * This operation animates the specified selected element with the given jQuery animation settings.
11
+ * It resolves after the animation completes.
12
+ *
13
+ * @param operationData
14
+ * @returns
15
+ */
9
16
  export declare const animate: TOperation<IAnimateOperationData>;
@@ -4,4 +4,11 @@ export interface IBroadcastEventOperationData {
4
4
  eventTopic?: string;
5
5
  eventName: string;
6
6
  }
7
+ /**
8
+ * This operation broadcasts the given event through the eventbus, along with the
9
+ * event argumetns and optional event topic.
10
+ *
11
+ * @param operationData
12
+ * @returns
13
+ */
7
14
  export declare const broadcastEvent: TOperation<IBroadcastEventOperationData>;
@@ -3,4 +3,7 @@ import { TOperation } from './types';
3
3
  export interface IClearElementOperationData {
4
4
  selectedElement: JQuery;
5
5
  }
6
+ /**
7
+ * This operation removes all of the children from the specified selected element.
8
+ */
6
9
  export declare const clearElement: TOperation<IClearElementOperationData>;
@@ -2,4 +2,8 @@ import { TOperation } from './types';
2
2
  export interface IClearOperationDataOperationData {
3
3
  properties?: string[];
4
4
  }
5
+ /**
6
+ * This operation removes all of the properties on the current operation date.
7
+ * Or, if the properties property is set only removes the properties defined by that list.
8
+ */
5
9
  export declare const clearOperationData: TOperation<IClearOperationDataOperationData>;
@@ -8,4 +8,12 @@ export interface ICreateElementOperationData<T extends TTagNames> {
8
8
  propertyName?: string;
9
9
  template?: JQuery;
10
10
  }
11
+ /**
12
+ * This operation creates the DOM element defined by the given properties and assigns
13
+ * the instance to the give property name on the current operation data.
14
+ * The property name defaults to 'template'.
15
+ *
16
+ * @param operationData
17
+ * @returns
18
+ */
11
19
  export declare const createElement: TOperation<ICreateElementOperationData<any>>;
@@ -2,4 +2,11 @@ import { TOperation } from './types';
2
2
  export interface ICustomFunctionOperationData {
3
3
  systemName: string;
4
4
  }
5
+ /**
6
+ * This operation retrieves a custom function defined by the specified system name
7
+ * and invokes it with the current operation data and eventbus.
8
+ *
9
+ * @param operationData
10
+ * @returns
11
+ */
5
12
  export declare const customFunction: TOperation<ICustomFunctionOperationData>;
@@ -4,4 +4,10 @@ export interface IEndActionOperationData {
4
4
  actionInstance: IEndableAction;
5
5
  actionOperationData: any;
6
6
  }
7
+ /**
8
+ * This operation invokes the end() method on the specified action instance.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const endAction: TOperation<IEndActionOperationData>;
@@ -1,2 +1,9 @@
1
+ import { TOperationData } from '.';
1
2
  import { TOperation } from './types';
2
- export declare const endLoop: TOperation<unknown>;
3
+ /**
4
+ * This operation checks if the current loop should end or start the next iteration.
5
+ *
6
+ * @param operationData
7
+ * @returns
8
+ */
9
+ export declare const endLoop: TOperation<TOperationData>;
@@ -1,5 +1,8 @@
1
1
  import { IController } from '../controllers/types';
2
2
  import { TOperation } from './types';
3
+ /**
4
+ * This operation extends the specified controller instance with the specified extension.
5
+ */
3
6
  export interface IExtendControllerOperationData {
4
7
  controllerInstance: IController<any>;
5
8
  controllerExtension: any;
@@ -6,4 +6,10 @@ export interface IGetControllerFromElementOperationData {
6
6
  controllerName: string;
7
7
  controllerInstance?: IController<any>;
8
8
  }
9
+ /**
10
+ * This operation retrieves the controller instance with the specified name from the specified selected element.
11
+ *
12
+ * @param operationData
13
+ * @returns
14
+ */
9
15
  export declare const getControllerFromElement: TOperation<IGetControllerFromElementOperationData>;
@@ -1,9 +1,19 @@
1
1
  import * as controllers from '../controllers';
2
+ import { IController } from '../controllers/types';
2
3
  import { TOperation } from './types';
3
4
  declare type TSystemName = keyof typeof controllers;
4
5
  export interface IGetControllerInstanceOperationData {
5
6
  systemName: TSystemName;
6
7
  propertyName?: string;
8
+ controllerInstance?: IController<unknown>;
7
9
  }
10
+ /**
11
+ * This operation retrieves an instance of the given controller name.
12
+ * It assigns this instance to the property on the current operation data
13
+ * defined by the propertyName property which defaults to 'controllerInstance'.
14
+ *
15
+ * @param operationData
16
+ * @returns
17
+ */
8
18
  export declare const getControllerInstance: TOperation<IGetControllerInstanceOperationData>;
9
19
  export {};
@@ -2,10 +2,28 @@
2
2
  import { TOperation } from './types';
3
3
  export interface IGetElementDimensionsOperationData {
4
4
  selectedElement: JQuery;
5
- modifier: string;
5
+ modifier?: string;
6
6
  dimensions?: {
7
7
  width?: number;
8
8
  height?: number;
9
9
  };
10
10
  }
11
+ /**
12
+ * This operation calculates the width and height of the specified selected element.
13
+ * It assigns this struct to the dimensions property on the current operation data.
14
+ * Optionally the width and height can be tweaked using the given modifier string.
15
+ *
16
+ * The modifier string is formatted in the following way:
17
+ *
18
+ * <operator><amount><optional-side><optional-precentage>|<ratio-definition>
19
+ *
20
+ * Where the ratio modifier is formatted in the following way:
21
+ * <side>[ar=<ratio-left>-<ratio-right>]
22
+ *
23
+ * For example, this modifier '+100h|w[ar=8-1]' will modifiy the dimensions like this:
24
+ * it will add a value of 100 to the height and modify the width by a ration of 8 to 1 relative to the height.
25
+ *
26
+ * @param operationData
27
+ * @returns
28
+ */
11
29
  export declare const getElementDimensions: TOperation<IGetElementDimensionsOperationData>;
@@ -1,6 +1,13 @@
1
1
  import { TOperation } from './types';
2
2
  export interface IGetImportOperationData {
3
3
  systemName: string;
4
- importedInstance: any;
4
+ importedInstance?: any;
5
5
  }
6
+ /**
7
+ * This operation retrieves the import specified by the given system name and
8
+ * assigns it to the importedInstance property on the current operaton date.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
6
13
  export declare const getImport: TOperation<IGetImportOperationData>;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="jquery" />
2
2
  import { IController } from '../../controllers/types';
3
+ export declare const controllersDataName = "eligiusEngineControllers";
3
4
  declare function getElementData(name: string, element: JQuery): IController<any>[];
4
5
  declare const getElementControllers: (element: JQuery<HTMLElement>) => IController<any>[];
5
6
  export { getElementData, getElementControllers };
@@ -1,2 +1,2 @@
1
- import { TOperationData } from '../../operation/types';
1
+ import { TOperationData } from '../types';
2
2
  export declare function mergeOperationData<T extends TOperationData, K = T>(operationData: T, newOperationData: TOperationData): K;
@@ -1,2 +1,20 @@
1
1
  import { IDimensions } from '../../types';
2
- export declare function modifyDimensions(dimensions: IDimensions, modifier: string): void;
2
+ /**
3
+ * Modifies the given dimensions using the given modifier string.
4
+ * The modifier string is formatted in the following way:
5
+ *
6
+ * <operator><amount><optional-side><optional-precentage>|<ratio-definition>
7
+ *
8
+ * Where the ratio modifier is formatted in the following way:
9
+ * <side>[ar=<ratio-left>-<ratio-right>]
10
+ *
11
+ * For example, this modifier '+100h|w[ar=8-1]' will modifiy the dimensions like this:
12
+ * it will add a value of 100 to the height and modify the width by a ration of 8 to 1 relative to the height.
13
+ *
14
+ * @param dimensions
15
+ * @param modifier
16
+ */
17
+ export declare function modifyDimensions(dimensions: IDimensions, modifier: string): {
18
+ width: number;
19
+ height: number;
20
+ };
@@ -7,4 +7,14 @@ export interface ILoadJSONOperationData {
7
7
  }
8
8
  export declare const clearCache: () => void;
9
9
  export declare const addToCache: (key: string, value: any) => void;
10
+ /**
11
+ * This operation loads a JSON file from the specified url and assigns it to the specified
12
+ * property name on the current operation data. The property name defaults to 'json'.
13
+ *
14
+ * If the cache property is set to true and a cached value already exists, this is assigned
15
+ * instead of re-retrieving it from the url.
16
+ *
17
+ * @param operationData
18
+ * @returns
19
+ */
10
20
  export declare const loadJSON: TOperation<ILoadJSONOperationData>;
@@ -1,2 +1,8 @@
1
1
  import { TOperation } from './types';
2
+ /**
3
+ * This operation logs the current operation data and context.
4
+ *
5
+ * @param operationData
6
+ * @returns
7
+ */
2
8
  export declare const log: TOperation;
@@ -1,4 +1,4 @@
1
- import { IAddControllerToElementOperationData } from '../../operation/add-controller-to-element';
1
+ import { IAddGlobalsToOperationData } from '../add-globals-to-operation';
2
2
  import { IOperationMetadata } from './types';
3
- declare function addGlobalsToOperation(): IOperationMetadata<IAddControllerToElementOperationData>;
3
+ declare function addGlobalsToOperation(): IOperationMetadata<IAddGlobalsToOperationData>;
4
4
  export default addGlobalsToOperation;
@@ -8,11 +8,19 @@ export declare type TArrayProperyMetadata = {
8
8
  itemType: TParameterTypes;
9
9
  required?: boolean;
10
10
  };
11
- export declare type TPropertyMetadata = TComplexProperyMetadata | TArrayProperyMetadata | TParameterTypes;
11
+ export declare type TConstantParametersTypes = {
12
+ value: string;
13
+ description: string;
14
+ default?: boolean;
15
+ };
16
+ export declare type TPropertyMetadata = TComplexProperyMetadata | TArrayProperyMetadata | TParameterTypes | TConstantParametersTypes[];
17
+ export declare type TPropertiesMetadata<T> = {
18
+ [P in keyof T]?: TPropertyMetadata;
19
+ };
12
20
  export interface IOperationMetadata<T> {
13
21
  description: string;
14
22
  dependentProperties?: (keyof T)[];
15
- properties?: Record<string, TPropertyMetadata>;
16
- outputProperties?: Record<string, TParameterTypes>;
23
+ properties?: TPropertiesMetadata<T>;
24
+ outputProperties?: TPropertiesMetadata<T>;
17
25
  }
18
26
  export declare type TParameterTypes = 'ParameterType:htmlElementName' | 'ParameterType:className' | 'ParameterType:selector' | 'ParameterType:string' | 'ParameterType:integer' | 'ParameterType:object' | 'ParameterType:boolean' | 'ParameterType:array' | 'ParameterType:eventTopic' | 'ParameterType:eventName' | 'ParameterType:systemName' | 'ParameterType:actionName' | 'ParameterType:controllerName' | 'ParameterType:dimensions' | 'ParameterType:dimensionsModifier' | 'ParameterType:url' | 'ParameterType:htmlContent' | 'ParameterType:labelId' | 'ParameterType:ImagePath' | 'ParameterType:QuadrantPosition';
@@ -4,4 +4,10 @@ export interface IRemoveClassOperationData {
4
4
  selectedElement: JQuery;
5
5
  className: string;
6
6
  }
7
+ /**
8
+ * This operation removes the spcified class name from the specified selected element.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const removeClass: TOperation<IRemoveClassOperationData>;
@@ -4,4 +4,10 @@ export interface IRemoveControllerFromElementOperationData {
4
4
  selectedElement: JQuery;
5
5
  controllerName: string;
6
6
  }
7
+ /**
8
+ * This operation removes the controller with the specified name from the specified selected element.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const removeControllerFromElement: TOperation<IRemoveControllerFromElementOperationData>;
@@ -3,4 +3,10 @@ import { TOperation } from './types';
3
3
  export interface IRemoveElementOperationData {
4
4
  selectedElement: JQuery;
5
5
  }
6
+ /**
7
+ * This operation removes the specified selected element from the DOM.
8
+ *
9
+ * @param operationData
10
+ * @returns
11
+ */
6
12
  export declare const removeElement: TOperation<IRemoveElementOperationData>;
@@ -2,4 +2,10 @@ import { TOperation } from './types';
2
2
  export interface IRemovePropertiesFromOperationDataOperationData {
3
3
  propertyNames: string[];
4
4
  }
5
+ /**
6
+ * This operation removes the given list of properties from the current operation data.
7
+ *
8
+ * @param operationData
9
+ * @returns
10
+ */
5
11
  export declare const removePropertiesFromOperationData: TOperation<IRemovePropertiesFromOperationDataOperationData>;
@@ -4,4 +4,11 @@ export interface IReparentElementOperationData {
4
4
  selectedElement: JQuery;
5
5
  newParentSelector: string;
6
6
  }
7
+ /**
8
+ * This operation moves the specified selected element to the new parent that is defined
9
+ * by the specified selector.
10
+ *
11
+ * @param operationData
12
+ * @returns
13
+ */
7
14
  export declare const reparentElement: TOperation<IReparentElementOperationData>;
@@ -4,4 +4,11 @@ export interface IRequestActionOperationData {
4
4
  systemName: string;
5
5
  actionInstance?: IAction;
6
6
  }
7
+ /**
8
+ * This operation requests an action instance with the specified name and assigns it
9
+ * to the actionInstance property on the current operation data.
10
+ *
11
+ * @param operationData
12
+ * @returns
13
+ */
7
14
  export declare const requestAction: TOperation<IRequestActionOperationData>;
@@ -3,4 +3,10 @@ export interface IResizeActionOperationData {
3
3
  actionInstance: any;
4
4
  actionOperationData: any;
5
5
  }
6
+ /**
7
+ * @deprecated
8
+ *
9
+ * @param operationData
10
+ * @returns
11
+ */
6
12
  export declare const resizeAction: TOperation<IResizeActionOperationData>;
@@ -1,7 +1,19 @@
1
+ /// <reference types="jquery" />
1
2
  import { TOperation } from './types';
2
3
  export interface ISelectElementOperationData {
3
4
  selector: string;
4
5
  propertyName?: string;
5
6
  useSelectedElementAsRoot?: boolean;
7
+ selectedElement?: JQuery;
6
8
  }
9
+ /**
10
+ * This operation selects one or more elements using the specified selector.
11
+ *
12
+ * If useSelectedElementAsRoot is set to true and a valid DOM element is assigned
13
+ * to the current operation data defined by the given property name (defaults to 'selectedElement')
14
+ * then the element will be looked for only in the child elements of this DOM element.
15
+ *
16
+ * @param operationData
17
+ * @returns
18
+ */
7
19
  export declare const selectElement: TOperation<ISelectElementOperationData>;
@@ -1,7 +1,13 @@
1
1
  /// <reference types="jquery" />
2
2
  import { TOperation } from './types';
3
3
  export interface ISetElementAttributesOperationData {
4
- attributes: any;
4
+ attributes: Record<string, any>;
5
5
  selectedElement: JQuery;
6
6
  }
7
+ /**
8
+ * This operation sets the given set of attributes on the specified selected element.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const setElementAttributes: TOperation<ISetElementAttributesOperationData>;
@@ -3,6 +3,18 @@ import { TOperation } from './types';
3
3
  export interface ISetElementContentOperationData {
4
4
  selectedElement: JQuery;
5
5
  template: string | JQuery.Node;
6
- insertionType?: 'append' | 'prepend';
6
+ insertionType: 'overwrite' | 'append' | 'prepend';
7
7
  }
8
+ /**
9
+ * This operation sets the specified content defined by the value assigned to the template property
10
+ * to the specified selected element.
11
+ *
12
+ * When the insertionType is set to 'overwrite' the contents of the selected element are replaced
13
+ * by the given template.
14
+ * When set to 'append' the new content will be inserted after the current content.
15
+ * When set to 'prepend' the new content will be inserted before the current content.
16
+ *
17
+ * @param operationData
18
+ * @returns
19
+ */
8
20
  export declare const setElementContent: TOperation<ISetElementContentOperationData>;
@@ -3,4 +3,11 @@ export interface ISetOperationData {
3
3
  override?: boolean;
4
4
  properties: any;
5
5
  }
6
+ /**
7
+ * This operation assigns the specified properties to the current operation data.
8
+ * When override is set to true the properties replace the current operation data entirely.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
6
13
  export declare const setOperationData: TOperation<ISetOperationData>;
@@ -1,8 +1,15 @@
1
- /// <reference types="jquery" />
2
1
  import { TOperation } from './types';
3
2
  export interface ISetStyleOperationData {
4
3
  properties: any;
5
4
  propertyName?: string;
6
- selectedElement?: JQuery;
7
5
  }
6
+ /**
7
+ * This operation assigns the specified CSS style properties to the
8
+ * specified selected element. The selected element is assigned to
9
+ * the property defined by the propertyName property which defaults
10
+ * to 'selectedElement'.
11
+ *
12
+ * @param operationData
13
+ * @returns
14
+ */
8
15
  export declare const setStyle: TOperation<ISetStyleOperationData>;
@@ -4,4 +4,14 @@ export interface IStartActionOperationData {
4
4
  actionInstance: IAction;
5
5
  actionOperationData: any;
6
6
  }
7
+ /**
8
+ * This operation starts the specified action instance using the specified action operation data.
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
+ *
14
+ * @param operationData
15
+ * @returns
16
+ */
7
17
  export declare const startAction: TOperation<IStartActionOperationData>;
@@ -3,4 +3,14 @@ export declare type TStartLoopOperationData = {
3
3
  collection: any[] | string;
4
4
  propertyName?: string;
5
5
  };
6
+ /**
7
+ * This operation starts a loop using the given collection.
8
+ *
9
+ * Each iteration the current item from the specified collection is
10
+ * assigned to the property on the current operation data specified
11
+ * by the propertyName property which defaults to 'currentItem'.
12
+ *
13
+ * @param operationData
14
+ * @returns
15
+ */
6
16
  export declare const startLoop: TOperation<TStartLoopOperationData>;
@@ -4,4 +4,10 @@ export interface IToggleClassOperationData {
4
4
  selectedElement: JQuery;
5
5
  className: string;
6
6
  }
7
+ /**
8
+ * This operation toggles the specfied class name on the specified selected element.
9
+ *
10
+ * @param operationData
11
+ * @returns
12
+ */
7
13
  export declare const toggleClass: TOperation<IToggleClassOperationData>;
@@ -3,4 +3,10 @@ import { TOperation } from './types';
3
3
  export interface IToggleElementOperationData {
4
4
  selectedElement: JQuery;
5
5
  }
6
+ /**
7
+ * This operation toggles the visibility of the specified selected element
8
+ *
9
+ * @param operationData
10
+ * @returns
11
+ */
6
12
  export declare const toggleElement: TOperation<IToggleElementOperationData>;
@@ -1,4 +1,5 @@
1
1
  import { IEventbus } from '../eventbus';
2
+ export declare type TOperationData = any;
2
3
  export declare type TOperationResult<T = TOperationData> = Promise<T> | T;
3
4
  export interface IOperationContext {
4
5
  loopIndex?: number;
@@ -10,4 +11,3 @@ export interface IOperationContext {
10
11
  eventbus: IEventbus;
11
12
  }
12
13
  export declare type TOperation<T = TOperationData> = (this: IOperationContext, operationData: T) => TOperationResult<T>;
13
- export declare type TOperationData = any;
@@ -1,5 +1,14 @@
1
1
  import { TOperation } from './types';
2
+ /**
3
+ *
4
+ */
2
5
  export interface IWaitOperationData {
3
6
  milliseconds: number;
4
7
  }
8
+ /**
9
+ * This operation waits for the specified amount of milliseconds.
10
+ *
11
+ * @param operationData
12
+ * @returns
13
+ */
5
14
  export declare const wait: TOperation<IWaitOperationData>;
@@ -1,3 +1,2 @@
1
1
  export { JwPlayerTimelineProvider } from './jwplayer-timeline-provider';
2
- export { MediaElementTimelineProvider } from './media-element-timeline-provider';
3
2
  export { RequestAnimationFrameTimelineProvider } from './request-animation-frame-timeline-provider';
@@ -1,3 +1,3 @@
1
- import { IOperationContext, TOperation } from '../../../operation';
1
+ import { IOperationContext, TOperation } from '../operation';
2
2
  export declare const defaultContext: IOperationContext;
3
3
  export declare function applyOperation<T = TOperation>(operation: TOperation<any>, operationData: any, context?: IOperationContext): T;