@everymatrix/blog-articles-grid 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.
Files changed (44) hide show
  1. package/dist/blog-articles-grid/blog-articles-grid.esm.js +1 -0
  2. package/dist/blog-articles-grid/index.esm.js +0 -0
  3. package/dist/blog-articles-grid/p-786304d4.js +2 -0
  4. package/dist/blog-articles-grid/p-b88c9233.entry.js +1 -0
  5. package/dist/blog-articles-grid/p-e1255160.js +1 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/blog-articles-grid.cjs.js +25 -0
  8. package/dist/cjs/blog-articles-grid_2.cjs.entry.js +623 -0
  9. package/dist/cjs/index-fad8e671.js +1332 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +15 -0
  12. package/dist/collection/collection-manifest.json +19 -0
  13. package/dist/collection/components/blog-articles-grid/blog-articles-grid.css +167 -0
  14. package/dist/collection/components/blog-articles-grid/blog-articles-grid.js +740 -0
  15. package/dist/collection/components/blog-articles-grid/index.js +1 -0
  16. package/dist/collection/index.js +1 -0
  17. package/dist/collection/utils/locale.utils.js +40 -0
  18. package/dist/collection/utils/utils.js +67 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/blog-articles-grid.js +20 -0
  21. package/dist/esm/blog-articles-grid_2.entry.js +618 -0
  22. package/dist/esm/index-2c19cd94.js +1305 -0
  23. package/dist/esm/index.js +1 -0
  24. package/dist/esm/loader.js +11 -0
  25. package/dist/index.cjs.js +1 -0
  26. package/dist/index.js +1 -0
  27. package/dist/stencil.config.dev.js +17 -0
  28. package/dist/stencil.config.js +17 -0
  29. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/blog-articles-grid/.stencil/packages/stencil/blog-articles-grid/stencil.config.d.ts +2 -0
  30. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/blog-articles-grid/.stencil/packages/stencil/blog-articles-grid/stencil.config.dev.d.ts +2 -0
  31. package/dist/types/components/blog-articles-grid/blog-articles-grid.d.ts +117 -0
  32. package/dist/types/components/blog-articles-grid/index.d.ts +1 -0
  33. package/dist/types/components.d.ts +213 -0
  34. package/dist/types/index.d.ts +1 -0
  35. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  36. package/dist/types/utils/locale.utils.d.ts +1 -0
  37. package/dist/types/utils/utils.d.ts +4 -0
  38. package/loader/cdn.js +1 -0
  39. package/loader/index.cjs.js +1 -0
  40. package/loader/index.d.ts +24 -0
  41. package/loader/index.es2017.js +1 -0
  42. package/loader/index.js +2 -0
  43. package/loader/package.json +11 -0
  44. package/package.json +29 -0
@@ -0,0 +1 @@
1
+ export { BlogArticlesGrid } from './blog-articles-grid';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,40 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu', 'hr'];
3
+ const TRANSLATIONS = {
4
+ en: {
5
+ error: 'Error',
6
+ readmore: 'Read more',
7
+ },
8
+ ro: {
9
+ error: 'Eroare',
10
+ readmore: 'Read more',
11
+ },
12
+ fr: {
13
+ error: 'Error',
14
+ readmore: 'Read more',
15
+ },
16
+ ar: {
17
+ error: 'خطأ',
18
+ readmore: 'Read more',
19
+ },
20
+ hu: {
21
+ error: 'خطأ',
22
+ readmore: 'Tovább olvasom',
23
+ },
24
+ hr: {
25
+ error: 'Greška',
26
+ readmore: 'Pročitaj više'
27
+ },
28
+ 'pt-br': {
29
+ error: 'Erro',
30
+ readmore: 'Ler mais'
31
+ },
32
+ 'es-mx': {
33
+ error: 'Error',
34
+ readmore: 'Leer más'
35
+ }
36
+ };
37
+ export const translate = (key, customLang) => {
38
+ const lang = customLang;
39
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
40
+ };
@@ -0,0 +1,67 @@
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
+ function isIpad() {
28
+ const userAgent = navigator.userAgent.toLowerCase();
29
+ // Traditional iPad user agent
30
+ if (userAgent.includes('ipad')) {
31
+ return true;
32
+ }
33
+ return userAgent.indexOf('macintosh') > -1 && navigator.maxTouchPoints && navigator.maxTouchPoints > 2;
34
+ }
35
+ export function getDeviceCustom() {
36
+ const userAgent = navigator.userAgent.toLowerCase();
37
+ let source = '';
38
+ source = (userAgent.includes('android') || userAgent.includes('iphone') || isIpad()) ? checkCustomDeviceWidth() : 'desktop';
39
+ return source;
40
+ }
41
+ export const getDevice = () => {
42
+ let userAgent = window.navigator.userAgent;
43
+ if (userAgent.toLowerCase().match(/android/i)) {
44
+ return 'Android';
45
+ }
46
+ if (userAgent.toLowerCase().match(/iphone/i)) {
47
+ return 'iPhone';
48
+ }
49
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
50
+ return 'iPad';
51
+ }
52
+ return 'PC';
53
+ };
54
+ export const getDevicePlatform = () => {
55
+ const device = getDevice();
56
+ if (device) {
57
+ if (device === 'PC') {
58
+ return 'dk';
59
+ }
60
+ else if (device === 'iPad' || device === 'iPhone') {
61
+ return 'mtWeb';
62
+ }
63
+ else {
64
+ return 'mtWeb';
65
+ }
66
+ }
67
+ };
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
@@ -0,0 +1,20 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-2c19cd94.js';
2
+ export { s as setNonce } from './index-2c19cd94.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
7
+ */
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);
15
+ };
16
+
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["blog-articles-grid_2",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[513],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"blogData":[32],"totalBlogs":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[0,"hpPageChange","hpPageChange"]],{"page":["watchEndpoint"],"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingChange"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
20
+ });