@splash-tech/jackpot-sdk 1.0.3 → 1.0.5

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/index.js CHANGED
@@ -1,36 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splashJackpot = void 0;
4
- var FooterWidget_1 = require("./widgets/footerWidget/FooterWidget");
5
- var WonJackpotWidget_1 = require("./widgets/wonJackpotWidget/WonJackpotWidget");
6
- var footerWidget = FooterWidget_1.FooterWidget.getInstance();
7
- var wonJackpotWidget = WonJackpotWidget_1.WonJackpotWidget.getInstance();
8
- exports.splashJackpot = {
1
+ import { FooterWidget } from './widgets/footerWidget/FooterWidget';
2
+ import { WonJackpotWidget } from './widgets/wonJackpotWidget/WonJackpotWidget';
3
+ const footerWidget = FooterWidget.getInstance();
4
+ const wonJackpotWidget = WonJackpotWidget.getInstance();
5
+ export const splashJackpot = {
9
6
  footer: {
10
- isLaunched: function () { return footerWidget.isWidgetLaunched(); },
11
- launch: function (params) { return footerWidget.launchFooter(params); },
12
- updateData: function (partialData) { return footerWidget.updateData(partialData); },
13
- showPopup: function () { return footerWidget.showPopup(); },
14
- hidePopup: function () { return footerWidget.hidePopup(); },
15
- destroy: function () { return footerWidget.destroyFooter(); },
16
- addEventListener: function (event, handler) {
17
- return footerWidget.addEventListener(event, handler);
18
- },
19
- removeEventListener: function (event, handler) {
20
- return footerWidget.removeEventListener(event, handler);
21
- },
7
+ isLaunched: () => footerWidget.isWidgetLaunched(),
8
+ launch: (params) => footerWidget.launchFooter(params),
9
+ updateData: (partialData) => footerWidget.updateData(partialData),
10
+ showPopup: () => footerWidget.showPopup(),
11
+ hidePopup: () => footerWidget.hidePopup(),
12
+ destroy: () => footerWidget.destroyFooter(),
13
+ addEventListener: (event, handler) => footerWidget.addEventListener(event, handler),
14
+ removeEventListener: (event, handler) => footerWidget.removeEventListener(event, handler),
22
15
  },
23
16
  wonJackpot: {
24
- isLaunched: function () { return wonJackpotWidget.isWidgetLaunched(); },
25
- launch: function (params) {
26
- return wonJackpotWidget.launchWonJackpot(params);
27
- },
28
- destroy: function () { return wonJackpotWidget.destroyWonJackpot(); },
29
- addEventListener: function (event, handler) {
30
- return wonJackpotWidget.addEventListener(event, handler);
31
- },
32
- removeEventListener: function (event, handler) {
33
- return wonJackpotWidget.removeEventListener(event, handler);
34
- },
17
+ isLaunched: () => wonJackpotWidget.isWidgetLaunched(),
18
+ launch: (params) => wonJackpotWidget.launchWonJackpot(params),
19
+ destroy: () => wonJackpotWidget.destroyWonJackpot(),
20
+ addEventListener: (event, handler) => wonJackpotWidget.addEventListener(event, handler),
21
+ removeEventListener: (event, handler) => wonJackpotWidget.removeEventListener(event, handler),
35
22
  },
36
23
  };
package/dist/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,14 +1,15 @@
1
- import { WidgetEventHandler } from './shared/types';
1
+ import { SDKMode, WidgetEventHandler } from './shared/types';
2
2
  export declare abstract class BaseWidget {
3
3
  protected iframe: HTMLIFrameElement | null;
4
4
  protected isLaunched: boolean;
5
5
  private listeners;
6
- protected emit(event: string, payload?: unknown): void;
7
- addEventListener(event: string, handler: WidgetEventHandler): void;
8
- removeEventListener(event: string, handler: WidgetEventHandler): void;
6
+ protected getBaseUrl(mode: SDKMode): string;
9
7
  protected createIframe(): HTMLIFrameElement;
10
8
  protected appendIframe(iframe: HTMLIFrameElement, container?: string): void;
11
9
  protected removeIframe(): void;
12
10
  protected setLaunched(launched: boolean): void;
13
11
  isWidgetLaunched(): boolean;
12
+ addEventListener(event: string, handler: WidgetEventHandler): void;
13
+ removeEventListener(event: string, handler: WidgetEventHandler): void;
14
+ protected emit(event: string, payload?: unknown): void;
14
15
  }
@@ -1,41 +1,35 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseWidget = void 0;
4
- var BaseWidget = /** @class */ (function () {
5
- function BaseWidget() {
1
+ export class BaseWidget {
2
+ constructor() {
6
3
  this.iframe = null;
7
4
  this.isLaunched = false;
8
5
  this.listeners = new Map();
9
6
  }
10
- BaseWidget.prototype.emit = function (event, payload) {
11
- var handlers = this.listeners.get(event);
12
- handlers === null || handlers === void 0 ? void 0 : handlers.forEach(function (handler) { return handler(); });
13
- };
14
- BaseWidget.prototype.addEventListener = function (event, handler) {
15
- if (!this.listeners.has(event)) {
16
- this.listeners.set(event, []);
7
+ getBaseUrl(mode) {
8
+ switch (mode) {
9
+ case 'local':
10
+ return 'http://localhost:4207';
11
+ case 'dev':
12
+ return 'https://jackpot-widget-dev.splash.tech';
13
+ case 'staging':
14
+ return 'https://jackpot-widget-staging.splash.tech';
15
+ case 'production':
16
+ default:
17
+ return 'https://jackpot-widget.splash.tech';
17
18
  }
18
- this.listeners.get(event).push(handler);
19
- };
20
- BaseWidget.prototype.removeEventListener = function (event, handler) {
21
- var handlers = this.listeners.get(event);
22
- if (!handlers)
23
- return;
24
- this.listeners.set(event, handlers.filter(function (h) { return h !== handler; }));
25
- };
26
- BaseWidget.prototype.createIframe = function () {
27
- var iframe = document.createElement('iframe');
19
+ }
20
+ createIframe() {
21
+ const iframe = document.createElement('iframe');
28
22
  iframe.style.border = 'none';
29
23
  iframe.style.position = 'fixed';
30
24
  iframe.style.zIndex = '999999';
31
25
  return iframe;
32
- };
33
- BaseWidget.prototype.appendIframe = function (iframe, container) {
34
- var targetContainer = container
26
+ }
27
+ appendIframe(iframe, container) {
28
+ const targetContainer = container
35
29
  ? document.querySelector(container)
36
30
  : document.body;
37
31
  if (!targetContainer) {
38
- console.error("Container \"".concat(container, "\" not found"));
32
+ console.error(`Container "${container}" not found`);
39
33
  document.body.appendChild(iframe);
40
34
  }
41
35
  else {
@@ -45,20 +39,34 @@ var BaseWidget = /** @class */ (function () {
45
39
  }
46
40
  targetContainer.appendChild(iframe);
47
41
  }
48
- };
49
- BaseWidget.prototype.removeIframe = function () {
42
+ }
43
+ removeIframe() {
50
44
  if (this.iframe && this.iframe.parentNode) {
51
45
  this.iframe.parentNode.removeChild(this.iframe);
52
46
  this.iframe = null;
53
47
  this.isLaunched = false;
54
48
  }
55
- };
56
- BaseWidget.prototype.setLaunched = function (launched) {
49
+ }
50
+ setLaunched(launched) {
57
51
  this.isLaunched = launched;
58
- };
59
- BaseWidget.prototype.isWidgetLaunched = function () {
52
+ }
53
+ isWidgetLaunched() {
60
54
  return this.isLaunched;
61
- };
62
- return BaseWidget;
63
- }());
64
- exports.BaseWidget = BaseWidget;
55
+ }
56
+ addEventListener(event, handler) {
57
+ if (!this.listeners.has(event)) {
58
+ this.listeners.set(event, []);
59
+ }
60
+ this.listeners.get(event).push(handler);
61
+ }
62
+ removeEventListener(event, handler) {
63
+ const handlers = this.listeners.get(event);
64
+ if (!handlers)
65
+ return;
66
+ this.listeners.set(event, handlers.filter((h) => h !== handler));
67
+ }
68
+ emit(event, payload) {
69
+ const handlers = this.listeners.get(event);
70
+ handlers === null || handlers === void 0 ? void 0 : handlers.forEach((handler) => handler());
71
+ }
72
+ }
@@ -1,91 +1,71 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.FooterWidget = void 0;
19
- var BaseWidget_1 = require("../BaseWidget");
20
- var _environment_1 = require("../../environments/environment.prod.js");
21
- var event_1 = require("./types/event");
22
- var FooterWidget = /** @class */ (function (_super) {
23
- __extends(FooterWidget, _super);
24
- function FooterWidget() {
25
- var _this = _super.call(this) || this;
26
- _this.childAppOrigin = _environment_1.environment.jackpotWidgetUrl;
1
+ import { BaseWidget } from '../BaseWidget';
2
+ import { FooterIframeIncomingEvent, FooterIframeOutgoingEvent, } from './types/event';
3
+ export class FooterWidget extends BaseWidget {
4
+ constructor() {
5
+ super();
27
6
  // listen for messages of an app that is inside iframe
28
- _this.childMessageHandler = function (event) {
7
+ this.childMessageHandler = (event) => {
29
8
  var _a, _b;
30
- if (!((_a = _this.iframe) === null || _a === void 0 ? void 0 : _a.src))
9
+ if (!((_a = this.iframe) === null || _a === void 0 ? void 0 : _a.src))
31
10
  return;
32
- if (event.origin !== _this.childAppOrigin)
11
+ if (event.origin !== this.childAppOrigin)
33
12
  return;
34
13
  switch ((_b = event.data) === null || _b === void 0 ? void 0 : _b.type) {
35
- case event_1.FooterIframeIncomingEvent.footerWidgetLoaded:
36
- _this.sendDataToChild(event_1.FooterIframeOutgoingEvent.footerWidgetDataInitial, _this.data);
14
+ case FooterIframeIncomingEvent.footerWidgetLoaded:
15
+ this.sendDataToChild(FooterIframeOutgoingEvent.footerWidgetDataInitial, this.data);
37
16
  break;
38
- case event_1.FooterIframeIncomingEvent.showPopup: {
39
- _this.emit('showPopup');
40
- _this.showPopup();
17
+ case FooterIframeIncomingEvent.showPopup: {
18
+ this.emit('showPopup');
19
+ this.showPopup();
41
20
  break;
42
21
  }
43
- case event_1.FooterIframeIncomingEvent.hidePopup: {
44
- _this.emit('hidePopup');
45
- _this.hidePopup();
22
+ case FooterIframeIncomingEvent.hidePopup: {
23
+ this.emit('hidePopup');
24
+ this.hidePopup();
46
25
  break;
47
26
  }
48
- case event_1.FooterIframeIncomingEvent.participateChange: {
49
- _this.emit('participateChange');
27
+ case FooterIframeIncomingEvent.participateChange: {
28
+ this.emit('participateChange');
50
29
  break;
51
30
  }
52
31
  }
53
32
  };
54
- return _this;
55
33
  }
56
- FooterWidget.getInstance = function () {
34
+ static getInstance() {
57
35
  if (!FooterWidget.instance) {
58
36
  FooterWidget.instance = new FooterWidget();
59
37
  }
60
38
  return FooterWidget.instance;
61
- };
62
- FooterWidget.prototype.sendDataToChild = function (type, data) {
39
+ }
40
+ sendDataToChild(type, data) {
63
41
  var _a;
64
42
  if (((_a = this.iframe) === null || _a === void 0 ? void 0 : _a.contentWindow) && data !== undefined) {
65
43
  this.iframe.contentWindow.postMessage({
66
- type: type,
44
+ type,
67
45
  payload: data,
68
46
  }, this.childAppOrigin);
69
47
  }
70
- };
71
- FooterWidget.prototype.launchFooter = function (params) {
48
+ }
49
+ launchFooter(params) {
50
+ var _a;
72
51
  if (this.isWidgetLaunched()) {
73
52
  console.warn('Footer widget is already launched');
74
53
  return;
75
54
  }
76
55
  this.data = params.data;
56
+ this.childAppOrigin = this.getBaseUrl((_a = params.mode) !== null && _a !== void 0 ? _a : 'production');
77
57
  this.iframe = this.createIframe();
78
58
  this.iframe.style.bottom = '0';
79
59
  this.iframe.style.left = '0';
80
60
  this.iframe.style.width = '100%';
81
61
  this.iframe.style.height = '50px';
82
62
  this.iframe.style.zIndex = '999999'; // 6
83
- this.iframe.src = "".concat(_environment_1.environment.jackpotWidgetUrl, "/footer-widget");
63
+ this.iframe.src = `${this.childAppOrigin}/footer-widget`;
84
64
  this.appendIframe(this.iframe, params.container);
85
65
  this.setLaunched(true);
86
66
  window.addEventListener('message', this.childMessageHandler);
87
- };
88
- FooterWidget.prototype.updateData = function (partialData) {
67
+ }
68
+ updateData(partialData) {
89
69
  // must be a non-null object
90
70
  if (!partialData || typeof partialData !== 'object') {
91
71
  console.error('FooterWidget.updateData: invalid payload', partialData);
@@ -96,22 +76,20 @@ var FooterWidget = /** @class */ (function (_super) {
96
76
  console.error('FooterWidget.updateData: empty object provided');
97
77
  return;
98
78
  }
99
- this.sendDataToChild(event_1.FooterIframeOutgoingEvent.footerWidgetDataUpdated, partialData);
100
- };
101
- FooterWidget.prototype.showPopup = function () {
79
+ this.sendDataToChild(FooterIframeOutgoingEvent.footerWidgetDataUpdated, partialData);
80
+ }
81
+ showPopup() {
102
82
  if (this.iframe) {
103
83
  this.iframe.style.height = '100%';
104
84
  }
105
- };
106
- FooterWidget.prototype.hidePopup = function () {
85
+ }
86
+ hidePopup() {
107
87
  if (this.iframe) {
108
88
  this.iframe.style.height = '50px';
109
89
  }
110
- };
111
- FooterWidget.prototype.destroyFooter = function () {
90
+ }
91
+ destroyFooter() {
112
92
  window.removeEventListener('message', this.childMessageHandler);
113
93
  this.removeIframe();
114
- };
115
- return FooterWidget;
116
- }(BaseWidget_1.BaseWidget));
117
- exports.FooterWidget = FooterWidget;
94
+ }
95
+ }
@@ -1,6 +1,8 @@
1
+ import { SDKMode } from 'src/widgets/shared/types';
1
2
  export interface FooterWidgetParams {
2
- container?: string;
3
3
  data: unknown;
4
+ mode?: SDKMode;
5
+ container?: string;
4
6
  }
5
7
  export interface FooterWidgetData {
6
8
  group: JackpotGroupResponse;
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FooterIframeOutgoingEvent = exports.FooterIframeIncomingEvent = void 0;
4
1
  // events emitted by app inside iframe to the SDK - Internal use
5
- var FooterIframeIncomingEvent;
2
+ export var FooterIframeIncomingEvent;
6
3
  (function (FooterIframeIncomingEvent) {
7
4
  FooterIframeIncomingEvent["footerWidgetLoaded"] = "jackpot-footer-widget-loaded";
8
5
  FooterIframeIncomingEvent["participateChange"] = "jackpot-footer-widget-participate-change";
9
6
  FooterIframeIncomingEvent["showPopup"] = "jackpot-footer-widget-popup-show";
10
7
  FooterIframeIncomingEvent["hidePopup"] = "jackpot-footer-widget-popup-hide";
11
- })(FooterIframeIncomingEvent || (exports.FooterIframeIncomingEvent = FooterIframeIncomingEvent = {}));
8
+ })(FooterIframeIncomingEvent || (FooterIframeIncomingEvent = {}));
12
9
  // events emitted by SDK to the app inside iframe- Internal use
13
- var FooterIframeOutgoingEvent;
10
+ export var FooterIframeOutgoingEvent;
14
11
  (function (FooterIframeOutgoingEvent) {
15
12
  FooterIframeOutgoingEvent["footerWidgetDataInitial"] = "jackpot-footer-widget-data-initial";
16
13
  FooterIframeOutgoingEvent["footerWidgetDataUpdated"] = "jackpot-footer-widget-data-updated";
17
- })(FooterIframeOutgoingEvent || (exports.FooterIframeOutgoingEvent = FooterIframeOutgoingEvent = {}));
14
+ })(FooterIframeOutgoingEvent || (FooterIframeOutgoingEvent = {}));
@@ -1 +1,2 @@
1
+ export type SDKMode = 'local' | 'dev' | 'staging' | 'production';
1
2
  export type WidgetEventHandler = () => void;
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,54 +1,34 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WonJackpotWidget = void 0;
19
- var BaseWidget_1 = require("../BaseWidget");
20
- var _environment_1 = require("../../environments/environment.prod.js");
21
- var event_1 = require("./types/event");
22
- var WonJackpotWidget = /** @class */ (function (_super) {
23
- __extends(WonJackpotWidget, _super);
24
- function WonJackpotWidget() {
25
- var _this = _super.call(this) || this;
26
- _this.childAppOrigin = _environment_1.environment.jackpotWidgetUrl;
27
- _this.childMessageHandler = function (event) {
1
+ import { BaseWidget } from '../BaseWidget';
2
+ import { WonJackpotIframeIncomingEvent } from './types/event';
3
+ export class WonJackpotWidget extends BaseWidget {
4
+ constructor() {
5
+ super();
6
+ this.childMessageHandler = (event) => {
28
7
  var _a, _b;
29
- if (!((_a = _this.iframe) === null || _a === void 0 ? void 0 : _a.src))
8
+ if (!((_a = this.iframe) === null || _a === void 0 ? void 0 : _a.src))
30
9
  return;
31
- if (event.origin !== _this.childAppOrigin)
10
+ if (event.origin !== this.childAppOrigin)
32
11
  return;
33
12
  switch ((_b = event.data) === null || _b === void 0 ? void 0 : _b.type) {
34
- case event_1.WonJackpotIframeIncomingEvent.jackpotWinClose:
35
- _this.emit('close');
13
+ case WonJackpotIframeIncomingEvent.jackpotWinClose:
14
+ this.emit('close');
36
15
  break;
37
16
  }
38
17
  };
39
- return _this;
40
18
  }
41
- WonJackpotWidget.getInstance = function () {
19
+ static getInstance() {
42
20
  if (!WonJackpotWidget.instance) {
43
21
  WonJackpotWidget.instance = new WonJackpotWidget();
44
22
  }
45
23
  return WonJackpotWidget.instance;
46
- };
47
- WonJackpotWidget.prototype.launchWonJackpot = function (params) {
24
+ }
25
+ launchWonJackpot(params) {
26
+ var _a;
48
27
  if (this.isWidgetLaunched()) {
49
28
  console.warn('Won Jackpot widget is already launched');
50
29
  return;
51
30
  }
31
+ this.childAppOrigin = this.getBaseUrl((_a = params.mode) !== null && _a !== void 0 ? _a : 'production');
52
32
  this.iframe = this.createIframe();
53
33
  this.iframe.style.top = '0';
54
34
  this.iframe.style.left = '0';
@@ -56,15 +36,13 @@ var WonJackpotWidget = /** @class */ (function (_super) {
56
36
  this.iframe.style.height = '100%';
57
37
  this.iframe.style.zIndex = '9999999'; // 7
58
38
  this.iframe.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
59
- this.iframe.src = "".concat(_environment_1.environment.jackpotWidgetUrl, "/win-animation-widget");
39
+ this.iframe.src = `${this.childAppOrigin}/win-animation-widget`;
60
40
  this.appendIframe(this.iframe, params.container);
61
41
  this.setLaunched(true);
62
42
  window.addEventListener('message', this.childMessageHandler);
63
- };
64
- WonJackpotWidget.prototype.destroyWonJackpot = function () {
43
+ }
44
+ destroyWonJackpot() {
65
45
  window.removeEventListener('message', this.childMessageHandler);
66
46
  this.removeIframe();
67
- };
68
- return WonJackpotWidget;
69
- }(BaseWidget_1.BaseWidget));
70
- exports.WonJackpotWidget = WonJackpotWidget;
47
+ }
48
+ }
@@ -1,4 +1,6 @@
1
+ import { SDKMode } from 'src/widgets/shared/types';
1
2
  export interface WonJackpotWidgetParams {
2
- container?: string;
3
3
  data: unknown;
4
+ mode?: SDKMode;
5
+ container?: string;
4
6
  }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WonJackpotIframeIncomingEvent = void 0;
4
1
  // events emitted by app inside iframe to the SDK - Internal use
5
- var WonJackpotIframeIncomingEvent;
2
+ export var WonJackpotIframeIncomingEvent;
6
3
  (function (WonJackpotIframeIncomingEvent) {
7
4
  WonJackpotIframeIncomingEvent["footerWidgetLoaded"] = "jackpot-footer-widget-loaded";
8
5
  WonJackpotIframeIncomingEvent["participateChange"] = "jackpot-footer-widget-participate-change";
9
6
  WonJackpotIframeIncomingEvent["showPopup"] = "jackpot-footer-widget-popup-show";
10
7
  WonJackpotIframeIncomingEvent["jackpotWinClose"] = "jackpot-win-close";
11
- })(WonJackpotIframeIncomingEvent || (exports.WonJackpotIframeIncomingEvent = WonJackpotIframeIncomingEvent = {}));
8
+ })(WonJackpotIframeIncomingEvent || (WonJackpotIframeIncomingEvent = {}));
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@splash-tech/jackpot-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "SDK for managing jackpot widgets in iframes",
5
- "type": "module",
6
5
  "main": "dist/index.js",
7
6
  "types": "dist/index.d.ts",
8
7
  "files": [
@@ -11,10 +10,10 @@
11
10
  ],
12
11
  "scripts": {
13
12
  "clean": "rm -rf dist",
14
- "build:local": "npm run clean && tsc -p tsconfig.build.local.json && npx tsc-alias -p tsconfig.build.local.json",
15
- "build:dev": "npm run clean && tsc -p tsconfig.build.dev.json && npx tsc-alias -p tsconfig.build.dev.json",
16
- "build:staging": "npm run clean && tsc -p tsconfig.build.staging.json && npx tsc-alias -p tsconfig.build.staging.json",
17
- "build:prod": "npm run clean && tsc -p tsconfig.build.prod.json && npx tsc-alias -p tsconfig.build.prod.json",
13
+ "build:local": "npm run clean && tsc",
14
+ "build:dev": "npm run clean && tsc",
15
+ "build:staging": "npm run clean && tsc",
16
+ "build:prod": "npm run clean && tsc",
18
17
  "prepublishOnly": "npm run build:prod",
19
18
  "test": "echo \"Error: no test specified\" && exit 1"
20
19
  },
@@ -28,10 +27,6 @@
28
27
  "license": "MIT",
29
28
  "devDependencies": {
30
29
  "@types/node": "^20.11.19",
31
- "ts-loader": "^9.5.4",
32
- "tsc-alias": "^1.8.16",
33
- "typescript": "^5.8.2",
34
- "webpack": "^5.105.3",
35
- "webpack-cli": "^6.0.1"
30
+ "typescript": "^5.8.2"
36
31
  }
37
32
  }
@@ -1,4 +0,0 @@
1
- export declare const environment: {
2
- production: boolean;
3
- jackpotWidgetUrl: string;
4
- };
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.environment = void 0;
4
- exports.environment = {
5
- production: true,
6
- jackpotWidgetUrl: 'https://jackpot-widget.splash.tech',
7
- };