@everymatrix/casino-engagement-suite-modal 1.36.0 → 1.36.1

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 +1 @@
1
- import{p as n,b as e}from"./p-d68e9c79.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((n=>e([["p-888fb26b",[[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],header:[1],icon:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],limitStylingAppends:[32]}]]]],n)));
1
+ import{p as n,b as i}from"./p-d68e9c79.js";(()=>{const i=import.meta.url,e={};return""!==i&&(e.resourcesUrl=new URL(".",i).href),n(e)})().then((n=>i([["p-0a5349e9",[[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}]]]],n)));
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as e,g as i}from"./p-d68e9c79.js";const n=class{constructor(e){t(this,e),this.closeModal=o(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),o=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{o.innerHTML=t,setTimeout((()=>{this.host.prepend(o)}),1)})).catch((t=>{console.log("Error ",t)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},e("div",{class:"ModalWinAnimation"}),e("div",{class:"ModalContent GradientBorder"},e("div",{class:"IconCloseContainer"},e("button",{class:"IconCloseButton",onClick:this.handleCloseClick},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Сlose modal"}))),this.contentIcon?e("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,e("div",{class:"ModalHeader"},e("h1",null,this.header)),e("div",{class:"ModalBody"},e("slot",{name:"body"})),e("div",{class:"ModalFooter"},e("slot",{name:"footer"}))))}get host(){return i(this)}};n.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';export{n as casino_engagement_suite_modal}
@@ -4,12 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f0b55429.js');
6
6
 
7
- const MODAL_TYPES = {
8
- REWARD_MODAL: 'REWARD_MODAL',
9
- TARGET_MODAL: 'TARGET_MODAL'
10
- };
11
-
12
- const casinoEngagementSuiteModalCss = ":host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg\");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}";
7
+ const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
13
8
 
14
9
  const CasinoEngagementSuiteModal = class {
15
10
  constructor(hostRef) {
@@ -24,8 +19,14 @@ const CasinoEngagementSuiteModal = class {
24
19
  */
25
20
  this.clientStylingUrl = '';
26
21
  this.device = 'Mobile';
22
+ /**
23
+ * Show win animation
24
+ */
25
+ this.showAnimation = false;
27
26
  this.limitStylingAppends = false;
28
27
  this.handleCloseClick = () => {
28
+ if (this.isLoading)
29
+ return;
29
30
  this.closeModal.emit(this.modalType);
30
31
  };
31
32
  this.setClientStyling = () => {
@@ -57,9 +58,9 @@ const CasinoEngagementSuiteModal = class {
57
58
  }
58
59
  }
59
60
  render() {
60
- return (index.h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device}` }, index.h("div", { class: "ModalContent GradientBorder" }, index.h("div", { class: 'IconCloseContainer' }, index.h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, index.h("img", { src: this.icon, alt: "\u0421lose modal" }))), this.contentIcon ? (index.h("div", { class: "ModalIcon", style: {
61
+ return (index.h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, index.h("div", { class: "ModalWinAnimation" }), index.h("div", { class: "ModalContent GradientBorder" }, index.h("div", { class: 'IconCloseContainer' }, index.h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))), this.contentIcon ? (index.h("div", { class: "ModalIcon", style: {
61
62
  background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
62
- } })) : this.modalType === MODAL_TYPES.REWARD_MODAL ? (index.h("div", { class: "ModalIcon" })) : null, index.h("div", { class: "ModalHeader" }, index.h("h1", null, this.header)), index.h("div", { class: "ModalBody" }, index.h("slot", { name: "body" })), index.h("div", { class: "ModalFooter" }, index.h("slot", { name: "footer" })))));
63
+ } })) : null, index.h("div", { class: "ModalHeader" }, index.h("h1", null, this.header)), index.h("div", { class: "ModalBody" }, index.h("slot", { name: "body" })), index.h("div", { class: "ModalFooter" }, index.h("slot", { name: "footer" })))));
63
64
  }
64
65
  get host() { return index.getElement(this); }
65
66
  };
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["casino-engagement-suite-modal.cjs",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"header":[1],"icon":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"limitStylingAppends":[32]}]]]], options);
18
+ return index.bootstrapLazy([["casino-engagement-suite-modal.cjs",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"isLoading":[1028,"is-loading"],"header":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"showAnimation":[4,"show-animation"],"limitStylingAppends":[32]}]]]], options);
19
19
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["casino-engagement-suite-modal.cjs",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"header":[1],"icon":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"limitStylingAppends":[32]}]]]], options);
17
+ return index.bootstrapLazy([["casino-engagement-suite-modal.cjs",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"isLoading":[1028,"is-loading"],"header":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"showAnimation":[4,"show-animation"],"limitStylingAppends":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,5 +1,6 @@
1
1
  :host {
2
2
  display: block;
3
+ font-family: inherit;
3
4
  }
4
5
 
5
6
  * {
@@ -66,7 +67,7 @@ button:focus {
66
67
  z-index: -1;
67
68
  }
68
69
 
69
- .ModalHeader {
70
+ .ModalHeader h1 {
70
71
  font-weight: var(--emw--font-weight-semibold, 600);
71
72
  font-size: 20px;
72
73
  margin-top: 12px;
@@ -78,8 +79,6 @@ button:focus {
78
79
  height: 44px;
79
80
  border-radius: 50%;
80
81
  background-size: cover;
81
- background-position: center;
82
- background-image: url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg");
83
82
  margin-top: 12px;
84
83
  }
85
84
 
@@ -99,15 +98,34 @@ button:focus {
99
98
  width: 100%;
100
99
  }
101
100
 
102
- .ModalOverlay.Mobile .ModalBody,
101
+ @keyframes rotate {
102
+ 100% {
103
+ transform: rotate(1turn);
104
+ }
105
+ }
106
+ .ModalOverlay .ModalWinAnimation {
107
+ display: none;
108
+ }
109
+
110
+ .ModalOverlay.ShowAnimation .ModalWinAnimation {
111
+ display: block;
112
+ position: absolute;
113
+ width: 100%;
114
+ height: 100%;
115
+ inset: 0;
116
+ background: center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;
117
+ animation: 6s rotate linear infinite;
118
+ }
119
+
103
120
  .ModalOverlay.Mobile .ModalBody {
104
121
  font-size: 14px;
105
122
  }
106
- .ModalOverlay.Mobile .ModalContent,
107
123
  .ModalOverlay.Mobile .ModalContent {
108
124
  width: 318px;
109
125
  }
110
- .ModalOverlay.Mobile .ModalHeader h1,
111
126
  .ModalOverlay.Mobile .ModalHeader h1 {
112
127
  font-size: 20px;
128
+ }
129
+ .ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation {
130
+ background-size: 400px;
113
131
  }
@@ -1,5 +1,4 @@
1
1
  import { Component, Prop, h, Event, State, Element } from '@stencil/core';
2
- import { MODAL_TYPES } from '../../utils/constants';
3
2
  export class CasinoEngagementSuiteModal {
4
3
  constructor() {
5
4
  /**
@@ -11,8 +10,14 @@ export class CasinoEngagementSuiteModal {
11
10
  */
12
11
  this.clientStylingUrl = '';
13
12
  this.device = 'Mobile';
13
+ /**
14
+ * Show win animation
15
+ */
16
+ this.showAnimation = false;
14
17
  this.limitStylingAppends = false;
15
18
  this.handleCloseClick = () => {
19
+ if (this.isLoading)
20
+ return;
16
21
  this.closeModal.emit(this.modalType);
17
22
  };
18
23
  this.setClientStyling = () => {
@@ -44,14 +49,15 @@ export class CasinoEngagementSuiteModal {
44
49
  }
45
50
  }
46
51
  render() {
47
- return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device}` },
52
+ return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` },
53
+ h("div", { class: "ModalWinAnimation" }),
48
54
  h("div", { class: "ModalContent GradientBorder" },
49
55
  h("div", { class: 'IconCloseContainer' },
50
56
  h("button", { class: "IconCloseButton", onClick: this.handleCloseClick },
51
- h("img", { src: this.icon, alt: "\u0421lose modal" }))),
57
+ h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))),
52
58
  this.contentIcon ? (h("div", { class: "ModalIcon", style: {
53
59
  background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
54
- } })) : this.modalType === MODAL_TYPES.REWARD_MODAL ? (h("div", { class: "ModalIcon" })) : null,
60
+ } })) : null,
55
61
  h("div", { class: "ModalHeader" },
56
62
  h("h1", null, this.header)),
57
63
  h("div", { class: "ModalBody" },
@@ -121,12 +127,12 @@ export class CasinoEngagementSuiteModal {
121
127
  "attribute": "is-open",
122
128
  "reflect": false
123
129
  },
124
- "header": {
125
- "type": "string",
126
- "mutable": false,
130
+ "isLoading": {
131
+ "type": "boolean",
132
+ "mutable": true,
127
133
  "complexType": {
128
- "original": "string",
129
- "resolved": "string",
134
+ "original": "boolean",
135
+ "resolved": "boolean",
130
136
  "references": {}
131
137
  },
132
138
  "required": false,
@@ -135,10 +141,10 @@ export class CasinoEngagementSuiteModal {
135
141
  "tags": [],
136
142
  "text": ""
137
143
  },
138
- "attribute": "header",
144
+ "attribute": "is-loading",
139
145
  "reflect": false
140
146
  },
141
- "icon": {
147
+ "header": {
142
148
  "type": "string",
143
149
  "mutable": false,
144
150
  "complexType": {
@@ -152,7 +158,7 @@ export class CasinoEngagementSuiteModal {
152
158
  "tags": [],
153
159
  "text": ""
154
160
  },
155
- "attribute": "icon",
161
+ "attribute": "header",
156
162
  "reflect": false
157
163
  },
158
164
  "contentIcon": {
@@ -206,6 +212,24 @@ export class CasinoEngagementSuiteModal {
206
212
  "attribute": "device",
207
213
  "reflect": false,
208
214
  "defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
215
+ },
216
+ "showAnimation": {
217
+ "type": "boolean",
218
+ "mutable": false,
219
+ "complexType": {
220
+ "original": "boolean",
221
+ "resolved": "boolean",
222
+ "references": {}
223
+ },
224
+ "required": false,
225
+ "optional": false,
226
+ "docs": {
227
+ "tags": [],
228
+ "text": "Show win animation"
229
+ },
230
+ "attribute": "show-animation",
231
+ "reflect": false,
232
+ "defaultValue": "false"
209
233
  }
210
234
  }; }
211
235
  static get states() { return {
@@ -1,11 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
 
3
- const MODAL_TYPES = {
4
- REWARD_MODAL: 'REWARD_MODAL',
5
- TARGET_MODAL: 'TARGET_MODAL'
6
- };
7
-
8
- const casinoEngagementSuiteModalCss = ":host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg\");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}";
3
+ const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
9
4
 
10
5
  const CasinoEngagementSuiteModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
6
  constructor() {
@@ -22,8 +17,14 @@ const CasinoEngagementSuiteModal$1 = /*@__PURE__*/ proxyCustomElement(class exte
22
17
  */
23
18
  this.clientStylingUrl = '';
24
19
  this.device = 'Mobile';
20
+ /**
21
+ * Show win animation
22
+ */
23
+ this.showAnimation = false;
25
24
  this.limitStylingAppends = false;
26
25
  this.handleCloseClick = () => {
26
+ if (this.isLoading)
27
+ return;
27
28
  this.closeModal.emit(this.modalType);
28
29
  };
29
30
  this.setClientStyling = () => {
@@ -55,9 +56,9 @@ const CasinoEngagementSuiteModal$1 = /*@__PURE__*/ proxyCustomElement(class exte
55
56
  }
56
57
  }
57
58
  render() {
58
- return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device}` }, h("div", { class: "ModalContent GradientBorder" }, h("div", { class: 'IconCloseContainer' }, h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, h("img", { src: this.icon, alt: "\u0421lose modal" }))), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
59
+ return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, h("div", { class: "ModalWinAnimation" }), h("div", { class: "ModalContent GradientBorder" }, h("div", { class: 'IconCloseContainer' }, h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
59
60
  background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
60
- } })) : this.modalType === MODAL_TYPES.REWARD_MODAL ? (h("div", { class: "ModalIcon" })) : null, h("div", { class: "ModalHeader" }, h("h1", null, this.header)), h("div", { class: "ModalBody" }, h("slot", { name: "body" })), h("div", { class: "ModalFooter" }, h("slot", { name: "footer" })))));
61
+ } })) : null, h("div", { class: "ModalHeader" }, h("h1", null, this.header)), h("div", { class: "ModalBody" }, h("slot", { name: "body" })), h("div", { class: "ModalFooter" }, h("slot", { name: "footer" })))));
61
62
  }
