@everymatrix/player-profile-info 0.0.365 → 0.0.367
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/README.md +30 -30
- package/dist/player-profile-info.js +1 -1
- package/dist/player-profile-info.js.map +1 -1
- package/index.html +37 -37
- package/index.js +1 -1
- package/package.json +2 -2
- package/public/reset.css +47 -47
- package/rollup.config.js +67 -67
- package/src/PlayerProfileInfo.svelte +965 -964
- package/src/i18n.js +27 -27
- package/src/index.ts +4 -4
- package/src/translations.js +236 -236
- package/stories/PlayerProfileInfo.stories.js +13 -13
- package/tsconfig.json +6 -6
|
@@ -1,964 +1,965 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { onMount } from 'svelte';
|
|
5
|
-
import { getDevice } from 'rvhelper';
|
|
6
|
-
import { _, addNewMessages, setLocale } from './i18n';
|
|
7
|
-
import { PlayerProfileTranslations } from './translations';
|
|
8
|
-
|
|
9
|
-
// Native bridge
|
|
10
|
-
import { isNative, call as callNative, registerEventListener as registerNativeEventListener } from 'js-native-bridge';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export let endpoint:string = '';
|
|
14
|
-
export let lang:string = 'en';
|
|
15
|
-
export let countrycode:string = 'IR';
|
|
16
|
-
|
|
17
|
-
let isLoading:boolean = true;
|
|
18
|
-
let userAgent:string = window.navigator.userAgent;
|
|
19
|
-
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
20
|
-
let noPlayerData:boolean = true;
|
|
21
|
-
|
|
22
|
-
let playerPostalCode:HTMLElement, playerAddress:HTMLElement, playerCity:HTMLElement;
|
|
23
|
-
let giveConsentSMS:boolean = false;
|
|
24
|
-
let giveConsentEmail:boolean = false;
|
|
25
|
-
let biometricsSelection:boolean = false;
|
|
26
|
-
let playerQuestion:string = '';
|
|
27
|
-
let playerAnswer:string = '';
|
|
28
|
-
let playerPrefix:string = '';
|
|
29
|
-
let playerMobileNumber:string = '';
|
|
30
|
-
let differencesExist:boolean = false;
|
|
31
|
-
let selectedCountry:Object = { Name: 'I.e Ireland'};
|
|
32
|
-
let prefixesArray:Array<Object> = [];
|
|
33
|
-
let countriesArray:Array<Object> = []
|
|
34
|
-
|
|
35
|
-
let profileConsent:Array<Object> = [];
|
|
36
|
-
let showEmail:boolean = false;
|
|
37
|
-
let showSMS:boolean = false;
|
|
38
|
-
let consentArray:any = { items: [] };
|
|
39
|
-
|
|
40
|
-
let isValid:boolean = false;
|
|
41
|
-
|
|
42
|
-
let invalidCity:string = '';
|
|
43
|
-
let invalidPostalCode:string = '';
|
|
44
|
-
let invalidAddress:string = '';
|
|
45
|
-
let invalidSecurityQuestion:boolean = false;
|
|
46
|
-
let invalidSecurityAnswer:boolean = false;
|
|
47
|
-
let invalidMobile:boolean;
|
|
48
|
-
|
|
49
|
-
let showConfirmSave:boolean = false;
|
|
50
|
-
|
|
51
|
-
// Native bridge
|
|
52
|
-
let isOnNative:boolean = false;
|
|
53
|
-
|
|
54
|
-
Object.keys(PlayerProfileTranslations).forEach((item:any) => {
|
|
55
|
-
addNewMessages(item, PlayerProfileTranslations[item]);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const mediaQuery = window.matchMedia('(min-width: 768px)');
|
|
59
|
-
|
|
60
|
-
// needed to keep track of data changes
|
|
61
|
-
let provisionalArray:any = {
|
|
62
|
-
address1: '',
|
|
63
|
-
address2: '',
|
|
64
|
-
city: '',
|
|
65
|
-
acceptNewsEmail: false,
|
|
66
|
-
acceptSMSOffers : false,
|
|
67
|
-
country: '',
|
|
68
|
-
mobile: {prefix: '', number: ''},
|
|
69
|
-
postalCode: '',
|
|
70
|
-
securityAnswer: '',
|
|
71
|
-
securityQuestion: '',
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// needed to keep track of data changes
|
|
75
|
-
let initialValuesArray:any = {
|
|
76
|
-
acceptNewsEmail: false,
|
|
77
|
-
acceptSMSOffers : false,
|
|
78
|
-
address: '',
|
|
79
|
-
city: '',
|
|
80
|
-
mobileNumber: '',
|
|
81
|
-
mobilePrefix: '',
|
|
82
|
-
postalCode: '',
|
|
83
|
-
securityAnswer: '',
|
|
84
|
-
securityQuestion: ''
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// placeholder field values
|
|
88
|
-
let profileDetails:any = {
|
|
89
|
-
address1: "i.e.: Glanmire Rd.",
|
|
90
|
-
birth: '01/01/1990',
|
|
91
|
-
city: "i.e.: Cork",
|
|
92
|
-
country: "i.e.: Ireland",
|
|
93
|
-
currency: "EUR",
|
|
94
|
-
email: "email@here.com",
|
|
95
|
-
firstname: "Joe",
|
|
96
|
-
userTitles: "M",
|
|
97
|
-
lastname: "Johnson",
|
|
98
|
-
mobile: {prefix: "+00", number: "00000000"},
|
|
99
|
-
postalCode: "i.e.: 465531",
|
|
100
|
-
securityAnswer: "i.e.: Jerry",
|
|
101
|
-
securityQuestion: "i.e.: Pet name?",
|
|
102
|
-
title: "",
|
|
103
|
-
username: "Username"
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
let {address1, birth, city, country, currency, mobile, email, firstname, userTitles, language, lastname, postalCode, securityAnswer, securityQuestion, username, consents} = profileDetails;
|
|
107
|
-
|
|
108
|
-
const messageHandler = (e:any):void => {
|
|
109
|
-
if (e.data) {
|
|
110
|
-
switch(e.data.type) {
|
|
111
|
-
case 'ProfileDetailsData':
|
|
112
|
-
noPlayerData = false;
|
|
113
|
-
profileDetails = e.data.profileDetails;
|
|
114
|
-
|
|
115
|
-
// readonly field values
|
|
116
|
-
username = profileDetails.username;
|
|
117
|
-
mobile = profileDetails.mobile;
|
|
118
|
-
email = profileDetails.email;
|
|
119
|
-
firstname = profileDetails.firstname;
|
|
120
|
-
lastname = profileDetails.lastname;
|
|
121
|
-
language = profileDetails.language;
|
|
122
|
-
birth = profileDetails.birth?.day + '/' + profileDetails.birth?.month + '/' + profileDetails.birth?.year;
|
|
123
|
-
currency = profileDetails.currency;
|
|
124
|
-
userTitles = profileDetails.title;
|
|
125
|
-
|
|
126
|
-
// editable field values used for bindings
|
|
127
|
-
playerQuestion = profileDetails.securityQuestion;
|
|
128
|
-
playerAnswer = profileDetails.securityAnswer;
|
|
129
|
-
playerPrefix = profileDetails.mobile?.prefix;
|
|
130
|
-
playerMobileNumber = profileDetails.mobile?.number;
|
|
131
|
-
|
|
132
|
-
// set values for the initial editable values object
|
|
133
|
-
initialValuesArray = {
|
|
134
|
-
address: profileDetails.address1,
|
|
135
|
-
city: profileDetails.city,
|
|
136
|
-
mobilePrefix: mobile?.prefix,
|
|
137
|
-
mobileNumber: mobile?.number,
|
|
138
|
-
postalCode: profileDetails.postalCode,
|
|
139
|
-
securityAnswer: profileDetails.securityAnswer,
|
|
140
|
-
securityQuestion: profileDetails.securityQuestion,
|
|
141
|
-
}
|
|
142
|
-
break;
|
|
143
|
-
|
|
144
|
-
case 'ProfileConsentData':
|
|
145
|
-
profileConsent = e.data.consent.items;
|
|
146
|
-
if (Array.isArray(profileConsent)) {
|
|
147
|
-
profileConsent.forEach((item) => {
|
|
148
|
-
if (item.tagCode == 'emailmarketing') {
|
|
149
|
-
showEmail = true;
|
|
150
|
-
giveConsentEmail = item.status == 'Accepted';
|
|
151
|
-
initialValuesArray.acceptNewsEmail = giveConsentEmail;
|
|
152
|
-
} else if (item.tagCode == 'sms') {
|
|
153
|
-
showSMS = true;
|
|
154
|
-
giveConsentSMS = item.status == 'Accepted';
|
|
155
|
-
initialValuesArray.acceptSMSOffers = giveConsentSMS;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
case 'ConfirmProfileInfoSave':
|
|
162
|
-
if (isOnNative) {
|
|
163
|
-
registerNativeEventListener(
|
|
164
|
-
'BIOMETRICS_ENABLED',
|
|
165
|
-
(biometricsEnabled) => {
|
|
166
|
-
if (biometricsEnabled !== biometricsSelection) {
|
|
167
|
-
biometricsSelection = biometricsEnabled;
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
const methodFound = callNative(
|
|
173
|
-
biometricsSelection ? 'ENABLE_BIOMETRICS' : 'DISABLE_BIOMETRICS',
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
if (!methodFound) {
|
|
177
|
-
// Nothing to do here yet
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
differencesExist = false;
|
|
182
|
-
|
|
183
|
-
showConfirmMessage();
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const getCountriesList = ():void => {
|
|
190
|
-
fetch(`${endpoint}/player/countries`)
|
|
191
|
-
.then((res:any) => {
|
|
192
|
-
if (res.status >= 300) {
|
|
193
|
-
return new Error('Error while fetching the countries');
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return res.json();
|
|
197
|
-
})
|
|
198
|
-
.then((countryList:any) => {
|
|
199
|
-
fetch(`${endpoint}/player/operatorSupportedCountries`).then((res:any) => {
|
|
200
|
-
if (res.status >= 300) {
|
|
201
|
-
return new Error('Error while fetching the supported countries');
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
return res.json();
|
|
205
|
-
})
|
|
206
|
-
.then((supportedCountries:any) => {
|
|
207
|
-
countriesArray = countryList.countries.filter((item:any) => {
|
|
208
|
-
return supportedCountries.countries.indexOf(item.Alpha2Code) >= 0;
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
selectedCountry = countriesArray.find((country:any) => country.Alpha2Code === countrycode) || { Name: 'I.E. Ireland'};
|
|
212
|
-
isLoading = false;
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const getPhoneCodes = ():void => {
|
|
218
|
-
fetch(`${endpoint}/player/phonecodes`)
|
|
219
|
-
.then((res:any) => res.json())
|
|
220
|
-
.then(data => {
|
|
221
|
-
prefixesArray = data.phoneCodes;
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const showConfirmMessage = ():void => {
|
|
226
|
-
showConfirmSave = true;
|
|
227
|
-
setTimeout(() => {showConfirmSave = false;}, 3000);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const checkIsValid = ():void => {
|
|
232
|
-
if (invalidSecurityQuestion || invalidSecurityAnswer || invalidCity || invalidAddress || invalidPostalCode || invalidMobile) {
|
|
233
|
-
isValid = false;
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
isValid = true;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const checkMobile = ():boolean => {
|
|
241
|
-
if(playerMobileNumber && playerMobileNumber.length >= 5 && playerMobileNumber.length <= 30) {
|
|
242
|
-
return true;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return false;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
const validateMobile = ():void => {
|
|
249
|
-
invalidMobile = !checkMobile();
|
|
250
|
-
checkIsValid();
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const checkSecurityQuestion = ():boolean => {
|
|
254
|
-
if (playerQuestion && playerQuestion.length <= 120) {
|
|
255
|
-
return true;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const validateSecurityQuestion = ():void => {
|
|
262
|
-
invalidSecurityQuestion = !checkSecurityQuestion();
|
|
263
|
-
checkIsValid();
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
const checkSecurityAnswer = ():boolean => {
|
|
267
|
-
if (playerAnswer && playerAnswer.length <= 120) {
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const validateSecurityAnswer = ():void => {
|
|
275
|
-
invalidSecurityAnswer = !checkSecurityAnswer();
|
|
276
|
-
checkIsValid();
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const checkCity = ():boolean => {
|
|
280
|
-
if (playerCity.value && playerCity.value.length <= 50) {
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
return false;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const validateCity = ():void => {
|
|
288
|
-
invalidCity = !checkCity();
|
|
289
|
-
checkIsValid();
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
const checkPostalCode = ():boolean => {
|
|
293
|
-
if (playerPostalCode.value && playerPostalCode.value.length <= 20) {
|
|
294
|
-
return true;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return false;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const validatePostalCode = ():void => {
|
|
301
|
-
invalidPostalCode = !checkPostalCode();
|
|
302
|
-
checkIsValid();
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const checkAddress = ():boolean => {
|
|
306
|
-
if(playerAddress.value && playerAddress.value.length <= 100) {
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
const validateAddress = ():void => {
|
|
314
|
-
invalidAddress = !checkAddress();
|
|
315
|
-
checkIsValid();
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
const updatePlayerInfo = ():void => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
window.postMessage({ type: '
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
$:
|
|
407
|
-
$: endpoint &&
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
<
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
<
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
<
|
|
457
|
-
{
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
<
|
|
464
|
-
{
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
<
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
<
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
<
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
<
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
<
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
<
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
<
|
|
505
|
-
{
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
<
|
|
519
|
-
{
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
<
|
|
535
|
-
<span
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
{
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
<
|
|
544
|
-
<span
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
{
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
<
|
|
559
|
-
<span
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
</
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
grid-
|
|
616
|
-
grid-
|
|
617
|
-
grid-template-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
font-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
font-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
border
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
font-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
border
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
-
|
|
688
|
-
-
|
|
689
|
-
appearance: none;
|
|
690
|
-
|
|
691
|
-
background
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
input::-webkit-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
grid-
|
|
714
|
-
grid-
|
|
715
|
-
grid-template-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
font-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
-
|
|
736
|
-
-
|
|
737
|
-
appearance: none;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
border
|
|
755
|
-
-
|
|
756
|
-
-
|
|
757
|
-
transform: rotate(45deg);
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
grid-
|
|
766
|
-
grid-template-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
font-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
font-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
font-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
font-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1
|
+
<svelte:options tag={null} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
import { getDevice } from 'rvhelper';
|
|
6
|
+
import { _, addNewMessages, setLocale } from './i18n';
|
|
7
|
+
import { PlayerProfileTranslations } from './translations';
|
|
8
|
+
|
|
9
|
+
// Native bridge
|
|
10
|
+
import { isNative, call as callNative, registerEventListener as registerNativeEventListener } from 'js-native-bridge';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export let endpoint:string = '';
|
|
14
|
+
export let lang:string = 'en';
|
|
15
|
+
export let countrycode:string = 'IR';
|
|
16
|
+
|
|
17
|
+
let isLoading:boolean = true;
|
|
18
|
+
let userAgent:string = window.navigator.userAgent;
|
|
19
|
+
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
20
|
+
let noPlayerData:boolean = true;
|
|
21
|
+
|
|
22
|
+
let playerPostalCode:HTMLElement, playerAddress:HTMLElement, playerCity:HTMLElement;
|
|
23
|
+
let giveConsentSMS:boolean = false;
|
|
24
|
+
let giveConsentEmail:boolean = false;
|
|
25
|
+
let biometricsSelection:boolean = false;
|
|
26
|
+
let playerQuestion:string = '';
|
|
27
|
+
let playerAnswer:string = '';
|
|
28
|
+
let playerPrefix:string = '';
|
|
29
|
+
let playerMobileNumber:string = '';
|
|
30
|
+
let differencesExist:boolean = false;
|
|
31
|
+
let selectedCountry:Object = { Name: 'I.e Ireland'};
|
|
32
|
+
let prefixesArray:Array<Object> = [];
|
|
33
|
+
let countriesArray:Array<Object> = []
|
|
34
|
+
|
|
35
|
+
let profileConsent:Array<Object> = [];
|
|
36
|
+
let showEmail:boolean = false;
|
|
37
|
+
let showSMS:boolean = false;
|
|
38
|
+
let consentArray:any = { items: [] };
|
|
39
|
+
|
|
40
|
+
let isValid:boolean = false;
|
|
41
|
+
|
|
42
|
+
let invalidCity:string = '';
|
|
43
|
+
let invalidPostalCode:string = '';
|
|
44
|
+
let invalidAddress:string = '';
|
|
45
|
+
let invalidSecurityQuestion:boolean = false;
|
|
46
|
+
let invalidSecurityAnswer:boolean = false;
|
|
47
|
+
let invalidMobile:boolean;
|
|
48
|
+
|
|
49
|
+
let showConfirmSave:boolean = false;
|
|
50
|
+
|
|
51
|
+
// Native bridge
|
|
52
|
+
let isOnNative:boolean = false;
|
|
53
|
+
|
|
54
|
+
Object.keys(PlayerProfileTranslations).forEach((item:any) => {
|
|
55
|
+
addNewMessages(item, PlayerProfileTranslations[item]);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const mediaQuery = window.matchMedia('(min-width: 768px)');
|
|
59
|
+
|
|
60
|
+
// needed to keep track of data changes
|
|
61
|
+
let provisionalArray:any = {
|
|
62
|
+
address1: '',
|
|
63
|
+
address2: '',
|
|
64
|
+
city: '',
|
|
65
|
+
acceptNewsEmail: false,
|
|
66
|
+
acceptSMSOffers : false,
|
|
67
|
+
country: '',
|
|
68
|
+
mobile: {prefix: '', number: ''},
|
|
69
|
+
postalCode: '',
|
|
70
|
+
securityAnswer: '',
|
|
71
|
+
securityQuestion: '',
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// needed to keep track of data changes
|
|
75
|
+
let initialValuesArray:any = {
|
|
76
|
+
acceptNewsEmail: false,
|
|
77
|
+
acceptSMSOffers : false,
|
|
78
|
+
address: '',
|
|
79
|
+
city: '',
|
|
80
|
+
mobileNumber: '',
|
|
81
|
+
mobilePrefix: '',
|
|
82
|
+
postalCode: '',
|
|
83
|
+
securityAnswer: '',
|
|
84
|
+
securityQuestion: ''
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// placeholder field values
|
|
88
|
+
let profileDetails:any = {
|
|
89
|
+
address1: "i.e.: Glanmire Rd.",
|
|
90
|
+
birth: '01/01/1990',
|
|
91
|
+
city: "i.e.: Cork",
|
|
92
|
+
country: "i.e.: Ireland",
|
|
93
|
+
currency: "EUR",
|
|
94
|
+
email: "email@here.com",
|
|
95
|
+
firstname: "Joe",
|
|
96
|
+
userTitles: "M",
|
|
97
|
+
lastname: "Johnson",
|
|
98
|
+
mobile: {prefix: "+00", number: "00000000"},
|
|
99
|
+
postalCode: "i.e.: 465531",
|
|
100
|
+
securityAnswer: "i.e.: Jerry",
|
|
101
|
+
securityQuestion: "i.e.: Pet name?",
|
|
102
|
+
title: "",
|
|
103
|
+
username: "Username"
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
let {address1, birth, city, country, currency, mobile, email, firstname, userTitles, language, lastname, postalCode, securityAnswer, securityQuestion, username, consents} = profileDetails;
|
|
107
|
+
|
|
108
|
+
const messageHandler = (e:any):void => {
|
|
109
|
+
if (e.data) {
|
|
110
|
+
switch(e.data.type) {
|
|
111
|
+
case 'ProfileDetailsData':
|
|
112
|
+
noPlayerData = false;
|
|
113
|
+
profileDetails = e.data.profileDetails;
|
|
114
|
+
|
|
115
|
+
// readonly field values
|
|
116
|
+
username = profileDetails.username;
|
|
117
|
+
mobile = profileDetails.mobile;
|
|
118
|
+
email = profileDetails.email;
|
|
119
|
+
firstname = profileDetails.firstname;
|
|
120
|
+
lastname = profileDetails.lastname;
|
|
121
|
+
language = profileDetails.language;
|
|
122
|
+
birth = profileDetails.birth?.day + '/' + profileDetails.birth?.month + '/' + profileDetails.birth?.year;
|
|
123
|
+
currency = profileDetails.currency;
|
|
124
|
+
userTitles = profileDetails.title;
|
|
125
|
+
|
|
126
|
+
// editable field values used for bindings
|
|
127
|
+
playerQuestion = profileDetails.securityQuestion;
|
|
128
|
+
playerAnswer = profileDetails.securityAnswer;
|
|
129
|
+
playerPrefix = profileDetails.mobile?.prefix;
|
|
130
|
+
playerMobileNumber = profileDetails.mobile?.number;
|
|
131
|
+
|
|
132
|
+
// set values for the initial editable values object
|
|
133
|
+
initialValuesArray = {
|
|
134
|
+
address: profileDetails.address1,
|
|
135
|
+
city: profileDetails.city,
|
|
136
|
+
mobilePrefix: mobile?.prefix,
|
|
137
|
+
mobileNumber: mobile?.number,
|
|
138
|
+
postalCode: profileDetails.postalCode,
|
|
139
|
+
securityAnswer: profileDetails.securityAnswer,
|
|
140
|
+
securityQuestion: profileDetails.securityQuestion,
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
|
|
144
|
+
case 'ProfileConsentData':
|
|
145
|
+
profileConsent = e.data.consent.items;
|
|
146
|
+
if (Array.isArray(profileConsent)) {
|
|
147
|
+
profileConsent.forEach((item) => {
|
|
148
|
+
if (item.tagCode == 'emailmarketing') {
|
|
149
|
+
showEmail = true;
|
|
150
|
+
giveConsentEmail = item.status == 'Accepted';
|
|
151
|
+
initialValuesArray.acceptNewsEmail = giveConsentEmail;
|
|
152
|
+
} else if (item.tagCode == 'sms') {
|
|
153
|
+
showSMS = true;
|
|
154
|
+
giveConsentSMS = item.status == 'Accepted';
|
|
155
|
+
initialValuesArray.acceptSMSOffers = giveConsentSMS;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
|
|
161
|
+
case 'ConfirmProfileInfoSave':
|
|
162
|
+
if (isOnNative) {
|
|
163
|
+
registerNativeEventListener(
|
|
164
|
+
'BIOMETRICS_ENABLED',
|
|
165
|
+
(biometricsEnabled) => {
|
|
166
|
+
if (biometricsEnabled !== biometricsSelection) {
|
|
167
|
+
biometricsSelection = biometricsEnabled;
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
const methodFound = callNative(
|
|
173
|
+
biometricsSelection ? 'ENABLE_BIOMETRICS' : 'DISABLE_BIOMETRICS',
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
if (!methodFound) {
|
|
177
|
+
// Nothing to do here yet
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
differencesExist = false;
|
|
182
|
+
|
|
183
|
+
showConfirmMessage();
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const getCountriesList = ():void => {
|
|
190
|
+
fetch(`${endpoint}/player/countries`)
|
|
191
|
+
.then((res:any) => {
|
|
192
|
+
if (res.status >= 300) {
|
|
193
|
+
return new Error('Error while fetching the countries');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return res.json();
|
|
197
|
+
})
|
|
198
|
+
.then((countryList:any) => {
|
|
199
|
+
fetch(`${endpoint}/player/operatorSupportedCountries`).then((res:any) => {
|
|
200
|
+
if (res.status >= 300) {
|
|
201
|
+
return new Error('Error while fetching the supported countries');
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return res.json();
|
|
205
|
+
})
|
|
206
|
+
.then((supportedCountries:any) => {
|
|
207
|
+
countriesArray = countryList.countries.filter((item:any) => {
|
|
208
|
+
return supportedCountries.countries.indexOf(item.Alpha2Code) >= 0;
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
selectedCountry = countriesArray.find((country:any) => country.Alpha2Code === countrycode) || { Name: 'I.E. Ireland'};
|
|
212
|
+
isLoading = false;
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const getPhoneCodes = ():void => {
|
|
218
|
+
fetch(`${endpoint}/player/phonecodes`)
|
|
219
|
+
.then((res:any) => res.json())
|
|
220
|
+
.then(data => {
|
|
221
|
+
prefixesArray = data.phoneCodes;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const showConfirmMessage = ():void => {
|
|
226
|
+
showConfirmSave = true;
|
|
227
|
+
setTimeout(() => {showConfirmSave = false;}, 3000);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
const checkIsValid = ():void => {
|
|
232
|
+
if (invalidSecurityQuestion || invalidSecurityAnswer || invalidCity || invalidAddress || invalidPostalCode || invalidMobile) {
|
|
233
|
+
isValid = false;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
isValid = true;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const checkMobile = ():boolean => {
|
|
241
|
+
if(playerMobileNumber && playerMobileNumber.length >= 5 && playerMobileNumber.length <= 30) {
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const validateMobile = ():void => {
|
|
249
|
+
invalidMobile = !checkMobile();
|
|
250
|
+
checkIsValid();
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const checkSecurityQuestion = ():boolean => {
|
|
254
|
+
if (playerQuestion && playerQuestion.length <= 120) {
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const validateSecurityQuestion = ():void => {
|
|
262
|
+
invalidSecurityQuestion = !checkSecurityQuestion();
|
|
263
|
+
checkIsValid();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const checkSecurityAnswer = ():boolean => {
|
|
267
|
+
if (playerAnswer && playerAnswer.length <= 120) {
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const validateSecurityAnswer = ():void => {
|
|
275
|
+
invalidSecurityAnswer = !checkSecurityAnswer();
|
|
276
|
+
checkIsValid();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const checkCity = ():boolean => {
|
|
280
|
+
if (playerCity.value && playerCity.value.length <= 50) {
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const validateCity = ():void => {
|
|
288
|
+
invalidCity = !checkCity();
|
|
289
|
+
checkIsValid();
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const checkPostalCode = ():boolean => {
|
|
293
|
+
if (playerPostalCode.value && playerPostalCode.value.length <= 20) {
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const validatePostalCode = ():void => {
|
|
301
|
+
invalidPostalCode = !checkPostalCode();
|
|
302
|
+
checkIsValid();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const checkAddress = ():boolean => {
|
|
306
|
+
if(playerAddress.value && playerAddress.value.length <= 100) {
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const validateAddress = ():void => {
|
|
314
|
+
invalidAddress = !checkAddress();
|
|
315
|
+
checkIsValid();
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const updatePlayerInfo = (e):void => {
|
|
319
|
+
e.preventDefault();
|
|
320
|
+
if (differencesExist == true && isValid == true) {
|
|
321
|
+
window.postMessage({ type: 'UpdatePlayerInfo', provisionalArray }, window.location.href);
|
|
322
|
+
window.postMessage({ type: 'UpdatePlayerConsent', consentArray }, window.location.href);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const toggleScreen = ():void => {
|
|
327
|
+
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const checkForChanges = ():void => {
|
|
331
|
+
provisionalArray = {
|
|
332
|
+
acceptNewsEmail: giveConsentEmail,
|
|
333
|
+
acceptSMSOffers: giveConsentSMS,
|
|
334
|
+
address: playerAddress.value,
|
|
335
|
+
city: playerCity.value,
|
|
336
|
+
mobileNumber: playerMobileNumber,
|
|
337
|
+
mobilePrefix: playerPrefix,
|
|
338
|
+
postalCode: playerPostalCode.value,
|
|
339
|
+
securityAnswer: playerAnswer,
|
|
340
|
+
securityQuestion: playerQuestion,
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
checkEquality(provisionalArray, initialValuesArray);
|
|
344
|
+
consentData();
|
|
345
|
+
checkIsValid();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const consentData = ():void => {
|
|
349
|
+
consentArray = { items: [] };
|
|
350
|
+
if (showSMS) {
|
|
351
|
+
consentArray.items.push({'tagCode': 'sms', 'status': giveConsentSMS ? 'Accepted' : 'Denied'})
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (showEmail) {
|
|
355
|
+
consentArray.items.push({'tagCode': 'emailmarketing', 'status': giveConsentEmail ? 'Accepted' : 'Denied'})
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const resetPlayerInfo = ():void => {
|
|
360
|
+
playerAddress.value = initialValuesArray.address;
|
|
361
|
+
playerCity.value = initialValuesArray.city;
|
|
362
|
+
giveConsentEmail = initialValuesArray.acceptNewsEmail;
|
|
363
|
+
giveConsentSMS = initialValuesArray.acceptSMSOffers;
|
|
364
|
+
playerPrefix = initialValuesArray.mobilePrefix;
|
|
365
|
+
playerMobileNumber = initialValuesArray.mobileNumber;
|
|
366
|
+
playerPostalCode.value = initialValuesArray.postalCode;
|
|
367
|
+
playerAnswer = initialValuesArray.securityAnswer;
|
|
368
|
+
playerQuestion = initialValuesArray.securityQuestion;
|
|
369
|
+
|
|
370
|
+
toggleScreen();
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const checkEquality = (a, b):void => {
|
|
374
|
+
if(JSON.stringify(a) === JSON.stringify(b)) {
|
|
375
|
+
differencesExist = false;
|
|
376
|
+
} else {
|
|
377
|
+
differencesExist = true;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const setActiveLanguage = ():void => {
|
|
382
|
+
setLocale(lang);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
onMount(() => {
|
|
386
|
+
window.addEventListener('message', messageHandler, false);
|
|
387
|
+
|
|
388
|
+
isOnNative = !!isNative(userAgent);
|
|
389
|
+
|
|
390
|
+
if (isOnNative) {
|
|
391
|
+
registerNativeEventListener(
|
|
392
|
+
'BIOMETRICS_ENABLED',
|
|
393
|
+
(biometricsEnabled) => {
|
|
394
|
+
biometricsSelection = !!biometricsEnabled
|
|
395
|
+
},
|
|
396
|
+
);
|
|
397
|
+
|
|
398
|
+
callNative('BIOMETRICS_ENABLED');
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return () => {
|
|
402
|
+
window.removeEventListener('message', messageHandler);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
$: lang && setActiveLanguage();
|
|
407
|
+
$: endpoint && countrycode && getCountriesList();
|
|
408
|
+
$: endpoint && getPhoneCodes();
|
|
409
|
+
</script>
|
|
410
|
+
|
|
411
|
+
{#if isLoading}
|
|
412
|
+
<div class="ModalLoader" part="ModalLoader"></div>
|
|
413
|
+
{:else}
|
|
414
|
+
<form class="PlayerInfoWrapper {isMobile ? 'PlayerInfoWrapperMobile' : ''} {mediaQuery.matches && isMobile ? 'PlayerInfoWrapperTablet' : ''}" part="PlayerInfoWrapper {isMobile ? 'PlayerInfoWrapperMobile' : ''} {mediaQuery.matches && isMobile ? 'PlayerInfoWrapperTablet' : ''}">
|
|
415
|
+
|
|
416
|
+
{#if isMobile}
|
|
417
|
+
<div class="MenuReturnButton" part="MenuReturnButton" on:click={() => toggleScreen()}>
|
|
418
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"><defs><style>.aaa{fill:var(--emfe-w-color-primary, #D0046C);}</style></defs><g transform="translate(-20 -158)">
|
|
419
|
+
<g transform="translate(20 158)">
|
|
420
|
+
<path class="aaa" d="M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z" transform="translate(15 15) rotate(180)"/>
|
|
421
|
+
</g></g>
|
|
422
|
+
</svg>
|
|
423
|
+
<h2 class="MyAccountCategoryTitleMobile" part="MyAccountCategoryTitleMobile">{$_('playerProfile.title')}</h2>
|
|
424
|
+
</div>
|
|
425
|
+
{/if}
|
|
426
|
+
|
|
427
|
+
<h2 class="MyAccountCategoryTitle {isMobile ? 'MyAccountCategoryTitleNone' : ''}" part="MyAccountCategoryTitle {isMobile ? 'MyAccountCategoryTitleNone' : ''}">{$_('playerProfile.title')}</h2>
|
|
428
|
+
|
|
429
|
+
<div class="PlayerNotificationsHeader" part="PlayerNotificationsHeader">
|
|
430
|
+
<h3>{$_('playerProfile.personalDetails')}</h3>
|
|
431
|
+
</div>
|
|
432
|
+
<section class="PlayerDetailsContent" part="PlayerDetailsContent">
|
|
433
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
434
|
+
<label>{$_('playerProfile.userName')}</label>
|
|
435
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={username} readonly />
|
|
436
|
+
</div>
|
|
437
|
+
<div class="PlayerInfoBox {invalidMobile ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidMobile ? 'InvalidField' : ''}">
|
|
438
|
+
<label>{$_('playerProfile.userPhone')}</label>
|
|
439
|
+
<div class="PlayerPhoneNumber" part="PlayerPhoneNumber">
|
|
440
|
+
<select bind:value={playerPrefix} on:change={() => checkForChanges()}>
|
|
441
|
+
{#each prefixesArray as pref}
|
|
442
|
+
{#if pref.Prefix === initialValuesArray.mobiePrefix}
|
|
443
|
+
<option selected>{pref.Prefix}</option>
|
|
444
|
+
{:else}
|
|
445
|
+
<option>{pref.Prefix}</option>
|
|
446
|
+
{/if}
|
|
447
|
+
{/each}
|
|
448
|
+
</select>
|
|
449
|
+
<input bind:value={playerMobileNumber} on:keyup={validateMobile} type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');" placeholder={noPlayerData ? mobile.number : ''} on:keyup={() => checkForChanges()}/>
|
|
450
|
+
</div>
|
|
451
|
+
{#if invalidMobile}
|
|
452
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.userPhoneError')}</p>
|
|
453
|
+
{/if}
|
|
454
|
+
</div>
|
|
455
|
+
<div class="PlayerInfoBox {invalidSecurityQuestion ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidSecurityQuestion ? 'InvalidField' : ''}">
|
|
456
|
+
<label>{$_('playerProfile.securityQuestion')}</label>
|
|
457
|
+
<input type="text" bind:value={playerQuestion} on:keyup={() => checkForChanges()} on:blur={validateSecurityQuestion} placeholder={noPlayerData ? securityQuestion : ''} />
|
|
458
|
+
{#if invalidSecurityQuestion}
|
|
459
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.securityQuestionError')}</p>
|
|
460
|
+
{/if}
|
|
461
|
+
</div>
|
|
462
|
+
<div class="PlayerInfoBox {invalidSecurityAnswer ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidSecurityAnswer ? 'InvalidField' : ''}">
|
|
463
|
+
<label>{$_('playerProfile.securityAnswer')}</label>
|
|
464
|
+
<input type="text" bind:value={playerAnswer} on:keyup={() => checkForChanges()} on:blur={validateSecurityAnswer} placeholder={noPlayerData ? securityAnswer : ''} />
|
|
465
|
+
{#if invalidSecurityAnswer}
|
|
466
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.securityAnswerError')}</p>
|
|
467
|
+
{/if}
|
|
468
|
+
</div>
|
|
469
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
470
|
+
<label>{$_('playerProfile.userEmail')}</label>
|
|
471
|
+
<input type="email" class="FieldDisabled" part="FieldDisabled" value={email} readonly />
|
|
472
|
+
</div>
|
|
473
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
474
|
+
<label>{$_('playerProfile.dateOfBirth')}</label>
|
|
475
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={birth} readonly />
|
|
476
|
+
</div>
|
|
477
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
478
|
+
<label>{$_('playerProfile.firstName')}</label>
|
|
479
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={firstname} readonly />
|
|
480
|
+
</div>
|
|
481
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
482
|
+
<label>{$_('playerProfile.lastName')}</label>
|
|
483
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={lastname} readonly />
|
|
484
|
+
</div>
|
|
485
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
486
|
+
<label>{$_('playerProfile.userTitle')}</label>
|
|
487
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={userTitles} readonly />
|
|
488
|
+
</div>
|
|
489
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
490
|
+
<label>{$_('playerProfile.currency')}</label>
|
|
491
|
+
<input type="text" class="FieldDisabled" part="FieldDisabled" value={currency} readonly />
|
|
492
|
+
</div>
|
|
493
|
+
</section>
|
|
494
|
+
|
|
495
|
+
<div class="PlayerLocationHeader" part="PlayerLocationHeader">
|
|
496
|
+
<h3>{$_('playerProfile.locationDetails')}</h3>
|
|
497
|
+
</div>
|
|
498
|
+
<section class="PlayerLocationContent" part="PlayerLocationContent">
|
|
499
|
+
<div class="PlayerInfoBox" part="PlayerInfoBox">
|
|
500
|
+
<label>{$_('playerProfile.userCountry')}</label>
|
|
501
|
+
<input type="text" class="PlayerCountry FieldDisabled" part="PlayerCountry FieldDisabled" placeholder={countrycode} value={selectedCountry.Name} readonly />
|
|
502
|
+
</div>
|
|
503
|
+
<div class="PlayerInfoBox {invalidCity ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidCity ? 'InvalidField' : ''}">
|
|
504
|
+
<label>{$_('playerProfile.userCity')}</label>
|
|
505
|
+
<input bind:this={playerCity} type="text" on:blur={validateCity} on:keyup={() => checkForChanges()} placeholder={noPlayerData ? city : ''} value={noPlayerData ? '' : initialValuesArray.city} />
|
|
506
|
+
{#if invalidCity}
|
|
507
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.userCityError')}</p>
|
|
508
|
+
{/if}
|
|
509
|
+
</div>
|
|
510
|
+
<div class="PlayerInfoBox {invalidAddress ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidAddress ? 'InvalidField' : ''}">
|
|
511
|
+
<label>{$_('playerProfile.userAddress')}</label>
|
|
512
|
+
<input bind:this={playerAddress} placeholder={address1} type="text" on:blur={validateAddress} on:keyup={() => checkForChanges()} value={noPlayerData ? '' : initialValuesArray.address} />
|
|
513
|
+
{#if invalidAddress}
|
|
514
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.userAddressError')}</p>
|
|
515
|
+
{/if}
|
|
516
|
+
</div>
|
|
517
|
+
<div class="PlayerInfoBox {invalidPostalCode ? 'InvalidField' : ''}" part="PlayerInfoBox {invalidPostalCode ? 'InvalidField' : ''}">
|
|
518
|
+
<label>{$_('playerProfile.userPostalCode')}</label>
|
|
519
|
+
<input bind:this={playerPostalCode} type="text" on:blur={validatePostalCode} on:keyup={() => checkForChanges()} placeholder={noPlayerData ? postalCode : ''} value={noPlayerData ? '' : initialValuesArray.postalCode} />
|
|
520
|
+
{#if invalidPostalCode}
|
|
521
|
+
<p class="InvalidInput" part="InvalidInput">{$_('playerProfile.userPostalCodeError')}</p>
|
|
522
|
+
{/if}
|
|
523
|
+
</div>
|
|
524
|
+
</section>
|
|
525
|
+
|
|
526
|
+
{#if showEmail || showSMS}
|
|
527
|
+
<div class="PlayerNotificationsHeader" part="PlayerNotificationsHeader">
|
|
528
|
+
<h3>{$_('playerProfile.userNotifications')}</h3>
|
|
529
|
+
</div>
|
|
530
|
+
<section class="PlayerNotificationsCheckboxArea" part="PlayerNotificationsCheckboxArea">
|
|
531
|
+
{#if showSMS}
|
|
532
|
+
<div class="PlayerNotificationBox" part="PlayerNotificationBox">
|
|
533
|
+
<label for="SMSNotification">
|
|
534
|
+
<input bind:checked={giveConsentSMS} on:change={checkForChanges} type="checkbox" id="SMSNotification" name="Enable SMS notifications" />
|
|
535
|
+
<span class="Checkmark" part="Checkmark"></span>
|
|
536
|
+
<span>{$_('playerProfile.userSMSNotification')}</span>
|
|
537
|
+
</label>
|
|
538
|
+
</div>
|
|
539
|
+
{/if}
|
|
540
|
+
{#if showEmail}
|
|
541
|
+
<div class="PlayerNotificationBox" part="PlayerNotificationBox">
|
|
542
|
+
<label for="EmailNotification">
|
|
543
|
+
<input bind:checked={giveConsentEmail} on:change={checkForChanges} type="checkbox" id="EmailNotification" name="Enable Emails" />
|
|
544
|
+
<span class="Checkmark" part="Checkmark"></span>
|
|
545
|
+
<span>{$_('playerProfile.userEmailNotification')}</span>
|
|
546
|
+
</label>
|
|
547
|
+
</div>
|
|
548
|
+
{/if}
|
|
549
|
+
</section>
|
|
550
|
+
{/if}
|
|
551
|
+
{#if isOnNative}
|
|
552
|
+
<div class="PlayerNotificationsHeader" part="PlayerNotificationsHeader">
|
|
553
|
+
<h3>{$_('playerProfile.userAppSettings')}</h3>
|
|
554
|
+
</div>
|
|
555
|
+
<section class="PlayerNotificationsCheckboxArea" part="PlayerNotificationsCheckboxArea">
|
|
556
|
+
<div class="PlayerNotificationBox" part="PlayerNotificationBox">
|
|
557
|
+
<label for="Biometrics">
|
|
558
|
+
<input bind:checked={biometricsSelection} on:change={checkForChanges} type="checkbox" id="BiometricsEnabled" name="Biometric Enabled" />
|
|
559
|
+
<span class="Checkmark" part="Checkmark"></span>
|
|
560
|
+
<span>{$_('playerProfile.userBiometrics')}</span>
|
|
561
|
+
</label>
|
|
562
|
+
</div>
|
|
563
|
+
</section>
|
|
564
|
+
{/if}
|
|
565
|
+
<section class="PlayerDetailsButtonsArea {isMobile ? 'PlayerDetailsButtonsAreaMobile' : ''}" part="PlayerDetailsButtonsArea {isMobile ? 'PlayerDetailsButtonsAreaMobile' : ''}">
|
|
566
|
+
<button class="PlayerDetailsSaveButton {differencesExist && isValid ? '' : 'PlayerButtonDisabled'}" part="PlayerDetailsSaveButton {differencesExist && isValid ? '' : 'PlayerButtonDisabled'}" on:click={(e) => updatePlayerInfo(e)}>{$_('playerProfile.userProfileSaveChanges')}</button>
|
|
567
|
+
</section>
|
|
568
|
+
{#if showConfirmSave}
|
|
569
|
+
<section class="PlayerDetailsConfirmSave" part="PlayerDetailsConfirmSave">
|
|
570
|
+
<p class="PlayerDetailsConfirmSaveText" part="PlayerDetailsConfirmSaveText">{$_('playerProfile.userProfileConfirmationMessage')}</p>
|
|
571
|
+
</section>
|
|
572
|
+
{/if}
|
|
573
|
+
</form>
|
|
574
|
+
{/if}
|
|
575
|
+
|
|
576
|
+
<style lang="scss">
|
|
577
|
+
|
|
578
|
+
:host {
|
|
579
|
+
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.MyAccountCategoryTitle {
|
|
583
|
+
font-size: 26px;
|
|
584
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
585
|
+
font-weight: 400;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.MyAccountCategoryTitleMobile {
|
|
589
|
+
font-size: 16px;
|
|
590
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.MyAccountCategoryTitleNone {
|
|
594
|
+
display: none;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.PlayerInfoWrapper {
|
|
598
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
599
|
+
background: var(--emfe-w-color-gray-50, #F9F8F8);
|
|
600
|
+
padding: 50px;
|
|
601
|
+
max-width: 760px;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.PlayerNotificationsHeader, .PlayerDetailsHeader, .PlayerLocationHeader {
|
|
605
|
+
h3 {
|
|
606
|
+
font-size: 16px;
|
|
607
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
608
|
+
text-transform: capitalize;
|
|
609
|
+
font-weight: 400;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.PlayerDetailsContent {
|
|
614
|
+
display: grid;
|
|
615
|
+
grid-column-gap: 50px;
|
|
616
|
+
grid-row-gap: 24px;
|
|
617
|
+
grid-template-rows: auto;
|
|
618
|
+
grid-template-columns: 1fr 1fr;
|
|
619
|
+
padding-bottom: 30px;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.MenuReturnButton{
|
|
623
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
624
|
+
display: inline-flex;
|
|
625
|
+
align-items: center;
|
|
626
|
+
column-gap: 10px;
|
|
627
|
+
margin-bottom: 10px;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.PlayerInfoBox {
|
|
631
|
+
display: flex;
|
|
632
|
+
flex-direction: column;
|
|
633
|
+
label {
|
|
634
|
+
font-size: 14px;
|
|
635
|
+
font-weight: 300;
|
|
636
|
+
margin-bottom: 10px;
|
|
637
|
+
}
|
|
638
|
+
input {
|
|
639
|
+
font-size: 14px;
|
|
640
|
+
font-weight: 300;
|
|
641
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
642
|
+
padding: 10px;
|
|
643
|
+
line-height: 16px;
|
|
644
|
+
background: var(--emfe-w-color-white, #FFFFFF);
|
|
645
|
+
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
646
|
+
border-radius: 5px;
|
|
647
|
+
outline: none;
|
|
648
|
+
transition-duration: 0.3s;
|
|
649
|
+
&:focus, :focus-within, :focus-visible, :visited {
|
|
650
|
+
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
651
|
+
box-shadow: 0 0 0 1pt var(--emfe-w-color-primary, #D0046C);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
&.InvalidField {
|
|
656
|
+
input {
|
|
657
|
+
border: 1px solid var(--emfe-w-color-error, #FD2839);
|
|
658
|
+
background: var(--emfe-w-color-primary-50, #FBECF4);
|
|
659
|
+
color: var(--emfe-w-color-error, #FD2839);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.InvalidInput {
|
|
664
|
+
color: var(--emfe-w-color-error, #FD2839);
|
|
665
|
+
font-size: 10px;
|
|
666
|
+
line-height: 10px;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
.FieldDisabled {
|
|
671
|
+
opacity: 0.5;
|
|
672
|
+
}
|
|
673
|
+
.PlayerPhoneNumber {
|
|
674
|
+
display: grid;
|
|
675
|
+
grid-template-columns: 2fr 4fr;
|
|
676
|
+
column-gap: 10px;
|
|
677
|
+
position: relative;
|
|
678
|
+
}
|
|
679
|
+
select {
|
|
680
|
+
font-size: 14px;
|
|
681
|
+
font-weight: 300;
|
|
682
|
+
padding: 10px;
|
|
683
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
684
|
+
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
685
|
+
border-radius: 5px;
|
|
686
|
+
outline: none;
|
|
687
|
+
transition-duration: 0.3s;
|
|
688
|
+
-webkit-appearance: none;
|
|
689
|
+
-moz-appearance: none;
|
|
690
|
+
appearance: none;
|
|
691
|
+
background: url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emfe-w-color-white, #FFFFFF);
|
|
692
|
+
background-position: calc(100% - 0.75rem) center;
|
|
693
|
+
&:focus, :focus-within, :focus-visible, :visited {
|
|
694
|
+
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
695
|
+
box-shadow: 0 0 0 1pt var(--emfe-w-color-primary, #D0046C);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
/* Chrome, Safari, Edge, Opera */
|
|
699
|
+
input::-webkit-outer-spin-button,
|
|
700
|
+
input::-webkit-inner-spin-button {
|
|
701
|
+
-webkit-appearance: none;
|
|
702
|
+
margin: 0;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/* Firefox */
|
|
706
|
+
input[type=number] {
|
|
707
|
+
-moz-appearance: textfield;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.PlayerLocationContent {
|
|
712
|
+
display: grid;
|
|
713
|
+
grid-column-gap: 50px;
|
|
714
|
+
grid-row-gap: 24px;
|
|
715
|
+
grid-template-rows: auto;
|
|
716
|
+
grid-template-columns: 1fr 1fr;
|
|
717
|
+
padding-bottom: 30px;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.PlayerNotificationBox {
|
|
721
|
+
&:first-child {
|
|
722
|
+
margin-bottom: 10px;
|
|
723
|
+
}
|
|
724
|
+
label {
|
|
725
|
+
display: inline-flex;
|
|
726
|
+
position: relative;
|
|
727
|
+
align-items: center;
|
|
728
|
+
span {
|
|
729
|
+
font-size: 14px;
|
|
730
|
+
font-weight: 300;
|
|
731
|
+
}
|
|
732
|
+
input {
|
|
733
|
+
height: 20px;
|
|
734
|
+
width: 20px;
|
|
735
|
+
-webkit-appearance: none;
|
|
736
|
+
-moz-appearance: none;
|
|
737
|
+
-o-appearance: none;
|
|
738
|
+
appearance: none;
|
|
739
|
+
border-radius: 50px;
|
|
740
|
+
outline: none;
|
|
741
|
+
transition-duration: 0.3s;
|
|
742
|
+
background-color: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
743
|
+
cursor: pointer;
|
|
744
|
+
margin-right: 10px;
|
|
745
|
+
}
|
|
746
|
+
input:checked {
|
|
747
|
+
background-color: var(--emfe-w-color-primary, #D0046C);
|
|
748
|
+
}
|
|
749
|
+
.Checkmark {
|
|
750
|
+
left: 10px;
|
|
751
|
+
top: 7px;
|
|
752
|
+
width: 4px;
|
|
753
|
+
height: 8px;
|
|
754
|
+
border: solid white;
|
|
755
|
+
border-width: 0 2px 2px 0;
|
|
756
|
+
-webkit-transform: rotate(45deg);
|
|
757
|
+
-ms-transform: rotate(45deg);
|
|
758
|
+
transform: rotate(45deg);
|
|
759
|
+
position: absolute;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.PlayerDetailsButtonsArea {
|
|
765
|
+
grid-column-gap: 10px;
|
|
766
|
+
grid-template-rows: auto;
|
|
767
|
+
grid-template-columns: 1fr;
|
|
768
|
+
margin-top: 20px;
|
|
769
|
+
width: 50%;
|
|
770
|
+
|
|
771
|
+
.PlayerDetailsSaveButton, .PlayerDetailsCancelButton {
|
|
772
|
+
cursor: pointer;
|
|
773
|
+
border-radius: 5px;
|
|
774
|
+
width: 100%;
|
|
775
|
+
height: 50px;
|
|
776
|
+
display: flex;
|
|
777
|
+
align-items: center;
|
|
778
|
+
justify-content: center;
|
|
779
|
+
font-size: 16px;
|
|
780
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
781
|
+
text-transform: uppercase;
|
|
782
|
+
transition-duration: 0.3s;
|
|
783
|
+
box-sizing: border-box;
|
|
784
|
+
}
|
|
785
|
+
.PlayerDetailsSaveButton {
|
|
786
|
+
background: var(--emfe-w-color-primary, #D0046C);
|
|
787
|
+
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
|
788
|
+
color: var(--emfe-w-color-white, #FFFFFF);
|
|
789
|
+
&:active {
|
|
790
|
+
background: var(--emfe-w-color-primary-600, #99034F);
|
|
791
|
+
}
|
|
792
|
+
&.PlayerButtonDisabled {
|
|
793
|
+
opacity: 0.3;
|
|
794
|
+
cursor: not-allowed;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.PlayerDetailsCancelButton {
|
|
799
|
+
background: transparent;
|
|
800
|
+
border: 1px solid var(--emfe-w-color-gray-300, #58586B);
|
|
801
|
+
&:active {
|
|
802
|
+
background: var(--emfe-w-color-primary-600, #99034F);
|
|
803
|
+
}
|
|
804
|
+
&.PlayerButtonDisabled {
|
|
805
|
+
background: transparent;
|
|
806
|
+
border: 1px solid var(--emfe-w-color-gray-300, #58586B);
|
|
807
|
+
cursor: not-allowed;
|
|
808
|
+
opacity: 0.6;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
&.PlayerDetailsButtonsAreaMobile {
|
|
812
|
+
width: 100%;
|
|
813
|
+
grid-template-columns: 1fr 1fr;
|
|
814
|
+
.PlayerDetailsSaveButton, .PlayerDetailsCancelButton {
|
|
815
|
+
height: 40px;
|
|
816
|
+
font-size: 12px;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.PlayerNotificationsCheckboxArea {
|
|
822
|
+
padding-bottom: 30px;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.PlayerInfoWrapperMobile {
|
|
826
|
+
padding: 20px 15px;
|
|
827
|
+
background: var(--emfe-w-color-gray-50, #F9F8F8);
|
|
828
|
+
max-width: unset;
|
|
829
|
+
.PlayerDetailsContent {
|
|
830
|
+
grid-template-columns: 1fr;
|
|
831
|
+
}
|
|
832
|
+
.PlayerNotificationsHeader, .PlayerDetailsHeader, .PlayerLocationHeader {
|
|
833
|
+
h3 {
|
|
834
|
+
color: var(--emfe-w-color-primary, #D0046C);
|
|
835
|
+
font-size: 14px;
|
|
836
|
+
font-weight: 400;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
.PlayerInfoBox {
|
|
840
|
+
label {
|
|
841
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
842
|
+
font-size: 12px;
|
|
843
|
+
font-weight: 400;
|
|
844
|
+
}
|
|
845
|
+
input {
|
|
846
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
847
|
+
font-size: 12px;
|
|
848
|
+
font-weight: 300;
|
|
849
|
+
}
|
|
850
|
+
select {
|
|
851
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
.PlayerLocationContent {
|
|
855
|
+
grid-template-columns: 1fr;
|
|
856
|
+
}
|
|
857
|
+
.PlayerNotificationsCheckboxArea {
|
|
858
|
+
.PlayerNotificationBox {
|
|
859
|
+
label {
|
|
860
|
+
color: var(--emfe-w-color-contrast, #07072A);
|
|
861
|
+
font-size: 12px;
|
|
862
|
+
font-weight: 300;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
.PlayerDetailsButtonsArea {
|
|
867
|
+
grid-column-gap: 10px;
|
|
868
|
+
}
|
|
869
|
+
.PlayerDetailsSaveButton, .PlayerDetailsCancelButton {
|
|
870
|
+
font-size: 12px;
|
|
871
|
+
height: 40px;
|
|
872
|
+
color: var(--emfe-w-color-white, #FFFFFF);
|
|
873
|
+
&.PlayerButtonDisabled {
|
|
874
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
.PlayerDetailsCancelButton {
|
|
878
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.PlayerInfoWrapperTablet {
|
|
883
|
+
padding: 40px 25% 40px 25%;
|
|
884
|
+
.PlayerDetailsContent {
|
|
885
|
+
grid-row-gap: 20px;
|
|
886
|
+
}
|
|
887
|
+
.MenuReturnButton {
|
|
888
|
+
margin-bottom: 30px;
|
|
889
|
+
span {
|
|
890
|
+
font-size: 20px;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
.PlayerDetailsHeader, .PlayerLocationHeader, .PlayerNotificationsHeader {
|
|
894
|
+
h3 {
|
|
895
|
+
font-size: 24px;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
.PlayerInfoBox {
|
|
899
|
+
label {
|
|
900
|
+
font-size: 20px;
|
|
901
|
+
}
|
|
902
|
+
input {
|
|
903
|
+
height: 30px;
|
|
904
|
+
font-size: 20px;
|
|
905
|
+
line-height: 30px;
|
|
906
|
+
}
|
|
907
|
+
select {
|
|
908
|
+
font-size: 20px;
|
|
909
|
+
}
|
|
910
|
+
.TogglePasswordVisibility {
|
|
911
|
+
width: 30px;
|
|
912
|
+
top: 26px;
|
|
913
|
+
}
|
|
914
|
+
.InvalidInput {
|
|
915
|
+
font-size: 16px;
|
|
916
|
+
bottom: - 50px;
|
|
917
|
+
}
|
|
918
|
+
&:last-child {
|
|
919
|
+
.InvalidInput {
|
|
920
|
+
font-size: 16px;
|
|
921
|
+
bottom: -50px;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
.PlayerDetailsButtonsArea {
|
|
926
|
+
grid-column-gap: 40px;
|
|
927
|
+
.PlayerDetailsSaveButton, .PlayerDetailsCancelButton {
|
|
928
|
+
font-size: 20px;
|
|
929
|
+
height: 56px;
|
|
930
|
+
}
|
|
931
|
+
.PlayerDetailsSaveButton {
|
|
932
|
+
color: var(--emfe-w-color-white, #FFFFFF);
|
|
933
|
+
&.PlayerButtonDisabled {
|
|
934
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
.PlayerNotificationBox {
|
|
939
|
+
label {
|
|
940
|
+
span {
|
|
941
|
+
font-size: 20px;
|
|
942
|
+
}
|
|
943
|
+
input {
|
|
944
|
+
height: 26px;
|
|
945
|
+
width: 26px;
|
|
946
|
+
}
|
|
947
|
+
.Checkmark {
|
|
948
|
+
left: 50px;
|
|
949
|
+
top: 9px;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
.PlayerDetailsConfirmSave {
|
|
955
|
+
background: var(--emfe-w-color-green, #48952a);
|
|
956
|
+
color: var(--emfe-w-color-white, #FFFFFF);
|
|
957
|
+
padding: 16px;
|
|
958
|
+
border-radius: 5px;
|
|
959
|
+
margin-top: 16px;
|
|
960
|
+
.PlayerDetailsConfirmSaveText {
|
|
961
|
+
padding: 0;
|
|
962
|
+
margin: 0;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
</style>
|