@everymatrix/bonus-elevate-shop-item 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/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
- package/dist/bonus-elevate-shop-item/p-961d6b9a.entry.js +1 -0
- package/dist/bonus-elevate-shop-item/p-e1255160.js +1 -0
- package/dist/bonus-elevate-shop-item/p-ec5f179f.js +2 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +377 -406
- package/dist/cjs/bonus-elevate-shop-item.cjs.js +16 -10
- package/dist/cjs/index-1035f878.js +1591 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +207 -222
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.css +5 -5
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +332 -362
- package/dist/collection/components/bonus-elevate-shop-item/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +54 -54
- package/dist/collection/utils/utils.js +26 -26
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +377 -406
- package/dist/esm/bonus-elevate-shop-item.js +13 -10
- package/dist/esm/index-fa394550.js +1561 -0
- package/dist/esm/loader.js +6 -12
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -21
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.d.ts +35 -35
- package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-item.d.ts +56 -56
- package/dist/types/components/bonus-elevate-shop-item/index.d.ts +1 -0
- package/dist/types/components.d.ts +17 -1
- package/dist/types/models/bonus-elevate-shop-item.d.ts +12 -12
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +12 -5
- package/dist/bonus-elevate-shop-item/p-3d8363a3.js +0 -1
- package/dist/bonus-elevate-shop-item/p-9546c5ba.entry.js +0 -1
- package/dist/cjs/index-355d8ffb.js +0 -1653
- package/dist/components/bonus-elevate-shop-assets-slider.d.ts +0 -11
- package/dist/components/bonus-elevate-shop-assets-slider.js +0 -6
- package/dist/components/bonus-elevate-shop-assets-slider2.js +0 -158
- package/dist/components/bonus-elevate-shop-item.d.ts +0 -11
- package/dist/components/bonus-elevate-shop-item.js +0 -278
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-4927ce96.js +0 -1624
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/bonus-elevate-shop-item/.stencil/packages/bonus-elevate-shop-item/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BonusElevateShopItem } from './bonus-elevate-shop-item';
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
en: {
|
|
5
|
+
coins: 'Coins',
|
|
6
|
+
noGiftPresentation: 'No description',
|
|
7
|
+
redeem: 'Redeem',
|
|
8
|
+
noDataFound: 'No data found',
|
|
9
|
+
error4003: 'Invalid Session',
|
|
10
|
+
redeemFailed: 'Failed to redeem'
|
|
11
|
+
},
|
|
12
|
+
ro: {
|
|
13
|
+
coins: 'Coins',
|
|
14
|
+
noGiftPresentation: 'No description',
|
|
15
|
+
redeem: 'Redeem',
|
|
16
|
+
noDataFound: 'No data found',
|
|
17
|
+
error4003: 'Invalid Session',
|
|
18
|
+
redeemFailed: 'Failed to redeem'
|
|
19
|
+
},
|
|
20
|
+
fr: {
|
|
21
|
+
coins: 'Coins',
|
|
22
|
+
noGiftPresentation: 'No description',
|
|
23
|
+
redeem: 'Redeem',
|
|
24
|
+
noDataFound: 'No data found',
|
|
25
|
+
error4003: 'Invalid Session',
|
|
26
|
+
redeemFailed: 'Failed to redeem',
|
|
27
|
+
},
|
|
28
|
+
ar: {
|
|
29
|
+
coins: 'Coins',
|
|
30
|
+
noGiftPresentation: 'No description',
|
|
31
|
+
redeem: 'Redeem',
|
|
32
|
+
noDataFound: 'No data found',
|
|
33
|
+
error4003: 'Invalid Session',
|
|
34
|
+
redeemFailed: 'Failed to redeem',
|
|
35
|
+
},
|
|
36
|
+
hu: {
|
|
37
|
+
coins: 'Coins',
|
|
38
|
+
noGiftPresentation: 'No description',
|
|
39
|
+
redeem: 'Redeem',
|
|
40
|
+
noDataFound: 'No data found',
|
|
41
|
+
error4003: 'Invalid Session',
|
|
42
|
+
redeemFailed: 'Failed to redeem',
|
|
43
|
+
}
|
|
44
44
|
};
|
|
45
45
|
export const translate = (key, customLang) => {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const lang = customLang;
|
|
47
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
48
48
|
};
|
|
49
49
|
export const getTranslations = (url) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
51
|
+
return new Promise((resolve) => {
|
|
52
|
+
fetch(url)
|
|
53
|
+
.then((res) => res.json())
|
|
54
|
+
.then((data) => {
|
|
55
|
+
Object.keys(data).forEach((item) => {
|
|
56
|
+
for (let key in data[item]) {
|
|
57
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
resolve(true);
|
|
61
|
+
});
|
|
61
62
|
});
|
|
62
|
-
});
|
|
63
63
|
};
|
|
@@ -5,35 +5,35 @@
|
|
|
5
5
|
* @returns {Boolean} true or false
|
|
6
6
|
*/
|
|
7
7
|
export const isMobile = (userAgent) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
9
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
10
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
11
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
12
12
|
};
|
|
13
13
|
export const getDevice = () => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
22
|
-
return 'iPad';
|
|
23
|
-
}
|
|
24
|
-
return 'PC';
|
|
25
|
-
};
|
|
26
|
-
export const getDevicePlatform = () => {
|
|
27
|
-
const device = getDevice();
|
|
28
|
-
if (device) {
|
|
29
|
-
if (device === 'PC') {
|
|
30
|
-
return 'dk';
|
|
14
|
+
let userAgent = window.navigator.userAgent;
|
|
15
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
16
|
+
return 'Android';
|
|
17
|
+
}
|
|
18
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
19
|
+
return 'iPhone';
|
|
31
20
|
}
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
22
|
+
return 'iPad';
|
|
34
23
|
}
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
return 'PC';
|
|
25
|
+
};
|
|
26
|
+
export const getDevicePlatform = () => {
|
|
27
|
+
const device = getDevice();
|
|
28
|
+
if (device) {
|
|
29
|
+
if (device === 'PC') {
|
|
30
|
+
return 'dk';
|
|
31
|
+
}
|
|
32
|
+
else if (device === 'iPad' || device === 'iPhone') {
|
|
33
|
+
return 'ios';
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return 'mtWeb';
|
|
37
|
+
}
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
39
|
};
|