@everymatrix/blog-article-details 1.99.26 → 1.99.28
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.entry.js +1 -1
- package/dist/blog-article-details/blog-article-details.esm.js +1 -1
- package/dist/blog-article-details/index-39cf8680.js +2 -0
- package/dist/cjs/blog-article-details.cjs.entry.js +165 -38
- package/dist/cjs/blog-article-details.cjs.js +2 -2
- package/dist/cjs/{index-5d8e9655.js → index-566a22cc.js} +1 -22
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/blog-article-details/blog-article-details.css +82 -1
- package/dist/collection/components/blog-article-details/blog-article-details.js +187 -26
- package/dist/collection/utils/locale.utils.js +39 -11
- package/dist/esm/blog-article-details.entry.js +165 -38
- package/dist/esm/blog-article-details.js +3 -3
- package/dist/esm/{index-f613f8e8.js → index-39cf8680.js} +1 -22
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/blog-article-details/blog-article-details.d.ts +20 -1
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
- package/dist/blog-article-details/index-f613f8e8.js +0 -2
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
gap: 0.5rem;
|
|
10
10
|
max-width: 1300px;
|
|
11
|
+
margin-bottom: 30px;
|
|
11
12
|
}
|
|
12
13
|
.breadcrumb a {
|
|
13
14
|
color: inherit;
|
|
@@ -15,12 +16,16 @@
|
|
|
15
16
|
|
|
16
17
|
.DetailsContainer {
|
|
17
18
|
background-color: #07072A;
|
|
19
|
+
position: relative;
|
|
18
20
|
color: #fff;
|
|
19
21
|
display: flex;
|
|
20
22
|
flex-direction: column;
|
|
21
23
|
}
|
|
22
|
-
.DetailsContainer .BlogBanner
|
|
24
|
+
.DetailsContainer .BlogBanner img {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
23
27
|
height: 400px;
|
|
28
|
+
object-fit: cover;
|
|
24
29
|
}
|
|
25
30
|
.DetailsContainer .DetailsHeadWrapper {
|
|
26
31
|
position: relative;
|
|
@@ -44,6 +49,21 @@
|
|
|
44
49
|
.DetailsContainer .BlogTitle {
|
|
45
50
|
font-size: 24px;
|
|
46
51
|
}
|
|
52
|
+
.DetailsContainer .BlogCategoryPills {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
}
|
|
57
|
+
.DetailsContainer .BlogCategoryLink {
|
|
58
|
+
position: relative;
|
|
59
|
+
z-index: 3;
|
|
60
|
+
padding: 4px 12px;
|
|
61
|
+
border: 1px solid currentColor;
|
|
62
|
+
border-radius: 999px;
|
|
63
|
+
color: inherit;
|
|
64
|
+
font-size: 12px;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
}
|
|
47
67
|
.DetailsContainer .BlogContent {
|
|
48
68
|
font-size: 14px;
|
|
49
69
|
}
|
|
@@ -51,6 +71,67 @@
|
|
|
51
71
|
margin-bottom: 0;
|
|
52
72
|
}
|
|
53
73
|
|
|
74
|
+
.BackButton {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 30px;
|
|
77
|
+
left: 30px;
|
|
78
|
+
z-index: 2;
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
align-items: center;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
min-width: 100px;
|
|
84
|
+
height: 32px;
|
|
85
|
+
padding: 0 12px;
|
|
86
|
+
border: none;
|
|
87
|
+
border-radius: 5px;
|
|
88
|
+
background: var(--emw--color-primary, #524e52);
|
|
89
|
+
color: var(--emw--color-typography-contrast, #fff);
|
|
90
|
+
font: inherit;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
text-align: center;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
transition: all 0.1s linear;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {
|
|
99
|
+
position: static;
|
|
100
|
+
align-self: flex-start;
|
|
101
|
+
margin: 30px 30px 16px;
|
|
102
|
+
}
|
|
103
|
+
.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {
|
|
104
|
+
position: static;
|
|
105
|
+
display: block;
|
|
106
|
+
margin-left: 30px;
|
|
107
|
+
}
|
|
108
|
+
.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.AdjacentPosts {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-wrap: wrap;
|
|
115
|
+
justify-content: space-between;
|
|
116
|
+
gap: 20px;
|
|
117
|
+
padding: 30px;
|
|
118
|
+
}
|
|
119
|
+
.AdjacentPosts a {
|
|
120
|
+
flex: 1 1 250px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.AdjacentPosts a {
|
|
124
|
+
color: var(--emw--color-primary, #fff);
|
|
125
|
+
font: inherit;
|
|
126
|
+
text-decoration: underline;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.BackButton:focus-visible,
|
|
130
|
+
.AdjacentPosts a:focus-visible {
|
|
131
|
+
outline: 2px solid var(--emw--color-primary, #fff);
|
|
132
|
+
outline-offset: 3px;
|
|
133
|
+
}
|
|
134
|
+
|
|
54
135
|
@container (max-width: 475px) {
|
|
55
136
|
.DetailsContainer {
|
|
56
137
|
font-size: 12px;
|
|
@@ -4,6 +4,8 @@ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../.
|
|
|
4
4
|
import { getDevicePlatform, getDeviceType } from "../../../../../../../../libs/common/src/device/index";
|
|
5
5
|
export class BlogArticleDetails {
|
|
6
6
|
constructor() {
|
|
7
|
+
this.articleRequest = 0;
|
|
8
|
+
this.neighboursRequest = 0;
|
|
7
9
|
this.renderContentConditionally = (content) => {
|
|
8
10
|
if (!content)
|
|
9
11
|
return null;
|
|
@@ -13,21 +15,6 @@ export class BlogArticleDetails {
|
|
|
13
15
|
}
|
|
14
16
|
return null;
|
|
15
17
|
};
|
|
16
|
-
this.setImage = (image) => {
|
|
17
|
-
let source = '';
|
|
18
|
-
switch (this.device) {
|
|
19
|
-
case 'mobile':
|
|
20
|
-
source = image.sources[0].pictureSource;
|
|
21
|
-
break;
|
|
22
|
-
case 'tablet':
|
|
23
|
-
source = image.sources[1].pictureSource;
|
|
24
|
-
break;
|
|
25
|
-
case 'desktop':
|
|
26
|
-
source = image.sources[2].pictureSource;
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
return source;
|
|
30
|
-
};
|
|
31
18
|
this.cmsEndpoint = undefined;
|
|
32
19
|
this.language = 'en';
|
|
33
20
|
this.userRoles = 'everyone';
|
|
@@ -39,7 +26,10 @@ export class BlogArticleDetails {
|
|
|
39
26
|
this.showImage = true;
|
|
40
27
|
this.showTitle = true;
|
|
41
28
|
this.showBreadcrumb = false;
|
|
29
|
+
this.hideCategory = '';
|
|
42
30
|
this.showContent = true;
|
|
31
|
+
this.showMoreArticles = false;
|
|
32
|
+
this.showBackButton = false;
|
|
43
33
|
this.postId = undefined;
|
|
44
34
|
this.postSlug = undefined;
|
|
45
35
|
this.postCustomPath = undefined;
|
|
@@ -48,15 +38,30 @@ export class BlogArticleDetails {
|
|
|
48
38
|
this.isLoading = true;
|
|
49
39
|
this.bannerMatrixReady = false;
|
|
50
40
|
this.device = 'mobile';
|
|
41
|
+
this.categories = [];
|
|
42
|
+
this.neighbours = {};
|
|
51
43
|
}
|
|
52
44
|
// Rerender when bannermatrix has finished loaded. Issue when bannermatrix passed as content from CMS.
|
|
53
45
|
handleBannerReady() {
|
|
54
46
|
this.bannerMatrixReady = true;
|
|
55
47
|
}
|
|
56
48
|
watchEndpoint(newValue, oldValue) {
|
|
57
|
-
if (newValue
|
|
49
|
+
if (newValue === oldValue)
|
|
50
|
+
return;
|
|
51
|
+
if (this.cmsEndpoint && this.language && (this.postCustomPath || this.postSlug || this.postId)) {
|
|
58
52
|
this.getBlogArticleDetails();
|
|
59
53
|
}
|
|
54
|
+
else {
|
|
55
|
+
this.articleRequest++;
|
|
56
|
+
this.categories = [];
|
|
57
|
+
this.neighbours = {};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
handleMoreArticlesChange() {
|
|
61
|
+
this.neighboursRequest++;
|
|
62
|
+
this.neighbours = {};
|
|
63
|
+
if (this.showMoreArticles && !this.isLoading && this.blogData)
|
|
64
|
+
this.fetchMoreArticles(this.articleRequest);
|
|
60
65
|
}
|
|
61
66
|
handleClientStylingChange(newValue, oldValue) {
|
|
62
67
|
if (newValue !== oldValue) {
|
|
@@ -79,6 +84,11 @@ export class BlogArticleDetails {
|
|
|
79
84
|
this.hasErrors = true;
|
|
80
85
|
throw new Error('postId, postSlug or postCustomPath parameter has to be provided!');
|
|
81
86
|
}
|
|
87
|
+
const request = ++this.articleRequest;
|
|
88
|
+
this.categories = [];
|
|
89
|
+
this.neighbours = {};
|
|
90
|
+
this.neighboursRequest++;
|
|
91
|
+
this.hasErrors = false;
|
|
82
92
|
this.isLoading = true;
|
|
83
93
|
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath ? '' : '/' + (this.postSlug || this.postId)}`);
|
|
84
94
|
url.searchParams.append('env', this.cmsEnv);
|
|
@@ -87,15 +97,17 @@ export class BlogArticleDetails {
|
|
|
87
97
|
if (this.postCustomPath) {
|
|
88
98
|
url.searchParams.append('customURL', this.postCustomPath);
|
|
89
99
|
}
|
|
100
|
+
this.fetchCategories(request);
|
|
90
101
|
fetch(url.href)
|
|
91
102
|
.then((res) => {
|
|
92
103
|
if (res.status >= 300) {
|
|
93
|
-
this.hasErrors = true;
|
|
94
104
|
throw new Error('There was an error while fetching the data');
|
|
95
105
|
}
|
|
96
106
|
return res.json();
|
|
97
107
|
})
|
|
98
108
|
.then((blogContent) => {
|
|
109
|
+
if (request !== this.articleRequest)
|
|
110
|
+
return;
|
|
99
111
|
if (blogContent.count >= 1 && this.postCustomPath) {
|
|
100
112
|
let firstBlogPublishDate = new Date(blogContent.items[0].publishingDate);
|
|
101
113
|
let indexOfLatestPublished = 0;
|
|
@@ -112,13 +124,80 @@ export class BlogArticleDetails {
|
|
|
112
124
|
this.blogData = blogContent;
|
|
113
125
|
}
|
|
114
126
|
;
|
|
115
|
-
this.
|
|
127
|
+
if (this.showMoreArticles)
|
|
128
|
+
this.fetchMoreArticles(request);
|
|
116
129
|
})
|
|
117
130
|
.catch((err) => {
|
|
131
|
+
if (request !== this.articleRequest)
|
|
132
|
+
return;
|
|
118
133
|
this.hasErrors = true;
|
|
119
134
|
console.log('Error', err);
|
|
120
135
|
})
|
|
121
|
-
.finally(() =>
|
|
136
|
+
.finally(() => {
|
|
137
|
+
if (request === this.articleRequest)
|
|
138
|
+
this.isLoading = false;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async fetchMoreArticles(articleRequest) {
|
|
142
|
+
var _a, _b, _c, _d, _e;
|
|
143
|
+
if (!this.cmsEndpoint || !this.language || !this.blogData || !this.showMoreArticles)
|
|
144
|
+
return;
|
|
145
|
+
const request = ++this.neighboursRequest;
|
|
146
|
+
const currentId = (_a = this.blogData) === null || _a === void 0 ? void 0 : _a.postID;
|
|
147
|
+
const currentPath = ((_b = this.blogData) === null || _b === void 0 ? void 0 : _b.customPath) || ((_c = this.blogData) === null || _c === void 0 ? void 0 : _c.slug) || this.postCustomPath || this.postSlug;
|
|
148
|
+
const posts = [];
|
|
149
|
+
const url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);
|
|
150
|
+
url.searchParams.set('per_page', '20');
|
|
151
|
+
url.searchParams.set('env', this.cmsEnv);
|
|
152
|
+
url.searchParams.set('userRoles', this.userRoles);
|
|
153
|
+
url.searchParams.set('device', getDevicePlatform());
|
|
154
|
+
try {
|
|
155
|
+
for (let page = 1; this.showMoreArticles && request === this.neighboursRequest && articleRequest === this.articleRequest; page++) {
|
|
156
|
+
url.searchParams.set('page', String(page));
|
|
157
|
+
const response = await fetch(url.href);
|
|
158
|
+
if (!response.ok)
|
|
159
|
+
throw new Error('Failed to fetch adjacent articles');
|
|
160
|
+
const data = await response.json();
|
|
161
|
+
if (!this.showMoreArticles || request !== this.neighboursRequest || articleRequest !== this.articleRequest)
|
|
162
|
+
return;
|
|
163
|
+
if (!Array.isArray(data === null || data === void 0 ? void 0 : data.items))
|
|
164
|
+
return;
|
|
165
|
+
posts.push(...data.items.filter(post => typeof ((post === null || post === void 0 ? void 0 : post.customPath) || (post === null || post === void 0 ? void 0 : post.slug)) === 'string' && (post.customPath || post.slug)));
|
|
166
|
+
const index = posts.findIndex(post => (currentId != null && post.postID === currentId) || (currentPath && (post.customPath || post.slug) === currentPath));
|
|
167
|
+
if (index >= 0 && (index < posts.length - 1 || !((_d = data.pages) === null || _d === void 0 ? void 0 : _d.next))) {
|
|
168
|
+
this.neighbours = { previous: posts[index + 1], next: posts[index - 1] };
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (!((_e = data.pages) === null || _e === void 0 ? void 0 : _e.next))
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
console.error('Error fetching adjacent articles', error);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async fetchCategories(request) {
|
|
180
|
+
try {
|
|
181
|
+
const response = await fetch(`${this.cmsEndpoint}/${this.language}/blog-posts/category`);
|
|
182
|
+
if (!response.ok)
|
|
183
|
+
throw new Error('Failed to fetch categories');
|
|
184
|
+
const categories = await response.json();
|
|
185
|
+
if (request === this.articleRequest) {
|
|
186
|
+
const hiddenCategories = this.hideCategory
|
|
187
|
+
.split(',')
|
|
188
|
+
.map(value => value.trim().toLowerCase())
|
|
189
|
+
.filter(Boolean);
|
|
190
|
+
const visibleCategories = Array.isArray(categories)
|
|
191
|
+
? categories.filter(category => typeof (category === null || category === void 0 ? void 0 : category.name) === 'string' && category.name && typeof category.slug === 'string' && category.slug
|
|
192
|
+
&& !hiddenCategories.includes(category.name.toLowerCase()))
|
|
193
|
+
: [];
|
|
194
|
+
this.categories = visibleCategories;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (_a) {
|
|
198
|
+
if (request === this.articleRequest)
|
|
199
|
+
this.categories = [];
|
|
200
|
+
}
|
|
122
201
|
}
|
|
123
202
|
handleClientStyling() {
|
|
124
203
|
if (window.emMessageBus !== undefined) {
|
|
@@ -135,6 +214,8 @@ export class BlogArticleDetails {
|
|
|
135
214
|
this.handleClientStyling();
|
|
136
215
|
}
|
|
137
216
|
disconnectedCallback() {
|
|
217
|
+
this.articleRequest++;
|
|
218
|
+
this.neighboursRequest++;
|
|
138
219
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
139
220
|
}
|
|
140
221
|
detectAndAlertDeviceType() {
|
|
@@ -151,17 +232,32 @@ export class BlogArticleDetails {
|
|
|
151
232
|
}
|
|
152
233
|
formatDate(dateString) {
|
|
153
234
|
const date = this.parseDate(dateString);
|
|
154
|
-
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(date);
|
|
235
|
+
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
|
|
236
|
+
}
|
|
237
|
+
setImage(image) {
|
|
238
|
+
var _a, _b;
|
|
239
|
+
const sourceIndex = this.device === 'mobile' ? 0 : this.device === 'tablet' ? 1 : 2;
|
|
240
|
+
return (_b = (_a = image === null || image === void 0 ? void 0 : image.sources) === null || _a === void 0 ? void 0 : _a[sourceIndex]) === null || _b === void 0 ? void 0 : _b.pictureSource;
|
|
155
241
|
}
|
|
156
242
|
render() {
|
|
157
|
-
var _a, _b, _c, _d, _e, _f;
|
|
243
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
158
244
|
if (this.hasErrors) {
|
|
159
245
|
return (h("div", { class: "BlogArticleDetails" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
160
246
|
}
|
|
161
|
-
const homeUrl =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
247
|
+
const homeUrl = `/${encodeURIComponent(this.language)}`;
|
|
248
|
+
const categories = !this.isLoading && Array.isArray((_a = this.blogData) === null || _a === void 0 ? void 0 : _a.blogCategory)
|
|
249
|
+
? this.blogData.blogCategory.map(slug => this.categories.find(category => category.slug === slug)).filter(Boolean)
|
|
250
|
+
: [];
|
|
251
|
+
const primaryCategory = categories[0];
|
|
252
|
+
const image = (_b = this.blogData) === null || _b === void 0 ? void 0 : _b.image;
|
|
253
|
+
const imageSrc = this.setImage(image);
|
|
254
|
+
const { previous, next } = this.neighbours;
|
|
255
|
+
return (h("div", { ref: el => this.stylingContainer = el }, !this.isLoading && (h("div", { class: "DetailsContainer" }, this.showBackButton && (h("a", { class: "BackButton", href: `${homeUrl}/blog` }, "\u2190 ", translate('backToBlog', this.language))), h("div", { class: "DetailsHeadWrapper" }, this.showPublishingDate && this.blogData.publishingDate &&
|
|
256
|
+
h("time", { class: "BlogDate", dateTime: this.blogData.publishingDate }, this.formatDate(this.blogData.publishingDate)), this.showImage && (h("div", { class: `BlogBanner ${this.device}` }, imageSrc ? (h("img", { src: imageSrc, alt: (image === null || image === void 0 ? void 0 : image.alt) || '' })) : (((_d = (_c = this.blogData.video) === null || _c === void 0 ? void 0 : _c.sources) === null || _d === void 0 ? void 0 : _d[this.device]) ? (h("video", { src: this.blogData.video.sources[this.device], controls: true })) : (null))))), h("div", { class: "DetailsBodyWrapper" }, this.showTitle &&
|
|
257
|
+
h("div", { class: "BlogTitle" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title), this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: homeUrl }, translate('home', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), primaryCategory && [
|
|
258
|
+
h("a", { href: `${homeUrl}/blog/category/${encodeURIComponent(primaryCategory.slug)}` }, primaryCategory.name),
|
|
259
|
+
h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
260
|
+
], h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (h("div", { class: "BlogCategoryPills" }, categories.map(category => (h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.showContent && this.renderContentConditionally((_g = this.blogData) === null || _g === void 0 ? void 0 : _g.content)), this.showMoreArticles && (previous || next) && (h("nav", { class: "AdjacentPosts", "aria-label": translate('moreArticles', this.language) }, previous && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(previous.customPath || previous.slug || '')}`, rel: "prev" }, "\u2190 ", translate('previousArticle', this.language), ": ", previous.title || previous.customPath || previous.slug), next && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(next.customPath || next.slug || '')}`, rel: "next" }, translate('nextArticle', this.language), ": ", next.title || next.customPath || next.slug, " \u2192")))))));
|
|
165
261
|
}
|
|
166
262
|
static get is() { return "blog-article-details"; }
|
|
167
263
|
static get encapsulation() { return "shadow"; }
|
|
@@ -373,6 +469,24 @@ export class BlogArticleDetails {
|
|
|
373
469
|
"reflect": true,
|
|
374
470
|
"defaultValue": "false"
|
|
375
471
|
},
|
|
472
|
+
"hideCategory": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"mutable": false,
|
|
475
|
+
"complexType": {
|
|
476
|
+
"original": "string",
|
|
477
|
+
"resolved": "string",
|
|
478
|
+
"references": {}
|
|
479
|
+
},
|
|
480
|
+
"required": false,
|
|
481
|
+
"optional": false,
|
|
482
|
+
"docs": {
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": "Comma separated list of category names to hide, e.g. 'uncategorized, sports'"
|
|
485
|
+
},
|
|
486
|
+
"attribute": "hide-category",
|
|
487
|
+
"reflect": true,
|
|
488
|
+
"defaultValue": "''"
|
|
489
|
+
},
|
|
376
490
|
"showContent": {
|
|
377
491
|
"type": "boolean",
|
|
378
492
|
"mutable": false,
|
|
@@ -391,6 +505,42 @@ export class BlogArticleDetails {
|
|
|
391
505
|
"reflect": true,
|
|
392
506
|
"defaultValue": "true"
|
|
393
507
|
},
|
|
508
|
+
"showMoreArticles": {
|
|
509
|
+
"type": "boolean",
|
|
510
|
+
"mutable": false,
|
|
511
|
+
"complexType": {
|
|
512
|
+
"original": "boolean",
|
|
513
|
+
"resolved": "boolean",
|
|
514
|
+
"references": {}
|
|
515
|
+
},
|
|
516
|
+
"required": false,
|
|
517
|
+
"optional": false,
|
|
518
|
+
"docs": {
|
|
519
|
+
"tags": [],
|
|
520
|
+
"text": "Display previous and next article links."
|
|
521
|
+
},
|
|
522
|
+
"attribute": "show-more-articles",
|
|
523
|
+
"reflect": true,
|
|
524
|
+
"defaultValue": "false"
|
|
525
|
+
},
|
|
526
|
+
"showBackButton": {
|
|
527
|
+
"type": "boolean",
|
|
528
|
+
"mutable": false,
|
|
529
|
+
"complexType": {
|
|
530
|
+
"original": "boolean",
|
|
531
|
+
"resolved": "boolean",
|
|
532
|
+
"references": {}
|
|
533
|
+
},
|
|
534
|
+
"required": false,
|
|
535
|
+
"optional": false,
|
|
536
|
+
"docs": {
|
|
537
|
+
"tags": [],
|
|
538
|
+
"text": "Display the Back to blog link."
|
|
539
|
+
},
|
|
540
|
+
"attribute": "show-back-button",
|
|
541
|
+
"reflect": true,
|
|
542
|
+
"defaultValue": "false"
|
|
543
|
+
},
|
|
394
544
|
"postId": {
|
|
395
545
|
"type": "string",
|
|
396
546
|
"mutable": false,
|
|
@@ -467,7 +617,9 @@ export class BlogArticleDetails {
|
|
|
467
617
|
"hasErrors": {},
|
|
468
618
|
"isLoading": {},
|
|
469
619
|
"bannerMatrixReady": {},
|
|
470
|
-
"device": {}
|
|
620
|
+
"device": {},
|
|
621
|
+
"categories": {},
|
|
622
|
+
"neighbours": {}
|
|
471
623
|
};
|
|
472
624
|
}
|
|
473
625
|
static get watchers() {
|
|
@@ -486,6 +638,15 @@ export class BlogArticleDetails {
|
|
|
486
638
|
}, {
|
|
487
639
|
"propName": "language",
|
|
488
640
|
"methodName": "watchEndpoint"
|
|
641
|
+
}, {
|
|
642
|
+
"propName": "cmsEnv",
|
|
643
|
+
"methodName": "watchEndpoint"
|
|
644
|
+
}, {
|
|
645
|
+
"propName": "userRoles",
|
|
646
|
+
"methodName": "watchEndpoint"
|
|
647
|
+
}, {
|
|
648
|
+
"propName": "showMoreArticles",
|
|
649
|
+
"methodName": "handleMoreArticlesChange"
|
|
489
650
|
}, {
|
|
490
651
|
"propName": "clientStyling",
|
|
491
652
|
"methodName": "handleClientStylingChange"
|
|
@@ -4,36 +4,64 @@ const TRANSLATIONS = {
|
|
|
4
4
|
error: 'Error',
|
|
5
5
|
home: 'Home',
|
|
6
6
|
blog: 'Blog',
|
|
7
|
+
backToBlog: 'Back to blog',
|
|
8
|
+
moreArticles: 'More articles',
|
|
9
|
+
previousArticle: 'Previous article',
|
|
10
|
+
nextArticle: 'Next article',
|
|
7
11
|
},
|
|
8
12
|
ro: {
|
|
9
|
-
error: '
|
|
10
|
-
home: '
|
|
13
|
+
error: 'Error',
|
|
14
|
+
home: 'Home',
|
|
11
15
|
blog: 'Blog',
|
|
16
|
+
backToBlog: 'Back to blog',
|
|
17
|
+
moreArticles: 'More articles',
|
|
18
|
+
previousArticle: 'Previous article',
|
|
19
|
+
nextArticle: 'Next article',
|
|
12
20
|
},
|
|
13
21
|
fr: {
|
|
14
22
|
error: 'Error',
|
|
15
|
-
home: '
|
|
23
|
+
home: 'Home',
|
|
16
24
|
blog: 'Blog',
|
|
25
|
+
backToBlog: 'Back to blog',
|
|
26
|
+
moreArticles: 'More articles',
|
|
27
|
+
previousArticle: 'Previous article',
|
|
28
|
+
nextArticle: 'Next article',
|
|
17
29
|
},
|
|
18
30
|
ar: {
|
|
19
|
-
error: '
|
|
20
|
-
home: '
|
|
21
|
-
blog: '
|
|
31
|
+
error: 'Error',
|
|
32
|
+
home: 'Home',
|
|
33
|
+
blog: 'Blog',
|
|
34
|
+
backToBlog: 'Back to blog',
|
|
35
|
+
moreArticles: 'More articles',
|
|
36
|
+
previousArticle: 'Previous article',
|
|
37
|
+
nextArticle: 'Next article',
|
|
22
38
|
},
|
|
23
39
|
hr: {
|
|
24
|
-
error: '
|
|
25
|
-
home: '
|
|
40
|
+
error: 'Error',
|
|
41
|
+
home: 'Home',
|
|
26
42
|
blog: 'Blog',
|
|
43
|
+
backToBlog: 'Back to blog',
|
|
44
|
+
moreArticles: 'More articles',
|
|
45
|
+
previousArticle: 'Previous article',
|
|
46
|
+
nextArticle: 'Next article',
|
|
27
47
|
},
|
|
28
48
|
'pt-br': {
|
|
29
|
-
error: '
|
|
30
|
-
home: '
|
|
49
|
+
error: 'Error',
|
|
50
|
+
home: 'Home',
|
|
31
51
|
blog: 'Blog',
|
|
52
|
+
backToBlog: 'Back to blog',
|
|
53
|
+
moreArticles: 'More articles',
|
|
54
|
+
previousArticle: 'Previous article',
|
|
55
|
+
nextArticle: 'Next article',
|
|
32
56
|
},
|
|
33
57
|
'es-mx': {
|
|
34
58
|
error: 'Error',
|
|
35
|
-
home: '
|
|
59
|
+
home: 'Home',
|
|
36
60
|
blog: 'Blog',
|
|
61
|
+
backToBlog: 'Back to blog',
|
|
62
|
+
moreArticles: 'More articles',
|
|
63
|
+
previousArticle: 'Previous article',
|
|
64
|
+
nextArticle: 'Next article',
|
|
37
65
|
}
|
|
38
66
|
};
|
|
39
67
|
export const translate = (key, customLang) => {
|