@splash-tech/jackpot-sdk 2.0.0 → 2.0.1
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/widgets/BaseWidget.d.ts +1 -0
- package/dist/widgets/BaseWidget.js +7 -5
- package/dist/widgets/footerWidget/FooterWidget.js +1 -0
- package/dist/widgets/footerWidget/types/data.d.ts +1 -0
- package/dist/widgets/shared/types.d.ts +1 -0
- package/dist/widgets/winWidget/types/data.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare abstract class BaseWidget {
|
|
|
7
7
|
protected isLaunched: boolean;
|
|
8
8
|
protected data: unknown;
|
|
9
9
|
protected position: FooterWidgetParams['position'];
|
|
10
|
+
protected maxWidth: string;
|
|
10
11
|
protected animation: WinWidgetParams['animation'];
|
|
11
12
|
protected jackpotId: string | null;
|
|
12
13
|
protected tag: string | null;
|
|
@@ -4,6 +4,7 @@ export class BaseWidget {
|
|
|
4
4
|
this.childAppOrigin = null;
|
|
5
5
|
this.isLaunched = false;
|
|
6
6
|
this.position = 'bottom';
|
|
7
|
+
this.maxWidth = '1300px';
|
|
7
8
|
this.animation = 'wheel';
|
|
8
9
|
this.jackpotId = null;
|
|
9
10
|
this.tag = null;
|
|
@@ -53,14 +54,15 @@ export class BaseWidget {
|
|
|
53
54
|
this.isLaunched = false;
|
|
54
55
|
}
|
|
55
56
|
setParamsData(params) {
|
|
56
|
-
const { mode, data, jackpotId, tag, brand, position, animation } = params;
|
|
57
|
+
const { mode, data, jackpotId, tag, brand, position, animation, maxWidth } = params;
|
|
57
58
|
this.childAppOrigin = this.getBaseUrl(mode !== null && mode !== void 0 ? mode : 'production');
|
|
58
59
|
this.data = data;
|
|
59
60
|
this.jackpotId = jackpotId !== null && jackpotId !== void 0 ? jackpotId : null;
|
|
60
61
|
this.tag = tag !== null && tag !== void 0 ? tag : null;
|
|
61
62
|
this.brand = brand !== null && brand !== void 0 ? brand : null;
|
|
62
|
-
this.position = position !== null && position !== void 0 ? position :
|
|
63
|
-
this.animation = animation !== null && animation !== void 0 ? animation :
|
|
63
|
+
this.position = position !== null && position !== void 0 ? position : this.position;
|
|
64
|
+
this.animation = animation !== null && animation !== void 0 ? animation : this.animation;
|
|
65
|
+
this.maxWidth = maxWidth !== null && maxWidth !== void 0 ? maxWidth : this.maxWidth;
|
|
64
66
|
}
|
|
65
67
|
setLaunched(launched) {
|
|
66
68
|
this.isLaunched = launched;
|
|
@@ -73,10 +75,10 @@ export class BaseWidget {
|
|
|
73
75
|
if (((_a = this.iframe) === null || _a === void 0 ? void 0 : _a.contentWindow) &&
|
|
74
76
|
this.childAppOrigin &&
|
|
75
77
|
message.data !== undefined) {
|
|
76
|
-
const { data, jackpotId, tag, brand, position } = message;
|
|
78
|
+
const { data, jackpotId, tag, brand, position, maxWidth } = message;
|
|
77
79
|
this.iframe.contentWindow.postMessage({
|
|
78
80
|
type: message.type,
|
|
79
|
-
payload: { data, jackpotId, tag, brand, position },
|
|
81
|
+
payload: { data, jackpotId, tag, brand, position, maxWidth },
|
|
80
82
|
}, this.childAppOrigin);
|
|
81
83
|
}
|
|
82
84
|
}
|