@aiconomy/aico-components 0.0.154 → 0.0.164

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 (53) hide show
  1. package/README.md +48 -19
  2. package/dist/aico-components/aico-components.esm.js +1 -1
  3. package/dist/aico-components/aico-components.esm.js.map +1 -1
  4. package/dist/aico-components/{p-4c5e55f1.entry.js → p-43d0546f.entry.js} +4 -4
  5. package/dist/aico-components/p-43d0546f.entry.js.map +1 -0
  6. package/dist/cjs/{aico-album-content_26.cjs.entry.js → aico-album-content_27.cjs.entry.js} +100 -13
  7. package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -0
  8. package/dist/cjs/aico-components.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +1 -0
  11. package/dist/collection/components/aico-news-list/aico-news-list.css +2 -4
  12. package/dist/collection/components/aico-news-list/aico-news-list.js +43 -24
  13. package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
  14. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +2 -21
  15. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
  16. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +2 -2
  17. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
  18. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.css +12088 -0
  19. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js +253 -0
  20. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js.map +1 -0
  21. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.stories.js +30 -0
  22. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.stories.js.map +1 -0
  23. package/dist/collection/components/aico-top-news-carousel/test/aico-top-news-carousel.e2e.js +6 -0
  24. package/dist/collection/components/aico-top-news-carousel/test/aico-top-news-carousel.e2e.js.map +1 -0
  25. package/dist/collection/components/aico-top-news-carousel/test/aico-top-news-carousel.spec.js +6 -0
  26. package/dist/collection/components/aico-top-news-carousel/test/aico-top-news-carousel.spec.js.map +1 -0
  27. package/dist/collection/utils/utils.js +24 -1
  28. package/dist/collection/utils/utils.js.map +1 -1
  29. package/dist/components/aico-news-list-item2.js +2 -4
  30. package/dist/components/aico-news-list-item2.js.map +1 -1
  31. package/dist/components/aico-news-list.js +9 -7
  32. package/dist/components/aico-news-list.js.map +1 -1
  33. package/dist/components/aico-special-news-carousel.js +2 -2
  34. package/dist/components/aico-special-news-carousel.js.map +1 -1
  35. package/dist/components/aico-top-news-carousel.d.ts +11 -0
  36. package/dist/components/aico-top-news-carousel.js +101 -0
  37. package/dist/components/aico-top-news-carousel.js.map +1 -0
  38. package/dist/components/utils.js +25 -2
  39. package/dist/components/utils.js.map +1 -1
  40. package/dist/esm/{aico-album-content_26.entry.js → aico-album-content_27.entry.js} +100 -14
  41. package/dist/esm/aico-album-content_27.entry.js.map +1 -0
  42. package/dist/esm/aico-components.js +1 -1
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/types/components/aico-news-list/aico-news-list.d.ts +8 -4
  45. package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +0 -1
  46. package/dist/types/components/aico-top-news-carousel/aico-top-news-carousel.d.ts +59 -0
  47. package/dist/types/components/aico-top-news-carousel/aico-top-news-carousel.stories.d.ts +7 -0
  48. package/dist/types/components.d.ts +108 -6
  49. package/dist/types/utils/utils.d.ts +2 -1
  50. package/package.json +1 -1
  51. package/dist/aico-components/p-4c5e55f1.entry.js.map +0 -1
  52. package/dist/cjs/aico-album-content_26.cjs.entry.js.map +0 -1
  53. package/dist/esm/aico-album-content_26.entry.js.map +0 -1
@@ -14,7 +14,7 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_26",[[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"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"highlightTopArticles":[4,"highlight-top-articles"],"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"],"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"],"highlightTopArticle":[4,"highlight-top-article"],"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);
17
+ 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"],"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"],"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"],"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"],"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);
18
18
  });
19
19
 
20
20
  //# sourceMappingURL=aico-components.js.map
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-4621a8ba.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
- return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_26",[[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"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"highlightTopArticles":[4,"highlight-top-articles"],"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"],"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"],"highlightTopArticle":[4,"highlight-top-article"],"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);
6
+ 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"],"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"],"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"],"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"],"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);
7
7
  };
8
8
 
9
9
  export { defineCustomElements };
