@everymatrix/player-account-controller 0.0.289 → 0.0.292

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
@@ -35,10 +35,11 @@
35
35
  endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
36
36
  cmsendpoint="https://wt1-stage.everymatrix.com/apijson"
37
37
  playerid="3856617"
38
- session="c5e5e752-a9be-46e6-92a9-5e4b026ca35b"
38
+ session="fc3c3c5b-8a89-468b-a6fc-6deffb706ea3"
39
39
  customnotifications="#58586B,#2687F6,#D0046C"
40
40
  lang="en"
41
41
  env="stage"
42
+ separatelimits="true"
42
43
  ></player-account-controller>
43
44
  <!--<player-account-controller cmsendpoint="https://wp-one-widgets.everymatrix.com/wp-json/wpone-rest/v1"
44
45
  accountpath="/menu-locations/profile-menu"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-controller",
3
- "version": "0.0.289",
3
+ "version": "0.0.292",
4
4
  "main": "dist/player-account-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -29,8 +29,8 @@
29
29
  "typescript": "^3.9.3"
30
30
  },
31
31
  "dependencies": {
32
- "@everymatrix/player-account-menu": "^0.0.289",
33
- "@everymatrix/player-account-notifications": "^0.0.289",
32
+ "@everymatrix/player-account-menu": "^0.0.292",
33
+ "@everymatrix/player-account-notifications": "^0.0.292",
34
34
  "cross-env": "^7.0.3",
35
35
  "sirv-cli": "^1.0.0",
36
36
  "svelte": "^3.0.0"
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "8d2b48830088db6de1cb354e113bf3a2a09f325b"
41
+ "gitHead": "c69fc04487b15c7c69d2a7c8943340d2a8b78c4f"
42
42
  }
@@ -32,6 +32,7 @@
32
32
  export let endpoint:string = '';
33
33
  export let lang:string = '';
34
34
  export let operator:string = 'Everymatrix';
35
+ export let separatelimits:string = 'true';
35
36
 
36
37
  setupI18n({ withLocale: 'en', translations: {}});
37
38
 
@@ -316,9 +317,7 @@
316
317
  case 'PlayerAccountGamingLimitsUpdate':
317
318
  url = new URL(`v2/player/${userId}/limits`, endpoint);
318
319
 
319
- let limitsObject = e.data.payload;
320
- let limitsSectionTitle = e.data.limitsCategory;
321
- let limitsData = (limitsSectionTitle === 'cumulativeSessionLimits' || limitsSectionTitle === 'depositLimits') ? limitsObject : {[limitsSectionTitle]: limitsObject}
320
+ let limitsData = e.data.payload;
322
321
  let optionsEditLimits = {
323
322
  method: "PUT",
324
323
  headers: {
@@ -385,15 +384,9 @@
385
384
 
386
385
  url = new URL(`v1/player/${userId}/limits/${limitName}`, endpoint)
387
386
 
388
- if (limitName === 'deposit' || limitName === 'cumulativeSession') {
389
- if (Array.isArray(deletedPeriodLimit)) {
390
- deletedPeriodLimit.forEach((item) => {
391
- url.searchParams.append('periods', item);
392
- })
393
- } else {
394
- url.searchParams.append('periods', deletedPeriodLimit);
395
- }
396
- }
387
+ deletedPeriodLimit.forEach((item) => {
388
+ url.searchParams.append('periods', item);
389
+ });
397
390
 
398
391
  fetch(url.href, deleteOptions)
399
392
  .then((res:any):void => {
@@ -671,7 +664,7 @@
671
664
  {:else if switchContent && pagePath === widgetPath[4]}
672
665
  <player-account-closure {lang}></player-account-closure>
673
666
  {:else if switchContent && pagePath === widgetPath[5]}
674
- <player-account-gaming-limits use:sendLimitsData {playercurrency}></player-account-gaming-limits>
667
+ <player-account-gaming-limits use:sendLimitsData {playercurrency} {separatelimits}></player-account-gaming-limits>
675
668
  {:else if switchContent && pagePath === widgetPath[6]}
676
669
  <player-account-self-exclusion {lang} {operator}></player-account-self-exclusion>
677
670
  {:else if switchContent && pagePath === widgetPath[7]}
@@ -706,8 +699,8 @@
706
699
  {:else if switchContent && pagePath === widgetPath[4]}
707
700
  <player-account-closure {lang}></player-account-closure>
708
701
  {:else if switchContent && pagePath == widgetPath[5]}
709
- <player-account-gaming-limits
710
- use:sendLimitsData {playercurrency}>
702
+ <player-account-gaming-limits
703
+ use:sendLimitsData {playercurrency} {separatelimits}>
711
704
  </player-account-gaming-limits>
712
705
  {:else if switchContent && pagePath === widgetPath[6]}
713
706
  <player-account-self-exclusion {lang} {operator}></player-account-self-exclusion>