@everymatrix/casino-header-controller 1.8.3 → 1.9.0
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
@@ -26,8 +26,8 @@
|
|
26
26
|
cmsendpoint="https://widgets.everymatrix.com/apijson"
|
27
27
|
lang="en"
|
28
28
|
showbanner="true"
|
29
|
-
session=""
|
30
|
-
userid=""
|
29
|
+
session="ff9b00eb-2782-44fc-b4e1-fc9b3c91ecb6"
|
30
|
+
userid="4506648"
|
31
31
|
profileurl=''
|
32
32
|
endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
|
33
33
|
bannermatrix="https://bannermatrix-stage.everymatrix.com"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-header-controller",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.9.0",
|
4
4
|
"main": "dist/casino-header-controller.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public"
|
40
40
|
},
|
41
|
-
"gitHead": "
|
41
|
+
"gitHead": "931b121e18fe00e97d089fdc4f642515337a7091"
|
42
42
|
}
|
@@ -20,6 +20,7 @@
|
|
20
20
|
export let languageslist:string = 'en, ro';
|
21
21
|
export let activecategory:string = '';
|
22
22
|
export let translationurl:string = '';
|
23
|
+
export let customlocaleidentifier:string = '';
|
23
24
|
|
24
25
|
export let operatorid:string = '';
|
25
26
|
export let pagetag:string = '';
|
@@ -187,16 +188,16 @@
|
|
187
188
|
//headerURL.searchParams.append('platform', 'dk');
|
188
189
|
headerURL.searchParams.append('userRoles', userroles);
|
189
190
|
|
190
|
-
if(device){
|
191
|
-
if(device === 'PC'){
|
192
|
-
hamburgerURL.searchParams.append('device', 'dk')
|
193
|
-
headerURL.searchParams.append('device', 'dk')
|
194
|
-
} else if(device === 'iPad' || device === 'iPhone') {
|
195
|
-
hamburgerURL.searchParams.append('device', '
|
196
|
-
headerURL.searchParams.append('device', '
|
191
|
+
if (device) {
|
192
|
+
if (device === 'PC'){
|
193
|
+
hamburgerURL.searchParams.append('device', 'dk');
|
194
|
+
headerURL.searchParams.append('device', 'dk');
|
195
|
+
} else if (device === 'iPad' || device === 'iPhone') {
|
196
|
+
hamburgerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
|
197
|
+
headerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
|
197
198
|
} else {
|
198
|
-
hamburgerURL.searchParams.append('device', 'mtWeb')
|
199
|
-
headerURL.searchParams.append('device', 'mtWeb')
|
199
|
+
hamburgerURL.searchParams.append('device', 'mtWeb');
|
200
|
+
headerURL.searchParams.append('device', 'mtWeb');
|
200
201
|
}
|
201
202
|
}
|
202
203
|
hamburgerURL.searchParams.append('env', cmsenv);
|
@@ -225,8 +226,14 @@
|
|
225
226
|
}
|
226
227
|
|
227
228
|
const setActiveIndex = ():void => {
|
228
|
-
activeIndex = mainMenuArray.find(item =>
|
229
|
-
|
229
|
+
activeIndex = mainMenuArray.find(item => {
|
230
|
+
if ( activecategory.indexOf('/sport') > -1 ) {
|
231
|
+
return item.path.indexOf(activecategory) > -1
|
232
|
+
} else {
|
233
|
+
//Opted for this solution so that when you go back from casino categories slider it will change the active index when its required from header too
|
234
|
+
return item.path.indexOf(activecategory.split('/')[1]) > -1
|
235
|
+
}
|
236
|
+
})?.id;
|
230
237
|
}
|
231
238
|
|
232
239
|
const sendSliderData = ():void => {
|
@@ -275,6 +282,10 @@
|
|
275
282
|
});
|
276
283
|
}
|
277
284
|
|
285
|
+
const navigationTrigger = (itemData:any) => {
|
286
|
+
window.postMessage({ type: actionevent, itemId: itemData.id, item: itemData }, window.location.href);
|
287
|
+
}
|
288
|
+
|
278
289
|
const setClientStyling = ():void => {
|
279
290
|
let sheet = document.createElement('style');
|
280
291
|
sheet.innerHTML = clientstyling;
|
@@ -347,7 +358,7 @@
|
|
347
358
|
|
348
359
|
<div class="HeaderTopActions" part="HeaderTopActions">
|
349
360
|
<div class="HeaderItemsMenu PrimaryMenu" part="HeaderItemsMenu PrimaryMenu">
|
350
|
-
<player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl}/>
|
361
|
+
<player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier}/>
|
351
362
|
<div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('headerItem.deposit')}</div>
|
352
363
|
<div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
|
353
364
|
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
|
@@ -400,7 +411,7 @@
|
|
400
411
|
</nav>
|
401
412
|
<div class="HeaderTopActions" part="HeaderItemsMenu">
|
402
413
|
<div class="HeaderItemsMenu PrimaryMenu" part="HeaderItemsMenu PrimaryMenu">
|
403
|
-
<player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl}/>
|
414
|
+
<player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier}/>
|
404
415
|
<div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('headerItem.deposit')}</div>
|
405
416
|
<div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
|
406
417
|
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
|
@@ -428,7 +439,9 @@
|
|
428
439
|
<nav class="HeaderSecondaryNav" part="HeaderSecondaryNav">
|
429
440
|
<ul class="HeaderItemsMenuSecondary" part="HeaderItemsMenuSecondary">
|
430
441
|
{#each secondaryMenuArray as secondaryItem}
|
431
|
-
<li class="ItemSecondary" part="ItemSecondary"
|
442
|
+
<li class="ItemSecondary" part="ItemSecondary">
|
443
|
+
<button on:click={navigationTrigger(secondaryItem)}>{secondaryItem.label}</button>
|
444
|
+
</li>
|
432
445
|
{/each}
|
433
446
|
</ul>
|
434
447
|
</nav>
|
@@ -702,13 +715,18 @@
|
|
702
715
|
font-weight: 600;
|
703
716
|
transition-duration: 0.15s;
|
704
717
|
|
705
|
-
|
718
|
+
button {
|
706
719
|
color: var(--emfe-w-color-white, #FFFFFF);
|
707
720
|
text-decoration: none;
|
721
|
+
border: none;
|
722
|
+
background: none;
|
723
|
+
font-size: 14px;
|
724
|
+
font-weight: 600;
|
725
|
+
text-transform: uppercase;
|
708
726
|
}
|
709
727
|
|
710
728
|
&:hover {
|
711
|
-
|
729
|
+
button {
|
712
730
|
color: var(--emfe-w-color-primary, #D0046C);
|
713
731
|
}
|
714
732
|
}
|