@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.
- package/dist/blog-articles-grid/blog-articles-grid.esm.js +1 -0
- package/dist/blog-articles-grid/index.esm.js +0 -0
- package/dist/blog-articles-grid/p-786304d4.js +2 -0
- package/dist/blog-articles-grid/p-b88c9233.entry.js +1 -0
- package/dist/blog-articles-grid/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/blog-articles-grid.cjs.js +25 -0
- package/dist/cjs/blog-articles-grid_2.cjs.entry.js +623 -0
- package/dist/cjs/index-fad8e671.js +1332 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.css +167 -0
- package/dist/collection/components/blog-articles-grid/blog-articles-grid.js +740 -0
- package/dist/collection/components/blog-articles-grid/index.js +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +40 -0
- package/dist/collection/utils/utils.js +67 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/blog-articles-grid.js +20 -0
- package/dist/esm/blog-articles-grid_2.entry.js +618 -0
- package/dist/esm/index-2c19cd94.js +1305 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- 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
- 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
- package/dist/types/components/blog-articles-grid/blog-articles-grid.d.ts +117 -0
- package/dist/types/components/blog-articles-grid/index.d.ts +1 -0
- package/dist/types/components.d.ts +213 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +4 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +29 -0
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../utils/locale.utils";
|
|
3
|
+
import { getDevicePlatform, getDeviceCustom } from "../../utils/utils";
|
|
4
|
+
import "../../../../../helper-pagination/dist/types/index";
|
|
5
|
+
export class BlogArticlesGrid {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.clientStylingContent = '';
|
|
8
|
+
this.defaultStyling = `
|
|
9
|
+
div#PaginationContainer {
|
|
10
|
+
justify-content: right;
|
|
11
|
+
}
|
|
12
|
+
.LeftItems button .NavigationButton {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
.LeftItems button:after, .RightItems button:after {
|
|
16
|
+
padding: 7px 12px;
|
|
17
|
+
font-size: 18px;
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
line-height: 46px;
|
|
20
|
+
}
|
|
21
|
+
.LeftItems button:after {
|
|
22
|
+
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");
|
|
23
|
+
}
|
|
24
|
+
.RightItems button:after {
|
|
25
|
+
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");
|
|
26
|
+
display: block;
|
|
27
|
+
height: 38px;
|
|
28
|
+
}
|
|
29
|
+
div.LeftItems button, div.RightItems button {
|
|
30
|
+
width: unset;
|
|
31
|
+
height: 40px;
|
|
32
|
+
background-color: #fff;
|
|
33
|
+
color: #000;
|
|
34
|
+
border: 1px solid #000;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
&:disabled {
|
|
37
|
+
background-color: #989898;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
div.LeftItems button {
|
|
41
|
+
min-width: 60px;
|
|
42
|
+
border-radius: 20px 0 0 20px;
|
|
43
|
+
border-right: 0;
|
|
44
|
+
}
|
|
45
|
+
div.RightItems button {
|
|
46
|
+
display: flex;
|
|
47
|
+
min-width: 100px;
|
|
48
|
+
justify-content: space-evenly;
|
|
49
|
+
align-items: center;
|
|
50
|
+
border-radius: 0 20px 20px 0;
|
|
51
|
+
text-transform: none;
|
|
52
|
+
}
|
|
53
|
+
.RightItems button .NavigationButton {
|
|
54
|
+
padding: 12px 0 12px 12px;
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
}`;
|
|
57
|
+
this.setClientStyling = () => {
|
|
58
|
+
this.clientStylingContent += this.clientStyling;
|
|
59
|
+
const sheet = document.createElement('style');
|
|
60
|
+
sheet.innerHTML = this.clientStylingContent;
|
|
61
|
+
this.stylingContainer.prepend(sheet);
|
|
62
|
+
};
|
|
63
|
+
this.setImage = (image) => {
|
|
64
|
+
let source = '';
|
|
65
|
+
switch (this.device) {
|
|
66
|
+
case 'mobile':
|
|
67
|
+
source = image.sources[0].pictureSource;
|
|
68
|
+
break;
|
|
69
|
+
case 'tablet':
|
|
70
|
+
source = image.sources[1].pictureSource;
|
|
71
|
+
break;
|
|
72
|
+
case 'desktop':
|
|
73
|
+
source = image.sources[2].pictureSource;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
return source;
|
|
77
|
+
};
|
|
78
|
+
this.renderContentConditionally = (content) => {
|
|
79
|
+
if (!content)
|
|
80
|
+
return;
|
|
81
|
+
const hasBanner = content.indexOf('<bannermatrix-banner') !== -1;
|
|
82
|
+
if (!hasBanner) {
|
|
83
|
+
return h("div", { class: "BlogContent", innerHTML: content });
|
|
84
|
+
}
|
|
85
|
+
if (this.bannerMatrixReady) {
|
|
86
|
+
return h("div", { class: "BlogContent", innerHTML: content });
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
};
|
|
90
|
+
this.cmsEndpoint = undefined;
|
|
91
|
+
this.language = 'en';
|
|
92
|
+
this.userRoles = 'everyone';
|
|
93
|
+
this.cmsEnv = 'stage';
|
|
94
|
+
this.clientStyling = '';
|
|
95
|
+
this.clientStylingUrl = '';
|
|
96
|
+
this.showPublishingDate = true;
|
|
97
|
+
this.showImage = true;
|
|
98
|
+
this.showTitle = true;
|
|
99
|
+
this.showContent = true;
|
|
100
|
+
this.showButton = true;
|
|
101
|
+
this.usePostmessage = undefined;
|
|
102
|
+
this.postMessageEvent = '';
|
|
103
|
+
this.blogsLimit = '0';
|
|
104
|
+
this.paginationActive = undefined;
|
|
105
|
+
this.arrowsActive = undefined;
|
|
106
|
+
this.secondaryArrowsActive = undefined;
|
|
107
|
+
this.numberedNavActive = undefined;
|
|
108
|
+
this.intlDateTimeFormat = '';
|
|
109
|
+
this.page = '1';
|
|
110
|
+
this.paginationBlogList = {
|
|
111
|
+
offset: 0
|
|
112
|
+
};
|
|
113
|
+
this.currentPage = 0;
|
|
114
|
+
this.hasErrors = false;
|
|
115
|
+
this.isLoading = true;
|
|
116
|
+
this.bannerMatrixReady = false;
|
|
117
|
+
this.nextPage = '';
|
|
118
|
+
this.previousPage = '';
|
|
119
|
+
this.device = '';
|
|
120
|
+
this.blogData = undefined;
|
|
121
|
+
this.totalBlogs = 0;
|
|
122
|
+
}
|
|
123
|
+
getArticleId(postId, slug, customPath) {
|
|
124
|
+
if (this.usePostmessage) {
|
|
125
|
+
window.postMessage({ type: this.postMessageEvent, postId, slug, customPath });
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.articleActionButton.emit({ postId, slug, customPath });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Rerender when bannermatrix has finished loaded. Issue when bannermatrix passed as content from CMS.
|
|
132
|
+
handleBannerReady() {
|
|
133
|
+
this.bannerMatrixReady = true;
|
|
134
|
+
}
|
|
135
|
+
watchEndpoint(newValue, oldValue) {
|
|
136
|
+
this.currentPage = parseInt(this.page) - 1;
|
|
137
|
+
if (newValue && newValue != oldValue && this.cmsEndpoint && this.language) {
|
|
138
|
+
this.getBlogArticleGrid();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
handleStylingChange(newValue, oldValue) {
|
|
142
|
+
if (newValue !== oldValue) {
|
|
143
|
+
this.fetchClientStyling().then(_ => this.setClientStyling());
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
hpPageChange(event) {
|
|
147
|
+
var _a, _b;
|
|
148
|
+
this.paginationBlogList = event.detail;
|
|
149
|
+
this.currentPage = Math.floor(((_a = this.paginationBlogList) === null || _a === void 0 ? void 0 : _a.offset) / ((_b = this.paginationBlogList) === null || _b === void 0 ? void 0 : _b.limit));
|
|
150
|
+
if (this.page) {
|
|
151
|
+
this.currentPage = this.currentPage + +this.page - 1;
|
|
152
|
+
}
|
|
153
|
+
if (this.currentPage + 1 > this.lastPage) {
|
|
154
|
+
this.nextPage = null;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (this.currentPage < 0) {
|
|
158
|
+
this.previousPage = null;
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href);
|
|
162
|
+
this.getBlogArticleGrid();
|
|
163
|
+
}
|
|
164
|
+
sortArticlesByDate(arr) {
|
|
165
|
+
arr.sort((a, b) => {
|
|
166
|
+
if (a.publishingDate > b.publishingDate)
|
|
167
|
+
return -1;
|
|
168
|
+
if (a.publishingDate < b.publishingDate)
|
|
169
|
+
return 1;
|
|
170
|
+
return 0;
|
|
171
|
+
});
|
|
172
|
+
return arr;
|
|
173
|
+
}
|
|
174
|
+
findLatestFeatured(array) {
|
|
175
|
+
let featuredItems = array.filter(item => item.isFeaturedPost);
|
|
176
|
+
if (featuredItems.length === 0) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
featuredItems = this.sortArticlesByDate(featuredItems);
|
|
180
|
+
return featuredItems[0];
|
|
181
|
+
}
|
|
182
|
+
moveLatestFeatureToStart(articlesArray, latestFeatured) {
|
|
183
|
+
const index = articlesArray.indexOf(latestFeatured);
|
|
184
|
+
if (index !== -1) {
|
|
185
|
+
articlesArray.splice(index, 1);
|
|
186
|
+
articlesArray.unshift(latestFeatured);
|
|
187
|
+
}
|
|
188
|
+
return articlesArray;
|
|
189
|
+
}
|
|
190
|
+
getBlogArticleGrid(page) {
|
|
191
|
+
this.isLoading = true;
|
|
192
|
+
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);
|
|
193
|
+
url.searchParams.append('per_page', this.blogsLimit);
|
|
194
|
+
url.searchParams.append('page', JSON.stringify(page ? page : this.currentPage + 1));
|
|
195
|
+
url.searchParams.append('env', this.cmsEnv);
|
|
196
|
+
url.searchParams.append('userRoles', this.userRoles);
|
|
197
|
+
url.searchParams.append('device', getDevicePlatform());
|
|
198
|
+
fetch(url.href)
|
|
199
|
+
.then((res) => {
|
|
200
|
+
if (res.status >= 300) {
|
|
201
|
+
this.hasErrors = true;
|
|
202
|
+
throw new Error('There was an error while fetching the data');
|
|
203
|
+
}
|
|
204
|
+
return res.json();
|
|
205
|
+
})
|
|
206
|
+
.then((blogContent) => {
|
|
207
|
+
this.lastPage = +blogContent.pages.last.match(/&page=(\d+)/)[1];
|
|
208
|
+
let blogItems = blogContent.items;
|
|
209
|
+
this.nextPage = blogContent.pages.next;
|
|
210
|
+
this.previousPage = blogContent.pages.previous;
|
|
211
|
+
this.totalBlogs = blogContent.total;
|
|
212
|
+
const latestFeatured = this.findLatestFeatured(blogItems);
|
|
213
|
+
this.blogData = this.sortArticlesByDate(blogItems);
|
|
214
|
+
this.blogData = this.moveLatestFeatureToStart(blogItems, latestFeatured);
|
|
215
|
+
this.blogData.items = blogItems.map((item) => {
|
|
216
|
+
return Object.assign(Object.assign({}, item), { publishingDate: new Date(item.publishingDate).toLocaleDateString() });
|
|
217
|
+
});
|
|
218
|
+
this.isLoading = false;
|
|
219
|
+
this.hasErrors = false;
|
|
220
|
+
})
|
|
221
|
+
.catch((err) => {
|
|
222
|
+
this.hasErrors = true;
|
|
223
|
+
console.log('Error', err);
|
|
224
|
+
})
|
|
225
|
+
.finally(() => this.isLoading = false);
|
|
226
|
+
}
|
|
227
|
+
connectedCallback() {
|
|
228
|
+
if (this.cmsEndpoint && this.language && this.blogsLimit) {
|
|
229
|
+
if (this.page) {
|
|
230
|
+
this.currentPage = this.currentPage + +this.page - 1;
|
|
231
|
+
this.getBlogArticleGrid(+this.page);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this.getBlogArticleGrid();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
componentWillLoad() {
|
|
239
|
+
if (this.clientStylingUrl)
|
|
240
|
+
return this.fetchClientStyling();
|
|
241
|
+
}
|
|
242
|
+
componentDidLoad() {
|
|
243
|
+
if (this.clientStyling || this.clientStylingUrl)
|
|
244
|
+
this.setClientStyling();
|
|
245
|
+
window.postMessage({ type: 'BlogArticlesGridLoaded' }, window.location.href);
|
|
246
|
+
this.device = getDeviceCustom();
|
|
247
|
+
}
|
|
248
|
+
fetchClientStyling() {
|
|
249
|
+
if (!this.clientStylingUrl)
|
|
250
|
+
return;
|
|
251
|
+
return new Promise(resolve => {
|
|
252
|
+
fetch(this.clientStylingUrl)
|
|
253
|
+
.then((res) => res.text())
|
|
254
|
+
.then((data) => {
|
|
255
|
+
resolve(data);
|
|
256
|
+
this.clientStylingContent += data;
|
|
257
|
+
})
|
|
258
|
+
.catch((err) => {
|
|
259
|
+
console.error('Error fetching Client Styling:', err);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
formatDate(dateString) {
|
|
264
|
+
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(new Date(dateString));
|
|
265
|
+
}
|
|
266
|
+
render() {
|
|
267
|
+
var _a, _b;
|
|
268
|
+
if (this.hasErrors) {
|
|
269
|
+
return (h("div", { class: "BlogsContainer" }, h("div", { class: "ErrorMessage" }, translate('error', this.language))));
|
|
270
|
+
}
|
|
271
|
+
// Create an array to store the placeholder elements for each card
|
|
272
|
+
const placeholderCards = [];
|
|
273
|
+
// Loop through the blogsLimit in order to generate the desired number of cards
|
|
274
|
+
for (let i = 0; i < parseInt(this.blogsLimit); i++) {
|
|
275
|
+
placeholderCards.push(h("div", { class: "GridContainer FeaturedPost Skeleton" }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, h("div", { class: "VisualContent LoadingImage" })), h("div", { class: "GridSector" }, h("div", { class: "BlogTitle LoadingStripe LoadingSmallStripe" }), h("div", { class: "BlogDetails LoadingStripe LoadingMediumStripe" }), h("div", { class: "BlogLink LoadingStripe LoadingLongStripe" })))));
|
|
276
|
+
}
|
|
277
|
+
return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "BlogPageContainer" }, h("div", { class: "BlogGridPaginationWrapper" }, this.paginationActive == true && this.totalBlogs > +this.blogsLimit && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: (_b = (_a = this.blogData) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length, language: this.language, "client-styling": this.clientStyling || this.defaultStyling, "arrows-active": this.arrowsActive || true, "secondary-arrows-active": this.secondaryArrowsActive || false, "numbered-nav-active": this.numberedNavActive || false })), (!this.isLoading) &&
|
|
278
|
+
h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage}` }, this.blogData && this.blogData.map((data) => {
|
|
279
|
+
var _a, _b;
|
|
280
|
+
return h("div", { key: data.postID, class: data.isFeaturedPost ? 'GridContainer FeaturedPost' : 'GridContainer' }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, this.showPublishingDate &&
|
|
281
|
+
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("div", { class: "VisualContent", style: { background: `url(${this.setImage(data.image)}) no-repeat center center / cover` } })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { class: "VisualContent", src: data.video.sources[this.device], controls: true })) : (h("h1", { class: "VisualContent", style: { color: "#fff" } }, "No Image")))), h("div", { class: "GridSector" }, this.showTitle &&
|
|
282
|
+
h("div", { class: "BlogTitle" }, data === null || data === void 0 ? void 0 : data.title), this.showContent &&
|
|
283
|
+
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.descriptionPreview), this.showButton &&
|
|
284
|
+
h("div", { class: "BlogLink" }, h("button", { onClick: () => this.getArticleId(data === null || data === void 0 ? void 0 : data.postID, data === null || data === void 0 ? void 0 : data.slug, data === null || data === void 0 ? void 0 : data.customPath) }, translate('readmore', this.language))))));
|
|
285
|
+
})), (this.isLoading) &&
|
|
286
|
+
h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards))));
|
|
287
|
+
}
|
|
288
|
+
static get is() { return "blog-articles-grid"; }
|
|
289
|
+
static get encapsulation() { return "shadow"; }
|
|
290
|
+
static get originalStyleUrls() {
|
|
291
|
+
return {
|
|
292
|
+
"$": ["blog-articles-grid.scss"]
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
static get styleUrls() {
|
|
296
|
+
return {
|
|
297
|
+
"$": ["blog-articles-grid.css"]
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
static get properties() {
|
|
301
|
+
return {
|
|
302
|
+
"cmsEndpoint": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"mutable": false,
|
|
305
|
+
"complexType": {
|
|
306
|
+
"original": "string",
|
|
307
|
+
"resolved": "string",
|
|
308
|
+
"references": {}
|
|
309
|
+
},
|
|
310
|
+
"required": false,
|
|
311
|
+
"optional": false,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": "Endpoint URL for the source of data"
|
|
315
|
+
},
|
|
316
|
+
"attribute": "cms-endpoint",
|
|
317
|
+
"reflect": true
|
|
318
|
+
},
|
|
319
|
+
"language": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"mutable": false,
|
|
322
|
+
"complexType": {
|
|
323
|
+
"original": "string",
|
|
324
|
+
"resolved": "string",
|
|
325
|
+
"references": {}
|
|
326
|
+
},
|
|
327
|
+
"required": false,
|
|
328
|
+
"optional": false,
|
|
329
|
+
"docs": {
|
|
330
|
+
"tags": [],
|
|
331
|
+
"text": "Language of the widget"
|
|
332
|
+
},
|
|
333
|
+
"attribute": "language",
|
|
334
|
+
"reflect": true,
|
|
335
|
+
"defaultValue": "'en'"
|
|
336
|
+
},
|
|
337
|
+
"userRoles": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"mutable": false,
|
|
340
|
+
"complexType": {
|
|
341
|
+
"original": "string",
|
|
342
|
+
"resolved": "string",
|
|
343
|
+
"references": {}
|
|
344
|
+
},
|
|
345
|
+
"required": false,
|
|
346
|
+
"optional": false,
|
|
347
|
+
"docs": {
|
|
348
|
+
"tags": [],
|
|
349
|
+
"text": "User roles"
|
|
350
|
+
},
|
|
351
|
+
"attribute": "user-roles",
|
|
352
|
+
"reflect": true,
|
|
353
|
+
"defaultValue": "'everyone'"
|
|
354
|
+
},
|
|
355
|
+
"cmsEnv": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"mutable": false,
|
|
358
|
+
"complexType": {
|
|
359
|
+
"original": "string",
|
|
360
|
+
"resolved": "string",
|
|
361
|
+
"references": {}
|
|
362
|
+
},
|
|
363
|
+
"required": false,
|
|
364
|
+
"optional": false,
|
|
365
|
+
"docs": {
|
|
366
|
+
"tags": [],
|
|
367
|
+
"text": "CMS Endpoint stage"
|
|
368
|
+
},
|
|
369
|
+
"attribute": "cms-env",
|
|
370
|
+
"reflect": true,
|
|
371
|
+
"defaultValue": "'stage'"
|
|
372
|
+
},
|
|
373
|
+
"clientStyling": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"mutable": false,
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "string",
|
|
378
|
+
"resolved": "string",
|
|
379
|
+
"references": {}
|
|
380
|
+
},
|
|
381
|
+
"required": false,
|
|
382
|
+
"optional": false,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "Client custom styling via string"
|
|
386
|
+
},
|
|
387
|
+
"attribute": "client-styling",
|
|
388
|
+
"reflect": true,
|
|
389
|
+
"defaultValue": "''"
|
|
390
|
+
},
|
|
391
|
+
"clientStylingUrl": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"mutable": false,
|
|
394
|
+
"complexType": {
|
|
395
|
+
"original": "string",
|
|
396
|
+
"resolved": "string",
|
|
397
|
+
"references": {}
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"optional": false,
|
|
401
|
+
"docs": {
|
|
402
|
+
"tags": [],
|
|
403
|
+
"text": "Client custom styling via url"
|
|
404
|
+
},
|
|
405
|
+
"attribute": "client-styling-url",
|
|
406
|
+
"reflect": true,
|
|
407
|
+
"defaultValue": "''"
|
|
408
|
+
},
|
|
409
|
+
"showPublishingDate": {
|
|
410
|
+
"type": "boolean",
|
|
411
|
+
"mutable": false,
|
|
412
|
+
"complexType": {
|
|
413
|
+
"original": "boolean",
|
|
414
|
+
"resolved": "boolean",
|
|
415
|
+
"references": {}
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"optional": false,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [],
|
|
421
|
+
"text": "Property used to display the publishing date"
|
|
422
|
+
},
|
|
423
|
+
"attribute": "show-publishing-date",
|
|
424
|
+
"reflect": true,
|
|
425
|
+
"defaultValue": "true"
|
|
426
|
+
},
|
|
427
|
+
"showImage": {
|
|
428
|
+
"type": "boolean",
|
|
429
|
+
"mutable": false,
|
|
430
|
+
"complexType": {
|
|
431
|
+
"original": "boolean",
|
|
432
|
+
"resolved": "boolean",
|
|
433
|
+
"references": {}
|
|
434
|
+
},
|
|
435
|
+
"required": false,
|
|
436
|
+
"optional": false,
|
|
437
|
+
"docs": {
|
|
438
|
+
"tags": [],
|
|
439
|
+
"text": "Property used to display the image"
|
|
440
|
+
},
|
|
441
|
+
"attribute": "show-image",
|
|
442
|
+
"reflect": true,
|
|
443
|
+
"defaultValue": "true"
|
|
444
|
+
},
|
|
445
|
+
"showTitle": {
|
|
446
|
+
"type": "boolean",
|
|
447
|
+
"mutable": false,
|
|
448
|
+
"complexType": {
|
|
449
|
+
"original": "boolean",
|
|
450
|
+
"resolved": "boolean",
|
|
451
|
+
"references": {}
|
|
452
|
+
},
|
|
453
|
+
"required": false,
|
|
454
|
+
"optional": false,
|
|
455
|
+
"docs": {
|
|
456
|
+
"tags": [],
|
|
457
|
+
"text": "Property used to display the image"
|
|
458
|
+
},
|
|
459
|
+
"attribute": "show-title",
|
|
460
|
+
"reflect": true,
|
|
461
|
+
"defaultValue": "true"
|
|
462
|
+
},
|
|
463
|
+
"showContent": {
|
|
464
|
+
"type": "boolean",
|
|
465
|
+
"mutable": false,
|
|
466
|
+
"complexType": {
|
|
467
|
+
"original": "boolean",
|
|
468
|
+
"resolved": "boolean",
|
|
469
|
+
"references": {}
|
|
470
|
+
},
|
|
471
|
+
"required": false,
|
|
472
|
+
"optional": false,
|
|
473
|
+
"docs": {
|
|
474
|
+
"tags": [],
|
|
475
|
+
"text": "Property used to display the description"
|
|
476
|
+
},
|
|
477
|
+
"attribute": "show-content",
|
|
478
|
+
"reflect": true,
|
|
479
|
+
"defaultValue": "true"
|
|
480
|
+
},
|
|
481
|
+
"showButton": {
|
|
482
|
+
"type": "boolean",
|
|
483
|
+
"mutable": false,
|
|
484
|
+
"complexType": {
|
|
485
|
+
"original": "boolean",
|
|
486
|
+
"resolved": "boolean",
|
|
487
|
+
"references": {}
|
|
488
|
+
},
|
|
489
|
+
"required": false,
|
|
490
|
+
"optional": false,
|
|
491
|
+
"docs": {
|
|
492
|
+
"tags": [],
|
|
493
|
+
"text": "Property used to display the button"
|
|
494
|
+
},
|
|
495
|
+
"attribute": "show-button",
|
|
496
|
+
"reflect": true,
|
|
497
|
+
"defaultValue": "true"
|
|
498
|
+
},
|
|
499
|
+
"usePostmessage": {
|
|
500
|
+
"type": "boolean",
|
|
501
|
+
"mutable": false,
|
|
502
|
+
"complexType": {
|
|
503
|
+
"original": "boolean",
|
|
504
|
+
"resolved": "boolean",
|
|
505
|
+
"references": {}
|
|
506
|
+
},
|
|
507
|
+
"required": true,
|
|
508
|
+
"optional": false,
|
|
509
|
+
"docs": {
|
|
510
|
+
"tags": [],
|
|
511
|
+
"text": "Use postMessage event to communicate"
|
|
512
|
+
},
|
|
513
|
+
"attribute": "use-postmessage",
|
|
514
|
+
"reflect": true
|
|
515
|
+
},
|
|
516
|
+
"postMessageEvent": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"mutable": false,
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "string",
|
|
521
|
+
"resolved": "string",
|
|
522
|
+
"references": {}
|
|
523
|
+
},
|
|
524
|
+
"required": false,
|
|
525
|
+
"optional": false,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": "Event name to be sent when the button is clicked"
|
|
529
|
+
},
|
|
530
|
+
"attribute": "post-message-event",
|
|
531
|
+
"reflect": true,
|
|
532
|
+
"defaultValue": "''"
|
|
533
|
+
},
|
|
534
|
+
"blogsLimit": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"mutable": false,
|
|
537
|
+
"complexType": {
|
|
538
|
+
"original": "string",
|
|
539
|
+
"resolved": "string",
|
|
540
|
+
"references": {}
|
|
541
|
+
},
|
|
542
|
+
"required": false,
|
|
543
|
+
"optional": false,
|
|
544
|
+
"docs": {
|
|
545
|
+
"tags": [],
|
|
546
|
+
"text": "Customize pagination: Activate pagination numbered navigation"
|
|
547
|
+
},
|
|
548
|
+
"attribute": "blogs-limit",
|
|
549
|
+
"reflect": true,
|
|
550
|
+
"defaultValue": "'0'"
|
|
551
|
+
},
|
|
552
|
+
"paginationActive": {
|
|
553
|
+
"type": "boolean",
|
|
554
|
+
"mutable": false,
|
|
555
|
+
"complexType": {
|
|
556
|
+
"original": "boolean",
|
|
557
|
+
"resolved": "boolean",
|
|
558
|
+
"references": {}
|
|
559
|
+
},
|
|
560
|
+
"required": false,
|
|
561
|
+
"optional": false,
|
|
562
|
+
"docs": {
|
|
563
|
+
"tags": [],
|
|
564
|
+
"text": "Customize pagination: Activate pagination"
|
|
565
|
+
},
|
|
566
|
+
"attribute": "pagination-active",
|
|
567
|
+
"reflect": true
|
|
568
|
+
},
|
|
569
|
+
"arrowsActive": {
|
|
570
|
+
"type": "boolean",
|
|
571
|
+
"mutable": false,
|
|
572
|
+
"complexType": {
|
|
573
|
+
"original": "boolean",
|
|
574
|
+
"resolved": "boolean",
|
|
575
|
+
"references": {}
|
|
576
|
+
},
|
|
577
|
+
"required": false,
|
|
578
|
+
"optional": false,
|
|
579
|
+
"docs": {
|
|
580
|
+
"tags": [],
|
|
581
|
+
"text": "Customize pagination: Activate pagination arrows"
|
|
582
|
+
},
|
|
583
|
+
"attribute": "arrows-active",
|
|
584
|
+
"reflect": true
|
|
585
|
+
},
|
|
586
|
+
"secondaryArrowsActive": {
|
|
587
|
+
"type": "boolean",
|
|
588
|
+
"mutable": false,
|
|
589
|
+
"complexType": {
|
|
590
|
+
"original": "boolean",
|
|
591
|
+
"resolved": "boolean",
|
|
592
|
+
"references": {}
|
|
593
|
+
},
|
|
594
|
+
"required": false,
|
|
595
|
+
"optional": false,
|
|
596
|
+
"docs": {
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": "Customize pagination: Activate pagination secondary arrows"
|
|
599
|
+
},
|
|
600
|
+
"attribute": "secondary-arrows-active",
|
|
601
|
+
"reflect": true
|
|
602
|
+
},
|
|
603
|
+
"numberedNavActive": {
|
|
604
|
+
"type": "boolean",
|
|
605
|
+
"mutable": false,
|
|
606
|
+
"complexType": {
|
|
607
|
+
"original": "boolean",
|
|
608
|
+
"resolved": "boolean",
|
|
609
|
+
"references": {}
|
|
610
|
+
},
|
|
611
|
+
"required": false,
|
|
612
|
+
"optional": false,
|
|
613
|
+
"docs": {
|
|
614
|
+
"tags": [],
|
|
615
|
+
"text": "Customize pagination: Activate pagination numbered navigation"
|
|
616
|
+
},
|
|
617
|
+
"attribute": "numbered-nav-active",
|
|
618
|
+
"reflect": true
|
|
619
|
+
},
|
|
620
|
+
"intlDateTimeFormat": {
|
|
621
|
+
"type": "string",
|
|
622
|
+
"mutable": false,
|
|
623
|
+
"complexType": {
|
|
624
|
+
"original": "string",
|
|
625
|
+
"resolved": "string",
|
|
626
|
+
"references": {}
|
|
627
|
+
},
|
|
628
|
+
"required": false,
|
|
629
|
+
"optional": false,
|
|
630
|
+
"docs": {
|
|
631
|
+
"tags": [],
|
|
632
|
+
"text": "Intl date format"
|
|
633
|
+
},
|
|
634
|
+
"attribute": "intl-date-time-format",
|
|
635
|
+
"reflect": true,
|
|
636
|
+
"defaultValue": "''"
|
|
637
|
+
},
|
|
638
|
+
"page": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"mutable": false,
|
|
641
|
+
"complexType": {
|
|
642
|
+
"original": "string",
|
|
643
|
+
"resolved": "string",
|
|
644
|
+
"references": {}
|
|
645
|
+
},
|
|
646
|
+
"required": false,
|
|
647
|
+
"optional": false,
|
|
648
|
+
"docs": {
|
|
649
|
+
"tags": [],
|
|
650
|
+
"text": "Page to particularly be opened on start"
|
|
651
|
+
},
|
|
652
|
+
"attribute": "page",
|
|
653
|
+
"reflect": true,
|
|
654
|
+
"defaultValue": "'1'"
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
static get states() {
|
|
659
|
+
return {
|
|
660
|
+
"paginationBlogList": {},
|
|
661
|
+
"currentPage": {},
|
|
662
|
+
"hasErrors": {},
|
|
663
|
+
"isLoading": {},
|
|
664
|
+
"bannerMatrixReady": {},
|
|
665
|
+
"nextPage": {},
|
|
666
|
+
"previousPage": {},
|
|
667
|
+
"device": {},
|
|
668
|
+
"blogData": {},
|
|
669
|
+
"totalBlogs": {}
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
static get events() {
|
|
673
|
+
return [{
|
|
674
|
+
"method": "articleActionButton",
|
|
675
|
+
"name": "articleActionButton",
|
|
676
|
+
"bubbles": true,
|
|
677
|
+
"cancelable": true,
|
|
678
|
+
"composed": true,
|
|
679
|
+
"docs": {
|
|
680
|
+
"tags": [],
|
|
681
|
+
"text": ""
|
|
682
|
+
},
|
|
683
|
+
"complexType": {
|
|
684
|
+
"original": "Object",
|
|
685
|
+
"resolved": "Object",
|
|
686
|
+
"references": {
|
|
687
|
+
"Object": {
|
|
688
|
+
"location": "global",
|
|
689
|
+
"id": "global::Object"
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}];
|
|
694
|
+
}
|
|
695
|
+
static get watchers() {
|
|
696
|
+
return [{
|
|
697
|
+
"propName": "page",
|
|
698
|
+
"methodName": "watchEndpoint"
|
|
699
|
+
}, {
|
|
700
|
+
"propName": "hasErrors",
|
|
701
|
+
"methodName": "watchEndpoint"
|
|
702
|
+
}, {
|
|
703
|
+
"propName": "cmsEndpoint",
|
|
704
|
+
"methodName": "watchEndpoint"
|
|
705
|
+
}, {
|
|
706
|
+
"propName": "language",
|
|
707
|
+
"methodName": "watchEndpoint"
|
|
708
|
+
}, {
|
|
709
|
+
"propName": "cmsEnv",
|
|
710
|
+
"methodName": "watchEndpoint"
|
|
711
|
+
}, {
|
|
712
|
+
"propName": "userRoles",
|
|
713
|
+
"methodName": "watchEndpoint"
|
|
714
|
+
}, {
|
|
715
|
+
"propName": "blogsLimit",
|
|
716
|
+
"methodName": "watchEndpoint"
|
|
717
|
+
}, {
|
|
718
|
+
"propName": "clientStyling",
|
|
719
|
+
"methodName": "handleStylingChange"
|
|
720
|
+
}, {
|
|
721
|
+
"propName": "clientStylingUrl",
|
|
722
|
+
"methodName": "handleStylingChange"
|
|
723
|
+
}];
|
|
724
|
+
}
|
|
725
|
+
static get listeners() {
|
|
726
|
+
return [{
|
|
727
|
+
"name": "BannerMatrixReady",
|
|
728
|
+
"method": "handleBannerReady",
|
|
729
|
+
"target": "window",
|
|
730
|
+
"capture": false,
|
|
731
|
+
"passive": false
|
|
732
|
+
}, {
|
|
733
|
+
"name": "hpPageChange",
|
|
734
|
+
"method": "hpPageChange",
|
|
735
|
+
"target": undefined,
|
|
736
|
+
"capture": false,
|
|
737
|
+
"passive": false
|
|
738
|
+
}];
|
|
739
|
+
}
|
|
740
|
+
}
|