@everymatrix/cashier-page 1.27.8 → 1.28.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/dist/cashier-page.js +308 -243
- package/dist/cashier-page.js.map +1 -1
- package/index.html +8 -4
- package/package.json +2 -2
- package/rollup.config.js +4 -0
- package/src/CashierPage.svelte +95 -30
package/index.html
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
.header__logo svg { height: 50px; width: 50px; margin-right: 5px; }
|
|
19
19
|
.header__name { color: #fff; }
|
|
20
20
|
.header__name span { margin-right: 10px; font-weight: bold; }
|
|
21
|
-
.webcomponent { padding: 10px 20px; }
|
|
21
|
+
.webcomponent { padding: 10px 20px; height: calc(100svh - 150px); overflow-y:hidden; }
|
|
22
|
+
cashier-page { height: inherit; }
|
|
22
23
|
</style>
|
|
23
24
|
<header class="header">
|
|
24
25
|
<div class="header__logo">
|
|
@@ -35,15 +36,18 @@
|
|
|
35
36
|
local="en-US"
|
|
36
37
|
channel="Desktop"
|
|
37
38
|
type="Deposit"
|
|
38
|
-
session="
|
|
39
|
+
session="2155bc46-0457-4137-8c90-59354b7449bd"
|
|
39
40
|
translationurl="https://static.everymatrix.com/mmstage/translations/1995/mm-localization-en.json"
|
|
40
41
|
assetsurl="https://static.everymatrix.com/mmstage/cashier/operator-assets/1995"
|
|
41
42
|
endpoint="https://api-stage-odeonbet-norway.apiopp.com/"
|
|
42
43
|
merchantid="1995"
|
|
43
44
|
customerid="6246443"
|
|
44
|
-
currency="
|
|
45
|
-
amount="
|
|
45
|
+
currency="EUR"
|
|
46
|
+
amount="20"
|
|
46
47
|
numberofmethodsshown="1"
|
|
48
|
+
dateformat = "d/m/Y"
|
|
49
|
+
timeformat = 'H:i'
|
|
50
|
+
dateandtimeformat = 'd/m/Y H:i'
|
|
47
51
|
>
|
|
48
52
|
</cashier-page>
|
|
49
53
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/cashier-page",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d291acb27fcd4cf8217ec1c98666c02bfb1aea9f"
|
|
39
39
|
}
|
package/rollup.config.js
CHANGED
|
@@ -6,6 +6,7 @@ import livereload from 'rollup-plugin-livereload';
|
|
|
6
6
|
import { terser } from 'rollup-plugin-terser';
|
|
7
7
|
import sveltePreprocess from 'svelte-preprocess';
|
|
8
8
|
import typescript from '@rollup/plugin-typescript';
|
|
9
|
+
import postcss from 'rollup-plugin-postcss';
|
|
9
10
|
const production = process.env.NODE_ENV === 'production';
|
|
10
11
|
const dev = process.env.NODE_ENV === 'development';
|
|
11
12
|
|
|
@@ -18,6 +19,9 @@ export default {
|
|
|
18
19
|
file: 'dist/cashier-page.js'
|
|
19
20
|
},
|
|
20
21
|
plugins: [
|
|
22
|
+
postcss({
|
|
23
|
+
extensions:['.css']
|
|
24
|
+
}),
|
|
21
25
|
svelte({
|
|
22
26
|
preprocess: sveltePreprocess(),
|
|
23
27
|
compilerOptions: {
|
package/src/CashierPage.svelte
CHANGED
|
@@ -9,11 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
import '@everymatrix/cashier-methods-list';
|
|
11
11
|
import '@everymatrix/cashier-method-details';
|
|
12
|
+
import '@everymatrix/cashier-error';
|
|
12
13
|
|
|
13
14
|
export let endpoint: string;
|
|
14
15
|
export let session: string;
|
|
15
16
|
export let lang: string = 'en';
|
|
16
17
|
export let local: string = 'en-US';
|
|
18
|
+
export let dateformat: string = "d/m/Y";
|
|
19
|
+
export let timeformat: string = "H:i";
|
|
20
|
+
export let dateandtimeformat: string = 'd/m/Y H:i';
|
|
17
21
|
export let translationurl: string;
|
|
18
22
|
export let customerid: string;
|
|
19
23
|
export let currency: string;
|
|
@@ -47,6 +51,7 @@
|
|
|
47
51
|
let isProcessingTxn: boolean;
|
|
48
52
|
let isTranslationLoaded: boolean;
|
|
49
53
|
let showMethodDetailsPage: boolean = false;
|
|
54
|
+
let errorMessage: string;
|
|
50
55
|
|
|
51
56
|
$: endpoint && session && customerid && lang && channel && type && getPlayerSession();
|
|
52
57
|
$: clientstyling && customStylingContainer && setClientStyling();
|
|
@@ -94,13 +99,17 @@
|
|
|
94
99
|
"CancelUrl": cancelUrl,
|
|
95
100
|
"FailUrl": failUrl,
|
|
96
101
|
"Language": lang,
|
|
97
|
-
"ProductType": "Casino"
|
|
98
102
|
})
|
|
99
103
|
};
|
|
100
|
-
fetch(url, requestParams)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
fetch(url, requestParams)
|
|
105
|
+
.then(res => res.json())
|
|
106
|
+
.then(data => {
|
|
107
|
+
if (data.error) {
|
|
108
|
+
errorMessage = data.error
|
|
109
|
+
}
|
|
110
|
+
xPaymentSessionToken = data.XPaymentSessionToken;
|
|
111
|
+
isLoading = false;
|
|
112
|
+
})
|
|
104
113
|
}
|
|
105
114
|
|
|
106
115
|
const selectPayMeth = (e) => {
|
|
@@ -137,13 +146,25 @@
|
|
|
137
146
|
onMount(() => {
|
|
138
147
|
window.addEventListener('selectPayMeth', selectPayMeth, false);
|
|
139
148
|
window.addEventListener('hidePaymentDetails', hideMethodDetails, false);
|
|
149
|
+
window.addEventListener('message', messageHandler, false);
|
|
140
150
|
|
|
141
151
|
return () => {
|
|
142
152
|
window.removeEventListener('hidePaymentDetails', hideMethodDetails);
|
|
143
153
|
window.removeEventListener('selectPayMeth', selectPayMeth);
|
|
154
|
+
window.removeEventListener('message', messageHandler);
|
|
144
155
|
}
|
|
145
156
|
});
|
|
146
157
|
|
|
158
|
+
const preventDefault = (e) => {
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const messageHandler = (e:any) => {
|
|
163
|
+
if (e.data.type == 'ShowSessionError') {
|
|
164
|
+
errorMessage = e.data.error
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
147
168
|
</script>
|
|
148
169
|
|
|
149
170
|
|
|
@@ -151,10 +172,9 @@
|
|
|
151
172
|
{#if lang}
|
|
152
173
|
<div class="Header">{ $_(`header.${type.toLowerCase()}`)}</div>
|
|
153
174
|
{/if}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{:else}
|
|
175
|
+
{#if !errorMessage}
|
|
176
|
+
<div class="CashierPage">
|
|
177
|
+
<div class="CashierMethodListWrapper">
|
|
158
178
|
<cashier-methods-list
|
|
159
179
|
{lang}
|
|
160
180
|
{local}
|
|
@@ -163,23 +183,42 @@
|
|
|
163
183
|
{customerid}
|
|
164
184
|
{currency}
|
|
165
185
|
{numberofmethodsshown}
|
|
186
|
+
{clientstylingurl}
|
|
187
|
+
{clientstyling}
|
|
166
188
|
session="{xPaymentSessionToken}"
|
|
167
189
|
></cashier-methods-list>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
</div>
|
|
191
|
+
<cashier-method-details
|
|
192
|
+
{lang}
|
|
193
|
+
{local}
|
|
194
|
+
{timeformat}
|
|
195
|
+
{dateformat}
|
|
196
|
+
{dateandtimeformat}
|
|
197
|
+
{translationurl}
|
|
198
|
+
{endpoint}
|
|
199
|
+
{customerid}
|
|
200
|
+
{currency}
|
|
201
|
+
{amount}
|
|
202
|
+
{assetsurl}
|
|
203
|
+
{type}
|
|
204
|
+
{clientstylingurl}
|
|
205
|
+
{clientstyling}
|
|
206
|
+
selectedpaymentmethodname="{selectedPaymentMethod.Name}"
|
|
207
|
+
session="{xPaymentSessionToken}"
|
|
208
|
+
></cashier-method-details>
|
|
209
|
+
</div>
|
|
210
|
+
{:else}
|
|
211
|
+
<cashier-error
|
|
212
|
+
{lang}
|
|
213
|
+
{assetsurl}
|
|
214
|
+
{translationurl}
|
|
215
|
+
{clientstylingurl}
|
|
216
|
+
{clientstyling}
|
|
217
|
+
hidebuttons="true"
|
|
218
|
+
>
|
|
219
|
+
<span slot="text">{errorMessage}</span>
|
|
220
|
+
</cashier-error>
|
|
221
|
+
{/if}
|
|
183
222
|
</div>
|
|
184
223
|
|
|
185
224
|
|
|
@@ -192,19 +231,24 @@
|
|
|
192
231
|
transform: rotate(360deg)
|
|
193
232
|
}
|
|
194
233
|
}
|
|
234
|
+
@mixin container-height {
|
|
235
|
+
height: calc(100% - 44px);
|
|
236
|
+
overflow: auto;
|
|
237
|
+
padding: 7px 12px 12px 12px;
|
|
238
|
+
box-sizing: border-box;
|
|
239
|
+
}
|
|
195
240
|
.CashierPageWidget {
|
|
196
241
|
container-type: inline-size;
|
|
197
242
|
container-name: deposit-page;
|
|
243
|
+
height: inherit;
|
|
198
244
|
}
|
|
199
245
|
.BothSections {
|
|
200
246
|
.Header {
|
|
201
247
|
transition: all 1s;
|
|
202
248
|
width: 100%;
|
|
203
249
|
}
|
|
204
|
-
.CashierPage {
|
|
205
|
-
gap: 23px;
|
|
206
|
-
}
|
|
207
250
|
cashier-method-details {
|
|
251
|
+
@include container-height;
|
|
208
252
|
transition: all 1s;
|
|
209
253
|
width: 50%;
|
|
210
254
|
}
|
|
@@ -224,10 +268,15 @@
|
|
|
224
268
|
display: flex;
|
|
225
269
|
flex-direction: row;
|
|
226
270
|
justify-content: center;
|
|
271
|
+
height: inherit;
|
|
227
272
|
}
|
|
228
|
-
|
|
273
|
+
.CashierMethodListWrapper {
|
|
274
|
+
@include container-height;
|
|
229
275
|
width: 50%;
|
|
230
|
-
|
|
276
|
+
&::-webkit-scrollbar {
|
|
277
|
+
border-right: 1px solid var(--emw--color-gray-100, #E0E0E0 );
|
|
278
|
+
}
|
|
279
|
+
}
|
|
231
280
|
cashier-method-details {
|
|
232
281
|
width: 0;
|
|
233
282
|
}
|
|
@@ -248,8 +297,24 @@
|
|
|
248
297
|
.BothSections cashier-method-details {
|
|
249
298
|
display: flex;
|
|
250
299
|
}
|
|
251
|
-
.BothSections
|
|
300
|
+
.BothSections .CashierMethodListWrapper {
|
|
252
301
|
display: none;
|
|
253
302
|
}
|
|
303
|
+
.CashierMethodListWrapper {
|
|
304
|
+
width: 100%;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
::-webkit-scrollbar {
|
|
308
|
+
width: 4px;
|
|
309
|
+
}
|
|
310
|
+
::-webkit-scrollbar-track {
|
|
311
|
+
background: transparent;
|
|
254
312
|
}
|
|
313
|
+
::-webkit-scrollbar-thumb {
|
|
314
|
+
background: var(--emw--color-gray-100, #E8E9EB);
|
|
315
|
+
}
|
|
316
|
+
::-webkit-scrollbar-thumb:hover {
|
|
317
|
+
background: var(--emw--color-gray-300, #666);
|
|
318
|
+
}
|
|
319
|
+
|
|
255
320
|
</style>
|