@everymatrix/blog-articles-grid 1.99.27 → 1.99.29
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-articles-grid/blog-articles-grid.esm.js +1 -1
- package/dist/blog-articles-grid/blog-articles-grid_2.entry.js +1 -1
- package/dist/blog-articles-grid/index-6b3cf3ac.js +2 -0
- package/dist/cjs/blog-articles-grid.cjs.js +1 -1
- package/dist/cjs/blog-articles-grid_2.cjs.entry.js +111 -101
- package/dist/cjs/{index-d9577f9e.js → index-96fb13fd.js} +38 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.css +25 -2
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.js +55 -32
- package/dist/collection/utils/locale.utils.js +18 -18
- package/dist/esm/blog-articles-grid.js +2 -2
- package/dist/esm/blog-articles-grid_2.entry.js +111 -101
- package/dist/esm/{index-4af8e775.js → index-6b3cf3ac.js} +38 -1
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/blog-articles-grid/blog-articles-grid.d.ts +5 -2
- package/dist/types/utils/type.d.ts +1 -1
- package/package.json +1 -1
- package/dist/blog-articles-grid/index-4af8e775.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-6b3cf3ac.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
4
4
|
const TRANSLATIONS$1 = {
|
|
@@ -12,9 +12,9 @@ const TRANSLATIONS$1 = {
|
|
|
12
12
|
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
13
13
|
},
|
|
14
14
|
ro: {
|
|
15
|
-
error: '
|
|
15
|
+
error: 'Error',
|
|
16
16
|
readmore: 'Read more',
|
|
17
|
-
home: '
|
|
17
|
+
home: 'Home',
|
|
18
18
|
blog: 'Blog',
|
|
19
19
|
blogPageTitle: 'Blog',
|
|
20
20
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
@@ -23,43 +23,43 @@ const TRANSLATIONS$1 = {
|
|
|
23
23
|
fr: {
|
|
24
24
|
error: 'Error',
|
|
25
25
|
readmore: 'Read more',
|
|
26
|
-
home: '
|
|
26
|
+
home: 'Home',
|
|
27
27
|
blog: 'Blog',
|
|
28
28
|
blogPageTitle: 'Blog',
|
|
29
29
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
30
30
|
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
31
31
|
},
|
|
32
32
|
ar: {
|
|
33
|
-
error: '
|
|
33
|
+
error: 'Error',
|
|
34
34
|
readmore: 'Read more',
|
|
35
|
-
home: '
|
|
36
|
-
blog: '
|
|
37
|
-
blogPageTitle: '
|
|
35
|
+
home: 'Home',
|
|
36
|
+
blog: 'Blog',
|
|
37
|
+
blogPageTitle: 'Blog',
|
|
38
38
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
39
39
|
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
40
40
|
},
|
|
41
41
|
hu: {
|
|
42
|
-
error: '
|
|
43
|
-
readmore: '
|
|
44
|
-
home: '
|
|
42
|
+
error: 'Error',
|
|
43
|
+
readmore: 'Read more',
|
|
44
|
+
home: 'Home',
|
|
45
45
|
blog: 'Blog',
|
|
46
46
|
blogPageTitle: 'Blog',
|
|
47
47
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
48
48
|
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
49
49
|
},
|
|
50
50
|
hr: {
|
|
51
|
-
error: '
|
|
52
|
-
readmore: '
|
|
53
|
-
home: '
|
|
51
|
+
error: 'Error',
|
|
52
|
+
readmore: 'Read more',
|
|
53
|
+
home: 'Home',
|
|
54
54
|
blog: 'Blog',
|
|
55
55
|
blogPageTitle: 'Blog',
|
|
56
56
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
57
57
|
emptyCategoryState: 'We haven’t published any posts in this category. Check back soon, or browse all our articles.',
|
|
58
58
|
},
|
|
59
59
|
'pt-br': {
|
|
60
|
-
error: '
|
|
61
|
-
readmore: '
|
|
62
|
-
home: '
|
|
60
|
+
error: 'Error',
|
|
61
|
+
readmore: 'Read more',
|
|
62
|
+
home: 'Home',
|
|
63
63
|
blog: 'Blog',
|
|
64
64
|
blogPageTitle: 'Blog',
|
|
65
65
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
@@ -67,8 +67,8 @@ const TRANSLATIONS$1 = {
|
|
|
67
67
|
},
|
|
68
68
|
'es-mx': {
|
|
69
69
|
error: 'Error',
|
|
70
|
-
readmore: '
|
|
71
|
-
home: '
|
|
70
|
+
readmore: 'Read more',
|
|
71
|
+
home: 'Home',
|
|
72
72
|
blog: 'Blog',
|
|
73
73
|
blogPageTitle: 'Blog',
|
|
74
74
|
emptyState: 'We haven’t published any posts yet. Check back soon.',
|
|
@@ -287,9 +287,10 @@ const getDevicePlatform = () => {
|
|
|
287
287
|
return 'mtWeb';
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
const blogArticlesGridCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-
|
|
290
|
+
const blogArticlesGridCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-typography);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-typography);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer:not(.Skeleton):hover .GridWrapper {\n background: color-mix(in srgb, var(--emw--color-white, #FFFFFF) 90%, #000);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible {\n outline: none;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible::after {\n border-radius: 15px;\n outline: 3px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: -3px;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n text-decoration: none;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}\n\n.BlogCardCategories {\n margin-bottom: 10px;\n}\n.BlogCardCategories .CategoryButton {\n position: relative;\n z-index: 3;\n padding: 4px 10px;\n color: inherit;\n font-size: 12px;\n}";
|
|
291
291
|
const BlogArticlesGridStyle0 = blogArticlesGridCss;
|
|
292
292
|
|
|
293
|
+
const ALL_CATEGORY_ID = 'all';
|
|
293
294
|
const BlogArticlesGrid = class {
|
|
294
295
|
constructor(hostRef) {
|
|
295
296
|
registerInstance(this, hostRef);
|
|
@@ -300,24 +301,24 @@ const BlogArticlesGrid = class {
|
|
|
300
301
|
nav#PaginationContainer {
|
|
301
302
|
justify-content: right;
|
|
302
303
|
}
|
|
303
|
-
.LeftItems
|
|
304
|
+
.LeftItems .PaginationControl .NavigationButton {
|
|
304
305
|
display: none;
|
|
305
306
|
}
|
|
306
|
-
.LeftItems
|
|
307
|
+
.LeftItems .PaginationControl:after, .RightItems .PaginationControl:after {
|
|
307
308
|
padding: 7px 12px;
|
|
308
309
|
font-size: 18px;
|
|
309
310
|
font-weight: 700;
|
|
310
311
|
line-height: 46px;
|
|
311
312
|
}
|
|
312
|
-
.LeftItems
|
|
313
|
+
.LeftItems .PaginationControl:after {
|
|
313
314
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E");
|
|
314
315
|
}
|
|
315
|
-
.RightItems
|
|
316
|
+
.RightItems .PaginationControl:after {
|
|
316
317
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
|
|
317
318
|
display: block;
|
|
318
319
|
height: 38px;
|
|
319
320
|
}
|
|
320
|
-
div.LeftItems
|
|
321
|
+
div.LeftItems .PaginationControl, div.RightItems .PaginationControl {
|
|
321
322
|
width: unset;
|
|
322
323
|
height: 40px;
|
|
323
324
|
background-color: #fff;
|
|
@@ -328,12 +329,12 @@ const BlogArticlesGrid = class {
|
|
|
328
329
|
background-color: #989898;
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
|
-
div.LeftItems
|
|
332
|
+
div.LeftItems .PaginationControl {
|
|
332
333
|
min-width: 60px;
|
|
333
334
|
border-radius: 20px 0 0 20px;
|
|
334
335
|
border-right: 0;
|
|
335
336
|
}
|
|
336
|
-
div.RightItems
|
|
337
|
+
div.RightItems .PaginationControl {
|
|
337
338
|
display: flex;
|
|
338
339
|
min-width: 100px;
|
|
339
340
|
justify-content: space-evenly;
|
|
@@ -341,7 +342,7 @@ const BlogArticlesGrid = class {
|
|
|
341
342
|
border-radius: 0 20px 20px 0;
|
|
342
343
|
text-transform: none;
|
|
343
344
|
}
|
|
344
|
-
.RightItems
|
|
345
|
+
.RightItems .PaginationControl .NavigationButton {
|
|
345
346
|
padding: 12px 0 12px 12px;
|
|
346
347
|
font-weight: 700;
|
|
347
348
|
}`;
|
|
@@ -399,7 +400,7 @@ const BlogArticlesGrid = class {
|
|
|
399
400
|
this.allBlogResponse = undefined;
|
|
400
401
|
this.totalBlogs = 0;
|
|
401
402
|
this.customTranslations = {};
|
|
402
|
-
this.selectedCategory =
|
|
403
|
+
this.selectedCategory = ALL_CATEGORY_ID;
|
|
403
404
|
this.categories = [];
|
|
404
405
|
}
|
|
405
406
|
getArticleId(event, post) {
|
|
@@ -465,7 +466,12 @@ const BlogArticlesGrid = class {
|
|
|
465
466
|
if (!this.pageQueryParam)
|
|
466
467
|
return;
|
|
467
468
|
const url = new URL(window.location.href);
|
|
468
|
-
|
|
469
|
+
if (pageNumber === 1) {
|
|
470
|
+
url.searchParams.delete(this.pageQueryParam);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
url.searchParams.set(this.pageQueryParam, String(pageNumber));
|
|
474
|
+
}
|
|
469
475
|
window.history.pushState(null, '', `${url.pathname}${url.search}${url.hash}`);
|
|
470
476
|
}
|
|
471
477
|
handleClientStylingChange(newValue, oldValue) {
|
|
@@ -509,6 +515,13 @@ const BlogArticlesGrid = class {
|
|
|
509
515
|
getActiveCategory() {
|
|
510
516
|
return this.categories.find(category => category.id === this.selectedCategory);
|
|
511
517
|
}
|
|
518
|
+
getCategorySlug(category) {
|
|
519
|
+
return category.slug || category.name.toLowerCase().replace(/\s+/g, '-');
|
|
520
|
+
}
|
|
521
|
+
getCategoryHref(category) {
|
|
522
|
+
const blogPath = `/${encodeURIComponent(this.language)}/blog`;
|
|
523
|
+
return category.id === ALL_CATEGORY_ID ? blogPath : `${blogPath}/category/${encodeURIComponent(this.getCategorySlug(category))}`;
|
|
524
|
+
}
|
|
512
525
|
sortArticlesByDate(blogItems) {
|
|
513
526
|
blogItems.sort((a, b) => {
|
|
514
527
|
if (a.publishingDate > b.publishingDate)
|
|
@@ -539,12 +552,11 @@ const BlogArticlesGrid = class {
|
|
|
539
552
|
}
|
|
540
553
|
async fetchBlogPosts(page, allPosts = false) {
|
|
541
554
|
const url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);
|
|
542
|
-
if (this.
|
|
543
|
-
this.selectedCategory
|
|
544
|
-
this.selectedCategory !== 'all') {
|
|
555
|
+
if (this.selectedCategory &&
|
|
556
|
+
this.selectedCategory !== ALL_CATEGORY_ID) {
|
|
545
557
|
const category = this.categories.find(cat => cat.id == this.selectedCategory);
|
|
546
|
-
if (category
|
|
547
|
-
url.searchParams.append('category', category
|
|
558
|
+
if (category) {
|
|
559
|
+
url.searchParams.append('category', this.getCategorySlug(category));
|
|
548
560
|
}
|
|
549
561
|
}
|
|
550
562
|
url.searchParams.append('per_page', allPosts ? '300' : this.blogsLimit);
|
|
@@ -595,7 +607,7 @@ const BlogArticlesGrid = class {
|
|
|
595
607
|
const visibleCategories = categories.filter(category => { var _a; return !hiddenCategories.includes((_a = category.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()); });
|
|
596
608
|
this.categories = [
|
|
597
609
|
{
|
|
598
|
-
id:
|
|
610
|
+
id: ALL_CATEGORY_ID,
|
|
599
611
|
name: 'All',
|
|
600
612
|
},
|
|
601
613
|
...visibleCategories,
|
|
@@ -656,13 +668,10 @@ const BlogArticlesGrid = class {
|
|
|
656
668
|
}
|
|
657
669
|
async componentWillLoad() {
|
|
658
670
|
var _a;
|
|
659
|
-
if (this.
|
|
671
|
+
if (this.cmsEndpoint && this.language) {
|
|
660
672
|
await this.fetchCategories();
|
|
661
673
|
if (this.category) {
|
|
662
|
-
const category = this.categories.find(cat =>
|
|
663
|
-
var _a;
|
|
664
|
-
return ((_a = cat.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().replace(/\s+/g, '-')) === this.category;
|
|
665
|
-
});
|
|
674
|
+
const category = this.categories.find(cat => cat.id !== ALL_CATEGORY_ID && this.getCategorySlug(cat) === this.category);
|
|
666
675
|
if (category) {
|
|
667
676
|
this.selectedCategory = category.id;
|
|
668
677
|
this.emitActiveCategory();
|
|
@@ -687,14 +696,21 @@ const BlogArticlesGrid = class {
|
|
|
687
696
|
const category = this.categories.find(cat => cat.id === this.selectedCategory);
|
|
688
697
|
window.postMessage({
|
|
689
698
|
type: 'BlogArticlesActiveCategory',
|
|
690
|
-
category: this.selectedCategory ===
|
|
699
|
+
category: this.selectedCategory === ALL_CATEGORY_ID
|
|
691
700
|
? null
|
|
692
701
|
: category === null || category === void 0 ? void 0 : category.name,
|
|
693
|
-
|
|
702
|
+
categorySlug: category && this.selectedCategory !== ALL_CATEGORY_ID ? this.getCategorySlug(category) : null,
|
|
703
|
+
metadata: this.selectedCategory === ALL_CATEGORY_ID
|
|
694
704
|
? null
|
|
695
705
|
: (_a = category === null || category === void 0 ? void 0 : category.metadata) !== null && _a !== void 0 ? _a : null,
|
|
696
706
|
}, window.location.href);
|
|
697
707
|
}
|
|
708
|
+
handleCategoryClick(event, categoryId) {
|
|
709
|
+
if (!this.usePostmessage || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
710
|
+
return;
|
|
711
|
+
event.preventDefault();
|
|
712
|
+
this.handleCategoryChange(categoryId);
|
|
713
|
+
}
|
|
698
714
|
async handleCategoryChange(categoryId) {
|
|
699
715
|
if (this.isLoading || this.selectedCategory === categoryId) {
|
|
700
716
|
return;
|
|
@@ -742,7 +758,7 @@ const BlogArticlesGrid = class {
|
|
|
742
758
|
}
|
|
743
759
|
formatDate(dateString) {
|
|
744
760
|
const date = this.parseDate(dateString);
|
|
745
|
-
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(date);
|
|
761
|
+
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
|
|
746
762
|
}
|
|
747
763
|
render() {
|
|
748
764
|
var _a;
|
|
@@ -758,21 +774,28 @@ const BlogArticlesGrid = class {
|
|
|
758
774
|
const showPagination = Boolean(this.paginationActive) && this.totalBlogs > +this.blogsLimit;
|
|
759
775
|
const paginationClientStyling = !this.mbSource ? (this.clientStyling || this.paginationDefaultStyling) : undefined;
|
|
760
776
|
const activeCategory = this.getActiveCategory();
|
|
761
|
-
return (h("div", { ref: el => this.stylingContainer = el }, this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: `/${encodeURIComponent(this.language)}` }, translate$1('home', this.language, this.customTranslations)), h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
777
|
+
return (h("div", { ref: el => this.stylingContainer = el }, this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: `/${encodeURIComponent(this.language)}` }, translate$1('home', this.language, this.customTranslations)), h("span", { "aria-hidden": "true" }, "\u203A"), activeCategory && this.selectedCategory !== ALL_CATEGORY_ID ? [
|
|
778
|
+
h("a", { href: `/${encodeURIComponent(this.language)}/blog` }, translate$1('blog', this.language, this.customTranslations)),
|
|
779
|
+
h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
780
|
+
h("span", { "aria-current": "page" }, activeCategory.name),
|
|
781
|
+
] : h("span", { "aria-current": "page" }, translate$1('blog', this.language, this.customTranslations)))), this.showPageTitle && h("h1", { class: "BlogPageTitle" }, " ", this.selectedCategory !== ALL_CATEGORY_ID ? activeCategory === null || activeCategory === void 0 ? void 0 : activeCategory.name : translate$1('blogPageTitle', this.language, this.customTranslations), " "), this.selectedCategory !== ALL_CATEGORY_ID &&
|
|
762
782
|
(activeCategory === null || activeCategory === void 0 ? void 0 : activeCategory.description) && (h("div", { class: "BlogPageDescription", innerHTML: activeCategory.description })), h("div", { class: "BlogPageContainer" }, this.showBlogSubcategories &&
|
|
763
|
-
h("div", { class: "BlogCategoriesSliderWrapper" }, h("div", { class: "CarouselWrapper" }, h("div", { class: "CarouselContainer" }, h("div", { class: "BlogCategoriesWrapper" }, h("div", { class: "CategoryButtons" }, this.categories.map(category => (h("
|
|
783
|
+
h("div", { class: "BlogCategoriesSliderWrapper" }, h("div", { class: "CarouselWrapper" }, h("div", { class: "CarouselContainer" }, h("div", { class: "BlogCategoriesWrapper" }, h("div", { class: "CategoryButtons" }, this.categories.map(category => (h("a", { href: this.getCategoryHref(category), "aria-current": this.selectedCategory === category.id ? 'page' : undefined, key: category.id, class: {
|
|
764
784
|
CategoryButton: true,
|
|
765
785
|
active: this.selectedCategory === category.id,
|
|
766
|
-
}, onClick: ()
|
|
767
|
-
this.handleCategoryChange(category.id);
|
|
768
|
-
} }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === 'all' ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
|
|
786
|
+
}, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
|
|
769
787
|
h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
|
|
770
788
|
var _a, _b;
|
|
771
|
-
|
|
772
|
-
|
|
789
|
+
const cardCategories = this.categories.filter(category => {
|
|
790
|
+
var _a;
|
|
791
|
+
return category.id !== ALL_CATEGORY_ID
|
|
792
|
+
&& ((_a = data.blogCategory) === null || _a === void 0 ? void 0 : _a.includes(this.getCategorySlug(category)));
|
|
793
|
+
});
|
|
794
|
+
return (h("div", { key: data.postID, class: data.isFeaturedPost ? 'GridContainer FeaturedPost' : 'GridContainer' }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, this.showPublishingDate &&
|
|
795
|
+
h("div", { class: "BlogDate" }, h("time", { dateTime: data.publishingDate }, this.formatDate(data.publishingDate))), this.showImage && ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { class: "VisualContent", src: this.setImage(data.image), alt: data.image.alt || data.title, width: "400", height: "225", loading: "lazy" })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { class: "VisualContent", src: data.video.sources[this.device] })) : (h("span", { class: "VisualContent", style: { color: "#fff" } }, "No Image")))), h("div", { class: "GridSector" }, cardCategories.length > 0 && h("div", { class: "CategoryButtons BlogCardCategories" }, cardCategories.map(category => (h("a", { class: "CategoryButton", href: this.getCategoryHref(category), onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))), this.showTitle &&
|
|
773
796
|
h("h2", { class: "BlogTitle" }, h("a", { class: "BlogCardLink", href: `/${encodeURIComponent(this.language)}/blog/${encodeURIComponent(data.customPath || data.slug)}`, onClick: event => this.getArticleId(event, data) }, data.title)), this.showContent &&
|
|
774
797
|
this.renderContentConditionally(data.descriptionPreview), this.showButton &&
|
|
775
|
-
h("span", { class: "BlogLink" }, translate$1('readmore', this.language, this.customTranslations)))));
|
|
798
|
+
h("span", { class: "BlogLink" }, translate$1('readmore', this.language, this.customTranslations))))));
|
|
776
799
|
})), (this.isLoading) &&
|
|
777
800
|
h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards))));
|
|
778
801
|
}
|
|
@@ -814,10 +837,10 @@ const TRANSLATIONS = {
|
|
|
814
837
|
lastPage: 'Last'
|
|
815
838
|
},
|
|
816
839
|
ro: {
|
|
817
|
-
firstPage: '
|
|
818
|
-
previousPage: '
|
|
819
|
-
nextPage: '
|
|
820
|
-
lastPage: '
|
|
840
|
+
firstPage: 'First',
|
|
841
|
+
previousPage: 'Previous',
|
|
842
|
+
nextPage: 'Next',
|
|
843
|
+
lastPage: 'Last'
|
|
821
844
|
},
|
|
822
845
|
fr: {
|
|
823
846
|
firstPage: 'First',
|
|
@@ -834,14 +857,14 @@ const TRANSLATIONS = {
|
|
|
834
857
|
hu: {
|
|
835
858
|
firstPage: 'First',
|
|
836
859
|
previousPage: 'Previous',
|
|
837
|
-
nextPage: '
|
|
860
|
+
nextPage: 'Next',
|
|
838
861
|
lastPage: 'Last'
|
|
839
862
|
},
|
|
840
863
|
hr: {
|
|
841
|
-
firstPage: '
|
|
842
|
-
previousPage: '
|
|
843
|
-
nextPage: '
|
|
844
|
-
lastPage: '
|
|
864
|
+
firstPage: 'First',
|
|
865
|
+
previousPage: 'Previous',
|
|
866
|
+
nextPage: 'Next',
|
|
867
|
+
lastPage: 'Last'
|
|
845
868
|
}
|
|
846
869
|
};
|
|
847
870
|
const translate = (key, customLang) => {
|
|
@@ -849,7 +872,7 @@ const translate = (key, customLang) => {
|
|
|
849
872
|
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
850
873
|
};
|
|
851
874
|
|
|
852
|
-
const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems
|
|
875
|
+
const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
|
|
853
876
|
const HelperPaginationStyle0 = helperPaginationCss;
|
|
854
877
|
|
|
855
878
|
const HelperPagination = class {
|
|
@@ -960,7 +983,10 @@ const HelperPagination = class {
|
|
|
960
983
|
/**
|
|
961
984
|
* Construct numbered navigation area based on current page position
|
|
962
985
|
*/
|
|
963
|
-
if (this.
|
|
986
|
+
if (this.endInt < 4) {
|
|
987
|
+
this.pagesArray = Array.from({ length: this.endInt + 1 }, (_, i) => i + 1);
|
|
988
|
+
}
|
|
989
|
+
else if (this.currentPage == 1 || this.currentPage == 2) {
|
|
964
990
|
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
965
991
|
this.pagesArray.push('...');
|
|
966
992
|
}
|
|
@@ -994,8 +1020,24 @@ const HelperPagination = class {
|
|
|
994
1020
|
if (!this.pageQueryParam)
|
|
995
1021
|
return '#';
|
|
996
1022
|
const url = new URL(window.location.href);
|
|
997
|
-
|
|
998
|
-
|
|
1023
|
+
const pageNumber = page + this.page - 1;
|
|
1024
|
+
if (pageNumber === 1) {
|
|
1025
|
+
url.searchParams.delete(this.pageQueryParam);
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
url.searchParams.set(this.pageQueryParam, String(pageNumber));
|
|
1029
|
+
}
|
|
1030
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
1031
|
+
}
|
|
1032
|
+
renderNavigationButton(page, navigation, enabled, rel) {
|
|
1033
|
+
const Tag = enabled ? 'a' : 'span';
|
|
1034
|
+
const label = translate(navigation, this.language);
|
|
1035
|
+
return (h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
|
|
1036
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
1037
|
+
return;
|
|
1038
|
+
event.preventDefault();
|
|
1039
|
+
this.navigateTo(navigation);
|
|
1040
|
+
} : undefined }, h("span", { class: "NavigationButton" }, label), h("span", { class: "NavigationIcon" })));
|
|
999
1041
|
}
|
|
1000
1042
|
render() {
|
|
1001
1043
|
/**
|
|
@@ -1006,6 +1048,8 @@ const HelperPagination = class {
|
|
|
1006
1048
|
? Math.max(1, this.currentPage - 5)
|
|
1007
1049
|
: Math.min(this.endInt + 1, this.currentPage + 5);
|
|
1008
1050
|
return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("a", { href: this.pageHref(page), "aria-current": item === this.currentPage ? 'page' : undefined, "aria-disabled": item === this.currentPage ? 'true' : undefined, tabIndex: item === this.currentPage ? -1 : undefined, onClick: event => {
|
|
1051
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
1052
|
+
return;
|
|
1009
1053
|
event.preventDefault();
|
|
1010
1054
|
if (item !== this.currentPage)
|
|
1011
1055
|
this.paginationNavigation(item, index);
|
|
@@ -1014,45 +1058,11 @@ const HelperPagination = class {
|
|
|
1014
1058
|
/**
|
|
1015
1059
|
* Left navigation area
|
|
1016
1060
|
*/
|
|
1017
|
-
|
|
1018
|
-
event.preventDefault();
|
|
1019
|
-
if (this.prevPage)
|
|
1020
|
-
this.navigateTo('firstPage');
|
|
1021
|
-
} }, h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
1022
|
-
let buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
1023
|
-
event.preventDefault();
|
|
1024
|
-
if (this.prevPage)
|
|
1025
|
-
this.navigateTo('previousPage');
|
|
1026
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
1027
|
-
if (isMobile(this.userAgent)) {
|
|
1028
|
-
buttonsLeftSide =
|
|
1029
|
-
h("div", { class: "LeftItems" }, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
1030
|
-
event.preventDefault();
|
|
1031
|
-
if (this.prevPage)
|
|
1032
|
-
this.navigateTo('previousPage');
|
|
1033
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
1034
|
-
}
|
|
1061
|
+
const buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && this.renderNavigationButton(1, 'firstPage', Boolean(this.prevPage)), this.renderNavigationButton(this.currentPage - 1, 'previousPage', Boolean(this.prevPage), 'prev'));
|
|
1035
1062
|
/**
|
|
1036
1063
|
* Right navigation area
|
|
1037
1064
|
*/
|
|
1038
|
-
|
|
1039
|
-
event.preventDefault();
|
|
1040
|
-
if (this.nextPage)
|
|
1041
|
-
this.navigateTo('lastPage');
|
|
1042
|
-
} }, h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
1043
|
-
let buttonsRightSide = h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
1044
|
-
event.preventDefault();
|
|
1045
|
-
if (this.nextPage)
|
|
1046
|
-
this.navigateTo('nextPage');
|
|
1047
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
|
|
1048
|
-
if (isMobile(this.userAgent)) {
|
|
1049
|
-
buttonsRightSide =
|
|
1050
|
-
h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
1051
|
-
event.preventDefault();
|
|
1052
|
-
if (this.nextPage)
|
|
1053
|
-
this.navigateTo('nextPage');
|
|
1054
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
1055
|
-
}
|
|
1065
|
+
const buttonsRightSide = h("div", { class: "RightItems" }, this.renderNavigationButton(this.currentPage + 1, 'nextPage', Boolean(this.nextPage), 'next'), this.secondaryArrowsActive && this.renderNavigationButton(this.endInt + 1, 'lastPage', Boolean(this.nextPage)));
|
|
1056
1066
|
return (h("nav", { id: "PaginationContainer", class: "PaginationContainer", "aria-label": "Blog pagination", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
1057
1067
|
}
|
|
1058
1068
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'blog-articles-grid';
|
|
2
|
-
const BUILD = /* blog-articles-grid */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional:
|
|
2
|
+
const BUILD = /* blog-articles-grid */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -259,6 +259,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
+
if (typeof nodeName === "function") {
|
|
263
|
+
return nodeName(
|
|
264
|
+
vnodeData === null ? {} : vnodeData,
|
|
265
|
+
vNodeChildren,
|
|
266
|
+
vdomFnUtils
|
|
267
|
+
);
|
|
268
|
+
}
|
|
262
269
|
const vnode = newVNode(nodeName, null);
|
|
263
270
|
vnode.$attrs$ = vnodeData;
|
|
264
271
|
if (vNodeChildren.length > 0) {
|
|
@@ -287,6 +294,36 @@ var newVNode = (tag, text) => {
|
|
|
287
294
|
};
|
|
288
295
|
var Host = {};
|
|
289
296
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
297
|
+
var vdomFnUtils = {
|
|
298
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
299
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
300
|
+
};
|
|
301
|
+
var convertToPublic = (node) => ({
|
|
302
|
+
vattrs: node.$attrs$,
|
|
303
|
+
vchildren: node.$children$,
|
|
304
|
+
vkey: node.$key$,
|
|
305
|
+
vname: node.$name$,
|
|
306
|
+
vtag: node.$tag$,
|
|
307
|
+
vtext: node.$text$
|
|
308
|
+
});
|
|
309
|
+
var convertToPrivate = (node) => {
|
|
310
|
+
if (typeof node.vtag === "function") {
|
|
311
|
+
const vnodeData = { ...node.vattrs };
|
|
312
|
+
if (node.vkey) {
|
|
313
|
+
vnodeData.key = node.vkey;
|
|
314
|
+
}
|
|
315
|
+
if (node.vname) {
|
|
316
|
+
vnodeData.name = node.vname;
|
|
317
|
+
}
|
|
318
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
319
|
+
}
|
|
320
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
321
|
+
vnode.$attrs$ = node.vattrs;
|
|
322
|
+
vnode.$children$ = node.vchildren;
|
|
323
|
+
vnode.$key$ = node.vkey;
|
|
324
|
+
vnode.$name$ = node.vname;
|
|
325
|
+
return vnode;
|
|
326
|
+
};
|
|
290
327
|
var parsePropertyValue = (propValue, propType) => {
|
|
291
328
|
if (propValue != null && !isComplexType(propValue)) {
|
|
292
329
|
if (propType & 4 /* Boolean */) {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-6b3cf3ac.js';
|
|
2
|
+
export { s as setNonce } from './index-6b3cf3ac.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -137,7 +137,7 @@ export declare class BlogArticlesGrid {
|
|
|
137
137
|
private customTranslations;
|
|
138
138
|
lastPage: number;
|
|
139
139
|
private isInitialized;
|
|
140
|
-
selectedCategory:
|
|
140
|
+
selectedCategory: BlogCategory['id'];
|
|
141
141
|
categories: BlogCategory[];
|
|
142
142
|
handleBannerReady(): void;
|
|
143
143
|
watchEndpoint(newValue: string, oldValue: string): void;
|
|
@@ -159,6 +159,8 @@ export declare class BlogArticlesGrid {
|
|
|
159
159
|
}>): void;
|
|
160
160
|
private announcePage;
|
|
161
161
|
private getActiveCategory;
|
|
162
|
+
private getCategorySlug;
|
|
163
|
+
private getCategoryHref;
|
|
162
164
|
sortArticlesByDate(blogItems: BlogPost[]): BlogPost[];
|
|
163
165
|
findLatestFeatured(blogItems: BlogPost[]): BlogPost;
|
|
164
166
|
moveLatestFeatureToStart(blogItems: BlogPost[], latestFeatured: BlogPost | null): BlogPost[];
|
|
@@ -167,7 +169,8 @@ export declare class BlogArticlesGrid {
|
|
|
167
169
|
getBlogArticleGrid(forceFetch?: boolean, page?: number): Promise<void>;
|
|
168
170
|
componentWillLoad(): Promise<void>;
|
|
169
171
|
emitActiveCategory(): void;
|
|
170
|
-
|
|
172
|
+
private handleCategoryClick;
|
|
173
|
+
handleCategoryChange(categoryId: BlogCategory['id']): Promise<void>;
|
|
171
174
|
handleClientStyling(): void;
|
|
172
175
|
componentDidLoad(): void;
|
|
173
176
|
disconnectedCallback(): void;
|