@everymatrix/cashier-verifications 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/index.html DELETED
@@ -1,41 +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
- cashier-verifications
9
- </title>
10
- <link rel="stylesheet" href="public/reset.css">
11
- <script src='dist/cashier-verifications.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; font-size: 14px; line-height: 16px}
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> cashier-verifications
29
- </h1>
30
- </header>
31
-
32
- <div class="webcomponent">
33
- <cashier-verifications
34
- endpoint="https://zirvebet-api.stage.norway.everymatrix.com"
35
- >
36
-
37
- </cashier-verifications>
38
- </div>
39
-
40
- </body>
41
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/cashier-verifications.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,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/cashier-verifications.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: 5050,
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,434 +0,0 @@
1
- <svelte:options tag={null} />
2
- <script lang="ts">
3
-
4
- import { _, addNewMessages, setLocale, setupI18n } from './i18n';
5
- import { TRANSLATIONS } from './translations';
6
- import dayjs from 'dayjs';
7
- import utc from 'dayjs/plugin/utc';
8
- dayjs.extend(utc);
9
-
10
- export let endpoint: string;
11
- export let lang:string = 'en';
12
- export let translationurl:string='';
13
- export let clientstyling:string = '';
14
- export let clientstylingurl:string = '';
15
- export let session: string = '';
16
- export let customerid: string = '';
17
- export let ismobileview: string = '';
18
-
19
- let customStylingContainer:HTMLElement;
20
- let verificationVendorList = new Set<string>();
21
- let clickedVerificationsLink = new Set<string>();
22
- let verificationStatus: Verifications;
23
- let displayMessages;
24
- let allVerificationsVisible = true;
25
- let desktopView: boolean = true;
26
-
27
- enum CustomerVerificationVendors {
28
- 'Manual' = 'Manual',
29
- 'ShuftiPro' = 'ShuftiPro'
30
- }
31
-
32
- enum VerificationDocumentsStatuses {
33
- 'Requested' = 'Requested'
34
- }
35
-
36
- enum CustomerVerificationStatus {
37
- 'Unknown' = 'Unknown',
38
- 'Unverified' = 'Unverified',
39
- 'InProgress' = 'InProgress',
40
- 'Failed' = 'Failed',
41
- 'Verified' = 'Verified',
42
- 'Referred' = 'Referred',
43
- 'True' = 'True',
44
- 'False' = 'False',
45
- 'AwaitingForResponse' = 'AwaitingForResponse'
46
- }
47
-
48
- enum CustomerVerificationType {
49
- 'Unknown' = 'Unknown',
50
- 'Documents' = 'Documents',
51
- 'Age' = 'Age',
52
- 'Pep' = 'Pep',
53
- 'Sanction' = 'Sanction',
54
- 'Aml' = 'Aml',
55
- 'ProofOfAddress' = 'ProofOfAddress',
56
- 'SourceOfWealth' = 'SourceOfWealth',
57
- 'SocialMedia' = 'SocialMedia',
58
- 'Biometric' = 'Biometric'
59
- }
60
-
61
- interface Verifications {
62
- VerificationUrl?: string;
63
- VerificationSummaryStatus: CustomerVerificationStatus;
64
- VerificationStatuses?: VerificationStatuses[];
65
- }
66
-
67
- interface VerificationStatuses {
68
- Type: string,
69
- Vendor: string,
70
- VerificationDocuments: any[]
71
- VerificationUrlType: string,
72
- VerificationUrl: string
73
- }
74
- const verificationStatusInProgress = [CustomerVerificationStatus.InProgress, CustomerVerificationStatus.Referred, CustomerVerificationStatus.AwaitingForResponse]
75
-
76
- const setTranslationUrl = () => {
77
- let url:string = translationurl;
78
- if (url) {
79
- return fetch(url).then((res:any) => res.json())
80
- .then((res) => {
81
- Object.keys(res).forEach((item:any):void => {
82
- addNewMessages(item, res[item]);
83
- });
84
- }).catch((err:any) => {
85
- console.log(err);
86
- });
87
- }
88
- }
89
-
90
- Object.keys(TRANSLATIONS).forEach((item:any):void => {
91
- addNewMessages(item, TRANSLATIONS[item]);
92
- });
93
-
94
- const setActiveLanguage = ():void => {
95
- setLocale(lang);
96
- }
97
-
98
- const setClientStyling = ():void => {
99
- let sheet = document.createElement('style');
100
- sheet.innerHTML = clientstyling;
101
- customStylingContainer.appendChild(sheet);
102
- }
103
-
104
- const setClientStylingURL = ():void => {
105
- let url:URL = new URL(clientstylingurl);
106
- let cssFile:HTMLElement = document.createElement('style');
107
-
108
- fetch(url.href)
109
- .then((res:any) => res.text())
110
- .then((data:any) => {
111
- cssFile.innerHTML = data
112
-
113
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
114
- });
115
- }
116
-
117
- const getVerifications = () => {
118
- const { merchantId, customerId } = getCustomerFromSession();
119
- if (!merchantId) {
120
- return;
121
- }
122
- const url:URL = new URL(`${endpoint}/v1/player/verification/GetKYCStatus`);
123
- const headers = new Headers();
124
- headers.append("accept", "application/json");
125
- headers.append("Content-Type", "application/json");
126
- headers.append("X-Client-Request-Timestamp", dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
127
- const requestParams:RequestInit = {
128
- method: "POST",
129
- headers: headers,
130
- body: JSON.stringify({
131
- "MerchantId": merchantId,
132
- "CustomerId": customerId,
133
- "All": false,
134
- "AllParameters": false
135
- })
136
- }
137
- fetch(url, requestParams).then(res => res.json()).then(data => {
138
- verificationStatus = getCalculatedStatus(data.Verifications);
139
- verificationStatus.VerificationStatuses.forEach(status => {
140
- if (status.VerificationUrlType !== 'Widget') {
141
- verificationVendorList.add(status.Vendor);
142
- }
143
- })
144
- displayMessages = getMessages()
145
- })
146
- }
147
-
148
- const getCustomerFromSession = () => {
149
- let token = session.split('.')[1];
150
- if (token) {
151
- let decodedToken = JSON.parse(atob(token));
152
- return {
153
- merchantId: decodedToken?.mid,
154
- customerId: `${decodedToken?.mid}~${customerid}`
155
- }
156
- }
157
- return {
158
- merchantId: null,
159
- customerId: null
160
- };
161
- }
162
-
163
- const getCalculatedStatus = (verifications) => {
164
- if (!verifications || !verifications.length) {
165
- return {
166
- VerificationSummaryStatus: CustomerVerificationStatus.Unverified,
167
- VerificationStatuses: []
168
- }
169
- }
170
- const verificationsInProgress = getVerificationInProgress(verifications);
171
- if (verificationsInProgress && verificationsInProgress.length) {
172
- const lastVerification = getLastVerification(verificationsInProgress)
173
- return {
174
- VerificationSummaryStatus: lastVerification.Status,
175
- VerificationUrl: lastVerification.Flags?.DeferredUrlKey,
176
- VerificationStatuses: getVerificationsFilteredByStatus(verificationsInProgress, lastVerification.Status)
177
- }
178
- } else {
179
- const isVerificationFailed = verifications.some((verification) => verification.Status === CustomerVerificationStatus.Failed )
180
- return {
181
- VerificationSummaryStatus: isVerificationFailed ? CustomerVerificationStatus.Failed : CustomerVerificationStatus.Verified,
182
- VerificationStatuses: getVerificationsFilteredByStatus(verifications, [CustomerVerificationStatus.Failed])
183
- }
184
- }
185
- }
186
-
187
- const getLastVerification = (verifications) => {
188
- return verifications.reduce((acc, curr) => {
189
- return acc ? (new Date(acc) < new Date(curr) ? curr : acc) : curr
190
- }, 0)
191
- }
192
- const getVerificationsFilteredByStatus = (verifications, statuses) => {
193
- return verifications
194
- .filter((verification) => statuses.includes(verification.Status))
195
- .map((verification) => ({
196
- Type: verification.Type,
197
- Vendor: verification.VendorName,
198
- VerificationDocuments: verification.Documents ? [...Object.values(verification.Documents)] : [],
199
- VerificationUrlType: verification.Flags?.DeferredUrlTypeKey,
200
- VerificationUrl: verification.Flags?.DeferredUrlKey
201
- }))
202
- }
203
-
204
- const getVerificationInProgress = (verifications) => {
205
- return verifications.filter((verification) => {
206
- let isInProgress = verificationStatusInProgress.includes(verification.Status);
207
- if (!isInProgress) {
208
- return false;
209
- }
210
- return verification.Flags && verification.Flags.DeferredUrlKey || isManualDocRequested(verification) || isShuftiPro(verification)
211
- })
212
- }
213
-
214
- const isManualDocRequested = (verification) => {
215
- const isManual = verification.Documents && verification.VendorName === CustomerVerificationVendors.Manual;
216
- const hasRequestedDocs = Object.values(verification.Documents).some((doc) => doc.Status === VerificationDocumentsStatuses.Requested)
217
- return isManual && hasRequestedDocs
218
- }
219
-
220
- const isShuftiPro = (verification) => {
221
- return verification.VendorName === CustomerVerificationVendors.ShuftiPro && verification.Status === CustomerVerificationStatus.Referred
222
- }
223
-
224
- const getMessages = () => {
225
- switch (verificationStatus.VerificationSummaryStatus) {
226
- case CustomerVerificationStatus.InProgress:
227
- const result = [];
228
- verificationVendorList.forEach(vendor => {
229
- result.push(getSuccessfulMessageByVendor(vendor));
230
- });
231
- return result;
232
- case CustomerVerificationStatus.Referred:
233
- return [$_('verification.idenfy.referred-awaiting')];
234
- case CustomerVerificationStatus.Failed:
235
- return [$_('verification.message.failed')];
236
- }
237
- }
238
-
239
- const getSuccessfulMessageByVendor = (vendor) => {
240
- const verifications = verificationStatus.VerificationStatuses.filter(item => item.Vendor === vendor);
241
- if (vendor === CustomerVerificationVendors.ShuftiPro) {
242
- return getShuftiVerificationMessage(verifications);
243
- } else {
244
- const linkName = $_('verification.idenfy.link-name'),
245
- params = {
246
- link: `<a href="${verifications[0].VerificationUrl}" target="_blank">${linkName}</a>`
247
- };
248
- return $_('verification.idenfy.in-progress', {values: params});
249
- }
250
- }
251
-
252
- const getShuftiVerificationMessage = (verifications) => {
253
- const requestedShuftiTypes = [];
254
- const translationParameters = {}
255
- const shuftiTypes = [CustomerVerificationType.Biometric, CustomerVerificationType.Documents, CustomerVerificationType.ProofOfAddress]
256
- verifications.forEach(item => {
257
- if (shuftiTypes.includes(item.Type)) {
258
- requestedShuftiTypes.push(item.Type)
259
- translationParameters[item.Type] = getVerificationLink(item, getVerificationLinkName(item.Type))
260
- }
261
- })
262
- let startedVerifications = requestedShuftiTypes.every((type) => clickedVerificationsLink.has(type))
263
- let translationKey = `verification.shuftipro.in-progress.${requestedShuftiTypes.sort().join('.')}`;
264
- return startedVerifications ? $_(`verification.shuftipro.validations-started`) : $_(translationKey, {values: translationParameters})
265
- }
266
-
267
-
268
- const getVerificationLink = (shuftiName, linkName) => {
269
- return `<a class="verificationLink ${shuftiName.Type}" href=" ${shuftiName.VerificationUrl} " target="_blank">${linkName}</a>`;
270
- }
271
-
272
- const getVerificationLinkName = (defaultValue) => {
273
- return $_(`verification.shuftipro.link-name.${defaultValue}`);
274
- }
275
-
276
- const showAllVerifications = (event, index) => {
277
- event.stopPropagation()
278
- if (event.target && (event.target.href || event.target.closest('a'))) {
279
- if (event.target.closest('.verificationLink')) {
280
- const type = event.target.className.split(' ')[1];
281
- clickedVerificationsLink.add(type)
282
- displayMessages = getMessages();
283
- }
284
- return;
285
- }
286
- if (index === 0) {
287
- allVerificationsVisible = !allVerificationsVisible
288
- }
289
- }
290
-
291
- const setDevice = () => {
292
- desktopView = ismobileview === 'false';
293
- }
294
-
295
- $: lang && setActiveLanguage();
296
- $: endpoint && session && getVerifications();
297
- $: translationurl && setTranslationUrl();
298
- $: clientstyling && customStylingContainer && setClientStyling();
299
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
300
- $: ismobileview && setDevice()
301
-
302
- </script>
303
-
304
-
305
- <div class="CashierVerifications" class:CashierVerificationsDesktop={desktopView} bind:this={customStylingContainer}>
306
- {#if displayMessages}
307
- <div class="CashierVerificationsWrapper">
308
- {#each displayMessages as message, index}
309
- <div class="CashierVerificationMessage" class:ShowAll={allVerificationsVisible} on:click={(e) => showAllVerifications(e, index)}>
310
- <div class="IconVerification"><svg width="64px" height="64px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M4.39254 16.2614C2.64803 13.1941 1.66074 9.71783 1.51646 6.15051C1.50127 5.77507 1.70918 5.42812 2.04153 5.25282L11.5335 0.246091C11.8254 0.0920859 12.1746 0.0920859 12.4665 0.246091L21.9585 5.25282C22.2908 5.42812 22.4987 5.77507 22.4835 6.15051C22.3393 9.71783 21.352 13.1941 19.6075 16.2614C17.8618 19.3307 15.4169 21.8869 12.4986 23.7001C12.1931 23.8899 11.8069 23.8899 11.5014 23.7001C8.58313 21.8869 6.13817 19.3307 4.39254 16.2614Z" fill="#fa9200"></path> <path d="M8.25 12.75L11.25 15L17.25 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg></div>
311
- <p class="text"> {@html message}</p>
312
- {#if displayMessages.length > 1 && index === 0}
313
- <span class="CashierVerificationChevron" on:click={(e) => showAllVerifications(e, index)} >
314
- <svg width="25px" height="25px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
315
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM8.70711 9.79289C8.31658 9.40237 7.68342 9.40237 7.29289 9.79289C6.90237 10.1834 6.90237 10.8166 7.29289 11.2071L11.2929 15.2071C11.6834 15.5976 12.3166 15.5976 12.7071 15.2071L16.7071 11.2071C17.0976 10.8166 17.0976 10.1834 16.7071 9.79289C16.3166 9.40237 15.6834 9.40237 15.2929 9.79289L12 13.0858L8.70711 9.79289Z" fill="#000000"/>
316
- </svg>
317
- </span>
318
- {/if}
319
- </div>
320
- {/each}
321
- </div>
322
- {/if}
323
- </div>
324
-
325
-
326
- <style lang="scss">
327
- $color-black-transparency-10: var(--mmw--color-black-transparency-10, rgba(0, 0, 0, .1));
328
- $border-radius-medium-plus: var(--mmw--border-radius-medium-plus, 6px);
329
-
330
- *,
331
- *::before,
332
- *::after {
333
- margin: 0;
334
- padding: 0;
335
- list-style: none;
336
- text-decoration: none;
337
- outline: none;
338
- box-sizing: border-box;
339
- -webkit-tap-highlight-color: transparent;
340
- }
341
-
342
- .CashierVerifications {
343
- box-shadow: 0 0 4px $color-black-transparency-10;
344
- &.CashierVerificationsDesktop {
345
- border-radius: $border-radius-medium-plus;
346
- overflow: hidden;
347
- &:has(.CashierVerificationMessage) {
348
- margin-bottom: var(--emw--spacing-small, 12px);
349
- }
350
- }
351
- }
352
-
353
- .CashierVerificationsWrapper {
354
- display: flex;
355
- flex-direction: column;
356
- width: 100%;
357
- }
358
-
359
- .IconVerification {
360
- width: 30px;
361
- display: flex;
362
- }
363
- .CashierVerificationMessage {
364
- display: flex;
365
- align-items: center;
366
- box-sizing: border-box;
367
- background: var(--emw--color-gray-50, #F7F8FA);
368
- border-bottom: 1px solid var(--mmw--color-grey-105, #E8E9EB);
369
- padding: 0 var(--emw--spacing-small, 12px);
370
- transition: 0.5s;
371
- max-height: 500px;
372
-
373
- &:first-child {
374
- cursor: pointer;
375
- &:hover {
376
- background: linear-gradient(0, var(--emw--color-gray-50, #F7F8FA) 0%, var(--emw--color-white, #fff) 100%);
377
- }
378
- }
379
-
380
- &:not(.ShowAll):not(:first-child) {
381
- max-height: 0;
382
- overflow: hidden;
383
- }
384
-
385
- &:hover {
386
- .CashierVerificationChevron svg path {
387
- opacity: 1;
388
- }
389
- }
390
- }
391
-
392
- svg {
393
- height: 20px;
394
- .IconColor {
395
- fill: var(--emw--color-warning, #ec9109)
396
- }
397
- }
398
-
399
- p {
400
- color: var(--mmw--color-grey-10, #111);
401
- font-size: var(--emw--font-size-small, 14px);
402
- font-family: inherit;
403
- line-height: calc(var(--emw--size-small, 14px) + 3px);
404
- margin: var(--emw--spacing-small, 12px);
405
- }
406
- .text {
407
- word-break: break-word;
408
- }
409
- .CashierVerificationChevron {
410
- cursor: pointer;
411
- margin-left: auto;
412
- svg {
413
- transition: 0.25s;
414
- }
415
- svg path {
416
- fill: var(--mmw--color-grey-290, #666);
417
- opacity: 0.5;
418
- }
419
- &:hover {
420
- svg path {
421
- opacity: 1;
422
- }
423
- }
424
- }
425
-
426
- .ShowAll .CashierVerificationChevron svg {
427
- -o-transform:rotate(180deg);
428
- -ms-transform:rotate(180deg);
429
- -moz-transform:rotate(180deg);
430
- -webkit-transform:rotate(180deg);
431
- transform:rotate(180deg);
432
- }
433
-
434
- </style>
package/src/i18n.js DELETED
@@ -1,32 +0,0 @@
1
- import {
2
- dictionary,
3
- locale,
4
- init,
5
- addMessages,
6
- _
7
- } from 'svelte-i18n';
8
-
9
- init({
10
- fallbackLocale: 'en'
11
- });
12
-
13
- function setupI18n({ withLocale: _locale, translations }) {
14
- locale.subscribe((data) => {
15
- if (data == null) {
16
- dictionary.set(translations);
17
- locale.set(_locale);
18
- }
19
- }); // maybe we will need this to make sure that the i18n is set up only once
20
- /*dictionary.set(translations);
21
- locale.set(_locale);*/
22
- }
23
-
24
- function addNewMessages(lang, dict) {
25
- addMessages(lang, dict);
26
- }
27
-
28
- function setLocale(_locale) {
29
- locale.set(_locale);
30
- }
31
-
32
- export { _, setupI18n, addNewMessages, setLocale };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import CashierVerifications from './CashierVerifications.svelte';
2
-
3
- !customElements.get('cashier-verifications') && customElements.define('cashier-verifications', CashierVerifications);
4
- export default CashierVerifications;