@everymatrix/casino-footer-v2 0.0.370 → 0.0.372

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
@@ -43,22 +43,23 @@
43
43
  padding: 10px 20px;
44
44
  }
45
45
  </style>
46
- <casino-footer-v2
47
- endpoint="https://bahcom-stage.everymatrix.com/apijson"
48
- userendpoint="https://betathome-de-stage-api.stage.norway.everymatrix.com/v1"
49
- session="d919449f-5f5a-4c6f-92c2-29fb947c3f33"
50
- userid="4229869"
51
- env="local"
52
- languageselectorenabled="true"
53
- languagelist="de, en, sl, pl, hr, hu, it, sr, pt"
54
- languagedisplaytype="name"
55
- sessiontimerenabled="true"
56
- panicbuttonenabled="true"
57
- clockenabled="true"
58
- clocksecondsenabled="true"
59
- clockcustomformat="LTS"
60
- lang="en"
61
- ></casino-footer-v2>
46
+
47
+ <casino-footer-v2
48
+ endpoint="http://localhost:3005/apijson"
49
+ env="local"
50
+ languageselectorenabled="true"
51
+ languagelist="de, en, sl, pl, hr, hu, it, sr, pt"
52
+ languagedisplaytype="name"
53
+ sessiontimerenabled="false"
54
+ session="false"
55
+ userid=""
56
+ panicbuttonenabled="false"
57
+ clockenabled="true"
58
+ clocksecondsenabled="true"
59
+ clockcustomformat="false"
60
+ userendpoint="https://betathome-com-stage-api.stage.norway.everymatrix.com/v1"
61
+ lang="en"
62
+ ></casino-footer-v2>
62
63
 
63
64
  </body>
64
65
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-footer-v2",
3
- "version": "0.0.370",
3
+ "version": "0.0.372",
4
4
  "main": "dist/casino-footer-v2.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "0a7c511332ea6be9685fb8191900cb92f310daba"
39
+ "gitHead": "5612b26ae9b59681de1e96fae53e69e4dd94f3cf"
40
40
  }
@@ -23,7 +23,7 @@
23
23
  export let clockcustomformat:string = ''; // "false" for defaulting to our format
24
24
  export let clocktext:string = 'Time:'; // string preceding clock
25
25
 
26
- export let languageselectorenabled = 'true';
26
+ export let languageselectorenabled:string = 'true';
27
27
  export let languageslist:string = 'en, ro';
28
28
  export let languagedisplaytype = 'name';
29
29
  export let session:string = '';
@@ -32,9 +32,10 @@
32
32
  export let panicbuttonenabled:string = 'true';
33
33
  export let sessiontimerenabled:string = 'true'; // 'true' to enable, anything to disable
34
34
  export let grouplink:string = 'true';
35
+ export let baseurl:string = '';
35
36
 
36
37
  let userAgent:string = window.navigator.userAgent;
37
- let isOnMobile = isMobile(userAgent);
38
+ let isOnMobile:boolean = isMobile(userAgent);
38
39
  let gameVendorsLinksTitle:string = '';
39
40
  let gameVendorsRepeater:Array<Object> = [];
40
41
  let paymentLinksTitle:string = '';
@@ -63,10 +64,10 @@
63
64
  let languages:Array<object> = [];
64
65
 
65
66
  let time:string;
66
- let refreshRate: number;
67
+ let refreshRate:number;
67
68
 
68
69
  let languagesArray:Array<string> = [];
69
- let languageDrawer: HTMLElement;
70
+ let languageDrawer:HTMLElement;
70
71
  let languageDisplayName:string = '';
71
72
  let currentLanguageFlag:string = '';
72
73
  let languagePackLoaded:boolean = false;
@@ -77,6 +78,7 @@
77
78
 
78
79
  let customStylingContainer:HTMLElement;
79
80
  let sessionTimerElement:HTMLElement = document.createElement('p');
81
+ let clockElement:HTMLElement = document.createElement('p');
80
82
 
81
83
  setupI18n({ withLocale: 'en', translations: {}});
82
84
 
@@ -84,8 +86,6 @@
84
86
  addNewMessages(item, CasinoFooterTranslations[item]);
85
87
  });
86
88
 
87
-
88
- // needed for session timer
89
89
  const setSession = ():void => {
90
90
  checkSession(userendpoint, session).then((res:any) => {
91
91
  sessionID = res.Guid;
@@ -98,7 +98,7 @@
98
98
  });
99
99
  }
