@raydiant/playlist-window-manager 0.21.1 → 0.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/PresentationWindow.ts +1 -1
- package/tasks/npm-publish.sh +1 -1
- package/build/BrowserViewRenderer.d.ts +0 -19
- package/build/BrowserViewRenderer.js +0 -212
- package/build/BrowserWindowRenderer.d.ts +0 -47
- package/build/BrowserWindowRenderer.js +0 -521
- package/build/IFrameRenderer.d.ts +0 -20
- package/build/IFrameRenderer.js +0 -226
- package/build/PlaylistWindowManager.d.ts +0 -106
- package/build/PlaylistWindowManager.js +0 -1017
- package/build/PlaylistWindowManagerState.d.ts +0 -28
- package/build/PlaylistWindowManagerState.js +0 -60
- package/build/PresentationWindow.d.ts +0 -142
- package/build/PresentationWindow.js +0 -1138
- package/build/PresentationWindow.test.d.ts +0 -1
- package/build/PresentationWindow.test.js +0 -241
- package/build/WindowLoadError.d.ts +0 -3
- package/build/WindowLoadError.js +0 -29
- package/build/WindowTimeoutError.d.ts +0 -3
- package/build/WindowTimeoutError.js +0 -29
- package/build/WindowUnresponsiveError.d.ts +0 -3
- package/build/WindowUnresponsiveError.js +0 -29
- package/build/embeddedApps.d.ts +0 -2
- package/build/embeddedApps.js +0 -59
- package/build/embeddedApps.test.d.ts +0 -1
- package/build/embeddedApps.test.js +0 -123
- package/build/index.d.ts +0 -10
- package/build/index.js +0 -30
- package/build/preload.d.ts +0 -1
- package/build/preload.js +0 -20
- package/build/testUtils.d.ts +0 -43
- package/build/testUtils.js +0 -208
- package/build/types.d.ts +0 -142
- package/build/types.js +0 -2
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Presentation, ApplicationVersion, Theme } from './types';
|
|
2
|
-
export interface PlaylistWindowManagerStateOptions {
|
|
3
|
-
presentations: {
|
|
4
|
-
[id: string]: Presentation;
|
|
5
|
-
};
|
|
6
|
-
applicationVersions: {
|
|
7
|
-
[id: string]: ApplicationVersion;
|
|
8
|
-
};
|
|
9
|
-
themes: {
|
|
10
|
-
[id: string]: Theme;
|
|
11
|
-
};
|
|
12
|
-
publishedAt: string;
|
|
13
|
-
}
|
|
14
|
-
export default class PlaylistWindowManagerState {
|
|
15
|
-
private options;
|
|
16
|
-
private presentations;
|
|
17
|
-
private applicationVersions;
|
|
18
|
-
private themes;
|
|
19
|
-
private publishedAt;
|
|
20
|
-
constructor(options: PlaylistWindowManagerStateOptions);
|
|
21
|
-
getPresentation(presentationId: string): Presentation;
|
|
22
|
-
setPresentation(presentation: Presentation): void;
|
|
23
|
-
getApplicationVersion(applicationVersionId: string): ApplicationVersion;
|
|
24
|
-
setApplicationVersion(applicationVersion: ApplicationVersion): void;
|
|
25
|
-
getTheme(themeId: string): Theme;
|
|
26
|
-
setTheme(theme: Theme): void;
|
|
27
|
-
getPublishedAt(): string;
|
|
28
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
var PlaylistWindowManagerState = /** @class */ (function () {
|
|
15
|
-
function PlaylistWindowManagerState(options) {
|
|
16
|
-
this.options = options;
|
|
17
|
-
this.presentations = {};
|
|
18
|
-
this.applicationVersions = {};
|
|
19
|
-
this.themes = {};
|
|
20
|
-
this.presentations = __assign({}, options.presentations);
|
|
21
|
-
this.applicationVersions = __assign({}, options.applicationVersions);
|
|
22
|
-
this.themes = __assign({}, options.themes);
|
|
23
|
-
this.publishedAt = options.publishedAt;
|
|
24
|
-
}
|
|
25
|
-
PlaylistWindowManagerState.prototype.getPresentation = function (presentationId) {
|
|
26
|
-
var presentation = this.options.presentations[presentationId];
|
|
27
|
-
if (!presentation) {
|
|
28
|
-
throw new Error("Failed to create window, missing presentation for '".concat(presentationId, "'"));
|
|
29
|
-
}
|
|
30
|
-
return presentation;
|
|
31
|
-
};
|
|
32
|
-
PlaylistWindowManagerState.prototype.setPresentation = function (presentation) {
|
|
33
|
-
this.presentations[presentation.id] = presentation;
|
|
34
|
-
};
|
|
35
|
-
PlaylistWindowManagerState.prototype.getApplicationVersion = function (applicationVersionId) {
|
|
36
|
-
var applicationVersion = this.options.applicationVersions[applicationVersionId];
|
|
37
|
-
if (!applicationVersion) {
|
|
38
|
-
throw new Error("Failed to create window, missing application version for ".concat(applicationVersionId));
|
|
39
|
-
}
|
|
40
|
-
return applicationVersion;
|
|
41
|
-
};
|
|
42
|
-
PlaylistWindowManagerState.prototype.setApplicationVersion = function (applicationVersion) {
|
|
43
|
-
this.applicationVersions[applicationVersion.id] = applicationVersion;
|
|
44
|
-
};
|
|
45
|
-
PlaylistWindowManagerState.prototype.getTheme = function (themeId) {
|
|
46
|
-
var theme = this.options.themes[themeId];
|
|
47
|
-
if (!theme) {
|
|
48
|
-
throw new Error("Failed to create window, missing theme for '".concat(themeId, "'"));
|
|
49
|
-
}
|
|
50
|
-
return theme;
|
|
51
|
-
};
|
|
52
|
-
PlaylistWindowManagerState.prototype.setTheme = function (theme) {
|
|
53
|
-
this.themes[theme.id] = theme;
|
|
54
|
-
};
|
|
55
|
-
PlaylistWindowManagerState.prototype.getPublishedAt = function () {
|
|
56
|
-
return this.publishedAt;
|
|
57
|
-
};
|
|
58
|
-
return PlaylistWindowManagerState;
|
|
59
|
-
}());
|
|
60
|
-
exports.default = PlaylistWindowManagerState;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import * as RE from '@raydiant/playlist-rule-engine';
|
|
2
|
-
import PlaylistWindowManagerState from './PlaylistWindowManagerState';
|
|
3
|
-
import PlaylistWindowManager from './PlaylistWindowManager';
|
|
4
|
-
import { Presentation, ApplicationVersion, Theme, Device, PresentationWindowRenderer, WindowBounds, Logger, BuilderState, WorkerState, AnalyticsEvent } from './types';
|
|
5
|
-
export interface PresentationWindowOptions {
|
|
6
|
-
windowManager?: PlaylistWindowManager;
|
|
7
|
-
windowId: string;
|
|
8
|
-
windowName?: string;
|
|
9
|
-
parentWindowId?: string;
|
|
10
|
-
builderState?: BuilderState;
|
|
11
|
-
presentation: Presentation;
|
|
12
|
-
applicationVersion: ApplicationVersion;
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
device?: Device;
|
|
15
|
-
playlistId?: string;
|
|
16
|
-
playlistName?: string;
|
|
17
|
-
rule?: RE.Rule | null;
|
|
18
|
-
publishedAt: string;
|
|
19
|
-
playlistWindowManagerState: PlaylistWindowManagerState;
|
|
20
|
-
ruleEngineState: RE.State;
|
|
21
|
-
logger: Logger;
|
|
22
|
-
globalRule?: RE.Rule;
|
|
23
|
-
renderer: PresentationWindowRenderer;
|
|
24
|
-
readyTimeoutDurationSeconds?: number;
|
|
25
|
-
appRendererUrl?: string;
|
|
26
|
-
bounds?: WindowBounds;
|
|
27
|
-
backgroundColor?: string;
|
|
28
|
-
isPreview?: boolean;
|
|
29
|
-
forceMute?: boolean;
|
|
30
|
-
workerState: WorkerState;
|
|
31
|
-
onPresentationProperties?: (properties: any[], string: {
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
}) => void;
|
|
34
|
-
}
|
|
35
|
-
export default class PresentationWindow {
|
|
36
|
-
private options;
|
|
37
|
-
private didReceiveReady;
|
|
38
|
-
private readyCallback;
|
|
39
|
-
private didReceiveComplete;
|
|
40
|
-
private completeCallback;
|
|
41
|
-
private errorCallback;
|
|
42
|
-
private readyTimeout;
|
|
43
|
-
private windowManagers;
|
|
44
|
-
private focusedWindowManager;
|
|
45
|
-
private didEmbeddedAppLoad;
|
|
46
|
-
private lastPlayedAt;
|
|
47
|
-
private configurableDurationTimeout;
|
|
48
|
-
private isWindowLocked;
|
|
49
|
-
private isChildWindowLocked;
|
|
50
|
-
private enableInterruptLockCallback;
|
|
51
|
-
private disableInterruptLockCallback;
|
|
52
|
-
private analyticsEventCallback;
|
|
53
|
-
private builderState;
|
|
54
|
-
private presentation;
|
|
55
|
-
private playlistWindowManagerState;
|
|
56
|
-
private ruleEngineState;
|
|
57
|
-
private theme;
|
|
58
|
-
private forceMute;
|
|
59
|
-
private error;
|
|
60
|
-
private workerState;
|
|
61
|
-
private workerSubscriptions;
|
|
62
|
-
private runtimeSubscriptions;
|
|
63
|
-
private previewSubscriptions;
|
|
64
|
-
private previewState;
|
|
65
|
-
private createObjectURLResolvers;
|
|
66
|
-
private createObjectURLTimeouts;
|
|
67
|
-
constructor(options: PresentationWindowOptions);
|
|
68
|
-
load(): Promise<void>;
|
|
69
|
-
show(isFocused?: boolean): void;
|
|
70
|
-
hide(): void;
|
|
71
|
-
remove(): Promise<void>;
|
|
72
|
-
reinitializePresentationWindowRuleEngineState(newRulesDataStoreObj: RE.RulesDataStore): void;
|
|
73
|
-
play(): void;
|
|
74
|
-
pause(): void;
|
|
75
|
-
resume(): void;
|
|
76
|
-
reset(): void;
|
|
77
|
-
onComplete(callback: (() => void) | null): void;
|
|
78
|
-
onError(callback: ((err: Error) => void) | null): void;
|
|
79
|
-
onEnableInterruptLock(callback: (() => void) | null): void;
|
|
80
|
-
onDisableInterruptLock(callback: (() => void) | null): void;
|
|
81
|
-
onAnalyticsEvent(callback: ((event: AnalyticsEvent) => void) | null): void;
|
|
82
|
-
isReady(): boolean;
|
|
83
|
-
isComplete(): boolean;
|
|
84
|
-
isPlaying(): boolean;
|
|
85
|
-
updateBounds(bounds: WindowBounds): void;
|
|
86
|
-
didError(): boolean;
|
|
87
|
-
isLocked(): boolean;
|
|
88
|
-
setPresentation(presentation: Presentation, playlistWindowManagerState: PlaylistWindowManagerState, ruleEngineState: RE.State): void;
|
|
89
|
-
setTheme(theme?: Theme): void;
|
|
90
|
-
setBuilderState(builderState?: BuilderState): void;
|
|
91
|
-
setForceMute(forceMute: boolean): void;
|
|
92
|
-
reload(): Promise<void>;
|
|
93
|
-
runGetProperties(builderState?: BuilderState): void;
|
|
94
|
-
createObjectURL(blob: Blob): Promise<string>;
|
|
95
|
-
private isEmbeddedApp;
|
|
96
|
-
private allChildWindowManagersReady;
|
|
97
|
-
private checkIsReadyCallback;
|
|
98
|
-
private appendWindowIdToHash;
|
|
99
|
-
private loadEmbeddedApp;
|
|
100
|
-
private loadLegacyApp;
|
|
101
|
-
private createAndLoadWindow;
|
|
102
|
-
private loadWindow;
|
|
103
|
-
private sendMessageString;
|
|
104
|
-
private sendMessageObject;
|
|
105
|
-
private waitForPesentationReady;
|
|
106
|
-
private buildTheme;
|
|
107
|
-
private sendRenderMessage;
|
|
108
|
-
private openChildWindow;
|
|
109
|
-
private closeChildWindow;
|
|
110
|
-
private enableInteruptLock;
|
|
111
|
-
private disableInteruptLock;
|
|
112
|
-
private getEmbeddedAppUrl;
|
|
113
|
-
private handleEmbeddedMessage;
|
|
114
|
-
private handleLegacyMessage;
|
|
115
|
-
private handleReady;
|
|
116
|
-
private handleComplete;
|
|
117
|
-
private handleError;
|
|
118
|
-
private logDebug;
|
|
119
|
-
private logInfo;
|
|
120
|
-
private logWarning;
|
|
121
|
-
private logError;
|
|
122
|
-
private getLogContext;
|
|
123
|
-
metadata(): {
|
|
124
|
-
windowId: string;
|
|
125
|
-
windowName: string | undefined;
|
|
126
|
-
parentWindowId: string | undefined;
|
|
127
|
-
presentationId: string;
|
|
128
|
-
presentationName: string;
|
|
129
|
-
applicationId: string;
|
|
130
|
-
applicationVersionName: string;
|
|
131
|
-
applicationVersionId: string;
|
|
132
|
-
publishedAt: string;
|
|
133
|
-
playlistId: string | undefined;
|
|
134
|
-
playlistName: string | undefined;
|
|
135
|
-
rule: RE.Rule | null | undefined;
|
|
136
|
-
};
|
|
137
|
-
runWorkerSubscriptions(state: WorkerState): void;
|
|
138
|
-
private createRuleEngine;
|
|
139
|
-
private isValidOpenChildWindowPayload;
|
|
140
|
-
private shouldMute;
|
|
141
|
-
private createObjectURLForEmbeddedApp;
|
|
142
|
-
}
|