@everymatrix/casino-slider 1.0.13 → 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-slider",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "main": "dist/casino-slider.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": "4b2bbc7cb2c3424950a39147a985ac5d38207cdf"
39
+ "gitHead": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
40
40
  }
@@ -16,6 +16,7 @@
16
16
  export let clientstyling:string = '';
17
17
  export let clientstylingurl:string = '';
18
18
  export let identity:string = '';
19
+ export let translationUrl:string = '';
19
20
  export let containermaxwidth:string = '';
20
21
  export let isprimarymenu:boolean = false;
21
22
  export let issecondarymenu:boolean = false;
@@ -25,6 +26,20 @@
25
26
 
26
27
  setupI18n({ withLocale: 'en', translations: {}});
27
28
 
29
+ const setTranslationUrl = ():void => {
30
+ let url:string = translationUrl;
31
+
32
+ fetch(url).then((res:any) => res.json())
33
+ .then((res) => {
34
+ Object.keys(res).forEach((item:any):void => {
35
+ addNewMessages(item, res[item]);
36
+ });
37
+ }).catch((err:any) => {
38
+ console.log(err);
39
+ });
40
+ }
41
+
42
+
28
43
  Object.keys(CasinoSlider).forEach((item:any) => {
29
44
  addNewMessages(item, CasinoSlider[item]);
30
45
  });
@@ -202,6 +217,7 @@
202
217
  })
203
218
 
204
219
  $: activeindex && setActiveIndex();
220
+ $: translationUrl && setTranslationUrl();
205
221
  $: clientstyling && customStylingContainer && setClientStyling();
206
222
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
207
223
  $: lang && setActiveLanguage();