@everymatrix/general-footer-template 1.49.2 → 1.50.1
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/custom-clock.cjs.entry.js +2285 -0
- package/dist/cjs/custom-content-section.cjs.entry.js +1498 -1418
- package/dist/cjs/general-footer-template.cjs.entry.js +8 -3
- package/dist/cjs/general-footer-template.cjs.js +3 -3
- package/dist/cjs/image-list.cjs.entry.js +2 -2
- package/dist/cjs/{index-4c3922ac.js → index-465b4ca9.js} +73 -18
- package/dist/cjs/link-section-list.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/custom-clock/custom-clock.css +8 -0
- package/dist/collection/components/custom-clock/custom-clock.js +114 -0
- package/dist/collection/components/custom-content-section/custom-content-section.js +1 -1
- package/dist/collection/components/general-footer-template/general-footer-template.css +3 -3
- package/dist/collection/components/general-footer-template/general-footer-template.js +39 -1
- package/dist/collection/components/image-list/image-list.js +1 -1
- package/dist/collection/utils/locale.utils.js +42 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/custom-clock.entry.js +2281 -0
- package/dist/esm/custom-content-section.entry.js +1498 -1418
- package/dist/esm/general-footer-template.entry.js +8 -3
- package/dist/esm/general-footer-template.js +4 -4
- package/dist/esm/image-list.entry.js +2 -2
- package/dist/esm/{index-7361445e.js → index-9775f5ee.js} +73 -18
- package/dist/esm/link-section-list.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/general-footer-template/general-footer-template.esm.js +1 -1
- package/dist/general-footer-template/{p-0a75f723.entry.js → p-1274900b.entry.js} +1 -1
- package/dist/general-footer-template/p-2fce3c9f.js +2 -0
- package/dist/general-footer-template/p-330130cd.entry.js +1 -0
- package/dist/general-footer-template/{p-853dab90.entry.js → p-5982a2ca.entry.js} +2 -2
- package/dist/general-footer-template/p-cc02e076.entry.js +1 -0
- package/dist/general-footer-template/{p-4f676786.entry.js → p-e19d7226.entry.js} +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/custom-clock/custom-clock.d.ts +22 -0
- package/dist/types/components/general-footer-template/general-footer-template.d.ts +8 -0
- package/dist/types/components.d.ts +53 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/general-footer-template/p-26b76a9c.js +0 -2
- package/dist/general-footer-template/p-35120834.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +0 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
const TRANSLATIONS = {
|
|
3
|
+
en: {
|
|
4
|
+
currentTime: 'Current Time',
|
|
5
|
+
},
|
|
6
|
+
hu: {
|
|
7
|
+
currentTime: 'Jelenlegi idő',
|
|
8
|
+
},
|
|
9
|
+
ro: {
|
|
10
|
+
currentTime: 'Ora curentă',
|
|
11
|
+
},
|
|
12
|
+
fr: {
|
|
13
|
+
currentTime: 'Heure actuelle',
|
|
14
|
+
},
|
|
15
|
+
ar: {
|
|
16
|
+
currentTime: 'الوقت الحالي',
|
|
17
|
+
},
|
|
18
|
+
hr: {
|
|
19
|
+
currentTime: 'Trenutno vrijeme',
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const getTranslations = (url) => {
|
|
23
|
+
return new Promise((resolve) => {
|
|
24
|
+
fetch(url)
|
|
25
|
+
.then((res) => res.json())
|
|
26
|
+
.then((data) => {
|
|
27
|
+
Object.keys(data).forEach((lang) => {
|
|
28
|
+
if (!TRANSLATIONS[lang]) {
|
|
29
|
+
TRANSLATIONS[lang] = {};
|
|
30
|
+
}
|
|
31
|
+
for (let key in data[lang]) {
|
|
32
|
+
TRANSLATIONS[lang][key] = data[lang][key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
resolve(true);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
export const translate = (key, customLang) => {
|
|
40
|
+
const lang = customLang;
|
|
41
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
42
|
+
};
|
|
@@ -69,6 +69,9 @@ export const componentRules = {
|
|
|
69
69
|
"vendors": {
|
|
70
70
|
component: 'image-list',
|
|
71
71
|
},
|
|
72
|
+
"clock": {
|
|
73
|
+
component: 'custom-clock',
|
|
74
|
+
},
|
|
72
75
|
};
|
|
73
76
|
// This method takes repeater content and changes it to fit an uniform standard for property names in order to be treated in a general case by the footer
|
|
74
77
|
// ex. if helpLinks repeaters use "helpImage" and socialLinks repeaters use "socialImage", both will use "image" after the normalization
|