@everymatrix/casino-random-game 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html DELETED
@@ -1,47 +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
- casino-random-game
9
- </title>
10
- <link rel="stylesheet" href="public/reset.css">
11
- <script src='dist/casino-random-game.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> casino-random-game
29
- </h1>
30
- </header>
31
-
32
- <div class="webcomponent">
33
- <casino-random-game
34
- endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
35
- datasource="livecasino"
36
- gameevent="ShowGameModal"
37
- randombuttonicon='<svg width=35 height=35 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
38
- <style type="text/css">
39
- .st0{fill-rule:evenodd;clip-rule:evenodd;fill:var(--emfe-w-color-white, #FFFFFF);;}
40
- </style>
41
- <path class="st0" d="M161,16.7c-2.7,0-5.5,0.5-8.1,1.6l-44.2,18.3C98.1,41,93,53.2,97.4,63.8l18.3,44.2 c4.4,10.6,16.6,15.7,27.2,11.3l44.2-18.3c10.6-4.4,15.7-16.6,11.3-27.2l-18.3-44.2C176.8,21.6,169.1,16.7,161,16.7L161,16.7z M161,25c4.9,0,9.4,2.9,11.4,7.8l18.3,44.2c2.7,6.5-0.3,13.7-6.8,16.3l-44.2,18.3c-6.5,2.7-13.7-0.3-16.3-6.8l-18.3-44.2 c-2.7-6.5,0.3-13.7,6.8-16.3L156.1,26C157.7,25.3,159.4,25,161,25L161,25z M127.1,54.2c-1.7,0-3.2,0.7-4.4,1.8 c-1.2,1.2-1.8,2.8-1.8,4.4s0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8s3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4s-0.7-3.2-1.8-4.4 C130.3,54.8,128.7,54.2,127.1,54.2z M147.9,62.5c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4s0.7,3.2,1.8,4.4 c1.2,1.2,2.8,1.8,4.4,1.8s3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4s-0.7-3.2-1.8-4.4C151.2,63.2,149.6,62.5,147.9,62.5z M168.8,70.8 c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4s0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8s3.2-0.7,4.4-1.8 c1.2-1.2,1.8-2.8,1.8-4.4s-0.7-3.2-1.8-4.4C172,71.5,170.4,70.8,168.8,70.8L168.8,70.8z M39,79.2c-8.1,0.1-15.8,4.9-19.1,12.9 L1.6,136.2c-4.4,10.6,0.7,22.8,11.3,27.2l44.2,18.3c10.6,4.4,22.8-0.7,27.2-11.3l18.3-44.2c4.4-10.6-0.7-22.8-11.3-27.2L47.1,80.8 C44.5,79.7,41.7,79.1,39,79.2L39,79.2z M39,87.5c1.6,0,3.3,0.3,4.9,1l44.2,18.3c6.5,2.7,9.4,9.9,6.8,16.3l-18.3,44.2 c-2.7,6.5-9.9,9.4-16.3,6.8l-44.2-18.3c-6.5-2.7-9.4-9.9-6.8-16.3l18.3-44.2C29.6,90.4,34.1,87.5,39,87.5L39,87.5z M44.7,99.4 c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4c0,1.7,0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8s3.2-0.7,4.4-1.8 c1.2-1.2,1.8-2.8,1.8-4.4c0-1.7-0.7-3.2-1.8-4.4C47.9,100,46.3,99.4,44.7,99.4z M75.5,112.1c-1.7,0-3.2,0.7-4.4,1.8 c-1.2,1.2-1.8,2.8-1.8,4.4c0,1.7,0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8c1.7,0,3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4 c0-1.7-0.7-3.2-1.8-4.4C78.7,112.8,77.1,112.1,75.5,112.1z M36.7,118.6c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4 s0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8c1.7,0,3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4s-0.7-3.2-1.8-4.4 C39.9,119.3,38.3,118.6,36.7,118.6z M67.5,131.4c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4s0.7,3.2,1.8,4.4 c1.2,1.2,2.8,1.8,4.4,1.8c1.7,0,3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4s-0.7-3.2-1.8-4.4C70.7,132,69.1,131.4,67.5,131.4z M28.7,137.9c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4c0,1.7,0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8 c1.7,0,3.2-0.7,4.4-1.8c1.2-1.2,1.8-2.8,1.8-4.4c0-1.7-0.7-3.2-1.8-4.4C32,138.5,30.4,137.9,28.7,137.9z M59.5,150.6 c-1.7,0-3.2,0.7-4.4,1.8c-1.2,1.2-1.8,2.8-1.8,4.4c0,1.7,0.7,3.2,1.8,4.4c1.2,1.2,2.8,1.8,4.4,1.8s3.2-0.7,4.4-1.8 c1.2-1.2,1.8-2.8,1.8-4.4c0-1.7-0.7-3.2-1.8-4.4C62.8,151.3,61.2,150.6,59.5,150.6z"/>
42
- </svg>'
43
- ></casino-random-game>
44
- </div>
45
-
46
- </body>
47
- </html>
package/index.js DELETED
@@ -1 +0,0 @@
1
- import './dist/casino-random-game.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/casino-random-game.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,427 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { getDevice } from 'rvhelper';
5
- import { _, setupI18n, addNewMessages, setLocale } from './i18n';
6
- import { TRANSLATIONS } from './translations';
7
-
8
- export let endpoint:string = '';
9
- export let datasource:string = '';
10
- export let gameevent:string = '';
11
- export let lang:string = '';
12
- export let randombuttonicon:string = '';
13
- export let buttontext: string = '';
14
- export let translationurl:string = '';
15
- export let clientstyling:string = '';
16
- export let clientstylingurl:string = '';
17
- export let filteredrandomgamecategories:string = '';
18
-
19
- let games:any = [];
20
- let randomGame:any = '';
21
- let gamesToShow:any;
22
- let show:boolean = false;
23
- let offset:number = 0;
24
- let count:number = 0;
25
- let slotDone:boolean = false;
26
- let hasRandomGames:boolean = false;
27
- let intervalId:number;
28
-
29
- let userAgent:string = window.navigator.userAgent;
30
- let customStylingContainer:HTMLElement;
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 randomizeGame = () => {
52
- gamesToShow = shuffle(gamesToShow);
53
- offset = 0;
54
- count = 0;
55
- slotDone = false;
56
- randomGame = games[Math.floor(Math.random() * games.length)];
57
- show = true;
58
- }
59
-
60
- const getRandomGame = (refresh?:boolean):void => {
61
- if (hasRandomGames) {
62
- randomizeGame();
63
- clearInterval(intervalId);
64
- intervalId = setInterval(() => {
65
- offset -= 75;
66
- count++;
67
-
68
- if (count == 20) {
69
- slotDone = true;
70
- clearInterval(intervalId);
71
- }
72
- }, 150);
73
-
74
- } else {
75
- show = true;
76
- slotDone = true;
77
- }
78
-
79
- if(refresh){
80
- //Analytics event
81
- if(typeof gtag == 'function'){
82
- gtag('event', 'RefreshRandomGame', {
83
- 'context': 'RandomGameWidget',
84
- 'gameId' : `${randomGame.gId || randomGame.id}`
85
- });
86
- }
87
- }
88
- window.postMessage({ type: 'RandomWidgetState', state: true }, window.location.href);
89
- }
90
-
91
-
92
- const shuffle = (array):Array<any> => {
93
- let currentIndex = array.length, randomIndex;
94
-
95
- while (currentIndex != 0) {
96
- randomIndex = Math.floor(Math.random() * currentIndex);
97
- currentIndex--;
98
-
99
- [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
100
- }
101
-
102
- return array;
103
- }
104
-
105
- const playGame = ():void => {
106
- window.postMessage({ type: gameevent, gameId: randomGame.gId || randomGame.id }, window.location.href);
107
- show = false;
108
- window.postMessage({ type: 'RandomWidgetState', state: false }, window.location.href);
109
-
110
- //Analytics event
111
- if(typeof gtag == 'function'){
112
- gtag('event', 'OpenGame', {
113
- 'context': 'RandomGameWidget',
114
- 'gameId' : `${randomGame.gId || randomGame.id}`
115
- });
116
- }
117
- }
118
-
119
- const closeModal = ():void => {
120
- show = false;
121
- window.postMessage({ type: 'RandomWidgetState', state: show }, window.location.href);
122
- }
123
-
124
- const fetchGameList = ():void => {
125
- let url = new URL(`${endpoint}/v1/casino/games`);
126
-
127
- url.searchParams.append('platform', getDevice(userAgent));
128
- url.searchParams.append('datasource', datasource);
129
- url.searchParams.append('fields', 'gId,id,href,thumbnail,name,vendor,categories')
130
- if (filteredrandomgamecategories) {
131
- url.searchParams.append('filter', `groups=${filteredrandomgamecategories}`);
132
- }
133
- url.searchParams.append('expand', 'categories,vendor');
134
- url.searchParams.append('pagination', 'offset=0,limit=1000');
135
-
136
- fetch(url.href)
137
- .then((res:any) => res.json())
138
- .then((data:any) => {
139
- games = data.items;
140
- if (games.length) {
141
- gamesToShow = games.slice(0, 19);
142
- hasRandomGames = true;
143
- } else {
144
- gamesToShow = [];
145
- hasRandomGames = false;
146
- }
147
- }).catch((err:any) => {
148
- console.log(err);
149
- hasRandomGames = false;
150
- });;
151
- }
152
-
153
- const setActiveLanguage = () => {
154
- setLocale(lang);
155
- }
156
-
157
- const setClientStyling = ():void => {
158
- let sheet = document.createElement('style');
159
- sheet.innerHTML = clientstyling;
160
- customStylingContainer.appendChild(sheet);
161
- }
162
-
163
- const setClientStylingURL = ():void => {
164
-
165
- let url:URL = new URL(clientstylingurl);
166
- let cssFile:HTMLElement = document.createElement('style');
167
-
168
- fetch(url.href)
169
- .then((res:any) => res.text())
170
- .then((data:any) => {
171
- cssFile.innerHTML = data;
172
-
173
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
174
- });
175
- }
176
-
177
- $: lang && setActiveLanguage();
178
- $: translationurl && setTranslationUrl();
179
- $: endpoint && datasource && fetchGameList();
180
- $: clientstyling && customStylingContainer && setClientStyling();
181
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
182
- </script>
183
-
184
- <div bind:this={customStylingContainer} part="CustomStylingContainer">
185
- {#if show}
186
- <div class="ModalWindow">
187
- <div class="ModalContainer" >
188
- <span class="ModalCloseBtn" on:click={closeModal} role="button">
189
- <slot name="close">
190
- <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
191
- </slot>
192
- </span>
193
-
194
- {#if !slotDone}
195
- <div class="RandomGameWrapper">
196
- <main class="RandomGamesSliderWrapper">
197
- <div class="items" style="transform: translateY({offset}px);">
198
- {#each gamesToShow as game, i}
199
- <div class="item">
200
- <img class="RandomGameImage"src={game.thumbnail} alt={game.name} title={game.name}/>
201
- </div>
202
- {/each}
203
- </div>
204
- </main>
205
- <p class="RandomGameLoading">{$_('randomGameLoading')}</p>
206
- </div>
207
- {/if}
208
-
209
- {#if slotDone}
210
- {#if hasRandomGames}
211
- <div class="RandomGameWrapper">
212
- <div class="item">
213
- <img class="RandomGameImage" src={randomGame.thumbnail} alt={randomGame.name} title={randomGame.name}/>
214
- <button class="RandomTryAgain" on:click={() => getRandomGame(true)}>
215
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
216
- <style type="text/css">
217
- .st0{fill:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));}
218
- </style>
219
- <path class="st0" d="M162.4,161.2C145.3,178.5,122.7,187,100,187c-19.1,0-38.2-6.2-54-18.4l2.2,24c0.4,3.6-2.4,6.9-6,7.3h-0.7 c-3.3,0-6.2-2.7-6.7-6l-3.8-41.1c-0.4-3.6,2.4-6.9,6-7.3l40.9-3.8c3.6-0.4,6.9,2.4,7.3,6c0.4,3.6-2.4,6.9-6,7.3l-26,2.4 c29.3,23.3,72.4,21.6,99.5-5.6c19.8-19.8,26.9-48.7,18.4-75.3c-1.1-3.6,0.9-7.3,4.4-8.4c3.6-1.1,7.3,0.9,8.4,4.4 C194,103.9,185.8,137.9,162.4,161.2L162.4,161.2z M47.1,47.9c27.1-27.1,70.2-29.1,99.5-5.6l-26,2.4c-3.6,0.4-6.4,3.6-6,7.3 c0.2,3.6,3.3,6,6.7,6h0.7l40.9-3.8c3.6-0.4,6.4-3.6,6-7.3l-4-41.1c-0.4-3.6-3.6-6.4-7.3-6c-3.6,0.4-6.4,3.6-6,7.3l2.2,24 C119.3,4.4,69.3,6.8,37.6,38.6C14.2,61.9,6,95.9,15.8,127.2c0.9,2.9,3.6,4.7,6.4,4.7c0.7,0,1.3,0,2-0.2c3.6-1.1,5.6-4.9,4.4-8.4 C20.2,96.6,27.4,67.7,47.1,47.9L47.1,47.9z"/>
220
- </svg>
221
- </button>
222
- </div>
223
- <div class="RandomGameDetails">
224
- <p class="RandomGameTitle">{randomGame.name}</p>
225
- <p class="RandomGameVendor">{randomGame.vendor.name}</p>
226
- <button class="RandomGamePlay" on:click={() => playGame()}>{$_('playNowRandomGame')}</button>
227
- </div>
228
- </div>
229
- {:else}
230
- <p class="RandomGameLoading">{$_('noGames')}</p>
231
- {/if}
232
- {/if}
233
- </div>
234
- </div>
235
- {/if}
236
-
237
- <div class="RandomButtonWrapper">
238
- <button class="RandomButton" on:click={() => getRandomGame()}>
239
- {#if buttontext}
240
- <span class="RandomButtonText">{buttontext}</span>
241
- {:else if !buttontext}
242
- <span class="RandomButtonText">{$_('playRandomGame')}</span>
243
- {/if}
244
- <span class="RandomButtonIcon">
245
- {@html randombuttonicon}
246
- </span>
247
- </button>
248
- </div>
249
- </div>
250
-
251
- <style lang="scss">
252
-
253
-
254
- *,
255
- *::before,
256
- *::after {
257
- margin: 0;
258
- padding: 0;
259
- list-style: none;
260
- text-decoration: none;
261
- outline: none;
262
- box-sizing: border-box;
263
- }
264
-
265
- .ModalWindow {
266
- display: flex;
267
- position: fixed;
268
- align-items: center;
269
- justify-content: center;
270
- width: 100%;
271
- height: 100%;
272
- z-index: 300;
273
- top: 0;
274
- left: 0;
275
- background-color: rgba(0, 0, 0, .9);
276
- .ModalContainer {
277
- display: flex;
278
- flex-direction: column;
279
- align-items: center;
280
- justify-content: center;
281
- gap: 10px;
282
- width: 90vw;
283
- min-height: 380px;
284
- max-width: 500px;
285
- padding: 40px 40px 16px 40px;
286
- border-top: 3px solid var(--emfe-w-color-secondary, var(--emfe-w-color-secondary, #FD2839));
287
- border-radius: 5px;
288
- position: relative;
289
- background: var(--emfe-w-color-white, #FFFFFF);
290
- }
291
- .ModalCloseBtn {
292
- position: absolute;
293
- top: 10px;
294
- right: 10px;
295
- border-radius: 50%;
296
- color: var(--emfe-w-color-secondary, var(--emfe-w-color-secondary, #FD2839));
297
- background: rgba(255, 255, 255, .1);
298
- cursor: pointer;
299
- transition: all 150ms ease-in-out;
300
- width: 28px;
301
- height: 28px;
302
- svg {
303
- width: 28px;
304
- height: 28px;
305
- }
306
-
307
- &:hover {
308
- background: rgba(255, 255, 255, .2);
309
- }
310
- }
311
- .ModalMobileContainer {
312
- padding: 10px;
313
- border-top: none;
314
- .ModalCloseBtn {
315
- margin: 10px;
316
- svg {
317
- width: 24px;
318
- height: 24px;
319
- }
320
- }
321
- }
322
- }
323
-
324
- .RandomGameWrapper {
325
- display: flex;
326
- flex-direction: column;
327
- align-items: center;
328
- justify-content: center;
329
- gap: 10px;
330
- }
331
-
332
- .RandomGamesSliderWrapper {
333
- height: 170px;
334
- overflow: hidden;
335
- transition: transform 400ms ease-in-out;
336
- }
337
-
338
- .items {
339
- gap: 5px;
340
- transition: transform 0.3s ease-in-out;
341
- transform: translateY(0px);
342
- -webkit-transform-style: preserve-3d;
343
- -webkit-backface-visibility: hidden;
344
- }
345
-
346
- .RandomGameLoading {
347
- padding: 30px 0;
348
- }
349
-
350
- .RandomGameImage {
351
- width: 256px;
352
- height: 170px;
353
- border-radius: 5px;
354
- -webkit-transform-style: preserve-3d;
355
- -webkit-backface-visibility: hidden;
356
- }
357
-
358
- .RandomTryAgain {
359
- position: absolute;
360
- bottom: -10px;
361
- right: -10px;
362
- background: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
363
- color: var(--emfe-w-color-white, #FFFFFF);
364
- display: flex;
365
- align-items: center;
366
- padding: 6px;
367
- border: none;
368
- border-radius: 50%;
369
- cursor: pointer;
370
- svg {
371
- width: 22px;
372
- height: 22px;
373
- }
374
- }
375
-
376
- .item {
377
- position: relative;
378
- -webkit-backface-visibility: hidden;
379
- }
380
-
381
- .RandomGameDetails {
382
- display: flex;
383
- flex-direction: column;
384
- justify-content: center;
385
- align-items: center;
386
- gap: 5px;
387
- .RandomGameTitle {
388
- font-size: 16px;
389
- line-height: 18px;
390
- text-align: center;
391
- }
392
- .RandomGameVendor {
393
- font-size: 10px;
394
- margin-bottom: 10px;
395
- }
396
- .RandomGamePlay {
397
- background: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
398
- color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
399
- border: none;
400
- border-radius: 5px;
401
- width: 200px;
402
- height: 40px;
403
- font-size: 14px;
404
- cursor: pointer;
405
- }
406
- }
407
-
408
- .RandomButtonWrapper {
409
- display: flex;
410
- justify-content: center;
411
- margin-top: 30px;
412
- width: 100%;
413
- .RandomButton {
414
- display: flex;
415
- align-items: center;
416
- gap: 5px;
417
- background: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
418
- color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
419
- border: none;
420
- border-radius: 5px;
421
- padding: 0 30px;
422
- height: 50px;
423
- font-size: 16px;
424
- cursor: pointer;
425
- }
426
- }
427
- </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 CasinoRandomGame from './CasinoRandomGame.svelte';
2
-
3
- !customElements.get('casino-random-game') && customElements.define('casino-random-game', CasinoRandomGame);
4
- export default CasinoRandomGame;
@@ -1,68 +0,0 @@
1
- export const TRANSLATIONS = {
2
- "en": {
3
- "playRandomGame": "Play a random game",
4
- "randomGameLoading": "Selecting ...",
5
- "playNowRandomGame": "Play Now",
6
- "noGames": "There are no random games to play"
7
- },
8
- "zh-hk": {
9
- "playRandomGame": "玩隨機遊戲",
10
- "randomGameLoading": "選擇...",
11
- "playNowRandomGame": "現在播放",
12
- "noGames": "There are no random games to play"
13
- },
14
- "de": {
15
- "playRandomGame": "Spiel ein Zufallsspiel",
16
- "randomGameLoading": "Auswahl läuft",
17
- "playNowRandomGame": "Jetzt spielen",
18
- "noGames": "There are no random games to play"
19
- },
20
- "fr": {
21
- "playRandomGame": "Jouer à un jeu aléatoire",
22
- "randomGameLoading": "Sélectinner ...",
23
- "playNowRandomGame": "Jouer maintenant",
24
- "noGames": "There are no random games to play"
25
- },
26
- "ro": {
27
- "playRandomGame": "Joaca-te un joc aleatoriu",
28
- "randomGameLoading": "Se selecteaza ...",
29
- "playNowRandomGame": "Joaca-te Acum",
30
- "noGames": "Nu exista jocuri aleatorii de jucat"
31
- },
32
- "tr": {
33
- "playRandomGame": "Oynamak için doğru oyunun adını yazın.",
34
- "randomGameLoading": "Henüz son aramalar yok. Herhangi bir oyunu arayın.",
35
- "playNowRandomGame": "Son arama",
36
- "noGames": "Yükleniyor, lütfen bekleyin"
37
- },
38
- "es": {
39
- "playRandomGame": "Juego aleatorio",
40
- "randomGameLoading": "Seleccionando…",
41
- "playNowRandomGame": "Juega Ya",
42
- "noGames": "There are no random games to play"
43
- },
44
- "pt": {
45
- "playRandomGame": "Jogue um jogo aleatório",
46
- "randomGameLoading": "Selecionando ...",
47
- "playNowRandomGame": "Jogue agora",
48
- "noGames": "There are no random games to play"
49
- },
50
- "hr": {
51
- "playRandomGame": "Igrajte nasumičnu igru",
52
- "randomGameLoading": "Odabir...",
53
- "playNowRandomGame": "Igraj sada",
54
- "noGames": "Nema nasumičnih igara za igranje"
55
- },
56
- "pt-br": {
57
- "playRandomGame": "Jogue um jogo aleatório",
58
- "randomGameCarregando": "Selecionando...",
59
- "playNowRandomGame": "Jogue agora",
60
- "noGames": "There are no random games to play"
61
- },
62
- "es-mx": {
63
- "playRandomGame": "Jugar un juego al azar",
64
- "randomGameCargando": "Seleccionando..",
65
- "playNowRandomGame": "Jugar ahora",
66
- "noGames": "There are no random games to play"
67
- }
68
- }