@everymatrix/player-account-gaming-limits-wrapper-2 0.1.0 → 0.1.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.
package/index.html CHANGED
@@ -27,20 +27,12 @@
27
27
  </style>
28
28
 
29
29
  <div class="webcomponent">
30
- <player-account-gaming-limits-wrapper-2
31
- endpoint="https://betathome-de-stage-api.stage.norway.everymatrix.com/"
32
- session="6e810eb4-8538-4573-8b7d-3748beb7a590"
33
- userid="4516479"
34
- currency="EUR"
35
- lang="en"
36
- includedlimits="lugas:10-99999999 | wager:10-99999999 | deposit:10-99999999, stake:10-99999999, loss:10-99999999"
37
- products="wager:Casino, deposit:Casino, stake:Sports, loss:All"
38
- periods="lugas: M, deposit: D-W-M, loss: D-W-M, wager: M, stake: N"
39
- tablabels="Deposit limit, Slots limit, Other limits"
40
- historyenabled="true"
41
- apiversion="gm16"
42
- clientstylingurl="https://storage.googleapis.com/css-upload/bahLimit-2.css">
43
- </player-account-gaming-limits-wrapper-2>
30
+ <player-account-gaming-limits-wrapper-2 endpoint="https://betathome-com-stage-api.stage.norway.everymatrix.com/"
31
+ session="23752d9b-b55b-49b9-a6c2-7f7ac29fe376" userid="4500790" currency="EUR" includedlimits="deposit:10-99999999"
32
+ tablabels="Deposit" historyenabled="false" apiversion="gmcore"
33
+ clientstylingurl="https://storage.googleapis.com/css-upload/bahLimit-2.css" lang="en">
34
+ </player-account-gaming-limits-wrapper-2>
35
+
44
36
  </div>
45
37
 
46
38
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-gaming-limits-wrapper-2",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/player-account-gaming-limits-wrapper-2.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -29,9 +29,9 @@
29
29
  "typescript": "^3.9.3"
30
30
  },
31
31
  "dependencies": {
32
- "@everymatrix/player-account-gaming-limits-history-2": "^1.0.0",
33
- "@everymatrix/player-account-gaming-limits-page-2-gm16": "^1.0.0",
34
- "@everymatrix/player-account-gaming-limits-page-2-gmcore": "^1.0.0",
32
+ "@everymatrix/player-account-gaming-limits-history-2": "^0.0.415",
33
+ "@everymatrix/player-account-gaming-limits-page-2-gm16": "^0.0.415",
34
+ "@everymatrix/player-account-gaming-limits-page-2-gmcore": "^0.0.415",
35
35
  "cross-env": "^7.0.3",
36
36
  "sirv-cli": "^1.0.0",
37
37
  "svelte": "^3.0.0"
@@ -15,8 +15,6 @@
15
15
  export let apiversion:string = '';
16
16
 
17
17
  export let includedlimits:string = '';
18
- export let products:string = '';
19
- export let periods:string = '';
20
18
  export let tablabels:string = '';
21
19
  export let historyenabled:string = "true";
22
20
 
@@ -28,6 +26,7 @@
28
26
  let limitTabs:Array<any> = [];
29
27
  let limitMinMax:object = {};
30
28
  let multiLimit:string = '';
29
+ let selectedTab:number = -1;
31
30
 
32
31
  let tabLabelArray:Array<string>;
33
32
  let mainContainer:HTMLElement | undefined = undefined;
@@ -37,21 +36,6 @@
37
36
  let eachLimit;
38
37
  let limits = includedlimits.split(' | ')
39
38
 
40
- let productUnwrap = products.split(',').map(wordPair => wordPair.trim().split(':').map(word => word.trim()));
41
- const productObject = productUnwrap.reduce((obj, valuePair) => {
42
- obj[valuePair[0]] = valuePair[1];
43
- return obj;
44
- }, {});
45
-
46
- let periodUnwrap:Array<any> = periods.split(',').map(limitPeriodPair => limitPeriodPair.trim().split(':'));
47
- for (let limitPeriodPair of periodUnwrap) {
48
- limitPeriodPair[1] = limitPeriodPair[1].trim().replace('D', 'Daily').replace('W', 'Weekly').replace('M', 'Monthly').replace('N', 'None').split('-');
49
- }
50
- const periodObject = periodUnwrap.reduce((obj, valuePair) => {
51
- obj[valuePair[0]] = valuePair[1];
52
- return obj;
53
- }, {});
54
-
55
39
  limits.forEach(element => {
56
40
  if( element.indexOf(', ') >= 0 ){
57
41
  let multiEachLimit = '';
@@ -81,12 +65,6 @@
81
65
  if(limitMinMax){
82
66
  window.postMessage({ type: 'SetLimitsMinMax', limitMinMax}, window.location.href);
83
67
  }
84
- if(productObject){
85
- window.postMessage({ type: 'SetLimitsProducts', productObject}, window.location.href);
86
- }
87
- if(periodObject){
88
- window.postMessage({ type: 'SetLimitsPeriods', periodObject}, window.location.href);
89
- }
90
68
  }
91
69
 
92
70
  const selectTab = (index:number):void => {
@@ -125,8 +103,7 @@
125
103
  }
126
104
 
127
105
  onMount(() => {
128
- selectTab(0);
129
-
106
+ selectedTab = -1;
130
107
  return () => {
131
108
  mainContainer = null;
132
109
  tabsContainer = null;
@@ -137,6 +114,7 @@
137
114
  $: mainContainer && !isLoading && selectTab(0);
138
115
  $: clientstylingurl && setClientStylingURL();
139
116
  $: clientstyling && setClientStyling();
117
+ $: selectedTab && selectedTab < 0 && mainContainer && selectTab(0);
140
118
  </script>
141
119
 
142
120
  <svelte:head>