@splash-tech/jackpot-sdk 3.1.2 → 3.1.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.
|
@@ -2,10 +2,12 @@ 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(Object.assign(Object.assign({}, (params.container !== undefined
|
|
5
|
+
config: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (params.container !== undefined
|
|
6
6
|
? { container: params.container }
|
|
7
7
|
: {})), (params.position !== undefined ? { position: params.position } : {})), (params.maxWidth !== undefined ? { maxWidth: params.maxWidth } : {})), (params.height !== undefined ? { height: params.height } : {})), (params.showLevelIcons !== undefined
|
|
8
8
|
? { showLevelIcons: params.showLevelIcons }
|
|
9
|
+
: {})), (params.showOptInButton !== undefined
|
|
10
|
+
? { showOptInButton: params.showOptInButton }
|
|
9
11
|
: {})), (params.popupTopOffset !== undefined
|
|
10
12
|
? { popupTopOffset: params.popupTopOffset }
|
|
11
13
|
: {})),
|
|
@@ -7,6 +7,7 @@ export declare abstract class FooterWidgetBase<TConfig extends FooterWidgetBaseC
|
|
|
7
7
|
protected maxWidth: string;
|
|
8
8
|
protected height: string;
|
|
9
9
|
protected showLevelIcons: boolean;
|
|
10
|
+
protected showOptInButton: boolean;
|
|
10
11
|
private onLoadHandler?;
|
|
11
12
|
private onLoadCalled;
|
|
12
13
|
private popupTopOffset;
|
|
@@ -6,6 +6,7 @@ const defaults = {
|
|
|
6
6
|
maxWidth: '1300px',
|
|
7
7
|
height: '50px',
|
|
8
8
|
showLevelIcons: true,
|
|
9
|
+
showOptInButton: true,
|
|
9
10
|
popupTopOffset: 0,
|
|
10
11
|
};
|
|
11
12
|
export class FooterWidgetBase extends BaseWidget {
|
|
@@ -16,6 +17,7 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
16
17
|
this.maxWidth = defaults.maxWidth;
|
|
17
18
|
this.height = defaults.height;
|
|
18
19
|
this.showLevelIcons = defaults.showLevelIcons;
|
|
20
|
+
this.showOptInButton = defaults.showOptInButton;
|
|
19
21
|
this.onLoadCalled = false;
|
|
20
22
|
this.popupTopOffset = defaults.popupTopOffset;
|
|
21
23
|
this.popupExpanded = false;
|
|
@@ -30,7 +32,7 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
launch(params) {
|
|
33
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
34
36
|
if (this.isLaunched()) {
|
|
35
37
|
console.warn('Footer widget is already launched');
|
|
36
38
|
return;
|
|
@@ -44,7 +46,9 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
44
46
|
this.maxWidth = (_d = this.config.maxWidth) !== null && _d !== void 0 ? _d : defaults.maxWidth;
|
|
45
47
|
this.height = (_e = this.config.height) !== null && _e !== void 0 ? _e : defaults.height;
|
|
46
48
|
this.showLevelIcons = (_f = this.config.showLevelIcons) !== null && _f !== void 0 ? _f : defaults.showLevelIcons;
|
|
47
|
-
|
|
49
|
+
this.showOptInButton =
|
|
50
|
+
(_g = this.config.showOptInButton) !== null && _g !== void 0 ? _g : defaults.showOptInButton;
|
|
51
|
+
const popupTopOffset = (_h = this.config.popupTopOffset) !== null && _h !== void 0 ? _h : defaults.popupTopOffset;
|
|
48
52
|
this.popupTopOffset = Number.isFinite(popupTopOffset)
|
|
49
53
|
? Math.max(0, popupTopOffset)
|
|
50
54
|
: defaults.popupTopOffset;
|
|
@@ -69,6 +73,7 @@ export class FooterWidgetBase extends BaseWidget {
|
|
|
69
73
|
this.maxWidth = defaults.maxWidth;
|
|
70
74
|
this.height = defaults.height;
|
|
71
75
|
this.showLevelIcons = defaults.showLevelIcons;
|
|
76
|
+
this.showOptInButton = defaults.showOptInButton;
|
|
72
77
|
this.stopListening();
|
|
73
78
|
this.removeIframe();
|
|
74
79
|
}
|
package/dist/core/types.d.ts
CHANGED