eligius 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +283 -4
- package/dist/build/generate-importer-source-code.d.ts +15 -0
- package/dist/build/index.d.ts +1 -0
- package/dist/configuration/types.d.ts +1 -1
- package/dist/diagnostics/devtool-event-lister.d.ts +7 -0
- package/dist/diagnostics/diagnostics.d.ts +4 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/types.d.ts +8 -0
- package/dist/eligius-engine.d.ts +27 -31
- package/dist/eligius.cjs.development.js +1601 -1107
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +1557 -1072
- package/dist/eligius.esm.js.map +1 -1
- package/dist/engine-factory.d.ts +1 -0
- package/dist/eventbus/types.d.ts +1 -1
- package/dist/importer/{webpack-resource-importer.d.ts → eligius-resource-importer.d.ts} +1 -1
- package/dist/importer/index.d.ts +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/operation/broadcast-event.d.ts +0 -1
- package/dist/operation/calc.d.ts +14 -0
- package/dist/operation/get-controller-instance.d.ts +2 -0
- package/dist/operation/helper/get-element-data.d.ts +1 -0
- package/dist/operation/helper/modify-dimensions.d.ts +4 -1
- package/dist/operation/index.d.ts +2 -0
- package/dist/operation/math.d.ts +12 -0
- package/dist/operation/metadata/add-globals-to-operation.d.ts +2 -2
- package/dist/operation/metadata/calc.d.ts +4 -0
- package/dist/operation/metadata/index.d.ts +2 -0
- package/dist/operation/metadata/math.d.ts +4 -0
- package/dist/operation/metadata/types.d.ts +17 -6
- package/dist/operation/select-element.d.ts +2 -0
- package/dist/operation/wait.d.ts +3 -0
- package/dist/schema-tools/generate-operation-schemas.d.ts +1 -0
- package/dist/schema-tools/html-tag-names.d.ts +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/{test/unit/operation → util}/apply-operation.d.ts +1 -1
- package/dist/util/camel-case-to-dash.d.ts +1 -0
- package/dist/util/dash-to-camel-case.d.ts +1 -0
- package/package.json +91 -97
- package/CHANGELOG.md +0 -16
package/dist/engine-factory.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class EngineFactory implements IEngineFactory {
|
|
|
7
7
|
private importer;
|
|
8
8
|
private eventbus;
|
|
9
9
|
constructor(importer: ISimpleResourceImporter, windowRef: any, eventbus?: IEventbus);
|
|
10
|
+
private _initializeDevtools;
|
|
10
11
|
destroy(): void;
|
|
11
12
|
private _resizeHandler;
|
|
12
13
|
private _importSystemEntryWithEventbusDependency;
|
package/dist/eventbus/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface IEventbus {
|
|
|
4
4
|
clear(): void;
|
|
5
5
|
on(eventName: string, eventHandler: TEventHandler, eventTopic?: string): TEventHandlerRemover;
|
|
6
6
|
off(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
|
|
7
|
-
once(eventName: string, eventHandler:
|
|
7
|
+
once(eventName: string, eventHandler: TEventHandler, eventTopic?: string): void;
|
|
8
8
|
broadcast(eventName: string, args?: any[]): void;
|
|
9
9
|
broadcastForTopic(eventName: string, eventTopic: string, args?: any[]): void;
|
|
10
10
|
registerEventlistener(eventbusListener: IEventbusListener): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IResourceImporter } from '../types';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class EligiusResourceImporter implements IResourceImporter {
|
|
3
3
|
engines: Map<any, any>;
|
|
4
4
|
constructor();
|
|
5
5
|
getOperationNames(): string[];
|
package/dist/importer/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { EligiusResourceImporter } from './eligius-resource-importer';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
export * from './action';
|
|
2
2
|
export * from './action/types';
|
|
3
|
+
export * from './build';
|
|
3
4
|
export { ConfigurationResolver } from './configuration/configuration-resolver';
|
|
4
5
|
export * from './configuration/types';
|
|
5
6
|
export * from './controllers';
|
|
6
7
|
export * from './controllers/types';
|
|
8
|
+
export * from './diagnostics';
|
|
7
9
|
export { EligiusEngine } from './eligius-engine';
|
|
8
10
|
export { EngineFactory } from './engine-factory';
|
|
9
11
|
export * from './eventbus';
|
|
10
12
|
export * from './eventbus/types';
|
|
11
|
-
export {
|
|
13
|
+
export { EligiusResourceImporter } from './importer';
|
|
12
14
|
export { LanguageManager } from './language-manager';
|
|
13
15
|
export * from './operation';
|
|
16
|
+
export * as metadata from './operation/metadata';
|
|
14
17
|
export * from './operation/types';
|
|
15
18
|
export { TimelineEventNames } from './timeline-event-names';
|
|
16
19
|
export * from './timelineproviders';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TOperation } from './types';
|
|
2
|
+
export declare type TCalculationOperator = '+' | '-' | '*' | '/' | '%' | '**';
|
|
3
|
+
export interface ICalcOperationData {
|
|
4
|
+
left: string | number;
|
|
5
|
+
right: string | number;
|
|
6
|
+
operator: TCalculationOperator;
|
|
7
|
+
propertyName?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This operation calculates the given left and right hand sides using the specified operator.
|
|
11
|
+
*
|
|
12
|
+
* @param operationData
|
|
13
|
+
*/
|
|
14
|
+
export declare const calc: TOperation<ICalcOperationData>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as controllers from '../controllers';
|
|
2
|
+
import { IController } from '../controllers/types';
|
|
2
3
|
import { TOperation } from './types';
|
|
3
4
|
declare type TSystemName = keyof typeof controllers;
|
|
4
5
|
export interface IGetControllerInstanceOperationData {
|
|
5
6
|
systemName: TSystemName;
|
|
6
7
|
propertyName?: string;
|
|
8
|
+
controllerInstance?: IController<unknown>;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* This operation retrieves an instance of the given controller name.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="jquery" />
|
|
2
2
|
import { IController } from '../../controllers/types';
|
|
3
|
+
export declare const controllersDataName = "eligiusEngineControllers";
|
|
3
4
|
declare function getElementData(name: string, element: JQuery): IController<any>[];
|
|
4
5
|
declare const getElementControllers: (element: JQuery<HTMLElement>) => IController<any>[];
|
|
5
6
|
export { getElementData, getElementControllers };
|
|
@@ -14,4 +14,7 @@ import { IDimensions } from '../../types';
|
|
|
14
14
|
* @param dimensions
|
|
15
15
|
* @param modifier
|
|
16
16
|
*/
|
|
17
|
-
export declare function modifyDimensions(dimensions: IDimensions, modifier: string):
|
|
17
|
+
export declare function modifyDimensions(dimensions: IDimensions, modifier: string): {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
@@ -3,6 +3,7 @@ export { addControllerToElement } from './add-controller-to-element';
|
|
|
3
3
|
export { animate } from './animate';
|
|
4
4
|
export { animateWithClass } from './animate-with-class';
|
|
5
5
|
export { broadcastEvent } from './broadcast-event';
|
|
6
|
+
export { calc } from './calc';
|
|
6
7
|
export { clearElement } from './clear-element';
|
|
7
8
|
export { clearOperationData } from './clear-operation-data';
|
|
8
9
|
export { createElement } from './create-element';
|
|
@@ -16,6 +17,7 @@ export { getElementDimensions } from './get-element-dimensions';
|
|
|
16
17
|
export { getImport } from './get-import';
|
|
17
18
|
export { loadJSON } from './load-json';
|
|
18
19
|
export { log } from './log';
|
|
20
|
+
export { math } from './math';
|
|
19
21
|
export { removeClass } from './remove-class';
|
|
20
22
|
export { removeControllerFromElement } from './remove-controller-from-element';
|
|
21
23
|
export { removeElement } from './remove-element';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TOperation } from './types';
|
|
2
|
+
export interface IMathOperationData {
|
|
3
|
+
args: (number | string | keyof Math)[];
|
|
4
|
+
functionName: keyof Math;
|
|
5
|
+
propertyName?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This operation performs the given math function of the specified arguments.
|
|
9
|
+
*
|
|
10
|
+
* @param operationData
|
|
11
|
+
*/
|
|
12
|
+
export declare const math: TOperation<IMathOperationData>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAddGlobalsToOperationData } from '../add-globals-to-operation';
|
|
2
2
|
import { IOperationMetadata } from './types';
|
|
3
|
-
declare function addGlobalsToOperation(): IOperationMetadata<
|
|
3
|
+
declare function addGlobalsToOperation(): IOperationMetadata<IAddGlobalsToOperationData>;
|
|
4
4
|
export default addGlobalsToOperation;
|
|
@@ -3,6 +3,7 @@ export { default as addControllerToElement } from './add-controller-to-element';
|
|
|
3
3
|
export { default as animate } from './animate';
|
|
4
4
|
export { default as animateWithClass } from './animate-with-class';
|
|
5
5
|
export { default as broadcastEvent } from './broadcast-event';
|
|
6
|
+
export { default as calc } from './calc';
|
|
6
7
|
export { default as clearElement } from './clear-element';
|
|
7
8
|
export { default as clearOperationData } from './clear-operation-data';
|
|
8
9
|
export { default as createElement } from './create-element';
|
|
@@ -16,6 +17,7 @@ export { default as getElementDimensions } from './get-element-dimensions';
|
|
|
16
17
|
export { default as getImport } from './get-import';
|
|
17
18
|
export { default as loadJSON } from './load-json';
|
|
18
19
|
export { default as log } from './log';
|
|
20
|
+
export { default as math } from './math';
|
|
19
21
|
export { default as removeClass } from './remove-class';
|
|
20
22
|
export { default as removeControllerFromElement } from './remove-controller-from-element';
|
|
21
23
|
export { default as removeElement } from './remove-element';
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
+
export declare type THasRequired = {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare type THasDescription = {
|
|
5
|
+
description?: string;
|
|
6
|
+
};
|
|
1
7
|
export declare type TComplexProperyMetadata = {
|
|
2
8
|
type: TParameterTypes;
|
|
3
9
|
defaultValue?: any;
|
|
4
|
-
|
|
5
|
-
};
|
|
10
|
+
} & THasRequired & THasDescription;
|
|
6
11
|
export declare type TArrayProperyMetadata = {
|
|
7
12
|
type: 'ParameterType:array';
|
|
8
13
|
itemType: TParameterTypes;
|
|
9
|
-
|
|
14
|
+
} & THasRequired & THasDescription;
|
|
15
|
+
export declare type TConstantParametersTypes = {
|
|
16
|
+
value: string;
|
|
17
|
+
default?: boolean;
|
|
18
|
+
} & THasRequired & THasDescription;
|
|
19
|
+
export declare type TPropertyMetadata = TComplexProperyMetadata | TArrayProperyMetadata | TParameterTypes | TConstantParametersTypes[];
|
|
20
|
+
export declare type TPropertiesMetadata<T> = {
|
|
21
|
+
[P in keyof T]?: TPropertyMetadata;
|
|
10
22
|
};
|
|
11
|
-
export declare type TPropertyMetadata = TComplexProperyMetadata | TArrayProperyMetadata | TParameterTypes;
|
|
12
23
|
export interface IOperationMetadata<T> {
|
|
13
24
|
description: string;
|
|
14
25
|
dependentProperties?: (keyof T)[];
|
|
15
|
-
properties?:
|
|
16
|
-
outputProperties?:
|
|
26
|
+
properties?: TPropertiesMetadata<T>;
|
|
27
|
+
outputProperties?: TPropertiesMetadata<T>;
|
|
17
28
|
}
|
|
18
29
|
export declare type TParameterTypes = 'ParameterType:htmlElementName' | 'ParameterType:className' | 'ParameterType:selector' | 'ParameterType:string' | 'ParameterType:integer' | 'ParameterType:object' | 'ParameterType:boolean' | 'ParameterType:array' | 'ParameterType:eventTopic' | 'ParameterType:eventName' | 'ParameterType:systemName' | 'ParameterType:actionName' | 'ParameterType:controllerName' | 'ParameterType:dimensions' | 'ParameterType:dimensionsModifier' | 'ParameterType:url' | 'ParameterType:htmlContent' | 'ParameterType:labelId' | 'ParameterType:ImagePath' | 'ParameterType:QuadrantPosition';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
1
2
|
import { TOperation } from './types';
|
|
2
3
|
export interface ISelectElementOperationData {
|
|
3
4
|
selector: string;
|
|
4
5
|
propertyName?: string;
|
|
5
6
|
useSelectedElementAsRoot?: boolean;
|
|
7
|
+
selectedElement?: JQuery;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* This operation selects one or more elements using the specified selector.
|
package/dist/operation/wait.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const htmlTagNames: string[];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IOperationContext, TOperation } from '
|
|
1
|
+
import { IOperationContext, TOperation } from '../operation';
|
|
2
2
|
export declare const defaultContext: IOperationContext;
|
|
3
3
|
export declare function applyOperation<T = TOperation>(operation: TOperation<any>, operationData: any, context?: IOperationContext): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function camelCaseToDash(input: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function dashToCamelCase(input: string): string;
|
package/package.json
CHANGED
|
@@ -1,97 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "1.0.
|
|
3
|
-
"license": "MIT",
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/eligius
|
|
6
|
-
"typings": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": ">=10"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"dev": "dts watch",
|
|
16
|
-
"build": "dts build",
|
|
17
|
-
"test": "
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/
|
|
53
|
-
"@types/
|
|
54
|
-
"@types/
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"mousetrap": "1.6.5",
|
|
93
|
-
"ts-is-present": "1.2.2",
|
|
94
|
-
"uuid": "8.3.2"
|
|
95
|
-
},
|
|
96
|
-
"packageManager": "yarn@3.1.1"
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.4",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/eligius.esm.js",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=10"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"dev": "dts watch",
|
|
16
|
+
"build": "dts build",
|
|
17
|
+
"test": "cross-env TS_NODE_PROJECT=tsconfig.test.json uvu -r ts-node/register -r jsdom-global/register src/test",
|
|
18
|
+
"check": "tsc --pretty --noEmit",
|
|
19
|
+
"lint": "dts lint",
|
|
20
|
+
"prepare": "dts build",
|
|
21
|
+
"size": "size-limit",
|
|
22
|
+
"generate-schema": "ts-node ./src/schema-tools/generate-operation-schemas",
|
|
23
|
+
"typedoc": "typedoc --options typedoc.json",
|
|
24
|
+
"docs": "yarn generate-schema && yarn typedoc && node copy-schema"
|
|
25
|
+
},
|
|
26
|
+
"prettier": {
|
|
27
|
+
"printWidth": 80,
|
|
28
|
+
"semi": true,
|
|
29
|
+
"singleQuote": true,
|
|
30
|
+
"trailingComma": "es5"
|
|
31
|
+
},
|
|
32
|
+
"name": "eligius",
|
|
33
|
+
"author": "rolandzwaga",
|
|
34
|
+
"size-limit": [
|
|
35
|
+
{
|
|
36
|
+
"path": "dist/eligius.cjs.production.min.js",
|
|
37
|
+
"limit": "150 KB"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "dist/eligius.esm.js",
|
|
41
|
+
"limit": "150 KB"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@size-limit/preset-small-lib": "8.1.0",
|
|
46
|
+
"@types/chai": "4.3.3",
|
|
47
|
+
"@types/fs-extra": "9.0.13",
|
|
48
|
+
"@types/jasmine": "4.3.0",
|
|
49
|
+
"@types/jquery": "3.5.14",
|
|
50
|
+
"@types/jsdom": "^20.0.0",
|
|
51
|
+
"@types/mousetrap": "1.6.9",
|
|
52
|
+
"@types/node": "18.11.3",
|
|
53
|
+
"@types/sinon": "10.0.13",
|
|
54
|
+
"@types/uuid": "8.3.4",
|
|
55
|
+
"acorn": "8.8.0",
|
|
56
|
+
"ajv": "8.11.0",
|
|
57
|
+
"astring": "1.8.3",
|
|
58
|
+
"babel-jest": "29.2.1",
|
|
59
|
+
"canvas": "2.10.1",
|
|
60
|
+
"chai": "4.3.6",
|
|
61
|
+
"cross-env": "7.0.3",
|
|
62
|
+
"dts-cli": "1.6.0",
|
|
63
|
+
"fs-extra": "10.1.0",
|
|
64
|
+
"husky": "8.0.1",
|
|
65
|
+
"jquery": "3.6.1",
|
|
66
|
+
"jsdom": "20.0.1",
|
|
67
|
+
"jsdom-global": "3.0.2",
|
|
68
|
+
"lottie-web": "5.9.6",
|
|
69
|
+
"mediaelement": "5.1.0",
|
|
70
|
+
"sinon": "14.0.1",
|
|
71
|
+
"size-limit": "8.1.0",
|
|
72
|
+
"ts-node": "10.9.1",
|
|
73
|
+
"tsconfig-paths": "^4.1.0",
|
|
74
|
+
"tslib": "2.4.0",
|
|
75
|
+
"typedoc": "0.23.17",
|
|
76
|
+
"typedoc-plugin-missing-exports": "1.0.0",
|
|
77
|
+
"typescript": "4.8.4",
|
|
78
|
+
"uvu": "0.5.6"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"jquery": "3.6.0",
|
|
82
|
+
"lottie-web": "5.8.1",
|
|
83
|
+
"mediaelement": "5.0.4"
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"mousetrap": "1.6.5",
|
|
87
|
+
"ts-is-present": "1.2.2",
|
|
88
|
+
"uuid": "9.0.0"
|
|
89
|
+
},
|
|
90
|
+
"packageManager": "yarn@3.2.4"
|
|
91
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
## 1.0.2
|
|
4
|
-
|
|
5
|
-
- Fix all unit tests
|
|
6
|
-
- Add documentation to all operations
|
|
7
|
-
|
|
8
|
-
## 1.0.1
|
|
9
|
-
|
|
10
|
-
- Some minor bug fixes
|
|
11
|
-
- Add Changelog
|
|
12
|
-
|
|
13
|
-
## 1.0.0
|
|
14
|
-
|
|
15
|
-
Initial release as Eligius (used to be called Chronotrigger).
|
|
16
|
-
Entire Chronotrigger code base ported to Typescript.
|