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