@everymatrix/blog-article-details 1.44.0 → 1.45.2
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/blog-article-details/blog-article-details.esm.js +1 -1
- package/dist/blog-article-details/p-0783b0ba.js +2 -0
- package/dist/blog-article-details/p-e1255160.js +1 -0
- package/dist/blog-article-details/p-f02359f3.entry.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/blog-article-details.cjs.entry.js +223 -248
- package/dist/cjs/blog-article-details.cjs.js +17 -11
- package/dist/cjs/index-ade27b33.js +1254 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/blog-article-details/blog-article-details.js +463 -485
- package/dist/collection/components/blog-article-details/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +23 -23
- package/dist/collection/utils/utils.js +48 -48
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/blog-article-details.entry.js +223 -248
- package/dist/esm/blog-article-details.js +14 -11
- package/dist/esm/index-9d94198d.js +1228 -0
- package/dist/esm/loader.js +7 -13
- 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/blog-article-details/.stencil/packages/stencil/blog-article-details/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/blog-article-details/.stencil/packages/stencil/blog-article-details/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/blog-article-details/blog-article-details.d.ts +78 -78
- package/dist/types/components/blog-article-details/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 -6
- package/dist/blog-article-details/p-68e0210a.js +0 -1
- package/dist/blog-article-details/p-b8c9de45.entry.js +0 -1
- package/dist/cjs/index-d983d0f8.js +0 -1255
- package/dist/components/blog-article-details.d.ts +0 -11
- package/dist/components/blog-article-details.js +0 -317
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-a6d43dfd.js +0 -1230
- 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/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/blog-article-details/.stencil/packages/blog-article-details/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BlogArticleDetails } from './blog-article-details';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const TRANSLATIONS = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
en: {
|
|
4
|
+
error: 'Error',
|
|
5
|
+
},
|
|
6
|
+
ro: {
|
|
7
|
+
error: 'Eroare',
|
|
8
|
+
},
|
|
9
|
+
fr: {
|
|
10
|
+
error: 'Error',
|
|
11
|
+
},
|
|
12
|
+
ar: {
|
|
13
|
+
error: 'خطأ',
|
|
14
|
+
},
|
|
15
|
+
hr: {
|
|
16
|
+
error: 'Greška',
|
|
17
|
+
},
|
|
18
|
+
'pt-br': {
|
|
19
|
+
error: 'Erro'
|
|
20
|
+
},
|
|
21
|
+
'es-mx': {
|
|
22
|
+
error: 'Error'
|
|
23
|
+
}
|
|
24
24
|
};
|
|
25
25
|
export const translate = (key, customLang) => {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const lang = customLang;
|
|
27
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
28
28
|
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
export function checkDeviceType() {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
17
|
}
|
|
18
18
|
export const getDevice = () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
let userAgent = window.navigator.userAgent;
|
|
20
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
21
|
+
return 'Android';
|
|
22
|
+
}
|
|
23
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
24
|
+
return 'iPhone';
|
|
25
|
+
}
|
|
26
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
27
|
+
return 'iPad';
|
|
28
|
+
}
|
|
29
|
+
return 'PC';
|
|
30
30
|
};
|
|
31
31
|
function checkCustomDeviceWidth() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
const width = screen.availWidth;
|
|
33
|
+
if (width < 600) {
|
|
34
|
+
return 'mobile';
|
|
35
|
+
}
|
|
36
|
+
else if (width >= 600 && width < 1100) {
|
|
37
|
+
return 'tablet';
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
export function getDeviceCustom() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
42
|
+
let source = '';
|
|
43
|
+
source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
|
|
44
|
+
return source;
|
|
45
45
|
}
|
|
46
46
|
export const getDevicePlatform = () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
const device = getDevice();
|
|
48
|
+
if (device) {
|
|
49
|
+
if (device === 'PC') {
|
|
50
|
+
return 'dk';
|
|
51
|
+
}
|
|
52
|
+
else if (device === 'iPad' || device === 'iPhone') {
|
|
53
|
+
return 'mtWeb';
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return 'mtWeb';
|
|
57
|
+
}
|
|
57
58
|
}
|
|
58
|
-
}
|
|
59
59
|
};
|