@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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e52034b7.js');
5
+ const index = require('./index-0ce53322.js');
6
6
 
7
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
8
 
@@ -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
- return (index.h(index.Host, null, index.h("figure", null, index.h("blockquote", { class: "blockquote" }, index.h("h2", { class: "text-uppercase" }, (_d = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _d !== void 0 ? _d : this.article.attributes.name)), 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 => {
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)));
@@ -20682,7 +20685,7 @@ const AicoNewsList = class {
20682
20685
  render() {
20683
20686
  var _a, _b, _c;
20684
20687
  return (index.h(index.Host, null, index.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) => {
20685
- return (index.h("div", { class: "col" }, index.h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
20688
+ return (index.h("div", { key: article.id, class: "col" }, index.h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
20686
20689
  var _a;
20687
20690
  (_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
20688
20691
  e.stopPropagation();
@@ -20745,14 +20748,35 @@ const AicoNewsListItem = class {
20745
20748
  this.articleIndex = 0;
20746
20749
  this.locale = 'de';
20747
20750
  }
20751
+ componentDidLoad() {
20752
+ const img = this.thisHtml.querySelector('img');
20753
+ if (img) {
20754
+ this.imageObserver = new IntersectionObserver(this.onIntersection);
20755
+ this.imageObserver.observe(img);
20756
+ }
20757
+ }
20758
+ async onIntersection(entries) {
20759
+ var _a;
20760
+ for (const entry of entries) {
20761
+ if (entry.isIntersecting) {
20762
+ (_a = this.imageObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
20763
+ const src = entry.target.getAttribute('data-src');
20764
+ if (src) {
20765
+ entry.target.setAttribute('src', src);
20766
+ entry.target.removeAttribute('data-src');
20767
+ }
20768
+ }
20769
+ }
20770
+ }
20748
20771
  render() {
20749
20772
  var _a, _b, _c, _d, _e, _f, _g;
20750
20773
  const translation = this.article.attributes.translations.find(t => t.locale === this.locale);
20751
20774
  return (index.h("div", { class: "card h-100 pe-auto", style: { cursor: 'pointer' }, onClick: () => {
20752
20775
  var _a;
20753
20776
  (_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(this.article);
20754
- } }, index.h("div", { class: "ratio ratio-16x9 overflow-hidden" }, index.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 }), index.h("div", { class: "card-img-overlay d-flex justify-content-end" })), index.h("div", { class: "card-body" }, index.h("h5", { class: "card-title" }, (_f = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _f !== void 0 ? _f : this.article.attributes.name), index.h("p", { class: "card-text" }, (_g = translation === null || translation === void 0 ? void 0 : translation.excerpt) !== null && _g !== void 0 ? _g : this.article.attributes.excerpt))));
20777
+ } }, index.h("div", { class: "ratio ratio-16x9 overflow-hidden" }, index.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 }), index.h("div", { class: "card-img-overlay d-flex justify-content-end" })), index.h("div", { class: "card-body" }, index.h("h5", { class: "card-title" }, (_f = translation === null || translation === void 0 ? void 0 : translation.name) !== null && _f !== void 0 ? _f : this.article.attributes.name), index.h("p", { class: "card-text" }, (_g = translation === null || translation === void 0 ? void 0 : translation.excerpt) !== null && _g !== void 0 ? _g : this.article.attributes.excerpt))));
20755
20778
  }
20779
+ get thisHtml() { return index.getElement(this); }
20756
20780
  };
20757
20781
  AicoNewsListItem.style = aicoNewsListItemCss;
20758
20782