@aiconomy/aico-components 0.0.164 → 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.
Files changed (46) hide show
  1. package/dist/aico-components/aico-components.esm.js +1 -1
  2. package/dist/aico-components/{p-d4f3c776.entry.js → p-020898a6.entry.js} +2 -2
  3. package/dist/aico-components/p-253097be.js +3 -0
  4. package/dist/aico-components/p-253097be.js.map +1 -0
  5. package/dist/aico-components/{p-0d563d4f.entry.js → p-25cf4b75.entry.js} +2 -2
  6. package/dist/aico-components/{p-43d0546f.entry.js → p-c4d3fd22.entry.js} +4 -4
  7. package/dist/aico-components/p-c4d3fd22.entry.js.map +1 -0
  8. package/dist/cjs/aico-album-content_27.cjs.entry.js +29 -5
  9. package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
  10. package/dist/cjs/aico-asking-list-content.cjs.entry.js +1 -1
  11. package/dist/cjs/aico-collection-content.cjs.entry.js +1 -1
  12. package/dist/cjs/aico-components.cjs.js +1 -1
  13. package/dist/cjs/{index-e52034b7.js → index-0ce53322.js} +60 -2
  14. package/dist/cjs/index-0ce53322.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/components/aico-article-detail/aico-article-detail.js +5 -2
  17. package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
  18. package/dist/collection/components/aico-news-list/aico-news-list.js +1 -1
  19. package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
  20. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +22 -1
  21. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
  22. package/dist/collection/model/Article.js.map +1 -1
  23. package/dist/components/aico-article-detail2.js +5 -2
  24. package/dist/components/aico-article-detail2.js.map +1 -1
  25. package/dist/components/aico-news-list-item2.js +22 -1
  26. package/dist/components/aico-news-list-item2.js.map +1 -1
  27. package/dist/components/aico-news-list.js +1 -1
  28. package/dist/components/aico-news-list.js.map +1 -1
  29. package/dist/esm/aico-album-content_27.entry.js +29 -5
  30. package/dist/esm/aico-album-content_27.entry.js.map +1 -1
  31. package/dist/esm/aico-asking-list-content.entry.js +1 -1
  32. package/dist/esm/aico-collection-content.entry.js +1 -1
  33. package/dist/esm/aico-components.js +2 -2
  34. package/dist/esm/{index-4621a8ba.js → index-1498b9e7.js} +60 -3
  35. package/dist/esm/index-1498b9e7.js.map +1 -0
  36. package/dist/esm/loader.js +2 -2
  37. package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +4 -0
  38. package/dist/types/model/Article.d.ts +1 -0
  39. package/package.json +1 -1
  40. package/dist/aico-components/p-43d0546f.entry.js.map +0 -1
  41. package/dist/aico-components/p-ae20e789.js +0 -3
  42. package/dist/aico-components/p-ae20e789.js.map +0 -1
  43. package/dist/cjs/index-e52034b7.js.map +0 -1
  44. package/dist/esm/index-4621a8ba.js.map +0 -1
  45. /package/dist/aico-components/{p-d4f3c776.entry.js.map → p-020898a6.entry.js.map} +0 -0
  46. /package/dist/aico-components/{p-0d563d4f.entry.js.map → p-25cf4b75.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host, F as Fragment, c as createEvent } from './index-4621a8ba.js';
1
+ import { r as registerInstance, h, H as Host, F as Fragment, c as createEvent, g as getElement$1 } from './index-1498b9e7.js';
2
2
 
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
 
@@ -13906,12 +13906,15 @@ const AicoArticleDetail = class {
13906
13906
  this.hideCategoryAndTags = false;
13907
13907
  }
