@everymatrix/general-about-us 1.43.4 → 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
@@ -1,259 +1,246 @@
1
- import { r as registerInstance, h } from './index-b262ca21.js';
1
+ import { r as registerInstance, h } from './index-8f53f54c.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
5
- en: {
6
- error: 'Error',
7
- noResults: 'Loading, please wait ...',
8
- },
9
- hu: {
10
- error: 'Error',
11
- noResults: 'Loading, please wait ...',
12
- },
13
- ro: {
14
- error: 'Eroare',
15
- noResults: 'Loading, please wait ...',
16
- },
17
- fr: {
18
- error: 'Error',
19
- noResults: 'Loading, please wait ...',
20
- },
21
- ar: {
22
- error: 'خطأ',
23
- noResults: 'Loading, please wait ...',
24
- },
25
- hr: {
26
- error: 'Greška',
27
- noResults: 'Učitavanje, molimo pričekajte ...',
28
- }
5
+ en: {
6
+ error: 'Error',
7
+ noResults: 'Loading, please wait ...',
8
+ },
9
+ hu: {
10
+ error: 'Error',
11
+ noResults: 'Loading, please wait ...',
12
+ },
13
+ ro: {
14
+ error: 'Eroare',
15
+ noResults: 'Loading, please wait ...',
16
+ },
17
+ fr: {
18
+ error: 'Error',
19
+ noResults: 'Loading, please wait ...',
20
+ },
21
+ ar: {
22
+ error: 'خطأ',
23
+ noResults: 'Loading, please wait ...',
24
+ },
25
+ hr: {
26
+ error: 'Greška',
27
+ noResults: 'Učitavanje, molimo pričekajte ...',
28
+ }
29
29
  };
30
30
  const translate = (key, customLang) => {
31
- const lang = customLang;
32
- return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
31
+ const lang = customLang;
32
+ return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
33
33
  };
34
34
 