62
63
  get host() { return this; }
63
64
  static get style() { return casinoEngagementSuiteModalCss; }
@@ -65,11 +66,12 @@ const CasinoEngagementSuiteModal$1 = /*@__PURE__*/ proxyCustomElement(class exte
65
66
  "clientStyling": [513, "client-styling"],
66
67
  "clientStylingUrl": [513, "client-styling-url"],
67
68
  "isOpen": [4, "is-open"],
69
+ "isLoading": [1028, "is-loading"],
68
70
  "header": [1],
69
- "icon": [1],
70
71
  "contentIcon": [1, "content-icon"],
71
72
  "modalType": [1, "modal-type"],
72
73
  "device": [1],
74
+ "showAnimation": [4, "show-animation"],
73
75
  "limitStylingAppends": [32]
74
76
  }]);
75
77
  function defineCustomElement$1() {
@@ -1,11 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-263f8cbc.js';
2
2
 
3
- const MODAL_TYPES = {
4
- REWARD_MODAL: 'REWARD_MODAL',
5
- TARGET_MODAL: 'TARGET_MODAL'
6
- };
7
-
8
- const casinoEngagementSuiteModalCss = ":host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg\");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}";
3
+ const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
9
4
 
10
5
  const CasinoEngagementSuiteModal = class {
11
6
  constructor(hostRef) {
@@ -20,8 +15,14 @@ const CasinoEngagementSuiteModal = class {
20
15
  */
21
16
  this.clientStylingUrl = '';
22
17
  this.device = 'Mobile';
18
+ /**
19
+ * Show win animation
20
+ */
21
+ this.showAnimation = false;
23
22
  this.limitStylingAppends = false;
24
23
  this.handleCloseClick = () => {
24
+ if (this.isLoading)
25
+ return;
25
26
  this.closeModal.emit(this.modalType);
26
27
  };
27
28
  this.setClientStyling = () => {
@@ -53,9 +54,9 @@ const CasinoEngagementSuiteModal = class {
53
54
  }
54
55
  }
55
56
  render() {
56
- return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device}` }, h("div", { class: "ModalContent GradientBorder" }, h("div", { class: 'IconCloseContainer' }, h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, h("img", { src: this.icon, alt: "\u0421lose modal" }))), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
57
+ return (h("div", { class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, h("div", { class: "ModalWinAnimation" }), h("div", { class: "ModalContent GradientBorder" }, h("div", { class: 'IconCloseContainer' }, h("button", { class: "IconCloseButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))), this.contentIcon ? (h("div", { class: "ModalIcon", style: {
57
58
  background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
58
- } })) : this.modalType === MODAL_TYPES.REWARD_MODAL ? (h("div", { class: "ModalIcon" })) : null, h("div", { class: "ModalHeader" }, h("h1", null, this.header)), h("div", { class: "ModalBody" }, h("slot", { name: "body" })), h("div", { class: "ModalFooter" }, h("slot", { name: "footer" })))));
59
+ } })) : null, h("div", { class: "ModalHeader" }, h("h1", null, this.header)), h("div", { class: "ModalBody" }, h("slot", { name: "body" })), h("div", { class: "ModalFooter" }, h("slot", { name: "footer" })))));
59
60
  }
60
61
  get host() { return getElement(this); }
61
62
  };
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["casino-engagement-suite-modal",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"header":[1],"icon":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"limitStylingAppends":[32]}]]]], options);
16
+ return bootstrapLazy([["casino-engagement-suite-modal",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"isLoading":[1028,"is-loading"],"header":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"showAnimation":[4,"show-animation"],"limitStylingAppends":[32]}]]]], options);
17
17
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["casino-engagement-suite-modal",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"header":[1],"icon":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"limitStylingAppends":[32]}]]]], options);
13
+ return bootstrapLazy([["casino-engagement-suite-modal",[[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"isLoading":[1028,"is-loading"],"header":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"showAnimation":[4,"show-animation"],"limitStylingAppends":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -9,11 +9,15 @@ export declare class CasinoEngagementSuiteModal {
9
9
  */
10
10
  clientStylingUrl: string;
11
11
  isOpen: boolean;
12
+ isLoading: boolean;
12
13
  header: string;
13
- icon: string;
14
14
  contentIcon: string;
15
15
  modalType: string;
16
16
  device: "Mobile" | "Tablet" | "Desktop";
17
+ /**
18
+ * Show win animation
19
+ */
20
+ showAnimation: boolean;
17
21
  private limitStylingAppends;
18
22
  host: HTMLElement;
19
23
  closeModal: EventEmitter<any>;
@@ -18,9 +18,13 @@ export namespace Components {
18
18
  "contentIcon": string;
19
19
  "device": "Mobile" | "Tablet" | "Desktop";
20
20
  "header": string;
21
- "icon": string;
21
+ "isLoading": boolean;
22
22
  "isOpen": boolean;
23
23
  "modalType": string;
24
+ /**
25
+ * Show win animation
26
+ */
27
+ "showAnimation": boolean;
24
28
  }
25
29
  }
26
30
  declare global {
@@ -47,10 +51,14 @@ declare namespace LocalJSX {
47
51
  "contentIcon"?: string;
48
52
  "device"?: "Mobile" | "Tablet" | "Desktop";
49
53
  "header"?: string;
50
- "icon"?: string;
54
+ "isLoading"?: boolean;
51
55
  "isOpen"?: boolean;
52
56
  "modalType"?: string;
53
57
  "onCloseModal"?: (event: CustomEvent<any>) => void;
58
+ /**
59
+ * Show win animation
60
+ */
61
+ "showAnimation"?: boolean;
54
62
  }
55
63
  interface IntrinsicElements {
56
64
  "casino-engagement-suite-modal": CasinoEngagementSuiteModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-modal",
3
- "version": "1.36.0",
3
+ "version": "1.36.1",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as o,c as t,h as e,g as i}from"./p-d68e9c79.js";const n=class{constructor(e){o(this,e),this.closeModal=t(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let o=document.createElement("style");o.innerHTML=this.clientStyling,this.host.prepend(o)},this.setClientStylingURL=()=>{let o=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(o.href).then((o=>o.text())).then((o=>{t.innerHTML=o,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((o=>{console.log("Error ",o)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device}`},e("div",{class:"ModalContent GradientBorder"},e("div",{class:"IconCloseContainer"},e("button",{class:"IconCloseButton",onClick:this.handleCloseClick},e("img",{src:this.icon,alt:"Сlose modal"}))),this.contentIcon?e("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):"REWARD_MODAL"===this.modalType?e("div",{class:"ModalIcon"}):null,e("div",{class:"ModalHeader"},e("h1",null,this.header)),e("div",{class:"ModalBody"},e("slot",{name:"body"})),e("div",{class:"ModalFooter"},e("slot",{name:"footer"}))))}get host(){return i(this)}};n.style=':host{display:block}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:12px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader{font-weight:var(--emw--font-weight-semibold, 600);font-size:20px;margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;background-position:center;background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg");margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}';export{n as casino_engagement_suite_modal}