13908
13908
  render() {
13909
- var _a, _b, _c, _d;
13909
+ var _a, _b, _c, _d, _e;
13910
13910
  const translation = (_a = this.article.attributes.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
13911
13911
  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;
13912
13912
  const articleDate = new Date(this.article.attributes.publishDate);
13913
13913
  const content = this.article.attributes.contentBuilder.rows.sort((a, b) => a.order - b.order).map((row, index) => this.mapRowContent(row, index));
13914
- return (h(Host, null, h("figure", null, h("blockquote", { class: "blockquote" }, h("h2", { class: "text-uppercase" }, (_d = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _d !== void 0 ? _d : this.article.attributes.name)), h(ConditionalRender, { condition: !this.hideDateAndAuthor }, h("figcaption", { class: "blockquote-footer mb-1" }, articleDate.toLocaleDateString('en-US', this.dateOptions), " by ", h("cite", { title: "Author" }, this.article.attributes.author))), h(ConditionalRender, { condition: !this.hideCategoryAndTags && !strIsNullOrEmptyOrWhitespace(category === null || category === void 0 ? void 0 : category.webName) }, h("span", { class: "badge bg-info text-dark" }, category === null || category === void 0 ? void 0 : category.webName))), h("div", { class: "content-wrapper" }, content), h(ConditionalRender, { condition: !this.hideCategoryAndTags }, this.article.attributes.newsTags.map(tag => {
13914
+ const headlineFocusX = this.article.attributes.headlineImageFocusXPercentage ? `${this.article.attributes.headlineImageFocusXPercentage}%` : 'center';
13915
+ const headlineFocusY = this.article.attributes.headlineImageFocusYPercentage ? `${this.article.attributes.headlineImageFocusYPercentage}%` : 'center';
13916
+ const headlineImage = (_d = translation === null || translation === void 0 ? void 0 : translation.headlineImage) !== null && _d !== void 0 ? _d : this.article.attributes.headlineImage;
13917
+ return (h(Host, null, h("figure", null, h("blockquote", { class: "blockquote" }, 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 && h("img", { class: "img-fluid rounded object-fit-cover", style: { 'object-position': `${headlineFocusX} ${headlineFocusY}` }, alt: "Headline image", src: headlineImage }), h(ConditionalRender, { condition: !this.hideDateAndAuthor }, h("figcaption", { class: "blockquote-footer mb-1" }, articleDate.toLocaleDateString('en-US', this.dateOptions), " by ", h("cite", { title: "Author" }, this.article.attributes.author))), h(ConditionalRender, { condition: !this.hideCategoryAndTags && !strIsNullOrEmptyOrWhitespace(category === null || category === void 0 ? void 0 : category.webName) }, h("span", { class: "badge bg-info text-dark" }, category === null || category === void 0 ? void 0 : category.webName))), h("div", { class: "content-wrapper" }, content), h(ConditionalRender, { condition: !this.hideCategoryAndTags }, this.article.attributes.newsTags.map(tag => {
13915
13918
  var _a;
13916
13919
  const translation = (_a = tag.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
13917
13920
  return (h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.webName) }, h("span", { class: "badge bg-light text-dark" }, translation.webName)));
@@ -20678,7 +20681,7 @@ const AicoNewsList = class {
20678
20681
  render() {
20679
20682
  var _a, _b, _c;
20680
20683
  return (h(Host, null, h("div", { class: "newslist-grid-container mb-4" }, (_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.data.filter(article => !article.attributes.isTopNews).map((article, articleIndex) => {
20681
- return (h("div", { class: "col" }, h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
20684
+ return (h("div", { key: article.id, class: "col" }, h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
20682
20685
  var _a;
20683
20686
  (_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
20684
20687
  e.stopPropagation();
@@ -20741,14 +20744,35 @@ const AicoNewsListItem = class {
20741
20744
  this.articleIndex = 0;
20742
20745
  this.locale = 'de';
20743
20746
  }
20747
+ componentDidLoad() {
20748
+ const img = this.thisHtml.querySelector('img');
20749
+ if (img) {
20750
+ this.imageObserver = new IntersectionObserver(this.onIntersection);
20751
+ this.imageObserver.observe(img);
20752
+ }
20753
+ }
20754
+ async onIntersection(entries) {
20755
+ var _a;
20756
+ for (const entry of entries) {
20757
+ if (entry.isIntersecting) {
20758
+ (_a = this.imageObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
20759
+ const src = entry.target.getAttribute('data-src');
20760
+ if (src) {
20761
+ entry.target.setAttribute('src', src);
20762
+ entry.target.removeAttribute('data-src');
20763
+ }
20764
+ }
20765
+ }
20766
+ }
20744
20767
  render() {
20745
20768
  var _a, _b, _c, _d, _e, _f, _g;
20746
20769
  const translation = this.article.attributes.translations.find(t => t.locale === this.locale);
20747
20770
  return (h("div", { class: "card h-100 pe-auto", style: { cursor: 'pointer' }, onClick: () => {
20748
20771
  var _a;
20749
20772
  (_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(this.article);
20750
- } }, h("div", { class: "ratio ratio-16x9 overflow-hidden" }, h("img", { class: "object-fit-cover", style: { 'min-height': '15rem' }, alt: "Article image", src: (_e = (_d = (_c = (_b = (_a = translation === null || translation === void 0 ? void 0 : translation.image) !== null && _a !== void 0 ? _a : translation === null || translation === void 0 ? void 0 : translation.optimizedListImage) !== null && _b !== void 0 ? _b : translation === null || translation === void 0 ? void 0 : translation.optimizedImage) !== null && _c !== void 0 ? _c : this.article.attributes.image) !== null && _d !== void 0 ? _d : this.article.attributes.optimizedListImage) !== null && _e !== void 0 ? _e : this.article.attributes.optimizedImage }), h("div", { class: "card-img-overlay d-flex justify-content-end" })), h("div", { class: "card-body" }, h("h5", { class: "card-title" }, (_f = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _f !== void 0 ? _f : this.article.attributes.name), h("p", { class: "card-text" }, (_g = translation === null || translation === void 0 ? void 0 : translation.excerpt) !== null && _g !== void 0 ? _g : this.article.attributes.excerpt))));
20773
+ } }, h("div", { class: "ratio ratio-16x9 overflow-hidden" }, h("img", { class: "object-fit-cover", style: { 'min-height': '15rem' }, alt: "Article image", "data-src": (_e = (_d = (_c = (_b = (_a = translation === null || translation === void 0 ? void 0 : translation.image) !== null && _a !== void 0 ? _a : translation === null || translation === void 0 ? void 0 : translation.optimizedListImage) !== null && _b !== void 0 ? _b : translation === null || translation === void 0 ? void 0 : translation.optimizedImage) !== null && _c !== void 0 ? _c : this.article.attributes.image) !== null && _d !== void 0 ? _d : this.article.attributes.optimizedListImage) !== null && _e !== void 0 ? _e : this.article.attributes.optimizedImage }), h("div", { class: "card-img-overlay d-flex justify-content-end" })), h("div", { class: "card-body" }, h("h5", { class: "card-title" }, (_f = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _f !== void 0 ? _f : this.article.attributes.name), h("p", { class: "card-text" }, (_g = translation === null || translation === void 0 ? void 0 : translation.excerpt) !== null && _g !== void 0 ? _g : this.article.attributes.excerpt))));
20751
20774
  }
20775
+ get thisHtml() { return getElement$1(this); }
20752
20776
  };
20753
20777
  AicoNewsListItem.style = aicoNewsListItemCss;
20754
20778