@everymatrix/general-about-us 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 (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/general-about-us.cjs.entry.js +210 -223
  3. package/dist/cjs/general-about-us.cjs.js +17 -11
  4. package/dist/cjs/index-f16005fe.js +1198 -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-about-us/general-about-us.css +2 -2
  8. package/dist/collection/components/general-about-us/general-about-us.js +279 -297
  9. package/dist/collection/components/general-about-us/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +26 -26
  11. package/dist/collection/utils/utils.js +43 -43
  12. package/dist/esm/app-globals-0f993ce5.js +3 -0
  13. package/dist/esm/general-about-us.entry.js +210 -223
  14. package/dist/esm/general-about-us.js +14 -11
  15. package/dist/esm/index-8f53f54c.js +1172 -0
  16. package/dist/esm/loader.js +7 -13
  17. package/dist/general-about-us/general-about-us.esm.js +1 -1
  18. package/dist/general-about-us/p-21732378.js +2 -0
  19. package/dist/general-about-us/p-9f49c7d5.entry.js +1 -0
  20. package/dist/general-about-us/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-about-us/.stencil/packages/stencil/general-about-us/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-about-us/.stencil/packages/stencil/general-about-us/stencil.config.dev.d.ts +2 -0
  25. package/dist/types/components/general-about-us/general-about-us.d.ts +41 -41
  26. package/dist/types/components/general-about-us/general-about-us.types.d.ts +13 -13
  27. package/dist/types/components/general-about-us/index.d.ts +1 -0
  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-f09c74e2.js +0 -1223
  37. package/dist/components/general-about-us.d.ts +0 -11
  38. package/dist/components/general-about-us.js +0 -288
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-b262ca21.js +0 -1198
  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-about-us/p-0c90e5ab.js +0 -1
  49. package/dist/general-about-us/p-edeca10f.entry.js +0 -1
  50. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-about-us/.stencil/packages/general-about-us/stencil.config.d.ts +0 -2
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -2,262 +2,249 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f09c74e2.js');
5
+ const index = require('./index-f16005fe.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
9
- en: {
10
- error: 'Error',
11
- noResults: 'Loading, please wait ...',
12
- },
13
- hu: {
14
- error: 'Error',
15
- noResults: 'Loading, please wait ...',
16
- },
17
- ro: {
18
- error: 'Eroare',
19
- noResults: 'Loading, please wait ...',
20
- },
21
- fr: {
22
- error: 'Error',
23
- noResults: 'Loading, please wait ...',
24
- },
25
- ar: {
26
- error: 'خطأ',
27
- noResults: 'Loading, please wait ...',
28
- },
29
- hr: {
30
- error: 'Greška',
31
- noResults: 'Učitavanje, molimo pričekajte ...',
32
- }
9
+ en: {
10
+ error: 'Error',
11
+ noResults: 'Loading, please wait ...',
12
+ },
13
+ hu: {
14
+ error: 'Error',
15
+ noResults: 'Loading, please wait ...',
16
+ },
17
+ ro: {
18
+ error: 'Eroare',
19
+ noResults: 'Loading, please wait ...',
20
+ },
21
+ fr: {
22
+ error: 'Error',
23
+ noResults: 'Loading, please wait ...',
24
+ },
25
+ ar: {
26
+ error: 'خطأ',
27
+ noResults: 'Loading, please wait ...',
28
+ },
29
+ hr: {
30
+ error: 'Greška',
31
+ noResults: 'Učitavanje, molimo pričekajte ...',
32
+ }
33
33
  };
34
34
  const translate = (key, customLang) => {
35
- const lang = customLang;
36
- return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
35
+ const lang = customLang;
36
+ return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
37
37
  };
38
38
 
39
39
  function checkDeviceType() {
40
- const userAgent = navigator.userAgent.toLowerCase();
41
- const width = screen.availWidth;
42
- const height = screen.availHeight;
43
- if (userAgent.includes('iphone')) {
44
- return 'mobile';
45
- }
46
- if (userAgent.includes('android')) {
47
- if (height > width && width < 800) {
48
- return 'mobile';
40
+ const userAgent = navigator.userAgent.toLowerCase();
41
+ const width = screen.availWidth;
42
+ const height = screen.availHeight;
43
+ if (userAgent.includes('iphone')) {
44
+ return 'mobile';
49
45
  }
50
- if (width > height && height < 800) {
51
- return 'tablet';
46
+ if (userAgent.includes('android')) {
47
+ if (height > width && width < 800) {
48
+ return 'mobile';
49
+ }
50
+ if (width > height && height < 800) {
51
+ return 'tablet';
52
+ }
52
53
  }
53
- }
54
- return 'desktop';
54
+ return 'desktop';
55
55
  }
56
56
  function checkCustomDeviceWidth() {
57
- const width = screen.availWidth;
58
- if (width < 600) {
59
- return 'mobile';
60
- }
61
- else if (width >= 600 && width < 1100) {
62
- return 'tablet';
63
- }
57
+ const width = screen.availWidth;
58
+ if (width < 600) {
59
+ return 'mobile';
60
+ }
61
+ else if (width >= 600 && width < 1100) {
62
+ return 'tablet';
63
+ }
64
64
  }
65
65
  function getDeviceCustom() {
66
- const userAgent = navigator.userAgent.toLowerCase();
67
- let source = '';
68
- source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
69
- return source;
66
+ const userAgent = navigator.userAgent.toLowerCase();
67
+ let source = '';
68
+ source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
69
+ return source;
70
70
  }
71
71
  const getDevice = () => {
72
- let userAgent = window.navigator.userAgent.toLocaleLowerCase();
73
- if (userAgent.includes('android/i'))
74
- return 'android';
75
- if (userAgent.includes('iphone/i'))
76
- return 'iPhone';
77
- if (userAgent.includes('ipad/i') || userAgent.includes('ipod/i'))
78
- return 'iPad';
79
- return 'PC';
72
+ let userAgent = window.navigator.userAgent.toLocaleLowerCase();
73
+ if (userAgent.includes('android/i'))
74
+ return 'android';
75
+ if (userAgent.includes('iphone/i'))
76
+ return 'iPhone';
77
+ if (userAgent.includes('ipad/i') || userAgent.includes('ipod/i'))
78
+ return 'iPad';
79
+ return 'PC';
80
80
  };
81
81
  const getDevicePlatform = () => {
82
- const device = getDevice();
83
- if (device) {
84
- if (device === 'PC') {
85
- return 'dk';
86
- }
87
- else if (device === 'iPad' || device === 'iPhone') {
88
- return 'mtWeb';
89
- }
90
- else {
91
- return 'mtWeb';
82
+ const device = getDevice();
83
+ if (device) {
84
+ if (device === 'PC') {
85
+ return 'dk';
86
+ }
87
+ else if (device === 'iPad' || device === 'iPhone') {
88
+ return 'mtWeb';
89
+ }
90
+ else {
91
+ return 'mtWeb';
92
+ }
92
93
  }
93
- }
94
94
  };
95
95
 
96
96
  const chevronSvg = 'data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==';
97
97
 
98
- const generalAboutUsCss = ":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 20px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n border-radius: var(--emw--border-radius-medium, 5px);\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, #ffff);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, #ffff);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 50px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";
98
+ const generalAboutUsCss = ":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 20px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n border-radius: var(--emw--border-radius-medium, 5px);\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 50px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";
99
+ const GeneralAboutUsStyle0 = generalAboutUsCss;
99
100
 
100
101
  const GeneralAboutUs = class {
101
- constructor(hostRef) {
102
- index.registerInstance(this, hostRef);
103
- /**
104
- * Language of the widget
105
- */
106
- this.language = 'en';
107
- /**
108
- * User roles
109
- */
110
- this.userRoles = 'everyone';
111
- /**
112
- * CMS Endpoint stage
113
- */
114
- this.cmsEnv = 'stage';
115
- /**
116
- * Client custom styling via inline style
117
- */
118
- this.clientStyling = '';
119
- /**
120
- * Client custom styling via url
121
- */
122
- this.clientStylingUrl = '';
123
- this.hasErrors = false;
124
- this.isLoading = true;
125
- this.limitStylingAppends = false;
126
- this.device = '';
127
- this.handleClick = (url, target, location, isExternal) => {
128
- window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
129
- // @ts-ignore Analytics event
130
- if (typeof gtag == 'function') {
131
- // @ts-ignore
132
- gtag('event', 'GeneralAboutUs', {
133
- 'context': 'AboutUsContent'
134
- });
135
- }
136
- };
137
- this.setImage = (image) => {
138
- let source = '';
139
- this.device = checkDeviceType();
140
- switch (this.device) {
141
- case 'mobile':
142
- source = image.imageMobile;
143
- break;
144
- case 'tablet':
145
- source = image.imageTablet;
146
- break;
147
- case 'desktop':
148
- source = image.imageDesktop;
149
- break;
150
- }
151
- return source;
152
- };
153
- this.setClientStyling = () => {
154
- let sheet = document.createElement('style');
155
- sheet.innerHTML = this.clientStyling;
156
- this.stylingContainer.prepend(sheet);
157
- };
158
- this.setClientStylingURL = () => {
159
- let url = new URL(this.clientStylingUrl);
160
- let cssFile = document.createElement('style');
161
- fetch(url.href)
162
- .then((res) => res.text())
163
- .then((data) => {
164
- cssFile.innerHTML = data;
165
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
166
- })
167
- .catch((err) => {
168
- console.log('error ', err);
169
- });
170
- };
171
- // end custom styling area
172
- this.formatTitle = (title, language) => {
173
- let firstWord, restOfTitle;
174
- // Check for common languages that do not use space - here: Chinese, Japanese, Thai
175
- if (['zh', 'ja', 'th'].includes(language)) {
176
- firstWord = title.substring(0, 1);
177
- restOfTitle = title.substring(1);
178
- }
179
- else {
180
- const words = title.split(' ');
181
- firstWord = words.shift();
182
- restOfTitle = words.join(' ');
183
- }
184
- return index.h("div", { class: "Title" }, index.h("span", { class: "FirstWord" }, firstWord, " "), index.h("span", null, restOfTitle));
185
- };
186
- }
187
- watchEndpoint(newValue, oldValue) {
188
- if (newValue && newValue != oldValue && this.cmsEndpoint) {
189
- this.getAboutUs();
102
+ constructor(hostRef) {
103
+ index.registerInstance(this, hostRef);
104
+ this.handleClick = (url, target, location, isExternal) => {
105
+ window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
106
+ // @ts-ignore Analytics event
107
+ if (typeof gtag == 'function') {
108
+ // @ts-ignore
109
+ gtag('event', 'GeneralAboutUs', {
110
+ 'context': 'AboutUsContent'
111
+ });
112
+ }
113
+ };
114
+ this.setImage = (image) => {
115
+ let source = '';
116
+ this.device = checkDeviceType();
117
+ switch (this.device) {
118
+ case 'mobile':
119
+ source = image.imageMobile;
120
+ break;
121
+ case 'tablet':
122
+ source = image.imageTablet;
123
+ break;
124
+ case 'desktop':
125
+ source = image.imageDesktop;
126
+ break;
127
+ }
128
+ return source;
129
+ };
130
+ this.setClientStyling = () => {
131
+ let sheet = document.createElement('style');
132
+ sheet.innerHTML = this.clientStyling;
133
+ this.stylingContainer.prepend(sheet);
134
+ };
135
+ this.setClientStylingURL = () => {
136
+ let url = new URL(this.clientStylingUrl);
137
+ let cssFile = document.createElement('style');
138
+ fetch(url.href)
139
+ .then((res) => res.text())
140
+ .then((data) => {
141
+ cssFile.innerHTML = data;
142
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
143
+ })
144
+ .catch((err) => {
145
+ console.log('error ', err);
146
+ });
147
+ };
148
+ // end custom styling area
149
+ this.formatTitle = (title, language) => {
150
+ let firstWord, restOfTitle;
151
+ // Check for common languages that do not use space - here: Chinese, Japanese, Thai
152
+ if (['zh', 'ja', 'th'].includes(language)) {
153
+ firstWord = title.substring(0, 1);
154
+ restOfTitle = title.substring(1);
155
+ }
156
+ else {
157
+ const words = title.split(' ');
158
+ firstWord = words.shift();
159
+ restOfTitle = words.join(' ');
160
+ }
161
+ return index.h("div", { class: "Title" }, index.h("span", { class: "FirstWord" }, firstWord, " "), index.h("span", null, restOfTitle));
162
+ };
163
+ this.cmsEndpoint = undefined;
164
+ this.language = 'en';
165
+ this.userRoles = 'everyone';
166
+ this.cmsEnv = 'stage';
167
+ this.clientStyling = '';
168
+ this.clientStylingUrl = '';
169
+ this.hasErrors = false;
170
+ this.isLoading = true;
171
+ this.limitStylingAppends = false;
172
+ this.device = '';
173
+ }
174
+ watchEndpoint(newValue, oldValue) {
175
+ if (newValue && newValue != oldValue && this.cmsEndpoint) {
176
+ this.getAboutUs();
177
+ }
190
178
  }
191
- }
192
- componentWillLoad() {
193
- if (this.cmsEndpoint && this.language) {
194
- return this.getAboutUs();
179
+ componentWillLoad() {
180
+ if (this.cmsEndpoint && this.language) {
181
+ return this.getAboutUs();
182
+ }
195
183
  }
196
- }
197
- componentDidLoad() {
198
- this.device = getDeviceCustom();
199
- }
200
- getAboutUs() {
201
- let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
202
- url.searchParams.append('env', this.cmsEnv);
203
- url.searchParams.append('userRoles', this.userRoles);
204
- url.searchParams.append('device', getDevicePlatform());
205
- return new Promise((resolve, reject) => {
206
- this.isLoading = true;
207
- fetch(url.href)
208
- .then((res) => res.json())
209
- .then((aboutUsContent) => {
210
- const keysToKeep = ['title', 'description', 'images', 'button', 'externalLink', 'targetType', 'locations'];
211
- const aboutUsArrContent = Object.entries(aboutUsContent)
212
- .filter(([key]) => keysToKeep.includes(key))
213
- .reduce((acc, [key, value]) => {
214
- acc[key] = value;
215
- return acc;
216
- }, {});
217
- this.aboutUsData = aboutUsArrContent;
218
- resolve(aboutUsArrContent);
219
- }).catch((err) => {
220
- console.error(err);
221
- this.hasErrors = true;
222
- reject(err);
223
- }).finally(() => {
224
- this.isLoading = false;
225
- });
226
- });
227
- }
228
- componentDidRender() {
229
- // start custom styling area
230
- if (!this.limitStylingAppends && this.stylingContainer) {
231
- if (this.clientStyling)
232
- this.setClientStyling();
233
- if (this.clientStylingUrl)
234
- this.setClientStylingURL();
235
- this.limitStylingAppends = true;
184
+ componentDidLoad() {
185
+ this.device = getDeviceCustom();
186
+ }
187
+ getAboutUs() {
188
+ let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
189
+ url.searchParams.append('env', this.cmsEnv);
190
+ url.searchParams.append('userRoles', this.userRoles);
191
+ url.searchParams.append('device', getDevicePlatform());
192
+ return new Promise((resolve, reject) => {
193
+ this.isLoading = true;
194
+ fetch(url.href)
195
+ .then((res) => res.json())
196
+ .then((aboutUsContent) => {
197
+ const keysToKeep = ['title', 'description', 'images', 'button', 'externalLink', 'targetType', 'locations'];
198
+ const aboutUsArrContent = Object.entries(aboutUsContent)
199
+ .filter(([key]) => keysToKeep.includes(key))
200
+ .reduce((acc, [key, value]) => {
201
+ acc[key] = value;
202
+ return acc;
203
+ }, {});
204
+ this.aboutUsData = aboutUsArrContent;
205
+ resolve(aboutUsArrContent);
206
+ }).catch((err) => {
207
+ console.error(err);
208
+ this.hasErrors = true;
209
+ reject(err);
210
+ }).finally(() => {
211
+ this.isLoading = false;
212
+ });
213
+ });
236
214
  }
237
- }
238
- render() {
239
- var _a, _b, _c, _d, _e;
240
- if (this.hasErrors) {
241
- return (index.h("div", { class: "AboutUsError" }, index.h("div", { class: "ErrorInfo" }, translate('error', this.language))));
215
+ componentDidRender() {
216
+ // start custom styling area
217
+ if (!this.limitStylingAppends && this.stylingContainer) {
218
+ if (this.clientStyling)
219
+ this.setClientStyling();
220
+ if (this.clientStylingUrl)
221
+ this.setClientStylingURL();
222
+ this.limitStylingAppends = true;
223
+ }
242
224
  }
243
- if (!this.isLoading) {
244
- return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "AboutUsWrapper" }, index.h("div", { class: "ItemImage" }, index.h("div", { class: "ForegroundImage", style: { background: `linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),
225
+ render() {
226
+ var _a, _b, _c, _d, _e;
227
+ if (this.hasErrors) {
228
+ return (index.h("div", { class: "AboutUsError" }, index.h("div", { class: "ErrorInfo" }, translate('error', this.language))));
229
+ }
230
+ if (!this.isLoading) {
231
+ return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "AboutUsWrapper" }, index.h("div", { class: "ItemImage" }, index.h("div", { class: "ForegroundImage", style: { background: `linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),
245
232
  linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),
246
233
  linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),
247
234
  url(${this.setImage((_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.images)}) no-repeat center center / cover` } }), index.h("img", { class: "BackgroundImage", src: this.setImage(this.aboutUsData.images), alt: "image" }), index.h("div", { class: "ItemDetails" }, this.formatTitle((_b = this.aboutUsData) === null || _b === void 0 ? void 0 : _b.title, this.language), index.h("div", { class: "Description", innerHTML: (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.description }), index.h("button", { class: "Button", onClick: () => {
248
- var _a, _b, _c, _d, _e;
249
- return this.handleClick((_b = (_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.buttonUrl, (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.targetType, (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.locations, (_e = this.aboutUsData) === null || _e === void 0 ? void 0 : _e.externalLink);
250
- } }, (_e = (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.button) === null || _e === void 0 ? void 0 :
251
- _e.buttonText, index.h("img", { src: chevronSvg, alt: "right chevron", class: "Chevron" })))))));
235
+ var _a, _b, _c, _d, _e;
236
+ return this.handleClick((_b = (_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.buttonUrl, (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.targetType, (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.locations, (_e = this.aboutUsData) === null || _e === void 0 ? void 0 : _e.externalLink);
237
+ } }, (_e = (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.button) === null || _e === void 0 ? void 0 :
238
+ _e.buttonText, index.h("img", { src: chevronSvg, alt: "right chevron", class: "Chevron" })))))));
239
+ }
252
240
  }
253
- }
254
- static get watchers() { return {
255
- "cmsEndpoint": ["watchEndpoint"],
256
- "language": ["watchEndpoint"],
257
- "userRoles": ["watchEndpoint"],
258
- "device": ["watchEndpoint"]
259
- }; }
241
+ static get watchers() { return {
242
+ "cmsEndpoint": ["watchEndpoint"],
243
+ "language": ["watchEndpoint"],
244
+ "userRoles": ["watchEndpoint"],
245
+ "device": ["watchEndpoint"]
246
+ }; }
260
247
  };
261
- GeneralAboutUs.style = generalAboutUsCss;
248
+ GeneralAboutUs.style = GeneralAboutUsStyle0;
262
249
 
263
250
  exports.general_about_us = GeneralAboutUs;
@@ -1,19 +1,25 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f09c74e2.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-f16005fe.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
4
7
 
5
8
  /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
7
10
  */
8
- const patchBrowser = () => {
9
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-about-us.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
11
+ var patchBrowser = () => {
12
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-about-us.cjs.js', document.baseURI).href));
13
+ const opts = {};
14
+ if (importMeta !== "") {
15
+ opts.resourcesUrl = new URL(".", importMeta).href;
16
+ }
17
+ return index.promiseResolve(opts);
15
18
  };
16
19
 
17
- patchBrowser().then(options => {
18
- return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]}]]]], options);
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"]}]]]], options);
19
23
  });
24
+
25
+ exports.setNonce = index.setNonce;