@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.
Files changed (49) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/general-preview-social-posts.cjs.entry.js +271 -312
  3. package/dist/cjs/general-preview-social-posts.cjs.js +17 -11
  4. package/dist/cjs/index-3a1dd540.js +1200 -0
  5. package/dist/cjs/loader.cjs.js +7 -13
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.css +4 -6
  8. package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.js +516 -563
  9. package/dist/collection/components/general-preview-social-posts/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +52 -52
  11. package/dist/collection/utils/utils.js +31 -31
  12. package/dist/esm/app-globals-0f993ce5.js +3 -0
  13. package/dist/esm/general-preview-social-posts.entry.js +271 -312
  14. package/dist/esm/general-preview-social-posts.js +14 -11
  15. package/dist/esm/index-16f33f52.js +1173 -0
  16. package/dist/esm/loader.js +7 -13
  17. package/dist/general-preview-social-posts/general-preview-social-posts.esm.js +1 -1
  18. package/dist/general-preview-social-posts/p-1f296318.js +2 -0
  19. package/dist/general-preview-social-posts/{p-6826d836.entry.js → p-2080a6e8.entry.js} +1 -1
  20. package/dist/general-preview-social-posts/p-e1255160.js +1 -0
  21. package/dist/stencil.config.dev.js +17 -0
  22. package/dist/stencil.config.js +14 -19
  23. 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
  24. 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
  25. package/dist/types/components/general-preview-social-posts/general-preview-social-posts.d.ts +80 -80
  26. package/dist/types/components/general-preview-social-posts/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +20 -3
  28. package/dist/types/stencil-public-runtime.d.ts +142 -33
  29. package/loader/cdn.js +1 -3
  30. package/loader/index.cjs.js +1 -3
  31. package/loader/index.d.ts +13 -1
  32. package/loader/index.es2017.js +1 -3
  33. package/loader/index.js +1 -3
  34. package/loader/package.json +1 -0
  35. package/package.json +8 -1
  36. package/dist/cjs/index-e178764e.js +0 -1223
  37. package/dist/components/general-preview-social-posts.d.ts +0 -11
  38. package/dist/components/general-preview-social-posts.js +0 -392
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-8a671ab9.js +0 -1197
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/general-preview-social-posts/p-c682801c.js +0 -1
  49. 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
- 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
- }
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
- 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);
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
- const lang = customLang;
59
- return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
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
- 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));
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
- 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';
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
- else if (device == 'nativeIOS') {
36
- return 'ios';
21
+ if (userAgent.toLowerCase().match(/iphone/i)) {
22
+ return 'iPhone';
37
23
  }
38
- else if (device === 'iPad' || device === 'iPhone') {
39
- return 'mtWeb';
24
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
25
+ return 'iPad';
40
26
  }
41
- else {
42
- return 'mtWeb';
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
  };
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };