@everymatrix/general-player-register-form-step1 1.0.15 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html DELETED
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset='utf-8'>
5
- <meta name='viewport' content='width=device-width,initial-scale=1'>
6
-
7
- <title>
8
- general-player-register-form-step1
9
- </title>
10
- <link rel="stylesheet" href="public/reset.css">
11
- <script src='dist/general-player-register-form-step1.js'></script>
12
- </head>
13
-
14
- <body>
15
-
16
-
17
- <div class="webcomponent">
18
- <general-player-register-form-step1></general-player-register-form-step1>
19
- </div>
20
-
21
- </body>
22
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/general-player-register-form-step1.js';
Binary file
package/public/reset.css DELETED
@@ -1,48 +0,0 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- v2.0 | 20110126
3
- License: none (public domain)
4
- */
5
-
6
- html, body, div, span, applet, object, iframe,
7
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
- a, abbr, acronym, address, big, cite, code,
9
- del, dfn, em, img, ins, kbd, q, s, samp,
10
- small, strike, strong, sub, sup, tt, var,
11
- b, u, i, center,
12
- dl, dt, dd, ol, ul, li,
13
- fieldset, form, label, legend,
14
- table, caption, tbody, tfoot, thead, tr, th, td,
15
- article, aside, canvas, details, embed,
16
- figure, figcaption, footer, header, hgroup,
17
- menu, nav, output, ruby, section, summary,
18
- time, mark, audio, video {
19
- margin: 0;
20
- padding: 0;
21
- border: 0;
22
- font-size: 100%;
23
- font: inherit;
24
- vertical-align: baseline;
25
- }
26
- /* HTML5 display-role reset for older browsers */
27
- article, aside, details, figcaption, figure,
28
- footer, header, hgroup, menu, nav, section {
29
- display: block;
30
- }
31
- body {
32
- line-height: 1;
33
- }
34
- ol, ul {
35
- list-style: none;
36
- }
37
- blockquote, q {
38
- quotes: none;
39
- }
40
- blockquote:before, blockquote:after,
41
- q:before, q:after {
42
- content: '';
43
- content: none;
44
- }
45
- table {
46
- border-collapse: collapse;
47
- border-spacing: 0;
48
- }
package/rollup.config.js DELETED
@@ -1,67 +0,0 @@
1
- import svelte from 'rollup-plugin-svelte';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import serve from 'rollup-plugin-dev-server';
5
- import livereload from 'rollup-plugin-livereload';
6
- import { terser } from 'rollup-plugin-terser';
7
- import sveltePreprocess from 'svelte-preprocess';
8
- import typescript from '@rollup/plugin-typescript';
9
- import uglify from 'rollup-plugin-uglify';
10
- import image from '@rollup/plugin-image';
11
-
12
- const production = process.env.NODE_ENV == 'production';
13
- const dev = process.env.NODE_ENV == 'development';
14
-
15
- export default {
16
- input: 'src/index.ts',
17
- output: {
18
- sourcemap: true,
19
- format: 'umd',
20
- name: 'app',
21
- file: 'dist/general-player-register-form-step1.js',
22
- },
23
- plugins: [
24
- svelte({
25
- preprocess: sveltePreprocess(),
26
- compilerOptions: {
27
- // @TODO check generate and hydratable
28
- // generate: 'ssr',
29
- // hydratable: true,
30
- // enable run-time checks when not in production
31
- customElement: true,
32
- dev: !production
33
- }
34
- }),
35
- image(),
36
- commonjs(),
37
- resolve({
38
- browser: true,
39
- dedupe: ['svelte']
40
- }),
41
- dev && serve({
42
- open: true,
43
- verbose: true,
44
- allowCrossOrigin: true,
45
- historyApiFallback: false,
46
- host: 'localhost',
47
- port: 5050,
48
- }),
49
- dev && livereload({ watch: ['', 'dist'] }),
50
- typescript({
51
- sourceMap: !production,
52
- inlineSources: !production,
53
- }),
54
- // If we're building for production (npm run build
55
- // instead of npm run dev), minify
56
- production &&
57
- terser({
58
- output: {
59
- comments: "all"
60
- },
61
- }),
62
- production && uglify.uglify()
63
- ],
64
- watch: {
65
- clearScreen: false
66
- }
67
- };
@@ -1,477 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { onMount } from "svelte";
5
- import { _, addNewMessages, setLocale, setupI18n } from './i18n';
6
- import { RegisterFormStep1Translations } from './translations';
7
-
8
- export let lang:string = '';
9
- // Possible disabled fields: ['email', 'username', 'name', 'password', 'confirmPassword', 'securityQuestion', 'securityAnswer']
10
- export let disabledfields:string = '';
11
- export let simplepasswordvalidation:string = 'false';
12
- export let translationUrl:string = '';
13
-
14
- let invalidEmail:boolean = false;
15
- let invalidName:boolean = false;
16
- let invalidPassword:boolean = false;
17
- let invalidConfirmPassword:boolean = false;
18
- let invalidSecurityQuestion:boolean = false;
19
- let invalidSecurityAnswer:boolean = false;
20
-
21
- let disabledFieldsList:Array<string>;
22
-
23
- let userValue:string = '';
24
- let userEmail:string = '';
25
- let userPassword:string = '';
26
- let confirmUserPassword:string = '';
27
- let securityQuestion:string = '';
28
- let securityAnswer:string = '';
29
-
30
- let isPasswordVisible:boolean = false;
31
- let isConfirmPasswordVisible:boolean = false;
32
-
33
- let passwordVisibilityToggle:HTMLElement;
34
- let confirmPasswordVisibilityToggle:HTMLElement;
35
-
36
- let isValid:boolean = false;
37
-
38
- let regexValidators:any = {
39
- user: /^(?!(?:.*\d){9})(?=(?:.*[a-zA-Z]){4})^[a-zA-Z\d]*$/,
40
- email: /^[^<>()*{}=/|?`~[\]\\,;:\%#^\s@\"$&!@]+@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z0-9]+\.)+[a-zA-Z]{2,}))$/i,
41
- password: /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$/
42
- }
43
-
44
- // setupI18n({ withLocale: 'en', translations: {}});
45
-
46
- const setTranslationUrl = ():void => {
47
- let url:string = translationUrl;
48
-
49
- fetch(url).then((res:any) => res.json())
50
- .then((res) => {
51
- Object.keys(res).forEach((item:any):void => {
52
- addNewMessages(item, res[item]);
53
- });
54
- }).catch((err:any) => {
55
- console.log(err);
56
- });
57
- }
58
-
59
- Object.keys(RegisterFormStep1Translations).forEach((item:any) => {
60
- addNewMessages(item, RegisterFormStep1Translations[item]);
61
- });
62
-
63
- const checkIsValid = ():void => {
64
- isValid = !(invalidEmail || invalidName || invalidPassword || invalidConfirmPassword || invalidSecurityQuestion || invalidSecurityAnswer);
65
-
66
- if (userValue.length <= 0 || userEmail.length <= 0 || userPassword.length <= 0 || confirmUserPassword.length <= 0 || securityQuestion.length <= 0 || securityAnswer.length <= 0) {
67
- isValid = false;
68
- }
69
- }
70
-
71
- const switchToLogin = ():void => {
72
- window.postMessage({ type: "ToLogin" }, window.location.href);
73
- }
74
-
75
- const verifyTypeOfPassword = ():void => {
76
- if (simplepasswordvalidation == 'true') {
77
- regexValidators.password = /^(?!.* ).{8,20}$/;
78
- }
79
- }
80
-
81
- const checkEmailIdentifier = (email:string):boolean => {
82
- if (regexValidators.email.test(email) && email.length <= 100) {
83
- return true;
84
- }
85
-
86
- return false;
87
- }
88
-
89
- const validateEmail = ():void => {
90
- invalidEmail = !checkEmailIdentifier(userEmail);
91
- checkIsValid();
92
- }
93
-
94
- const checkUserIdentifier = (user:string):boolean => {
95
- if (regexValidators.user.test(user) && user.length <= 20) {
96
- return true;
97
- }
98
-
99
- return false;
100
- }
101
-
102
- const validateUserName = ():void => {
103
- invalidName = !checkUserIdentifier(userValue);
104
- checkIsValid();
105
- }
106
-
107
- const showPassword = ():void => {
108
- isPasswordVisible = true;
109
- togglePasswordVisibility();
110
- }
111
-
112
- const showConfirmPassword = ():void => {
113
- isConfirmPasswordVisible = true;
114
- toggleConfirmPasswordVisibility();
115
- }
116
-
117
- const hidePassword = ():void => {
118
- isPasswordVisible = false;
119
- togglePasswordVisibility();
120
- }
121
-
122
- const hideConfirmPassword = ():void => {
123
- isConfirmPasswordVisible = false;
124
- toggleConfirmPasswordVisibility();
125
- }
126
-
127
- const togglePasswordVisibility = ():void => {
128
- passwordVisibilityToggle.type = isPasswordVisible ? "text" : "password";
129
- }
130
-
131
- const toggleConfirmPasswordVisibility = ():void => {
132
- confirmPasswordVisibilityToggle.type = isConfirmPasswordVisible ? "text" : "password";
133
- }
134
-
135
- const checkUserPassword = (password:string):boolean => {
136
- if (regexValidators.password.test(password)) {
137
- return true;
138
- }
139
-
140
- return false;
141
- }
142
-
143
- const validatePassword = ():void => {
144
- invalidPassword = !checkUserPassword(userPassword);
145
-
146
- if (userPassword !== confirmUserPassword && confirmUserPassword.length > 0) {
147
- invalidConfirmPassword = true;
148
- } else {
149
- invalidConfirmPassword = false;
150
- }
151
-
152
- checkIsValid();
153
- }
154
-
155
- const checkUserConfirmPassword = ():boolean => {
156
- if (userPassword === confirmUserPassword) {
157
- return true;
158
- }
159
-
160
- return false;
161
- }
162
-
163
- const validateConfirmPassword = ():void => {
164
- invalidConfirmPassword = !checkUserConfirmPassword();
165
- checkIsValid();
166
- }
167
-
168
- const checkSecurityQuestion = ():boolean => {
169
- if (securityQuestion && securityQuestion.length <= 120) {
170
- return true;
171
- }
172
-
173
- return false;
174
- }
175
-
176
- const validateSecurityQuestion = ():void => {
177
- invalidSecurityQuestion = !checkSecurityQuestion();
178
- checkIsValid();
179
- }
180
-
181
- const checkSecurityAnswer = ():boolean => {
182
- if (securityAnswer && securityAnswer.length <= 120) {
183
- return true;
184
- }
185
-
186
- return false;
187
- }
188
-
189
- const validateSecurityAnswer = ():void => {
190
- invalidSecurityAnswer = !checkSecurityAnswer();
191
- checkIsValid();
192
- }
193
-
194
- const goNext = (e):void => {
195
- e.preventDefault();
196
- let registerStepOneData = {
197
- userEmail,
198
- userValue,
199
- userPassword,
200
- confirmUserPassword,
201
- securityQuestion,
202
- securityAnswer
203
- };
204
-
205
- window.postMessage({ type: 'RegisterStepOne', registerStepOneData }, window.location.href);
206
- }
207
-
208
- const messageHandler = (e:any):void => {
209
- if (e.data) {
210
- switch(e.data.type) {
211
- case 'StepOneDataBackup':
212
- userEmail = e.data.userData.email;
213
- userValue = e.data.userData.username;
214
- userPassword = e.data.userData.password;
215
- confirmUserPassword = e.data.userData.password;
216
- securityQuestion = e.data.userData.securityQuestion;
217
- securityAnswer = e.data.userData.securityAnswer;
218
- checkIsValid();
219
- break;
220
- }
221
- }
222
- }
223
-
224
- const formatDisabledFields = ():void => {
225
- disabledFieldsList = disabledfields.split(',');
226
-
227
- if (disabledFieldsList.indexOf('email') >= 0) {
228
- userEmail = 'dummy@dummy.com';
229
- invalidEmail = false;
230
- }
231
-
232
- if (disabledFieldsList.indexOf('username') >= 0) {
233
- userValue = 'dummy username';
234
- invalidName = false;
235
- }
236
-
237
- if (disabledFieldsList.indexOf('password') >= 0) {
238
- userPassword = 'dummy password';
239
- invalidPassword = false;
240
- }
241
-
242
- if (disabledFieldsList.indexOf('confirmPassword') >= 0) {
243
- confirmUserPassword = 'dummy password';
244
- invalidConfirmPassword = false;
245
- }
246
-
247
- if (disabledFieldsList.indexOf('securityQuestion') >= 0) {
248
- securityQuestion = 'dummy question';
249
- invalidSecurityQuestion = false;
250
- }
251
-
252
- if (disabledFieldsList.indexOf('securityAnswer') >= 0) {
253
- securityAnswer = 'dummy answer';
254
- invalidSecurityAnswer = false;
255
- }
256
- }
257
-
258
- const setActiveLanguage = ():void => {
259
- setLocale(lang);
260
- }
261
-
262
- onMount(() => {
263
- window.addEventListener('message', messageHandler, false);
264
-
265
- return () => {
266
- window.removeEventListener('message', messageHandler);
267
- }
268
- });
269
-
270
- $: lang && setActiveLanguage();
271
- $: disabledfields && formatDisabledFields();
272
- $: simplepasswordvalidation && verifyTypeOfPassword();
273
- $: translationUrl && setTranslationUrl();
274
- </script>
275
-
276
- <div class="RegisterFormHeader" part="RegisterFormHeader">
277
- <h2 class="RegisterFormTitle" part="RegisterFormTitle">{$_('registerFormStep1.registerTitle')}</h2>
278
- <p class="RegisterFormSubtitle" part="RegisterFormSubtitle">{$_('registerFormStep1.registerSubtitle')} <span class="FormLoginCallToAction" on:click={() => switchToLogin()}>{$_('registerFormStep1.registerSubtitleLogin')}</span></p>
279
- </div>
280
- <form class="RegisterFormContent" part="RegisterFormContent">
281
- <div class="EmailContainer {invalidEmail ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('email') >= 0 ? 'Hidden' : ''}" part="EmailContainer {invalidEmail ? 'InvalidField' : ''}" >
282
- <label for="Email">{$_('registerFormStep1.registerEmail')}:<span class="FormRequired" part="FormRequired">*</span></label>
283
- <input bind:value={userEmail} on:blur={validateEmail} type="text" id="Email" />
284
- {#if invalidEmail}
285
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerEmailError')}</p>
286
- {/if}
287
- </div>
288
- <div class="UserContainer {invalidName ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('username') >= 0 ? 'Hidden' : ''}" part="UserContainer {invalidName ? 'InvalidField' : ''}">
289
- <label for="UserName">{$_('registerFormStep1.registerUsername')}:<span class="FormRequired" part="FormRequired">*</span></label>
290
- <input bind:value={userValue} on:blur={validateUserName} type="text" id="UserName" autocomplete="username"/>
291
- {#if invalidName}
292
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerUsernameError')}</p>
293
- {/if}
294
- </div>
295
- <div class="PasswordContainer {invalidPassword ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('password') >= 0 ? 'Hidden' : ''}" part="PasswordContainer {invalidPassword ? 'InvalidField' : ''}" hidden={disabledFieldsList?.indexOf('password') >= 0}>
296
- <label for="Password">{$_('registerFormStep1.registerPassword')}:<span class="FormRequired" part="FormRequired">*</span></label>
297
- <input bind:value={userPassword} on:blur={validatePassword} name="new-password" type="password" id="new-password" autocomplete="new-password" bind:this={passwordVisibilityToggle} aria-describedby="password-constraints" />
298
- {#if isPasswordVisible}
299
- <svg on:click={() => hidePassword()} class="TogglePasswordVisibility" part="TogglePasswordVisibility" xmlns="http://www.w3.org/2000/svg" width="18.844" height="12.887" viewBox="0 0 18.844 12.887"><defs><style>.a{fill:var(--emfe-w-color-contrast, #07072A);}</style></defs><g transform="translate(-110.856 -23.242)"><circle class="a" cx="0.05" cy="0.05" r="0.05" transform="translate(121.017 31.148)"/><g transform="translate(117.499 27.37)"><path class="a" d="M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z" transform="translate(-142.164 -39.123)"/><path class="a" d="M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z" transform="translate(-136.413 -42.068)"/></g><g transform="translate(110.856 24.899)"><path class="a" d="M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z" transform="translate(-110.856 -33.157)"/><path class="a" d="M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z" transform="translate(-130.743 -29.617)"/></g><rect class="a" width="0.972" height="15.861" rx="0.486" transform="translate(114.827 23.858) rotate(-39.315)"/></g></svg>
300
- {:else}
301
- <svg on:click={() => showPassword()} class="TogglePasswordVisibility" part="TogglePasswordVisibility" xmlns="http://www.w3.org/2000/svg" width="18.843" height="10.5" viewBox="0 0 18.843 10.5"><defs><style>.a{fill:var(--emfe-w-color-contrast, #07072A);}</style></defs><g transform="translate(-14.185 -27.832)"><path class="a" d="M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z" transform="translate(0)"/><circle class="a" cx="2.779" cy="2.779" r="2.779" transform="translate(20.827 30.303)"/></g></svg>
302
- {/if}
303
- {#if invalidPassword && simplepasswordvalidation !== 'true'}
304
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerPasswordError')}</p>
305
- {/if}
306
- {#if invalidPassword && simplepasswordvalidation === 'true'}
307
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerSimplePasswordError')}</p>
308
- {/if}
309
- </div>
310
- <div class="ConfirmPasswordContainer {invalidConfirmPassword ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('confirmPassword') >= 0 ? 'Hidden' : ''}" part="ConfirmPasswordContainer {invalidConfirmPassword ? 'InvalidField' : ''}">
311
- <label for="ConfirmPassword">{$_('registerFormStep1.registerConfirmPassword')}:<span class="FormRequired" part="FormRequired">*</span></label>
312
- <input bind:value={confirmUserPassword} on:blur={validateConfirmPassword} type="password" id="ConfirmPassword" bind:this={confirmPasswordVisibilityToggle} />
313
- {#if isConfirmPasswordVisible}
314
- <svg on:click={() => hideConfirmPassword()} class="ToggleConfirmPasswordVisibility" part="ToggleConfirmPasswordVisibility" xmlns="http://www.w3.org/2000/svg" width="18.844" height="12.887" viewBox="0 0 18.844 12.887"><defs><style>.a{fill:var(--emfe-w-color-contrast, #07072A);}</style></defs><g transform="translate(-110.856 -23.242)"><circle class="a" cx="0.05" cy="0.05" r="0.05" transform="translate(121.017 31.148)"/><g transform="translate(117.499 27.37)"><path class="a" d="M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z" transform="translate(-142.164 -39.123)"/><path class="a" d="M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z" transform="translate(-136.413 -42.068)"/></g><g transform="translate(110.856 24.899)"><path class="a" d="M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z" transform="translate(-110.856 -33.157)"/><path class="a" d="M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z" transform="translate(-130.743 -29.617)"/></g><rect class="a" width="0.972" height="15.861" rx="0.486" transform="translate(114.827 23.858) rotate(-39.315)"/></g></svg>
315
- {:else}
316
- <svg on:click={() => showConfirmPassword()} class="ToggleConfirmPasswordVisibility" part="ToggleConfirmPasswordVisibility" xmlns="http://www.w3.org/2000/svg" width="18.843" height="10.5" viewBox="0 0 18.843 10.5"><defs><style>.a{fill:var(--emfe-w-color-contrast, #07072A);}</style></defs><g transform="translate(-14.185 -27.832)"><path class="a" d="M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z" transform="translate(0)"/><circle class="a" cx="2.779" cy="2.779" r="2.779" transform="translate(20.827 30.303)"/></g></svg>
317
- {/if}
318
- {#if invalidConfirmPassword}
319
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerConfirmPasswordError')}</p>
320
- {/if}
321
- </div>
322
- <div class="SecurityQuestionContainer {invalidSecurityQuestion ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('securityQuestion') >= 0 ? 'Hidden' : ''}" part="SecurityQuestionContainer {invalidSecurityQuestion ? 'InvalidField' : ''}">
323
- <label for="SecurityQuestion">{$_('registerFormStep1.registerSecurityQuestion')}:<span class="FormRequired" part="FormRequired">*</span></label>
324
- <input bind:value={securityQuestion} on:blur={validateSecurityQuestion} type="text" id="SecurityQuestion" />
325
- {#if invalidSecurityQuestion}
326
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerSecurityQuestionError')}</p>
327
- {/if}
328
- </div>
329
- <div class="SecurityAnswerContainer {invalidSecurityAnswer ? 'InvalidField' : ''}{disabledFieldsList?.indexOf('securityAnswer') >= 0 ? 'Hidden' : ''}" part="SecurityAnswerContainer {invalidSecurityAnswer ? 'InvalidField' : ''}">
330
- <label for="SecurityAnswer">{$_('registerFormStep1.registerSecurityAnswer')}:<span class="FormRequired" part="FormRequired">*</span></label>
331
- <input bind:value={securityAnswer} on:keyup={validateSecurityAnswer} type="text" id="SecurityAnswer" />
332
- {#if invalidSecurityAnswer}
333
- <p class="InvalidInput" part="InvalidInput">{$_('registerFormStep1.registerSecurityAnswerError')}</p>
334
- {/if}
335
- </div>
336
- <button class="RegisterStepNext" part="RegisterStepNext" disabled={!isValid} on:click={(e) => goNext(e)}>{$_('registerFormStep1.registerNext')}</button>
337
- </form>
338
-
339
-
340
- <style lang="scss">
341
-
342
- :host {
343
- font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
344
- }
345
-
346
- .RegisterFormTitle {
347
- font-size: 20px;
348
- text-transform: uppercase;
349
- font-weight: 300;
350
- margin: 0;
351
- padding-bottom: 8px;
352
- }
353
-
354
- .RegisterFormSubtitle {
355
- font-size: 14px;
356
- margin: 0;
357
- padding-bottom: 20px;
358
- }
359
-
360
- .FormLoginCallToAction {
361
- color: var(--emfe-w-color-primary, #D0046C);
362
- font-size: 14px;
363
- font-weight: 400;
364
- text-decoration: none;
365
- cursor: pointer;
366
- }
367
-
368
- .EmailContainer,
369
- .UserContainer,
370
- .PasswordContainer,
371
- .ConfirmPasswordContainer,
372
- .SecurityQuestionContainer,
373
- .SecurityAnswerContainer {
374
- color: var(--emfe-w-color-gray-300, #58586B);
375
- display: flex;
376
- flex-direction: column;
377
- padding-bottom:40px;
378
- position: relative;
379
-
380
- label {
381
- font-size: 14px;
382
- font-weight: 300;
383
- padding-bottom: 5px;
384
- }
385
-
386
- input {
387
- width: 100%;
388
- height: 44px;
389
- border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
390
- border-radius: 5px;
391
- box-sizing: border-box;
392
- padding: 5px 15px;
393
- font-size: 16px;
394
- line-height: 18px;
395
- }
396
-
397
- &.InvalidField {
398
- input {
399
- border: 1px solid var(--emfe-w-color-primary, #D0046C);
400
- background: var(--emfe-w-color-primary-50, #FBECF4);
401
- color: var(--emfe-w-color-primary, #D0046C);
402
- }
403
- }
404
-
405
- &.Hidden {
406
- display: none;
407
- }
408
- }
409
-
410
- .PasswordContainer, .ConfirmPasswordContainer {
411
- position: relative;
412
- }
413
-
414
- .PasswordContainer input,
415
- .ConfirmPasswordContainer input {
416
- padding: 5px 30px 5px 15px;
417
- }
418
-
419
- .FormRequired {
420
- color: var(--emfe-w-color-secondary, #FD2839);
421
- }
422
-
423
- .TogglePasswordVisibility, .ToggleConfirmPasswordVisibility {
424
- height: 13px;
425
- position: absolute;
426
- right: 8px;
427
- bottom: 55px;
428
- &.InvalidToggle {
429
- path, circle, rect {
430
- fill: var(--emfe-w-color-primary, #D0046C);
431
- }
432
- }
433
- path, circle, rect {
434
- fill: var(--emfe-w-color-gray-300, #58586B);
435
- }
436
- }
437
-
438
- .InvalidInput {
439
- color: var(--emfe-w-color-error, #FD2839);
440
- font-size: 10px;
441
- position: absolute;
442
- padding-top: 5px;
443
- top: 55px;
444
- line-height: 10px;
445
- }
446
-
447
- .ErrorMessage {
448
- margin: 0 0 15px 0;
449
- font-size: 12px;
450
- color: var(--emfe-w-color-error, #FD2839);
451
- }
452
-
453
- .RegisterStepNext {
454
- color: var(--emfe-w-color-white, #FFFFFF);
455
- background: var(--emfe-w-color-primary, #D0046C);
456
- border: 1px solid var(--emfe-w-color-primary, #D0046C);
457
- border-radius: 5px;
458
- width: 100%;
459
- height: 60px;
460
- padding: 0;
461
- text-transform: uppercase;
462
- font-size: 18px;
463
- cursor: pointer;
464
- margin-top: 24px;
465
- &[disabled] {
466
- background: var(--emfe-w-color-gray-100, #E6E6E6);
467
- border: 1px solid var(--emfe-w-color-gray-150, #828282);
468
- cursor: not-allowed;
469
- }
470
- }
471
-
472
- /* MS Edge */
473
- input::-ms-reveal,
474
- input::-ms-clear {
475
- display: none;
476
- }
477
- </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 GeneralPlayerRegisterFormStep1 from './GeneralPlayerRegisterFormStep1.svelte';
2
-
3
- !customElements.get('general-player-register-form-step1') && customElements.define('general-player-register-form-step1', GeneralPlayerRegisterFormStep1);
4
- export default GeneralPlayerRegisterFormStep1;