@aiconomy/aico-components 0.0.191 → 0.0.202
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/README.md +1 -0
- package/dist/aico-components/aico-components.esm.js +1 -1
- package/dist/aico-components/aico-components.esm.js.map +1 -1
- package/dist/aico-components/{p-cec46101.entry.js → p-f077dbae.entry.js} +3 -3
- package/dist/aico-components/p-f077dbae.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_27.cjs.entry.js +11 -9
- package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-components.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js +26 -7
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/utils/utils.js +3 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/aico-news-list.js +9 -7
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/components/utils.js +3 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/aico-album-content_27.entry.js +11 -9
- package/dist/esm/aico-album-content_27.entry.js.map +1 -1
- package/dist/esm/aico-components.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ssr/index.js +12 -9
- package/dist/ssr/index.mjs +12 -9
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/aico-components/p-cec46101.entry.js.map +0 -1
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"hideTopArticles":[4,"hide-top-articles"],"hideSpecialArticles":[4,"hide-special-articles"],"latestNews":[4,"latest-news"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
|
|
19
|
+
return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"hideTopArticles":[4,"hide-top-articles"],"hideSpecialArticles":[4,"hide-special-articles"],"latestNews":[4,"latest-news"],"allBrands":[4,"all-brands"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=aico-components.js.map
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"hideTopArticles":[4,"hide-top-articles"],"hideSpecialArticles":[4,"hide-special-articles"],"latestNews":[4,"latest-news"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
|
|
8
|
+
return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"hideTopArticles":[4,"hide-top-articles"],"hideSpecialArticles":[4,"hide-special-articles"],"latestNews":[4,"latest-news"],"allBrands":[4,"all-brands"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"userAccessToken":[1,"user-access-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
package/dist/ssr/index.js
CHANGED
|
@@ -16000,15 +16000,16 @@ function setArrayFilter(queryParams, key, values) {
|
|
|
16000
16000
|
queryParams.append(key, value);
|
|
16001
16001
|
}
|
|
16002
16002
|
}
|
|
16003
|
-
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false, latestNews = false) {
|
|
16003
|
+
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false, latestNews = false, allBrands = false) {
|
|
16004
16004
|
const url = api.bearerToken
|
|
16005
16005
|
? 'news'
|
|
16006
16006
|
: api.accessToken
|
|
16007
16007
|
? latestNews
|
|
16008
|
-
?
|
|
16008
|
+
? `aico-shops/1/latest-news-resource`
|
|
16009
16009
|
: 'aico-shops/1/news-resource'
|
|
16010
16010
|
: '';
|
|
16011
16011
|
const queryParams = new URLSearchParams();
|
|
16012
|
+
queryParams.set('allBrands', `${allBrands}`);
|
|
16012
16013
|
queryParams.set('page[number]', String(page));
|
|
16013
16014
|
queryParams.set('page[size]', String(size));
|
|
16014
16015
|
if (api.bearerToken) {
|
|
@@ -23114,6 +23115,7 @@ class AicoNewsList {
|
|
|
23114
23115
|
this.hideTopArticles = true;
|
|
23115
23116
|
this.hideSpecialArticles = false;
|
|
23116
23117
|
this.latestNews = false;
|
|
23118
|
+
this.allBrands = false;
|
|
23117
23119
|
this.pageSize = 16;
|
|
23118
23120
|
this.nextButtonText = 'Next';
|
|
23119
23121
|
this.previousButtonText = 'Previous';
|
|
@@ -23132,37 +23134,37 @@ class AicoNewsList {
|
|
|
23132
23134
|
this.newsListFetchController.abort('disconnected');
|
|
23133
23135
|
}
|
|
23134
23136
|
async componentWillLoad() {
|
|
23135
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
23137
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews, this.allBrands);
|
|
23136
23138
|
}
|
|
23137
23139
|
async componentWillUpdate() {
|
|
23138
23140
|
this.newsListFetchController = new AbortController();
|
|
23139
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
23141
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews, this.allBrands);
|
|
23140
23142
|
}
|
|
23141
23143
|
render() {
|
|
23142
23144
|
var _a, _b, _c;
|
|
23143
|
-
return (hAsync(Host, { key: '
|
|
23145
|
+
return (hAsync(Host, { key: '3b912506f1bc1027ec80907b453870e493e8d881' }, hAsync("div", { key: 'aaafdcf6528bcd7d0536a91fc1001273facf37ac', class: "newslist-grid-container mb-4" }, (_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.data.map((article, articleIndex) => {
|
|
23144
23146
|
return (hAsync("div", { key: article.id, class: "col" }, hAsync("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
|
|
23145
23147
|
var _a;
|
|
23146
23148
|
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
23147
23149
|
e.stopPropagation();
|
|
23148
23150
|
}, locale: this.locale })));
|
|
23149
23151
|
})), !this.latestNews &&
|
|
23150
|
-
hAsync("nav", { key: '
|
|
23152
|
+
hAsync("nav", { key: '2783b8efc0ae58d2f87184e736179cf9d2d4bc25', class: "w-100", "aria-label": "News navigation" }, hAsync("ul", { key: 'f869acec5918679998dfbe027f5a10337b98bef8', class: "pagination justify-content-center" }, hAsync("li", { key: 'b36ddbf236adff317c6be81f1ae7a4d21168d7ca', class: `page-item page-link user-select-none d-flex align-items-center ${!((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.links.prev) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23151
23153
|
if (this.pageNumber > 1) {
|
|
23152
23154
|
this.pageNumber -= 1;
|
|
23153
23155
|
}
|
|
23154
23156
|
return false;
|
|
23155
|
-
} }, hAsync("svg", { key: '
|
|
23157
|
+
} }, hAsync("svg", { key: 'e0e326fa075bfd3e1543dedbf85bee8ce979ff6e', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-left me-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, hAsync("path", { key: 'aa1d02c300b89d34165584c759b2158800c93e59', "fill-rule": "evenodd", d: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" })), this.previousButtonText), this.getViewablePages().map(page => (hAsync("li", { class: `page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23156
23158
|
if (page !== '...') {
|
|
23157
23159
|
this.pageNumber = Number(page);
|
|
23158
23160
|
}
|
|
23159
23161
|
return false;
|
|
23160
|
-
} }, page))), hAsync("li", { key: '
|
|
23162
|
+
} }, page))), hAsync("li", { key: 'f220799fc4f1d1fb64a8f6d8acf580930d37cd1a', class: `page-item page-link user-select-none d-flex align-items-center ${!((_c = this.newsResponse) === null || _c === void 0 ? void 0 : _c.links.next) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23161
23163
|
var _a, _b;
|
|
23162
23164
|
if (((_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.meta.page.lastPage) && this.pageNumber < ((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.meta.page.lastPage)) {
|
|
23163
23165
|
this.pageNumber += 1;
|
|
23164
23166
|
}
|
|
23165
|
-
} }, this.nextButtonText, hAsync("svg", { key: '
|
|
23167
|
+
} }, this.nextButtonText, hAsync("svg", { key: '761c3fe193dd759e3ebe305badf11b26c82bed45', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-right ms-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, hAsync("path", { key: '9d4653443f049401d368fd785704f8ac0edbe78f', "fill-rule": "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" })))))));
|
|
23166
23168
|
}
|
|
23167
23169
|
getViewablePages(lookAhead = 2) {
|
|
23168
23170
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -23207,6 +23209,7 @@ class AicoNewsList {
|
|
|
23207
23209
|
"hideTopArticles": [4, "hide-top-articles"],
|
|
23208
23210
|
"hideSpecialArticles": [4, "hide-special-articles"],
|
|
23209
23211
|
"latestNews": [4, "latest-news"],
|
|
23212
|
+
"allBrands": [4, "all-brands"],
|
|
23210
23213
|
"pageSize": [2, "page-size"],
|
|
23211
23214
|
"nextButtonText": [1, "next-button-text"],
|
|
23212
23215
|
"previousButtonText": [1, "previous-button-text"],
|
package/dist/ssr/index.mjs
CHANGED
|
@@ -15996,15 +15996,16 @@ function setArrayFilter(queryParams, key, values) {
|
|
|
15996
15996
|
queryParams.append(key, value);
|
|
15997
15997
|
}
|
|
15998
15998
|
}
|
|
15999
|
-
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false, latestNews = false) {
|
|
15999
|
+
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false, latestNews = false, allBrands = false) {
|
|
16000
16000
|
const url = api.bearerToken
|
|
16001
16001
|
? 'news'
|
|
16002
16002
|
: api.accessToken
|
|
16003
16003
|
? latestNews
|
|
16004
|
-
?
|
|
16004
|
+
? `aico-shops/1/latest-news-resource`
|
|
16005
16005
|
: 'aico-shops/1/news-resource'
|
|
16006
16006
|
: '';
|
|
16007
16007
|
const queryParams = new URLSearchParams();
|
|
16008
|
+
queryParams.set('allBrands', `${allBrands}`);
|
|
16008
16009
|
queryParams.set('page[number]', String(page));
|
|
16009
16010
|
queryParams.set('page[size]', String(size));
|
|
16010
16011
|
if (api.bearerToken) {
|
|
@@ -23110,6 +23111,7 @@ class AicoNewsList {
|
|
|
23110
23111
|
this.hideTopArticles = true;
|
|
23111
23112
|
this.hideSpecialArticles = false;
|
|
23112
23113
|
this.latestNews = false;
|
|
23114
|
+
this.allBrands = false;
|
|
23113
23115
|
this.pageSize = 16;
|
|
23114
23116
|
this.nextButtonText = 'Next';
|
|
23115
23117
|
this.previousButtonText = 'Previous';
|
|
@@ -23128,37 +23130,37 @@ class AicoNewsList {
|
|
|
23128
23130
|
this.newsListFetchController.abort('disconnected');
|
|
23129
23131
|
}
|
|
23130
23132
|
async componentWillLoad() {
|
|
23131
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
23133
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews, this.allBrands);
|
|
23132
23134
|
}
|
|
23133
23135
|
async componentWillUpdate() {
|
|
23134
23136
|
this.newsListFetchController = new AbortController();
|
|
23135
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
23137
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews, this.allBrands);
|
|
23136
23138
|
}
|
|
23137
23139
|
render() {
|
|
23138
23140
|
var _a, _b, _c;
|
|
23139
|
-
return (hAsync(Host, { key: '
|
|
23141
|
+
return (hAsync(Host, { key: '3b912506f1bc1027ec80907b453870e493e8d881' }, hAsync("div", { key: 'aaafdcf6528bcd7d0536a91fc1001273facf37ac', class: "newslist-grid-container mb-4" }, (_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.data.map((article, articleIndex) => {
|
|
23140
23142
|
return (hAsync("div", { key: article.id, class: "col" }, hAsync("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
|
|
23141
23143
|
var _a;
|
|
23142
23144
|
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
23143
23145
|
e.stopPropagation();
|
|
23144
23146
|
}, locale: this.locale })));
|
|
23145
23147
|
})), !this.latestNews &&
|
|
23146
|
-
hAsync("nav", { key: '
|
|
23148
|
+
hAsync("nav", { key: '2783b8efc0ae58d2f87184e736179cf9d2d4bc25', class: "w-100", "aria-label": "News navigation" }, hAsync("ul", { key: 'f869acec5918679998dfbe027f5a10337b98bef8', class: "pagination justify-content-center" }, hAsync("li", { key: 'b36ddbf236adff317c6be81f1ae7a4d21168d7ca', class: `page-item page-link user-select-none d-flex align-items-center ${!((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.links.prev) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23147
23149
|
if (this.pageNumber > 1) {
|
|
23148
23150
|
this.pageNumber -= 1;
|
|
23149
23151
|
}
|
|
23150
23152
|
return false;
|
|
23151
|
-
} }, hAsync("svg", { key: '
|
|
23153
|
+
} }, hAsync("svg", { key: 'e0e326fa075bfd3e1543dedbf85bee8ce979ff6e', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-left me-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, hAsync("path", { key: 'aa1d02c300b89d34165584c759b2158800c93e59', "fill-rule": "evenodd", d: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" })), this.previousButtonText), this.getViewablePages().map(page => (hAsync("li", { class: `page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23152
23154
|
if (page !== '...') {
|
|
23153
23155
|
this.pageNumber = Number(page);
|
|
23154
23156
|
}
|
|
23155
23157
|
return false;
|
|
23156
|
-
} }, page))), hAsync("li", { key: '
|
|
23158
|
+
} }, page))), hAsync("li", { key: 'f220799fc4f1d1fb64a8f6d8acf580930d37cd1a', class: `page-item page-link user-select-none d-flex align-items-center ${!((_c = this.newsResponse) === null || _c === void 0 ? void 0 : _c.links.next) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
23157
23159
|
var _a, _b;
|
|
23158
23160
|
if (((_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.meta.page.lastPage) && this.pageNumber < ((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.meta.page.lastPage)) {
|
|
23159
23161
|
this.pageNumber += 1;
|
|
23160
23162
|
}
|
|
23161
|
-
} }, this.nextButtonText, hAsync("svg", { key: '
|
|
23163
|
+
} }, this.nextButtonText, hAsync("svg", { key: '761c3fe193dd759e3ebe305badf11b26c82bed45', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-right ms-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, hAsync("path", { key: '9d4653443f049401d368fd785704f8ac0edbe78f', "fill-rule": "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" })))))));
|
|
23162
23164
|
}
|
|
23163
23165
|
getViewablePages(lookAhead = 2) {
|
|
23164
23166
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -23203,6 +23205,7 @@ class AicoNewsList {
|
|
|
23203
23205
|
"hideTopArticles": [4, "hide-top-articles"],
|
|
23204
23206
|
"hideSpecialArticles": [4, "hide-special-articles"],
|
|
23205
23207
|
"latestNews": [4, "latest-news"],
|
|
23208
|
+
"allBrands": [4, "all-brands"],
|
|
23206
23209
|
"pageSize": [2, "page-size"],
|
|
23207
23210
|
"nextButtonText": [1, "next-button-text"],
|
|
23208
23211
|
"previousButtonText": [1, "previous-button-text"],
|
|
@@ -48,6 +48,10 @@ export declare class AicoNewsList {
|
|
|
48
48
|
* Determines wheter special articles will be included in the list or not.
|
|
49
49
|
*/
|
|
50
50
|
latestNews: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Determines wheter we show brand specific or general latest news
|
|
53
|
+
*/
|
|
54
|
+
allBrands: boolean;
|
|
51
55
|
/**
|
|
52
56
|
* The page size. Prefer this number to be even.
|
|
53
57
|
*/
|
|
@@ -159,6 +159,10 @@ export namespace Components {
|
|
|
159
159
|
* The url of the Aico Api that will be used to retrieve the article.
|
|
160
160
|
*/
|
|
161
161
|
"aicoUrl": string;
|
|
162
|
+
/**
|
|
163
|
+
* Determines wheter we show brand specific or general latest news
|
|
164
|
+
*/
|
|
165
|
+
"allBrands": boolean;
|
|
162
166
|
/**
|
|
163
167
|
* Determines wheter special articles will be included in the list or not.
|
|
164
168
|
*/
|
|
@@ -730,6 +734,10 @@ declare namespace LocalJSX {
|
|
|
730
734
|
* The url of the Aico Api that will be used to retrieve the article.
|
|
731
735
|
*/
|
|
732
736
|
"aicoUrl": string;
|
|
737
|
+
/**
|
|
738
|
+
* Determines wheter we show brand specific or general latest news
|
|
739
|
+
*/
|
|
740
|
+
"allBrands"?: boolean;
|
|
733
741
|
/**
|
|
734
742
|
* Determines wheter special articles will be included in the list or not.
|
|
735
743
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Article } from '../components';
|
|
2
2
|
import { AicoApiRequestInfo } from '../model/AicoApiRequestInfo';
|
|
3
3
|
import { NewsResponse } from '../model/NewsResponse';
|
|
4
|
-
export declare function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels?: string[], newsSellerIds?: string[], newsBrandIds?: string[], newsLanguageLocales?: string[], hideTopArticles?: boolean, hideSpecialArticles?: boolean, latestNews?: boolean): Promise<NewsResponse>;
|
|
4
|
+
export declare function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels?: string[], newsSellerIds?: string[], newsBrandIds?: string[], newsLanguageLocales?: string[], hideTopArticles?: boolean, hideSpecialArticles?: boolean, latestNews?: boolean, allBrands?: boolean): Promise<NewsResponse>;
|
|
5
5
|
export declare function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels?: string[], newsSellerIds?: string[], newsBrandIds?: string[], newsLanguageLocales?: string[]): Promise<NewsResponse>;
|
|
6
6
|
export declare function fetchTopNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels?: string[], newsSellerIds?: string[], newsBrandIds?: string[], newsLanguageLocales?: string[]): Promise<NewsResponse>;
|
|
7
7
|
export declare function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article>;
|