@splash-tech/jackpot-sdk 3.0.6 → 3.0.7

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/README.md CHANGED
@@ -48,13 +48,14 @@ splashJackpot.winWidget.launch({
48
48
 
49
49
  # Widget Launch Parameters
50
50
 
51
- | Parameter | Type | Default | Description |
52
- | --------- | ------ | ------------- | --------------------------------------------------------- |
53
- | data | object | null | Widget data from Splash backend |
54
- | container | string | document.body | CSS selector where widget will be injected |
55
- | mode | string | production | SDK environment (`local`, `dev`, `staging`, `production`) |
56
- | maxWidth | string | '1300px' | Maximum width of the footer widget |
57
- | height | string | '50px' | Height of the footer widget |
51
+ | Parameter | Type | Default | Description |
52
+ | -------------- | ------- | ------------- | --------------------------------------------------------- |
53
+ | data | object | null | Widget data from Splash backend |
54
+ | container | string | document.body | CSS selector where widget will be injected |
55
+ | mode | string | production | SDK environment (`local`, `dev`, `staging`, `production`) |
56
+ | maxWidth | string | '1300px' | Maximum width of the footer widget |
57
+ | height | string | '50px' | Height of the footer widget |
58
+ | showLevelIcons | boolean | true | Whether to show jackpot level icons in the footer widget |
58
59
 
59
60
  Example:
60
61
 
@@ -65,6 +66,7 @@ splashJackpot.footerWidget.launch({
65
66
  mode: 'production',
66
67
  maxWidth: '100%',
67
68
  height: '80px',
69
+ showLevelIcons: true,
68
70
  });
69
71
  ```
70
72
 
@@ -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) {
@@ -7,6 +7,7 @@ export interface V2FooterWidgetLaunchParams {
7
7
  position?: FooterWidgetBaseConfig['position'];
8
8
  maxWidth?: string;
9
9
  height?: string;
10
+ showLevelIcons?: boolean;
10
11
  container?: string;
11
12
  onLoad?: () => void;
12
13
  }
@@ -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
  }
@@ -10,6 +10,7 @@ export interface FooterWidgetBaseConfig {
10
10
  position?: 'top' | 'bottom';
11
11
  maxWidth?: string;
12
12
  height?: string;
13
+ showLevelIcons?: boolean;
13
14
  }
14
15
  export interface WinWidgetBaseConfig {
15
16
  container?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splash-tech/jackpot-sdk",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "SDK for managing jackpot widgets in iframes",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",