@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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-about-us.cjs.entry.js +210 -223
- package/dist/cjs/general-about-us.cjs.js +17 -11
- package/dist/cjs/index-f16005fe.js +1198 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/general-about-us/general-about-us.css +2 -2
- package/dist/collection/components/general-about-us/general-about-us.js +279 -297
- package/dist/collection/components/general-about-us/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +26 -26
- package/dist/collection/utils/utils.js +43 -43
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-about-us.entry.js +210 -223
- package/dist/esm/general-about-us.js +14 -11
- package/dist/esm/index-8f53f54c.js +1172 -0
- package/dist/esm/loader.js +7 -13
- package/dist/general-about-us/general-about-us.esm.js +1 -1
- package/dist/general-about-us/p-21732378.js +2 -0
- package/dist/general-about-us/p-9f49c7d5.entry.js +1 -0
- package/dist/general-about-us/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-about-us/.stencil/packages/stencil/general-about-us/stencil.config.d.ts +2 -0
- 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
- package/dist/types/components/general-about-us/general-about-us.d.ts +41 -41
- package/dist/types/components/general-about-us/general-about-us.types.d.ts +13 -13
- package/dist/types/components/general-about-us/index.d.ts +1 -0
- 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-f09c74e2.js +0 -1223
- package/dist/components/general-about-us.d.ts +0 -11
- package/dist/components/general-about-us.js +0 -288
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-b262ca21.js +0 -1198
- 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-about-us/p-0c90e5ab.js +0 -1
- package/dist/general-about-us/p-edeca10f.entry.js +0 -1
- 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
|
@@ -2,262 +2,249 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f16005fe.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const TRANSLATIONS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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 (
|
|
51
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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,
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
.
|
|
163
|
-
.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
179
|
+
componentWillLoad() {
|
|
180
|
+
if (this.cmsEndpoint && this.language) {
|
|
181
|
+
return this.getAboutUs();
|
|
182
|
+
}
|
|
195
183
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
244
|
-
|
|
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
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}; }
|
|
241
|
+
static get watchers() { return {
|
|
242
|
+
"cmsEndpoint": ["watchEndpoint"],
|
|
243
|
+
"language": ["watchEndpoint"],
|
|
244
|
+
"userRoles": ["watchEndpoint"],
|
|
245
|
+
"device": ["watchEndpoint"]
|
|
246
|
+
}; }
|
|
260
247
|
};
|
|
261
|
-
GeneralAboutUs.style =
|
|
248
|
+
GeneralAboutUs.style = GeneralAboutUsStyle0;
|
|
262
249
|
|
|
263
250
|
exports.general_about_us = GeneralAboutUs;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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;
|