@aiconomy/aico-components 0.0.168 → 0.0.174
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/aico-components/aico-components.esm.js +1 -1
- package/dist/aico-components/{p-aa633f51.entry.js → p-c4d3fd22.entry.js} +3 -3
- package/dist/aico-components/p-c4d3fd22.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_27.cjs.entry.js +5 -2
- package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
- package/dist/collection/components/aico-article-detail/aico-article-detail.js +5 -2
- package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
- package/dist/collection/model/Article.js.map +1 -1
- package/dist/components/aico-article-detail2.js +5 -2
- package/dist/components/aico-article-detail2.js.map +1 -1
- package/dist/esm/aico-album-content_27.entry.js +5 -2
- package/dist/esm/aico-album-content_27.entry.js.map +1 -1
- package/dist/types/model/Article.d.ts +1 -0
- package/package.json +1 -1
- package/dist/aico-components/p-aa633f51.entry.js.map +0 -1
|
@@ -13910,12 +13910,15 @@ const AicoArticleDetail = class {
|
|
|
13910
13910
|
this.hideCategoryAndTags = false;
|
|
13911
13911
|
}
|
|
13912
13912
|
render() {
|
|
13913
|
-
var _a, _b, _c, _d;
|
|
13913
|
+
var _a, _b, _c, _d, _e;
|
|
13914
13914
|
const translation = (_a = this.article.attributes.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
13915
13915
|
const category = (_c = (_b = this.article.attributes.newsCategory) === null || _b === void 0 ? void 0 : _b.translations.find(translation => translation.locale === this.locale)) !== null && _c !== void 0 ? _c : null;
|
|
13916
13916
|
const articleDate = new Date(this.article.attributes.publishDate);
|
|
13917
13917
|
const content = this.article.attributes.contentBuilder.rows.sort((a, b) => a.order - b.order).map((row, index) => this.mapRowContent(row, index));
|
|
13918
|
-
|
|
13918
|
+
const headlineFocusX = this.article.attributes.headlineImageFocusXPercentage ? `${this.article.attributes.headlineImageFocusXPercentage}%` : 'center';
|
|
13919
|
+
const headlineFocusY = this.article.attributes.headlineImageFocusYPercentage ? `${this.article.attributes.headlineImageFocusYPercentage}%` : 'center';
|
|
13920
|
+
const headlineImage = (_d = translation === null || translation === void 0 ? void 0 : translation.headlineImage) !== null && _d !== void 0 ? _d : this.article.attributes.headlineImage;
|
|
13921
|
+
return (index.h(index.Host, null, index.h("figure", null, index.h("blockquote", { class: "blockquote" }, index.h("h2", { class: "text-uppercase" }, (_e = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _e !== void 0 ? _e : this.article.attributes.name)), headlineImage && index.h("img", { class: "img-fluid rounded object-fit-cover", style: { 'object-position': `${headlineFocusX} ${headlineFocusY}` }, alt: "Headline image", src: headlineImage }), index.h(ConditionalRender, { condition: !this.hideDateAndAuthor }, index.h("figcaption", { class: "blockquote-footer mb-1" }, articleDate.toLocaleDateString('en-US', this.dateOptions), " by ", index.h("cite", { title: "Author" }, this.article.attributes.author))), index.h(ConditionalRender, { condition: !this.hideCategoryAndTags && !strIsNullOrEmptyOrWhitespace(category === null || category === void 0 ? void 0 : category.webName) }, index.h("span", { class: "badge bg-info text-dark" }, category === null || category === void 0 ? void 0 : category.webName))), index.h("div", { class: "content-wrapper" }, content), index.h(ConditionalRender, { condition: !this.hideCategoryAndTags }, this.article.attributes.newsTags.map(tag => {
|
|
13919
13922
|
var _a;
|
|
13920
13923
|
const translation = (_a = tag.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
13921
13924
|
return (index.h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.webName) }, index.h("span", { class: "badge bg-light text-dark" }, translation.webName)));
|