@everymatrix/general-player-register-form-step2 1.44.0 → 1.45.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/components/GeneralPlayerRegisterFormStep2-CSfMWfBL.cjs +12 -0
- package/components/GeneralPlayerRegisterFormStep2-CTv-KZRr.js +7849 -0
- package/es2015/general-player-register-form-step2.cjs +1 -0
- package/es2015/general-player-register-form-step2.js +16 -0
- package/package.json +15 -33
- package/README.md +0 -30
- package/dist/general-player-register-form-step2.js +0 -2
- package/dist/general-player-register-form-step2.js.map +0 -1
- package/index.html +0 -21
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/GeneralPlayerRegisterFormStep2.svelte +0 -578
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -242
- package/stories/GeneralPlayerRegisterFormStep2.stories.js +0 -13
- package/tsconfig.json +0 -6
|
@@ -1,578 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { onMount } from "svelte";
|
|
5
|
-
import moment from 'moment';
|
|
6
|
-
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
7
|
-
import { TRANSLATIONS } from './translations';
|
|
8
|
-
|
|
9
|
-
export let endpoint:string = '';
|
|
10
|
-
export let lang:string = '';
|
|
11
|
-
export let licenseyears:string = '';
|
|
12
|
-
// Possible disabled fields = ['fistName', 'lastName', 'birthDate', 'birthPlace'];
|
|
13
|
-
export let disabledfields:string = '';
|
|
14
|
-
export let defaultoptions:string = '';
|
|
15
|
-
export let personalidlength:string = '';
|
|
16
|
-
export let clientstyling:string = '';
|
|
17
|
-
export let clientstylingurl:string = '';
|
|
18
|
-
export let translationurl:string = '';
|
|
19
|
-
|
|
20
|
-
let invalidFirstName:boolean = false;
|
|
21
|
-
let invalidLastName:boolean = false;
|
|
22
|
-
let invalidBirthDate:boolean = false;
|
|
23
|
-
let invalidBirthPlace:boolean = false;
|
|
24
|
-
let invalidPersonalId:boolean = false;
|
|
25
|
-
|
|
26
|
-
let firstNameFocus:boolean = false;
|
|
27
|
-
let lastNameFocus:boolean = false;
|
|
28
|
-
let birthDateFocus:boolean = false;
|
|
29
|
-
let birthplaceFocus:boolean = false;
|
|
30
|
-
let personalIdFocus: boolean = false;
|
|
31
|
-
|
|
32
|
-
let disabledFieldsList:Array<string>;
|
|
33
|
-
|
|
34
|
-
let userTitleSelected:string = '';
|
|
35
|
-
let userFirstName:string = '';
|
|
36
|
-
let userLastName:string = '';
|
|
37
|
-
let birthDays:Array<Object> = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
|
|
38
|
-
let birthDaySelected:number;
|
|
39
|
-
let birthMonths:Array<Object> = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
40
|
-
let birthMonthSelected:number;
|
|
41
|
-
let birthYears:Array<Object> = [];
|
|
42
|
-
let birthYearSelected:number;
|
|
43
|
-
let birthPlace:string = '';
|
|
44
|
-
let currencies:Array<Object> = [];
|
|
45
|
-
let currencySelected:any = '';
|
|
46
|
-
let personalId:string = '';
|
|
47
|
-
let currentDate:Date = new Date();
|
|
48
|
-
let minDate:number;
|
|
49
|
-
let maxDate:number;
|
|
50
|
-
let yearsDifference:string;
|
|
51
|
-
|
|
52
|
-
let isValid:boolean = false;
|
|
53
|
-
let isLoading:boolean = true;
|
|
54
|
-
|
|
55
|
-
let customStylingContainer:HTMLElement;
|
|
56
|
-
let displayNone:boolean = false;
|
|
57
|
-
|
|
58
|
-
// setupI18n({ withLocale: 'en', translations: {}});
|
|
59
|
-
|
|
60
|
-
const setTranslationUrl = ():void => {
|
|
61
|
-
let url:string = translationurl;
|
|
62
|
-
|
|
63
|
-
fetch(url).then((res:any) => res.json())
|
|
64
|
-
.then((res) => {
|
|
65
|
-
Object.keys(res).forEach((item:any):void => {
|
|
66
|
-
addNewMessages(item, res[item]);
|
|
67
|
-
});
|
|
68
|
-
}).catch((err:any) => {
|
|
69
|
-
console.log(err);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
|
74
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const createYearsArray = ():void => {
|
|
78
|
-
maxDate = parseInt(moment(currentDate.setDate(currentDate.getDate())).subtract(parseInt(licenseyears, 10), 'y').format('YYYY'));
|
|
79
|
-
minDate = parseInt(moment(currentDate.setDate(currentDate.getDate())).subtract(100 + parseInt(licenseyears, 10), 'y').format('YYYY'));
|
|
80
|
-
|
|
81
|
-
for (let i = maxDate; i >= minDate; i--) {
|
|
82
|
-
birthYears.push(i);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
isLoading = false;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const validateBirthDate = ():void => {
|
|
89
|
-
if (birthYearSelected && birthMonthSelected && birthDaySelected) {
|
|
90
|
-
yearsDifference = moment(currentDate.setDate(currentDate.getDate())).diff(moment(`${birthYearSelected}-${birthMonthSelected}-${birthDaySelected}`, 'YYYY-MM-DD'), 'years').toString();
|
|
91
|
-
invalidBirthDate = (yearsDifference < licenseyears);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
checkIsValid();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const getCurrencies = ():void => {
|
|
98
|
-
fetch(`${endpoint}/v1/player/operatorSupportedCurrencies`)
|
|
99
|
-
.then((res:any) => res.json())
|
|
100
|
-
.then(data => {
|
|
101
|
-
currencies = data.currencies;
|
|
102
|
-
|
|
103
|
-
if (!currencySelected) {
|
|
104
|
-
currencySelected = currencies[0];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const checkIsValid = ():void => {
|
|
110
|
-
isValid = !(invalidFirstName || invalidLastName || invalidBirthDate || invalidBirthPlace || invalidPersonalId);
|
|
111
|
-
|
|
112
|
-
if (userFirstName.length <= 0 || userLastName.length <= 0 || birthPlace.length <= 0 || personalId.length <= 0 || !userTitleSelected || !birthDaySelected || !birthMonthSelected || !birthYearSelected) {
|
|
113
|
-
isValid = false;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const checkName = (name:string):boolean => {
|
|
118
|
-
if (name && name.length >=2 && name.length <= 50) {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const validateUserFirstName = ():void => {
|
|
126
|
-
invalidFirstName = !checkName(userFirstName);
|
|
127
|
-
|
|
128
|
-
checkIsValid();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const validateUserLastName = ():void => {
|
|
132
|
-
invalidLastName = !checkName(userLastName);
|
|
133
|
-
|
|
134
|
-
checkIsValid();
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const checkBirthPlace = ():boolean => {
|
|
138
|
-
if (birthPlace && birthPlace.length <= 120) {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const validateBirthPlace = ():void => {
|
|
146
|
-
invalidBirthPlace = !checkBirthPlace();
|
|
147
|
-
|
|
148
|
-
checkIsValid();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const checkPersonalId = ():boolean => {
|
|
152
|
-
if (personalId && personalId.length === Number(personalidlength) && /^\d+$/.test(personalId)){
|
|
153
|
-
return true
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const validatePersonalId = ():void => {
|
|
160
|
-
invalidPersonalId = !checkPersonalId();
|
|
161
|
-
|
|
162
|
-
checkIsValid();
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const goNext = (e):void => {
|
|
166
|
-
e.preventDefault();
|
|
167
|
-
let registerStepTwoData = {
|
|
168
|
-
userTitleSelected,
|
|
169
|
-
userFirstName,
|
|
170
|
-
userLastName,
|
|
171
|
-
birthDaySelected,
|
|
172
|
-
birthMonthSelected,
|
|
173
|
-
birthYearSelected,
|
|
174
|
-
birthPlace,
|
|
175
|
-
personalId,
|
|
176
|
-
currencySelected
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
window.postMessage({ type: 'RegisterStepTwo', registerStepTwoData }, window.location.href);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const goBack = ():void => {
|
|
183
|
-
let registerStepTwoData = {
|
|
184
|
-
userTitleSelected,
|
|
185
|
-
userFirstName,
|
|
186
|
-
userLastName,
|
|
187
|
-
birthDaySelected,
|
|
188
|
-
birthMonthSelected,
|
|
189
|
-
birthYearSelected,
|
|
190
|
-
birthPlace,
|
|
191
|
-
personalId,
|
|
192
|
-
currencySelected
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
window.postMessage({ type: 'GoBackStepTwo', registerStepTwoData }, window.location.href);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const messageHandler = (e:any):void => {
|
|
199
|
-
if (e.data) {
|
|
200
|
-
switch(e.data.type) {
|
|
201
|
-
case 'StepTwoDataBackup':
|
|
202
|
-
userTitleSelected = e.data.userData.title;
|
|
203
|
-
userFirstName = e.data.userData.firstname;
|
|
204
|
-
userLastName = e.data.userData.lastname;
|
|
205
|
-
birthDaySelected = e.data.userData.birth.day;
|
|
206
|
-
birthMonthSelected = e.data.userData.birth.month;
|
|
207
|
-
birthYearSelected = e.data.userData.birth.year;
|
|
208
|
-
birthPlace = e.data.userData.birthPlace;
|
|
209
|
-
currencySelected = e.data.userData.currency;
|
|
210
|
-
personalId = e.data.userData.personalId;
|
|
211
|
-
checkIsValid();
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const formatDisabledFields = ():void => {
|
|
218
|
-
disabledFieldsList = disabledfields.split(',');
|
|
219
|
-
|
|
220
|
-
if (disabledFieldsList.indexOf('firstName') >= 0) {
|
|
221
|
-
userFirstName = 'dummy first name';
|
|
222
|
-
invalidFirstName = false;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (disabledFieldsList.indexOf('lastName') >= 0) {
|
|
226
|
-
userLastName = 'dummy last name';
|
|
227
|
-
invalidLastName = false;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (disabledFieldsList.indexOf('birthPlace') >= 0) {
|
|
231
|
-
birthPlace = 'dummy birth place';
|
|
232
|
-
invalidBirthPlace = false;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (disabledFieldsList.indexOf('personalId') >= 0) {
|
|
236
|
-
personalId = 'dummy personal id';
|
|
237
|
-
invalidPersonalId = false;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if (disabledFieldsList.indexOf('birthDate') >= 0) {
|
|
241
|
-
invalidBirthDate = false;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
if(disabledFieldsList.indexOf('title') >= 0){
|
|
245
|
-
userTitleSelected = 'Mr.';
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
if(disabledFieldsList.indexOf('currency') >= 0){
|
|
249
|
-
currencySelected = 'CDF';
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const setActiveLanguage = ():void => {
|
|
254
|
-
setLocale(lang);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const setClientStyling = ():void => {
|
|
258
|
-
let sheet = document.createElement('style');
|
|
259
|
-
sheet.innerHTML = clientstyling;
|
|
260
|
-
customStylingContainer.appendChild(sheet);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
const setClientStylingURL = ():void => {
|
|
264
|
-
displayNone = true;
|
|
265
|
-
|
|
266
|
-
let url:URL = new URL(clientstylingurl);
|
|
267
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
268
|
-
|
|
269
|
-
fetch(url.href)
|
|
270
|
-
.then((res:any) => res.text())
|
|
271
|
-
.then((data:any) => {
|
|
272
|
-
cssFile.innerHTML = data
|
|
273
|
-
|
|
274
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
275
|
-
setTimeout(() => { displayNone = false; }, 500);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
onMount(() => {
|
|
280
|
-
window.addEventListener('message', messageHandler, false);
|
|
281
|
-
|
|
282
|
-
return () => {
|
|
283
|
-
window.removeEventListener('message', messageHandler);
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
$: endpoint && getCurrencies();
|
|
288
|
-
$: lang && setActiveLanguage();
|
|
289
|
-
$: licenseyears && createYearsArray();
|
|
290
|
-
$: disabledfields && formatDisabledFields();
|
|
291
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
292
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
293
|
-
$: translationurl && setTranslationUrl();
|
|
294
|
-
</script>
|
|
295
|
-
|
|
296
|
-
<div bind:this={customStylingContainer}>
|
|
297
|
-
<div class="RegisterFormHeader">
|
|
298
|
-
<button class="BackButton" on:click={goBack}>
|
|
299
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.a{fill:var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));}</style></defs><path class="a" d="M12,0,9.818,2.182l8.26,8.26H0v3.117H18.078l-8.26,8.26L12,24,24,12Z" transform="translate(24 24) rotate(180)"/></svg>
|
|
300
|
-
{$_('registerBackButton')}
|
|
301
|
-
</button>
|
|
302
|
-
</div>
|
|
303
|
-
<form class="RegisterFormContent">
|
|
304
|
-
{#if !(disabledFieldsList?.indexOf('title') >= 0)}
|
|
305
|
-
<div class="UserTitleContainer">
|
|
306
|
-
<label for="Title">{$_('registerUserTitle')}:<span class="FormRequired">*</span></label>
|
|
307
|
-
<select bind:value={userTitleSelected} on:change={checkIsValid} id="Title">
|
|
308
|
-
<option value="" disabled selected>{$_('registerUserTitleSelect')}</option>
|
|
309
|
-
<option value="Mr.">{$_('registerUserTitleSelectMr')}</option>
|
|
310
|
-
<option value="Mrs.">{$_('registerUserTitleSelectMrs')}</option>
|
|
311
|
-
<option value="Ms.">{$_('registerUserTitleSelectMs')}</option>
|
|
312
|
-
</select>
|
|
313
|
-
</div>
|
|
314
|
-
{/if}
|
|
315
|
-
{#if !(disabledFieldsList?.indexOf('firstName') >= 0)}
|
|
316
|
-
<div class="FirstNameContainer {invalidFirstName && !firstNameFocus ? 'InvalidField' : ''}">
|
|
317
|
-
<label for="FirstName">{$_('registerFirstName')}:<span class="FormRequired">*</span></label>
|
|
318
|
-
<input bind:value={userFirstName} on:keyup={validateUserFirstName} on:focus={() => firstNameFocus = true} on:keyup={() => firstNameFocus = false} type="text" id="FirstName" />
|
|
319
|
-
{#if invalidFirstName}
|
|
320
|
-
<p class="InvalidInput">{$_('registerFirstNameError')}</p>
|
|
321
|
-
{/if}
|
|
322
|
-
</div>
|
|
323
|
-
{/if}
|
|
324
|
-
{#if !(disabledFieldsList?.indexOf('lastName') >= 0)}
|
|
325
|
-
<div class="LastNameContainer {invalidLastName && !lastNameFocus ? 'InvalidField' : ''}">
|
|
326
|
-
<label for="LastName">{$_('registerLastName')}:<span class="FormRequired">*</span></label>
|
|
327
|
-
<input bind:value={userLastName} on:keyup={validateUserLastName} on:focus={() => lastNameFocus = true} on:blur={() => lastNameFocus = false} type="text" id="LastName" />
|
|
328
|
-
{#if invalidLastName}
|
|
329
|
-
<p class="InvalidInput">{$_('registerLastNameError')}</p>
|
|
330
|
-
{/if}
|
|
331
|
-
</div>
|
|
332
|
-
{/if}
|
|
333
|
-
{#if !(disabledFieldsList?.indexOf('birthDate') >= 0)}
|
|
334
|
-
<div class="BirthDateContainer">
|
|
335
|
-
<label>{$_('registerDateOfBirth')}:<span class="FormRequired">*</span></label>
|
|
336
|
-
<div class="BirthDateOptions">
|
|
337
|
-
<select bind:value={birthDaySelected} on:change={validateBirthDate} class="BirthDaySelected">
|
|
338
|
-
<option value="" disabled selected>{$_('registerBirthDay')}</option>
|
|
339
|
-
{#each birthDays as birthDay}
|
|
340
|
-
<option value={birthDay}>{birthDay}</option>
|
|
341
|
-
{/each}
|
|
342
|
-
</select>
|
|
343
|
-
<select bind:value={birthMonthSelected} on:change={validateBirthDate} class="BirthMonthSelected">
|
|
344
|
-
<option value="" disabled selected>{$_('registerBirthMonth')}</option>
|
|
345
|
-
{#each birthMonths as birthMonth}
|
|
346
|
-
<option value={birthMonth}>{birthMonth}</option>
|
|
347
|
-
{/each}
|
|
348
|
-
</select>
|
|
349
|
-
<select bind:value={birthYearSelected} on:change={validateBirthDate} class="BirthYearSelected">
|
|
350
|
-
<option value="" disabled selected>{$_('registerBirthYear')}</option>
|
|
351
|
-
{#if !isLoading}
|
|
352
|
-
{#each birthYears as birthYear}
|
|
353
|
-
<option value={birthYear}>{birthYear}</option>
|
|
354
|
-
{/each}
|
|
355
|
-
{/if}
|
|
356
|
-
</select>
|
|
357
|
-
{#if invalidBirthDate}
|
|
358
|
-
<p class="InvalidInput">{$_('registerBirthDateError', { values: { licenseyears: licenseyears}})}</p>
|
|
359
|
-
{/if}
|
|
360
|
-
</div>
|
|
361
|
-
</div>
|
|
362
|
-
{/if}
|
|
363
|
-
{#if !(disabledFieldsList?.indexOf('birthPlace') >= 0)}
|
|
364
|
-
<div class="BirthPlaceContainer {invalidBirthPlace && !birthplaceFocus ? 'InvalidField' : ''}">
|
|
365
|
-
<label for="BirthPlace">{$_('registerBirthPlace')}:<span class="FormRequired">*</span></label>
|
|
366
|
-
<input bind:value={birthPlace} on:keyup={validateBirthPlace} on:focus={() => birthplaceFocus = true} on:blur={() => birthplaceFocus = false} type="text" id="BirthPlace" />
|
|
367
|
-
{#if invalidBirthPlace}
|
|
368
|
-
<p class="InvalidInput">{$_('registerBirthPlaceError')}</p>
|
|
369
|
-
{/if}
|
|
370
|
-
</div>
|
|
371
|
-
{/if}
|
|
372
|
-
{#if !(disabledFieldsList?.indexOf('personalId') >= 0)}
|
|
373
|
-
<div class="PersonalIdContainer {invalidPersonalId && !personalIdFocus ? 'InvalidField' : ''}">
|
|
374
|
-
<label for="PersonalId">{$_('registerPersonalId')}:<span class="FormRequired">*</span></label>
|
|
375
|
-
<input bind:value={personalId} on:keyup={validatePersonalId} on:focus={() => personalIdFocus = true} on:blur={() => personalIdFocus = false} type="text" id="PersonalId" />
|
|
376
|
-
{#if invalidPersonalId}
|
|
377
|
-
{#if !(/^\d+$/.test(personalId))}
|
|
378
|
-
<p class="InvalidInput">{$_('registerPersonalIdCharacters')}</p>
|
|
379
|
-
{:else}
|
|
380
|
-
<p class="InvalidInput">{$_('registerPersonalIdLength')}</p>
|
|
381
|
-
{/if}
|
|
382
|
-
{/if}
|
|
383
|
-
</div>
|
|
384
|
-
{/if}
|
|
385
|
-
{#if !(disabledFieldsList?.indexOf('currency') >= 0)}
|
|
386
|
-
<div class="CurrencyContainer {disabledFieldsList?.indexOf('currency') >= 0 ? 'Hidden' : ''}">
|
|
387
|
-
<label for="Currency">{$_('registerCurrency')}:<span class="FormRequired">*</span></label>
|
|
388
|
-
<select bind:value={currencySelected} id="Currency">
|
|
389
|
-
{#each currencies as currency}
|
|
390
|
-
<option value={currency}>{currency}</option>
|
|
391
|
-
{/each}
|
|
392
|
-
</select>
|
|
393
|
-
</div>
|
|
394
|
-
{/if}
|
|
395
|
-
<button class="RegisterStepNext" disabled={!isValid} on:click={(e) => goNext(e)}>{$_('registerNext')}</button>
|
|
396
|
-
</form>
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
|
-
<style lang="scss">
|
|
400
|
-
|
|
401
|
-
.BackButton {
|
|
402
|
-
display: inline-flex;
|
|
403
|
-
color: var(--emfe-w-registration-typography, var(--emfe-w-color-contrast, #07072A));
|
|
404
|
-
height: 15px;
|
|
405
|
-
border-radius: 5px;
|
|
406
|
-
border: none;
|
|
407
|
-
background: transparent;
|
|
408
|
-
padding: 0;
|
|
409
|
-
text-transform: uppercase;
|
|
410
|
-
font-size: 22px;
|
|
411
|
-
cursor: pointer;
|
|
412
|
-
margin-bottom: 30px;
|
|
413
|
-
svg {
|
|
414
|
-
width: 20px;
|
|
415
|
-
height: 20px;
|
|
416
|
-
margin-right: 24px;
|
|
417
|
-
fill: var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.UserTitleContainer,
|
|
422
|
-
.CurrencyContainer {
|
|
423
|
-
label {
|
|
424
|
-
font-size: 14px;
|
|
425
|
-
font-weight: 300;
|
|
426
|
-
padding-bottom: 5px;
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
select {
|
|
431
|
-
width: 100%;
|
|
432
|
-
height: 44px;
|
|
433
|
-
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
434
|
-
border-radius: 5px;
|
|
435
|
-
box-sizing: border-box;
|
|
436
|
-
padding: 5px 15px;
|
|
437
|
-
font-size: 16px;
|
|
438
|
-
line-height: 18px;
|
|
439
|
-
-webkit-appearance: none;
|
|
440
|
-
-moz-appearance: none;
|
|
441
|
-
appearance: none;
|
|
442
|
-
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);
|
|
443
|
-
background-position: calc(100% - 0.75rem) center;
|
|
444
|
-
|
|
445
|
-
&:focus, :focus-within, :focus-visible, :visited {
|
|
446
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
447
|
-
box-shadow: 0 0 0 1pt var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.UserTitleContainer,
|
|
453
|
-
.FirstNameContainer,
|
|
454
|
-
.LastNameContainer,
|
|
455
|
-
.BirthDateContainer,
|
|
456
|
-
.BirthPlaceContainer,
|
|
457
|
-
.PersonalIdContainer,
|
|
458
|
-
.CurrencyContainer {
|
|
459
|
-
color: var(--emfe-w-registration-contrast, var(--emfe-w-color-gray-300, #58586B));
|
|
460
|
-
display: flex;
|
|
461
|
-
flex-direction: column;
|
|
462
|
-
padding-bottom: 30px;
|
|
463
|
-
position: relative;
|
|
464
|
-
|
|
465
|
-
label {
|
|
466
|
-
font-size: 14px;
|
|
467
|
-
font-weight: 300;
|
|
468
|
-
padding-bottom: 5px;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
input, select {
|
|
472
|
-
width: 100%;
|
|
473
|
-
height: 44px;
|
|
474
|
-
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
475
|
-
border-radius: 5px;
|
|
476
|
-
box-sizing: border-box;
|
|
477
|
-
padding: 5px 15px;
|
|
478
|
-
font-size: 16px;
|
|
479
|
-
line-height: 18px;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
&.InvalidField {
|
|
483
|
-
input {
|
|
484
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
485
|
-
background: var(--emfe-w-color-pale, #FBECF4);
|
|
486
|
-
color: var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
&.Hidden {
|
|
491
|
-
display: none;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.BirthDateOptions {
|
|
496
|
-
display: flex;
|
|
497
|
-
gap: 10px;
|
|
498
|
-
|
|
499
|
-
.BirthDaySelected {
|
|
500
|
-
width: 30%;
|
|
501
|
-
-webkit-appearance: none;
|
|
502
|
-
-moz-appearance: none;
|
|
503
|
-
appearance: none;
|
|
504
|
-
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);
|
|
505
|
-
background-position: calc(100% - 0.75rem) center;
|
|
506
|
-
|
|
507
|
-
&:focus, :focus-within, :focus-visible, :visited {
|
|
508
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
509
|
-
box-shadow: 0 0 0 1pt var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
.BirthMonthSelected {
|
|
514
|
-
width: 30%;
|
|
515
|
-
-webkit-appearance: none;
|
|
516
|
-
-moz-appearance: none;
|
|
517
|
-
appearance: none;
|
|
518
|
-
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);
|
|
519
|
-
background-position: calc(100% - 0.75rem) center;
|
|
520
|
-
|
|
521
|
-
&:focus, :focus-within, :focus-visible, :visited {
|
|
522
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
523
|
-
box-shadow: 0 0 0 1pt var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.BirthYearSelected {
|
|
528
|
-
width: 40%;
|
|
529
|
-
-webkit-appearance: none;
|
|
530
|
-
-moz-appearance: none;
|
|
531
|
-
appearance: none;
|
|
532
|
-
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);
|
|
533
|
-
background-position: calc(100% - 0.75rem) center;
|
|
534
|
-
|
|
535
|
-
&:focus, :focus-within, :focus-visible, :visited {
|
|
536
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
537
|
-
box-shadow: 0 0 0 1pt var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.FormRequired {
|
|
543
|
-
color: var(--emfe-w-categories-color-secondary, var(--emfe-w-color-secondary, #FD2839));
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.InvalidInput {
|
|
547
|
-
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
548
|
-
font-size: 10px;
|
|
549
|
-
position: absolute;
|
|
550
|
-
bottom: -3px;
|
|
551
|
-
line-height: 10px;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.ErrorMessage {
|
|
555
|
-
margin: 0 0 15px 0;
|
|
556
|
-
font-size: 12px;
|
|
557
|
-
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.RegisterStepNext {
|
|
561
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
562
|
-
background: var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
563
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
564
|
-
border-radius: 5px;
|
|
565
|
-
width: 100%;
|
|
566
|
-
height: 60px;
|
|
567
|
-
padding: 0;
|
|
568
|
-
text-transform: uppercase;
|
|
569
|
-
font-size: 18px;
|
|
570
|
-
cursor: pointer;
|
|
571
|
-
margin-top: 24px;
|
|
572
|
-
&[disabled] {
|
|
573
|
-
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
574
|
-
border: 1px solid var(--emfe-w-color-gray-150, #828282);
|
|
575
|
-
cursor: not-allowed;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
</style>
|
package/src/i18n.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dictionary,
|
|
3
|
-
locale,
|
|
4
|
-
addMessages,
|
|
5
|
-
_
|
|
6
|
-
} from 'svelte-i18n';
|
|
7
|
-
|
|
8
|
-
function setupI18n({ withLocale: _locale, translations }) {
|
|
9
|
-
locale.subscribe((data) => {
|
|
10
|
-
if (data == null) {
|
|
11
|
-
dictionary.set(translations);
|
|
12
|
-
locale.set(_locale);
|
|
13
|
-
}
|
|
14
|
-
}); // maybe we will need this to make sure that the i18n is set up only once
|
|
15
|
-
/*dictionary.set(translations);
|
|
16
|
-
locale.set(_locale);*/
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function addNewMessages(lang, dict) {
|
|
20
|
-
addMessages(lang, dict);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function setLocale(_locale) {
|
|
24
|
-
locale.set(_locale);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { _, setupI18n, addNewMessages, setLocale };
|
package/src/index.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import GeneralPlayerRegisterFormStep2 from './GeneralPlayerRegisterFormStep2.svelte';
|
|
2
|
-
|
|
3
|
-
!customElements.get('general-player-register-form-step2') && customElements.define('general-player-register-form-step2', GeneralPlayerRegisterFormStep2);
|
|
4
|
-
export default GeneralPlayerRegisterFormStep2;
|