@raydiant/playlist-window-manager 0.14.12 → 0.14.17
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/build/PresentationWindow.d.ts +1 -0
- package/build/PresentationWindow.js +24 -2
- package/build/types.d.ts +15 -0
- package/package.json +2 -2
- package/src/PresentationWindow.ts +30 -2
- package/src/types.ts +15 -0
|
@@ -537,6 +537,28 @@ var PresentationWindow = /** @class */ (function () {
|
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
539
|
};
|
|
540
|
+
PresentationWindow.prototype.buildTheme = function () {
|
|
541
|
+
if (!this.theme)
|
|
542
|
+
return;
|
|
543
|
+
var nextTheme = __assign({}, this.theme);
|
|
544
|
+
if (nextTheme.headingFontNew && nextTheme.headingFontNew.fileUpload) {
|
|
545
|
+
nextTheme.headingFont =
|
|
546
|
+
nextTheme.headingFontNew.fileUpload.url || nextTheme.headingFont;
|
|
547
|
+
}
|
|
548
|
+
if (nextTheme.heading2FontNew && nextTheme.heading2FontNew.fileUpload) {
|
|
549
|
+
nextTheme.heading2Font =
|
|
550
|
+
nextTheme.heading2FontNew.fileUpload.url || nextTheme.heading2Font;
|
|
551
|
+
}
|
|
552
|
+
if (nextTheme.bodyFontNew && nextTheme.bodyFontNew.fileUpload) {
|
|
553
|
+
nextTheme.bodyFont =
|
|
554
|
+
nextTheme.bodyFontNew.fileUpload.url || nextTheme.bodyFont;
|
|
555
|
+
}
|
|
556
|
+
if (nextTheme.backgroundImageFileUpload) {
|
|
557
|
+
nextTheme.backgroundImage =
|
|
558
|
+
nextTheme.backgroundImageFileUpload.url || nextTheme.backgroundImage;
|
|
559
|
+
}
|
|
560
|
+
return nextTheme;
|
|
561
|
+
};
|
|
540
562
|
PresentationWindow.prototype.sendRenderMessage = function () {
|
|
541
563
|
var _a = this.options, applicationVersion = _a.applicationVersion, isPreview = _a.isPreview, device = _a.device;
|
|
542
564
|
// IFrames do not have a mute/unmute API so we are overriding any mute properties
|
|
@@ -548,7 +570,7 @@ var PresentationWindow = /** @class */ (function () {
|
|
|
548
570
|
// TODO: We need a better way to identify mute properties (ie. PropType.mute())
|
|
549
571
|
// Force mute the presentation, existing apps use either mute or muted.
|
|
550
572
|
mute: true, muted: true }) }),
|
|
551
|
-
theme: this.
|
|
573
|
+
theme: this.buildTheme(),
|
|
552
574
|
applicationVersion: applicationVersion,
|
|
553
575
|
device: device,
|
|
554
576
|
isPreview: isPreview
|
|
@@ -558,7 +580,7 @@ var PresentationWindow = /** @class */ (function () {
|
|
|
558
580
|
this.sendMessage('render', {
|
|
559
581
|
builderState: this.builderState,
|
|
560
582
|
presentation: this.presentation,
|
|
561
|
-
theme: this.
|
|
583
|
+
theme: this.buildTheme(),
|
|
562
584
|
applicationVersion: applicationVersion,
|
|
563
585
|
device: device,
|
|
564
586
|
isPreview: isPreview
|
package/build/types.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export interface ApplicationVersion {
|
|
|
28
28
|
configurableDuration: boolean;
|
|
29
29
|
sourceUrl: string | null;
|
|
30
30
|
}
|
|
31
|
+
export interface Font {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
weight: string;
|
|
35
|
+
fileUpload: {
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
31
39
|
export interface Theme {
|
|
32
40
|
id: string;
|
|
33
41
|
name: string;
|
|
@@ -41,6 +49,13 @@ export interface Theme {
|
|
|
41
49
|
bodyTextColor: string;
|
|
42
50
|
bodyFont: string;
|
|
43
51
|
borderColor: string;
|
|
52
|
+
headingFontNew: Font | null;
|
|
53
|
+
heading2FontNew: Font | null;
|
|
54
|
+
bodyFontNew: Font | null;
|
|
55
|
+
backgroundImageFileUpload: {
|
|
56
|
+
url: string;
|
|
57
|
+
} | null;
|
|
58
|
+
backgroundScale: 'fit' | 'fill' | null;
|
|
44
59
|
}
|
|
45
60
|
export interface Device {
|
|
46
61
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raydiant/playlist-window-manager",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.17",
|
|
4
4
|
"description": "Window manager for playlist playback.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"fast-deep-equal": "^3.1.3",
|
|
15
|
-
"@raydiant/playlist-rule-engine": "3.1.
|
|
15
|
+
"@raydiant/playlist-rule-engine": "3.1.13",
|
|
16
16
|
"raydiant-kit": "^4.6.1",
|
|
17
17
|
"uuid": "^8.3.0",
|
|
18
18
|
"eventemitter3": "^4.0.7"
|
|
@@ -480,6 +480,34 @@ export default class PresentationWindow {
|
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
private buildTheme(): Theme | undefined {
|
|
484
|
+
if (!this.theme) return;
|
|
485
|
+
|
|
486
|
+
const nextTheme = { ...this.theme };
|
|
487
|
+
|
|
488
|
+
if (nextTheme.headingFontNew && nextTheme.headingFontNew.fileUpload) {
|
|
489
|
+
nextTheme.headingFont =
|
|
490
|
+
nextTheme.headingFontNew.fileUpload.url || nextTheme.headingFont;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (nextTheme.heading2FontNew && nextTheme.heading2FontNew.fileUpload) {
|
|
494
|
+
nextTheme.heading2Font =
|
|
495
|
+
nextTheme.heading2FontNew.fileUpload.url || nextTheme.heading2Font;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (nextTheme.bodyFontNew && nextTheme.bodyFontNew.fileUpload) {
|
|
499
|
+
nextTheme.bodyFont =
|
|
500
|
+
nextTheme.bodyFontNew.fileUpload.url || nextTheme.bodyFont;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
if (nextTheme.backgroundImageFileUpload) {
|
|
504
|
+
nextTheme.backgroundImage =
|
|
505
|
+
nextTheme.backgroundImageFileUpload.url || nextTheme.backgroundImage;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
return nextTheme;
|
|
509
|
+
}
|
|
510
|
+
|
|
483
511
|
private sendRenderMessage() {
|
|
484
512
|
const { applicationVersion, isPreview, device } = this.options;
|
|
485
513
|
// IFrames do not have a mute/unmute API so we are overriding any mute properties
|
|
@@ -497,7 +525,7 @@ export default class PresentationWindow {
|
|
|
497
525
|
muted: true
|
|
498
526
|
}
|
|
499
527
|
},
|
|
500
|
-
theme: this.
|
|
528
|
+
theme: this.buildTheme(),
|
|
501
529
|
applicationVersion,
|
|
502
530
|
device,
|
|
503
531
|
isPreview
|
|
@@ -506,7 +534,7 @@ export default class PresentationWindow {
|
|
|
506
534
|
this.sendMessage('render', {
|
|
507
535
|
builderState: this.builderState,
|
|
508
536
|
presentation: this.presentation,
|
|
509
|
-
theme: this.
|
|
537
|
+
theme: this.buildTheme(),
|
|
510
538
|
applicationVersion,
|
|
511
539
|
device,
|
|
512
540
|
isPreview
|
package/src/types.ts
CHANGED
|
@@ -27,6 +27,14 @@ export interface ApplicationVersion {
|
|
|
27
27
|
sourceUrl: string | null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export interface Font {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
weight: string;
|
|
34
|
+
fileUpload: {
|
|
35
|
+
url: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
30
38
|
export interface Theme {
|
|
31
39
|
id: string;
|
|
32
40
|
name: string;
|
|
@@ -40,6 +48,13 @@ export interface Theme {
|
|
|
40
48
|
bodyTextColor: string;
|
|
41
49
|
bodyFont: string;
|
|
42
50
|
borderColor: string;
|
|
51
|
+
headingFontNew: Font | null;
|
|
52
|
+
heading2FontNew: Font | null;
|
|
53
|
+
bodyFontNew: Font | null;
|
|
54
|
+
backgroundImageFileUpload: {
|
|
55
|
+
url: string;
|
|
56
|
+
} | null;
|
|
57
|
+
backgroundScale: 'fit' | 'fill' | null;
|
|
43
58
|
}
|
|
44
59
|
|
|
45
60
|
export interface Device {
|