@splash-tech/jackpot-sdk 3.1.4 → 3.1.6
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.
|
@@ -4,6 +4,8 @@ var IncomingEvent;
|
|
|
4
4
|
IncomingEvent["footerWidgetLoaded"] = "jackpot-footer-widget-loaded";
|
|
5
5
|
IncomingEvent["ready"] = "jackpot-footer-widget-ready";
|
|
6
6
|
IncomingEvent["participateChange"] = "jackpot-footer-widget-participate-change";
|
|
7
|
+
IncomingEvent["multiplierMinus"] = "jackpot-footer-widget-multiplier-minus";
|
|
8
|
+
IncomingEvent["multiplierPlus"] = "jackpot-footer-widget-multiplier-plus";
|
|
7
9
|
IncomingEvent["showPopup"] = "jackpot-footer-widget-popup-show";
|
|
8
10
|
IncomingEvent["hidePopup"] = "jackpot-footer-widget-popup-hide";
|
|
9
11
|
})(IncomingEvent || (IncomingEvent = {}));
|
|
@@ -52,6 +54,12 @@ export class FooterWidget extends FooterWidgetBase {
|
|
|
52
54
|
case IncomingEvent.participateChange:
|
|
53
55
|
this.emit('participateChange');
|
|
54
56
|
return true;
|
|
57
|
+
case IncomingEvent.multiplierMinus:
|
|
58
|
+
this.emit('multiplierMinus');
|
|
59
|
+
return true;
|
|
60
|
+
case IncomingEvent.multiplierPlus:
|
|
61
|
+
this.emit('multiplierPlus');
|
|
62
|
+
return true;
|
|
55
63
|
default:
|
|
56
64
|
return false;
|
|
57
65
|
}
|
|
@@ -6,6 +6,8 @@ export interface WinWidgetConfig extends WinWidgetBaseConfig {
|
|
|
6
6
|
}
|
|
7
7
|
export interface FooterWidgetEvents {
|
|
8
8
|
participateChange: void;
|
|
9
|
+
multiplierMinus: void;
|
|
10
|
+
multiplierPlus: void;
|
|
9
11
|
showPopup: void;
|
|
10
12
|
hidePopup: void;
|
|
11
13
|
}
|
|
@@ -18,6 +20,12 @@ export interface LobbyWidgetConfig {
|
|
|
18
20
|
showOptInButton?: boolean;
|
|
19
21
|
showBanner?: boolean;
|
|
20
22
|
}
|
|
23
|
+
export interface Multipliers {
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
step: number;
|
|
27
|
+
value?: number;
|
|
28
|
+
}
|
|
21
29
|
export interface LobbyWidgetData {
|
|
22
30
|
themeUrl: string;
|
|
23
31
|
termsAndConditionsUrl: string;
|
|
@@ -44,6 +52,7 @@ export interface LobbyWidgetData {
|
|
|
44
52
|
currency: string;
|
|
45
53
|
};
|
|
46
54
|
};
|
|
55
|
+
multipliers: Multipliers;
|
|
47
56
|
}
|
|
48
57
|
export interface LobbyWidgetLaunchParams {
|
|
49
58
|
config: LobbyWidgetConfig;
|
|
@@ -37,21 +37,21 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
37
37
|
console.warn('Footer widget is already launched');
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
const input = (_a = params.config) !== null && _a !== void 0 ? _a : {};
|
|
41
41
|
this.data = params.data;
|
|
42
42
|
this.onLoadHandler = params.onLoad;
|
|
43
43
|
this.onLoadCalled = false;
|
|
44
|
-
this.container = (_b =
|
|
45
|
-
this.position = (_c =
|
|
46
|
-
this.maxWidth = (_d =
|
|
47
|
-
this.height = (_e =
|
|
48
|
-
this.showLevelIcons = (_f =
|
|
49
|
-
this.showOptInButton =
|
|
50
|
-
|
|
51
|
-
const popupTopOffset = (_h = this.config.popupTopOffset) !== null && _h !== void 0 ? _h : defaults.popupTopOffset;
|
|
44
|
+
this.container = (_b = input.container) !== null && _b !== void 0 ? _b : defaults.container;
|
|
45
|
+
this.position = (_c = input.position) !== null && _c !== void 0 ? _c : defaults.position;
|
|
46
|
+
this.maxWidth = (_d = input.maxWidth) !== null && _d !== void 0 ? _d : defaults.maxWidth;
|
|
47
|
+
this.height = (_e = input.height) !== null && _e !== void 0 ? _e : defaults.height;
|
|
48
|
+
this.showLevelIcons = (_f = input.showLevelIcons) !== null && _f !== void 0 ? _f : defaults.showLevelIcons;
|
|
49
|
+
this.showOptInButton = (_g = input.showOptInButton) !== null && _g !== void 0 ? _g : defaults.showOptInButton;
|
|
50
|
+
const popupTopOffset = (_h = input.popupTopOffset) !== null && _h !== void 0 ? _h : defaults.popupTopOffset;
|
|
52
51
|
this.popupTopOffset = Number.isFinite(popupTopOffset)
|
|
53
52
|
? Math.max(0, popupTopOffset)
|
|
54
53
|
: defaults.popupTopOffset;
|
|
54
|
+
this.config = Object.assign(Object.assign({}, input), { container: this.container, position: this.position, maxWidth: this.maxWidth, height: this.height, showLevelIcons: this.showLevelIcons, showOptInButton: this.showOptInButton, popupTopOffset: this.popupTopOffset });
|
|
55
55
|
this.iframe = this.createIframe();
|
|
56
56
|
this.iframe = this.styleIframe(this.iframe);
|
|
57
57
|
this.iframe.src = `${this.childAppOrigin}${this.route}`;
|