eligius 1.0.15 → 1.0.16
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/dist/configuration/api/action-creator-factory.d.ts +1 -1
- package/dist/configuration/api/configuration-factory.d.ts +8 -2
- package/dist/eligius.cjs.development.js +18 -4
- 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 +18 -4
- package/dist/eligius.esm.js.map +1 -1
- package/dist/operation/add-controller-to-element.d.ts +4 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { ConfigurationFactory } from './configuration-factory';
|
|
|
4
4
|
export declare class ActionCreatorFactory {
|
|
5
5
|
private readonly configurationfactory;
|
|
6
6
|
constructor(configurationfactory: ConfigurationFactory);
|
|
7
|
-
createAction(name: string):
|
|
7
|
+
createAction(name: string): EndableActionCreator;
|
|
8
8
|
createInitAction(name: string): EndableActionCreator;
|
|
9
9
|
createEventAction(name: string): ActionCreator;
|
|
10
10
|
createTimelineAction(uri: string, name: string): TimelineActionCreator;
|
|
@@ -4,10 +4,15 @@ import { ActionCreatorFactory } from './action-creator-factory';
|
|
|
4
4
|
import { ActionEditor, EndableActionEditor, TimelineActionEditor } from './action-editor';
|
|
5
5
|
import { TimelineProvidersSettingsEditor } from './timeline-provider-settings-editor';
|
|
6
6
|
export declare type TEngineConfigurationLists = Pick<IEngineConfiguration, 'availableLanguages' | 'initActions' | 'actions' | 'eventActions' | 'timelines' | 'labels'>;
|
|
7
|
+
declare type ConfigurationFactoryExtension = (this: ConfigurationFactory, ...rest: any[]) => void;
|
|
7
8
|
export declare class ConfigurationFactory {
|
|
8
9
|
actionCreatorFactory: ActionCreatorFactory;
|
|
9
10
|
configuration: IEngineConfiguration;
|
|
10
11
|
constructor(config?: IEngineConfiguration);
|
|
12
|
+
static extend<T extends ConfigurationFactory, K extends string | number | symbol, C extends ConfigurationFactoryExtension>(factory: T, extensionMethodName: K, extensionMethod: C): T & { [k in K]: C; };
|
|
13
|
+
static extendMultiple<T extends ConfigurationFactory, C extends ConfigurationFactoryExtension, D extends {
|
|
14
|
+
[name: string]: C;
|
|
15
|
+
}>(factory: T, extensions: D): T & D;
|
|
11
16
|
init(defaultLanguage: string): this;
|
|
12
17
|
setLayoutTemplate(layoutTemplate: string): this;
|
|
13
18
|
setDefaultLanguage(defaultLanguage: string): this;
|
|
@@ -21,7 +26,7 @@ export declare class ConfigurationFactory {
|
|
|
21
26
|
addInitAction(action: IActionConfiguration): void;
|
|
22
27
|
addEventAction(action: IActionConfiguration): void;
|
|
23
28
|
addTimelineAction(uri: string, action: ITimelineActionConfiguration): void;
|
|
24
|
-
createAction(name: string): import("./action-creator-factory").
|
|
29
|
+
createAction(name: string): import("./action-creator-factory").EndableActionCreator<import("../types").IEndableActionConfiguration>;
|
|
25
30
|
createInitAction(name: string): import("./action-creator-factory").EndableActionCreator<import("../types").IEndableActionConfiguration>;
|
|
26
31
|
createEventAction(name: string): import("./action-creator-factory").ActionCreator<IActionConfiguration>;
|
|
27
32
|
createTimelineAction(uri: string, name: string): import("./action-creator-factory").TimelineActionCreator;
|
|
@@ -31,8 +36,9 @@ export declare class ConfigurationFactory {
|
|
|
31
36
|
_initializeLabel(id: string, labels: ILanguageLabel[]): ILanguageLabel;
|
|
32
37
|
_getLabelTranslation(labelTranslations: ILabel[], languageCode: string): ILabel;
|
|
33
38
|
addLabel(id: string, code: string, translation: string): this;
|
|
34
|
-
editAction(id: string):
|
|
39
|
+
editAction(id: string): EndableActionEditor<import("../types").IEndableActionConfiguration>;
|
|
35
40
|
editEventAction(id: string): ActionEditor<import("../types").IEventActionConfiguration>;
|
|
36
41
|
editInitAction(id: string): EndableActionEditor<import("../types").IEndableActionConfiguration>;
|
|
37
42
|
editTimelineAction(uri: string, id: string): TimelineActionEditor;
|
|
38
43
|
}
|
|
44
|
+
export {};
|
|
@@ -3335,9 +3335,9 @@ var TimelineProvidersSettingsEditor = /*#__PURE__*/function () {
|
|
|
3335
3335
|
}
|
|
3336
3336
|
|
|
3337
3337
|
var settings = {
|
|
3338
|
-
id:
|
|
3339
|
-
poster:
|
|
3340
|
-
selector:
|
|
3338
|
+
id: uuid.v4(),
|
|
3339
|
+
poster: undefined,
|
|
3340
|
+
selector: undefined,
|
|
3341
3341
|
systemName: '',
|
|
3342
3342
|
vendor: ''
|
|
3343
3343
|
};
|
|
@@ -3409,6 +3409,20 @@ var ConfigurationFactory = /*#__PURE__*/function () {
|
|
|
3409
3409
|
this.actionCreatorFactory = new ActionCreatorFactory(this);
|
|
3410
3410
|
}
|
|
3411
3411
|
|
|
3412
|
+
ConfigurationFactory.extend = function extend(factory, extensionMethodName, extensionMethod) {
|
|
3413
|
+
factory[extensionMethodName] = extensionMethod.bind(factory);
|
|
3414
|
+
return factory;
|
|
3415
|
+
};
|
|
3416
|
+
|
|
3417
|
+
ConfigurationFactory.extendMultiple = function extendMultiple(factory, extensions) {
|
|
3418
|
+
Object.entries(extensions).forEach(function (_ref) {
|
|
3419
|
+
var name = _ref[0],
|
|
3420
|
+
method = _ref[1];
|
|
3421
|
+
return ConfigurationFactory.extend(factory, name, method);
|
|
3422
|
+
});
|
|
3423
|
+
return factory;
|
|
3424
|
+
};
|
|
3425
|
+
|
|
3412
3426
|
var _proto = ConfigurationFactory.prototype;
|
|
3413
3427
|
|
|
3414
3428
|
_proto.init = function init(defaultLanguage) {
|
|
@@ -3625,7 +3639,7 @@ var ConfigurationFactory = /*#__PURE__*/function () {
|
|
|
3625
3639
|
});
|
|
3626
3640
|
|
|
3627
3641
|
if (actionConfig) {
|
|
3628
|
-
return new
|
|
3642
|
+
return new EndableActionEditor(actionConfig, this);
|
|
3629
3643
|
}
|
|
3630
3644
|
|
|
3631
3645
|
throw new Error("Action not found for id " + id);
|