@everymatrix/casino-collections-providers 1.6.0 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-collections-providers",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
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": "e4b57a534bdee7d09fc53a7b49e31338bc1a3f00"
39
+ "gitHead": "b405cf7bcce97b06567550e59f40f2d310be97af"
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;
@@ -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;
@@ -378,7 +374,7 @@
378
374
  width: 85vw;
379
375
  scroll-snap-align: start;
380
376
  }
381
- & .ButtonsContainer{
377
+ & .ButtonsContainer{
382
378
  display: none;
383
379
  }
384
380
  }
@@ -6,7 +6,7 @@ export const Translations = {
6
6
  loading: 'Loading, please wait ...',
7
7
  },
8
8
  },
9
- zh: {
9
+ 'zh-hk': {
10
10
  Translations: {
11
11
  collections: '收藏品',
12
12
  providers: '供应商',