@everymatrix/casino-filter-page 1.0.11 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-filter-page",
3
- "version": "1.0.11",
3
+ "version": "1.0.14",
4
4
  "main": "dist/casino-filter-page.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": "a90b005fe3a45c7d5ba83769886d60c006b3968f"
39
+ "gitHead": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
40
40
  }
@@ -11,6 +11,7 @@
11
11
  export let lang:String = ''; // Language
12
12
  export let session:String = ''; // Value for sessionID
13
13
  export let userid:String = '';
14
+ export let translationUrl:string = '';
14
15
  export let clientstyling:string = '';
15
16
  export let clientstylingurl:string = '';
16
17
 
@@ -38,6 +39,19 @@
38
39
 
39
40
  setupI18n({ withLocale: 'en', translations: {}});
40
41
 
42
+ const setTranslationUrl = ():void => {
43
+ let url:string = translationUrl;
44
+
45
+ fetch(url).then((res:any) => res.json())
46
+ .then((res) => {
47
+ Object.keys(res).forEach((item:any):void => {
48
+ addNewMessages(item, res[item]);
49
+ });
50
+ }).catch((err:any) => {
51
+ console.log(err);
52
+ });
53
+ }
54
+
41
55
  Object.keys(VendorFilterPageTranslations).forEach((item) => {
42
56
  addNewMessages(item, VendorFilterPageTranslations[item]);
43
57
  });
@@ -285,6 +299,9 @@
285
299
  }
286
300
  });
287
301
 
302
+ $: clientstyling && setClientStyling();
303
+ $: clientstylingurl && setClientStylingURL();
304
+ $: translationUrl && setTranslationUrl();
288
305
  $: clientstyling && customStylingContainer && setClientStyling();
289
306
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
290
307
  </script>