@everymatrix/general-slider-navigation 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 (55) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/carousel-component_2.cjs.entry.js +392 -419
  3. package/dist/cjs/general-slider-navigation.cjs.js +17 -11
  4. package/dist/cjs/index-88d9137e.js +1269 -0
  5. package/dist/cjs/loader.cjs.js +7 -13
  6. package/dist/collection/collection-manifest.json +4 -4
  7. package/dist/collection/components/carousel-component/carousel-component.css +0 -2
  8. package/dist/collection/components/carousel-component/carousel-component.js +360 -400
  9. package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +293 -310
  10. package/dist/collection/components/general-slider-navigation/index.js +1 -0
  11. package/dist/collection/utils/locale.utils.js +56 -56
  12. package/dist/collection/utils/utils.js +39 -39
  13. package/dist/esm/app-globals-0f993ce5.js +3 -0
  14. package/dist/esm/carousel-component_2.entry.js +392 -419
  15. package/dist/esm/general-slider-navigation.js +14 -11
  16. package/dist/esm/index-c749968b.js +1242 -0
  17. package/dist/esm/loader.js +7 -13
  18. package/dist/general-slider-navigation/general-slider-navigation.esm.js +1 -1
  19. package/dist/general-slider-navigation/p-8c0cd4b3.js +2 -0
  20. package/dist/general-slider-navigation/p-c1626bea.entry.js +1 -0
  21. package/dist/general-slider-navigation/p-e1255160.js +1 -0
  22. package/dist/stencil.config.dev.js +17 -0
  23. package/dist/stencil.config.js +14 -19
  24. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +2 -0
  25. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.dev.d.ts +2 -0
  26. package/dist/types/components/carousel-component/carousel-component.d.ts +70 -77
  27. package/dist/types/components/general-slider-navigation/general-slider-navigation.d.ts +54 -54
  28. package/dist/types/components/general-slider-navigation/index.d.ts +1 -0
  29. package/dist/types/components.d.ts +0 -16
  30. package/dist/types/stencil-public-runtime.d.ts +142 -33
  31. package/loader/cdn.js +1 -3
  32. package/loader/index.cjs.js +1 -3
  33. package/loader/index.d.ts +13 -1
  34. package/loader/index.es2017.js +1 -3
  35. package/loader/index.js +1 -3
  36. package/loader/package.json +1 -0
  37. package/package.json +8 -1
  38. package/dist/cjs/index-d69ac031.js +0 -1269
  39. package/dist/components/carousel-component.d.ts +0 -11
  40. package/dist/components/carousel-component.js +0 -6
  41. package/dist/components/carousel-component2.js +0 -386
  42. package/dist/components/general-slider-navigation.d.ts +0 -11
  43. package/dist/components/general-slider-navigation.js +0 -144
  44. package/dist/components/index.d.ts +0 -26
  45. package/dist/components/index.js +0 -1
  46. package/dist/esm/index-a33109c0.js +0 -1243
  47. package/dist/esm/polyfills/core-js.js +0 -11
  48. package/dist/esm/polyfills/css-shim.js +0 -1
  49. package/dist/esm/polyfills/dom.js +0 -79
  50. package/dist/esm/polyfills/es5-html-element.js +0 -1
  51. package/dist/esm/polyfills/index.js +0 -34
  52. package/dist/esm/polyfills/system.js +0 -6
  53. package/dist/general-slider-navigation/p-6da4364f.entry.js +0 -1
  54. package/dist/general-slider-navigation/p-734ecc50.js +0 -1
  55. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-slider-navigation/.stencil/packages/general-slider-navigation/stencil.config.d.ts +0 -2
@@ -1,64 +1,64 @@
1
1
  const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