100
100
 
101
- const setSessionTimer = (sessionData):void => {
101
+ const setSessionTimer = (sessionData:any):void => {
102
102
  // using Date instead of moment because they recommend in their docs to stop using it for new projects
103
103
  const loginTime = new Date(sessionData.Login);
104
104
  const timezoneOffsetHours = new Date().getTimezoneOffset() / 60;
@@ -131,6 +131,8 @@
131
131
  const clockDisplay = ():void => {
132
132
  const format = clockcustomformat != 'false' ? clockcustomformat : `hh:mm${clocksecondsenabled === "true" ? ':ss' : ''} (UTC Z)`;
133
133
  time = moment().format(format);
134
+
135
+ clockElement.innerHTML = ` ${clocktext} ${time}`
134
136
  }
135
137
 
136
138
  const getCmsData = ():void => {
@@ -213,10 +215,8 @@
213
215
 
214
216
  //Add clock
215
217
  if (clockenabled === 'true' && element.classList.contains('DetailedLicenses')) {
216
- const clockHtml = document.createElement('p');
217
- clockHtml.innerHTML = ` ${clocktext} ${time}`
218
218
 
219
- element.children[0].children[0].append(clockHtml);
219
+ element.children[0].children[0].append(clockElement);
220
220
  }
221
221
  //Add session timer
222
222
  if (sessiontimerenabled == 'true' && element.classList.contains('DetailedLicenses')) {
@@ -225,7 +225,6 @@
225
225
  }
226
226
  }
227
227
 
228
-
229
228
  const setClientStyling = ():void => {
230
229
  let sheet = document.createElement('style');
231
230
  sheet.innerHTML = clientstyling;
@@ -347,7 +346,7 @@
347
346
  {#if category.key}
348
347
  <p class="FooterTitle">{category.key}</p>
349
348
  {/if}
350
- <casino-footer-section helperflag="1" clientstyling={customStyling} category={category.key} target={target} displaycolumn="true"></casino-footer-section>
349
+ <casino-footer-section helperflag="1" clientstyling={customStyling} category={category.key} target={target} displaycolumn="true" {baseurl}></casino-footer-section>
351
350
  {/each}
352
351
  {/if}
353
352
  </div>
@@ -360,7 +359,7 @@
360
359
  {#if gameVendorsLinksTitle}
361
360
  <p class="FooterTitle">{gameVendorsLinksTitle}</p>
362
361
  {/if}
363
- <casino-footer-section vendorflag="1" clientstyling={customStyling} target={target}></casino-footer-section>
362
+ <casino-footer-section vendorflag="1" clientstyling={customStyling} target={target} {baseurl}></casino-footer-section>
364
363
  </div>
365
364
  </div>
366
365
  {/if}
@@ -372,7 +371,7 @@
372
371
  {#if paymentLinksTitle}
373
372
  <p class="FooterTitle">{paymentLinksTitle}</p>
374
373
  {/if}
375
- <casino-footer-section paymentflag="1" clientstyling={customStyling} target={target}></casino-footer-section>
374
+ <casino-footer-section paymentflag="1" clientstyling={customStyling} target={target} {baseurl}></casino-footer-section>
376
375
  </div>
377
376
  </div>
378
377
  {/if}
@@ -395,7 +394,7 @@
395
394
  {#if licensesLinksTitle}
396
395
  <p class="FooterTitle">{licensesLinksTitle}</p>
397
396
  {/if}
398
- <casino-footer-section licenseFlag="1" clientstyling={customStyling} target={target}></casino-footer-section>
397
+ <casino-footer-section licenseFlag="1" clientstyling={customStyling} target={target} {baseurl}></casino-footer-section>
399
398
  </div>
400
399
  <!-- start detailed licenses section -->
401
400
  <div class="LicenseDesc">
@@ -417,7 +416,7 @@
417
416
  {#if sponsorsLinksTitle}
418
417
  <p class="FooterTitle">{sponsorsLinksTitle}</p>
419
418
  {/if}
420
- <casino-footer-section sponsorflag="1" clientstyling={customStyling} target={target}></casino-footer-section>
419
+ <casino-footer-section sponsorflag="1" clientstyling={customStyling} target={target} {baseurl}></casino-footer-section>
421
420
  </div>
422
421
  {/if}
423
422
  </div>
@@ -430,7 +429,7 @@
430
429
  {#if socialLinksTitle}
431
430
  <p class="FooterTitle">{socialLinksTitle}</p>
432
431
  {/if}
433
- <casino-footer-section socialflag="1" clientstyling={customStyling} target={target}></casino-footer-section>
432
+ <casino-footer-section socialflag="1" clientstyling={customStyling} target={target} {baseurl}></casino-footer-section>
434
433
  </div>
435
434
  {/if}
436
435
  <!-- end social section -->
@@ -448,18 +447,18 @@
448
447
 
449
448
  <!-- Custom dropdown in order to be able to display country flags -->
450
449
  <div class="LanguageSelectorOverlay">
450
+ <div bind:this={languageDrawer} class="LanguageDrawer hidden">
451
+ <ul id="LanguageList">
452
+ {#each languages as language}
453
+ <li class="OverlayLanguageOption" data-lang={language.code} on:click={overlayOptionTrigger}><img class="LanguageFlag" src={language.flag_icon_editable}><a href="javascript:void(0)"><span>{language.name}</span></a></li>
454
+ {/each}
455
+ </ul>
456
+ </div>
451
457
  <button class="DrawerButton" value="{selectedLanguage}" on:click={toggleLanguageDrawer}><img class="LanguageFlag" src={currentLanguageFlag}>{languageDisplayName}
452
458
  <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
453
459
  <path opacity="0.4" d="M0.94 0L4.00067 3.05467L7.06 0L8 0.940667L4.00067 4.94133L0 0.940667L0.94 0Z" fill="black"/>
454
- </svg>
460
+ </svg>
455
461
  </button>
456
- <div bind:this={languageDrawer} class="LanguageDrawer hidden">
457
- <ul id="LanguageList">
458
- {#each languages as language}
459
- <li class="OverlayLanguageOption" data-lang={language.code} on:click={overlayOptionTrigger}><img class="LanguageFlag" src={language.flag_icon_editable}><a href="javascript:void(0)"><span>{language.name}</span></a></li>
460
- {/each}
461
- </ul>
462
- </div>
463
462
  </div>
464
463
  </div>
465
464
  </div>
@@ -491,8 +490,9 @@
491
490
  }
492
491
 
493
492
  .Footer {
494
- background-color: $color-white;
495
- position: relative;
493
+ background-color: $color-white;
494
+ display: flex;
495
+ flex-direction: row;
496
496
  }
497
497
 
498
498
  .FooterSideMobile {
@@ -504,7 +504,6 @@
504
504
  height: 100%;
505
505
  display: flex;
506
506
  flex-direction: column;
507
- position: absolute;
508
507
  background-color: $color-white;
509
508
  .FooterTitle {
510
509
  font-family: 'Roboto Condensed';
@@ -601,6 +600,7 @@
601
600
 
602
601
  .LanguageSelectorOverlay {
603
602
  position: relative;
603
+ font-size: 12px;
604
604
  }
605
605
 
606
606
  .DrawerButton {
@@ -620,19 +620,20 @@
620
620
 
621
621
  border-radius: 0px;
622
622
  border: 0;
623
+ position: relative;
623
624
  }
624
625
 
625
626
  .LanguageDrawer {
626
- position:absolute;
627
- background: $color-white;
628
- width: 150px;
629
- top: 30px;
630
- padding: 6px 0;
631
- left: 3.9px;
627
+ position:absolute;
628
+ background: $color-white;
629
+ width: 150px;
630
+ bottom: 30px;
631
+ padding: 6px 0;
632
+ left: 3.9px;
632
633
 
633
- &.hidden {
634
- display: none;
635
- }
634
+ &.hidden {
635
+ display: none;
636
+ }
636
637
  }
637
638
 
638
639
  .LanguageFlag {
@@ -644,11 +645,14 @@
644
645
  }
645
646
 
646
647
  .OverlayLanguageOption {
648
+ justify-content: center;
647
649
  list-style: none;
648
- width: 24px;
649
650
  position: relative;
651
+ height: 35px;
650
652
  padding: 0;
651
- justify-content: center;
653
+ justify-content: space-between;
654
+ display: flex;
655
+ flex-direction: row;
652
656
 
653
657
  img {
654
658
  position: absolute;