@aiconomy/aico-components 0.0.164 → 0.0.168
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-d4f3c776.entry.js → p-020898a6.entry.js} +2 -2
- package/dist/aico-components/p-253097be.js +3 -0
- package/dist/aico-components/p-253097be.js.map +1 -0
- package/dist/aico-components/{p-0d563d4f.entry.js → p-25cf4b75.entry.js} +2 -2
- package/dist/aico-components/{p-43d0546f.entry.js → p-aa633f51.entry.js} +4 -4
- package/dist/aico-components/p-aa633f51.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_27.cjs.entry.js +24 -3
- package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-asking-list-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-collection-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-components.cjs.js +1 -1
- package/dist/cjs/{index-e52034b7.js → index-0ce53322.js} +60 -2
- package/dist/cjs/index-0ce53322.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +22 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
- package/dist/components/aico-news-list-item2.js +22 -1
- package/dist/components/aico-news-list-item2.js.map +1 -1
- package/dist/components/aico-news-list.js +1 -1
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/esm/aico-album-content_27.entry.js +24 -3
- package/dist/esm/aico-album-content_27.entry.js.map +1 -1
- package/dist/esm/aico-asking-list-content.entry.js +1 -1
- package/dist/esm/aico-collection-content.entry.js +1 -1
- package/dist/esm/aico-components.js +2 -2
- package/dist/esm/{index-4621a8ba.js → index-1498b9e7.js} +60 -3
- package/dist/esm/index-1498b9e7.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +4 -0
- package/package.json +1 -1
- package/dist/aico-components/p-43d0546f.entry.js.map +0 -1
- package/dist/aico-components/p-ae20e789.js +0 -3
- package/dist/aico-components/p-ae20e789.js.map +0 -1
- package/dist/cjs/index-e52034b7.js.map +0 -1
- package/dist/esm/index-4621a8ba.js.map +0 -1
- /package/dist/aico-components/{p-d4f3c776.entry.js.map → p-020898a6.entry.js.map} +0 -0
- /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-
|
|
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
|
|
|
@@ -20682,7 +20682,7 @@ const AicoNewsList = class {
|
|
|
20682
20682
|
render() {
|
|
20683
20683
|
var _a, _b, _c;
|
|
20684
20684
|
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 => {
|
|
20685
|
+
return (index.h("div", { key: article.id, class: "col" }, index.h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
|
|
20686
20686
|
var _a;
|
|
20687
20687
|
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
20688
20688
|
e.stopPropagation();
|
|
@@ -20745,14 +20745,35 @@ const AicoNewsListItem = class {
|
|
|
20745
20745
|
this.articleIndex = 0;
|
|
20746
20746
|
this.locale = 'de';
|
|
20747
20747
|
}
|
|
20748
|
+
componentDidLoad() {
|
|
20749
|
+
const img = this.thisHtml.querySelector('img');
|
|
20750
|
+
if (img) {
|
|
20751
|
+
this.imageObserver = new IntersectionObserver(this.onIntersection);
|
|
20752
|
+
this.imageObserver.observe(img);
|
|
20753
|
+
}
|
|
20754
|
+
}
|
|
20755
|
+
async onIntersection(entries) {
|
|
20756
|
+
var _a;
|
|
20757
|
+
for (const entry of entries) {
|
|
20758
|
+
if (entry.isIntersecting) {
|
|
20759
|
+
(_a = this.imageObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
20760
|
+
const src = entry.target.getAttribute('data-src');
|
|
20761
|
+
if (src) {
|
|
20762
|
+
entry.target.setAttribute('src', src);
|
|
20763
|
+
entry.target.removeAttribute('data-src');
|
|
20764
|
+
}
|
|
20765
|
+
}
|
|
20766
|
+
}
|
|
20767
|
+
}
|
|
20748
20768
|
render() {
|
|
20749
20769
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
20750
20770
|
const translation = this.article.attributes.translations.find(t => t.locale === this.locale);
|
|
20751
20771
|
return (index.h("div", { class: "card h-100 pe-auto", style: { cursor: 'pointer' }, onClick: () => {
|
|
20752
20772
|
var _a;
|
|
20753
20773
|
(_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))));
|
|
20774
|
+
} }, 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
20775
|
}
|
|
20776
|
+
get thisHtml() { return index.getElement(this); }
|
|
20756
20777
|
};
|
|
20757
20778
|
AicoNewsListItem.style = aicoNewsListItemCss;
|
|
20758
20779
|
|