@@ -32,6 +32,14 @@ export declare class AicoNewsList {
32
32
  * Language locales as a comma separated list used to filter the results.
33
33
  */
34
34
  newsLanguageLocales: string;
35
+ /**
36
+ * Determines wheter top articles will be included in the list or not.
37
+ */
38
+ hideTopArticles: boolean;
39
+ /**
40
+ * Determines wheter special articles will be included in the list or not.
41
+ */
42
+ hideSpecialArticles: boolean;
35
43
  /**
36
44
  * The page size. Prefer this number to be even.
37
45
  */
@@ -56,10 +64,6 @@ export declare class AicoNewsList {
56
64
  * The handler receives the entire Article entity.
57
65
  */
58
66
  articleClick?: EventEmitter<Article>;
59
- /**
60
- * Determines if the top articles are highlighted by taking more space.
61
- */
62
- highlightTopArticles: boolean;
63
67
  private api?;
64
68
  private newsListFetchController?;
65
69
  connectedCallback(): void;
@@ -3,7 +3,6 @@ import { Article } from '../../model/Article';
3
3
  export declare class AicoNewsListItem {
4
4
  article: Article;
5
5
  articleIndex: number;
6
- highlightTopArticle: boolean;
7
6
  articleClick?: EventEmitter<Article>;
8
7
  /**
9
8
  * The article translation that will be used to render the content.
@@ -0,0 +1,59 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import type { NewsResponse } from '../../model/NewsResponse';
3
+ import type { Article } from '../../model/Article';
4
+ import 'slick-carousel';
5
+ export declare class AicoTopNewsCarousel {
6
+ newsResponse: NewsResponse;
7
+ newsChannelsArr: string[];
8
+ newsSellerIdsArr: string[];
9
+ newsBrandIdsArr: string[];
10
+ newsLanguageLocalesArr: string[];
11
+ /**
12
+ * The url of the Aico Api that will be used to retrieve the article.
13
+ */
14
+ aicoUrl: string;
15
+ /**
16
+ * The token used to authenticate against he Aico Api.
17
+ */
18
+ aicoBearerToken: string;
19
+ /**
20
+ * Channel names as a comma separated list used to filter the results.
21
+ */
22
+ newsChannels: string;
23
+ /**
24
+ * Seller ids as a comma separated list used to filter the results.
25
+ */
26
+ newsSellerIds: string;
27
+ /**
28
+ * Brand ids as a comma separated list used to filter the results.
29
+ */
30
+ newsBrandIds: string;
31
+ /**
32
+ * Language locales as a comma separated list used to filter the results.
33
+ */
34
+ newsLanguageLocales: string;
35
+ /**
36
+ * The number of articles shown in the carousel. Prefer this number to be small.
37
+ */
38
+ numberOfArticles: number;
39
+ /**
40
+ * The article translation that will be used to render the content.
41
+ *
42
+ * If the locale specified is not present in the article's translations, most content will not be shown.
43
+ */
44
+ locale: string;
45
+ /**
46
+ * Event emitted when a user clicks an article title.
47
+ *
48
+ * The handler receives the entire Article entity.
49
+ */
50
+ articleClicked?: EventEmitter<Article>;
51
+ private api?;
52
+ private newsListFetchController?;
53
+ connectedCallback(): void;
54
+ disconnectedCallback(): void;
55
+ componentWillLoad(): Promise<void>;
56
+ componentWillUpdate(): Promise<void>;
57
+ componentDidLoad(): void;
58
+ render(): any;
59
+ }
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components';
2
+ import { JSX } from '../../components';
3
+ declare const meta: Meta<JSX.AicoSpecialNewsCarousel>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Kj: Story;
7
+ export declare const Fcz: Story;
@@ -160,9 +160,13 @@ export namespace Components {
160
160
  */
161
161
  "aicoUrl": string;
162
162
  /**
163
- * Determines if the top articles are highlighted by taking more space.
163
+ * Determines wheter special articles will be included in the list or not.
164
164
  */
165
- "highlightTopArticles": boolean;
165
+ "hideSpecialArticles": boolean;
166
+ /**
167
+ * Determines wheter top articles will be included in the list or not.
168
+ */
169
+ "hideTopArticles": boolean;
166
170
  /**
167
171
  * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
168
172
  */
@@ -199,7 +203,6 @@ export namespace Components {
199
203
  interface AicoNewsListItem {
200
204
  "article": Article;
201
205
  "articleIndex": number;
202
- "highlightTopArticle": boolean;
203
206
  /**
204
207
  * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
205
208
  */
@@ -260,6 +263,40 @@ export namespace Components {
260
263
  "content": TitleContent;
261
264
  "locale": string;
262
265
  }
266
+ interface AicoTopNewsCarousel {
267
+ /**
268
+ * The token used to authenticate against he Aico Api.
269
+ */
270
+ "aicoBearerToken": string;
271
+ /**
272
+ * The url of the Aico Api that will be used to retrieve the article.
273
+ */
274
+ "aicoUrl": string;
275
+ /**
276
+ * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
277
+ */
278
+ "locale": string;
279
+ /**
280
+ * Brand ids as a comma separated list used to filter the results.
281
+ */
282
+ "newsBrandIds": string;
283
+ /**
284
+ * Channel names as a comma separated list used to filter the results.
285
+ */
286
+ "newsChannels": string;
287
+ /**
288
+ * Language locales as a comma separated list used to filter the results.
289
+ */
290
+ "newsLanguageLocales": string;
291
+ /**
292
+ * Seller ids as a comma separated list used to filter the results.
293
+ */
294
+ "newsSellerIds": string;
295
+ /**
296
+ * The number of articles shown in the carousel. Prefer this number to be small.
297
+ */
298
+ "numberOfArticles": number;
299
+ }
263
300
  interface AicoUploadContent {
264
301
  "content": UploadContent;
265
302
  "locale": string;
@@ -289,6 +326,10 @@ export interface AicoSpecialNewsCarouselCustomEvent<T> extends CustomEvent<T> {
289
326
  detail: T;
290
327
  target: HTMLAicoSpecialNewsCarouselElement;
291
328
  }
329
+ export interface AicoTopNewsCarouselCustomEvent<T> extends CustomEvent<T> {
330
+ detail: T;
331
+ target: HTMLAicoTopNewsCarouselElement;
332
+ }
292
333
  declare global {
293
334
  interface HTMLAicoAlbumContentElement extends Components.AicoAlbumContent, HTMLStencilElement {
294
335
  }
@@ -501,6 +542,23 @@ declare global {
501
542
  prototype: HTMLAicoTitleContentElement;
502
543
  new (): HTMLAicoTitleContentElement;
503
544
  };
545
+ interface HTMLAicoTopNewsCarouselElementEventMap {
546
+ "articleClicked": Article;
547
+ }
548
+ interface HTMLAicoTopNewsCarouselElement extends Components.AicoTopNewsCarousel, HTMLStencilElement {
549
+ addEventListener<K extends keyof HTMLAicoTopNewsCarouselElementEventMap>(type: K, listener: (this: HTMLAicoTopNewsCarouselElement, ev: AicoTopNewsCarouselCustomEvent<HTMLAicoTopNewsCarouselElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
550
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
551
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
552
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
553
+ removeEventListener<K extends keyof HTMLAicoTopNewsCarouselElementEventMap>(type: K, listener: (this: HTMLAicoTopNewsCarouselElement, ev: AicoTopNewsCarouselCustomEvent<HTMLAicoTopNewsCarouselElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
554
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
555
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
556
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
557
+ }
558
+ var HTMLAicoTopNewsCarouselElement: {
559
+ prototype: HTMLAicoTopNewsCarouselElement;
560
+ new (): HTMLAicoTopNewsCarouselElement;
561
+ };
504
562
  interface HTMLAicoUploadContentElement extends Components.AicoUploadContent, HTMLStencilElement {
505
563
  }
506
564
  var HTMLAicoUploadContentElement: {
@@ -540,6 +598,7 @@ declare global {
540
598
  "aico-testimonial-content": HTMLAicoTestimonialContentElement;
541
599
  "aico-text-content": HTMLAicoTextContentElement;
542
600
  "aico-title-content": HTMLAicoTitleContentElement;
601
+ "aico-top-news-carousel": HTMLAicoTopNewsCarouselElement;
543
602
  "aico-upload-content": HTMLAicoUploadContentElement;
544
603
  "aico-video-content": HTMLAicoVideoContentElement;
545
604
  }
@@ -656,9 +715,13 @@ declare namespace LocalJSX {
656
715
  */
657
716
  "aicoUrl": string;
658
717
  /**
659
- * Determines if the top articles are highlighted by taking more space.
718
+ * Determines wheter special articles will be included in the list or not.
719
+ */
720
+ "hideSpecialArticles"?: boolean;
721
+ /**
722
+ * Determines wheter top articles will be included in the list or not.
660
723
  */
661
- "highlightTopArticles"?: boolean;
724
+ "hideTopArticles"?: boolean;
662
725
  /**
663
726
  * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
664
727
  */
@@ -699,7 +762,6 @@ declare namespace LocalJSX {
699
762
  interface AicoNewsListItem {
700
763
  "article": Article;
701
764
  "articleIndex"?: number;
702
- "highlightTopArticle"?: boolean;
703
765
  /**
704
766
  * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
705
767
  */
@@ -766,6 +828,44 @@ declare namespace LocalJSX {
766
828
  "content": TitleContent;
767
829
  "locale"?: string;
768
830
  }
831
+ interface AicoTopNewsCarousel {
832
+ /**
833
+ * The token used to authenticate against he Aico Api.
834
+ */
835
+ "aicoBearerToken": string;
836
+ /**
837
+ * The url of the Aico Api that will be used to retrieve the article.
838
+ */
839
+ "aicoUrl": string;
840
+ /**
841
+ * The article translation that will be used to render the content. If the locale specified is not present in the article's translations, most content will not be shown.
842
+ */
843
+ "locale"?: string;
844
+ /**
845
+ * Brand ids as a comma separated list used to filter the results.
846
+ */
847
+ "newsBrandIds"?: string;
848
+ /**
849
+ * Channel names as a comma separated list used to filter the results.
850
+ */
851
+ "newsChannels"?: string;
852
+ /**
853
+ * Language locales as a comma separated list used to filter the results.
854
+ */
855
+ "newsLanguageLocales"?: string;
856
+ /**
857
+ * Seller ids as a comma separated list used to filter the results.
858
+ */
859
+ "newsSellerIds"?: string;
860
+ /**
861
+ * The number of articles shown in the carousel. Prefer this number to be small.
862
+ */
863
+ "numberOfArticles"?: number;
864
+ /**
865
+ * Event emitted when a user clicks an article title. The handler receives the entire Article entity.
866
+ */
867
+ "onArticleClicked"?: (event: AicoTopNewsCarouselCustomEvent<Article>) => void;
868
+ }
769
869
  interface AicoUploadContent {
770
870
  "content": UploadContent;
771
871
  "locale"?: string;
@@ -801,6 +901,7 @@ declare namespace LocalJSX {
801
901
  "aico-testimonial-content": AicoTestimonialContent;
802
902
  "aico-text-content": AicoTextContent;
803
903
  "aico-title-content": AicoTitleContent;
904
+ "aico-top-news-carousel": AicoTopNewsCarousel;
804
905
  "aico-upload-content": AicoUploadContent;
805
906
  "aico-video-content": AicoVideoContent;
806
907
  }
@@ -835,6 +936,7 @@ declare module "@stencil/core" {
835
936
  "aico-testimonial-content": LocalJSX.AicoTestimonialContent & JSXBase.HTMLAttributes<HTMLAicoTestimonialContentElement>;
836
937
  "aico-text-content": LocalJSX.AicoTextContent & JSXBase.HTMLAttributes<HTMLAicoTextContentElement>;
837
938
  "aico-title-content": LocalJSX.AicoTitleContent & JSXBase.HTMLAttributes<HTMLAicoTitleContentElement>;
939
+ "aico-top-news-carousel": LocalJSX.AicoTopNewsCarousel & JSXBase.HTMLAttributes<HTMLAicoTopNewsCarouselElement>;
838
940
  "aico-upload-content": LocalJSX.AicoUploadContent & JSXBase.HTMLAttributes<HTMLAicoUploadContentElement>;
839
941
  "aico-video-content": LocalJSX.AicoVideoContent & JSXBase.HTMLAttributes<HTMLAicoVideoContentElement>;
840
942
  }
@@ -1,8 +1,9 @@
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[]): 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): 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
+ export declare function fetchTopNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels?: string[], newsSellerIds?: string[], newsBrandIds?: string[], newsLanguageLocales?: string[]): Promise<NewsResponse>;
6
7
  export declare function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article>;
7
8
  export declare function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article | undefined>;
8
9
  export declare function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiconomy/aico-components",
3
- "version": "0.0.154",
3
+ "version": "0.0.164",
4
4
  "description": "Aiconomy components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",