35
35
  function checkDeviceType() {
36
- const userAgent = navigator.userAgent.toLowerCase();
37
- const width = screen.availWidth;
38
- const height = screen.availHeight;
39
- if (userAgent.includes('iphone')) {
40
- return 'mobile';
41
- }
42
- if (userAgent.includes('android')) {
43
- if (height > width && width < 800) {
44
- return 'mobile';
36
+ const userAgent = navigator.userAgent.toLowerCase();
37
+ const width = screen.availWidth;
38
+ const height = screen.availHeight;
39
+ if (userAgent.includes('iphone')) {
40
+ return 'mobile';
45
41
  }
46
- if (width > height && height < 800) {
47
- return 'tablet';
42
+ if (userAgent.includes('android')) {
43
+ if (height > width && width < 800) {
44
+ return 'mobile';
45
+ }
46
+ if (width > height && height < 800) {
47
+ return 'tablet';
48
+ }
48
49
  }
49
- }
50
- return 'desktop';
50
+ return 'desktop';
51
51
  }
52
52
  function checkCustomDeviceWidth() {
53
- const width = screen.availWidth;
54
- if (width < 600) {
55
- return 'mobile';
56
- }
57
- else if (width >= 600 && width < 1100) {
58
- return 'tablet';
59
- }
53
+ const width = screen.availWidth;
54
+ if (width < 600) {
55
+ return 'mobile';
56
+ }
57
+ else if (width >= 600 && width < 1100) {
58
+ return 'tablet';
59
+ }
60
60
  }
61
61
  function getDeviceCustom() {
62
- const userAgent = navigator.userAgent.toLowerCase();
63
- let source = '';
64
- source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
65
- return source;
62
+ const userAgent = navigator.userAgent.toLowerCase();
63
+ let source = '';
64
+ source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
65
+ return source;
66
66
  }
67
67
  const getDevice = () => {
68
- let userAgent = window.navigator.userAgent.toLocaleLowerCase();
69
- if (userAgent.includes('android/i'))
70
- return 'android';
71
- if (userAgent.includes('iphone/i'))
72
- return 'iPhone';
73
- if (userAgent.includes('ipad/i') || userAgent.includes('ipod/i'))
74
- return 'iPad';
75
- return 'PC';
68
+ let userAgent = window.navigator.userAgent.toLocaleLowerCase();
69
+ if (userAgent.includes('android/i'))
70
+ return 'android';
71
+ if (userAgent.includes('iphone/i'))
72
+ return 'iPhone';
73
+ if (userAgent.includes('ipad/i') || userAgent.includes('ipod/i'))
74
+ return 'iPad';
75
+ return 'PC';
76
76
  };
77
77
  const getDevicePlatform = () => {
78
- const device = getDevice();
79
- if (device) {
80
- if (device === 'PC') {
81
- return 'dk';
82
- }
83
- else if (device === 'iPad' || device === 'iPhone') {
84
- return 'mtWeb';
85
- }
86
- else {
87
- return 'mtWeb';
78
+ const device = getDevice();
79
+ if (device) {
80
+ if (device === 'PC') {
81
+ return 'dk';
82
+ }
83
+ else if (device === 'iPad' || device === 'iPhone') {
84
+ return 'mtWeb';
85
+ }
86
+ else {
87
+ return 'mtWeb';
88
+ }
88
89
  }
89
- }
90
90
  };
91
91
 
92
92
  const chevronSvg = 'data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==';
93
93
 
94
- 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}";
94
+ 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}";
95
+ const GeneralAboutUsStyle0 = generalAboutUsCss;
95
96
 
96
97
  const GeneralAboutUs = class {
97
- constructor(hostRef) {
98
- registerInstance(this, hostRef);
99
- /**
100
- * Language of the widget
101
- */
102
- this.language = 'en';
103
- /**
104
- * User roles
105
- */
106
- this.userRoles = 'everyone';
107
- /**
108
- * CMS Endpoint stage
109
- */
110
- this.cmsEnv = 'stage';
111
- /**
112
- * Client custom styling via inline style
113
- */
114
- this.clientStyling = '';
115
- /**
116
- * Client custom styling via url
117
- */
118
- this.clientStylingUrl = '';
119
- this.hasErrors = false;
120
- this.isLoading = true;
121
- this.limitStylingAppends = false;
122
- this.device = '';
123
- this.handleClick = (url, target, location, isExternal) => {
124
- window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
125
- // @ts-ignore Analytics event
126
- if (typeof gtag == 'function') {
127
- // @ts-ignore
128
- gtag('event', 'GeneralAboutUs', {
129
- 'context': 'AboutUsContent'
130
- });
131
- }
132
- };
133
- this.setImage = (image) => {
134
- let source = '';
135
- this.device = checkDeviceType();
136
- switch (this.device) {
137
- case 'mobile':
138
- source = image.imageMobile;
139
- break;
140
- case 'tablet':
141
- source = image.imageTablet;
142
- break;
143
- case 'desktop':
144
- source = image.imageDesktop;
145
- break;
146
- }
147
- return source;
148
- };
149
- this.setClientStyling = () => {
150
- let sheet = document.createElement('style');
151
- sheet.innerHTML = this.clientStyling;
152
- this.stylingContainer.prepend(sheet);
153
- };
154
- this.setClientStylingURL = () => {
155
- let url = new URL(this.clientStylingUrl);
156
- let cssFile = document.createElement('style');
157
- fetch(url.href)
158
- .then((res) => res.text())
159
- .then((data) => {
160
- cssFile.innerHTML = data;
161
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
162
- })
163
- .catch((err) => {
164
- console.log('error ', err);
165
- });
166
- };
167
- // end custom styling area
168
- this.formatTitle = (title, language) => {
169
- let firstWord, restOfTitle;
170
- // Check for common languages that do not use space - here: Chinese, Japanese, Thai
171
- if (['zh', 'ja', 'th'].includes(language)) {
172
- firstWord = title.substring(0, 1);
173
- restOfTitle = title.substring(1);
174
- }
175
- else {
176
- const words = title.split(' ');
177
- firstWord = words.shift();
178
- restOfTitle = words.join(' ');
179
- }
180
- return h("div", { class: "Title" }, h("span", { class: "FirstWord" }, firstWord, " "), h("span", null, restOfTitle));
181
- };
182
- }
183
- watchEndpoint(newValue, oldValue) {
184
- if (newValue && newValue != oldValue && this.cmsEndpoint) {
185
- this.getAboutUs();
98
+ constructor(hostRef) {
99
+ registerInstance(this, hostRef);
100
+ this.handleClick = (url, target, location, isExternal) => {
101
+ window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
102
+ // @ts-ignore Analytics event
103
+ if (typeof gtag == 'function') {
104
+ // @ts-ignore
105
+ gtag('event', 'GeneralAboutUs', {
106
+ 'context': 'AboutUsContent'
107
+ });
108
+ }
109
+ };
110
+ this.setImage = (image) => {
111
+ let source = '';
112
+ this.device = checkDeviceType();
113
+ switch (this.device) {
114
+ case 'mobile':
115
+ source = image.imageMobile;
116
+ break;
117
+ case 'tablet':
118
+ source = image.imageTablet;
119
+ break;
120
+ case 'desktop':
121
+ source = image.imageDesktop;
122
+ break;
123
+ }
124
+ return source;
125
+ };
126
+ this.setClientStyling = () => {
127
+ let sheet = document.createElement('style');
128
+ sheet.innerHTML = this.clientStyling;
129
+ this.stylingContainer.prepend(sheet);
130
+ };
131
+ this.setClientStylingURL = () => {
132
+ let url = new URL(this.clientStylingUrl);
133
+ let cssFile = document.createElement('style');
134
+ fetch(url.href)
135
+ .then((res) => res.text())
136
+ .then((data) => {
137
+ cssFile.innerHTML = data;
138
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
139
+ })
140
+ .catch((err) => {
141
+ console.log('error ', err);
142
+ });
143
+ };
144
+ // end custom styling area
145
+ this.formatTitle = (title, language) => {
146
+ let firstWord, restOfTitle;
147
+ // Check for common languages that do not use space - here: Chinese, Japanese, Thai
148
+ if (['zh', 'ja', 'th'].includes(language)) {
149
+ firstWord = title.substring(0, 1);
150
+ restOfTitle = title.substring(1);
151
+ }
152
+ else {
153
+ const words = title.split(' ');
154
+ firstWord = words.shift();
155
+ restOfTitle = words.join(' ');
156
+ }
157
+ return h("div", { class: "Title" }, h("span", { class: "FirstWord" }, firstWord, " "), h("span", null, restOfTitle));
158
+ };
159
+ this.cmsEndpoint = undefined;
160
+ this.language = 'en';
161
+ this.userRoles = 'everyone';
162
+ this.cmsEnv = 'stage';
163
+ this.clientStyling = '';
164
+ this.clientStylingUrl = '';
165
+ this.hasErrors = false;
166
+ this.isLoading = true;
167
+ this.limitStylingAppends = false;
168
+ this.device = '';
169
+ }
170
+ watchEndpoint(newValue, oldValue) {
171
+ if (newValue && newValue != oldValue && this.cmsEndpoint) {
172
+ this.getAboutUs();
173
+ }
186
174
  }
187
- }
188
- componentWillLoad() {
189
- if (this.cmsEndpoint && this.language) {
190
- return this.getAboutUs();
175
+ componentWillLoad() {
176
+ if (this.cmsEndpoint && this.language) {
177
+ return this.getAboutUs();
178
+ }
191
179
  }
192
- }
193
- componentDidLoad() {
194
- this.device = getDeviceCustom();
195
- }
196
- getAboutUs() {
197
- let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
198
- url.searchParams.append('env', this.cmsEnv);
199
- url.searchParams.append('userRoles', this.userRoles);
200
- url.searchParams.append('device', getDevicePlatform());
201
- return new Promise((resolve, reject) => {
202
- this.isLoading = true;
203
- fetch(url.href)
204
- .then((res) => res.json())
205
- .then((aboutUsContent) => {
206
- const keysToKeep = ['title', 'description', 'images', 'button', 'externalLink', 'targetType', 'locations'];
207
- const aboutUsArrContent = Object.entries(aboutUsContent)
208
- .filter(([key]) => keysToKeep.includes(key))
209
- .reduce((acc, [key, value]) => {
210
- acc[key] = value;
211
- return acc;
212
- }, {});
213
- this.aboutUsData = aboutUsArrContent;
214
- resolve(aboutUsArrContent);
215
- }).catch((err) => {
216
- console.error(err);
217
- this.hasErrors = true;
218
- reject(err);
219
- }).finally(() => {
220
- this.isLoading = false;
221
- });
222
- });
223
- }
224
- componentDidRender() {
225
- // start custom styling area
226
- if (!this.limitStylingAppends && this.stylingContainer) {
227
- if (this.clientStyling)
228
- this.setClientStyling();
229
- if (this.clientStylingUrl)
230
- this.setClientStylingURL();
231
- this.limitStylingAppends = true;
180
+ componentDidLoad() {
181
+ this.device = getDeviceCustom();
182
+ }
183
+ getAboutUs() {
184
+ let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
185
+ url.searchParams.append('env', this.cmsEnv);
186
+ url.searchParams.append('userRoles', this.userRoles);
187
+ url.searchParams.append('device', getDevicePlatform());
188
+ return new Promise((resolve, reject) => {
189
+ this.isLoading = true;
190
+ fetch(url.href)
191
+ .then((res) => res.json())
192
+ .then((aboutUsContent) => {
193
+ const keysToKeep = ['title', 'description', 'images', 'button', 'externalLink', 'targetType', 'locations'];
194
+ const aboutUsArrContent = Object.entries(aboutUsContent)
195
+ .filter(([key]) => keysToKeep.includes(key))
196
+ .reduce((acc, [key, value]) => {
197
+ acc[key] = value;
198
+ return acc;
199
+ }, {});
200
+ this.aboutUsData = aboutUsArrContent;
201
+ resolve(aboutUsArrContent);
202
+ }).catch((err) => {
203
+ console.error(err);
204
+ this.hasErrors = true;
205
+ reject(err);
206
+ }).finally(() => {
207
+ this.isLoading = false;
208
+ });
209
+ });
232
210
  }
233
- }
234
- render() {
235
- var _a, _b, _c, _d, _e;
236
- if (this.hasErrors) {
237
- return (h("div", { class: "AboutUsError" }, h("div", { class: "ErrorInfo" }, translate('error', this.language))));
211
+ componentDidRender() {
212
+ // start custom styling area
213
+ if (!this.limitStylingAppends && this.stylingContainer) {
214
+ if (this.clientStyling)
215
+ this.setClientStyling();
216
+ if (this.clientStylingUrl)
217
+ this.setClientStylingURL();
218
+ this.limitStylingAppends = true;
219
+ }
238
220
  }
239
- if (!this.isLoading) {
240
- return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "AboutUsWrapper" }, h("div", { class: "ItemImage" }, h("div", { class: "ForegroundImage", style: { background: `linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),
221
+ render() {
222
+ var _a, _b, _c, _d, _e;
223
+ if (this.hasErrors) {
224
+ return (h("div", { class: "AboutUsError" }, h("div", { class: "ErrorInfo" }, translate('error', this.language))));
225
+ }
226
+ if (!this.isLoading) {
227
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "AboutUsWrapper" }, h("div", { class: "ItemImage" }, h("div", { class: "ForegroundImage", style: { background: `linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),
241
228
  linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),
242
229
  linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),
243
230
  url(${this.setImage((_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.images)}) no-repeat center center / cover` } }), h("img", { class: "BackgroundImage", src: this.setImage(this.aboutUsData.images), alt: "image" }), h("div", { class: "ItemDetails" }, this.formatTitle((_b = this.aboutUsData) === null || _b === void 0 ? void 0 : _b.title, this.language), h("div", { class: "Description", innerHTML: (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.description }), h("button", { class: "Button", onClick: () => {
244
- var _a, _b, _c, _d, _e;
245
- 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);
246
- } }, (_e = (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.button) === null || _e === void 0 ? void 0 :
247
- _e.buttonText, h("img", { src: chevronSvg, alt: "right chevron", class: "Chevron" })))))));
231
+ var _a, _b, _c, _d, _e;
232
+ 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);
233
+ } }, (_e = (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.button) === null || _e === void 0 ? void 0 :
234
+ _e.buttonText, h("img", { src: chevronSvg, alt: "right chevron", class: "Chevron" })))))));
235
+ }
248
236
  }
249
- }
250
- static get watchers() { return {
251
- "cmsEndpoint": ["watchEndpoint"],
252
- "language": ["watchEndpoint"],
253
- "userRoles": ["watchEndpoint"],
254
- "device": ["watchEndpoint"]
255
- }; }
237
+ static get watchers() { return {
238
+ "cmsEndpoint": ["watchEndpoint"],
239
+ "language": ["watchEndpoint"],
240
+ "userRoles": ["watchEndpoint"],
241
+ "device": ["watchEndpoint"]
242
+ }; }
256
243
  };
257
- GeneralAboutUs.style = generalAboutUsCss;
244
+ GeneralAboutUs.style = GeneralAboutUsStyle0;
258
245
 
259
246
  export { GeneralAboutUs as general_about_us };
@@ -1,17 +1,20 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-b262ca21.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-8f53f54c.js';
2
+ export { s as setNonce } from './index-8f53f54c.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
2
4
 
3
5
  /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
5
7
  */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
13
15
  };
14
16
 
15
- patchBrowser().then(options => {
16
- return bootstrapLazy([["general-about-us",[[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);
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["general-about-us",[[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);
17
20
  });