@everymatrix/cashier-error 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,39 +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-error
9
- </title>
10
- <link rel="stylesheet" href="public/reset.css">
11
- <script src='dist/cashier-error.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> cashier-error
29
- </h1>
30
- </header>
31
-
32
- <div class="webcomponent">
33
- <cashier-error
34
- assetsurl="https://static.everymatrix.com/mmstage/cashier/operator-assets/1995"
35
- ></cashier-error>
36
- </div>
37
-
38
- </body>
39
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/cashier-error.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,61 +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 image from '@rollup/plugin-image';
10
- const production = process.env.NODE_ENV === 'production';
11
- const dev = process.env.NODE_ENV === 'development';
12
-
13
- export default {
14
- input: 'src/index.ts',
15
- output: {
16
- sourcemap: true,
17
- format: 'umd',
18
- name: 'app',
19
- file: 'dist/cashier-error.js'
20
- },
21
- plugins: [
22
- svelte({
23
- preprocess: sveltePreprocess(),
24
- compilerOptions: {
25
- // enable run-time checks when not in production
26
- customElement: true,
27
- dev: !production
28
- }
29
- }),
30
- commonjs(),
31
- resolve({
32
- browser: true,
33
- dedupe: ['svelte']
34
- }),
35
- dev && serve({
36
- open: true,
37
- verbose: true,
38
- allowCrossOrigin: true,
39
- historyApiFallback: false,
40
- host: 'localhost',
41
- port: 5050,
42
- }),
43
- dev && livereload({ watch: ['', 'dist'] }),
44
- image(),
45
- typescript({
46
- sourceMap: !production,
47
- inlineSources: !production,
48
- }),
49
- // If we're building for production (npm run build
50
- // instead of npm run dev), minify
51
- production &&
52
- terser({
53
- output: {
54
- comments: "all"
55
- },
56
- })
57
- ],
58
- watch: {
59
- clearScreen: false
60
- }
61
- };
@@ -1,148 +0,0 @@
1
- <svelte:options tag={null} />
2
- <script lang="ts">
3
- import { _, addNewMessages, setLocale } from './i18n';
4
- import { TRANSLATIONS } from './translations';
5
- import errorImage from './assets/error-general-icon.png';
6
-
7
- export let assetsurl: string = '';
8
- export let lang: string = 'en';
9
- export let hidebuttons: string = '';
10
- export let errorcode: string = '';
11
- export let clientstyling: string = '';
12
- export let clientstylingurl: string = '';
13
- export let translationurl: string = '';
14
-
15
- let customStylingContainer:HTMLElement;
16
-
17
- const setActiveLanguage = ():void => {
18
- setLocale(lang);
19
- }
20
-
21
- const setTranslationUrl = ():void => {
22
- let url:string = translationurl;
23
-
24
- fetch(url).then((res:any) => res.json())
25
- .then((res) => {
26
- Object.keys(res).forEach((item:any):void => {
27
- addNewMessages(item, res[item]);
28
- });
29
- }).catch((err:any) => {
30
- console.log(err);
31
- });
32
- }
33
-
34
- Object.keys(TRANSLATIONS).forEach((item:any):void => {
35
- addNewMessages(item, TRANSLATIONS[item]);
36
- });
37
-
38
- const setClientStyling = ():void => {
39
- let sheet = document.createElement('style');
40
- sheet.innerHTML = clientstyling;
41
- customStylingContainer.appendChild(sheet);
42
- }
43
-
44
- const setClientStylingURL = ():void => {
45
- let url:URL = new URL(clientstylingurl);
46
- let cssFile:HTMLElement = document.createElement('style');
47
-
48
- fetch(url.href)
49
- .then((res:any) => res.text())
50
- .then((data:any) => {
51
- cssFile.innerHTML = data
52
-
53
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
54
- });
55
- }
56
-
57
- const close = () => {
58
- window.postMessage({ type: 'ErrorClose' }, window.location.href);
59
- };
60
-
61
- $: lang && setActiveLanguage();
62
- $: clientstyling && customStylingContainer && setClientStyling();
63
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
64
- $: translationurl && setTranslationUrl();
65
- </script>
66
-
67
- <div class="CashierError" bind:this={customStylingContainer}>
68
- <div class="CashierErrorContent">
69
- <slot name="icon" class="CashierErrorIcon">
70
- {#if assetsurl}
71
- <img src="{`${assetsurl}/error-general-icon.png`}" width="300px" alt="error">
72
- {:else}
73
- <img src={errorImage} width="300px" alt="error">
74
- {/if}
75
- </slot>
76
- <slot name="title" class="CashierErrorTitle">
77
- <span>{$_('errorGeneralTitle')}</span>
78
- </slot>
79
- <slot name="text" class="CashierErrorText">
80
- <span>{$_(`${errorcode || 'errorGeneralText'}`)}</span>
81
- </slot>
82
- {#if !hidebuttons || hidebuttons === 'false'}
83
- <slot name="button">
84
- <button on:click={close} class="CashierErrorButton">
85
- <span>{$_('errorGeneralButton')}</span>
86
- </button>
87
- </slot>
88
- {/if}
89
- </div>
90
- </div>
91
-
92
-
93
- <style lang="scss">
94
- .CashierError {
95
- height: inherit;
96
- display: flex;
97
- width: 100%;
98
- justify-content: center;
99
- align-items: center;
100
- overflow: hidden auto;
101
- }
102
- .CashierErrorContent {
103
- display: flex;
104
- flex-direction: column;
105
- width: 100%;
106
- max-width: 300px;
107
- align-items: center;
108
- gap: var(--emw--spacing-large, 20px);
109
- box-sizing: border-box;
110
- padding: 1px var(--emw--spacing-medium, 15px);
111
- height: inherit;
112
- }
113
- .CashierErrorTitle {
114
- color: var(--emw--color-black, #000);
115
- font-weight: var(--emw--font-weight-semibold, 500);
116
- font-size: var(--emw--font-size-x-small, 12px);
117
- line-height: 120%;
118
- text-align: center;
119
- }
120
- .CashierErrorText {
121
- color: var(--mmw--color-grey-290, #666);
122
- font-weight: var(--emw--font-weight-normal, 400);
123
- font-size: var(--emw--font-size-x-small, 12px);
124
- line-height: 120%;
125
- text-align: center;
126
- }
127
- .CashierErrorButton {
128
- width: 100%;
129
- height: 36px;
130
- color: var(--emw--color-white, #FFF);
131
- text-align: center;
132
- cursor: pointer;
133
- font-size: var(--emw--font-size-x-small, 12px);
134
- font-style: normal;
135
- font-weight: var(--emw--font-weight-semibold, 500);
136
- font-family: inherit;
137
- line-height: 36px;
138
- border: none;
139
- border-radius: var(--emw--border-radius-medium, 4px);
140
- background: var(--emw--color-primary, #7EC51E);
141
- &:hover {
142
- background: var(--mmw--color-main-button-hover, #71B11B);
143
- }
144
- &:active {
145
- background: var(--mmw--color-main-button-active, #5C950F);
146
- }
147
- }
148
- </style>
Binary file
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 CashierError from './CashierError.svelte';
2
-
3
- !customElements.get('cashier-error') && customElements.define('cashier-error', CashierError);
4
- export default CashierError;
@@ -1,38 +0,0 @@
1
- export const TRANSLATIONS = {
2
- "en": {
3
- "errorGeneralTitle": "Error Occurred",
4
- "errorGeneralText": "Something went wrong",
5
- "errorGeneralButton": "CLOSE",
6
- "PlayerSessionIsNotValid": "Player session is not valid",
7
- "VendorCommunicationError": "We apologise, but your payment provider has declined to process due to technical error. Please try later or contact your payment solution provider for further assistance. Error Code 21297",
8
- "PaymentMethodNotAllowed": "We apologise, but this payment method is unavailable at this time, please contact Customer Support for further assistance. Error Code 11402",
9
- "InvalidPaymentDetails": "We apologise, but you payment details are not valid. Please make sure you entered all payment details correctly and try again or contact Customer Support for further assistance. Error Code 13555",
10
- "MerchantUserHasWithdrawBlockRole": "Dear Player! Please be informed that currently you are not allowed to initiate withdrawal transactions from your player account. Error Code: 21122",
11
- "MerchantUserHasDepositBlockRole": "Dear Player! Please be informed that currently you are not allowed to initiate deposit transactions from your player account. Error Code: 21123",
12
- "JwtTokenError": "IDX12741: JWT must have three segments (JWS) or five segments (JWE).",
13
- "TransactionIsBlockedDueToNotCompletedKyc": "We apologise, but we cannot process the transaction because you haven't completed KYC. Please verify your identity or contact Customer Support for further assistance. Error Code 23601",
14
- "InsufficientCasinoFunds": " Your withdrawal is over your available balance. Please check your available balance to adjust your withdrawal amount",
15
- "DepositWageringLimit": "Attention! Your winnings balance has less than the amount you want to withdraw.",
16
- "AmountMinLimitExceeded": "Amount is smaller than PaymentMethod minimum limit",
17
- "AmountMaxLimitExceeded": "Amount is bigger than PaymentMethod maximum limit",
18
- "AmountIsMissing": "Amount is missing"
19
- },
20
- "tr": {
21
- "errorGeneralTitle": "Hata oluştu",
22
- "errorGeneralText": "Something went wrong",
23
- "errorGeneralButton": "KAPALI",
24
- "PlayerSessionIsNotValid": "Player session is not valid",
25
- "VendorCommunicationError": "Özür dileriz, ancak ödeme sağlayıcınız teknik hata nedeniyle işlemi yapmayı reddetti. Lütfen daha sonra deneyin veya daha fazla yardım için ödeme çözümü sağlayıcınızla iletişime geçin. Hata Kodu 21297",
26
- "PaymentMethodNotAllowed": "Özür dileriz, ancak bu ödeme yöntemi şu anda kullanılamıyor. Daha fazla yardım için lütfen Müşteri Desteğiyle iletişime geçin. Hata Kodu 11402",
27
- "InvalidPaymentDetails": "Özür dileriz, ancak ödeme bilgileriniz geçerli değil. Lütfen tüm ödeme ayrıntılarını doğru girdiğinizden emin olun ve tekrar deneyin veya daha fazla yardım için Müşteri Desteği ile iletişime geçin. Hata Kodu 13555",
28
- "MerchantUserHasWithdrawBlockRole": "Dear Player! Please be informed that currently you are not allowed to initiate withdrawal transactions from your player account. Error Code: 21122",
29
- "MerchantUserHasDepositBlockRole": "Dear Player! Please be informed that currently you are not allowed to initiate deposit transactions from your player account. Error Code: 21123",
30
- "JwtTokenError": "IDX12741: JWT must have three segments (JWS) or five segments (JWE).",
31
- "TransactionIsBlockedDueToNotCompletedKyc": "İşlemi gerçekleştirmek için kullanıcı doğrulamasını geçmeniz gerekmektedir. ",
32
- "InsufficientCasinoFunds": " Your withdrawal is over your available balance. Please check your available balance to adjust your withdrawal amount",
33
- "DepositWageringLimit": "Para çekim işleminizi gerçekleştirebilmek için ana para çevriminizi tamamlamanız gerekmektedir. Ana para çevrimi hakkında bilgi almak için sitemiz genel şartlar ve kurallar bölümünü ziyaret edebilir ya da destek kanallarımız üzerinden bilgi alabilirsiniz.",
34
- "AmountMinLimitExceeded": "Tutar, Ödeme Yöntemi minimum sınırından daha küçük",
35
- "AmountMaxLimitExceeded": "Tutar, Ödeme Yöntemi maksimum sınırından daha büyük",
36
- "AmountIsMissing": "Tutar eksik"
37
- }
38
- }
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import CashierError from '../src/CashierError';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'CashierError',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const CashierError = ({ aProperty }) => html`<cashier-error></cashier-error>`;
12
-
13
- export const FirstStory = CashierError.bind({});
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
6
- }