eligius 1.1.3 → 1.1.5
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.
- package/README.md +8 -7
- package/dist/chunk-CTAAG5j7.js +13 -0
- package/dist/index.d.ts +2984 -22
- package/dist/index.js +5857 -7
- package/dist/index.js.map +1 -0
- package/package.json +61 -46
- package/dist/action/action.d.ts +0 -17
- package/dist/action/endable-action.d.ts +0 -9
- package/dist/action/index.d.ts +0 -3
- package/dist/action/timeline-action.d.ts +0 -14
- package/dist/action/types.d.ts +0 -17
- package/dist/build/generate-importer-source-code.d.ts +0 -15
- package/dist/build/index.d.ts +0 -1
- package/dist/configuration/api/action-creator-factory.d.ts +0 -31
- package/dist/configuration/api/action-editor.d.ts +0 -44
- package/dist/configuration/api/configuration-factory.d.ts +0 -135
- package/dist/configuration/api/index.d.ts +0 -7
- package/dist/configuration/api/label-editor.d.ts +0 -11
- package/dist/configuration/api/name-providers.d.ts +0 -13
- package/dist/configuration/api/subtitle-converter.d.ts +0 -11
- package/dist/configuration/api/subtitle-editor.d.ts +0 -24
- package/dist/configuration/api/timeline-provider-settings-editor.d.ts +0 -22
- package/dist/configuration/configuration-resolver.d.ts +0 -18
- package/dist/configuration/types.d.ts +0 -102
- package/dist/controllers/event-listener-controller.d.ts +0 -36
- package/dist/controllers/index.d.ts +0 -7
- package/dist/controllers/label-controller.d.ts +0 -31
- package/dist/controllers/lottie-controller.d.ts +0 -47
- package/dist/controllers/metadata/event-listener-controller.d.ts +0 -4
- package/dist/controllers/metadata/index.d.ts +0 -7
- package/dist/controllers/metadata/label-controller.d.ts +0 -4
- package/dist/controllers/metadata/lottie-controller.d.ts +0 -4
- package/dist/controllers/metadata/navigation-controller.d.ts +0 -4
- package/dist/controllers/metadata/progressbar-controller.d.ts +0 -4
- package/dist/controllers/metadata/routing-controller.d.ts +0 -4
- package/dist/controllers/metadata/subtitles-controller.d.ts +0 -4
- package/dist/controllers/metadata/types.d.ts +0 -6
- package/dist/controllers/navigation-controller.d.ts +0 -39
- package/dist/controllers/progressbar-controller.d.ts +0 -26
- package/dist/controllers/routing-controller.d.ts +0 -27
- package/dist/controllers/subtitles-controller.d.ts +0 -27
- package/dist/controllers/types.d.ts +0 -8
- package/dist/diagnostics/devtool-event-listener.d.ts +0 -7
- package/dist/diagnostics/diagnostics.d.ts +0 -5
- package/dist/diagnostics/index.d.ts +0 -3
- package/dist/diagnostics/types.d.ts +0 -28
- package/dist/eligius-engine.d.ts +0 -88
- package/dist/eligius-flow-controller.d.ts +0 -8
- package/dist/engine-factory.d.ts +0 -38
- package/dist/eventbus/actionregistry-eventbus-listener.d.ts +0 -11
- package/dist/eventbus/eventbus.d.ts +0 -18
- package/dist/eventbus/index.d.ts +0 -4
- package/dist/eventbus/request-video-uri-interceptor.d.ts +0 -6
- package/dist/eventbus/types.d.ts +0 -18
- package/dist/importer/eligius-resource-importer.d.ts +0 -9
- package/dist/importer/index.d.ts +0 -1
- package/dist/index.cjs +0 -6417
- package/dist/index.cjs.map +0 -7
- package/dist/index.cjs.min.js +0 -8
- package/dist/index.cjs.min.js.map +0 -7
- package/dist/index.esm.js +0 -8
- package/dist/index.esm.js.map +0 -7
- package/dist/language-manager.d.ts +0 -24
- package/dist/operation/add-class.d.ts +0 -14
- package/dist/operation/add-controller-to-element.d.ts +0 -15
- package/dist/operation/add-globals-to-operation.d.ts +0 -12
- package/dist/operation/animate-with-class.d.ts +0 -17
- package/dist/operation/animate.d.ts +0 -17
- package/dist/operation/broadcast-event.d.ts +0 -13
- package/dist/operation/calc.d.ts +0 -14
- package/dist/operation/clear-element.d.ts +0 -11
- package/dist/operation/clear-operation-data.d.ts +0 -10
- package/dist/operation/create-element.d.ts +0 -18
- package/dist/operation/custom-function.d.ts +0 -12
- package/dist/operation/end-action.d.ts +0 -17
- package/dist/operation/end-for-each.d.ts +0 -8
- package/dist/operation/end-when.d.ts +0 -8
- package/dist/operation/extend-controller.d.ts +0 -10
- package/dist/operation/for-each.d.ts +0 -19
- package/dist/operation/get-attributes-from-element.d.ts +0 -21
- package/dist/operation/get-controller-from-element.d.ts +0 -16
- package/dist/operation/get-controller-instance.d.ts +0 -17
- package/dist/operation/get-element-dimensions.d.ts +0 -30
- package/dist/operation/get-import.d.ts +0 -13
- package/dist/operation/get-query-params.d.ts +0 -28
- package/dist/operation/helper/attach-controller-to-element.d.ts +0 -3
- package/dist/operation/helper/deep-copy.d.ts +0 -1
- package/dist/operation/helper/find-matching-operation-index.d.ts +0 -35
- package/dist/operation/helper/get-element-data.d.ts +0 -7
- package/dist/operation/helper/get-property-chain-value.d.ts +0 -24
- package/dist/operation/helper/globals.d.ts +0 -4
- package/dist/operation/helper/internal-resolve.d.ts +0 -2
- package/dist/operation/helper/merge-operation-data.d.ts +0 -2
- package/dist/operation/helper/modify-dimensions.d.ts +0 -20
- package/dist/operation/helper/remove-event-data-from-operation-data.d.ts +0 -2
- package/dist/operation/helper/remove-global.d.ts +0 -1
- package/dist/operation/helper/resolve-event-arguments.d.ts +0 -2
- package/dist/operation/helper/resolve-external-property-chain.d.ts +0 -14
- package/dist/operation/helper/resolve-property-chain.d.ts +0 -23
- package/dist/operation/helper/resolve-property-values.d.ts +0 -11
- package/dist/operation/helper/set-global.d.ts +0 -1
- package/dist/operation/index.d.ts +0 -46
- package/dist/operation/invoke-object-method.d.ts +0 -28
- package/dist/operation/load-json.d.ts +0 -28
- package/dist/operation/log.d.ts +0 -8
- package/dist/operation/math.d.ts +0 -12
- package/dist/operation/metadata/add-class.d.ts +0 -4
- package/dist/operation/metadata/add-controller-to-element.d.ts +0 -4
- package/dist/operation/metadata/add-globals-to-operation.d.ts +0 -4
- package/dist/operation/metadata/animate-with-class.d.ts +0 -4
- package/dist/operation/metadata/animate.d.ts +0 -4
- package/dist/operation/metadata/broadcast-event.d.ts +0 -4
- package/dist/operation/metadata/calc.d.ts +0 -4
- package/dist/operation/metadata/clear-element.d.ts +0 -4
- package/dist/operation/metadata/clear-operation-data.d.ts +0 -4
- package/dist/operation/metadata/create-element.d.ts +0 -4
- package/dist/operation/metadata/custom-function.d.ts +0 -4
- package/dist/operation/metadata/end-action.d.ts +0 -4
- package/dist/operation/metadata/end-for-each.d.ts +0 -3
- package/dist/operation/metadata/end-when.d.ts +0 -3
- package/dist/operation/metadata/extend-controller.d.ts +0 -4
- package/dist/operation/metadata/for-each.d.ts +0 -4
- package/dist/operation/metadata/get-attributes-from-element.d.ts +0 -4
- package/dist/operation/metadata/get-controller-from-element.d.ts +0 -4
- package/dist/operation/metadata/get-controller-instance.d.ts +0 -4
- package/dist/operation/metadata/get-element-dimensions.d.ts +0 -4
- package/dist/operation/metadata/get-import.d.ts +0 -4
- package/dist/operation/metadata/get-query-params.d.ts +0 -4
- package/dist/operation/metadata/index.d.ts +0 -45
- package/dist/operation/metadata/invoke-object-method.d.ts +0 -4
- package/dist/operation/metadata/load-json.d.ts +0 -4
- package/dist/operation/metadata/log.d.ts +0 -3
- package/dist/operation/metadata/math.d.ts +0 -4
- package/dist/operation/metadata/otherwise.d.ts +0 -3
- package/dist/operation/metadata/remove-class.d.ts +0 -4
- package/dist/operation/metadata/remove-controller-from-element.d.ts +0 -4
- package/dist/operation/metadata/remove-element.d.ts +0 -4
- package/dist/operation/metadata/remove-properties-from-operation-data.d.ts +0 -4
- package/dist/operation/metadata/reparent-element.d.ts +0 -4
- package/dist/operation/metadata/request-action.d.ts +0 -4
- package/dist/operation/metadata/resize-action.d.ts +0 -4
- package/dist/operation/metadata/select-element.d.ts +0 -4
- package/dist/operation/metadata/set-data.d.ts +0 -4
- package/dist/operation/metadata/set-element-attributes.d.ts +0 -4
- package/dist/operation/metadata/set-element-content.d.ts +0 -4
- package/dist/operation/metadata/set-global-data.d.ts +0 -4
- package/dist/operation/metadata/set-operation-data.d.ts +0 -4
- package/dist/operation/metadata/set-style.d.ts +0 -4
- package/dist/operation/metadata/start-action.d.ts +0 -4
- package/dist/operation/metadata/toggle-class.d.ts +0 -4
- package/dist/operation/metadata/toggle-element.d.ts +0 -4
- package/dist/operation/metadata/types.d.ts +0 -29
- package/dist/operation/metadata/wait.d.ts +0 -4
- package/dist/operation/metadata/when.d.ts +0 -4
- package/dist/operation/otherwise.d.ts +0 -9
- package/dist/operation/remove-class.d.ts +0 -14
- package/dist/operation/remove-controller-from-element.d.ts +0 -14
- package/dist/operation/remove-element.d.ts +0 -13
- package/dist/operation/remove-properties-from-operation-data.d.ts +0 -12
- package/dist/operation/reparent-element.d.ts +0 -15
- package/dist/operation/request-action.d.ts +0 -14
- package/dist/operation/resize-action.d.ts +0 -12
- package/dist/operation/select-element.d.ts +0 -19
- package/dist/operation/set-data.d.ts +0 -21
- package/dist/operation/set-element-attributes.d.ts +0 -14
- package/dist/operation/set-element-content.d.ts +0 -21
- package/dist/operation/set-global-data.d.ts +0 -11
- package/dist/operation/set-operation-data.d.ts +0 -13
- package/dist/operation/set-style.d.ts +0 -15
- package/dist/operation/start-action.d.ts +0 -17
- package/dist/operation/toggle-class.d.ts +0 -23
- package/dist/operation/toggle-element.d.ts +0 -19
- package/dist/operation/types.d.ts +0 -55
- package/dist/operation/wait.d.ts +0 -14
- package/dist/operation/when.d.ts +0 -21
- package/dist/test/integration/create-language-selector.spec.d.ts +0 -1
- package/dist/test/integration/end-in-correct-order.spec.d.ts +0 -1
- package/dist/test/integration/for-each-loop.spec.d.ts +0 -1
- package/dist/test/integration/re-use-image-action.spec.d.ts +0 -1
- package/dist/test/integration/when-construction.spec.d.ts +0 -1
- package/dist/test/unit/action/action.spec.d.ts +0 -1
- package/dist/test/unit/build/generate-importer-source-code.spec.d.ts +0 -1
- package/dist/test/unit/chrono-trigger-engine.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/action-editor.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/configuration-factory.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/endable-action-editor.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/name-providers.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/subtitle-editor.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/timeline-action-editor.spec.d.ts +0 -1
- package/dist/test/unit/configuration/api/timeline-provider-settings-editor.spec.d.ts +0 -1
- package/dist/test/unit/configuration/configuration-resolver.spec.d.ts +0 -1
- package/dist/test/unit/controllers/EventListenerController.spec.d.ts +0 -1
- package/dist/test/unit/controllers/LabelController.spec.d.ts +0 -1
- package/dist/test/unit/engine-factory.spec.d.ts +0 -1
- package/dist/test/unit/eventbus/eventbus.spec.d.ts +0 -1
- package/dist/test/unit/importer/eligius-resource-importer.spec.d.ts +0 -1
- package/dist/test/unit/language-manager.spec.d.ts +0 -1
- package/dist/test/unit/operation/_operation-metadata.spec.d.ts +0 -1
- package/dist/test/unit/operation/add-class.spec.d.ts +0 -1
- package/dist/test/unit/operation/add-controller-to-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/add-globals-to-operation.spec.d.ts +0 -1
- package/dist/test/unit/operation/animate-with-class.spec.d.ts +0 -1
- package/dist/test/unit/operation/animate.spec.d.ts +0 -1
- package/dist/test/unit/operation/broadcast-event.spec.d.ts +0 -1
- package/dist/test/unit/operation/calc.spec.d.ts +0 -1
- package/dist/test/unit/operation/clear-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/clear-operation-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/create-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/custom-function.spec.d.ts +0 -1
- package/dist/test/unit/operation/end-action.spec.d.ts +0 -1
- package/dist/test/unit/operation/end-for-each.spec.d.ts +0 -1
- package/dist/test/unit/operation/end-when.spec.d.ts +0 -1
- package/dist/test/unit/operation/extend-controller.spec.d.ts +0 -1
- package/dist/test/unit/operation/for-each.spec.d.ts +0 -1
- package/dist/test/unit/operation/get-attributes-from-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/get-controller-from-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/get-controller-instance.spec.d.ts +0 -1
- package/dist/test/unit/operation/get-element-dimensions.spec.d.ts +0 -1
- package/dist/test/unit/operation/get-query-params.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/attach-controller-to-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/get-element-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/get-property-chain-value.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/globals.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/internal-resolve.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/merge-operation-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/modify-dimensions.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/remove-event-data-from-operation-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/remove-global.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/resolve-event-arguments.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/resolve-external-property-chain.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/resolve-property-values.spec.d.ts +0 -1
- package/dist/test/unit/operation/helper/set-global.spec.d.ts +0 -1
- package/dist/test/unit/operation/invoke-object-method.spec.d.ts +0 -1
- package/dist/test/unit/operation/load-json.spec.d.ts +0 -1
- package/dist/test/unit/operation/log.spec.d.ts +0 -1
- package/dist/test/unit/operation/math.spec.d.ts +0 -1
- package/dist/test/unit/operation/otherwise.spec.d.ts +0 -1
- package/dist/test/unit/operation/remove-class.spec.d.ts +0 -1
- package/dist/test/unit/operation/remove-properties-from-operation-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/reparent-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/request-action.spec.d.ts +0 -1
- package/dist/test/unit/operation/resize-action.spec.d.ts +0 -1
- package/dist/test/unit/operation/select-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-element-attributes.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-element-content.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-global-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-operation-data.spec.d.ts +0 -1
- package/dist/test/unit/operation/set-style.spec.d.ts +0 -1
- package/dist/test/unit/operation/start-action.spec.d.ts +0 -1
- package/dist/test/unit/operation/toggle-class.spec.d.ts +0 -1
- package/dist/test/unit/operation/toggle-element.spec.d.ts +0 -1
- package/dist/test/unit/operation/wait.spec.d.ts +0 -1
- package/dist/test/unit/operation/when.spec.d.ts +0 -1
- package/dist/test/unit/timelineproviders/request-animation-frame-timeline-provider.spec.d.ts +0 -1
- package/dist/test/unit/util/prepare-value-for-serialization.spec.d.ts +0 -1
- package/dist/timeline-event-names.d.ts +0 -81
- package/dist/timelineproviders/index.d.ts +0 -2
- package/dist/timelineproviders/request-animation-frame-timeline-provider.d.ts +0 -40
- package/dist/timelineproviders/types.d.ts +0 -21
- package/dist/timelineproviders/video-js-timeline-provider.d.ts +0 -39
- package/dist/tools/doc-tools/generate-readmes.d.ts +0 -1
- package/dist/tools/schema-tools/generate-operation-schemas.d.ts +0 -1
- package/dist/tools/schema-tools/html-tag-names.d.ts +0 -1
- package/dist/types.d.ts +0 -103
- package/dist/util/animation-interval.d.ts +0 -1
- package/dist/util/apply-operation.d.ts +0 -3
- package/dist/util/camel-case-to-dash.d.ts +0 -1
- package/dist/util/dash-to-camel-case.d.ts +0 -1
- package/dist/util/guards/is-function.d.ts +0 -1
- package/dist/util/guards/is-object.d.ts +0 -1
- package/dist/util/guards/is-promise.d.ts +0 -1
- package/dist/util/guards/is-string.d.ts +0 -1
- package/dist/util/prepare-value-for-serialization.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,2984 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { AnimationItem, CanvasRendererConfig, HTMLRendererConfig, SVGRendererConfig } from "lottie-web";
|
|
2
|
+
|
|
3
|
+
//#region src/eventbus/types.d.ts
|
|
4
|
+
type TEventHandler = (...args: any[]) => void;
|
|
5
|
+
type TEventbusRemover = () => void;
|
|
6
|
+
interface IEventbus {
|
|
7
|
+
clear(): void;
|
|
8
|
+
on(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventbusRemover;
|
|
9
|
+
off(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
|
|
10
|
+
once(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventbusRemover;
|
|
11
|
+
broadcast(eventName: string, args?: any[]): void;
|
|
12
|
+
broadcastForTopic(eventName: string, eventTopic: string, args?: any[]): void;
|
|
13
|
+
registerEventlistener(eventbusListener: IEventbusListener): TEventbusRemover;
|
|
14
|
+
registerInterceptor(eventName: string, interceptor: IEventbusInterceptor, eventTopic?: string): TEventbusRemover;
|
|
15
|
+
}
|
|
16
|
+
interface IEventbusListener {
|
|
17
|
+
handleEvent(eventName: string, eventTopic: string | undefined, args: any[]): void;
|
|
18
|
+
}
|
|
19
|
+
interface IEventbusInterceptor {
|
|
20
|
+
intercept(eventArgs: any[]): any[];
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/eventbus/actionregistry-eventbus-listener.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* The `IEventbusListener` first registers a number of actions that are then
|
|
26
|
+
* executed when the specified event is broadcast.
|
|
27
|
+
*/
|
|
28
|
+
declare class ActionRegistryEventbusListener implements IEventbusListener {
|
|
29
|
+
private _actionRegistry;
|
|
30
|
+
registerAction(action: IAction, eventName: string, eventTopic?: string): void;
|
|
31
|
+
handleEvent(eventName: string, eventTopic: string | undefined, args: any[]): void;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/eventbus/eventbus.d.ts
|
|
35
|
+
declare class Eventbus implements IEventbus {
|
|
36
|
+
private eventHandlers;
|
|
37
|
+
private eventInterceptors;
|
|
38
|
+
private eventListeners;
|
|
39
|
+
constructor();
|
|
40
|
+
clear(): void;
|
|
41
|
+
_getEventInterceptors(eventName: string, eventTopic?: string): IEventbusInterceptor[];
|
|
42
|
+
_getEventHandlers(eventName: string, eventTopic?: string): TEventHandler[];
|
|
43
|
+
on(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventbusRemover;
|
|
44
|
+
once(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventbusRemover;
|
|
45
|
+
off(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
|
|
46
|
+
broadcast(eventName: string, args: any[]): void;
|
|
47
|
+
broadcastForTopic(eventName: string, eventTopic: string, args: any[]): void;
|
|
48
|
+
registerEventlistener(eventbusListener: IEventbusListener): TEventbusRemover;
|
|
49
|
+
registerInterceptor(eventName: string, interceptor: IEventbusInterceptor, eventTopic?: string): TEventbusRemover;
|
|
50
|
+
_callHandlers(eventName: string, eventTopic: string | undefined, args?: any): void;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/eventbus/request-video-uri-interceptor.d.ts
|
|
54
|
+
declare class RequestVideoUriInterceptor implements IEventbusInterceptor {
|
|
55
|
+
private eventbus;
|
|
56
|
+
constructor(eventbus: IEventbus);
|
|
57
|
+
intercept(args: any[]): any[];
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/operation/types.d.ts
|
|
61
|
+
type TOperationData = Record<string, any>;
|
|
62
|
+
type TOperationResult<T = TOperationData> = Promise<T> | T;
|
|
63
|
+
interface IOperationContext {
|
|
64
|
+
/**
|
|
65
|
+
* When inside a loop, this is the current iteration of said loop
|
|
66
|
+
*/
|
|
67
|
+
loopIndex?: number;
|
|
68
|
+
/**
|
|
69
|
+
* The number of iterations for the current loop
|
|
70
|
+
*/
|
|
71
|
+
loopLength?: number;
|
|
72
|
+
/**
|
|
73
|
+
* The start index of the loop within the total number of operations
|
|
74
|
+
*/
|
|
75
|
+
loopStartIndex?: number;
|
|
76
|
+
/**
|
|
77
|
+
* The end index of the loop within the total number of operations
|
|
78
|
+
*/
|
|
79
|
+
loopEndIndex?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Set this index to change the current item in the main operations loop
|
|
82
|
+
*/
|
|
83
|
+
newIndex?: number;
|
|
84
|
+
/**
|
|
85
|
+
* The current index with in the main operations loop
|
|
86
|
+
*/
|
|
87
|
+
currentIndex: number;
|
|
88
|
+
/**
|
|
89
|
+
* The eventbus instance shared amongst actions and operations
|
|
90
|
+
*/
|
|
91
|
+
eventbus: IEventbus;
|
|
92
|
+
/**
|
|
93
|
+
* The list of operations that is currently being executed
|
|
94
|
+
*/
|
|
95
|
+
operations: IResolvedOperation[];
|
|
96
|
+
/**
|
|
97
|
+
* The result of the last when evaluation, if any
|
|
98
|
+
*/
|
|
99
|
+
whenEvaluation?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
owner?: any;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
currentItem?: any;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
parent?: IOperationContext;
|
|
112
|
+
}
|
|
113
|
+
type TOperation<T extends TOperationData = TOperationData, RT = T> = (this: IOperationContext, operationData: T) => TOperationResult<RT>;
|
|
114
|
+
type ExtractOperationData<T extends TOperation<TOperationData>> = T extends TOperation<infer K> ? K : never;
|
|
115
|
+
type ExtractReturnedOperationData<T extends TOperation<TOperationData, TOperationData>> = T extends TOperation<any, infer K> ? unknown extends K ? ExtractOperationData<T> : K : never;
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/timelineproviders/types.d.ts
|
|
118
|
+
type TPlayState = 'stopped' | 'running';
|
|
119
|
+
interface ITimelineProvider {
|
|
120
|
+
playState: TPlayState;
|
|
121
|
+
loop: boolean;
|
|
122
|
+
init(): Promise<void>;
|
|
123
|
+
start(): void;
|
|
124
|
+
stop(): void;
|
|
125
|
+
pause(): void;
|
|
126
|
+
seek(position: number): Promise<number>;
|
|
127
|
+
playlistItem(uri: string): void;
|
|
128
|
+
getPosition(): number;
|
|
129
|
+
getDuration(): number;
|
|
130
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
131
|
+
destroy(): void;
|
|
132
|
+
onTime(callback: (position: number) => void): void;
|
|
133
|
+
onComplete(callback: () => void): void;
|
|
134
|
+
onRestart(callback: () => void): void;
|
|
135
|
+
onFirstFrame(callback: () => void): void;
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/types.d.ts
|
|
139
|
+
type KeysOfType<T, U> = { [P in keyof T]-?: T[P] extends U | undefined ? P : never }[keyof T];
|
|
140
|
+
/**
|
|
141
|
+
* Describes an object that is capable of processing the given configuration and constructing an IEligiusEngine
|
|
142
|
+
* based on this configuration.
|
|
143
|
+
*/
|
|
144
|
+
interface IEngineFactory {
|
|
145
|
+
/**
|
|
146
|
+
* Returns a fully configured IEligiusEngine instance.
|
|
147
|
+
*
|
|
148
|
+
* @param engineConfig The given configuration
|
|
149
|
+
* @param resolver An optional resolver to process the given IEngineConfiguration. When not provided the IEngineFactory is expected to create their own instance.
|
|
150
|
+
*/
|
|
151
|
+
createEngine(engineConfig: IEngineConfiguration, resolver?: IConfigurationResolver): IEligiusEngine;
|
|
152
|
+
}
|
|
153
|
+
interface IEngineFactoryOptions {
|
|
154
|
+
eventbus?: IEventbus;
|
|
155
|
+
devtools?: boolean;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Describes an object that is play one or more timelines, defined by a given set of ITimelineProviders.
|
|
159
|
+
*/
|
|
160
|
+
interface IEligiusEngine {
|
|
161
|
+
/**
|
|
162
|
+
* Do the preparations needed in order to run the given timelines.
|
|
163
|
+
*/
|
|
164
|
+
init(): Promise<ITimelineProvider>;
|
|
165
|
+
/**
|
|
166
|
+
* Do the necessary cleanup before discarding this instance.
|
|
167
|
+
*/
|
|
168
|
+
destroy(): Promise<void>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Describes an object that acts as a registry for imported resources.
|
|
172
|
+
*/
|
|
173
|
+
interface ISimpleResourceImporter {
|
|
174
|
+
import(name: string): Record<string, any>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Describes an object that acts as a registry for imported resources and
|
|
178
|
+
* is able to return all of the registered operation, controller and provider names.
|
|
179
|
+
*/
|
|
180
|
+
interface IResourceImporter extends ISimpleResourceImporter {
|
|
181
|
+
getOperationNames(): string[];
|
|
182
|
+
getControllerNames(): string[];
|
|
183
|
+
getProviderNames(): string[];
|
|
184
|
+
}
|
|
185
|
+
interface IConfigurationResolver {
|
|
186
|
+
process(configuration: IEngineConfiguration, actionRegistryListener?: IEventbusListener): [Record<string, IAction>, IResolvedEngineConfiguration];
|
|
187
|
+
}
|
|
188
|
+
type TResultCallback<T> = (result: T) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Describes a duration of time expressed in a start and an optional end range with a one second interval.
|
|
191
|
+
*/
|
|
192
|
+
interface IDuration {
|
|
193
|
+
start: number;
|
|
194
|
+
end?: number;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Describes a duration of time expressed in a start and an end range with a one second interval.
|
|
198
|
+
*/
|
|
199
|
+
interface IStrictDuration extends Required<IDuration> {}
|
|
200
|
+
/**
|
|
201
|
+
* Describes the different kinds of timeline providers.
|
|
202
|
+
*/
|
|
203
|
+
type TimelineTypes = 'animation' | 'mediaplayer';
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
interface ITimelineProviderInfo {
|
|
208
|
+
id: string;
|
|
209
|
+
vendor: string;
|
|
210
|
+
provider: ITimelineProvider;
|
|
211
|
+
}
|
|
212
|
+
interface ILanguageLabel {
|
|
213
|
+
id: string;
|
|
214
|
+
labels: ILabel[];
|
|
215
|
+
}
|
|
216
|
+
interface ILabel {
|
|
217
|
+
id: string;
|
|
218
|
+
languageCode: TLanguageCode;
|
|
219
|
+
label: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* Container type for a width and height
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
interface IDimensions {
|
|
227
|
+
width: number;
|
|
228
|
+
height: number;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* This represents an IETF language tag
|
|
233
|
+
*
|
|
234
|
+
* The format reads as follows: [Primary language subtag]-[Region subtag]
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
type TLanguageCode = `${Lowercase<string>}-${Uppercase<string>}`;
|
|
238
|
+
interface ISubtitleCollection {
|
|
239
|
+
languageCode: TLanguageCode;
|
|
240
|
+
titles: ISubtitle[];
|
|
241
|
+
}
|
|
242
|
+
interface ISubtitle {
|
|
243
|
+
id: string;
|
|
244
|
+
duration: IStrictDuration;
|
|
245
|
+
text: string;
|
|
246
|
+
}
|
|
247
|
+
type RequireKeys<T, K extends keyof T> = { [P in K]-?: T[P] };
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/action/types.d.ts
|
|
250
|
+
interface IAction {
|
|
251
|
+
id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
startOperations: IResolvedOperation[];
|
|
254
|
+
start(initOperationData?: TOperationData): Promise<TOperationData>;
|
|
255
|
+
}
|
|
256
|
+
interface IEndableAction extends IAction {
|
|
257
|
+
endOperations: IResolvedOperation[];
|
|
258
|
+
end(initOperationData?: TOperationData): Promise<TOperationData>;
|
|
259
|
+
}
|
|
260
|
+
interface ITimelineAction extends IEndableAction {
|
|
261
|
+
get active(): boolean;
|
|
262
|
+
duration: IStrictDuration;
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/controllers/types.d.ts
|
|
266
|
+
interface IController<T extends TOperationData> {
|
|
267
|
+
name: string;
|
|
268
|
+
init(operationData: T): void;
|
|
269
|
+
attach(eventbus: IEventbus): Promise<any> | void;
|
|
270
|
+
detach(eventbus: IEventbus): void;
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/controllers/event-listener-controller.d.ts
|
|
274
|
+
interface IActionInstanceInfo {
|
|
275
|
+
start: boolean;
|
|
276
|
+
action: IEndableAction;
|
|
277
|
+
}
|
|
278
|
+
interface IEventListenerControllerOperationData {
|
|
279
|
+
/**
|
|
280
|
+
* @dependency
|
|
281
|
+
*/
|
|
282
|
+
selectedElement: JQuery;
|
|
283
|
+
/**
|
|
284
|
+
* @type=ParameterType:eventName
|
|
285
|
+
* @required
|
|
286
|
+
*/
|
|
287
|
+
eventName: string;
|
|
288
|
+
actions: string[];
|
|
289
|
+
/**
|
|
290
|
+
* @type=ParameterType:object
|
|
291
|
+
*/
|
|
292
|
+
actionOperationData?: TOperationData;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* This controller attaches to the given selected element and adds an event listener for the specified event name that
|
|
296
|
+
* executes the given actions with the given operation data.
|
|
297
|
+
*
|
|
298
|
+
* By default the `start` operations of the specified actions are executed. To execute the `end` operations instead,
|
|
299
|
+
* prefix the action name with `end:`.
|
|
300
|
+
*/
|
|
301
|
+
declare class EventListenerController implements IController<IEventListenerControllerOperationData> {
|
|
302
|
+
operationData?: IEventListenerControllerOperationData;
|
|
303
|
+
actionInstanceInfos?: IActionInstanceInfo[];
|
|
304
|
+
name: string;
|
|
305
|
+
constructor();
|
|
306
|
+
init(operationData: IEventListenerControllerOperationData): void;
|
|
307
|
+
attach(eventbus: IEventbus): void;
|
|
308
|
+
private _isStartAction;
|
|
309
|
+
private _eventHandler;
|
|
310
|
+
private _executeAction;
|
|
311
|
+
detach(_eventbus: IEventbus): void;
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/controllers/label-controller.d.ts
|
|
315
|
+
interface ILabelControllerMetadata {
|
|
316
|
+
/**
|
|
317
|
+
* @dependency
|
|
318
|
+
*/
|
|
319
|
+
selectedElement: JQuery;
|
|
320
|
+
/**
|
|
321
|
+
* @type=ParameterType:labelId
|
|
322
|
+
* @required
|
|
323
|
+
*/
|
|
324
|
+
labelId: string;
|
|
325
|
+
/**
|
|
326
|
+
* By default the label is added to the inner HTML of the `selectedElement`,
|
|
327
|
+
* otherwise if this property is set, the label text is added to the specified attribute
|
|
328
|
+
* of the `selectedElement`.
|
|
329
|
+
*/
|
|
330
|
+
attributeName?: string;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* This controller attaches to the given selected element and renders the text associated with the given label id in it.
|
|
334
|
+
*
|
|
335
|
+
* The controller also listen for the `LANGUAGE_CHANGE` event and re-renders the text with the new language after such an event.
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
declare class LabelController implements IController<ILabelControllerMetadata> {
|
|
339
|
+
listeners: TEventbusRemover[];
|
|
340
|
+
currentLanguage: string | null;
|
|
341
|
+
operationData: ILabelControllerMetadata | null;
|
|
342
|
+
labelData: Record<string, string>;
|
|
343
|
+
name: string;
|
|
344
|
+
requestLabelDataBound?: (labelId: string) => void;
|
|
345
|
+
init(operationData: ILabelControllerMetadata): void;
|
|
346
|
+
setLabelId(newLabelId: string): void;
|
|
347
|
+
attach(eventbus: IEventbus): void;
|
|
348
|
+
private _requestLabelData;
|
|
349
|
+
private _setLabel;
|
|
350
|
+
detach(_eventbus: IEventbus): void;
|
|
351
|
+
private _handleLanguageChange;
|
|
352
|
+
private _createTextDataLookup;
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/controllers/lottie-controller.d.ts
|
|
356
|
+
interface IInnerMetadata {
|
|
357
|
+
/**
|
|
358
|
+
* @dependency
|
|
359
|
+
*/
|
|
360
|
+
selectedElement: JQuery;
|
|
361
|
+
/**
|
|
362
|
+
* @type=ParameterType:string
|
|
363
|
+
*/
|
|
364
|
+
renderer: SVGRendererConfig | CanvasRendererConfig | HTMLRendererConfig;
|
|
365
|
+
loop: boolean;
|
|
366
|
+
autoplay: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* ParameterType:object
|
|
369
|
+
*/
|
|
370
|
+
animationData: any;
|
|
371
|
+
/**
|
|
372
|
+
* @required
|
|
373
|
+
*/
|
|
374
|
+
json: any;
|
|
375
|
+
/**
|
|
376
|
+
* @type=ParameterType:array
|
|
377
|
+
* @itemType=ParameterType:labelId
|
|
378
|
+
*/
|
|
379
|
+
labelIds: string[];
|
|
380
|
+
viewBox: string;
|
|
381
|
+
iefallback: any;
|
|
382
|
+
}
|
|
383
|
+
interface ILottieControllerMetadata extends IInnerMetadata {
|
|
384
|
+
/**
|
|
385
|
+
* @type=ParameterType:url
|
|
386
|
+
* @required
|
|
387
|
+
*/
|
|
388
|
+
url: string;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* This controller renders a [lottie-web](https://github.com/airbnb/lottie-web) animation inside the given selected element.
|
|
392
|
+
*
|
|
393
|
+
* The url may encode freeze and end positions like this: my-url/filename[freeze=10,end=21].json
|
|
394
|
+
*
|
|
395
|
+
*/
|
|
396
|
+
declare class LottieController implements IController<ILottieControllerMetadata> {
|
|
397
|
+
name: string;
|
|
398
|
+
currentLanguage: string;
|
|
399
|
+
labelData: Record<string, Record<string, string>>;
|
|
400
|
+
eventbusRemovers: TEventbusRemover[];
|
|
401
|
+
animationItem: AnimationItem | null;
|
|
402
|
+
operationData: IInnerMetadata | null;
|
|
403
|
+
serializedData: string | null;
|
|
404
|
+
serializedIEData: string | null;
|
|
405
|
+
freezePosition: number;
|
|
406
|
+
endPosition: number;
|
|
407
|
+
constructor();
|
|
408
|
+
init(operationData: ILottieControllerMetadata): void;
|
|
409
|
+
private _parseFilename;
|
|
410
|
+
attach(eventbus: IEventbus): void;
|
|
411
|
+
detach(_eventbus: IEventbus): void;
|
|
412
|
+
private _destroy;
|
|
413
|
+
private _createAnimation;
|
|
414
|
+
private _createTextDataLookup;
|
|
415
|
+
private _handleLanguageChange;
|
|
416
|
+
private _isIE;
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/controllers/navigation-controller.d.ts
|
|
420
|
+
interface INavigationControllerOperationData {
|
|
421
|
+
/**
|
|
422
|
+
* @dependency
|
|
423
|
+
*/
|
|
424
|
+
selectedElement: JQuery;
|
|
425
|
+
/**
|
|
426
|
+
* @required
|
|
427
|
+
*/
|
|
428
|
+
json: any;
|
|
429
|
+
}
|
|
430
|
+
declare class NavigationController implements IController<INavigationControllerOperationData> {
|
|
431
|
+
name: string;
|
|
432
|
+
navigation: any[];
|
|
433
|
+
navLookup: Record<string, any>;
|
|
434
|
+
navVidIdLookup: Record<string, any>;
|
|
435
|
+
ctrlLookup: Record<string, LabelController>;
|
|
436
|
+
activeNavigationPoint: any | null;
|
|
437
|
+
labelControllers: LabelController[];
|
|
438
|
+
eventhandlers: TEventbusRemover[];
|
|
439
|
+
eventbus: IEventbus | null;
|
|
440
|
+
container: JQuery | null;
|
|
441
|
+
constructor();
|
|
442
|
+
init(operationData: TOperationData): void;
|
|
443
|
+
attach(eventbus: IEventbus): void;
|
|
444
|
+
private _initHistory;
|
|
445
|
+
private _getQueryVariable;
|
|
446
|
+
private _handleRequestCurrentNavigation;
|
|
447
|
+
detach(eventbus: IEventbus): void;
|
|
448
|
+
private _pushCurrentState;
|
|
449
|
+
private _buildHtml;
|
|
450
|
+
private _addNavElement;
|
|
451
|
+
private _addClickHandler;
|
|
452
|
+
private _menuMouseupHandler;
|
|
453
|
+
private _handleNavigateVideoUrl;
|
|
454
|
+
private _highlightMenu;
|
|
455
|
+
private _handleVideoComplete;
|
|
456
|
+
private _addLabel;
|
|
457
|
+
private _buildNavigationData;
|
|
458
|
+
}
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/controllers/progressbar-controller.d.ts
|
|
461
|
+
interface IProgressbarControllerOperationData {
|
|
462
|
+
/**
|
|
463
|
+
* @dependency
|
|
464
|
+
*/
|
|
465
|
+
selectedElement: JQuery;
|
|
466
|
+
/**
|
|
467
|
+
* @dependency
|
|
468
|
+
*/
|
|
469
|
+
textElement: JQuery;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* This controller renders a progressbar that displays the progress of the current timeline in the given selected element.
|
|
473
|
+
*
|
|
474
|
+
* The current progress as a percentage is rendered in the given text element.
|
|
475
|
+
*/
|
|
476
|
+
declare class ProgressbarController implements IController<IProgressbarControllerOperationData> {
|
|
477
|
+
name: string;
|
|
478
|
+
selectedElement: JQuery | null;
|
|
479
|
+
textElement: JQuery | null;
|
|
480
|
+
eventbusRemovers: TEventbusRemover[];
|
|
481
|
+
duration: number;
|
|
482
|
+
init(operationData: TOperationData): void;
|
|
483
|
+
attach(eventbus: IEventbus): void;
|
|
484
|
+
detach(_eventbus: IEventbus): void;
|
|
485
|
+
private _positionUpdateHandler;
|
|
486
|
+
private _clickHandler;
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/controllers/routing-controller.d.ts
|
|
490
|
+
interface IRoutingControllerOperationData {
|
|
491
|
+
/**
|
|
492
|
+
* @required
|
|
493
|
+
*/
|
|
494
|
+
json: any;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* This is a work in progress, do not use this yet please....
|
|
498
|
+
*/
|
|
499
|
+
declare class RoutingController implements IController<IRoutingControllerOperationData> {
|
|
500
|
+
name: string;
|
|
501
|
+
navLookup: Record<string, any>;
|
|
502
|
+
navVidIdLookup: Record<string, any>;
|
|
503
|
+
navigation: any;
|
|
504
|
+
eventhandlers: TEventbusRemover[];
|
|
505
|
+
eventbus: IEventbus | null;
|
|
506
|
+
constructor();
|
|
507
|
+
init(operationData: TOperationData): void;
|
|
508
|
+
attach(eventbus: IEventbus): void;
|
|
509
|
+
private _handlePopstate;
|
|
510
|
+
detach(_eventbus: IEventbus): void;
|
|
511
|
+
private _handleBeforeRequestVideoUrl;
|
|
512
|
+
private _getQueryVariable;
|
|
513
|
+
private _handlePushHistoryState;
|
|
514
|
+
private _pushState;
|
|
515
|
+
private _buildNavigationData;
|
|
516
|
+
}
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/controllers/subtitles-controller.d.ts
|
|
519
|
+
interface ISubtitlesControllerOperationData {
|
|
520
|
+
/**
|
|
521
|
+
* @dependency
|
|
522
|
+
*/
|
|
523
|
+
selectedElement: JQuery;
|
|
524
|
+
language: string;
|
|
525
|
+
/**
|
|
526
|
+
* @type=ParameterType:array
|
|
527
|
+
* @itemType=ParameterType:object
|
|
528
|
+
*/
|
|
529
|
+
subtitleData: ISubtitleCollection[];
|
|
530
|
+
}
|
|
531
|
+
declare class SubtitlesController implements IController<ISubtitlesControllerOperationData> {
|
|
532
|
+
actionLookup: Record<string, any>;
|
|
533
|
+
currentLanguage: string | null;
|
|
534
|
+
lastFunc: Function | null;
|
|
535
|
+
name: string;
|
|
536
|
+
subtitleDurations: IStrictDuration[] | null;
|
|
537
|
+
attach(eventbus: IEventbus): void;
|
|
538
|
+
detach(_eventbus: IEventbus): void;
|
|
539
|
+
internalDetach(detachMethods?: TEventbusRemover[]): void;
|
|
540
|
+
languageChangeHandler(newLanguage: string): void;
|
|
541
|
+
removeTitle(container?: JQuery): void;
|
|
542
|
+
onTimeHandler(position: number): void;
|
|
543
|
+
onSeekedHandler(args: any[]): void;
|
|
544
|
+
setTitle(container: JQuery, titleLanguageLookup: Record<string, string>): void;
|
|
545
|
+
createActionLookup(operationData: ISubtitlesControllerOperationData, container: JQuery): Record<number, () => void>;
|
|
546
|
+
init(operationData: ISubtitlesControllerOperationData): void;
|
|
547
|
+
}
|
|
548
|
+
declare namespace index_d_exports$2 {
|
|
549
|
+
export { EventListenerController, LabelController, LottieController, NavigationController, ProgressbarController, RoutingController, SubtitlesController };
|
|
550
|
+
}
|
|
551
|
+
//#endregion
|
|
552
|
+
//#region src/operation/add-class.d.ts
|
|
553
|
+
interface IAddClassOperationData {
|
|
554
|
+
/**
|
|
555
|
+
* @dependency
|
|
556
|
+
*/
|
|
557
|
+
selectedElement: JQuery;
|
|
558
|
+
/**
|
|
559
|
+
* @type=ParameterType:className
|
|
560
|
+
* @required
|
|
561
|
+
*/
|
|
562
|
+
className: string;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* This operation adds the specified class name to the specified selected element.
|
|
566
|
+
*
|
|
567
|
+
*/
|
|
568
|
+
declare const addClass: TOperation<IAddClassOperationData>;
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/operation/add-controller-to-element.d.ts
|
|
571
|
+
type IAddControllerToElementOperationData<T extends TOperationData = TOperationData> = {
|
|
572
|
+
/**
|
|
573
|
+
* @dependency
|
|
574
|
+
*/
|
|
575
|
+
selectedElement: JQuery;
|
|
576
|
+
/**
|
|
577
|
+
* @dependency
|
|
578
|
+
*/
|
|
579
|
+
controllerInstance: IController<T>;
|
|
580
|
+
} & T;
|
|
581
|
+
/**
|
|
582
|
+
* This operation adds the specified controller instance to the given selected element.
|
|
583
|
+
*
|
|
584
|
+
*/
|
|
585
|
+
declare const addControllerToElement: TOperation<IAddControllerToElementOperationData>;
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region src/operation/animate.d.ts
|
|
588
|
+
interface IAnimateOperationData {
|
|
589
|
+
/**
|
|
590
|
+
* @type=ParameterType:boolean
|
|
591
|
+
*/
|
|
592
|
+
animationEasing?: string;
|
|
593
|
+
/**
|
|
594
|
+
* @dependency
|
|
595
|
+
*/
|
|
596
|
+
selectedElement: JQuery;
|
|
597
|
+
/**
|
|
598
|
+
* @required
|
|
599
|
+
*/
|
|
600
|
+
animationProperties: Record<string, unknown>;
|
|
601
|
+
/**
|
|
602
|
+
* @type=ParameterType:number
|
|
603
|
+
* @required
|
|
604
|
+
*/
|
|
605
|
+
animationDuration: JQuery.Duration;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* This operation animates the specified selected element with the given [jQuery animation](https://api.jquery.com/animate/) properties, duration and easing.
|
|
609
|
+
* It resolves after the animation completes.
|
|
610
|
+
*
|
|
611
|
+
* @param operationData
|
|
612
|
+
* @returns
|
|
613
|
+
*/
|
|
614
|
+
declare const animate: TOperation<IAnimateOperationData>;
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/operation/animate-with-class.d.ts
|
|
617
|
+
interface IAnimateWithClassOperationData {
|
|
618
|
+
/**
|
|
619
|
+
* @dependency
|
|
620
|
+
*/
|
|
621
|
+
selectedElement: JQuery;
|
|
622
|
+
/**
|
|
623
|
+
* @type=ParameterType:className
|
|
624
|
+
* @required
|
|
625
|
+
*/
|
|
626
|
+
className: string;
|
|
627
|
+
removeClass?: boolean;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* This operation adds the specified class name to the specified selected element and assumes that this
|
|
631
|
+
* class triggers and animation on the selected element. It then waits for this animation to complete
|
|
632
|
+
* before it resolves.
|
|
633
|
+
*/
|
|
634
|
+
declare const animateWithClass: TOperation<IAnimateWithClassOperationData, Promise<IAnimateWithClassOperationData>>;
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region src/operation/broadcast-event.d.ts
|
|
637
|
+
interface IBroadcastEventOperationData {
|
|
638
|
+
eventArgs: unknown[];
|
|
639
|
+
/**
|
|
640
|
+
* @type=ParameterType:eventTopic
|
|
641
|
+
*/
|
|
642
|
+
eventTopic?: string;
|
|
643
|
+
/**
|
|
644
|
+
* @type=ParameterType:eventName
|
|
645
|
+
* @required
|
|
646
|
+
*/
|
|
647
|
+
eventName: string;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* This operation broadcasts the given event through the eventbus, along with the
|
|
651
|
+
* event argumetns and optional event topic.
|
|
652
|
+
*/
|
|
653
|
+
declare const broadcastEvent: TOperation<IBroadcastEventOperationData>;
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region src/operation/calc.d.ts
|
|
656
|
+
type TCalculationOperator = '+' | '-' | '*' | '/' | '%' | '**';
|
|
657
|
+
interface ICalcOperationData {
|
|
658
|
+
/**
|
|
659
|
+
* The left operand
|
|
660
|
+
* @type=ParameterType:number
|
|
661
|
+
* @required
|
|
662
|
+
*/
|
|
663
|
+
left: string | number;
|
|
664
|
+
/**
|
|
665
|
+
* The right operand
|
|
666
|
+
* @type=ParameterType:number
|
|
667
|
+
* @required
|
|
668
|
+
*/
|
|
669
|
+
right: string | number;
|
|
670
|
+
/**
|
|
671
|
+
* @required
|
|
672
|
+
*/
|
|
673
|
+
operator: TCalculationOperator;
|
|
674
|
+
/**
|
|
675
|
+
* @output
|
|
676
|
+
*/
|
|
677
|
+
calculationResult?: number;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* This operation calculates the given left and right hand operands using the specified operator.
|
|
681
|
+
*
|
|
682
|
+
* @param operationData
|
|
683
|
+
*/
|
|
684
|
+
declare const calc: TOperation<ICalcOperationData>;
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region src/operation/clear-element.d.ts
|
|
687
|
+
interface IClearElementOperationData {
|
|
688
|
+
/**
|
|
689
|
+
* @dependency
|
|
690
|
+
*/
|
|
691
|
+
selectedElement: JQuery;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* This operation removes all of the children from the given selected element.
|
|
695
|
+
*
|
|
696
|
+
*/
|
|
697
|
+
declare const clearElement: TOperation<IClearElementOperationData>;
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/operation/clear-operation-data.d.ts
|
|
700
|
+
interface IClearOperationDataOperationData {
|
|
701
|
+
properties?: string[];
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* This operation removes all of the properties on the current operation date.
|
|
705
|
+
* Or, if the `properties` property is set only removes the properties defined by that list.
|
|
706
|
+
*
|
|
707
|
+
*/
|
|
708
|
+
declare const clearOperationData: TOperation<IClearOperationDataOperationData>;
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region src/operation/create-element.d.ts
|
|
711
|
+
type TTagNames = keyof HTMLElementTagNameMap;
|
|
712
|
+
interface ICreateElementOperationData<T extends TTagNames> {
|
|
713
|
+
/**
|
|
714
|
+
* @required
|
|
715
|
+
*/
|
|
716
|
+
elementName: T;
|
|
717
|
+
text?: string;
|
|
718
|
+
/**
|
|
719
|
+
* @type=ParameterType:object
|
|
720
|
+
*/
|
|
721
|
+
attributes?: Partial<HTMLElementTagNameMap[T]>;
|
|
722
|
+
/**
|
|
723
|
+
* @type=ParameterType:object
|
|
724
|
+
* @output
|
|
725
|
+
*/
|
|
726
|
+
template?: JQuery;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* This operation creates the DOM element described by the given elementName and attributes and assigns
|
|
730
|
+
* the instance to the `template` property on the current operation data.
|
|
731
|
+
*
|
|
732
|
+
* @param operationData
|
|
733
|
+
* @returns
|
|
734
|
+
*/
|
|
735
|
+
declare const createElement: TOperation<ICreateElementOperationData<TTagNames>, RequireKeys<ICreateElementOperationData<TTagNames>, 'template'>>;
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/operation/custom-function.d.ts
|
|
738
|
+
interface ICustomFunctionOperationData {
|
|
739
|
+
systemName: string;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* This operation retrieves a custom function defined by the given system name
|
|
743
|
+
* and invokes it with the current operation data and eventbus.
|
|
744
|
+
*
|
|
745
|
+
* @param operationData
|
|
746
|
+
* @returns
|
|
747
|
+
*/
|
|
748
|
+
declare const customFunction: TOperation<ICustomFunctionOperationData>;
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region src/operation/end-action.d.ts
|
|
751
|
+
interface IEndActionOperationData {
|
|
752
|
+
/**
|
|
753
|
+
* @dependency
|
|
754
|
+
*/
|
|
755
|
+
actionInstance: IEndableAction;
|
|
756
|
+
actionOperationData: Record<string, unknown>;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* This operation invokes the {@link EndableAction}.end method on the specified action instance.
|
|
760
|
+
*
|
|
761
|
+
* The action operation data is first merged with the current operation data before it is
|
|
762
|
+
* passed on to the action. After the action has completed the action operation data properties
|
|
763
|
+
* are removed from the current operation data.
|
|
764
|
+
*/
|
|
765
|
+
declare const endAction: TOperation<IEndActionOperationData>;
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region src/operation/end-for-each.d.ts
|
|
768
|
+
/**
|
|
769
|
+
* This operation checks if the current loop should end or start the next iteration.
|
|
770
|
+
*/
|
|
771
|
+
declare const endForEach: TOperation<TOperationData>;
|
|
772
|
+
//#endregion
|
|
773
|
+
//#region src/operation/end-when.d.ts
|
|
774
|
+
/**
|
|
775
|
+
* This operation cleans up after the {@link when}/{@link otherwise}/{@link endWhen} control flow ends.
|
|
776
|
+
*/
|
|
777
|
+
declare const endWhen: TOperation<Record<string, unknown>>;
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/operation/extend-controller.d.ts
|
|
780
|
+
/**
|
|
781
|
+
* This operation extends the specified controller instance with the specified extension.
|
|
782
|
+
*/
|
|
783
|
+
interface IExtendControllerOperationData {
|
|
784
|
+
/**
|
|
785
|
+
* @dependency
|
|
786
|
+
*/
|
|
787
|
+
controllerInstance: IController<TOperationData>;
|
|
788
|
+
controllerExtension: Record<PropertyKey, unknown>;
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Extends the current controller with given extension.
|
|
792
|
+
*/
|
|
793
|
+
declare const extendController: TOperation<IExtendControllerOperationData>;
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/operation/for-each.d.ts
|
|
796
|
+
interface IForEachOperationData {
|
|
797
|
+
/**
|
|
798
|
+
* @type=ParameterType:array
|
|
799
|
+
* @required
|
|
800
|
+
*/
|
|
801
|
+
collection: unknown[] | string;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* This operation iterates over the given collection.
|
|
805
|
+
*
|
|
806
|
+
* Each iteration the current item from the specified collection is
|
|
807
|
+
* assigned to the {@link IOperationContext.currentItem} property on the operation context.
|
|
808
|
+
*
|
|
809
|
+
* At the start of the loop, the associated {@link endForEach} operation is determined and when
|
|
810
|
+
* the last iteration is completed the flow control is set to the index of that operation.
|
|
811
|
+
*/
|
|
812
|
+
declare const forEach: TOperation<IForEachOperationData>;
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region src/operation/get-attributes-from-element.d.ts
|
|
815
|
+
interface IGetAttributesFromElementOperationData {
|
|
816
|
+
/**
|
|
817
|
+
* The HTML element whose attributes will be retrieved
|
|
818
|
+
* @dependency
|
|
819
|
+
*/
|
|
820
|
+
selectedElement?: JQuery;
|
|
821
|
+
/**
|
|
822
|
+
* The specified attribute names that will be retrieved
|
|
823
|
+
*/
|
|
824
|
+
attributeNames: string[];
|
|
825
|
+
/**
|
|
826
|
+
* The retrieved attributes
|
|
827
|
+
* @output
|
|
828
|
+
*/
|
|
829
|
+
attributeValues?: Record<string, unknown>;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* This operation retrieves the values for the specified attribute names from the given selected element.
|
|
833
|
+
*/
|
|
834
|
+
declare const getAttributesFromElement: TOperation<IGetAttributesFromElementOperationData>;
|
|
835
|
+
//#endregion
|
|
836
|
+
//#region src/operation/get-controller-from-element.d.ts
|
|
837
|
+
interface IGetControllerFromElementOperationData {
|
|
838
|
+
/**
|
|
839
|
+
* @dependency
|
|
840
|
+
*/
|
|
841
|
+
selectedElement: JQuery;
|
|
842
|
+
/**
|
|
843
|
+
* @type=ParameterType:controllerName
|
|
844
|
+
* @required
|
|
845
|
+
*/
|
|
846
|
+
controllerName: string;
|
|
847
|
+
/**
|
|
848
|
+
* @type=ParameterType:object
|
|
849
|
+
* @output
|
|
850
|
+
*/
|
|
851
|
+
controllerInstance?: IController<any>;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* This operation retrieves the controller instance with the specified name that is assigned to the given selected element.
|
|
855
|
+
*
|
|
856
|
+
* @param operationData
|
|
857
|
+
* @returns
|
|
858
|
+
*/
|
|
859
|
+
declare const getControllerFromElement: TOperation<IGetControllerFromElementOperationData>;
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region src/operation/get-controller-instance.d.ts
|
|
862
|
+
type TSystemName = keyof typeof index_d_exports$2;
|
|
863
|
+
interface IGetControllerInstanceOperationData {
|
|
864
|
+
/**
|
|
865
|
+
* @required
|
|
866
|
+
*/
|
|
867
|
+
systemName: TSystemName;
|
|
868
|
+
/**
|
|
869
|
+
* @type=ParameterType:object
|
|
870
|
+
* @output
|
|
871
|
+
*/
|
|
872
|
+
controllerInstance?: IController<TOperationData>;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* This operation retrieves an instance of the given controller name.
|
|
876
|
+
* It assigns this instance to the `controllerInstance` property on the current operation data
|
|
877
|
+
*/
|
|
878
|
+
declare const getControllerInstance: TOperation<IGetControllerInstanceOperationData>;
|
|
879
|
+
//#endregion
|
|
880
|
+
//#region src/operation/get-element-dimensions.d.ts
|
|
881
|
+
interface IGetElementDimensionsOperationData {
|
|
882
|
+
/**
|
|
883
|
+
* @dependency
|
|
884
|
+
*/
|
|
885
|
+
selectedElement: JQuery;
|
|
886
|
+
/**
|
|
887
|
+
* @type=ParameterType:dimensionsModifier
|
|
888
|
+
*/
|
|
889
|
+
modifier?: string;
|
|
890
|
+
/**
|
|
891
|
+
* @type=ParameterType:object
|
|
892
|
+
* @output
|
|
893
|
+
*/
|
|
894
|
+
dimensions?: {
|
|
895
|
+
width?: number;
|
|
896
|
+
height?: number;
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* This operation calculates the width and height of the given selected element.
|
|
901
|
+
* It assigns this struct to the dimensions property on the current operation data.
|
|
902
|
+
* Optionally the width and height can be modified using the given modifier string.
|
|
903
|
+
*
|
|
904
|
+
* The modifier string is formatted in the following way:
|
|
905
|
+
*
|
|
906
|
+
* <operator><amount><optional-side><optional-precentage>|<ratio-definition>
|
|
907
|
+
*
|
|
908
|
+
* Where the ratio modifier is formatted in the following way:
|
|
909
|
+
* <side>[ar=<ratio-left>-<ratio-right>]
|
|
910
|
+
*
|
|
911
|
+
* For example, this modifier '+100h|w[ar=8-1]' will modifiy the dimensions like this:
|
|
912
|
+
* it will add a value of 100 to the height and modify the width by a ratio of 8 to 1 relative to the height.
|
|
913
|
+
*/
|
|
914
|
+
declare const getElementDimensions: TOperation<IGetElementDimensionsOperationData>;
|
|
915
|
+
//#endregion
|
|
916
|
+
//#region src/operation/get-import.d.ts
|
|
917
|
+
interface IGetImportOperationData {
|
|
918
|
+
/**
|
|
919
|
+
* @type=ParameterType:systemName
|
|
920
|
+
* @required
|
|
921
|
+
*/
|
|
922
|
+
systemName: string;
|
|
923
|
+
/**
|
|
924
|
+
* @output
|
|
925
|
+
*/
|
|
926
|
+
importedInstance?: unknown;
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* This operation retrieves the import specified by the given `systemName` and
|
|
930
|
+
* assigns it to the `importedInstance` property on the current operaton date.
|
|
931
|
+
*
|
|
932
|
+
* @param operationData
|
|
933
|
+
* @returns
|
|
934
|
+
*/
|
|
935
|
+
declare const getImport: TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, 'importedInstance'>, 'systemName'>>;
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/operation/get-query-params.d.ts
|
|
938
|
+
interface IGetQueryParamsOperationData {
|
|
939
|
+
/**
|
|
940
|
+
* The query params will be added as property/values to this object.
|
|
941
|
+
* So, the query string `?foo=bar&bar=foo` will result in:
|
|
942
|
+
* ```json
|
|
943
|
+
* {
|
|
944
|
+
* foo: "bar",
|
|
945
|
+
* bar: "foo"
|
|
946
|
+
* }
|
|
947
|
+
* ```
|
|
948
|
+
* This object will be assigned to the `queryParams` property.
|
|
949
|
+
* @output
|
|
950
|
+
*/
|
|
951
|
+
queryParams?: Record<string, string>;
|
|
952
|
+
/**
|
|
953
|
+
* The properties on this object will be assigned to the queryParams result
|
|
954
|
+
* when the given property name is not part of the query string.
|
|
955
|
+
*/
|
|
956
|
+
defaultValues?: Record<string, string>;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* This operation retrieves the current query parameters from the browser's address bar and places
|
|
960
|
+
* them on the returned operation data.
|
|
961
|
+
*/
|
|
962
|
+
declare const getQueryParams: TOperation<IGetQueryParamsOperationData>;
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region src/operation/invoke-object-method.d.ts
|
|
965
|
+
interface IInvokeObjectMethodOperationData {
|
|
966
|
+
/**
|
|
967
|
+
* The given object instance
|
|
968
|
+
*
|
|
969
|
+
*/
|
|
970
|
+
instance: any;
|
|
971
|
+
/**
|
|
972
|
+
* The method name on the given object that will be invoked
|
|
973
|
+
*/
|
|
974
|
+
methodName: string;
|
|
975
|
+
/**
|
|
976
|
+
* Arguments that will be passed to the specified method
|
|
977
|
+
*/
|
|
978
|
+
methodArguments?: unknown[];
|
|
979
|
+
/**
|
|
980
|
+
* If any, the results of the method invocation are assigned to the property
|
|
981
|
+
*/
|
|
982
|
+
methodResult?: unknown;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* This operation invokes the specified method on the given object with the given optional arguments
|
|
986
|
+
* and assigns the result to the `methodResult` operationdata property.
|
|
987
|
+
*
|
|
988
|
+
* @param operationData
|
|
989
|
+
* @returns
|
|
990
|
+
*/
|
|
991
|
+
declare const invokeObjectMethod: TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, 'methodName' | 'methodArguments'>>;
|
|
992
|
+
//#endregion
|
|
993
|
+
//#region src/operation/load-json.d.ts
|
|
994
|
+
interface ILoadJSONOperationData {
|
|
995
|
+
/**
|
|
996
|
+
* The URL where the JSON will be retrieved from
|
|
997
|
+
* @required
|
|
998
|
+
*/
|
|
999
|
+
url: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* If true, the results will be added to the cache and any subsequent call will use this cache
|
|
1002
|
+
*/
|
|
1003
|
+
cache: boolean;
|
|
1004
|
+
/**
|
|
1005
|
+
* The JSON retrieved from the given URL
|
|
1006
|
+
* @output
|
|
1007
|
+
*/
|
|
1008
|
+
json?: any;
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* This operation loads a JSON file from the specified url and assigns it to the json
|
|
1012
|
+
* property on the current operation data.
|
|
1013
|
+
*
|
|
1014
|
+
* If the cache property is set to true and a cached value already exists, this is assigned
|
|
1015
|
+
* instead of re-retrieving it from the url.
|
|
1016
|
+
*/
|
|
1017
|
+
declare const loadJson: TOperation<ILoadJSONOperationData>;
|
|
1018
|
+
//#endregion
|
|
1019
|
+
//#region src/operation/log.d.ts
|
|
1020
|
+
/**
|
|
1021
|
+
* This operation logs the current operation data, global data and context to the console.
|
|
1022
|
+
*/
|
|
1023
|
+
declare const log: TOperation<TOperationData>;
|
|
1024
|
+
//#endregion
|
|
1025
|
+
//#region src/operation/math.d.ts
|
|
1026
|
+
type MathFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? K : never }[keyof Math];
|
|
1027
|
+
type MathNonFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? never : K }[keyof Math];
|
|
1028
|
+
interface IMathOperationData {
|
|
1029
|
+
/**
|
|
1030
|
+
* @type=ParameterType:array
|
|
1031
|
+
* @required
|
|
1032
|
+
*/
|
|
1033
|
+
args: (number | string | MathNonFunctionKeys)[];
|
|
1034
|
+
/**
|
|
1035
|
+
* @required
|
|
1036
|
+
*/
|
|
1037
|
+
functionName: MathFunctionKeys;
|
|
1038
|
+
/**
|
|
1039
|
+
* @output
|
|
1040
|
+
*/
|
|
1041
|
+
mathResult?: number;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* This operation performs the given math function with the specified arguments.
|
|
1045
|
+
*/
|
|
1046
|
+
declare const math: TOperation<IMathOperationData, Omit<IMathOperationData, 'args' | 'functionName'>>;
|
|
1047
|
+
//#endregion
|
|
1048
|
+
//#region src/operation/otherwise.d.ts
|
|
1049
|
+
/**
|
|
1050
|
+
* If the preceeding {@link when} operation evaluates to `true` subsequent operations will
|
|
1051
|
+
* be skipped until an {@link endWhen} operation is encountered.
|
|
1052
|
+
*/
|
|
1053
|
+
declare const otherwise: TOperation<Record<string, unknown>>;
|
|
1054
|
+
//#endregion
|
|
1055
|
+
//#region src/operation/remove-class.d.ts
|
|
1056
|
+
interface IRemoveClassOperationData {
|
|
1057
|
+
/**
|
|
1058
|
+
* @dependency
|
|
1059
|
+
*/
|
|
1060
|
+
selectedElement: JQuery;
|
|
1061
|
+
/**
|
|
1062
|
+
* @type=ParameterType:className
|
|
1063
|
+
* @required
|
|
1064
|
+
*/
|
|
1065
|
+
className: string;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* This operation removes the spcified class name from the given selected element.
|
|
1069
|
+
*
|
|
1070
|
+
* @param operationData
|
|
1071
|
+
* @returns
|
|
1072
|
+
*/
|
|
1073
|
+
declare const removeClass: TOperation<IRemoveClassOperationData>;
|
|
1074
|
+
//#endregion
|
|
1075
|
+
//#region src/operation/remove-controller-from-element.d.ts
|
|
1076
|
+
interface IRemoveControllerFromElementOperationData {
|
|
1077
|
+
/**
|
|
1078
|
+
* @dependency
|
|
1079
|
+
*/
|
|
1080
|
+
selectedElement: JQuery;
|
|
1081
|
+
/**
|
|
1082
|
+
* @type=ParameterType:controllerName
|
|
1083
|
+
*/
|
|
1084
|
+
controllerName: string;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* This operation removes the controller with the specified name from the given selected element.
|
|
1088
|
+
*
|
|
1089
|
+
* @param operationData
|
|
1090
|
+
* @returns
|
|
1091
|
+
*/
|
|
1092
|
+
declare const removeControllerFromElement: TOperation<IRemoveControllerFromElementOperationData>;
|
|
1093
|
+
//#endregion
|
|
1094
|
+
//#region src/operation/remove-element.d.ts
|
|
1095
|
+
interface IRemoveElementOperationData {
|
|
1096
|
+
/**
|
|
1097
|
+
* @dependency
|
|
1098
|
+
*/
|
|
1099
|
+
selectedElement: JQuery;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* This operation removes the given selected element from the DOM.
|
|
1103
|
+
*
|
|
1104
|
+
* @param operationData
|
|
1105
|
+
* @returns
|
|
1106
|
+
*/
|
|
1107
|
+
declare const removeElement: TOperation<IRemoveElementOperationData>;
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region src/operation/remove-properties-from-operation-data.d.ts
|
|
1110
|
+
interface IRemovePropertiesFromOperationDataOperationData {
|
|
1111
|
+
/**
|
|
1112
|
+
* @required
|
|
1113
|
+
*/
|
|
1114
|
+
propertyNames: string[];
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* This operation removes the given list of properties from the current operation data.
|
|
1118
|
+
* It will also remove the property `propertyNames` from the result.
|
|
1119
|
+
*/
|
|
1120
|
+
declare const removePropertiesFromOperationData: TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, 'propertyNames'>>;
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region src/operation/reparent-element.d.ts
|
|
1123
|
+
interface IReparentElementOperationData {
|
|
1124
|
+
/**
|
|
1125
|
+
* @dependency
|
|
1126
|
+
*/
|
|
1127
|
+
selectedElement: JQuery;
|
|
1128
|
+
/**
|
|
1129
|
+
* @type=ParameterType:selector
|
|
1130
|
+
* @required
|
|
1131
|
+
*/
|
|
1132
|
+
newParentSelector: string;
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* This operation moves the given selected element to the new parent that is defined
|
|
1136
|
+
* by the specified `newParentSelector`.
|
|
1137
|
+
*
|
|
1138
|
+
* @param operationData
|
|
1139
|
+
* @returns
|
|
1140
|
+
*/
|
|
1141
|
+
declare const reparentElement: TOperation<IReparentElementOperationData>;
|
|
1142
|
+
//#endregion
|
|
1143
|
+
//#region src/operation/request-action.d.ts
|
|
1144
|
+
interface IRequestActionOperationData {
|
|
1145
|
+
/**
|
|
1146
|
+
* @type=ParameterType:actionName
|
|
1147
|
+
* @required
|
|
1148
|
+
*/
|
|
1149
|
+
systemName: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* @type=ParameterType:object
|
|
1152
|
+
* @output
|
|
1153
|
+
*/
|
|
1154
|
+
actionInstance?: IAction;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* This operation requests an action instance with the specified name and assigns it
|
|
1158
|
+
* to the `actionInstance` property on the current operation data.
|
|
1159
|
+
*/
|
|
1160
|
+
declare const requestAction: TOperation<IRequestActionOperationData, Required<IRequestActionOperationData>>;
|
|
1161
|
+
//#endregion
|
|
1162
|
+
//#region src/operation/resize-action.d.ts
|
|
1163
|
+
interface IResizeActionOperationData {
|
|
1164
|
+
/**
|
|
1165
|
+
* @dependency
|
|
1166
|
+
*/
|
|
1167
|
+
actionInstance: any;
|
|
1168
|
+
/**
|
|
1169
|
+
* @type=ParameterType:object
|
|
1170
|
+
*/
|
|
1171
|
+
actionOperationData: TOperationData;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* @deprecated
|
|
1175
|
+
*/
|
|
1176
|
+
declare const resizeAction: TOperation<IResizeActionOperationData>;
|
|
1177
|
+
//#endregion
|
|
1178
|
+
//#region src/operation/select-element.d.ts
|
|
1179
|
+
interface ISelectElementOperationData {
|
|
1180
|
+
/**
|
|
1181
|
+
* @type=ParameterType:selector
|
|
1182
|
+
* @required
|
|
1183
|
+
*/
|
|
1184
|
+
selector: string;
|
|
1185
|
+
useSelectedElementAsRoot?: boolean;
|
|
1186
|
+
/**
|
|
1187
|
+
* @type=ParameterType:object
|
|
1188
|
+
* @output
|
|
1189
|
+
*/
|
|
1190
|
+
selectedElement?: JQuery;
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* This operation selects one or more elements using the specified selector.
|
|
1194
|
+
*
|
|
1195
|
+
* If `useSelectedElementAsRoot` is set to true and a valid DOM element is assigned
|
|
1196
|
+
* to the current operation data's `selectedElement` property
|
|
1197
|
+
* then the element will be looked for only in the descendant elements of this DOM element.
|
|
1198
|
+
*/
|
|
1199
|
+
declare const selectElement: TOperation<ISelectElementOperationData>;
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region src/operation/set-data.d.ts
|
|
1202
|
+
type TDataTarget = `context.${string}` | `operationdata.${string}` | `globaldata.${string}`;
|
|
1203
|
+
interface ISetDataOperationData {
|
|
1204
|
+
/**
|
|
1205
|
+
* @required
|
|
1206
|
+
*/
|
|
1207
|
+
properties: Record<TDataTarget, any>;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* This operation assigns the specified properties to the specified data targets.
|
|
1211
|
+
*
|
|
1212
|
+
* @example The various ways of assigning data
|
|
1213
|
+
* ```ts
|
|
1214
|
+
* setData({
|
|
1215
|
+
* 'operationdata.foo': 'context.currentItem', // context.currentItem will be assigned to operationdata.foo
|
|
1216
|
+
* 'globaldata.foo': 'context.currentItem', // context.currentItem will be assigned to globaldata.foo
|
|
1217
|
+
* 'context.newIndex': 100, // The constant 100 will be assigned to context.newIndex
|
|
1218
|
+
* })
|
|
1219
|
+
* ```
|
|
1220
|
+
*/
|
|
1221
|
+
declare const setData: TOperation<ISetDataOperationData>;
|
|
1222
|
+
//#endregion
|
|
1223
|
+
//#region src/operation/set-element-attributes.d.ts
|
|
1224
|
+
interface ISetElementAttributesOperationData {
|
|
1225
|
+
/**
|
|
1226
|
+
* @required
|
|
1227
|
+
*/
|
|
1228
|
+
attributes: Record<string, unknown>;
|
|
1229
|
+
/**
|
|
1230
|
+
* @dependency
|
|
1231
|
+
*/
|
|
1232
|
+
selectedElement: JQuery;
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* This operation sets the specified set of attributes on the given selected element.
|
|
1236
|
+
*/
|
|
1237
|
+
declare const setElementAttributes: TOperation<ISetElementAttributesOperationData>;
|
|
1238
|
+
//#endregion
|
|
1239
|
+
//#region src/operation/set-element-content.d.ts
|
|
1240
|
+
interface ISetElementContentOperationData {
|
|
1241
|
+
/**
|
|
1242
|
+
* @dependency
|
|
1243
|
+
*/
|
|
1244
|
+
selectedElement: JQuery;
|
|
1245
|
+
/**
|
|
1246
|
+
* @dependency
|
|
1247
|
+
*/
|
|
1248
|
+
template: string | JQuery.Node;
|
|
1249
|
+
/**
|
|
1250
|
+
* overwite = the contents of the selected element are replaced by the given template
|
|
1251
|
+
*
|
|
1252
|
+
* append = the new content will be inserted after the current content
|
|
1253
|
+
*
|
|
1254
|
+
* prepend = the new content will be inserted before the current content
|
|
1255
|
+
*/
|
|
1256
|
+
insertionType: 'overwrite' | 'append' | 'prepend';
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* This operation sets the specified content defined by the value assigned to the template property
|
|
1260
|
+
* to the given selected element.
|
|
1261
|
+
*
|
|
1262
|
+
* When the `insertionType` is set to `overwrite` the contents of the selected element are replaced
|
|
1263
|
+
* by the given template.
|
|
1264
|
+
* When set to `append` the new content will be inserted after the current content.
|
|
1265
|
+
* When set to `prepend` the new content will be inserted before the current content.
|
|
1266
|
+
*/
|
|
1267
|
+
declare const setElementContent: TOperation<ISetElementContentOperationData>;
|
|
1268
|
+
//#endregion
|
|
1269
|
+
//#region src/operation/set-global-data.d.ts
|
|
1270
|
+
interface ISetGlobalDataOperationData {
|
|
1271
|
+
/**
|
|
1272
|
+
* @required
|
|
1273
|
+
*/
|
|
1274
|
+
propertyNames: string[];
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* This operation copies the specified properties from the operationData to the global data.
|
|
1278
|
+
*/
|
|
1279
|
+
declare const setGlobalData: TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, 'propertyNames'>>;
|
|
1280
|
+
//#endregion
|
|
1281
|
+
//#region src/operation/set-operation-data.d.ts
|
|
1282
|
+
interface ISetOperationData {
|
|
1283
|
+
/**
|
|
1284
|
+
* If set to true, the plucked properties replace the current operation data.
|
|
1285
|
+
*/
|
|
1286
|
+
override?: boolean;
|
|
1287
|
+
/**
|
|
1288
|
+
* @required
|
|
1289
|
+
*/
|
|
1290
|
+
properties: Record<string, any>;
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* This operation assigns the specified properties to the current operation data.
|
|
1294
|
+
* When override is set to true the properties replace the current operation data entirely.
|
|
1295
|
+
*/
|
|
1296
|
+
declare const setOperationData: TOperation<ISetOperationData, Omit<ISetOperationData, 'override' | 'properties'>>;
|
|
1297
|
+
//#endregion
|
|
1298
|
+
//#region src/operation/set-style.d.ts
|
|
1299
|
+
interface ISetStyleOperationData {
|
|
1300
|
+
/**
|
|
1301
|
+
* @required
|
|
1302
|
+
*/
|
|
1303
|
+
properties: Record<string, any>;
|
|
1304
|
+
/**
|
|
1305
|
+
* @dependency
|
|
1306
|
+
*/
|
|
1307
|
+
selectedElement: JQuery;
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* This operation assigns the specified CSS style properties to the
|
|
1311
|
+
* given selected element.
|
|
1312
|
+
*/
|
|
1313
|
+
declare const setStyle: TOperation<ISetStyleOperationData>;
|
|
1314
|
+
//#endregion
|
|
1315
|
+
//#region src/operation/start-action.d.ts
|
|
1316
|
+
interface IStartActionOperationData {
|
|
1317
|
+
/**
|
|
1318
|
+
* @dependency
|
|
1319
|
+
*/
|
|
1320
|
+
actionInstance: IAction;
|
|
1321
|
+
/**
|
|
1322
|
+
* @type=ParameterType:object
|
|
1323
|
+
*/
|
|
1324
|
+
actionOperationData: TOperationData;
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* This operation starts the specified action instance using the given action operation data.
|
|
1328
|
+
*
|
|
1329
|
+
* The action operation data is first merged with the current operation data before it is
|
|
1330
|
+
* passed on to the action. After the action has completed the action operation data properties
|
|
1331
|
+
* are removed from the current operation data.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const startAction: TOperation<IStartActionOperationData>;
|
|
1334
|
+
//#endregion
|
|
1335
|
+
//#region src/operation/toggle-class.d.ts
|
|
1336
|
+
interface IToggleClassOperationData {
|
|
1337
|
+
/**
|
|
1338
|
+
* The element on which the class will be toggled
|
|
1339
|
+
* @dependency
|
|
1340
|
+
*/
|
|
1341
|
+
selectedElement: JQuery;
|
|
1342
|
+
/**
|
|
1343
|
+
* The class that will be toggled
|
|
1344
|
+
* @type=ParameterType:className
|
|
1345
|
+
* @required
|
|
1346
|
+
*/
|
|
1347
|
+
className: string;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* This operation toggles the specfied class name on the given selected element.
|
|
1351
|
+
*
|
|
1352
|
+
* Meaning, if the specified class name exists on the given element it will be removed,
|
|
1353
|
+
* otherwise it will be added.
|
|
1354
|
+
*/
|
|
1355
|
+
declare const toggleClass: TOperation<IToggleClassOperationData>;
|
|
1356
|
+
//#endregion
|
|
1357
|
+
//#region src/operation/toggle-element.d.ts
|
|
1358
|
+
interface IToggleElementOperationData {
|
|
1359
|
+
/**
|
|
1360
|
+
* The element whose visibility will be toggled
|
|
1361
|
+
* @dependency
|
|
1362
|
+
*/
|
|
1363
|
+
selectedElement: JQuery;
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* This operation toggles the visibility of the given selected element.
|
|
1367
|
+
*
|
|
1368
|
+
* Meaning, if the element is hidden, it will be made visible, otherwise
|
|
1369
|
+
* it will be hidden.
|
|
1370
|
+
*/
|
|
1371
|
+
declare const toggleElement: TOperation<IToggleElementOperationData>;
|
|
1372
|
+
//#endregion
|
|
1373
|
+
//#region src/operation/wait.d.ts
|
|
1374
|
+
interface IWaitOperationData {
|
|
1375
|
+
/**
|
|
1376
|
+
* The amount of milliseconds the operation will wait for.
|
|
1377
|
+
* @required
|
|
1378
|
+
*/
|
|
1379
|
+
milliseconds: number;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* This operation waits for the specified amount of milliseconds.
|
|
1383
|
+
*/
|
|
1384
|
+
declare const wait: TOperation<IWaitOperationData>;
|
|
1385
|
+
//#endregion
|
|
1386
|
+
//#region src/operation/when.d.ts
|
|
1387
|
+
type TOperator = '!=' | '==' | '>=' | '<=' | '>' | '<';
|
|
1388
|
+
type TValue = `'${string}'` | number | `operationdata.${string}` | `globaldata.${string}` | `context.${string}`;
|
|
1389
|
+
type TExpression = `${TValue}${TOperator}${TValue}`;
|
|
1390
|
+
interface IWhenOperationData {
|
|
1391
|
+
/**
|
|
1392
|
+
* @required
|
|
1393
|
+
*/
|
|
1394
|
+
expression: TExpression;
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* When the given expression evaluates to false, subsequent operations will be skipped
|
|
1398
|
+
* until an {@link endWhen} or {@link otherwise} operation is encountered.
|
|
1399
|
+
*
|
|
1400
|
+
* Practically, this means an `if` or `if`/`else` statement control flow implementation in a list of operations.
|
|
1401
|
+
*
|
|
1402
|
+
* @param operationData
|
|
1403
|
+
* @returns
|
|
1404
|
+
*/
|
|
1405
|
+
declare const when: TOperation<IWhenOperationData>;
|
|
1406
|
+
declare namespace index_d_exports$1 {
|
|
1407
|
+
export { ExtractOperationData, ExtractReturnedOperationData, IOperationContext, TOperation, TOperationData, TOperationResult, addClass, addControllerToElement, animate, animateWithClass, broadcastEvent, calc, clearElement, clearOperationData, createElement, customFunction, endAction, endForEach, endWhen, extendController, forEach, getAttributesFromElement, getControllerFromElement, getControllerInstance, getElementDimensions, getImport, getQueryParams, invokeObjectMethod, loadJson, log, math, otherwise, removeClass, removeControllerFromElement, removeElement, removePropertiesFromOperationData, reparentElement, requestAction, resizeAction, selectElement, setData, setElementAttributes, setElementContent, setGlobalData, setOperationData, setStyle, startAction, toggleClass, toggleElement, wait, when };
|
|
1408
|
+
}
|
|
1409
|
+
//#endregion
|
|
1410
|
+
//#region src/configuration/types.d.ts
|
|
1411
|
+
type Controllers = typeof index_d_exports$2;
|
|
1412
|
+
type TControllerName = keyof Controllers;
|
|
1413
|
+
type TControllerType = Controllers[TControllerName];
|
|
1414
|
+
type GetControllerByName<T extends TControllerName> = Controllers[T];
|
|
1415
|
+
type Operations = typeof index_d_exports$1;
|
|
1416
|
+
type TOperationName = keyof Operations;
|
|
1417
|
+
type TOperationType = Operations[TOperationName];
|
|
1418
|
+
type GetOperationByName<T extends TOperationName> = Operations[T];
|
|
1419
|
+
type ExtractOperationDataType<P> = P extends TOperation<infer T, any> ? T : never;
|
|
1420
|
+
interface IEngineInfo {
|
|
1421
|
+
systemName: string;
|
|
1422
|
+
}
|
|
1423
|
+
type TTimelineProviderSettings = Partial<Record<TimelineTypes, ITimelineProviderSettings>>;
|
|
1424
|
+
interface IEngineConfiguration {
|
|
1425
|
+
id: string;
|
|
1426
|
+
engine: IEngineInfo;
|
|
1427
|
+
timelineProviderSettings?: TTimelineProviderSettings;
|
|
1428
|
+
containerSelector: string;
|
|
1429
|
+
language: TLanguageCode;
|
|
1430
|
+
layoutTemplate: string;
|
|
1431
|
+
availableLanguages: ILabel[];
|
|
1432
|
+
initActions: IEndableActionConfiguration[];
|
|
1433
|
+
actions: IEndableActionConfiguration[];
|
|
1434
|
+
eventActions?: IEventActionConfiguration[];
|
|
1435
|
+
timelines: ITimelineConfiguration[];
|
|
1436
|
+
timelineFlow?: ITimelineFlow;
|
|
1437
|
+
labels: ILanguageLabel[];
|
|
1438
|
+
}
|
|
1439
|
+
interface IResolvedEngineConfiguration {
|
|
1440
|
+
id: string;
|
|
1441
|
+
engine: IEngineInfo;
|
|
1442
|
+
timelineProviderSettings: TTimelineProviderSettings;
|
|
1443
|
+
containerSelector: string;
|
|
1444
|
+
language: TLanguageCode;
|
|
1445
|
+
layoutTemplate: string;
|
|
1446
|
+
availableLanguages: ILabel[];
|
|
1447
|
+
initActions: IEndableAction[];
|
|
1448
|
+
actions: IEndableAction[];
|
|
1449
|
+
timelines: IResolvedTimelineConfiguration[];
|
|
1450
|
+
timelineFlow?: ITimelineFlow;
|
|
1451
|
+
labels: ILanguageLabel[];
|
|
1452
|
+
}
|
|
1453
|
+
interface IResolvedActionConfiguration {
|
|
1454
|
+
id: string;
|
|
1455
|
+
name: string;
|
|
1456
|
+
startOperations: IResolvedOperation[];
|
|
1457
|
+
}
|
|
1458
|
+
interface IResolvedEndableActionConfiguration extends IResolvedActionConfiguration {
|
|
1459
|
+
endOperations: IResolvedOperation[];
|
|
1460
|
+
}
|
|
1461
|
+
type ITimelineFlow = {};
|
|
1462
|
+
interface ITimelineProviderSettings {
|
|
1463
|
+
id: string;
|
|
1464
|
+
vendor: string;
|
|
1465
|
+
systemName: string;
|
|
1466
|
+
selector?: string;
|
|
1467
|
+
poster?: string;
|
|
1468
|
+
}
|
|
1469
|
+
interface IResolvedTimelineConfiguration {
|
|
1470
|
+
id: string;
|
|
1471
|
+
uri: string;
|
|
1472
|
+
type: TimelineTypes;
|
|
1473
|
+
duration: number;
|
|
1474
|
+
loop: boolean;
|
|
1475
|
+
selector: string;
|
|
1476
|
+
timelineActions: ITimelineAction[];
|
|
1477
|
+
}
|
|
1478
|
+
interface ITimelineConfiguration {
|
|
1479
|
+
id: string;
|
|
1480
|
+
uri: string;
|
|
1481
|
+
type: TimelineTypes;
|
|
1482
|
+
duration: number;
|
|
1483
|
+
loop: boolean;
|
|
1484
|
+
selector: string;
|
|
1485
|
+
timelineActions: ITimelineActionConfiguration[];
|
|
1486
|
+
}
|
|
1487
|
+
interface IOperationConfiguration<T extends TOperationData> {
|
|
1488
|
+
id: string;
|
|
1489
|
+
systemName: string;
|
|
1490
|
+
operationData?: T;
|
|
1491
|
+
}
|
|
1492
|
+
interface IEventActionConfiguration extends IActionConfiguration {
|
|
1493
|
+
eventName: string;
|
|
1494
|
+
eventTopic?: string;
|
|
1495
|
+
}
|
|
1496
|
+
interface IActionConfiguration {
|
|
1497
|
+
id: string;
|
|
1498
|
+
name: string;
|
|
1499
|
+
startOperations: IOperationConfiguration<TOperationData>[];
|
|
1500
|
+
}
|
|
1501
|
+
interface IEndableActionConfiguration extends IActionConfiguration {
|
|
1502
|
+
endOperations: IOperationConfiguration<TOperationData>[];
|
|
1503
|
+
}
|
|
1504
|
+
interface ITimelineActionConfiguration extends IEndableActionConfiguration {
|
|
1505
|
+
duration: IDuration;
|
|
1506
|
+
}
|
|
1507
|
+
interface IEventActionConfiguration extends IActionConfiguration {
|
|
1508
|
+
eventName: string;
|
|
1509
|
+
eventTopic?: string;
|
|
1510
|
+
}
|
|
1511
|
+
interface IResolvedOperation {
|
|
1512
|
+
id: string;
|
|
1513
|
+
systemName: string;
|
|
1514
|
+
operationData: TOperationData;
|
|
1515
|
+
instance: TOperation<any>;
|
|
1516
|
+
}
|
|
1517
|
+
//#endregion
|
|
1518
|
+
//#region src/action/action.d.ts
|
|
1519
|
+
declare class Action implements IAction {
|
|
1520
|
+
name: string;
|
|
1521
|
+
startOperations: IResolvedOperation[];
|
|
1522
|
+
protected eventbus: IEventbus;
|
|
1523
|
+
id: string;
|
|
1524
|
+
protected _contextStack: IOperationContext[];
|
|
1525
|
+
constructor(name: string, startOperations: IResolvedOperation[], eventbus: IEventbus);
|
|
1526
|
+
start(initOperationData?: TOperationData): Promise<TOperationData>;
|
|
1527
|
+
protected _initializeContextStack(): void;
|
|
1528
|
+
private _pushContext;
|
|
1529
|
+
private _popContext;
|
|
1530
|
+
executeOperation(operations: IResolvedOperation[], operationIndex: number, resolve: (value?: any | PromiseLike<any>) => void, reject: (reason?: any) => void, previousOperationData?: TOperationData | undefined): void;
|
|
1531
|
+
}
|
|
1532
|
+
//#endregion
|
|
1533
|
+
//#region src/action/endable-action.d.ts
|
|
1534
|
+
declare class EndableAction extends Action {
|
|
1535
|
+
endOperations: IResolvedOperation[];
|
|
1536
|
+
constructor(name: string, startOperations: IResolvedOperation[], endOperations: IResolvedOperation[], eventBus: IEventbus);
|
|
1537
|
+
end(initOperationData?: TOperationData): Promise<TOperationData>;
|
|
1538
|
+
}
|
|
1539
|
+
//#endregion
|
|
1540
|
+
//#region src/action/timeline-action.d.ts
|
|
1541
|
+
declare class TimelineAction extends EndableAction implements ITimelineAction {
|
|
1542
|
+
duration: IStrictDuration;
|
|
1543
|
+
private _active;
|
|
1544
|
+
get active(): boolean;
|
|
1545
|
+
constructor(name: string, startOperations: IResolvedOperation[], endOperations: IResolvedOperation[], duration: IStrictDuration, eventBus: IEventbus);
|
|
1546
|
+
start(initOperationData?: TOperationData): Promise<TOperationData>;
|
|
1547
|
+
end(initOperationData: TOperationData): Promise<TOperationData>;
|
|
1548
|
+
}
|
|
1549
|
+
//#endregion
|
|
1550
|
+
//#region src/build/generate-importer-source-code.d.ts
|
|
1551
|
+
interface IAssetInfo {
|
|
1552
|
+
path: string;
|
|
1553
|
+
extension: string;
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* This function takes an Eligius engine configuration, a root path for the configuration file and an arbitrary list of asset info.
|
|
1557
|
+
* The asset info determines a number of subdirectories in the root path that contain the different assets used by the presentation.
|
|
1558
|
+
* I.e. html, json, etc.
|
|
1559
|
+
*
|
|
1560
|
+
* @param config
|
|
1561
|
+
* @param configPath
|
|
1562
|
+
* @param assetInfo
|
|
1563
|
+
*/
|
|
1564
|
+
declare function generateImporterSourceCode(config: IEngineConfiguration, configPath: string, assetInfo: IAssetInfo[]): string;
|
|
1565
|
+
//#endregion
|
|
1566
|
+
//#region src/configuration/api/action-editor.d.ts
|
|
1567
|
+
/**
|
|
1568
|
+
*
|
|
1569
|
+
* A factory that assists in editing an action
|
|
1570
|
+
*
|
|
1571
|
+
*/
|
|
1572
|
+
declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration> {
|
|
1573
|
+
protected actionConfig: T;
|
|
1574
|
+
protected readonly configurationFactory: ConfigurationFactory;
|
|
1575
|
+
constructor(actionConfig: T, configurationFactory: ConfigurationFactory);
|
|
1576
|
+
updateConfiguration(): void;
|
|
1577
|
+
/**
|
|
1578
|
+
*
|
|
1579
|
+
* Returns a copy of the current internal state of the factory
|
|
1580
|
+
*
|
|
1581
|
+
* @param callBack
|
|
1582
|
+
* @returns
|
|
1583
|
+
*/
|
|
1584
|
+
getConfiguration(callBack: (config: T) => T | undefined): this;
|
|
1585
|
+
/**
|
|
1586
|
+
*
|
|
1587
|
+
* Sets the action name
|
|
1588
|
+
*
|
|
1589
|
+
* @param name
|
|
1590
|
+
* @returns
|
|
1591
|
+
*/
|
|
1592
|
+
setName(name: string): this;
|
|
1593
|
+
/**
|
|
1594
|
+
*
|
|
1595
|
+
* Gets the action name
|
|
1596
|
+
*
|
|
1597
|
+
* @returns
|
|
1598
|
+
*/
|
|
1599
|
+
getName(): string;
|
|
1600
|
+
/**
|
|
1601
|
+
*
|
|
1602
|
+
* Adds the operation data for a start operation specified by the given type
|
|
1603
|
+
*
|
|
1604
|
+
* @param operationClass
|
|
1605
|
+
* @param operationData
|
|
1606
|
+
* @returns
|
|
1607
|
+
*/
|
|
1608
|
+
addStartOperationByType<T extends TOperation<TOperationData>>(operationClass: T, operationData: Partial<ExtractOperationDataType<T>>): OperationEditor<this, T>;
|
|
1609
|
+
/**
|
|
1610
|
+
*
|
|
1611
|
+
* Adds the operation data for a start operation specified by the given system name
|
|
1612
|
+
*
|
|
1613
|
+
* @param systemName
|
|
1614
|
+
* @param operationData
|
|
1615
|
+
* @param id
|
|
1616
|
+
* @returns
|
|
1617
|
+
*/
|
|
1618
|
+
addStartOperation(systemName: TOperationName, operationData: TOperationData, id?: string): OperationEditor<this, TOperation<TOperationData>>;
|
|
1619
|
+
/**
|
|
1620
|
+
*
|
|
1621
|
+
* Starts an editor for the start operation associated with the given id
|
|
1622
|
+
*
|
|
1623
|
+
* @param id
|
|
1624
|
+
* @returns
|
|
1625
|
+
*/
|
|
1626
|
+
editStartOperation(id: string): OperationEditor<ActionEditor<T>, TOperation<TOperationData>>;
|
|
1627
|
+
/**
|
|
1628
|
+
*
|
|
1629
|
+
* Removes the start operation associated with the given id
|
|
1630
|
+
*
|
|
1631
|
+
* @param id
|
|
1632
|
+
* @returns
|
|
1633
|
+
*/
|
|
1634
|
+
removeStartOperation(id: string): this;
|
|
1635
|
+
/**
|
|
1636
|
+
*
|
|
1637
|
+
* Moves the start operation associated with the given id in the given direction
|
|
1638
|
+
*
|
|
1639
|
+
* @param id
|
|
1640
|
+
* @param direction
|
|
1641
|
+
* @returns
|
|
1642
|
+
*/
|
|
1643
|
+
moveStartOperation(id: string, direction: 'up' | 'down'): this;
|
|
1644
|
+
/**
|
|
1645
|
+
*
|
|
1646
|
+
* Return the fluent scopt to the `ConfigurationFactory`
|
|
1647
|
+
*
|
|
1648
|
+
* @returns
|
|
1649
|
+
*/
|
|
1650
|
+
next(): ConfigurationFactory;
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
*
|
|
1654
|
+
* A factory that assists in editing an endable action
|
|
1655
|
+
*
|
|
1656
|
+
*/
|
|
1657
|
+
declare class EndableActionEditor<T extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionEditor<T> {
|
|
1658
|
+
/**
|
|
1659
|
+
*
|
|
1660
|
+
* Adds the operation data for a end operation specified by the given type
|
|
1661
|
+
*
|
|
1662
|
+
* @param operationClass
|
|
1663
|
+
* @param operationData
|
|
1664
|
+
* @returns
|
|
1665
|
+
*/
|
|
1666
|
+
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): OperationEditor<this, TOperationType>;
|
|
1667
|
+
/**
|
|
1668
|
+
*
|
|
1669
|
+
* Adds the operation data for a start operation specified by the given system name
|
|
1670
|
+
*
|
|
1671
|
+
* @param systemName
|
|
1672
|
+
* @param operationData
|
|
1673
|
+
* @returns
|
|
1674
|
+
*/
|
|
1675
|
+
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: TOperationName, operationData: O): OperationEditor<this, TOperation<TOperationData> | TOperation<IForEachOperationData> | TOperation<IAddClassOperationData> | TOperation<IAddControllerToElementOperationData<TOperationData>> | TOperation<IAnimateOperationData> | TOperation<IAnimateWithClassOperationData, Promise<IAnimateWithClassOperationData>> | TOperation<IBroadcastEventOperationData> | TOperation<ICalcOperationData> | TOperation<IClearElementOperationData> | TOperation<IClearOperationDataOperationData> | TOperation<ICreateElementOperationData<keyof HTMLElementTagNameMap>, RequireKeys<ICreateElementOperationData<keyof HTMLElementTagNameMap>, "template">> | TOperation<ICustomFunctionOperationData> | TOperation<IEndActionOperationData> | TOperation<Record<string, unknown>> | TOperation<IExtendControllerOperationData> | TOperation<IGetAttributesFromElementOperationData> | TOperation<IGetControllerFromElementOperationData> | TOperation<IGetControllerInstanceOperationData> | TOperation<IGetElementDimensionsOperationData> | TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, "importedInstance">, "systemName">> | TOperation<IGetQueryParamsOperationData> | TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, "methodName" | "methodArguments">> | TOperation<ILoadJSONOperationData> | TOperation<IMathOperationData, Omit<IMathOperationData, "args" | "functionName">> | TOperation<IRemoveClassOperationData> | TOperation<IRemoveControllerFromElementOperationData> | TOperation<IRemoveElementOperationData> | TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, "propertyNames">> | TOperation<IReparentElementOperationData> | TOperation<IRequestActionOperationData, Required<IRequestActionOperationData>> | TOperation<IResizeActionOperationData> | TOperation<ISelectElementOperationData> | TOperation<ISetDataOperationData> | TOperation<ISetElementAttributesOperationData> | TOperation<ISetElementContentOperationData> | TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, "propertyNames">> | TOperation<ISetOperationData, Omit<ISetOperationData, "override" | "properties">> | TOperation<ISetStyleOperationData> | TOperation<IStartActionOperationData> | TOperation<IToggleClassOperationData> | TOperation<IToggleElementOperationData> | TOperation<IWaitOperationData> | TOperation<IWhenOperationData>>;
|
|
1676
|
+
/**
|
|
1677
|
+
*
|
|
1678
|
+
* Starts an editor for the end operation associated with the given id
|
|
1679
|
+
*
|
|
1680
|
+
* @param id
|
|
1681
|
+
* @returns
|
|
1682
|
+
*/
|
|
1683
|
+
editEndOperation(id: string): OperationEditor<this, TOperation<TOperationData>>;
|
|
1684
|
+
/**
|
|
1685
|
+
*
|
|
1686
|
+
* Removes the end operation associated with the given id
|
|
1687
|
+
*
|
|
1688
|
+
* @param id
|
|
1689
|
+
* @returns
|
|
1690
|
+
*/
|
|
1691
|
+
removeEndOperation(id: string): this;
|
|
1692
|
+
/**
|
|
1693
|
+
*
|
|
1694
|
+
* Moves the end operation associated with the given id in the specified direction
|
|
1695
|
+
*
|
|
1696
|
+
* @param id
|
|
1697
|
+
* @param direction
|
|
1698
|
+
* @returns
|
|
1699
|
+
*/
|
|
1700
|
+
moveEndOperation(id: string, direction: 'up' | 'down'): this;
|
|
1701
|
+
}
|
|
1702
|
+
/**
|
|
1703
|
+
*
|
|
1704
|
+
* A factory that assists in editing a timeline action
|
|
1705
|
+
*
|
|
1706
|
+
*/
|
|
1707
|
+
declare class TimelineActionEditor extends EndableActionEditor<ITimelineActionConfiguration> {
|
|
1708
|
+
/**
|
|
1709
|
+
*
|
|
1710
|
+
* Sets the duration specified by the given start and optional end positions
|
|
1711
|
+
*
|
|
1712
|
+
* @param start
|
|
1713
|
+
* @param end
|
|
1714
|
+
* @returns
|
|
1715
|
+
*/
|
|
1716
|
+
setDuration(start: number, end?: number): this;
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
*
|
|
1720
|
+
* A factory that assists in editing an operation
|
|
1721
|
+
*
|
|
1722
|
+
*/
|
|
1723
|
+
declare class OperationEditor<T extends ActionEditor, O extends TOperationType = TOperation<TOperationData>> {
|
|
1724
|
+
private operationConfig;
|
|
1725
|
+
private actionEditor;
|
|
1726
|
+
constructor(operationConfig: IOperationConfiguration<ExtractOperationDataType<O>>, actionEditor: T);
|
|
1727
|
+
/**
|
|
1728
|
+
*
|
|
1729
|
+
* Invokes the given callback with a copy of the internal state of the factory
|
|
1730
|
+
*
|
|
1731
|
+
* @param callBack
|
|
1732
|
+
* @returns
|
|
1733
|
+
*/
|
|
1734
|
+
getConfiguration(callBack: (config: IOperationConfiguration<ExtractOperationDataType<O>>) => IOperationConfiguration<ExtractOperationDataType<O>>): this;
|
|
1735
|
+
/**
|
|
1736
|
+
*
|
|
1737
|
+
* Gets the system name
|
|
1738
|
+
*
|
|
1739
|
+
* @returns
|
|
1740
|
+
*/
|
|
1741
|
+
getSystemName(): string;
|
|
1742
|
+
/**
|
|
1743
|
+
*
|
|
1744
|
+
* Sets the system name
|
|
1745
|
+
*
|
|
1746
|
+
* @param systemName
|
|
1747
|
+
* @returns
|
|
1748
|
+
*/
|
|
1749
|
+
setSystemName(systemName: TOperationName): this;
|
|
1750
|
+
/**
|
|
1751
|
+
*
|
|
1752
|
+
* Sets the operation data
|
|
1753
|
+
*
|
|
1754
|
+
* @param operationData
|
|
1755
|
+
* @returns
|
|
1756
|
+
*/
|
|
1757
|
+
setOperationData(operationData: ExtractOperationDataType<O>): this;
|
|
1758
|
+
/**
|
|
1759
|
+
*
|
|
1760
|
+
* Sets the value on the current `operationData` with the given key
|
|
1761
|
+
*
|
|
1762
|
+
* @param key
|
|
1763
|
+
* @param value
|
|
1764
|
+
* @returns
|
|
1765
|
+
*/
|
|
1766
|
+
setOperationDataItem(key: keyof ExtractOperationDataType<O>, value: ExtractOperationDataType<O>[keyof ExtractOperationDataType<O>]): this;
|
|
1767
|
+
/**
|
|
1768
|
+
*
|
|
1769
|
+
* returns all of the defined property names on the current `operationData`
|
|
1770
|
+
*
|
|
1771
|
+
* @returns
|
|
1772
|
+
*/
|
|
1773
|
+
getOperationDataKeys(): keyof ExtractOperationDataType<O>;
|
|
1774
|
+
/**
|
|
1775
|
+
*
|
|
1776
|
+
* Gets the value of the given key on the current `operationData`
|
|
1777
|
+
*
|
|
1778
|
+
* @param key
|
|
1779
|
+
* @returns
|
|
1780
|
+
*/
|
|
1781
|
+
getOperationDataValue(key: keyof ExtractOperationDataType<O>): ExtractOperationDataType<O>[keyof ExtractOperationDataType<O>] | undefined;
|
|
1782
|
+
/**
|
|
1783
|
+
*
|
|
1784
|
+
* Returns the fluent scope back to the action editor
|
|
1785
|
+
*
|
|
1786
|
+
* @returns
|
|
1787
|
+
*/
|
|
1788
|
+
next(): T;
|
|
1789
|
+
}
|
|
1790
|
+
//#endregion
|
|
1791
|
+
//#region src/configuration/api/label-editor.d.ts
|
|
1792
|
+
/**
|
|
1793
|
+
* Factory that assists with editing a label
|
|
1794
|
+
*/
|
|
1795
|
+
declare class LabelEditor {
|
|
1796
|
+
private configurationFactory;
|
|
1797
|
+
private languageLabel;
|
|
1798
|
+
constructor(configurationFactory: ConfigurationFactory, languageLabel: ILanguageLabel);
|
|
1799
|
+
private _internalGetLabel;
|
|
1800
|
+
/**
|
|
1801
|
+
*
|
|
1802
|
+
* Set the translation associated with the given language code
|
|
1803
|
+
*
|
|
1804
|
+
* @param languageCode
|
|
1805
|
+
* @param translation
|
|
1806
|
+
* @returns
|
|
1807
|
+
*/
|
|
1808
|
+
setLabel(languageCode: TLanguageCode, translation: string): this;
|
|
1809
|
+
/**
|
|
1810
|
+
*
|
|
1811
|
+
* Remove all of the translations for the given language code
|
|
1812
|
+
*
|
|
1813
|
+
* @param languageCode
|
|
1814
|
+
* @returns
|
|
1815
|
+
*/
|
|
1816
|
+
removeLabel(languageCode: TLanguageCode): this;
|
|
1817
|
+
/**
|
|
1818
|
+
*
|
|
1819
|
+
* Returns the fluent scope back to the `ConfigurationFactory`
|
|
1820
|
+
*
|
|
1821
|
+
* @returns
|
|
1822
|
+
*/
|
|
1823
|
+
end(): ConfigurationFactory;
|
|
1824
|
+
}
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region src/configuration/api/timeline-provider-settings-editor.d.ts
|
|
1827
|
+
declare class TimelineProvidersSettingsEditor {
|
|
1828
|
+
private providersSettings;
|
|
1829
|
+
private configurationFactory;
|
|
1830
|
+
constructor(providersSettings: TTimelineProviderSettings, configurationFactory: ConfigurationFactory);
|
|
1831
|
+
addProvider(timelineType: TimelineTypes): TimelineProviderSettingsEditor;
|
|
1832
|
+
editProvider(timelineType: TimelineTypes): TimelineProviderSettingsEditor;
|
|
1833
|
+
next(): ConfigurationFactory;
|
|
1834
|
+
}
|
|
1835
|
+
declare class TimelineProviderSettingsEditor {
|
|
1836
|
+
private providerSettings;
|
|
1837
|
+
private providersSettingsEditor;
|
|
1838
|
+
private configurationFactory;
|
|
1839
|
+
constructor(providerSettings: ITimelineProviderSettings, providersSettingsEditor: TimelineProvidersSettingsEditor, configurationFactory: ConfigurationFactory);
|
|
1840
|
+
setVendor(vendor: string): this;
|
|
1841
|
+
setSelector(selector: string): this;
|
|
1842
|
+
setSystemName(systemName: string): this;
|
|
1843
|
+
next(): TimelineProvidersSettingsEditor;
|
|
1844
|
+
end(): ConfigurationFactory;
|
|
1845
|
+
}
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region src/configuration/api/configuration-factory.d.ts
|
|
1848
|
+
/** */
|
|
1849
|
+
type TEngineConfigurationLists = KeysOfType<IEngineConfiguration, any[]>;
|
|
1850
|
+
type ConfigurationFactoryExtension<NewFactory extends ConfigurationFactory> = (this: NewFactory, ...rest: any[]) => void;
|
|
1851
|
+
/**
|
|
1852
|
+
* This class offers a fluent, extensible and strongly typed DSL for creating Eligius configurations.
|
|
1853
|
+
*
|
|
1854
|
+
* @example Building a configuration using the factory
|
|
1855
|
+
* To initialize a basic configuration to start off of:
|
|
1856
|
+
* ```ts
|
|
1857
|
+
* const factory = new ConfigurationFactory()
|
|
1858
|
+
* .init("en-US") // Define the default language
|
|
1859
|
+
* .addLanguage("en-US", "English") // Add English as a supported language
|
|
1860
|
+
* .addLanguage("nl-NL", "Nederlands") // Add Dutch as a supported language
|
|
1861
|
+
* .setLayoutTemplate("<div class=\"main.container\"></div>") // Add the main container for the presentation
|
|
1862
|
+
* .setContainerSelector("#ct-container") // Selector for the element in the body that will contain the presentation
|
|
1863
|
+
* .addTimeline( // Add a first timeline
|
|
1864
|
+
* 'timeline-1', // Give it a name
|
|
1865
|
+
* "animation", // This is RAF based timeline
|
|
1866
|
+
* 200, // The duration of the timeline in seconds
|
|
1867
|
+
* false, // The presentation does NOT play in a loop
|
|
1868
|
+
* ".timeline-container" // The element within the main layout (defined by the layoutTemplate) in which the timeline will be rendered
|
|
1869
|
+
* )
|
|
1870
|
+
* .editTimelineProviderSettings() // Add a timeline provider
|
|
1871
|
+
* .addProvider("animation") // One that provides timelines for type 'animation'
|
|
1872
|
+
* .setSystemName("RequestAnimationFrameTimelineProvider") // The system name of the provider
|
|
1873
|
+
* .setVendor("eligius") // Eligius is the vendor in this case
|
|
1874
|
+
* .end(); // This finally returns the ConfigurationFactory instance
|
|
1875
|
+
* ```
|
|
1876
|
+
*
|
|
1877
|
+
* Then to add an init action:
|
|
1878
|
+
* ```ts
|
|
1879
|
+
* factory
|
|
1880
|
+
* .createInitAction("GetUserName")
|
|
1881
|
+
* .addStartOperationByType(getQueryParams, {
|
|
1882
|
+
* defaultValues: { username: "guest" },
|
|
1883
|
+
* })
|
|
1884
|
+
* .addStartOperationByType(setGlobalData, { properties: ["queryParams"] });
|
|
1885
|
+
* ```
|
|
1886
|
+
*
|
|
1887
|
+
* After that, add a timeline action:
|
|
1888
|
+
* ```ts
|
|
1889
|
+
* factory.createTimelineAction("timeline-1", "AddIntroContainer")
|
|
1890
|
+
* .addDuration(0, 10)
|
|
1891
|
+
* .addStartOperationByType(selectElement, { selector: ".timeline-container" })
|
|
1892
|
+
* .addStartOperationByType(setElementContent, {
|
|
1893
|
+
* template: '<div class="intro-text"></div>',
|
|
1894
|
+
* })
|
|
1895
|
+
* .addEndOperationByType(selectElement, { selector: ".intro-text" })
|
|
1896
|
+
* .addEndOperationByType(removeElement, {});
|
|
1897
|
+
* ```
|
|
1898
|
+
*
|
|
1899
|
+
* It also possible to extend the factory with specialized creation methods for the particular
|
|
1900
|
+
* configuration you are building:
|
|
1901
|
+
* ```ts
|
|
1902
|
+
* function addImage(this: ConfigurationFactory, actionName: string, imageSrc: string, imageId: string) {
|
|
1903
|
+
* this.createInitAction(actionName)
|
|
1904
|
+
* .addStartOperationByType(selectElement, { selector: ".timeline-container" })
|
|
1905
|
+
* .addStartOperationByType(createElement, { element: 'img', attributes: {src: imageSrc, imageId} })
|
|
1906
|
+
* .addStartOperationByType(setElementContent, { insertionType: "append" })
|
|
1907
|
+
* .addEndOperationByType(selectElement, { selector: `#${imageId}` })
|
|
1908
|
+
* .addEndOperationByType(removeElement, {});
|
|
1909
|
+
* }
|
|
1910
|
+
*
|
|
1911
|
+
* const customFactory = ConfigurationFactory.extend(factory, "addImage", addImage);
|
|
1912
|
+
*
|
|
1913
|
+
* customFactory.addImage("MyImageActionName", "my-image.png", "my-image-id");
|
|
1914
|
+
* ```
|
|
1915
|
+
*
|
|
1916
|
+
* Finally, retrieve the configuration and save it:
|
|
1917
|
+
* ```ts
|
|
1918
|
+
* import fs from "node:fs";
|
|
1919
|
+
*
|
|
1920
|
+
* const configuration = customFactory.getConfiguration();
|
|
1921
|
+
*
|
|
1922
|
+
* fs.writeFileSync("/my/path/configuration.json", JSON.stringify(configuration), {encoding:'utf-8'})
|
|
1923
|
+
* ```
|
|
1924
|
+
*
|
|
1925
|
+
* The `ConfigurationFactory` can also be used to edit an existing configuration. In this case, simply
|
|
1926
|
+
* pass the JSON configuration to the `ConfigurationFactory`'s constructor:
|
|
1927
|
+
* ```ts
|
|
1928
|
+
* import myConfiguration from './my-configuration.json';
|
|
1929
|
+
*
|
|
1930
|
+
* const factory = new ConfigurationFactory(myConfiguration);
|
|
1931
|
+
*
|
|
1932
|
+
* factory.editInitAction("existingActionName")
|
|
1933
|
+
* .removeEndOperation("475fd0ab-5755-4e60-8f7c-e1988a109678");
|
|
1934
|
+
* ```
|
|
1935
|
+
*/
|
|
1936
|
+
declare class ConfigurationFactory {
|
|
1937
|
+
configuration: IEngineConfiguration;
|
|
1938
|
+
actionCreatorFactory: ActionCreatorFactory;
|
|
1939
|
+
/**
|
|
1940
|
+
* Constructs a new `ConfigurationFactory`
|
|
1941
|
+
* @param config an optional existing configuration that will be used as a starting point
|
|
1942
|
+
*/
|
|
1943
|
+
constructor(configuration?: IEngineConfiguration);
|
|
1944
|
+
/**
|
|
1945
|
+
* Add specialized method to a factory
|
|
1946
|
+
*
|
|
1947
|
+
* @param factory
|
|
1948
|
+
* @param extensionMethodName
|
|
1949
|
+
* @param extensionMethod
|
|
1950
|
+
* @returns
|
|
1951
|
+
*/
|
|
1952
|
+
static extend<T extends ConfigurationFactory, K extends PropertyKey, C extends (this: T & { [P in K]: C }, ...args: any[]) => any>(factory: T, extensionMethodName: K, extensionMethod: C): T & { [P in K]: C };
|
|
1953
|
+
/**
|
|
1954
|
+
* Add specialized methods to a factory
|
|
1955
|
+
*
|
|
1956
|
+
* @param factory
|
|
1957
|
+
* @param extensions
|
|
1958
|
+
* @returns
|
|
1959
|
+
*/
|
|
1960
|
+
static extendMultiple<T extends ConfigurationFactory, C extends ConfigurationFactoryExtension<T>, D extends {
|
|
1961
|
+
[name: string]: C;
|
|
1962
|
+
}>(factory: T, extensions: D): T & D;
|
|
1963
|
+
/**
|
|
1964
|
+
* Initialize the configuration with a minimal shape.
|
|
1965
|
+
*
|
|
1966
|
+
* It assigns an ID, sets the engine to `EligiusEngine`, default the containerSelector `[data-ct-container=true]`
|
|
1967
|
+
* and initializes all of the list properties with empty arrays.
|
|
1968
|
+
* @param defaultLanguage
|
|
1969
|
+
* @returns
|
|
1970
|
+
*/
|
|
1971
|
+
init(defaultLanguage: TLanguageCode): this;
|
|
1972
|
+
/**
|
|
1973
|
+
* Assigns the engine system name
|
|
1974
|
+
* @param systemName
|
|
1975
|
+
* @returns
|
|
1976
|
+
*/
|
|
1977
|
+
setEngine(systemName: string): this;
|
|
1978
|
+
/**
|
|
1979
|
+
* Assigns a string representation of the HTML layout template for the engine.
|
|
1980
|
+
*
|
|
1981
|
+
* @param layoutTemplate
|
|
1982
|
+
* @returns
|
|
1983
|
+
*/
|
|
1984
|
+
setLayoutTemplate(layoutTemplate: string): this;
|
|
1985
|
+
/**
|
|
1986
|
+
*
|
|
1987
|
+
* Assigns the default language
|
|
1988
|
+
*
|
|
1989
|
+
* @param defaultLanguage
|
|
1990
|
+
* @returns
|
|
1991
|
+
*/
|
|
1992
|
+
setDefaultLanguage(defaultLanguage: TLanguageCode): this;
|
|
1993
|
+
/**
|
|
1994
|
+
*
|
|
1995
|
+
* Assign the css selector that specifies the DOM location where the engine renders its output
|
|
1996
|
+
*
|
|
1997
|
+
* @param selector
|
|
1998
|
+
* @returns
|
|
1999
|
+
*/
|
|
2000
|
+
setContainerSelector(selector: string): this;
|
|
2001
|
+
/**
|
|
2002
|
+
*
|
|
2003
|
+
* Starts an editing process for the timeline provider settings.
|
|
2004
|
+
*
|
|
2005
|
+
* @returns
|
|
2006
|
+
*/
|
|
2007
|
+
editTimelineProviderSettings(): TimelineProvidersSettingsEditor;
|
|
2008
|
+
/**
|
|
2009
|
+
*
|
|
2010
|
+
* Return a copy of the current state of the configuration
|
|
2011
|
+
*
|
|
2012
|
+
* @param callBack the callback receives the configuration as well and can return a mutated version wich will be assigned to the factory's internal state
|
|
2013
|
+
* @returns
|
|
2014
|
+
*/
|
|
2015
|
+
getConfiguration(callBack?: (copy: IEngineConfiguration) => IEngineConfiguration): IEngineConfiguration;
|
|
2016
|
+
/**
|
|
2017
|
+
*
|
|
2018
|
+
* Adds a language to the `availableLanguages` list.
|
|
2019
|
+
* The label represents the name of the language.
|
|
2020
|
+
*
|
|
2021
|
+
* An error is thrown if a language with the given language code already exists
|
|
2022
|
+
*
|
|
2023
|
+
* @example
|
|
2024
|
+
* factory.addLanguage('en-GB', 'English');
|
|
2025
|
+
*
|
|
2026
|
+
* @param languageCode The given alnguage code
|
|
2027
|
+
* @param languageLabel The human readable name of the language
|
|
2028
|
+
* @returns
|
|
2029
|
+
*/
|
|
2030
|
+
addLanguage(languageCode: TLanguageCode, languageLabel: string): this;
|
|
2031
|
+
private _internalAddAction;
|
|
2032
|
+
private _initializeCollection;
|
|
2033
|
+
/**
|
|
2034
|
+
*
|
|
2035
|
+
* Adds the specified action to the `actions` list.
|
|
2036
|
+
*
|
|
2037
|
+
* @param action
|
|
2038
|
+
*/
|
|
2039
|
+
addAction(action: IActionConfiguration): void;
|
|
2040
|
+
/**
|
|
2041
|
+
*
|
|
2042
|
+
* Adds the specified action to the `initActions` list
|
|
2043
|
+
*
|
|
2044
|
+
* @param action
|
|
2045
|
+
*/
|
|
2046
|
+
addInitAction(action: IActionConfiguration): void;
|
|
2047
|
+
/**
|
|
2048
|
+
*
|
|
2049
|
+
* Adds the specified action to the `eventActions` list
|
|
2050
|
+
*
|
|
2051
|
+
* @param action
|
|
2052
|
+
*/
|
|
2053
|
+
addEventAction(action: IActionConfiguration): void;
|
|
2054
|
+
/**
|
|
2055
|
+
*
|
|
2056
|
+
* Adds the given actions to `timelineActions` list that is associated with the specified uri
|
|
2057
|
+
*
|
|
2058
|
+
* @param uri
|
|
2059
|
+
* @param action
|
|
2060
|
+
*/
|
|
2061
|
+
addTimelineAction(uri: string, action: ITimelineActionConfiguration): void;
|
|
2062
|
+
/**
|
|
2063
|
+
*
|
|
2064
|
+
* Starts the creation of a new action with the specified name that gets added to the `actions` list
|
|
2065
|
+
*
|
|
2066
|
+
* @param name
|
|
2067
|
+
* @returns
|
|
2068
|
+
*/
|
|
2069
|
+
createAction(name: string): EndableActionCreator<IEndableActionConfiguration>;
|
|
2070
|
+
/**
|
|
2071
|
+
*
|
|
2072
|
+
* Starts the creation of a new action with the specified name that gets added to the `initActions` list
|
|
2073
|
+
*
|
|
2074
|
+
* @param name
|
|
2075
|
+
* @returns
|
|
2076
|
+
*/
|
|
2077
|
+
createInitAction(name: string): EndableActionCreator<IEndableActionConfiguration>;
|
|
2078
|
+
/**
|
|
2079
|
+
*
|
|
2080
|
+
* Starts the creation of a new action with the specified name that gets added to the `eventActions` list
|
|
2081
|
+
*
|
|
2082
|
+
* @param name
|
|
2083
|
+
* @returns
|
|
2084
|
+
*/
|
|
2085
|
+
createEventAction(name: string): ActionCreator<IActionConfiguration>;
|
|
2086
|
+
/**
|
|
2087
|
+
*
|
|
2088
|
+
* Starts the creation of a new action with the specified name that gets added to the `timelineActions` list that is associated with the specified uri
|
|
2089
|
+
*
|
|
2090
|
+
* @param uri
|
|
2091
|
+
* @param name
|
|
2092
|
+
* @returns
|
|
2093
|
+
*/
|
|
2094
|
+
createTimelineAction(uri: string, name: string): TimelineActionCreator;
|
|
2095
|
+
/**
|
|
2096
|
+
* Add a timeline with the given data
|
|
2097
|
+
*
|
|
2098
|
+
* @param uri identifier for the timeline
|
|
2099
|
+
* @param type animation or mediaplayer
|
|
2100
|
+
* @param duration the duration of the timeline in seconds
|
|
2101
|
+
* @param isLooped True if the timeline should automatically restart at the end
|
|
2102
|
+
* @param selector css selector for the container where the timeline will be rendered
|
|
2103
|
+
* @returns
|
|
2104
|
+
*/
|
|
2105
|
+
addTimeline(uri: string, type: TimelineTypes, duration: number, isLooped: boolean, selector: string): this;
|
|
2106
|
+
/**
|
|
2107
|
+
*
|
|
2108
|
+
* Gets the timeline associated with the specified uri
|
|
2109
|
+
*
|
|
2110
|
+
* @param uri
|
|
2111
|
+
* @returns
|
|
2112
|
+
*/
|
|
2113
|
+
getTimeline(uri: string): ITimelineConfiguration | undefined;
|
|
2114
|
+
/**
|
|
2115
|
+
*
|
|
2116
|
+
* Removes the timeline associated with the specified uri
|
|
2117
|
+
*
|
|
2118
|
+
* @param uri
|
|
2119
|
+
* @returns
|
|
2120
|
+
*/
|
|
2121
|
+
removeTimeline(uri: string): this;
|
|
2122
|
+
private _initializeLabel;
|
|
2123
|
+
private _getLabelTranslation;
|
|
2124
|
+
/**
|
|
2125
|
+
*
|
|
2126
|
+
* Starts an editor for the label that is associated with the specified id
|
|
2127
|
+
*
|
|
2128
|
+
* @param id
|
|
2129
|
+
* @returns
|
|
2130
|
+
*/
|
|
2131
|
+
editLabel(id: string): LabelEditor;
|
|
2132
|
+
/**
|
|
2133
|
+
*
|
|
2134
|
+
* Adds a label translation with the specified data
|
|
2135
|
+
*
|
|
2136
|
+
* @param id The id for the label
|
|
2137
|
+
* @param languageCode The language code associated with the label
|
|
2138
|
+
* @param translation The label text in the language specified by the language code
|
|
2139
|
+
* @returns
|
|
2140
|
+
*/
|
|
2141
|
+
addLabel(id: string, languageCode: TLanguageCode, translation: string): this;
|
|
2142
|
+
/**
|
|
2143
|
+
*
|
|
2144
|
+
* Adds multiple translations with the specified data
|
|
2145
|
+
*
|
|
2146
|
+
* @param id The id for the label
|
|
2147
|
+
* @param translations A record that holds language code to translations lookups
|
|
2148
|
+
* @returns
|
|
2149
|
+
*/
|
|
2150
|
+
addLabels(id: string, translations: Record<TLanguageCode, string>): this;
|
|
2151
|
+
/**
|
|
2152
|
+
*
|
|
2153
|
+
* Removes all translations with the given id
|
|
2154
|
+
*
|
|
2155
|
+
* @param id the id for the label
|
|
2156
|
+
* @returns
|
|
2157
|
+
*/
|
|
2158
|
+
removeLabel(id: string): this;
|
|
2159
|
+
/**
|
|
2160
|
+
*
|
|
2161
|
+
* Starts an editor for the action from the `actions` list associated with the given id
|
|
2162
|
+
*
|
|
2163
|
+
* @param id
|
|
2164
|
+
* @returns
|
|
2165
|
+
*/
|
|
2166
|
+
editAction(id: string): EndableActionEditor<IEndableActionConfiguration>;
|
|
2167
|
+
/**
|
|
2168
|
+
*
|
|
2169
|
+
* Starts an editor for the action from the `eventActions` list associated with the given id
|
|
2170
|
+
*
|
|
2171
|
+
* @param id
|
|
2172
|
+
* @returns
|
|
2173
|
+
*/
|
|
2174
|
+
editEventAction(id: string): ActionEditor<IEventActionConfiguration>;
|
|
2175
|
+
/**
|
|
2176
|
+
*
|
|
2177
|
+
* Starts an editor for the action from the `initActions` list associated with the given id
|
|
2178
|
+
*
|
|
2179
|
+
* @param id
|
|
2180
|
+
* @returns
|
|
2181
|
+
*/
|
|
2182
|
+
editInitAction(id: string): EndableActionEditor<IEndableActionConfiguration>;
|
|
2183
|
+
/**
|
|
2184
|
+
*
|
|
2185
|
+
* Starts an editor for the action from the `timelineActions` list associated with the given uri and id
|
|
2186
|
+
*
|
|
2187
|
+
* @param uri
|
|
2188
|
+
* @param id
|
|
2189
|
+
* @returns
|
|
2190
|
+
*/
|
|
2191
|
+
editTimelineAction(uri: string, id: string): TimelineActionEditor;
|
|
2192
|
+
}
|
|
2193
|
+
//#endregion
|
|
2194
|
+
//#region src/configuration/api/action-creator-factory.d.ts
|
|
2195
|
+
/**
|
|
2196
|
+
*
|
|
2197
|
+
* Container factory capable of creating the different kinds of actions.
|
|
2198
|
+
* For each type of action a dedicated factory will be returned.
|
|
2199
|
+
*
|
|
2200
|
+
*/
|
|
2201
|
+
declare class ActionCreatorFactory {
|
|
2202
|
+
private readonly configurationfactory;
|
|
2203
|
+
constructor(configurationfactory: ConfigurationFactory);
|
|
2204
|
+
/**
|
|
2205
|
+
*
|
|
2206
|
+
* Starts the creation of an action in the `actions` list with the specified name
|
|
2207
|
+
*
|
|
2208
|
+
* @param name
|
|
2209
|
+
* @returns
|
|
2210
|
+
*/
|
|
2211
|
+
createAction(name: string): EndableActionCreator;
|
|
2212
|
+
/**
|
|
2213
|
+
*
|
|
2214
|
+
* Starts the creation of an action in the `initActions` list with the specified name
|
|
2215
|
+
*
|
|
2216
|
+
* @param name
|
|
2217
|
+
* @returns
|
|
2218
|
+
*/
|
|
2219
|
+
createInitAction(name: string): EndableActionCreator;
|
|
2220
|
+
/**
|
|
2221
|
+
*
|
|
2222
|
+
* Starts the creation of an action in the `eventActions` list with the specified name
|
|
2223
|
+
*
|
|
2224
|
+
* @param name
|
|
2225
|
+
* @returns
|
|
2226
|
+
*/
|
|
2227
|
+
createEventAction(name: string): ActionCreator;
|
|
2228
|
+
/**
|
|
2229
|
+
*
|
|
2230
|
+
* Starts the creation of an action in the `timelineActions` list with the specified name and uri
|
|
2231
|
+
*
|
|
2232
|
+
* @param uri
|
|
2233
|
+
* @param name
|
|
2234
|
+
* @returns
|
|
2235
|
+
*/
|
|
2236
|
+
createTimelineAction(uri: string, name: string): TimelineActionCreator;
|
|
2237
|
+
/**
|
|
2238
|
+
*
|
|
2239
|
+
* Returns the fluent scope back to the `Configurationfactory`
|
|
2240
|
+
*
|
|
2241
|
+
* @returns
|
|
2242
|
+
*/
|
|
2243
|
+
end(): ConfigurationFactory;
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
*
|
|
2247
|
+
* A factory that assists in creating an action
|
|
2248
|
+
*
|
|
2249
|
+
*/
|
|
2250
|
+
declare class ActionCreator<T extends IActionConfiguration = IActionConfiguration> {
|
|
2251
|
+
private readonly factory;
|
|
2252
|
+
actionConfig: T;
|
|
2253
|
+
/**
|
|
2254
|
+
*
|
|
2255
|
+
* Initializes an action configuration with the given name
|
|
2256
|
+
*
|
|
2257
|
+
* @param name
|
|
2258
|
+
* @param factory
|
|
2259
|
+
*/
|
|
2260
|
+
constructor(name: string | undefined, factory: ActionCreatorFactory);
|
|
2261
|
+
/**
|
|
2262
|
+
*
|
|
2263
|
+
* The unique id of the action
|
|
2264
|
+
*
|
|
2265
|
+
* @returns
|
|
2266
|
+
*/
|
|
2267
|
+
getId(): string;
|
|
2268
|
+
/**
|
|
2269
|
+
*
|
|
2270
|
+
* Sets the name of the action
|
|
2271
|
+
*
|
|
2272
|
+
* @param name
|
|
2273
|
+
* @returns
|
|
2274
|
+
*/
|
|
2275
|
+
setName(name: string): this;
|
|
2276
|
+
/**
|
|
2277
|
+
*
|
|
2278
|
+
* Returns a copy of the internal state of the `ActionCreator`
|
|
2279
|
+
*
|
|
2280
|
+
* @param callBack
|
|
2281
|
+
* @returns
|
|
2282
|
+
*/
|
|
2283
|
+
getConfiguration(callBack: (config: T) => T): this;
|
|
2284
|
+
/**
|
|
2285
|
+
*
|
|
2286
|
+
* Adds the operation data for a start operation specified by the given type
|
|
2287
|
+
*
|
|
2288
|
+
* @param operationClass
|
|
2289
|
+
* @param operationData
|
|
2290
|
+
* @returns
|
|
2291
|
+
*/
|
|
2292
|
+
addStartOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): this;
|
|
2293
|
+
/**
|
|
2294
|
+
*
|
|
2295
|
+
* Adds the operation data for a start operation specified by the given system name
|
|
2296
|
+
*
|
|
2297
|
+
* @param systemName
|
|
2298
|
+
* @param operationData
|
|
2299
|
+
* @returns
|
|
2300
|
+
*/
|
|
2301
|
+
addStartOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: T, operationData: O): this;
|
|
2302
|
+
/**
|
|
2303
|
+
*
|
|
2304
|
+
* Returns the fluent scope back to the `ActionCreatorFactory`
|
|
2305
|
+
*
|
|
2306
|
+
* @returns
|
|
2307
|
+
*/
|
|
2308
|
+
next(): ActionCreatorFactory;
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
*
|
|
2312
|
+
* A factory that assists in creating an endable action
|
|
2313
|
+
*
|
|
2314
|
+
*/
|
|
2315
|
+
declare class EndableActionCreator<T extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionCreator<T> {
|
|
2316
|
+
constructor(name: string | undefined, factory: ActionCreatorFactory);
|
|
2317
|
+
/**
|
|
2318
|
+
*
|
|
2319
|
+
* Adds the operation data for an end operation specified by the given type
|
|
2320
|
+
*
|
|
2321
|
+
* @param operationClass
|
|
2322
|
+
* @param operationData
|
|
2323
|
+
* @returns
|
|
2324
|
+
*/
|
|
2325
|
+
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): this;
|
|
2326
|
+
/**
|
|
2327
|
+
*
|
|
2328
|
+
* Adds the operation data for an end operation specified by the given system name
|
|
2329
|
+
*
|
|
2330
|
+
* @param systemName
|
|
2331
|
+
* @param operationData
|
|
2332
|
+
* @returns
|
|
2333
|
+
*/
|
|
2334
|
+
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: TOperationName, operationData: O): this;
|
|
2335
|
+
}
|
|
2336
|
+
/**
|
|
2337
|
+
*
|
|
2338
|
+
* A factory that assists in creating a timeline action
|
|
2339
|
+
*
|
|
2340
|
+
*/
|
|
2341
|
+
declare class TimelineActionCreator extends EndableActionCreator<ITimelineActionConfiguration> {
|
|
2342
|
+
/**
|
|
2343
|
+
*
|
|
2344
|
+
* Sets the duration specified by the given start and optional end positions
|
|
2345
|
+
*
|
|
2346
|
+
* @param start
|
|
2347
|
+
* @param end
|
|
2348
|
+
* @returns
|
|
2349
|
+
*/
|
|
2350
|
+
addDuration(start: number, end?: number): this;
|
|
2351
|
+
}
|
|
2352
|
+
//#endregion
|
|
2353
|
+
//#region src/operation/metadata/types.d.ts
|
|
2354
|
+
type THasRequired = {
|
|
2355
|
+
required?: boolean;
|
|
2356
|
+
};
|
|
2357
|
+
type THasDescription = {
|
|
2358
|
+
description?: string;
|
|
2359
|
+
};
|
|
2360
|
+
type TComplexPropertyMetadata = {
|
|
2361
|
+
type: TConstantParametersTypes[] | TParameterTypes;
|
|
2362
|
+
defaultValue?: unknown;
|
|
2363
|
+
} & THasRequired & THasDescription;
|
|
2364
|
+
type TArrayProperyMetadata = {
|
|
2365
|
+
type: 'ParameterType:array';
|
|
2366
|
+
itemType: TParameterTypes;
|
|
2367
|
+
} & THasRequired & THasDescription;
|
|
2368
|
+
type TConstantParametersTypes = {
|
|
2369
|
+
value: string;
|
|
2370
|
+
default?: boolean;
|
|
2371
|
+
} & THasDescription;
|
|
2372
|
+
type TPropertyMetadata = TComplexPropertyMetadata | TArrayProperyMetadata | TParameterTypes;
|
|
2373
|
+
type TPropertiesMetadata<T> = { [P in keyof T]?: TPropertyMetadata };
|
|
2374
|
+
interface IOperationMetadata<T> {
|
|
2375
|
+
description: string;
|
|
2376
|
+
dependentProperties?: (keyof T)[];
|
|
2377
|
+
properties?: TPropertiesMetadata<T>;
|
|
2378
|
+
outputProperties?: TPropertiesMetadata<T>;
|
|
2379
|
+
}
|
|
2380
|
+
type TParameterTypes = 'ParameterType:htmlElementName' | 'ParameterType:className' | 'ParameterType:selector' | 'ParameterType:string' | 'ParameterType:number' | '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' | 'ParameterType:jQuery' | 'ParameterType:expression';
|
|
2381
|
+
//#endregion
|
|
2382
|
+
//#region src/operation/metadata/add-class.d.ts
|
|
2383
|
+
declare function addClass$1(): IOperationMetadata<IAddClassOperationData>;
|
|
2384
|
+
//#endregion
|
|
2385
|
+
//#region src/operation/metadata/add-controller-to-element.d.ts
|
|
2386
|
+
declare function addControllerToElement$1(): IOperationMetadata<IAddControllerToElementOperationData<TOperationData>>;
|
|
2387
|
+
//#endregion
|
|
2388
|
+
//#region src/operation/add-globals-to-operation.d.ts
|
|
2389
|
+
interface IAddGlobalsToOperationData {
|
|
2390
|
+
/**
|
|
2391
|
+
* @required
|
|
2392
|
+
*/
|
|
2393
|
+
globalProperties: string[];
|
|
2394
|
+
}
|
|
2395
|
+
//#endregion
|
|
2396
|
+
//#region src/operation/metadata/add-globals-to-operation.d.ts
|
|
2397
|
+
declare function addGlobalsToOperation(): IOperationMetadata<IAddGlobalsToOperationData>;
|
|
2398
|
+
//#endregion
|
|
2399
|
+
//#region src/operation/metadata/animate-with-class.d.ts
|
|
2400
|
+
declare function animateWithClass$1(): IOperationMetadata<IAnimateWithClassOperationData>;
|
|
2401
|
+
//#endregion
|
|
2402
|
+
//#region src/operation/metadata/animate.d.ts
|
|
2403
|
+
declare function animate$1(): IOperationMetadata<IAnimateOperationData>;
|
|
2404
|
+
//#endregion
|
|
2405
|
+
//#region src/operation/metadata/broadcast-event.d.ts
|
|
2406
|
+
declare function broadcastEvent$1(): IOperationMetadata<IBroadcastEventOperationData>;
|
|
2407
|
+
//#endregion
|
|
2408
|
+
//#region src/operation/metadata/calc.d.ts
|
|
2409
|
+
declare function calc$1(): IOperationMetadata<ICalcOperationData>;
|
|
2410
|
+
//#endregion
|
|
2411
|
+
//#region src/operation/metadata/clear-element.d.ts
|
|
2412
|
+
declare function clearElement$1(): IOperationMetadata<IClearElementOperationData>;
|
|
2413
|
+
//#endregion
|
|
2414
|
+
//#region src/operation/metadata/clear-operation-data.d.ts
|
|
2415
|
+
declare function clearOperationData$1(): IOperationMetadata<IClearOperationDataOperationData>;
|
|
2416
|
+
//#endregion
|
|
2417
|
+
//#region src/operation/metadata/create-element.d.ts
|
|
2418
|
+
declare function createElement$1(): IOperationMetadata<ICreateElementOperationData<TTagNames>>;
|
|
2419
|
+
//#endregion
|
|
2420
|
+
//#region src/operation/metadata/custom-function.d.ts
|
|
2421
|
+
declare function customFunction$1(): IOperationMetadata<ICustomFunctionOperationData>;
|
|
2422
|
+
//#endregion
|
|
2423
|
+
//#region src/operation/metadata/end-action.d.ts
|
|
2424
|
+
declare function endAction$1(): IOperationMetadata<IEndActionOperationData>;
|
|
2425
|
+
//#endregion
|
|
2426
|
+
//#region src/operation/metadata/end-for-each.d.ts
|
|
2427
|
+
declare function endForEach$1(): IOperationMetadata<undefined>;
|
|
2428
|
+
//#endregion
|
|
2429
|
+
//#region src/operation/metadata/end-when.d.ts
|
|
2430
|
+
declare function endWhen$1(): IOperationMetadata<undefined>;
|
|
2431
|
+
//#endregion
|
|
2432
|
+
//#region src/operation/metadata/extend-controller.d.ts
|
|
2433
|
+
declare function extendController$1(): IOperationMetadata<IExtendControllerOperationData>;
|
|
2434
|
+
//#endregion
|
|
2435
|
+
//#region src/operation/metadata/for-each.d.ts
|
|
2436
|
+
declare function forEach$1(): IOperationMetadata<IForEachOperationData>;
|
|
2437
|
+
//#endregion
|
|
2438
|
+
//#region src/operation/metadata/get-attributes-from-element.d.ts
|
|
2439
|
+
declare function getAttributesFromElement$1(): IOperationMetadata<IGetAttributesFromElementOperationData>;
|
|
2440
|
+
//#endregion
|
|
2441
|
+
//#region src/operation/metadata/get-controller-from-element.d.ts
|
|
2442
|
+
declare function getControllerFromElement$1(): IOperationMetadata<IGetControllerFromElementOperationData>;
|
|
2443
|
+
//#endregion
|
|
2444
|
+
//#region src/operation/metadata/get-controller-instance.d.ts
|
|
2445
|
+
declare function getControllerInstance$1(): IOperationMetadata<IGetControllerInstanceOperationData>;
|
|
2446
|
+
//#endregion
|
|
2447
|
+
//#region src/operation/metadata/get-element-dimensions.d.ts
|
|
2448
|
+
declare function getElementDimensions$1(): IOperationMetadata<IGetElementDimensionsOperationData>;
|
|
2449
|
+
//#endregion
|
|
2450
|
+
//#region src/operation/metadata/get-import.d.ts
|
|
2451
|
+
declare function getImport$1(): IOperationMetadata<IGetImportOperationData>;
|
|
2452
|
+
//#endregion
|
|
2453
|
+
//#region src/operation/metadata/get-query-params.d.ts
|
|
2454
|
+
declare function getQueryParams$1(): IOperationMetadata<IGetQueryParamsOperationData>;
|
|
2455
|
+
//#endregion
|
|
2456
|
+
//#region src/operation/metadata/invoke-object-method.d.ts
|
|
2457
|
+
declare function invokeObjectMethod$1(): IOperationMetadata<IInvokeObjectMethodOperationData>;
|
|
2458
|
+
//#endregion
|
|
2459
|
+
//#region src/operation/metadata/load-json.d.ts
|
|
2460
|
+
declare function loadJson$1(): IOperationMetadata<ILoadJSONOperationData>;
|
|
2461
|
+
//#endregion
|
|
2462
|
+
//#region src/operation/metadata/log.d.ts
|
|
2463
|
+
declare function log$1(): IOperationMetadata<undefined>;
|
|
2464
|
+
//#endregion
|
|
2465
|
+
//#region src/operation/metadata/math.d.ts
|
|
2466
|
+
declare function math$1(): IOperationMetadata<IMathOperationData>;
|
|
2467
|
+
//#endregion
|
|
2468
|
+
//#region src/operation/metadata/otherwise.d.ts
|
|
2469
|
+
declare function otherwise$1(): IOperationMetadata<undefined>;
|
|
2470
|
+
//#endregion
|
|
2471
|
+
//#region src/operation/metadata/remove-class.d.ts
|
|
2472
|
+
declare function removeClass$1(): IOperationMetadata<IRemoveClassOperationData>;
|
|
2473
|
+
//#endregion
|
|
2474
|
+
//#region src/operation/metadata/remove-controller-from-element.d.ts
|
|
2475
|
+
declare function removeControllerFromElement$1(): IOperationMetadata<IRemoveControllerFromElementOperationData>;
|
|
2476
|
+
//#endregion
|
|
2477
|
+
//#region src/operation/metadata/remove-element.d.ts
|
|
2478
|
+
declare function removeElement$1(): IOperationMetadata<IRemoveElementOperationData>;
|
|
2479
|
+
//#endregion
|
|
2480
|
+
//#region src/operation/metadata/remove-properties-from-operation-data.d.ts
|
|
2481
|
+
declare function removePropertiesFromOperationData$1(): IOperationMetadata<IRemovePropertiesFromOperationDataOperationData>;
|
|
2482
|
+
//#endregion
|
|
2483
|
+
//#region src/operation/metadata/reparent-element.d.ts
|
|
2484
|
+
declare function reparentElement$1(): IOperationMetadata<IReparentElementOperationData>;
|
|
2485
|
+
//#endregion
|
|
2486
|
+
//#region src/operation/metadata/request-action.d.ts
|
|
2487
|
+
declare function requestAction$1(): IOperationMetadata<IRequestActionOperationData>;
|
|
2488
|
+
//#endregion
|
|
2489
|
+
//#region src/operation/metadata/resize-action.d.ts
|
|
2490
|
+
declare function resizeAction$1(): IOperationMetadata<IResizeActionOperationData>;
|
|
2491
|
+
//#endregion
|
|
2492
|
+
//#region src/operation/metadata/select-element.d.ts
|
|
2493
|
+
declare function selectElement$1(): IOperationMetadata<ISelectElementOperationData>;
|
|
2494
|
+
//#endregion
|
|
2495
|
+
//#region src/operation/metadata/set-data.d.ts
|
|
2496
|
+
declare function setData$1(): IOperationMetadata<ISetDataOperationData>;
|
|
2497
|
+
//#endregion
|
|
2498
|
+
//#region src/operation/metadata/set-element-attributes.d.ts
|
|
2499
|
+
declare function setElementAttributes$1(): IOperationMetadata<ISetElementAttributesOperationData>;
|
|
2500
|
+
//#endregion
|
|
2501
|
+
//#region src/operation/metadata/set-element-content.d.ts
|
|
2502
|
+
declare function setElementContent$1(): IOperationMetadata<ISetElementContentOperationData>;
|
|
2503
|
+
//#endregion
|
|
2504
|
+
//#region src/operation/metadata/set-global-data.d.ts
|
|
2505
|
+
declare function setGlobalData$1(): IOperationMetadata<ISetGlobalDataOperationData>;
|
|
2506
|
+
//#endregion
|
|
2507
|
+
//#region src/operation/metadata/set-operation-data.d.ts
|
|
2508
|
+
declare function setOperationData$1(): IOperationMetadata<ISetOperationData>;
|
|
2509
|
+
//#endregion
|
|
2510
|
+
//#region src/operation/metadata/set-style.d.ts
|
|
2511
|
+
declare function setStyle$1(): IOperationMetadata<ISetStyleOperationData>;
|
|
2512
|
+
//#endregion
|
|
2513
|
+
//#region src/operation/metadata/start-action.d.ts
|
|
2514
|
+
declare function startAction$1(): IOperationMetadata<IStartActionOperationData>;
|
|
2515
|
+
//#endregion
|
|
2516
|
+
//#region src/operation/metadata/toggle-class.d.ts
|
|
2517
|
+
declare function toggleClass$1(): IOperationMetadata<IToggleClassOperationData>;
|
|
2518
|
+
//#endregion
|
|
2519
|
+
//#region src/operation/metadata/toggle-element.d.ts
|
|
2520
|
+
declare function toggleElement$1(): IOperationMetadata<IToggleElementOperationData>;
|
|
2521
|
+
//#endregion
|
|
2522
|
+
//#region src/operation/metadata/wait.d.ts
|
|
2523
|
+
declare function wait$1(): IOperationMetadata<IWaitOperationData>;
|
|
2524
|
+
//#endregion
|
|
2525
|
+
//#region src/operation/metadata/when.d.ts
|
|
2526
|
+
declare function when$1(): IOperationMetadata<IWhenOperationData>;
|
|
2527
|
+
declare namespace index_d_exports {
|
|
2528
|
+
export { IOperationMetadata, TArrayProperyMetadata, TComplexPropertyMetadata, TConstantParametersTypes, THasDescription, THasRequired, TParameterTypes, TPropertiesMetadata, TPropertyMetadata, addClass$1 as addClass, addControllerToElement$1 as addControllerToElement, addGlobalsToOperation, 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, endForEach$1 as endForEach, endWhen$1 as endWhen, extendController$1 as extendController, forEach$1 as forEach, getAttributesFromElement$1 as getAttributesFromElement, 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, otherwise$1 as otherwise, 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, setData$1 as setData, setElementAttributes$1 as setElementAttributes, setElementContent$1 as setElementContent, setGlobalData$1 as setGlobalData, setOperationData$1 as setOperationData, setStyle$1 as setStyle, startAction$1 as startAction, toggleClass$1 as toggleClass, toggleElement$1 as toggleElement, wait$1 as wait, when$1 as when };
|
|
2529
|
+
}
|
|
2530
|
+
//#endregion
|
|
2531
|
+
//#region src/timeline-event-names.d.ts
|
|
2532
|
+
type TimelineEventName = keyof typeof TimelineEventNames;
|
|
2533
|
+
/**
|
|
2534
|
+
* These are the event names that are being braodcast and/or handled by Eligius.
|
|
2535
|
+
*/
|
|
2536
|
+
declare class TimelineEventNames {
|
|
2537
|
+
/**
|
|
2538
|
+
* Broadcasting this event will start the current timeline when it is currently paused, or pauses when it is playing.
|
|
2539
|
+
*/
|
|
2540
|
+
static PLAY_TOGGLE_REQUEST: string;
|
|
2541
|
+
/**
|
|
2542
|
+
* Broadcasting this event will start the current timeline.
|
|
2543
|
+
*/
|
|
2544
|
+
static PLAY_REQUEST: string;
|
|
2545
|
+
/**
|
|
2546
|
+
* Broadcasting this event will stop the current timeline.
|
|
2547
|
+
*/
|
|
2548
|
+
static STOP_REQUEST: string;
|
|
2549
|
+
/**
|
|
2550
|
+
* Broadcasting this event will pause the current timeline.
|
|
2551
|
+
*/
|
|
2552
|
+
static PAUSE_REQUEST: string;
|
|
2553
|
+
/**
|
|
2554
|
+
* Broadcasting this event will seek the specified position in the current timeline.
|
|
2555
|
+
* This event takes one argument: A numeric value that represents the new position.
|
|
2556
|
+
*/
|
|
2557
|
+
static SEEK_REQUEST: string;
|
|
2558
|
+
/**
|
|
2559
|
+
* Broadcasting this event will tell the current {@link ITimelineProvider} to resize.
|
|
2560
|
+
*/
|
|
2561
|
+
static RESIZE_REQUEST: string;
|
|
2562
|
+
/**
|
|
2563
|
+
* Broadcasting this event will return the element in which the current timeline is being rendered.
|
|
2564
|
+
* This event takes one argument: The callback function that will return the specified element.
|
|
2565
|
+
*/
|
|
2566
|
+
static CONTAINER_REQUEST: string;
|
|
2567
|
+
/**
|
|
2568
|
+
* Broadcasting this event will return the duration of the current timeline.
|
|
2569
|
+
* This event takes one argument: The callback function that will return the duration.
|
|
2570
|
+
*/
|
|
2571
|
+
static DURATION_REQUEST: string;
|
|
2572
|
+
/**
|
|
2573
|
+
* Broadcasting this event will return the uri of the current timeline.
|
|
2574
|
+
* This event takes one argument: The callback function that will return the uri.
|
|
2575
|
+
*/
|
|
2576
|
+
static REQUEST_CURRENT_TIMELINE: string;
|
|
2577
|
+
/**
|
|
2578
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce their duration.
|
|
2579
|
+
*/
|
|
2580
|
+
static DURATION: string;
|
|
2581
|
+
/**
|
|
2582
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce the current play position whenever it changes.
|
|
2583
|
+
*/
|
|
2584
|
+
static TIME: string;
|
|
2585
|
+
/**
|
|
2586
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce the new play position and duration after a seek was executed.
|
|
2587
|
+
*/
|
|
2588
|
+
static SEEKED: string;
|
|
2589
|
+
/**
|
|
2590
|
+
*
|
|
2591
|
+
*/
|
|
2592
|
+
static COMPLETE: string;
|
|
2593
|
+
static RESTART: string;
|
|
2594
|
+
static PLAY: string;
|
|
2595
|
+
static STOP: string;
|
|
2596
|
+
static PAUSE: string;
|
|
2597
|
+
static SEEK: string;
|
|
2598
|
+
static RESIZE: string;
|
|
2599
|
+
static CURRENT_TIMELINE_CHANGE: string;
|
|
2600
|
+
static FIRST_FRAME: string;
|
|
2601
|
+
static REQUEST_INSTANCE: string;
|
|
2602
|
+
static REQUEST_ACTION: string;
|
|
2603
|
+
static REQUEST_FUNCTION: string;
|
|
2604
|
+
static REQUEST_TIMELINE_URI: string;
|
|
2605
|
+
static BEFORE_REQUEST_TIMELINE_URI: string;
|
|
2606
|
+
static REQUEST_ENGINE_ROOT: string;
|
|
2607
|
+
static REQUEST_CURRENT_TIMELINE_POSITION: string;
|
|
2608
|
+
static REQUEST_TIMELINE_CLEANUP: string;
|
|
2609
|
+
static REQUEST_LABEL_COLLECTION: string;
|
|
2610
|
+
static REQUEST_LABEL_COLLECTIONS: string;
|
|
2611
|
+
static REQUEST_CURRENT_LANGUAGE: string;
|
|
2612
|
+
static LANGUAGE_CHANGE: string;
|
|
2613
|
+
}
|
|
2614
|
+
//#endregion
|
|
2615
|
+
//#region src/configuration/api/name-providers.d.ts
|
|
2616
|
+
/**
|
|
2617
|
+
*
|
|
2618
|
+
* Provider for all the available operation names
|
|
2619
|
+
*
|
|
2620
|
+
*/
|
|
2621
|
+
declare class OperationNamesProvider {
|
|
2622
|
+
getOperationNames(): TOperationName;
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
*
|
|
2626
|
+
* Provider for all the available controller names
|
|
2627
|
+
*
|
|
2628
|
+
*/
|
|
2629
|
+
declare class ControllerNamesProvider {
|
|
2630
|
+
getControllerNames(): TControllerName;
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
*
|
|
2634
|
+
* Provider that can retrieve the metadata associated with a given operation name
|
|
2635
|
+
*
|
|
2636
|
+
*/
|
|
2637
|
+
declare class OperationMetadataProvider {
|
|
2638
|
+
getOperationMetadata(operationName: TOperationName): IOperationMetadata<TOperationData>;
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
*
|
|
2642
|
+
* Provider for all the available event names
|
|
2643
|
+
*
|
|
2644
|
+
*/
|
|
2645
|
+
declare class TimeLineEventNamesProvider {
|
|
2646
|
+
getEventNames(): TimelineEventName;
|
|
2647
|
+
}
|
|
2648
|
+
//#endregion
|
|
2649
|
+
//#region src/configuration/api/subtitle-converter.d.ts
|
|
2650
|
+
/**
|
|
2651
|
+
* This class converts an AVID subtitle file to an `ISubtitle` array.
|
|
2652
|
+
*/
|
|
2653
|
+
declare class SubtitleImporter {
|
|
2654
|
+
importSubtitles(rawLines: string[]): ISubtitle[];
|
|
2655
|
+
stripNewlineChars(str: string): string;
|
|
2656
|
+
isValidLine(line: string): boolean;
|
|
2657
|
+
convertDuration(time: string): IStrictDuration;
|
|
2658
|
+
convertTimeToSeconds(time: string): number;
|
|
2659
|
+
}
|
|
2660
|
+
//#endregion
|
|
2661
|
+
//#region src/configuration/api/subtitle-editor.d.ts
|
|
2662
|
+
/**
|
|
2663
|
+
* Used to edit and add to an {@link ISubtitleCollection}.
|
|
2664
|
+
*/
|
|
2665
|
+
declare class SubtitleEditor {
|
|
2666
|
+
private collection;
|
|
2667
|
+
constructor(collection?: ISubtitleCollection[]);
|
|
2668
|
+
private _getLanguage;
|
|
2669
|
+
/**
|
|
2670
|
+
* Adds a new {@link ISubtitleCollection} for the given `languageCode`.
|
|
2671
|
+
*
|
|
2672
|
+
* If collections already exist for existing language codes then a duplicate
|
|
2673
|
+
* of these collections is created with the same duration info but all of the
|
|
2674
|
+
* text is left empty.
|
|
2675
|
+
*
|
|
2676
|
+
* @param languageCode
|
|
2677
|
+
* @returns
|
|
2678
|
+
*/
|
|
2679
|
+
addLanguage(languageCode: TLanguageCode): this;
|
|
2680
|
+
/**
|
|
2681
|
+
*
|
|
2682
|
+
* Add a single subtitle line that is associated with the given `languageCode`
|
|
2683
|
+
*
|
|
2684
|
+
* @param languageCode
|
|
2685
|
+
* @param subtitle
|
|
2686
|
+
* @returns
|
|
2687
|
+
*/
|
|
2688
|
+
addSubtitle(languageCode: TLanguageCode, subtitle: ISubtitle): this;
|
|
2689
|
+
addSubtitles(duration: IStrictDuration, subtitles: Record<TLanguageCode, string>): this;
|
|
2690
|
+
setSubtitle(languageCode: TLanguageCode, subtitle: ISubtitle): this;
|
|
2691
|
+
export(): ISubtitleCollection[];
|
|
2692
|
+
}
|
|
2693
|
+
//#endregion
|
|
2694
|
+
//#region src/configuration/configuration-resolver.d.ts
|
|
2695
|
+
/**
|
|
2696
|
+
* Takes an `IEngineConfiguration` instance and return an `IResolvedEngineConfiguration`.
|
|
2697
|
+
* This means all system names within the configuration will be resolved to their associated instances.
|
|
2698
|
+
*
|
|
2699
|
+
* If the given configuration includes event actions, then those will be registered in the given `ActionRegistryEventbusListener`.
|
|
2700
|
+
*
|
|
2701
|
+
*/
|
|
2702
|
+
declare class ConfigurationResolver implements IConfigurationResolver {
|
|
2703
|
+
private importer;
|
|
2704
|
+
private eventbus;
|
|
2705
|
+
constructor(importer: ISimpleResourceImporter, eventbus: IEventbus);
|
|
2706
|
+
process(configuration: IEngineConfiguration, actionRegistryListener?: ActionRegistryEventbusListener): [Record<string, IAction>, IResolvedEngineConfiguration];
|
|
2707
|
+
}
|
|
2708
|
+
//#endregion
|
|
2709
|
+
//#region src/diagnostics/types.d.ts
|
|
2710
|
+
type TDevToolsEventSubscriber = (event: TEventData) => void;
|
|
2711
|
+
type TPlayControlEventKind = 'play' | 'stop' | 'pause' | 'seek';
|
|
2712
|
+
declare const DEV_TOOLS_KEY = "__ELIGIUS_DEV_TOOLS__";
|
|
2713
|
+
type TWindowWithDevtools = Window & {
|
|
2714
|
+
[DEV_TOOLS_KEY]: IDiagnosticsInfo | undefined;
|
|
2715
|
+
};
|
|
2716
|
+
type TDevToolsMessage = {
|
|
2717
|
+
source: 'eligius-inspect-devtools';
|
|
2718
|
+
name: 'event';
|
|
2719
|
+
data: TEventData;
|
|
2720
|
+
};
|
|
2721
|
+
type TEventData = {
|
|
2722
|
+
type: 'playcontrol';
|
|
2723
|
+
data: IPlayControlEvent;
|
|
2724
|
+
};
|
|
2725
|
+
interface IPlayControlEvent {
|
|
2726
|
+
kind: TPlayControlEventKind;
|
|
2727
|
+
args?: any[];
|
|
2728
|
+
}
|
|
2729
|
+
interface IDiagnosticsAgent {
|
|
2730
|
+
postMessage(name: TDiagnosticType, messageData: any): void;
|
|
2731
|
+
subscribe(subscriber: TDevToolsEventSubscriber): () => void;
|
|
2732
|
+
}
|
|
2733
|
+
interface IDiagnosticsInfo {
|
|
2734
|
+
get agent(): IDiagnosticsAgent;
|
|
2735
|
+
}
|
|
2736
|
+
type TDiagnosticType = 'eligius-diagnostics-factory' | 'eligius-diagnostics-engine' | 'eligius-diagnostics-event' | 'eligius-diagnostics-action' | 'eligius-diagnostics-action-error' | 'eligius-diagnostics-operation';
|
|
2737
|
+
type TDiagnosticsMessageSource = 'eligius-inspect-agent' | 'eligius-inspect-devtools';
|
|
2738
|
+
//#endregion
|
|
2739
|
+
//#region src/diagnostics/devtool-event-listener.d.ts
|
|
2740
|
+
declare class DevToolEventListener implements IEventbusListener {
|
|
2741
|
+
private agent;
|
|
2742
|
+
constructor(agent: IDiagnosticsAgent);
|
|
2743
|
+
handleEvent(eventName: string, eventTopic: string | undefined, args: any[]): void;
|
|
2744
|
+
}
|
|
2745
|
+
//#endregion
|
|
2746
|
+
//#region src/diagnostics/diagnostics.d.ts
|
|
2747
|
+
declare class Diagnostics {
|
|
2748
|
+
static send(_name: TDiagnosticType, _data: any): void;
|
|
2749
|
+
static active: boolean;
|
|
2750
|
+
}
|
|
2751
|
+
//#endregion
|
|
2752
|
+
//#region src/language-manager.d.ts
|
|
2753
|
+
/**
|
|
2754
|
+
* This class manages the labels for an {@link IEligiusEngine} instance.
|
|
2755
|
+
*
|
|
2756
|
+
* It handles the {@link TimelineEventNames.REQUEST_LABEL_COLLECTION}, {@link TimelineEventNames.REQUEST_LABEL_COLLECTIONS}, {@link TimelineEventNames.REQUEST_CURRENT_LANGUAGE} and {@link TimelineEventNames.LANGUAGE_CHANGE} events.
|
|
2757
|
+
*
|
|
2758
|
+
*/
|
|
2759
|
+
declare class LanguageManager {
|
|
2760
|
+
private _currentLanguage;
|
|
2761
|
+
private _eventbus;
|
|
2762
|
+
private _labelLookup;
|
|
2763
|
+
private _eventbusRemovers;
|
|
2764
|
+
constructor(_currentLanguage: TLanguageCode, labels: ILanguageLabel[], _eventbus: IEventbus);
|
|
2765
|
+
destroy(): void;
|
|
2766
|
+
_addEventbusListeners(eventbus: IEventbus): void;
|
|
2767
|
+
_handleRequestCurrentLanguage(resultCallback: TResultCallback<TLanguageCode>): void;
|
|
2768
|
+
_handleRequestLabelCollection(labelId: string, resultCallback: TResultCallback<ILabel[]>): void;
|
|
2769
|
+
_handleRequestLabelCollections(labelIds: string[], resultCallback: TResultCallback<ILabel[][]>): void;
|
|
2770
|
+
_handleLanguageChange(language: TLanguageCode): void;
|
|
2771
|
+
_setRootElementLang(language: TLanguageCode): void;
|
|
2772
|
+
_extractPrimaryLanguage(culture: TLanguageCode): string;
|
|
2773
|
+
_createLabelLookup(labels: ILanguageLabel[]): Record<string, ILabel[]>;
|
|
2774
|
+
}
|
|
2775
|
+
//#endregion
|
|
2776
|
+
//#region src/eligius-engine.d.ts
|
|
2777
|
+
type ActionMethod = (IEndableAction['start'] & ActionMethodMetadata) | (IEndableAction['end'] & ActionMethodMetadata);
|
|
2778
|
+
interface ActionMethodMetadata {
|
|
2779
|
+
id: string;
|
|
2780
|
+
isStart: boolean;
|
|
2781
|
+
startPosition?: number;
|
|
2782
|
+
}
|
|
2783
|
+
/**
|
|
2784
|
+
* This is where the magic happens. The engine is responsible for starting and stopping
|
|
2785
|
+
* the given timeline provider and triggering the actions associated with the positions along the timeline.
|
|
2786
|
+
*/
|
|
2787
|
+
declare class EligiusEngine implements IEligiusEngine {
|
|
2788
|
+
private configuration;
|
|
2789
|
+
private eventbus;
|
|
2790
|
+
private timelineProviders;
|
|
2791
|
+
private languageManager;
|
|
2792
|
+
private _timeLineActionsLookup;
|
|
2793
|
+
private _eventbusRemovers;
|
|
2794
|
+
private _currentTimelineUri;
|
|
2795
|
+
private _activeTimelineProvider;
|
|
2796
|
+
private _lastPosition;
|
|
2797
|
+
constructor(configuration: IResolvedEngineConfiguration, eventbus: IEventbus, timelineProviders: Record<TimelineTypes, ITimelineProviderInfo>, languageManager: LanguageManager);
|
|
2798
|
+
/**
|
|
2799
|
+
* Initializes the engine by creating the HTML layout and the first time line
|
|
2800
|
+
* by executing its initActions.
|
|
2801
|
+
*/
|
|
2802
|
+
init(): Promise<ITimelineProvider>;
|
|
2803
|
+
private _createLayoutTemplate;
|
|
2804
|
+
private _initializeTimelineProvider;
|
|
2805
|
+
private _onCompleteCallback;
|
|
2806
|
+
private _onFirstFrameCallback;
|
|
2807
|
+
private _onRestartCallback;
|
|
2808
|
+
private _cleanUp;
|
|
2809
|
+
/**
|
|
2810
|
+
* Cleans up all the necessary parts that the engine initialized.
|
|
2811
|
+
* - It ends the currently active operations and the init actions.
|
|
2812
|
+
* - It removes all its eventbus listeners, handlers and interceptors.
|
|
2813
|
+
* - It destroys all of its timeline providers
|
|
2814
|
+
* - It empties the HTML element indicated by the containerSelector configuration property.
|
|
2815
|
+
*
|
|
2816
|
+
*/
|
|
2817
|
+
destroy(): Promise<void>;
|
|
2818
|
+
private _addEventListener;
|
|
2819
|
+
private _addEventbusListeners;
|
|
2820
|
+
private seekRequest;
|
|
2821
|
+
private durationRequest;
|
|
2822
|
+
private containerRequest;
|
|
2823
|
+
private _pauseRequest;
|
|
2824
|
+
private _stopRequest;
|
|
2825
|
+
private _playRequest;
|
|
2826
|
+
private _toggleplay;
|
|
2827
|
+
private _createTimelineLookup;
|
|
2828
|
+
static sortTimelines(timelines: Record<number, ActionMethod[]>[]): void;
|
|
2829
|
+
static sortActionsPerPosition(actions: ActionMethod[]): ActionMethod[];
|
|
2830
|
+
private _addTimelineActionStart;
|
|
2831
|
+
private _addTimelineActionEnd;
|
|
2832
|
+
private _initializeUriLookup;
|
|
2833
|
+
private _initializeTimelinePosition;
|
|
2834
|
+
private _executeActions;
|
|
2835
|
+
private _handleRequestEngineRoot;
|
|
2836
|
+
private _handleRequestTimelineUri;
|
|
2837
|
+
private _cleanUpTimeline;
|
|
2838
|
+
private _executeStartActions;
|
|
2839
|
+
/**
|
|
2840
|
+
* Gets all of the inactive actions whose duration falls within the given timeline position.
|
|
2841
|
+
*
|
|
2842
|
+
* @param position the given position
|
|
2843
|
+
* @param actions all of the relevant actions
|
|
2844
|
+
* @returns
|
|
2845
|
+
*/
|
|
2846
|
+
private _getActionsForPosition;
|
|
2847
|
+
private _getActiveActions;
|
|
2848
|
+
private _executeRelevantActions;
|
|
2849
|
+
private _handleRequestTimelinePosition;
|
|
2850
|
+
private _handleTimelineComplete;
|
|
2851
|
+
private _getTimelineActionsForCurrentTimeline;
|
|
2852
|
+
private _requestCurrentTimeline;
|
|
2853
|
+
private _getTimelineActionsForUri;
|
|
2854
|
+
private _onTimeHandler;
|
|
2855
|
+
private _executeActionsForPosition;
|
|
2856
|
+
private _executeSeekActions;
|
|
2857
|
+
}
|
|
2858
|
+
//#endregion
|
|
2859
|
+
//#region src/engine-factory.d.ts
|
|
2860
|
+
/**
|
|
2861
|
+
* The EngineFactory is used to create and initialize an {@link IEligiusEngine} instance.
|
|
2862
|
+
*
|
|
2863
|
+
* It prepares a resolved configuration and creates the engine based on the class defined in the configuration.
|
|
2864
|
+
*
|
|
2865
|
+
* @example Loading a configuration and creating an IEligiusEngine instance
|
|
2866
|
+
* ```ts
|
|
2867
|
+
* import { IEngineConfiguration, EngineFactory, WebpackResourceImporter } from 'eligius';
|
|
2868
|
+
* import * as engineConfig from './my-eligius-config.json';
|
|
2869
|
+
*
|
|
2870
|
+
* const factory = new EngineFactory(new WebpackResourceImporter(), window);
|
|
2871
|
+
*
|
|
2872
|
+
* const engine = factory.createEngine((engineConfig as unknown) as IEngineConfiguration);
|
|
2873
|
+
*
|
|
2874
|
+
* engine.init().then(()=> {console.log('Eligius engine ready for business');});
|
|
2875
|
+
* ```
|
|
2876
|
+
*/
|
|
2877
|
+
declare class EngineFactory implements IEngineFactory {
|
|
2878
|
+
private _actionsLookup;
|
|
2879
|
+
private _eventbus;
|
|
2880
|
+
private _eventRemovers;
|
|
2881
|
+
private _importer;
|
|
2882
|
+
private _resizeTimeout;
|
|
2883
|
+
constructor(importer: ISimpleResourceImporter, windowRef: Window, options?: IEngineFactoryOptions);
|
|
2884
|
+
private _handleSpacePress;
|
|
2885
|
+
private _initializeDevtools;
|
|
2886
|
+
destroy(): void;
|
|
2887
|
+
private _resizeHandler;
|
|
2888
|
+
private _importSystemEntryWithEventbusDependency;
|
|
2889
|
+
private _importSystemEntry;
|
|
2890
|
+
private _requestInstanceHandler;
|
|
2891
|
+
private _requestFunctionHandler;
|
|
2892
|
+
private _requestActionHandler;
|
|
2893
|
+
createEngine(configuration: IEngineConfiguration, resolver?: IConfigurationResolver): IEligiusEngine;
|
|
2894
|
+
private _createTimelineProviders;
|
|
2895
|
+
}
|
|
2896
|
+
//#endregion
|
|
2897
|
+
//#region src/importer/eligius-resource-importer.d.ts
|
|
2898
|
+
declare class EligiusResourceImporter implements IResourceImporter {
|
|
2899
|
+
engines: Map<any, any>;
|
|
2900
|
+
constructor();
|
|
2901
|
+
getOperationNames(): string[];
|
|
2902
|
+
getControllerNames(): string[];
|
|
2903
|
+
getProviderNames(): string[];
|
|
2904
|
+
import(name: string): Record<string, any>;
|
|
2905
|
+
}
|
|
2906
|
+
//#endregion
|
|
2907
|
+
//#region src/timelineproviders/request-animation-frame-timeline-provider.d.ts
|
|
2908
|
+
declare class RequestAnimationFrameTimelineProvider implements ITimelineProvider {
|
|
2909
|
+
private _currentPosition;
|
|
2910
|
+
private _updateBound;
|
|
2911
|
+
private _firstFramePending;
|
|
2912
|
+
private _currentPlaylistItem;
|
|
2913
|
+
private _tickInterval;
|
|
2914
|
+
private _playlist;
|
|
2915
|
+
private _containerElement;
|
|
2916
|
+
private _abortController;
|
|
2917
|
+
private _onTime;
|
|
2918
|
+
private _onComplete;
|
|
2919
|
+
private _onRestart;
|
|
2920
|
+
private _onFirstFrame;
|
|
2921
|
+
loop: boolean;
|
|
2922
|
+
private _playState;
|
|
2923
|
+
get playState(): TPlayState;
|
|
2924
|
+
constructor(config: IResolvedEngineConfiguration);
|
|
2925
|
+
private _extractPlaylist;
|
|
2926
|
+
onTime(callback: (position: number) => void): void;
|
|
2927
|
+
onComplete(callback: () => void): void;
|
|
2928
|
+
onRestart(callback: () => void): void;
|
|
2929
|
+
onFirstFrame(callback: () => void): void;
|
|
2930
|
+
playlistItem(uri: string): void;
|
|
2931
|
+
private _update;
|
|
2932
|
+
private _callbackPosition;
|
|
2933
|
+
start(): void;
|
|
2934
|
+
private _resetToStartPosition;
|
|
2935
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
2936
|
+
private _stopAnimationInterval;
|
|
2937
|
+
init(): Promise<void>;
|
|
2938
|
+
destroy(): void;
|
|
2939
|
+
stop(): void;
|
|
2940
|
+
pause(): void;
|
|
2941
|
+
seek(position: number): Promise<number>;
|
|
2942
|
+
getPosition(): number;
|
|
2943
|
+
getDuration(): number;
|
|
2944
|
+
}
|
|
2945
|
+
//#endregion
|
|
2946
|
+
//#region src/timelineproviders/video-js-timeline-provider.d.ts
|
|
2947
|
+
declare class VideoJsTimelineProvider implements ITimelineProvider {
|
|
2948
|
+
private config;
|
|
2949
|
+
private _videoElementId;
|
|
2950
|
+
private _eventHandlers;
|
|
2951
|
+
private _playState;
|
|
2952
|
+
get playState(): TPlayState;
|
|
2953
|
+
loop: boolean;
|
|
2954
|
+
private _urls;
|
|
2955
|
+
private _onTime;
|
|
2956
|
+
private _onComplete;
|
|
2957
|
+
private _onRestart;
|
|
2958
|
+
private _onFirstFrame;
|
|
2959
|
+
private _player;
|
|
2960
|
+
constructor(config: IResolvedEngineConfiguration);
|
|
2961
|
+
init(): Promise<void>;
|
|
2962
|
+
private _addPlayerListener;
|
|
2963
|
+
private _handleEnded;
|
|
2964
|
+
private _handleTimeUpdate;
|
|
2965
|
+
start(): void;
|
|
2966
|
+
stop(): void;
|
|
2967
|
+
pause(): void;
|
|
2968
|
+
seek(position: number): Promise<number>;
|
|
2969
|
+
playlistItem(uri: string): void;
|
|
2970
|
+
getPosition(): number;
|
|
2971
|
+
getDuration(): number;
|
|
2972
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
2973
|
+
destroy(): void;
|
|
2974
|
+
onTime(callback: (position: number) => void): void;
|
|
2975
|
+
onComplete(callback: () => void): void;
|
|
2976
|
+
onRestart(callback: () => void): void;
|
|
2977
|
+
onFirstFrame(callback: () => void): void;
|
|
2978
|
+
private _extractUrls;
|
|
2979
|
+
private _addVideoElements;
|
|
2980
|
+
_extractFileType(url: string): string;
|
|
2981
|
+
}
|
|
2982
|
+
//#endregion
|
|
2983
|
+
export { Action, ActionCreator, ActionCreatorFactory, ActionEditor, ActionRegistryEventbusListener, ConfigurationFactory, ConfigurationResolver, ControllerNamesProvider, Controllers, DEV_TOOLS_KEY, DevToolEventListener, Diagnostics, EligiusEngine, EligiusResourceImporter, EndableAction, EndableActionCreator, EndableActionEditor, EngineFactory, EventListenerController, Eventbus, ExtractOperationData, ExtractOperationDataType, ExtractReturnedOperationData, GetControllerByName, GetOperationByName, IAction, IActionConfiguration, IConfigurationResolver, IController, IDiagnosticsAgent, IDiagnosticsInfo, IDimensions, IDuration, IEligiusEngine, IEndableAction, IEndableActionConfiguration, IEngineConfiguration, IEngineFactory, IEngineFactoryOptions, IEngineInfo, IEventActionConfiguration, IEventbus, IEventbusInterceptor, IEventbusListener, ILabel, ILanguageLabel, IOperationConfiguration, IOperationContext, IPlayControlEvent, IResolvedActionConfiguration, IResolvedEndableActionConfiguration, IResolvedEngineConfiguration, IResolvedOperation, IResolvedTimelineConfiguration, IResourceImporter, ISimpleResourceImporter, IStrictDuration, ISubtitle, ISubtitleCollection, ITimelineAction, ITimelineActionConfiguration, ITimelineConfiguration, ITimelineFlow, ITimelineProvider, ITimelineProviderInfo, ITimelineProviderSettings, KeysOfType, LabelController, LanguageManager, LottieController, NavigationController, OperationEditor, OperationMetadataProvider, OperationNamesProvider, Operations, ProgressbarController, RequestAnimationFrameTimelineProvider, RequestVideoUriInterceptor, RequireKeys, RoutingController, SubtitleEditor, SubtitleImporter, SubtitlesController, TControllerName, TControllerType, TDevToolsEventSubscriber, TDevToolsMessage, TDiagnosticType, TDiagnosticsMessageSource, TEngineConfigurationLists, TEventData, TEventHandler, TEventbusRemover, TLanguageCode, TOperation, TOperationData, TOperationName, TOperationResult, TOperationType, TPlayControlEventKind, TPlayState, TResultCallback, TTimelineProviderSettings, TWindowWithDevtools, TimeLineEventNamesProvider, TimelineAction, TimelineActionCreator, TimelineActionEditor, TimelineEventNames, TimelineProviderSettingsEditor, TimelineProvidersSettingsEditor, TimelineTypes, VideoJsTimelineProvider, addClass, addControllerToElement, animate, animateWithClass, broadcastEvent, calc, clearElement, clearOperationData, createElement, customFunction, endAction, endForEach, endWhen, extendController, forEach, generateImporterSourceCode, getAttributesFromElement, getControllerFromElement, getControllerInstance, getElementDimensions, getImport, getQueryParams, invokeObjectMethod, loadJson, log, math, index_d_exports as metadata, otherwise, removeClass, removeControllerFromElement, removeElement, removePropertiesFromOperationData, reparentElement, requestAction, resizeAction, selectElement, setData, setElementAttributes, setElementContent, setGlobalData, setOperationData, setStyle, startAction, toggleClass, toggleElement, wait, when };
|
|
2984
|
+
//# sourceMappingURL=index.d.ts.map
|