@everymatrix/general-preview-social-posts 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/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-preview-social-posts.cjs.entry.js +271 -312
- package/dist/cjs/general-preview-social-posts.cjs.js +17 -11
- package/dist/cjs/index-3a1dd540.js +1200 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.css +4 -6
- package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.js +516 -563
- package/dist/collection/components/general-preview-social-posts/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +52 -52
- package/dist/collection/utils/utils.js +31 -31
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-preview-social-posts.entry.js +271 -312
- package/dist/esm/general-preview-social-posts.js +14 -11
- package/dist/esm/index-16f33f52.js +1173 -0
- package/dist/esm/loader.js +7 -13
- package/dist/general-preview-social-posts/general-preview-social-posts.esm.js +1 -1
- package/dist/general-preview-social-posts/p-1f296318.js +2 -0
- package/dist/general-preview-social-posts/{p-6826d836.entry.js → p-2080a6e8.entry.js} +1 -1
- package/dist/general-preview-social-posts/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-preview-social-posts/.stencil/packages/stencil/general-preview-social-posts/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-preview-social-posts/.stencil/packages/stencil/general-preview-social-posts/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-preview-social-posts/general-preview-social-posts.d.ts +80 -80
- package/dist/types/components/general-preview-social-posts/index.d.ts +1 -0
- package/dist/types/components.d.ts +20 -3
- 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 +8 -1
- package/dist/cjs/index-e178764e.js +0 -1223
- package/dist/components/general-preview-social-posts.d.ts +0 -11
- package/dist/components/general-preview-social-posts.js +0 -392
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-8a671ab9.js +0 -1197
- 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/general-preview-social-posts/p-c682801c.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-preview-social-posts/.stencil/packages/general-preview-social-posts/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GeneralPreviewSocialPosts } from './general-preview-social-posts';
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
let TRANSLATIONS = {
|
|
3
|
-
|
|
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
|
-
|
|
3
|
+
en: {
|
|
4
|
+
loading: 'loading...',
|
|
5
|
+
viewAll: 'View All ...',
|
|
6
|
+
moreInfo: 'MORE INFO',
|
|
7
|
+
playNow: 'PLAY NOW',
|
|
8
|
+
},
|
|
9
|
+
de: {
|
|
10
|
+
loading: 'loading...',
|
|
11
|
+
viewAll: 'View All ...',
|
|
12
|
+
moreInfo: 'MORE INFO',
|
|
13
|
+
playNow: 'PLAY NOW',
|
|
14
|
+
},
|
|
15
|
+
ro: {
|
|
16
|
+
loading: 'loading...',
|
|
17
|
+
viewAll: 'View All ...',
|
|
18
|
+
moreInfo: 'MORE INFO',
|
|
19
|
+
playNow: 'PLAY NOW',
|
|
20
|
+
},
|
|
21
|
+
fr: {
|
|
22
|
+
loading: 'loading...',
|
|
23
|
+
viewAll: 'View All ...',
|
|
24
|
+
moreInfo: 'MORE INFO',
|
|
25
|
+
playNow: 'PLAY NOW',
|
|
26
|
+
},
|
|
27
|
+
ar: {
|
|
28
|
+
loading: 'loading...',
|
|
29
|
+
viewAll: 'View All ...',
|
|
30
|
+
moreInfo: 'MORE INFO',
|
|
31
|
+
playNow: 'PLAY NOW',
|
|
32
|
+
},
|
|
33
|
+
hr: {
|
|
34
|
+
loading: 'Učitavanje…',
|
|
35
|
+
viewAll: 'Pogledaj sve …',
|
|
36
|
+
moreInfo: 'VIŠE INFORMACIJA',
|
|
37
|
+
playNow: 'IGRAJ SADA'
|
|
38
|
+
}
|
|
39
39
|
};
|
|
40
40
|
export const getTranslations = (url) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
fetch(url)
|
|
43
|
+
.then((res) => res.json())
|
|
44
|
+
.then((data) => {
|
|
45
|
+
Object.keys(data).forEach((lang) => {
|
|
46
|
+
if (!TRANSLATIONS[lang]) {
|
|
47
|
+
TRANSLATIONS[lang] = {};
|
|
48
|
+
}
|
|
49
|
+
for (let key in data[lang]) {
|
|
50
|
+
TRANSLATIONS[lang][key] = data[lang][key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
resolve(true);
|
|
54
|
+
});
|
|
54
55
|
});
|
|
55
|
-
});
|
|
56
56
|
};
|
|
57
57
|
export const translate = (key, customLang) => {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const lang = customLang;
|
|
59
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
60
60
|
};
|
|
@@ -5,41 +5,41 @@
|
|
|
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(/iphone/i)) {
|
|
22
|
-
return 'iPhone';
|
|
23
|
-
}
|
|
24
|
-
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
25
|
-
return 'iPad';
|
|
26
|
-
}
|
|
27
|
-
return 'PC';
|
|
28
|
-
};
|
|
29
|
-
export const getDevicePlatform = () => {
|
|
30
|
-
const device = getDevice();
|
|
31
|
-
if (device) {
|
|
32
|
-
if (device === 'PC') {
|
|
33
|
-
return 'dk';
|
|
14
|
+
let userAgent = window.navigator.userAgent;
|
|
15
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
16
|
+
return 'Android';
|
|
17
|
+
}
|
|
18
|
+
if (userAgent.toLocaleLowerCase().match(/customnative:ios/)) {
|
|
19
|
+
return 'nativeIOS';
|
|
34
20
|
}
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
22
|
+
return 'iPhone';
|
|
37
23
|
}
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
25
|
+
return 'iPad';
|
|
40
26
|
}
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
return 'PC';
|
|
28
|
+
};
|
|
29
|
+
export const getDevicePlatform = () => {
|
|
30
|
+
const device = getDevice();
|
|
31
|
+
if (device) {
|
|
32
|
+
if (device === 'PC') {
|
|
33
|
+
return 'dk';
|
|
34
|
+
}
|
|
35
|
+
else if (device == 'nativeIOS') {
|
|
36
|
+
return 'ios';
|
|
37
|
+
}
|
|
38
|
+
else if (device === 'iPad' || device === 'iPhone') {
|
|
39
|
+
return 'mtWeb';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return 'mtWeb';
|
|
43
|
+
}
|
|
43
44
|
}
|
|
44
|
-
}
|
|
45
45
|
};
|