@everymatrix/general-player-sms-verification-form 1.44.0 → 1.45.2
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/GeneralPlayerSmsVerificationForm-Be513Gma.js +4232 -0
- package/components/GeneralPlayerSmsVerificationForm-Dmddxcjp.cjs +3 -0
- package/es2015/general-player-sms-verification-form.cjs +1 -0
- package/es2015/general-player-sms-verification-form.js +16 -0
- package/package.json +15 -33
- package/README.md +0 -30
- package/dist/general-player-sms-verification-form.js +0 -599
- package/dist/general-player-sms-verification-form.js.map +0 -1
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -59
- package/src/GeneralPlayerSmsVerificationForm.svelte +0 -306
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -97
- package/stories/GeneralPlayerSmsVerificationForm.stories.js +0 -13
- package/tsconfig.json +0 -6
package/index.html
DELETED
|
@@ -1,37 +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-sms-verification-form
|
|
9
|
-
</title>
|
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
-
<script src='dist/general-player-sms-verification-form.js'></script>
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body>
|
|
15
|
-
<style>
|
|
16
|
-
html,body { margin: 0; padding: 0; height: 100%; font-family: "Helvetica Neue", "Helvetica", sans-serif; }
|
|
17
|
-
.header { display: flex; justify-content: center; align-items: center; padding: 10px 20px; margin-bottom: 20px; background: #42a3e2; box-shadow: 3px 4px 5px 0px rgba(0,0,0, .2); }
|
|
18
|
-
.header__logo svg { height: 50px; width: 50px; margin-right: 5px; }
|
|
19
|
-
.header__name { color: #fff; }
|
|
20
|
-
.header__name span { margin-right: 10px; font-weight: bold; }
|
|
21
|
-
.webcomponent { padding: 10px 20px; }
|
|
22
|
-
</style>
|
|
23
|
-
<header class="header">
|
|
24
|
-
<div class="header__logo">
|
|
25
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="161" height="132" viewBox="0 0 161 132"><defs><linearGradient x1="0%" y1="50%" y2="50%" id="a"><stop stop-color="#2A3B8F" offset="0%"/><stop stop-color="#29ABE2" offset="100%"/></linearGradient><linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="c"><stop stop-color="#B4D44E" offset="0%"/><stop stop-color="#E7F716" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="#166DA5" d="M160.6 65.9l-17.4 29.3-24.4-29.7 24.4-28.9z"/><path fill="#8FDB69" d="M141.3 100.2l-26.5-31.7-15.9 26.6 24.7 36.1z"/><path fill="#166DA5" d="M141 31.4l-26.2 31.8-15.9-26.6L123.6.9z"/><path fill="url(#a)" opacity=".95" d="M61.1 31.4H141L123.4.7H78.7z M114.8 63.3H159l-15.9-26.8H98.8"/><path fill="url(#c)" opacity=".95" d="M141.3 100.3H61l17.6 30.5h45z M114.8 68.4H159l-15.9 26.8H98.8"/><path fill="#010101" d="M78.6 130.8L41 65.8 79.1.8H37.9L.4 65.8l37.5 65z"/></g></svg>
|
|
26
|
-
</div>
|
|
27
|
-
<h1 class="header__name">
|
|
28
|
-
<span>WEBCOMPONENT:</span> general-player-sms-verification-form
|
|
29
|
-
</h1>
|
|
30
|
-
</header>
|
|
31
|
-
|
|
32
|
-
<div class="webcomponent">
|
|
33
|
-
<general-player-sms-verification-form></general-player-sms-verification-form>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './dist/general-player-sms-verification-form.js';
|
package/public/favicon.png
DELETED
|
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,59 +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
|
-
const production = process.env.NODE_ENV === 'production';
|
|
10
|
-
const dev = process.env.NODE_ENV === 'development';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
input: 'src/index.ts',
|
|
14
|
-
output: {
|
|
15
|
-
sourcemap: true,
|
|
16
|
-
format: 'umd',
|
|
17
|
-
name: 'app',
|
|
18
|
-
file: 'dist/general-player-sms-verification-form.js'
|
|
19
|
-
},
|
|
20
|
-
plugins: [
|
|
21
|
-
svelte({
|
|
22
|
-
preprocess: sveltePreprocess(),
|
|
23
|
-
compilerOptions: {
|
|
24
|
-
// enable run-time checks when not in production
|
|
25
|
-
customElement: true,
|
|
26
|
-
dev: !production
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
commonjs(),
|
|
30
|
-
resolve({
|
|
31
|
-
browser: true,
|
|
32
|
-
dedupe: ['svelte']
|
|
33
|
-
}),
|
|
34
|
-
dev && serve({
|
|
35
|
-
open: true,
|
|
36
|
-
verbose: true,
|
|
37
|
-
allowCrossOrigin: true,
|
|
38
|
-
historyApiFallback: false,
|
|
39
|
-
host: 'localhost',
|
|
40
|
-
port: 5052,
|
|
41
|
-
}),
|
|
42
|
-
dev && livereload({ watch: ['', 'dist'] }),
|
|
43
|
-
typescript({
|
|
44
|
-
sourceMap: !production,
|
|
45
|
-
inlineSources: !production,
|
|
46
|
-
}),
|
|
47
|
-
// If we're building for production (npm run build
|
|
48
|
-
// instead of npm run dev), minify
|
|
49
|
-
production &&
|
|
50
|
-
terser({
|
|
51
|
-
output: {
|
|
52
|
-
comments: "all"
|
|
53
|
-
},
|
|
54
|
-
})
|
|
55
|
-
],
|
|
56
|
-
watch: {
|
|
57
|
-
clearScreen: false
|
|
58
|
-
}
|
|
59
|
-
};
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { onMount } from 'svelte';
|
|
5
|
-
|
|
6
|
-
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
7
|
-
import { TRANSLATIONS } from './translations';
|
|
8
|
-
|
|
9
|
-
export let endpoint:string = '';
|
|
10
|
-
export let tokenid:string = '';
|
|
11
|
-
export let playerid:string = '';
|
|
12
|
-
export let smstemplate:string = 'Please use this code {0} to activate your accout';
|
|
13
|
-
export let number:string = '';
|
|
14
|
-
export let clientstyling:string = '';
|
|
15
|
-
export let clientstylingurl:string = '';
|
|
16
|
-
export let translationurl:string = '';
|
|
17
|
-
|
|
18
|
-
let smsCode: number;
|
|
19
|
-
let isSmsValid: boolean = true;
|
|
20
|
-
let smsSendApiFailed:boolean = false;
|
|
21
|
-
let timer:any;
|
|
22
|
-
let customStylingContainer:HTMLElement;
|
|
23
|
-
let displayNone:boolean = false;
|
|
24
|
-
let setTimer = +localStorage.getItem('smsTimer') || 0;
|
|
25
|
-
let currentTimer = Date.now() / 1000 - setTimer;
|
|
26
|
-
let secondsLeft:number = 60 - Math.floor(currentTimer);
|
|
27
|
-
|
|
28
|
-
const regexValidators = {
|
|
29
|
-
numeric: /^[0-9]{0,6}$/,
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
setupI18n({ withLocale: 'en', translations: {}});
|
|
33
|
-
|
|
34
|
-
const setTranslationUrl = ():void => {
|
|
35
|
-
let url:string = translationurl;
|
|
36
|
-
|
|
37
|
-
fetch(url).then((res:any) => res.json())
|
|
38
|
-
.then((res) => {
|
|
39
|
-
Object.keys(res).forEach((item:any):void => {
|
|
40
|
-
addNewMessages(item, res[item]);
|
|
41
|
-
});
|
|
42
|
-
}).catch((err:any) => {
|
|
43
|
-
console.log(err);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
|
48
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const activateUser = async ():Promise<any> => {
|
|
52
|
-
try {
|
|
53
|
-
const res = await fetch(`${endpoint}/v1/player/${playerid}/activateSMS?tokenId=${tokenid}&validationCode=${smsCode}`, {
|
|
54
|
-
headers: {
|
|
55
|
-
'Content-Type': 'application/json',
|
|
56
|
-
accept: 'application/json'
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
if (res.ok) {
|
|
61
|
-
isSmsValid = true;
|
|
62
|
-
window.postMessage({ type: "SmsHasBeenValidated" }, window.location.href);
|
|
63
|
-
} else {
|
|
64
|
-
window.postMessage({ type: 'WidgetNotification', data: {
|
|
65
|
-
type: 'error',
|
|
66
|
-
message: "Could not activate user"
|
|
67
|
-
}}, window.location.href);
|
|
68
|
-
isSmsValid = false;
|
|
69
|
-
throw new Error('Could not activate user');
|
|
70
|
-
}
|
|
71
|
-
} catch (err) {
|
|
72
|
-
console.log(err);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const resendCode = async () => {
|
|
77
|
-
localStorage.setItem('smsTimer', JSON.stringify(Math.floor(Date.now() / 1000)));
|
|
78
|
-
checkSMSTimer();
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
const res = await fetch(`${endpoint}/v1/player/sms/token`,{
|
|
82
|
-
method: 'POST',
|
|
83
|
-
headers: {
|
|
84
|
-
'Content-Type': 'application/json',
|
|
85
|
-
accept: 'application/json',
|
|
86
|
-
},
|
|
87
|
-
body: JSON.stringify(
|
|
88
|
-
{
|
|
89
|
-
userId: playerid,
|
|
90
|
-
messageTemplate: smstemplate,
|
|
91
|
-
destination: number,
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
const data = await res.json();
|
|
97
|
-
|
|
98
|
-
if(res.ok) {
|
|
99
|
-
tokenid = data.id;
|
|
100
|
-
smsSendApiFailed = false;
|
|
101
|
-
timerCountdown();
|
|
102
|
-
} else {
|
|
103
|
-
smsSendApiFailed = true;
|
|
104
|
-
throw new Error("Failed to fetch");
|
|
105
|
-
}
|
|
106
|
-
} catch(err) {
|
|
107
|
-
smsSendApiFailed = true;
|
|
108
|
-
console.error(err);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const timerCountdown = () => {
|
|
113
|
-
if (secondsLeft > 0 ) {
|
|
114
|
-
secondsLeft--;
|
|
115
|
-
} else {
|
|
116
|
-
clearInterval(timer);
|
|
117
|
-
timer = false;
|
|
118
|
-
secondsLeft = 60;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const setClientStyling = ():void => {
|
|
123
|
-
let sheet = document.createElement('style');
|
|
124
|
-
sheet.innerHTML = clientstyling;
|
|
125
|
-
customStylingContainer.appendChild(sheet);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const setClientStylingURL = ():void => {
|
|
129
|
-
displayNone = true;
|
|
130
|
-
|
|
131
|
-
let url:URL = new URL(clientstylingurl);
|
|
132
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
133
|
-
|
|
134
|
-
fetch(url.href)
|
|
135
|
-
.then((res:any) => res.text())
|
|
136
|
-
.then((data:any) => {
|
|
137
|
-
cssFile.innerHTML = data
|
|
138
|
-
|
|
139
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
140
|
-
setTimeout(() => { displayNone = false; }, 500);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const checkSMSTimer = () => {
|
|
145
|
-
if(currentTimer < 60) {
|
|
146
|
-
timer = setInterval(() => {
|
|
147
|
-
timerCountdown();
|
|
148
|
-
}, 1000);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const checkNumeric = (event) => {
|
|
153
|
-
if(!regexValidators.numeric.test(event.key) && event.keyCode !== 8 && event.keyCode !== 9 && event.keyCode !== 46) {
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
onMount(() => {
|
|
159
|
-
if(!playerid || !number) { /* fix for when trying to log in after registeration & mail confirmation (without sms confirmation),
|
|
160
|
-
upon switching between sms validation and register, the playerid and phone number would be lost */
|
|
161
|
-
let playerData = JSON.parse(localStorage.getItem('playerData'));
|
|
162
|
-
playerid = playerData.playerid;
|
|
163
|
-
number = playerData.number;
|
|
164
|
-
}
|
|
165
|
-
checkSMSTimer();
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
$: tokenid && playerid && endpoint;
|
|
169
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
170
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
171
|
-
$: translationurl && setTranslationUrl();
|
|
172
|
-
</script>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<div class="Container SmsVerificationContainer" bind:this={customStylingContainer}>
|
|
176
|
-
<h3 class="Title">
|
|
177
|
-
{#if isSmsValid}
|
|
178
|
-
{$_('title')}
|
|
179
|
-
{:else}
|
|
180
|
-
{$_('errorTitle')}
|
|
181
|
-
{/if}
|
|
182
|
-
</h3>
|
|
183
|
-
|
|
184
|
-
<div class="Field SmsVerificationField {!isSmsValid ? 'InvalidField' : ''}">
|
|
185
|
-
<label for="SmsCode">
|
|
186
|
-
{$_('code')}:<span class="FormRequired">*</span>
|
|
187
|
-
</label>
|
|
188
|
-
<input bind:value={smsCode} type="text" id="SmsCode" on:keydown={(e) => checkNumeric(e)} inputmode="numeric" pattern="[0-9]*" maxlength="6"/>
|
|
189
|
-
|
|
190
|
-
{#if !isSmsValid}
|
|
191
|
-
<p class="InvalidInput">{$_('smsCodeError')}</p>
|
|
192
|
-
{/if}
|
|
193
|
-
</div>
|
|
194
|
-
|
|
195
|
-
{#if timer}
|
|
196
|
-
<p class="SmsVerificationResendMessage">{$_('resendMessage')}</p>
|
|
197
|
-
{/if}
|
|
198
|
-
|
|
199
|
-
<button
|
|
200
|
-
class="Button SmsVerificationValidate"
|
|
201
|
-
on:click={activateUser}>
|
|
202
|
-
{$_('activate')}
|
|
203
|
-
</button>
|
|
204
|
-
<button
|
|
205
|
-
class="Button SmsVerificationResend"
|
|
206
|
-
on:click={resendCode}
|
|
207
|
-
disabled={timer}>
|
|
208
|
-
{$_('resend')} {#if timer}<span class="SmsVerificationResendTimer">(0:{secondsLeft < 10 ? '0' : ''}{secondsLeft})</span>{/if}
|
|
209
|
-
</button>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<style lang="scss">
|
|
214
|
-
|
|
215
|
-
*,
|
|
216
|
-
*::before,
|
|
217
|
-
*::after {
|
|
218
|
-
margin: 0;
|
|
219
|
-
padding: 0;
|
|
220
|
-
list-style: none;
|
|
221
|
-
text-decoration: none;
|
|
222
|
-
outline: none;
|
|
223
|
-
box-sizing: border-box;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.Title {
|
|
227
|
-
font-size: 14px;
|
|
228
|
-
margin: 0;
|
|
229
|
-
padding-bottom: 20px;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.Field {
|
|
233
|
-
color: var(--emfe-w-registration-contrast, var(--emfe-w-color-gray-300, #58586B));
|
|
234
|
-
display: flex;
|
|
235
|
-
flex-direction: column;
|
|
236
|
-
padding-bottom: 30px;
|
|
237
|
-
position: relative;
|
|
238
|
-
|
|
239
|
-
label {
|
|
240
|
-
font-size: 14px;
|
|
241
|
-
font-weight: 300;
|
|
242
|
-
padding-bottom: 5px;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
input, select {
|
|
246
|
-
width: 100%;
|
|
247
|
-
height: 44px;
|
|
248
|
-
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
249
|
-
border-radius: 5px;
|
|
250
|
-
box-sizing: border-box;
|
|
251
|
-
padding: 5px 15px;
|
|
252
|
-
font-size: 16px;
|
|
253
|
-
line-height: 18px;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
&.InvalidField {
|
|
257
|
-
input {
|
|
258
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
259
|
-
background: var(--emfe-w-color-pale, #FBECF4);
|
|
260
|
-
color: var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
&.Hidden {
|
|
265
|
-
display: none;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.LoginSMSHint {
|
|
270
|
-
margin-top: 20px;
|
|
271
|
-
}
|
|
272
|
-
.InvalidInput {
|
|
273
|
-
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
274
|
-
font-size: 10px;
|
|
275
|
-
line-height: 10px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.ErrorMessage {
|
|
279
|
-
margin: 0 0 15px 0;
|
|
280
|
-
font-size: 12px;
|
|
281
|
-
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.Button {
|
|
285
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
286
|
-
background: var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
287
|
-
border: 1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
288
|
-
border-radius: 5px;
|
|
289
|
-
width: 100%;
|
|
290
|
-
height: 60px;
|
|
291
|
-
padding: 0;
|
|
292
|
-
text-transform: uppercase;
|
|
293
|
-
font-size: 18px;
|
|
294
|
-
cursor: pointer;
|
|
295
|
-
margin-top: 24px;
|
|
296
|
-
&[disabled] {
|
|
297
|
-
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
298
|
-
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
299
|
-
cursor: not-allowed;
|
|
300
|
-
}
|
|
301
|
-
&.SmsVerificationResend {
|
|
302
|
-
background: var(--emfe-w-registration-color-bg, var(--emfe-w-color-gray-50, #F9F8F8));
|
|
303
|
-
color: var(--emfe-w-registration-typography, var(--emfe-w-color-contrast, #07072A));
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
</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 GeneralPlayerSmsVerificationForm from './GeneralPlayerSmsVerificationForm.svelte';
|
|
2
|
-
|
|
3
|
-
!customElements.get('general-player-sms-verification-form') && customElements.define('general-player-sms-verification-form', GeneralPlayerSmsVerificationForm);
|
|
4
|
-
export default GeneralPlayerSmsVerificationForm;
|
package/src/translations.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export const TRANSLATIONS = {
|
|
2
|
-
"en": {
|
|
3
|
-
"title": "Please enter the verification code you received on your number",
|
|
4
|
-
"errorTitle": "Your code was invalid, you can resend the code and try again",
|
|
5
|
-
"code": "Sms code",
|
|
6
|
-
"smsCodeError": "Invalid sms code, you can resend the code",
|
|
7
|
-
"resendMessage": "A new verification code has been sent to your phone number.",
|
|
8
|
-
"activate": "Activate Account",
|
|
9
|
-
"resend": "Resend",
|
|
10
|
-
"loginSMSHint": "A new verification code has been sent to your phone number"
|
|
11
|
-
},
|
|
12
|
-
"zh-hk": {
|
|
13
|
-
"title": "请输入您在号码上收到的验证码",
|
|
14
|
-
"errorTitle": "您的代码无效,您可以重新发送代码并重试",
|
|
15
|
-
"code": "短信代码",
|
|
16
|
-
"smsCodeError": "短信验证码无效,请重新发送验证码",
|
|
17
|
-
"resendMessage": "新的验证码已发送至您的手机号码",
|
|
18
|
-
"activate": "激活账户",
|
|
19
|
-
"resend": "重发"
|
|
20
|
-
},
|
|
21
|
-
"fr": {
|
|
22
|
-
"title": "Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",
|
|
23
|
-
"errorTitle": "Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",
|
|
24
|
-
"code": "Code SMS",
|
|
25
|
-
"smsCodeError": "Code sms invalide, vous pouvez renvoyer le code",
|
|
26
|
-
"resendMessage": "Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",
|
|
27
|
-
"activate": "Activer le compte",
|
|
28
|
-
"resend": "Renvoyer"
|
|
29
|
-
},
|
|
30
|
-
"tr": {
|
|
31
|
-
"title": "Please enter the verification code you received on your number",
|
|
32
|
-
"errorTitle": "Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",
|
|
33
|
-
"code": "SMS kodu",
|
|
34
|
-
"smsCodeError": "Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",
|
|
35
|
-
"resendMessage": "Telefon numaranıza yeni bir doğrulama kodu gönderildi.",
|
|
36
|
-
"activate": "Aktif hesap",
|
|
37
|
-
"resend": "Yeniden gönder",
|
|
38
|
-
"loginSMSHint": "Telefon numaranıza yeni bir doğrulama kodu gönderildi"
|
|
39
|
-
},
|
|
40
|
-
"ro": {
|
|
41
|
-
"title": "Please enter the verification code you received on your number",
|
|
42
|
-
"errorTitle": "Your code was invalid, you can resend the code and try again",
|
|
43
|
-
"code": "Sms code",
|
|
44
|
-
"smsCodeError": "Invalid sms code, you can resend the code",
|
|
45
|
-
"resendMessage": "Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",
|
|
46
|
-
"activate": "Activate Account",
|
|
47
|
-
"resend": "Resend"
|
|
48
|
-
},
|
|
49
|
-
"es": {
|
|
50
|
-
"title": "Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",
|
|
51
|
-
"errorTitle": "Su código es invalido",
|
|
52
|
-
"code": "Código SMS",
|
|
53
|
-
"smsCodeError": "Código SMS invalido",
|
|
54
|
-
"resendMessage": "Un nuevo codigo de verificación ha sido enviado a tu número celular.",
|
|
55
|
-
"activate": "Activar Cuenta",
|
|
56
|
-
"resend": "Reenviar"
|
|
57
|
-
},
|
|
58
|
-
"pt": {
|
|
59
|
-
"title": "Please enter the verification code you received on your number",
|
|
60
|
-
"errorTitle": "Your code was invalid, you can resend the code and try again",
|
|
61
|
-
"code": "Sms code",
|
|
62
|
-
"smsCodeError": "Invalid sms code, you can resend the code",
|
|
63
|
-
"resendMessage": "Um novo código de verificação foi enviado para o seu número de telefone.",
|
|
64
|
-
"activate": "Activate Account",
|
|
65
|
-
"resend": "Resend"
|
|
66
|
-
},
|
|
67
|
-
"hr": {
|
|
68
|
-
"title": "Unesite verifikacijski kod koji ste primili na svoj broj telefona",
|
|
69
|
-
"errorTitle": "Vaš kod je nevažeći",
|
|
70
|
-
"code": "Sms kod",
|
|
71
|
-
"smsCodeError": "Nevažeći sms kod",
|
|
72
|
-
"resendMessage": "Novi verifkacijski kod poslan je na vaš broj telefona.",
|
|
73
|
-
"activate": "Aktiviraj račun",
|
|
74
|
-
"resend": "Ponovno pošalji",
|
|
75
|
-
"loginSMSHint": "Novi verifkacijski kod poslan je na vaš broj telefona"
|
|
76
|
-
},
|
|
77
|
-
"pt-br": {
|
|
78
|
-
"title": "Por favor, insira o código de verificação que você recebeu no seu número de celular",
|
|
79
|
-
"errorTitle": "Código inválido,vôce pode reenviar o código e tentar novamente",
|
|
80
|
-
"code": "Código SMS",
|
|
81
|
-
"smsCodeError": "Código SMS inválido,vôce pode reenviar o código",
|
|
82
|
-
"resendMessage": "Um novo código de verificação foi enviado para o seu número de celular.",
|
|
83
|
-
"activate": "Ativar conta",
|
|
84
|
-
"resend": "Reenviar",
|
|
85
|
-
"loginSMSHint": "Um novo código de verificação foi enviado para o seu número de celular."
|
|
86
|
-
},
|
|
87
|
-
"es-mx": {
|
|
88
|
-
"title": "Por favor ingrese el código de verificación que recibió en su número móvil",
|
|
89
|
-
"errorTitle": "Código inválido,Puede enviar el código e intentar de nuevo",
|
|
90
|
-
"code": "Código SMS",
|
|
91
|
-
"smsCodeError": "Código SMS inválido,Puede reenviar el código",
|
|
92
|
-
"resendMessage": "Un nuevo código de verificación ha sido enviado a su número móvil .",
|
|
93
|
-
"activate": "Activar Cuenta",
|
|
94
|
-
"resend": "Reenviar",
|
|
95
|
-
"loginSMSHint": "Un nuevo código de verificación ha sido enviado a su número móvil ."
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-element';
|
|
2
|
-
|
|
3
|
-
import GeneralPlayerSmsVerificationForm from '../src/GeneralPlayerSmsVerificationForm';
|
|
4
|
-
|
|
5
|
-
// This default export determines where your story goes in the story list
|
|
6
|
-
export default {
|
|
7
|
-
title: 'GeneralPlayerSmsVerificationForm',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// 👇 We create a “template” of how args map to rendering
|
|
11
|
-
const GeneralPlayerSmsVerificationForm = ({ aProperty }) => html`<general-player-sms-verification-form></general-player-sms-verification-form>`;
|
|
12
|
-
|
|
13
|
-
export const FirstStory = GeneralPlayerSmsVerificationForm.bind({});
|