- en: {
4
- error: 'Error',
5
- noResults: 'Loading, please wait ...',
6
- joinNow: 'Join now'
7
- },
8
- hu: {
9
- error: 'Error',
10
- noResults: 'Loading, please wait ...',
11
- joinNow: 'Join now'
12
- },
13
- ro: {
14
- error: 'Eroare',
15
- noResults: 'Loading, please wait ...',
16
- joinNow: 'Join now'
17
- },
18
- fr: {
19
- error: 'Error',
20
- noResults: 'Loading, please wait ...',
21
- joinNow: 'Join now'
22
- },
23
- ar: {
24
- error: 'خطأ',
25
- noResults: 'Loading, please wait ...',
26
- joinNow: 'Join now'
27
- },
28
- hr: {
29
- error: 'Greška',
30
- noResults: 'Učitavanje, molimo pričekajte ...',
31
- joinNow: 'Join now'
32
- },
33
- 'pt-br': {
34
- 'error': 'Erro',
35
- 'noResults': 'Carregando, espere por favor…',
36
- 'joinNow': 'Join now'
37
- },
38
- 'es-mx': {
39
- 'error': 'Error',
40
- 'noResults': 'Cargando, espere por favor…',
41
- 'joinNow': 'Join now'
42
- }
3
+ en: {
4
+ error: 'Error',
5
+ noResults: 'Loading, please wait ...',
6
+ joinNow: 'Join now'
7
+ },
8
+ hu: {
9
+ error: 'Error',
10
+ noResults: 'Loading, please wait ...',
11
+ joinNow: 'Join now'
12
+ },
13
+ ro: {
14
+ error: 'Eroare',
15
+ noResults: 'Loading, please wait ...',
16
+ joinNow: 'Join now'
17
+ },
18
+ fr: {
19
+ error: 'Error',
20
+ noResults: 'Loading, please wait ...',
21
+ joinNow: 'Join now'
22
+ },
23
+ ar: {
24
+ error: 'خطأ',
25
+ noResults: 'Loading, please wait ...',
26
+ joinNow: 'Join now'
27
+ },
28
+ hr: {
29
+ error: 'Greška',
30
+ noResults: 'Učitavanje, molimo pričekajte ...',
31
+ joinNow: 'Join now'
32
+ },
33
+ 'pt-br': {
34
+ 'error': 'Erro',
35
+ 'noResults': 'Carregando, espere por favor…',
36
+ 'joinNow': 'Join now'
37
+ },
38
+ 'es-mx': {
39
+ 'error': 'Error',
40
+ 'noResults': 'Cargando, espere por favor…',
41
+ 'joinNow': 'Join now'
42
+ }
43
43
  };
44
44
  export const getTranslations = (url) => {
45
- return new Promise((resolve) => {
46
- fetch(url)
47
- .then((res) => res.json())
48
- .then((data) => {
49
- Object.keys(data).forEach((lang) => {
50
- if (!TRANSLATIONS[lang]) {
51
- TRANSLATIONS[lang] = {};
52
- }
53
- for (let key in data[lang]) {
54
- TRANSLATIONS[lang][key] = data[lang][key];
55
- }
56
- });
57
- resolve(true);
45
+ return new Promise((resolve) => {
46
+ fetch(url)
47
+ .then((res) => res.json())
48
+ .then((data) => {
49
+ Object.keys(data).forEach((lang) => {
50
+ if (!TRANSLATIONS[lang]) {
51
+ TRANSLATIONS[lang] = {};
52
+ }
53
+ for (let key in data[lang]) {
54
+ TRANSLATIONS[lang][key] = data[lang][key];
55
+ }
56
+ });
57
+ resolve(true);
58
+ });
58
59
  });
59
- });
60
60
  };
61
61
  export const translate = (key, customLang) => {
62
- const lang = customLang;
63
- return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
62
+ const lang = customLang;
63
+ return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
64
64
  };
@@ -5,52 +5,52 @@
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.toLowerCase().match(/iphone/i)) {
19
- return 'iPhone';
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
- else if (device === 'iPad' || device === 'iPhone') {
33
- return 'ios';
21
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
22
+ return 'iPad';
34
23
  }
35
- else {
36
- return 'mtWeb';
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
  };
40
40
  export function checkDeviceType() {
41
- const userAgent = navigator.userAgent.toLowerCase();
42
- const width = screen.availWidth;
43
- const height = screen.availHeight;
44
- if (userAgent.includes('iphone')) {
45
- return 'mobile';
46
- }
47
- if (userAgent.includes('android')) {
48
- if (height > width && width < 800) {
49
- return 'mobile';
41
+ const userAgent = navigator.userAgent.toLowerCase();
42
+ const width = screen.availWidth;
43
+ const height = screen.availHeight;
44
+ if (userAgent.includes('iphone')) {
45
+ return 'mobile';
50
46
  }
51
- if (width > height && height < 800) {
52
- return 'tablet';
47
+ if (userAgent.includes('android')) {
48
+ if (height > width && width < 800) {
49
+ return 'mobile';
50
+ }
51
+ if (width > height && height < 800) {
52
+ return 'tablet';
53
+ }
53
54
  }
54
- }
55
- return 'desktop';
55
+ return 'desktop';
56
56
  }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };