@splash-tech/jackpot-sdk 3.0.6 → 3.0.8
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.
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { FooterWidgetBaseConfig } from '../../core/types';
|
|
2
2
|
export interface FooterWidgetConfig extends FooterWidgetBaseConfig {
|
|
3
|
+
winNotification?: WinNotificationConfig;
|
|
4
|
+
}
|
|
5
|
+
export interface WinNotificationConfig {
|
|
6
|
+
show?: boolean;
|
|
7
|
+
frequency?: string;
|
|
8
|
+
duration?: string;
|
|
3
9
|
}
|
|
4
10
|
export interface FooterWidgetEvents {
|
|
5
11
|
participateChange: void;
|
|
@@ -2,9 +2,11 @@ export function mapV2FooterWidgetLaunchParams(params) {
|
|
|
2
2
|
return {
|
|
3
3
|
data: params.data,
|
|
4
4
|
onLoad: params.onLoad,
|
|
5
|
-
config: Object.assign(Object.assign(Object.assign(Object.assign({}, (params.container !== undefined
|
|
5
|
+
config: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (params.container !== undefined
|
|
6
6
|
? { container: params.container }
|
|
7
|
-
: {})), (params.position !== undefined ? { position: params.position } : {})), (params.maxWidth !== undefined ? { maxWidth: params.maxWidth } : {})), (params.height !== undefined ? { height: params.height } : {})),
|
|
7
|
+
: {})), (params.position !== undefined ? { position: params.position } : {})), (params.maxWidth !== undefined ? { maxWidth: params.maxWidth } : {})), (params.height !== undefined ? { height: params.height } : {})), (params.showLevelIcons !== undefined
|
|
8
|
+
? { showLevelIcons: params.showLevelIcons }
|
|
9
|
+
: {})),
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
12
|
export function mapV2WinWidgetLaunchParams(params) {
|
|
@@ -6,6 +6,7 @@ export declare abstract class FooterWidgetBase<TConfig extends FooterWidgetBaseC
|
|
|
6
6
|
protected position: "top" | "bottom";
|
|
7
7
|
protected maxWidth: string;
|
|
8
8
|
protected height: string;
|
|
9
|
+
protected showLevelIcons: boolean;
|
|
9
10
|
private onLoadHandler?;
|
|
10
11
|
private onLoadCalled;
|
|
11
12
|
protected abstract sendInitialData(): void;
|
|
@@ -5,6 +5,7 @@ const defaults = {
|
|
|
5
5
|
position: 'bottom',
|
|
6
6
|
maxWidth: '1300px',
|
|
7
7
|
height: '50px',
|
|
8
|
+
showLevelIcons: true,
|
|
8
9
|
};
|
|
9
10
|
export class FooterWidgetBase extends BaseWidget {
|
|
10
11
|
constructor() {
|
|
@@ -13,10 +14,11 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
13
14
|
this.position = defaults.position;
|
|
14
15
|
this.maxWidth = defaults.maxWidth;
|
|
15
16
|
this.height = defaults.height;
|
|
17
|
+
this.showLevelIcons = defaults.showLevelIcons;
|
|
16
18
|
this.onLoadCalled = false;
|
|
17
19
|
}
|
|
18
20
|
launch(params) {
|
|
19
|
-
var _a, _b, _c, _d, _e;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f;
|
|
20
22
|
if (this.isLaunched()) {
|
|
21
23
|
console.warn('Footer widget is already launched');
|
|
22
24
|
return;
|
|
@@ -29,6 +31,7 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
29
31
|
this.position = (_c = this.config.position) !== null && _c !== void 0 ? _c : defaults.position;
|
|
30
32
|
this.maxWidth = (_d = this.config.maxWidth) !== null && _d !== void 0 ? _d : defaults.maxWidth;
|
|
31
33
|
this.height = (_e = this.config.height) !== null && _e !== void 0 ? _e : defaults.height;
|
|
34
|
+
this.showLevelIcons = (_f = this.config.showLevelIcons) !== null && _f !== void 0 ? _f : defaults.showLevelIcons;
|
|
32
35
|
this.iframe = this.createIframe();
|
|
33
36
|
this.iframe = this.styleIframe(this.iframe);
|
|
34
37
|
this.iframe.src = `${this.childAppOrigin}${this.route}`;
|
|
@@ -48,6 +51,7 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
48
51
|
this.position = defaults.position;
|
|
49
52
|
this.maxWidth = defaults.maxWidth;
|
|
50
53
|
this.height = defaults.height;
|
|
54
|
+
this.showLevelIcons = defaults.showLevelIcons;
|
|
51
55
|
this.stopListening();
|
|
52
56
|
this.removeIframe();
|
|
53
57
|
}
|
package/dist/core/types.d.ts
CHANGED