@everymatrix/casino-header-controller 0.0.93 → 0.0.94

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/index.html CHANGED
@@ -21,10 +21,11 @@
21
21
  </style>
22
22
 
23
23
  <div class="webcomponent">
24
- <casino-header-controller session userid
24
+ <casino-header-controller session userid
25
25
  cmsmenuurl="https://widgets.everymatrix.com/apijson/en/menu?device=dk&env=stage&language=en&platform=dk"
26
- cmshamburgermenuurl="https://widgets.everymatrix.com/apijson/en/hamburger-menu?device=dk&env=stage&language=en&platform=dk"></casino-header-controller>
26
+ cmshamburgermenuurl="https://widgets.everymatrix.com/apijson/en/hamburger-menu?device=dk&env=stage&language=en&platform=dk"
27
+ profileurl="https://demo-api.stage.norway.everymatrix.com/v1/player/"></casino-header-controller>
27
28
  </div>
28
-
29
+
29
30
  </body>
30
- </html>
31
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "main": "dist/casino-header-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "4bc7902c67d764d4f54c0a26014157260c5f314f"
40
+ "gitHead": "22c01bfe195ffacb2177610d0728c9f876e3a057"
41
41
  }
@@ -5,6 +5,7 @@
5
5
 
6
6
  import '@everymatrix/casino-slider';
7
7
  import '@everymatrix/casino-hamburger-menu';
8
+ import '@everymatrix/player-account-balance-modal';
8
9
  import everymatrixLogo from './images/everymatrix-logo-white.png';
9
10
  import sliderPlaceholderImage from './images/slider.png';
10
11
 
@@ -12,6 +13,7 @@
12
13
  export let userid:String = '';
13
14
  export let cmsmenuurl:string = '';
14
15
  export let cmshamburgermenuurl:string = '';
16
+ export let profileurl:string = '';
15
17
 
16
18
  const genericIcon = `<svg version="1.1" fill="#fff" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width: 30px; color: #fff;" x="0px" y="0px"
17
19
  viewBox="0 0 384.971 384.971" style="enable-background:new 0 0 384.971 384.971;" xml:space="preserve">
@@ -26,7 +28,6 @@
26
28
  let mainMenuArray = [];
27
29
  let secondaryMenuArray = [];
28
30
  let languagesArray = ['EN', 'DE'];
29
- let balanceArray = ['1.650.944,353 €', '6.300,453 Ron'];
30
31
 
31
32
  let mobileView:boolean = false;
32
33
  let userAgent:string = window.navigator.userAgent;
@@ -38,6 +39,12 @@
38
39
  // use for medium devices styling, if necessary
39
40
  // const mediaQuery = window.matchMedia('(min-width: 768px)');
40
41
  let hamburgerMenuActive: boolean = false;
42
+
43
+ let totalBalance:string = '';
44
+ let cashBalance:string = '';
45
+ let bonusBalance:string = '';
46
+ let currency:string = '';
47
+
41
48
  const menuAction = (data) => {
42
49
  switch (data) {
43
50
 
@@ -57,10 +64,6 @@
57
64
  console.log("lobby");
58
65
  break;
59
66
 
60
- case 'balance':
61
- console.log("balance");
62
- break;
63
-
64
67
  case 'myaccount':
65
68
  console.log("myaccount");
66
69
  window.postMessage({ type: 'PlayerAccountMenuActive' }, window.location.href);
@@ -141,7 +144,7 @@
141
144
  window.addEventListener('message', messageHandler, false);
142
145
  if (isMobile(userAgent)) {
143
146
  mobileView = true;
144
- }
147
+ }
145
148
 
146
149
  return () => {
147
150
  window.removeEventListener('message', messageHandler);
@@ -149,7 +152,7 @@
149
152
  });
150
153
 
151
154
  $: session && setSession();
152
- $: cmsmenuurl && cmshamburgermenuurl && initialLoad();
155
+ $: cmsmenuurl && cmshamburgermenuurl && profileurl && initialLoad();
153
156
  </script>
154
157
 
155
158
  {#if isLoggedIn}
@@ -167,15 +170,7 @@
167
170
 
168
171
  <div class="HeaderTopActions">
169
172
  <div class="HeaderItemsMenu PrimaryMenu">
170
- <select class="Item ItemBalance" on:change={()=>menuAction('balance')}>
171
- {#each balanceArray as val}
172
- {#if val.includes('€')}
173
- <option selected>{val}</option>
174
- {:else}
175
- <option>{val}</option>
176
- {/if}
177
- {/each}
178
- </select>
173
+ <player-account-balance-modal sessionid={sessionID} playerid={playerID} {profileurl} />
179
174
  <div class="Item ItemDeposit" on:click={()=>menuAction('deposit')}>Deposit</div>
180
175
  <div class="Item ItemAccount" on:click={()=>menuAction('myaccount')}>
181
176
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429"><defs><style>.a{fill:#fff;}</style></defs><g transform="translate(-8 -4)"><path class="a" d="M15.5,4a3.75,3.75,0,1,0,3.75,3.75A3.761,3.761,0,0,0,15.5,4Zm0,1.429A2.321,2.321,0,1,1,13.179,7.75,2.311,2.311,0,0,1,15.5,5.429Zm0,6.429A7.7,7.7,0,0,0,8,19.714a.714.714,0,0,0,.714.714H22.286A.714.714,0,0,0,23,19.714,7.7,7.7,0,0,0,15.5,11.857Zm0,1.429A6.18,6.18,0,0,1,21.5,19H9.5A6.18,6.18,0,0,1,15.5,13.286Z" transform="translate(0 0)"/></g></svg>
@@ -196,15 +191,7 @@
196
191
  </nav>
197
192
  <div class="HeaderTopActions">
198
193
  <div class="HeaderItemsMenu PrimaryMenu">
199
- <select class="Item ItemBalance" on:change={()=>menuAction('balance')}>
200
- {#each balanceArray as val}
201
- {#if val.includes('€')}
202
- <option selected>{val}</option>
203
- {:else}
204
- <option>{val}</option>
205
- {/if}
206
- {/each}
207
- </select>
194
+ <player-account-balance-modal sessionid={sessionID} playerid={playerID} {profileurl} />
208
195
  <div class="Item ItemDeposit" on:click={()=>menuAction('deposit')}>Deposit</div>
209
196
  <div class="Item ItemAccount" on:click={()=>menuAction('myaccount')}>
210
197
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">