@everymatrix/casino-collections-providers 1.6.0 → 1.7.1
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-collections-providers",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.1",
|
4
4
|
"main": "index.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -36,5 +36,5 @@
|
|
36
36
|
"publishConfig": {
|
37
37
|
"access": "public"
|
38
38
|
},
|
39
|
-
"gitHead": "
|
39
|
+
"gitHead": "c0b2bf42b27d9f10a77af4c5be6a2708be5435cf"
|
40
40
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<svelte:options tag={null} />
|
2
2
|
<script lang="ts">
|
3
|
-
import { _, addNewMessages, setLocale} from './i18n';
|
3
|
+
import { _, addNewMessages, setLocale } from './i18n';
|
4
4
|
import { Translations } from './translations.js';
|
5
5
|
import { isMobile } from 'rvhelper';
|
6
6
|
import { onMount } from 'svelte';
|
@@ -26,7 +26,6 @@
|
|
26
26
|
let slides:Array<any>;
|
27
27
|
|
28
28
|
let customStylingContainer:HTMLElement;
|
29
|
-
let displayNoneClientStyling:boolean = false;
|
30
29
|
let userAgent:string = window.navigator.userAgent;
|
31
30
|
let mobile:boolean;
|
32
31
|
|
@@ -60,7 +59,7 @@
|
|
60
59
|
isLoading = false;
|
61
60
|
|
62
61
|
let filteredCategories = gameCategoriesData.items.filter(item => item.flags == type);
|
63
|
-
|
62
|
+
|
64
63
|
gameCategories = filteredCategories.map(category => {
|
65
64
|
return {
|
66
65
|
id: category.id,
|
@@ -78,7 +77,7 @@
|
|
78
77
|
const positionSlides = (curSlide?):void => {
|
79
78
|
//store each slide HTML element in an array
|
80
79
|
slides = [...categoriesSlider.children];
|
81
|
-
|
80
|
+
|
82
81
|
//iterate the array of elements and translate each of them by 100% times the index to create the slider
|
83
82
|
slides.forEach((slide: HTMLElement, index: number) => {
|
84
83
|
slide.style.transform = `translateX(${100 * (curSlide ? index - curSlide : index)}%)`;
|
@@ -132,7 +131,7 @@
|
|
132
131
|
'context': 'CollectionsProviders',
|
133
132
|
'gameName': `${gameName}`
|
134
133
|
});
|
135
|
-
}
|
134
|
+
}
|
136
135
|
};
|
137
136
|
|
138
137
|
const openCategory = (categoryId:any):void => {
|
@@ -150,8 +149,6 @@
|
|
150
149
|
}
|
151
150
|
|
152
151
|
const setClientStylingURL = ():void => {
|
153
|
-
displayNoneClientStyling = true;
|
154
|
-
|
155
152
|
let url:URL = new URL(clientstylingurl);
|
156
153
|
let cssFile:HTMLElement = document.createElement('style');
|
157
154
|
|
@@ -161,14 +158,13 @@
|
|
161
158
|
cssFile.innerHTML = data
|
162
159
|
|
163
160
|
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
164
|
-
setTimeout(() => { displayNoneClientStyling = false; }, 500);
|
165
161
|
});
|
166
162
|
}
|
167
163
|
|
168
164
|
onMount(() => {
|
169
165
|
mobile = isMobile(userAgent);
|
170
166
|
})
|
171
|
-
|
167
|
+
|
172
168
|
$: endpoint && datasource && lang && getGameCategories();
|
173
169
|
//making sure we have something to position, before trying to
|
174
170
|
$: gameCategories && categoriesSlider && positionSlides();
|
@@ -176,10 +172,10 @@
|
|
176
172
|
$: clientstyling && customStylingContainer && setClientStyling();
|
177
173
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
178
174
|
$: translationurl && setTranslationUrl();
|
179
|
-
|
175
|
+
|
180
176
|
</script>
|
181
177
|
|
182
|
-
<div bind:this={customStylingContainer}>
|
178
|
+
<div bind:this={customStylingContainer}>
|
183
179
|
{#if isLoading}
|
184
180
|
<p>{$_('Translations.loading')}</p>
|
185
181
|
{:else}
|
@@ -199,7 +195,7 @@
|
|
199
195
|
</button>
|
200
196
|
</div>
|
201
197
|
</div>
|
202
|
-
|
198
|
+
|
203
199
|
<div class="CategoriesSlider" bind:this={categoriesSlider}>
|
204
200
|
{#each gameCategories as category}
|
205
201
|
<div class="CategoriesSliderWrapper Animation">
|
@@ -225,7 +221,7 @@
|
|
225
221
|
</div>
|
226
222
|
{/each}
|
227
223
|
</div>
|
228
|
-
</div>
|
224
|
+
</div>
|
229
225
|
{/if}
|
230
226
|
</div>
|
231
227
|
|
@@ -260,7 +256,7 @@
|
|
260
256
|
display: flex;
|
261
257
|
justify-content: space-between;
|
262
258
|
height: 70px;
|
263
|
-
|
259
|
+
|
264
260
|
& .Title {
|
265
261
|
color: var(--emfe-w-color-white, #FFFFFF);
|
266
262
|
font-size: 22px;
|
@@ -275,7 +271,7 @@
|
|
275
271
|
width: 40px;
|
276
272
|
|
277
273
|
cursor: pointer;
|
278
|
-
|
274
|
+
|
279
275
|
&:active {
|
280
276
|
opacity: 0.7;
|
281
277
|
}
|
@@ -287,7 +283,7 @@
|
|
287
283
|
position: relative;
|
288
284
|
height: 230px;
|
289
285
|
overflow: hidden;
|
290
|
-
|
286
|
+
|
291
287
|
&Wrapper {
|
292
288
|
position: absolute;
|
293
289
|
top: 0;
|
@@ -321,11 +317,11 @@
|
|
321
317
|
align-items: center;
|
322
318
|
}
|
323
319
|
&Logo {
|
324
|
-
max-height: 100px;
|
325
|
-
position: absolute;
|
326
|
-
top: 30%;
|
327
|
-
left: 50%;
|
328
320
|
transform: translate(-50%, -50%);
|
321
|
+
max-width: 175px;
|
322
|
+
top: 30%;
|
323
|
+
max-height: 100%;
|
324
|
+
position: absolute;
|
329
325
|
}
|
330
326
|
&Title {
|
331
327
|
color: var(--emfe-w-color-white, #FFFFFF);
|
@@ -334,26 +330,26 @@
|
|
334
330
|
}
|
335
331
|
&GameContainer {
|
336
332
|
display: flex;
|
333
|
+
width: 40px;
|
337
334
|
justify-content: center;
|
338
|
-
gap:
|
335
|
+
gap: 10%;
|
339
336
|
min-height: 85px;
|
340
337
|
}
|
341
338
|
&GameImage {
|
342
339
|
border-radius: 10px;
|
343
340
|
width: auto;
|
344
|
-
height:
|
341
|
+
height: 55px;
|
345
342
|
object-fit: cover;
|
346
343
|
}
|
347
344
|
&Games{
|
348
345
|
color:white;
|
349
346
|
text-align: center;
|
350
347
|
p{
|
351
|
-
font-size:
|
352
|
-
|
348
|
+
font-size: 8px;
|
349
|
+
display: -webkit-box;
|
350
|
+
-webkit-line-clamp: 1;
|
351
|
+
-webkit-box-orient: vertical;
|
353
352
|
overflow: hidden;
|
354
|
-
height: 20px;
|
355
|
-
width: 90px;
|
356
|
-
white-space: nowrap;
|
357
353
|
}
|
358
354
|
}
|
359
355
|
}
|
@@ -364,7 +360,7 @@
|
|
364
360
|
|
365
361
|
&.CasinoCollectionsProviders {
|
366
362
|
padding: 25px 10px;
|
367
|
-
}
|
363
|
+
}
|
368
364
|
& .CategoriesSlider {
|
369
365
|
overflow: auto;
|
370
366
|
scroll-snap-type: x mandatory;
|
@@ -375,12 +371,18 @@
|
|
375
371
|
display: none;
|
376
372
|
}
|
377
373
|
& .CategorySlide {
|
378
|
-
width:
|
374
|
+
width: 80vw;
|
379
375
|
scroll-snap-align: start;
|
380
376
|
}
|
381
|
-
& .ButtonsContainer{
|
377
|
+
& .ButtonsContainer{
|
382
378
|
display: none;
|
383
379
|
}
|
380
|
+
& .CategorySlideGameImage{
|
381
|
+
border-radius: 10px;
|
382
|
+
width: auto;
|
383
|
+
height: 40px;
|
384
|
+
object-fit: cover;
|
385
|
+
}
|
384
386
|
}
|
385
387
|
|
386
388
|
</style>
|