@aiconomy/aico-components 0.0.53 → 0.0.78
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 +67 -57
- package/dist/aico-components/aico-components.css +1 -1
- 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-0b6e7469.entry.js +2 -0
- package/dist/aico-components/p-0b6e7469.entry.js.map +1 -0
- package/dist/aico-components/p-19752961.entry.js +2 -0
- package/dist/aico-components/p-19752961.entry.js.map +1 -0
- package/dist/aico-components/p-2677f2ab.js +2 -0
- package/dist/aico-components/p-2677f2ab.js.map +1 -0
- package/dist/aico-components/{p-a58972e9.entry.js → p-368503ee.entry.js} +3 -3
- package/dist/aico-components/p-368503ee.entry.js.map +1 -0
- package/dist/aico-components/{p-b78d7799.entry.js → p-68930822.entry.js} +2 -2
- package/dist/aico-components/p-7e0074f7.entry.js +2 -0
- package/dist/aico-components/p-7e0074f7.entry.js.map +1 -0
- package/dist/aico-components/{p-1a6625c0.entry.js → p-90c2d3dc.entry.js} +2 -2
- package/dist/aico-components/p-9ea26390.entry.js +2 -0
- package/dist/aico-components/p-9ea26390.entry.js.map +1 -0
- package/dist/aico-components/p-ae20e789.js +3 -0
- package/dist/aico-components/{p-2aae1a0e.js.map → p-ae20e789.js.map} +1 -1
- package/dist/aico-components/p-bccf08d0.entry.js +2 -0
- package/dist/aico-components/p-bccf08d0.entry.js.map +1 -0
- package/dist/aico-components/p-c9eea1b1.entry.js +2 -0
- package/dist/aico-components/p-c9eea1b1.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_19.cjs.entry.js +78 -57
- package/dist/cjs/aico-album-content_19.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-article-detail.cjs.entry.js +19 -18
- package/dist/cjs/aico-article-detail.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 +2 -2
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js +12 -3
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-news-list-item.cjs.entry.js +6 -3
- package/dist/cjs/aico-news-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-news-list.cjs.entry.js +9 -8
- package/dist/cjs/aico-news-list.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-no-content_2.cjs.entry.js +6 -4
- package/dist/cjs/aico-no-content_2.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js +5 -4
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-75c0e002.js → index-e52034b7.js} +1 -6
- package/dist/cjs/index-e52034b7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-406a9df3.js → utils-c1b7a052.js} +20 -5
- package/dist/cjs/utils-c1b7a052.js.map +1 -0
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/aico-article-detail/aico-article-detail.js +36 -17
- package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js +49 -5
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map +1 -1
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js +6 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.css +0 -113
- package/dist/collection/components/aico-news-list/aico-news-list.js +23 -6
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js +3 -0
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js.map +1 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +6 -3
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +19 -2
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.js +22 -3
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.js.map +1 -1
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js +16 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js +21 -1
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js.map +1 -1
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js +18 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js +25 -5
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js.map +1 -1
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js +29 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js +25 -3
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js.map +1 -1
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js +35 -3
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js +22 -3
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js.map +1 -1
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js +10 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.js +21 -1
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.js.map +1 -1
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js +9 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-document-content/aico-document-content.js +22 -3
- package/dist/collection/components/content/aico-document-content/aico-document-content.js.map +1 -1
- package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js +11 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.js +21 -1
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.js.map +1 -1
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js +25 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.js +22 -2
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.js.map +1 -1
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js +10 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-html-content/aico-html-content.js +22 -4
- package/dist/collection/components/content/aico-html-content/aico-html-content.js.map +1 -1
- package/dist/collection/components/content/aico-link-content/aico-link-content.js +22 -3
- package/dist/collection/components/content/aico-link-content/aico-link-content.js.map +1 -1
- package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js +24 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-page-content/aico-page-content.js +23 -4
- package/dist/collection/components/content/aico-page-content/aico-page-content.js.map +1 -1
- package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js +11 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-table-content/aico-table-content.js +26 -6
- package/dist/collection/components/content/aico-table-content/aico-table-content.js.map +1 -1
- package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js +58 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-text-content/aico-text-content.js +27 -11
- package/dist/collection/components/content/aico-text-content/aico-text-content.js.map +1 -1
- package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js +55 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-title-content/aico-title-content.js +23 -3
- package/dist/collection/components/content/aico-title-content/aico-title-content.js.map +1 -1
- package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js +12 -1
- package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.js +22 -2
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.js.map +1 -1
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js +8 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js.map +1 -1
- package/dist/collection/components/content/aico-video-content/aico-video-content.js +22 -2
- package/dist/collection/components/content/aico-video-content/aico-video-content.js.map +1 -1
- package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js +17 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js.map +1 -1
- package/dist/collection/model/article/content/CarouselContent.js.map +1 -1
- package/dist/collection/utils/utils.js +18 -4
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/aico-article-detail2.js +20 -18
- package/dist/components/aico-article-detail2.js.map +1 -1
- package/dist/components/aico-asking-content2.js +6 -4
- package/dist/components/aico-asking-content2.js.map +1 -1
- package/dist/components/aico-block-quote-content2.js +5 -2
- package/dist/components/aico-block-quote-content2.js.map +1 -1
- package/dist/components/aico-bullet-content2.js +9 -6
- package/dist/components/aico-bullet-content2.js.map +1 -1
- package/dist/components/aico-carousel-content2.js +9 -4
- package/dist/components/aico-carousel-content2.js.map +1 -1
- package/dist/components/aico-content-card-content2.js +6 -4
- package/dist/components/aico-content-card-content2.js.map +1 -1
- package/dist/components/aico-divider-content2.js +5 -2
- package/dist/components/aico-divider-content2.js.map +1 -1
- package/dist/components/aico-document-content2.js +6 -4
- package/dist/components/aico-document-content2.js.map +1 -1
- package/dist/components/aico-faq-content2.js +5 -2
- package/dist/components/aico-faq-content2.js.map +1 -1
- package/dist/components/aico-fetch-article-detail.js +14 -3
- package/dist/components/aico-fetch-article-detail.js.map +1 -1
- package/dist/components/aico-heading-content2.js +6 -3
- package/dist/components/aico-heading-content2.js.map +1 -1
- package/dist/components/aico-html-content2.js +7 -12
- package/dist/components/aico-html-content2.js.map +1 -1
- package/dist/components/aico-link-content2.js +6 -4
- package/dist/components/aico-link-content2.js.map +1 -1
- package/dist/components/aico-news-list-item2.js +5 -2
- package/dist/components/aico-news-list-item2.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/aico-page-content2.js +7 -5
- package/dist/components/aico-page-content2.js.map +1 -1
- package/dist/components/aico-special-news-carousel.js +5 -3
- package/dist/components/aico-special-news-carousel.js.map +1 -1
- package/dist/components/aico-table-content2.js +10 -7
- package/dist/components/aico-table-content2.js.map +1 -1
- package/dist/components/aico-text-content2.js +10 -13
- package/dist/components/aico-text-content2.js.map +1 -1
- package/dist/components/aico-title-content2.js +7 -4
- package/dist/components/aico-title-content2.js.map +1 -1
- package/dist/components/aico-upload-content2.js +6 -3
- package/dist/components/aico-upload-content2.js.map +1 -1
- package/dist/components/aico-video-content2.js +6 -3
- package/dist/components/aico-video-content2.js.map +1 -1
- package/dist/components/utils.js +19 -5
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/aico-album-content_19.entry.js +78 -57
- package/dist/esm/aico-album-content_19.entry.js.map +1 -1
- package/dist/esm/aico-article-detail.entry.js +19 -18
- package/dist/esm/aico-article-detail.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 +3 -3
- package/dist/esm/aico-fetch-article-detail.entry.js +12 -3
- package/dist/esm/aico-fetch-article-detail.entry.js.map +1 -1
- package/dist/esm/aico-news-list-item.entry.js +6 -3
- package/dist/esm/aico-news-list-item.entry.js.map +1 -1
- package/dist/esm/aico-news-list.entry.js +9 -8
- package/dist/esm/aico-news-list.entry.js.map +1 -1
- package/dist/esm/aico-no-content_2.entry.js +6 -4
- package/dist/esm/aico-no-content_2.entry.js.map +1 -1
- package/dist/esm/aico-special-news-carousel.entry.js +5 -4
- package/dist/esm/aico-special-news-carousel.entry.js.map +1 -1
- package/dist/esm/{index-f9f11572.js → index-4621a8ba.js} +2 -6
- package/dist/esm/index-4621a8ba.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-2b7ec879.js → utils-b4eec8e9.js} +20 -6
- package/dist/esm/utils-b4eec8e9.js.map +1 -0
- package/dist/types/components/aico-article-detail/aico-article-detail.d.ts +1 -0
- package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.d.ts +15 -1
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +2 -1
- package/dist/types/components/aico-news-list/aico-news-list.stories.d.ts +2 -1
- package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +1 -1
- package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.d.ts +1 -0
- package/dist/types/components/content/aico-asking-content/aico-asking-content.d.ts +1 -0
- package/dist/types/components/content/aico-block-quote-content/aico-block-quote-content.d.ts +1 -0
- package/dist/types/components/content/aico-bullet-content/aico-bullet-content.d.ts +1 -0
- package/dist/types/components/content/aico-carousel-content/aico-carousel-content.d.ts +1 -0
- package/dist/types/components/content/aico-content-card-content/aico-content-card-content.d.ts +1 -0
- package/dist/types/components/content/aico-divider-content/aico-divider-content.d.ts +1 -0
- package/dist/types/components/content/aico-document-content/aico-document-content.d.ts +1 -0
- package/dist/types/components/content/aico-faq-content/aico-faq-content.d.ts +1 -0
- package/dist/types/components/content/aico-heading-content/aico-heading-content.d.ts +1 -0
- package/dist/types/components/content/aico-html-content/aico-html-content.d.ts +1 -0
- package/dist/types/components/content/aico-link-content/aico-link-content.d.ts +1 -0
- package/dist/types/components/content/aico-page-content/aico-page-content.d.ts +1 -0
- package/dist/types/components/content/aico-table-content/aico-table-content.d.ts +1 -0
- package/dist/types/components/content/aico-text-content/aico-text-content.d.ts +1 -0
- package/dist/types/components/content/aico-title-content/aico-title-content.d.ts +1 -0
- package/dist/types/components/content/aico-upload-content/aico-upload-content.d.ts +1 -0
- package/dist/types/components/content/aico-video-content/aico-video-content.d.ts +1 -0
- package/dist/types/components.d.ts +62 -19
- package/dist/types/model/article/content/CarouselContent.d.ts +4 -2
- package/dist/types/utils/utils.d.ts +3 -2
- package/package.json +3 -2
- package/dist/aico-components/p-2aae1a0e.js +0 -3
- package/dist/aico-components/p-31666f10.js +0 -2
- package/dist/aico-components/p-31666f10.js.map +0 -1
- package/dist/aico-components/p-42b98baf.entry.js +0 -2
- package/dist/aico-components/p-42b98baf.entry.js.map +0 -1
- package/dist/aico-components/p-54708dd0.entry.js +0 -2
- package/dist/aico-components/p-54708dd0.entry.js.map +0 -1
- package/dist/aico-components/p-776352ba.entry.js +0 -2
- package/dist/aico-components/p-776352ba.entry.js.map +0 -1
- package/dist/aico-components/p-7c05cd02.entry.js +0 -2
- package/dist/aico-components/p-7c05cd02.entry.js.map +0 -1
- package/dist/aico-components/p-83655dd4.entry.js +0 -2
- package/dist/aico-components/p-83655dd4.entry.js.map +0 -1
- package/dist/aico-components/p-a58972e9.entry.js.map +0 -1
- package/dist/aico-components/p-b0325a83.entry.js +0 -2
- package/dist/aico-components/p-b0325a83.entry.js.map +0 -1
- package/dist/aico-components/p-c99617a8.entry.js +0 -2
- package/dist/aico-components/p-c99617a8.entry.js.map +0 -1
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js +0 -38
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js.map +0 -1
- package/dist/cjs/index-75c0e002.js.map +0 -1
- package/dist/cjs/utils-406a9df3.js.map +0 -1
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.css +0 -6
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js +0 -37
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js.map +0 -1
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js +0 -6
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js.map +0 -1
- package/dist/collection/components/content/content-styles.css +0 -113
- package/dist/components/bootstrap-slick-test.d.ts +0 -11
- package/dist/components/bootstrap-slick-test.js +0 -51
- package/dist/components/bootstrap-slick-test.js.map +0 -1
- package/dist/esm/bootstrap-slick-test.entry.js +0 -34
- package/dist/esm/bootstrap-slick-test.entry.js.map +0 -1
- package/dist/esm/index-f9f11572.js.map +0 -1
- package/dist/esm/utils-2b7ec879.js.map +0 -1
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.d.ts +0 -5
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.stories.d.ts +0 -5
- /package/dist/aico-components/{p-b78d7799.entry.js.map → p-68930822.entry.js.map} +0 -0
- /package/dist/aico-components/{p-1a6625c0.entry.js.map → p-90c2d3dc.entry.js.map} +0 -0
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e52034b7.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy([["aico-fetch-article-detail.cjs",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"articleId":[1,"article-id"],"article":[32]}]]],["aico-news-list.cjs",[[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"newsResponse":[32],"pageNumber":[32]}]]],["aico-asking-list-content.cjs",[[6,"aico-asking-list-content"]]],["aico-collection-content.cjs",[[6,"aico-collection-content"]]],["aico-special-news-carousel.cjs",[[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"numberOfArticles":[2,"number-of-articles"],"newsResponse":[32]}]]],["
|
|
9
|
+
return index.bootstrapLazy([["aico-fetch-article-detail.cjs",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}]]],["aico-news-list.cjs",[[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[16],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"newsResponse":[32],"pageNumber":[32]}]]],["aico-asking-list-content.cjs",[[6,"aico-asking-list-content"]]],["aico-collection-content.cjs",[[6,"aico-collection-content"]]],["aico-special-news-carousel.cjs",[[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[16],"numberOfArticles":[2,"number-of-articles"],"newsResponse":[32]}]]],["aico-no-content_2.cjs",[[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]],["aico-album-content_19.cjs",[[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]}]]],["aico-article-detail.cjs",[[2,"aico-article-detail",{"article":[16],"locale":[1]}]]],["aico-news-list-item.cjs",[[2,"aico-news-list-item",{"article":[16]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -13,26 +13,32 @@ const getAuthenticatedRequest = (api, route, query, signal) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
async function fetchNewsArticles(api, page, size, signal) {
|
|
16
|
+
async function fetchNewsArticles(api, page, size, signal, newsChannels = []) {
|
|
17
17
|
const queryParams = new URLSearchParams();
|
|
18
18
|
queryParams.set('page[number]', String(page));
|
|
19
19
|
queryParams.set('page[size]', String(size));
|
|
20
|
+
queryParams.set('sort', '-publishDate');
|
|
20
21
|
queryParams.set('filter[isActive]', '1');
|
|
21
22
|
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
22
|
-
|
|
23
|
+
for (const newsChannel of newsChannels) {
|
|
24
|
+
queryParams.set('filter[channel][]', newsChannel);
|
|
25
|
+
}
|
|
23
26
|
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
24
27
|
const response = await fetch(request);
|
|
25
28
|
return await response.json();
|
|
26
29
|
}
|
|
27
|
-
async function fetchSpecialNewsArticles(api, page, size, signal) {
|
|
30
|
+
async function fetchSpecialNewsArticles(api, page, size, signal, newsChannels = []) {
|
|
28
31
|
const queryParams = new URLSearchParams();
|
|
29
32
|
queryParams.set('page[number]', String(page));
|
|
30
33
|
queryParams.set('page[size]', String(size));
|
|
34
|
+
queryParams.set('sort', '-publishDate');
|
|
31
35
|
queryParams.set('filter[isActive]', '1');
|
|
32
36
|
queryParams.set('filter[isSpecialArticle]', '1');
|
|
33
37
|
queryParams.set('filter[isLightVersion]', 'true');
|
|
34
38
|
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
35
|
-
|
|
39
|
+
for (const newsChannel of newsChannels) {
|
|
40
|
+
queryParams.set('filter[channel][]', newsChannel);
|
|
41
|
+
}
|
|
36
42
|
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
37
43
|
const response = await fetch(request);
|
|
38
44
|
return await response.json();
|
|
@@ -43,6 +49,14 @@ async function fetchNewsArticle(api, articleId, signal) {
|
|
|
43
49
|
const article = await response.json();
|
|
44
50
|
return article.data;
|
|
45
51
|
}
|
|
52
|
+
async function fetchNewsArticleByHandle(api, urlHandle, signal) {
|
|
53
|
+
const queryParams = new URLSearchParams();
|
|
54
|
+
queryParams.set('filter[urlHandle]', urlHandle);
|
|
55
|
+
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
56
|
+
const response = await fetch(request);
|
|
57
|
+
const articles = await response.json();
|
|
58
|
+
return articles.data[0];
|
|
59
|
+
}
|
|
46
60
|
function getImageWidthPrc(pictureSize) {
|
|
47
61
|
switch (pictureSize) {
|
|
48
62
|
case 'extra-small':
|
|
@@ -82,6 +96,7 @@ function getClass(conditions) {
|
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
exports.fetchNewsArticle = fetchNewsArticle;
|
|
99
|
+
exports.fetchNewsArticleByHandle = fetchNewsArticleByHandle;
|
|
85
100
|
exports.fetchNewsArticles = fetchNewsArticles;
|
|
86
101
|
exports.fetchSpecialNewsArticles = fetchSpecialNewsArticles;
|
|
87
102
|
exports.getClass = getClass;
|
|
@@ -89,4 +104,4 @@ exports.getImageWidthPrc = getImageWidthPrc;
|
|
|
89
104
|
exports.getYoutubeURL = getYoutubeURL;
|
|
90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KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE;QAClC,OAAO,iCAAiC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;KACpD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;SAEe,4BAA4B,CAAC,GAAmB;IAC9D,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE;QACvB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,QAAQ,CAAC,UAAsC;IAC7D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC5C,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;YACV,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACtB;KACF;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B;;;;;;;;;;;","names":[],"sources":["src/model/AicoApiRequestInfo.ts","src/utils/utils.ts"],"sourcesContent":["export type AicoApiRequestInfo = {\n baseApi: string;\n bearerToken: string;\n};\n\nexport const getAuthenticatedHeaders = (bearerToken: string): Headers => {\n const headers = new Headers();\n headers.append('Accept', 'application/vnd.api+json');\n headers.append('Authorization', `Bearer ${bearerToken}`);\n return headers;\n};\n\nexport const getAuthenticatedRequest = (api: AicoApiRequestInfo, route: string, query: URLSearchParams, signal?: AbortSignal): Request => {\n return new Request(new URL(`${route}?${query.toString()}`, api.baseApi), {\n headers: getAuthenticatedHeaders(api.bearerToken),\n signal,\n });\n};\n","import { Article } from '../components';\nimport { AicoApiRequestInfo, getAuthenticatedHeaders, getAuthenticatedRequest } from '../model/AicoApiRequestInfo';\nimport { NewsResponse } from '../model/NewsResponse';\n\nexport async function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels: string[] = []): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n for (const newsChannel of newsChannels) {\n queryParams.set('filter[channel][]', newsChannel);\n }\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels: string[] = []): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[isSpecialArticle]', '1');\n queryParams.set('filter[isLightVersion]', 'true');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n for (const newsChannel of newsChannels) {\n queryParams.set('filter[channel][]', newsChannel);\n }\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article> {\n const request = getAuthenticatedRequest(api, `news/${articleId}`, new URLSearchParams(), signal);\n const response = await fetch(request);\n const article = await response.json();\n return article.data;\n}\n\nexport async function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article> {\n const queryParams = new URLSearchParams();\n queryParams.set('filter[urlHandle]', urlHandle);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n const articles = await response.json();\n return articles.data[0];\n}\n\nexport async function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article> {\n const request = new Request(new URL(url), {\n headers: getAuthenticatedHeaders(bearerToken),\n signal,\n });\n const response = await fetch(request);\n return await response.json();\n}\n\nexport function getImageWidthPrc(pictureSize?: string): string {\n switch (pictureSize) {\n case 'extra-small':\n return '28%';\n case 'small':\n return '40%';\n case 'large':\n return '80%';\n case 'extra large': // TODO: has - or not?\n return '100%';\n default:\n return '60%';\n }\n}\n\nexport function getYoutubeURL(url: string): string | null {\n const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#&?]*).*/;\n const match = url.match(regExp);\n if (match && match[1].length == 11) {\n return `https://www.youtube.com/embed/${match[1]}`;\n }\n\n return null;\n}\n\nexport function strIsNullOrEmptyOrWhitespace(str?: string | null): boolean {\n if (!str || str === ' ') {\n return true;\n }\n\n return false;\n}\n\nexport function getClass(conditions: { [key: string]: boolean }): string {\n const classes: string[] = [];\n for (const kvp of Object.entries(conditions)) {\n if (kvp[1]) {\n classes.push(kvp[0]);\n }\n }\n\n return classes.join(' ');\n}\n"],"version":3}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"components/aico-news-list/aico-news-list.js",
|
|
6
6
|
"components/aico-news-list-item/aico-news-list-item.js",
|
|
7
7
|
"components/aico-special-news-carousel/aico-special-news-carousel.js",
|
|
8
|
-
"components/bootstrap-slick-test/bootstrap-slick-test.js",
|
|
9
8
|
"components/content/aico-album-content/aico-album-content.js",
|
|
10
9
|
"components/content/aico-asking-content/aico-asking-content.js",
|
|
11
10
|
"components/content/aico-asking-list-content/aico-asking-list-content.js",
|
|
@@ -4,6 +4,7 @@ export class AicoArticleDetail {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
this.dateOptions = { day: 'numeric', month: 'long', year: 'numeric' };
|
|
6
6
|
this.article = undefined;
|
|
7
|
+
this.locale = 'de';
|
|
7
8
|
}
|
|
8
9
|
render() {
|
|
9
10
|
const articleDate = new Date(this.article.attributes.publishDate);
|
|
@@ -26,43 +27,43 @@ export class AicoArticleDetail {
|
|
|
26
27
|
case ContentType.ALBUM:
|
|
27
28
|
return h("aico-album-content", { content: content });
|
|
28
29
|
case ContentType.ASKING:
|
|
29
|
-
return h("aico-asking-content", { content: content });
|
|
30
|
+
return h("aico-asking-content", { content: content, locale: this.locale });
|
|
30
31
|
case ContentType.BLOCK_QUOTE:
|
|
31
|
-
return h("aico-block-quote-content", { content: content });
|
|
32
|
+
return h("aico-block-quote-content", { content: content, locale: this.locale });
|
|
32
33
|
case ContentType.BULLET:
|
|
33
|
-
return h("aico-bullet-content", { content: content });
|
|
34
|
+
return h("aico-bullet-content", { content: content, locale: this.locale });
|
|
34
35
|
case ContentType.CAROUSEL:
|
|
35
|
-
return h("aico-carousel-content", { content: content });
|
|
36
|
+
return h("aico-carousel-content", { content: content, locale: this.locale });
|
|
36
37
|
case ContentType.CONTENT_CARD:
|
|
37
|
-
return h("aico-content-card-content", { content: content });
|
|
38
|
+
return h("aico-content-card-content", { content: content, locale: this.locale });
|
|
38
39
|
case ContentType.DIVIDER:
|
|
39
|
-
return h("aico-divider-content", { content: content });
|
|
40
|
+
return h("aico-divider-content", { content: content, locale: this.locale });
|
|
40
41
|
case ContentType.DOCUMENT:
|
|
41
|
-
return h("aico-document-content", { content: content });
|
|
42
|
+
return h("aico-document-content", { content: content, locale: this.locale });
|
|
42
43
|
case ContentType.FAQ:
|
|
43
|
-
return h("aico-faq-content", { content: content });
|
|
44
|
+
return h("aico-faq-content", { content: content, locale: this.locale });
|
|
44
45
|
case ContentType.HEADING:
|
|
45
|
-
return h("aico-heading-content", { content: content });
|
|
46
|
+
return h("aico-heading-content", { content: content, locale: this.locale });
|
|
46
47
|
case ContentType.HTML:
|
|
47
|
-
return h("aico-html-content", { content: content });
|
|
48
|
+
return h("aico-html-content", { content: content, locale: this.locale });
|
|
48
49
|
case ContentType.LINK:
|
|
49
|
-
return h("aico-link-content", { content: content });
|
|
50
|
+
return h("aico-link-content", { content: content, locale: this.locale });
|
|
50
51
|
case ContentType.NEWS:
|
|
51
52
|
return h("aico-news-content", { content: content });
|
|
52
53
|
case ContentType.PAGE:
|
|
53
|
-
return h("aico-page-content", { content: content });
|
|
54
|
+
return h("aico-page-content", { content: content, locale: this.locale });
|
|
54
55
|
case ContentType.TABLE:
|
|
55
|
-
return h("aico-table-content", { content: content });
|
|
56
|
+
return h("aico-table-content", { content: content, locale: this.locale });
|
|
56
57
|
case ContentType.TESTIMONIAL:
|
|
57
58
|
return h("aico-testimonial-content", { content: content });
|
|
58
59
|
case ContentType.TEXT:
|
|
59
|
-
return h("aico-text-content", { content: content });
|
|
60
|
+
return h("aico-text-content", { content: content, locale: this.locale });
|
|
60
61
|
case ContentType.TITLE:
|
|
61
|
-
return h("aico-title-content", { content: content });
|
|
62
|
+
return h("aico-title-content", { content: content, locale: this.locale });
|
|
62
63
|
case ContentType.UPLOAD:
|
|
63
|
-
return h("aico-upload-content", { content: content });
|
|
64
|
+
return h("aico-upload-content", { content: content, locale: this.locale });
|
|
64
65
|
case ContentType.VIDEO:
|
|
65
|
-
return h("aico-video-content", { content: content });
|
|
66
|
+
return h("aico-video-content", { content: content, locale: this.locale });
|
|
66
67
|
case ContentType.PRODUCT:
|
|
67
68
|
case ContentType.AGENDA:
|
|
68
69
|
case ContentType.LIST_ASKING:
|
|
@@ -110,6 +111,24 @@ export class AicoArticleDetail {
|
|
|
110
111
|
"tags": [],
|
|
111
112
|
"text": ""
|
|
112
113
|
}
|
|
114
|
+
},
|
|
115
|
+
"locale": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "string",
|
|
120
|
+
"resolved": "string",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": ""
|
|
128
|
+
},
|
|
129
|
+
"attribute": "locale",
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"defaultValue": "'de'"
|
|
113
132
|
}
|
|
114
133
|
};
|
|
115
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-article-detail.js","sourceRoot":"","sources":["../../../src/components/aico-article-detail/aico-article-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AA4B9D,MAAM,OAAO,iBAAiB;;QAGX,gBAAW,GAA+B,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;;IAE9G,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;QAClJ,OAAO,CACL,EAAC,IAAI;YACH;gBACE,kBAAY,KAAK,EAAC,YAAY;oBAC5B,UAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAM,CACnD;gBACb,kBAAY,KAAK,EAAC,mBAAmB;oBAClC,WAAW,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC;;oBAAK,YAAM,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAQ,CAChH,CACN;YACT,WAAK,KAAK,EAAC,iBAAiB,IAAE,OAAO,CAAO,CACvC,CACR,CAAC;IACJ,CAAC;IAEO,aAAa,C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KAAK,WAAW,CAAC,KAAK;gBACpB,OAAO,0BAAoB,OAAO,EAAE,OAAuB,GAAI,CAAC;YAElE,KAAK,WAAW,CAAC,MAAM;gBACrB,OAAO,2BAAqB,OAAO,EAAE,OAAwB,GAAI,CAAC;YAEpE,KAAK,WAAW,CAAC,KAAK;gBACpB,OAAO,0BAAoB,OAAO,EAAE,OAAuB,GAAI,CAAC;YAElE,KAAK,WAAW,CAAC,OAAO,CAAC;YACzB,KAAK,WAAW,CAAC,MAAM,CAAC;YACxB,KAAK,WAAW,CAAC,WAAW,CAAC;YAC7B,KAAK,WAAW,CAAC,WAAW,CAAC;YAC7B,KAAK,WAAW,CAAC,GAAG,CAAC;YACrB,KAAK,WAAW,CAAC,GAAG,CAAC;YACrB,KAAK,WAAW,CAAC,YAAY,CAAC;YAC9B,KAAK,WAAW,CAAC,MAAM,CAAC;YACxB,KAAK,WAAW,CAAC,UAAU,CAAC;YAC5B;gBACE,OAAO,WAAK,KAAK,EAAC,uCAAuC,gCAAgC,CAAC;SAC7F;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport { ContentType } from '../../model/article/ContentType';\nimport type { Article, ArticleContent, ArticleContentBuilderColumn, ArticleContentBuilderRow } from '../../model/Article';\nimport type { HtmlContent } from '../../model/article/content/HtmlContent';\nimport type { AlbumContent } from '../../model/article/content/AlbumContent';\nimport type { TitleContent } from '../../model/article/content/TitleContent';\nimport type { BlockQuoteContent } from '../../model/article/content/BlockQuoteContent';\nimport type { BulletContent } from '../../model/article/content/BulletContent';\nimport type { CardContent } from '../../model/article/content/CardContent';\nimport type { CarouselContent } from '../../model/article/content/CarouselContent';\nimport type { DividerContent } from '../../model/article/content/DividerContent';\nimport type { DocumentContent } from '../../model/article/content/DocumentContent';\nimport type { HeadingContent } from '../../model/article/content/HeadingContent';\nimport type { LinkContent } from '../../model/article/content/LinkContent';\nimport type { TableContent } from '../../model/article/content/TableContet';\nimport type { TestimonialContent } from '../../model/article/content/TestimonialContent';\nimport type { TextContent } from '../../model/article/content/TextContent';\nimport type { VideoContent } from '../../model/article/content/VideoContent';\nimport type { AskingContent } from '../../model/article/content/AskingContent';\nimport type { FaqContent } from '../../model/article/content/FaqContent';\nimport type { NewsContent } from '../../model/article/content/NewsContent';\nimport type { PageContent } from '../../model/article/content/PageContent';\nimport type { UploadContent } from '../../model/article/content/UploadContent';\n\n@Component({\n tag: 'aico-article-detail',\n styleUrl: 'aico-article-detail.css',\n scoped: true,\n})\nexport class AicoArticleDetail {\n @Prop() article!: Article;\n\n private readonly dateOptions: Intl.DateTimeFormatOptions = { day: 'numeric', month: 'long', year: 'numeric' };\n\n render() {\n const articleDate = new Date(this.article.attributes.publishDate);\n const content = this.article.attributes.contentBuilder.rows.sort((a, b) => a.order - b.order).map((row, index) => this.mapRowContent(row, index));\n return (\n <Host>\n <figure>\n <blockquote class=\"blockquote\">\n <h2 class=\"text-uppercase\">{this.article.attributes.name}</h2>\n </blockquote>\n <figcaption class=\"blockquote-footer\">\n {articleDate.toLocaleDateString('en-US', this.dateOptions)} by <cite title=\"Author\">{this.article.attributes.author}</cite>\n </figcaption>\n </figure>\n <div class=\"content-wrapper\">{content}</div>\n </Host>\n );\n }\n\n private mapRowContent(row: ArticleContentBuilderRow, index: number) {\n const rowContent = row.columns.map((column, columnIndex) => this.mapColumnContent(column, columnIndex));\n return <div class={`content-row content-row-index-${index}`}>{rowContent}</div>;\n }\n\n private mapColumnContent(column: ArticleContentBuilderColumn, index: number) {\n const columnContent = column.contentContainer.contents.sort((a, b) => (a.sort ?? 0) - (b.sort ?? 0)).map((content, contentIndex) => this.mapContent(content, contentIndex));\n return <div class={`content-column content-column-index-${index}`}>{columnContent}</div>;\n }\n\n private mapContent(content: ArticleContent, index: number) {\n return <div class={`content-data-wrapper content-data-wrapper-index-${index}`}>{this.mapContentData(content.type, content.contentData)}</div>;\n }\n\n private mapContentData(contentType: ContentType | undefined, content: object) {\n switch (contentType) {\n case ContentType.ALBUM:\n return <aico-album-content content={content as AlbumContent} />;\n\n case ContentType.ASKING:\n return <aico-asking-content content={content as AskingContent} />;\n\n case ContentType.BLOCK_QUOTE:\n return <aico-block-quote-content content={content as BlockQuoteContent} />;\n\n case ContentType.BULLET:\n return <aico-bullet-content content={content as BulletContent} />;\n\n case ContentType.CAROUSEL:\n return <aico-carousel-content content={content as CarouselContent} />;\n\n case ContentType.CONTENT_CARD:\n return <aico-content-card-content content={content as CardContent} />;\n\n case ContentType.DIVIDER:\n return <aico-divider-content content={content as DividerContent} />;\n\n case ContentType.DOCUMENT:\n return <aico-document-content content={content as DocumentContent} />;\n\n case ContentType.FAQ:\n return <aico-faq-content content={content as FaqContent} />;\n\n case ContentType.HEADING:\n return <aico-heading-content content={content as HeadingContent} />;\n\n case ContentType.HTML:\n return <aico-html-content content={content as HtmlContent} />;\n\n case ContentType.LINK:\n return <aico-link-content content={content as LinkContent} />;\n\n case ContentType.NEWS:\n return <aico-news-content content={content as NewsContent} />;\n\n case ContentType.PAGE:\n return <aico-page-content content={content as PageContent} />;\n\n case ContentType.TABLE:\n return <aico-table-content content={content as TableContent} />;\n\n case ContentType.TESTIMONIAL:\n return <aico-testimonial-content content={content as TestimonialContent} />;\n\n case ContentType.TEXT:\n return <aico-text-content content={content as TextContent} />;\n\n case ContentType.TITLE:\n return <aico-title-content content={content as TitleContent} />;\n\n case ContentType.UPLOAD:\n return <aico-upload-content content={content as UploadContent} />;\n\n case ContentType.VIDEO:\n return <aico-video-content content={content as VideoContent} />;\n\n case ContentType.PRODUCT:\n case ContentType.AGENDA:\n case ContentType.LIST_ASKING:\n case ContentType.LIST_AGENDA:\n case ContentType.CRM:\n case ContentType.B2B:\n case ContentType.FORM_BUILDER:\n case ContentType.COURSE:\n case ContentType.COLLECTION:\n default:\n return <div class=\"content-data content-data-not-handled\">Content type not handled.</div>;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"aico-article-detail.js","source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;SAC7F;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport { ContentType } from '../../model/article/ContentType';\nimport type { Article, ArticleContent, ArticleContentBuilderColumn, ArticleContentBuilderRow } from '../../model/Article';\nimport type { HtmlContent } from '../../model/article/content/HtmlContent';\nimport type { AlbumContent } from '../../model/article/content/AlbumContent';\nimport type { TitleContent } from '../../model/article/content/TitleContent';\nimport type { BlockQuoteContent } from '../../model/article/content/BlockQuoteContent';\nimport type { BulletContent } from '../../model/article/content/BulletContent';\nimport type { CardContent } from '../../model/article/content/CardContent';\nimport type { CarouselContent } from '../../model/article/content/CarouselContent';\nimport type { DividerContent } from '../../model/article/content/DividerContent';\nimport type { DocumentContent } from '../../model/article/content/DocumentContent';\nimport type { HeadingContent } from '../../model/article/content/HeadingContent';\nimport type { LinkContent } from '../../model/article/content/LinkContent';\nimport type { TableContent } from '../../model/article/content/TableContet';\nimport type { TestimonialContent } from '../../model/article/content/TestimonialContent';\nimport type { TextContent } from '../../model/article/content/TextContent';\nimport type { VideoContent } from '../../model/article/content/VideoContent';\nimport type { AskingContent } from '../../model/article/content/AskingContent';\nimport type { FaqContent } from '../../model/article/content/FaqContent';\nimport type { NewsContent } from '../../model/article/content/NewsContent';\nimport type { PageContent } from '../../model/article/content/PageContent';\nimport type { UploadContent } from '../../model/article/content/UploadContent';\n\n@Component({\n tag: 'aico-article-detail',\n styleUrl: 'aico-article-detail.css',\n scoped: true,\n})\nexport class AicoArticleDetail {\n @Prop() article!: Article;\n\n @Prop() locale: string = 'de';\n\n private readonly dateOptions: Intl.DateTimeFormatOptions = { day: 'numeric', month: 'long', year: 'numeric' };\n\n render() {\n const articleDate = new Date(this.article.attributes.publishDate);\n const content = this.article.attributes.contentBuilder.rows.sort((a, b) => a.order - b.order).map((row, index) => this.mapRowContent(row, index));\n return (\n <Host>\n <figure>\n <blockquote class=\"blockquote\">\n <h2 class=\"text-uppercase\">{this.article.attributes.name}</h2>\n </blockquote>\n <figcaption class=\"blockquote-footer\">\n {articleDate.toLocaleDateString('en-US', this.dateOptions)} by <cite title=\"Author\">{this.article.attributes.author}</cite>\n </figcaption>\n </figure>\n <div class=\"content-wrapper\">{content}</div>\n </Host>\n );\n }\n\n private mapRowContent(row: ArticleContentBuilderRow, index: number) {\n const rowContent = row.columns.map((column, columnIndex) => this.mapColumnContent(column, columnIndex));\n return <div class={`content-row content-row-index-${index}`}>{rowContent}</div>;\n }\n\n private mapColumnContent(column: ArticleContentBuilderColumn, index: number) {\n const columnContent = column.contentContainer.contents.sort((a, b) => (a.sort ?? 0) - (b.sort ?? 0)).map((content, contentIndex) => this.mapContent(content, contentIndex));\n return <div class={`content-column content-column-index-${index}`}>{columnContent}</div>;\n }\n\n private mapContent(content: ArticleContent, index: number) {\n return <div class={`content-data-wrapper content-data-wrapper-index-${index}`}>{this.mapContentData(content.type, content.contentData)}</div>;\n }\n\n private mapContentData(contentType: ContentType | undefined, content: object) {\n switch (contentType) {\n case ContentType.ALBUM:\n return <aico-album-content content={content as AlbumContent} />;\n\n case ContentType.ASKING:\n return <aico-asking-content content={content as AskingContent} locale={this.locale} />;\n\n case ContentType.BLOCK_QUOTE:\n return <aico-block-quote-content content={content as BlockQuoteContent} locale={this.locale} />;\n\n case ContentType.BULLET:\n return <aico-bullet-content content={content as BulletContent} locale={this.locale} />;\n\n case ContentType.CAROUSEL:\n return <aico-carousel-content content={content as CarouselContent} locale={this.locale} />;\n\n case ContentType.CONTENT_CARD:\n return <aico-content-card-content content={content as CardContent} locale={this.locale} />;\n\n case ContentType.DIVIDER:\n return <aico-divider-content content={content as DividerContent} locale={this.locale} />;\n\n case ContentType.DOCUMENT:\n return <aico-document-content content={content as DocumentContent} locale={this.locale} />;\n\n case ContentType.FAQ:\n return <aico-faq-content content={content as FaqContent} locale={this.locale} />;\n\n case ContentType.HEADING:\n return <aico-heading-content content={content as HeadingContent} locale={this.locale} />;\n\n case ContentType.HTML:\n return <aico-html-content content={content as HtmlContent} locale={this.locale} />;\n\n case ContentType.LINK:\n return <aico-link-content content={content as LinkContent} locale={this.locale} />;\n\n case ContentType.NEWS:\n return <aico-news-content content={content as NewsContent} />;\n\n case ContentType.PAGE:\n return <aico-page-content content={content as PageContent} locale={this.locale} />;\n\n case ContentType.TABLE:\n return <aico-table-content content={content as TableContent} locale={this.locale} />;\n\n case ContentType.TESTIMONIAL:\n return <aico-testimonial-content content={content as TestimonialContent} />;\n\n case ContentType.TEXT:\n return <aico-text-content content={content as TextContent} locale={this.locale} />;\n\n case ContentType.TITLE:\n return <aico-title-content content={content as TitleContent} locale={this.locale} />;\n\n case ContentType.UPLOAD:\n return <aico-upload-content content={content as UploadContent} locale={this.locale} />;\n\n case ContentType.VIDEO:\n return <aico-video-content content={content as VideoContent} locale={this.locale} />;\n\n case ContentType.PRODUCT:\n case ContentType.AGENDA:\n case ContentType.LIST_ASKING:\n case ContentType.LIST_AGENDA:\n case ContentType.CRM:\n case ContentType.B2B:\n case ContentType.FORM_BUILDER:\n case ContentType.COURSE:\n case ContentType.COLLECTION:\n default:\n return <div class=\"content-data content-data-not-handled\">Content type not handled.</div>;\n }\n }\n}\n"]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fetchNewsArticle } from "../../utils/utils";
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { fetchNewsArticle, fetchNewsArticleByHandle } from "../../utils/utils";
|
|
3
3
|
export class AicoFetchArticleDetail {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.article = undefined;
|
|
6
6
|
this.aicoUrl = undefined;
|
|
7
7
|
this.aicoBearerToken = undefined;
|
|
8
|
+
this.locale = 'de';
|
|
8
9
|
this.articleId = undefined;
|
|
10
|
+
this.articleUrlHandle = undefined;
|
|
9
11
|
}
|
|
10
12
|
connectedCallback() {
|
|
11
13
|
this.articleFetchController = new AbortController();
|
|
@@ -15,10 +17,17 @@ export class AicoFetchArticleDetail {
|
|
|
15
17
|
this.articleFetchController.abort('disconnected');
|
|
16
18
|
}
|
|
17
19
|
async componentWillLoad() {
|
|
20
|
+
if (!this.articleId && !this.articleUrlHandle) {
|
|
21
|
+
throw new Error('Either the article id or the url handle must be provided.');
|
|
22
|
+
}
|
|
23
|
+
if (this.articleUrlHandle) {
|
|
24
|
+
this.article = await fetchNewsArticleByHandle(this.api, this.articleUrlHandle, this.articleFetchController.signal);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
18
27
|
this.article = await fetchNewsArticle(this.api, this.articleId, this.articleFetchController.signal);
|
|
19
28
|
}
|
|
20
29
|
render() {
|
|
21
|
-
return
|
|
30
|
+
return h("aico-article-detail", { article: this.article, locale: this.locale });
|
|
22
31
|
}
|
|
23
32
|
static get is() { return "aico-fetch-article-detail"; }
|
|
24
33
|
static get encapsulation() { return "scoped"; }
|
|
@@ -68,7 +77,7 @@ export class AicoFetchArticleDetail {
|
|
|
68
77
|
"attribute": "aico-bearer-token",
|
|
69
78
|
"reflect": false
|
|
70
79
|
},
|
|
71
|
-
"
|
|
80
|
+
"locale": {
|
|
72
81
|
"type": "string",
|
|
73
82
|
"mutable": false,
|
|
74
83
|
"complexType": {
|
|
@@ -76,14 +85,49 @@ export class AicoFetchArticleDetail {
|
|
|
76
85
|
"resolved": "string",
|
|
77
86
|
"references": {}
|
|
78
87
|
},
|
|
79
|
-
"required":
|
|
88
|
+
"required": false,
|
|
80
89
|
"optional": false,
|
|
81
90
|
"docs": {
|
|
82
91
|
"tags": [],
|
|
83
92
|
"text": ""
|
|
84
93
|
},
|
|
94
|
+
"attribute": "locale",
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"defaultValue": "'de'"
|
|
97
|
+
},
|
|
98
|
+
"articleId": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"mutable": false,
|
|
101
|
+
"complexType": {
|
|
102
|
+
"original": "string",
|
|
103
|
+
"resolved": "string | undefined",
|
|
104
|
+
"references": {}
|
|
105
|
+
},
|
|
106
|
+
"required": false,
|
|
107
|
+
"optional": true,
|
|
108
|
+
"docs": {
|
|
109
|
+
"tags": [],
|
|
110
|
+
"text": "The id will be used to fetch the article.\n\nIf both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are\nprovided, the latter will be used. If neither are provided, an error is thrown."
|
|
111
|
+
},
|
|
85
112
|
"attribute": "article-id",
|
|
86
113
|
"reflect": false
|
|
114
|
+
},
|
|
115
|
+
"articleUrlHandle": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "string",
|
|
120
|
+
"resolved": "string | undefined",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": true,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "The url handle will be used to fetch the article.\n\nIf both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are\nprovided, the latter will be used. If neither are provided, an error is thrown."
|
|
128
|
+
},
|
|
129
|
+
"attribute": "article-url-handle",
|
|
130
|
+
"reflect": false
|
|
87
131
|
}
|
|
88
132
|
};
|
|
89
133
|
}
|
package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-fetch-article-detail.js","sourceRoot":"","sources":["../../../src/components/aico-fetch-article-detail/aico-fetch-article-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"aico-fetch-article-detail.js","sourceRoot":"","sources":["../../../src/components/aico-fetch-article-detail/aico-fetch-article-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1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'../../utils/utils';\nimport { Article } from '../../model/Article';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\n\n@Component({\n tag: 'aico-fetch-article-detail',\n styleUrl: 'aico-fetch-article-detail.css',\n scoped: true,\n})\nexport class AicoFetchArticleDetail {\n @State() article!: Article;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() locale: string = 'de';\n\n /**\n * The id will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleId?: string;\n\n /**\n * The url handle will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleUrlHandle?: string;\n\n private api?: AicoApiRequestInfo;\n private articleFetchController?: AbortController;\n\n connectedCallback() {\n this.articleFetchController = new AbortController();\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.articleFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n if (!this.articleId && !this.articleUrlHandle) {\n throw new Error('Either the article id or the url handle must be provided.');\n }\n\n if (this.articleUrlHandle) {\n this.article = await fetchNewsArticleByHandle(this.api!, this.articleUrlHandle, this.articleFetchController!.signal);\n return;\n }\n\n this.article = await fetchNewsArticle(this.api!, this.articleId!, this.articleFetchController!.signal);\n }\n\n render() {\n return <aico-article-detail article={this.article} locale={this.locale} />;\n }\n}\n"]}
|
package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const meta = {
|
|
2
2
|
component: 'aico-fetch-article-detail',
|
|
3
|
+
argTypes: {
|
|
4
|
+
aicoUrl: { type: 'string', description: 'The Aico api url.' },
|
|
5
|
+
aicoBearerToken: { type: 'string', description: 'The Aico api access token.' },
|
|
6
|
+
articleId: { type: 'string' },
|
|
7
|
+
articleUrlHandle: { type: 'string' },
|
|
8
|
+
},
|
|
3
9
|
};
|
|
4
10
|
export default meta;
|
|
5
11
|
export const Kj = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-fetch-article-detail.stories.js","sourceRoot":"","sources":["../../../src/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAAqC;IAC7C,SAAS,EAAE,2BAA2B;
|
|
1
|
+
{"version":3,"file":"aico-fetch-article-detail.stories.js","sourceRoot":"","sources":["../../../src/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAAqC;IAC7C,SAAS,EAAE,2BAA2B;IACtC,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;QAC7D,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;QAC9E,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACrC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,EAAE,GAAU;IACvB,IAAI,EAAE;QACJ,OAAO,EAAE,0CAA0C;QACnD,eAAe,EAAE,kDAAkD;QACnE,SAAS,EAAE,IAAI;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAU;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,sCAAsC;QAC/C,eAAe,EAAE,0CAA0C;QAC3D,SAAS,EAAE,OAAO;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport { JSX } from '../../components';\n\nconst meta: Meta<JSX.AicoFetchArticleDetail> = {\n component: 'aico-fetch-article-detail',\n argTypes: {\n aicoUrl: { type: 'string', description: 'The Aico api url.' },\n aicoBearerToken: { type: 'string', description: 'The Aico api access token.' },\n articleId: { type: 'string' },\n articleUrlHandle: { type: 'string' },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj;\n\nexport const Kj: Story = {\n args: {\n aicoUrl: 'https://kj-acceptance.aico.swiss/api/v1/',\n aicoBearerToken: 'Sq4WkveRPJ64SHR9zqZW8oLjIDjnlBg0gXHSuIMweb966802',\n articleId: '32',\n },\n};\n\nexport const Fcz: Story = {\n args: {\n aicoUrl: 'https://app.aico.swiss/19838/api/v1/',\n aicoBearerToken: 'B3NXuTbnCeppJl9NHu27Kjs7Hm3EOKSGCkR6CVwO',\n articleId: '44239',\n },\n};\n"]}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/* :host { */
|
|
2
|
-
/* display: block; */
|
|
3
|
-
/* } */
|
|
4
|
-
/**/
|
|
5
|
-
/* .grid-wrapper { */
|
|
6
|
-
/* display: grid; */
|
|
7
|
-
/* height: 100%; */
|
|
8
|
-
/* width: 100%; */
|
|
9
|
-
/* justify-items: center; */
|
|
10
|
-
/* align-items: stretch; */
|
|
11
|
-
/* grid-template-columns: repeat(4, minmax(auto, 1fr)); */
|
|
12
|
-
/* grid-auto-rows: minmax(0, 1fr); */
|
|
13
|
-
/* grid-gap: 10px; */
|
|
14
|
-
/* } */
|
|
15
|
-
/**/
|
|
16
|
-
/* .navigation-wrapper { */
|
|
17
|
-
/* display: flex; */
|
|
18
|
-
/* justify-content: space-around; */
|
|
19
|
-
/* justify-items: center; */
|
|
20
|
-
/* align-content: center; */
|
|
21
|
-
/* } */
|
|
22
|
-
/**/
|
|
23
|
-
/* .navigation-button { */
|
|
24
|
-
/* display: inline-block; */
|
|
25
|
-
/* outline: none; */
|
|
26
|
-
/* cursor: pointer; */
|
|
27
|
-
/* font-size: 14px; */
|
|
28
|
-
/* padding: 0 12px; */
|
|
29
|
-
/* line-height: 20px; */
|
|
30
|
-
/* height: 30px; */
|
|
31
|
-
/* max-height: 30px; */
|
|
32
|
-
/* background: none; */
|
|
33
|
-
/* font-weight: 700; */
|
|
34
|
-
/* border: 0; */
|
|
35
|
-
/* border-radius: 0; */
|
|
36
|
-
/* color: #9ca3af; */
|
|
37
|
-
/* transition-timing-function: ease-in-out; */
|
|
38
|
-
/* transition-property: background; */
|
|
39
|
-
/* transition-duration: 150ms; */
|
|
40
|
-
/* box-shadow: none; */
|
|
41
|
-
/* &:enabled &:hover { */
|
|
42
|
-
/* color: #374151; */
|
|
43
|
-
/* } */
|
|
44
|
-
/* } */
|
|
45
|
-
/**/
|
|
46
|
-
/* .navigation-pages { */
|
|
47
|
-
/* display: inline-flex; */
|
|
48
|
-
/* list-style-type: none; */
|
|
49
|
-
/* margin: 0; */
|
|
50
|
-
/* padding: 0; */
|
|
51
|
-
/* margin-left: -1px; */
|
|
52
|
-
/* font-size: 14px; */
|
|
53
|
-
/* line-height: 20px; */
|
|
54
|
-
/* } */
|
|
55
|
-
/**/
|
|
56
|
-
/* .navigation-pages > li { */
|
|
57
|
-
/* display: flex; */
|
|
58
|
-
/* padding-left: 12px; */
|
|
59
|
-
/* padding-right: 12px; */
|
|
60
|
-
/* justify-content: center; */
|
|
61
|
-
/* align-items: center; */
|
|
62
|
-
/* border-width: 1px; */
|
|
63
|
-
/* border-color: #d1d5db; */
|
|
64
|
-
/* border-radius: 8px; */
|
|
65
|
-
/* height: 2rem; */
|
|
66
|
-
/* line-height: 1.25; */
|
|
67
|
-
/* color: #6b7280; */
|
|
68
|
-
/* background-color: #ffffff; */
|
|
69
|
-
/* } */
|
|
70
|
-
/**/
|
|
71
|
-
/* .navigation-pages > li.page-number { */
|
|
72
|
-
/* cursor: pointer; */
|
|
73
|
-
/* &:hover { */
|
|
74
|
-
/* color: #374151; */
|
|
75
|
-
/* background-color: #f3f4f6; */
|
|
76
|
-
/* } */
|
|
77
|
-
/* } */
|
|
78
|
-
/**/
|
|
79
|
-
/* .navigation-pages > li.page-selected { */
|
|
80
|
-
/* display: flex; */
|
|
81
|
-
/* padding-left: 12px; */
|
|
82
|
-
/* padding-right: 12px; */
|
|
83
|
-
/* justify-content: center; */
|
|
84
|
-
/* align-items: center; */
|
|
85
|
-
/* border-width: 1px; */
|
|
86
|
-
/* border-color: #d1d5db; */
|
|
87
|
-
/* border-radius: 8px; */
|
|
88
|
-
/* height: 2rem; */
|
|
89
|
-
/* color: #2563eb; */
|
|
90
|
-
/* background-color: #eff6ff; */
|
|
91
|
-
/**/
|
|
92
|
-
/* &:hover { */
|
|
93
|
-
/* color: #1d4ed8; */
|
|
94
|
-
/* background-color: #dbeafe; */
|
|
95
|
-
/* } */
|
|
96
|
-
/* } */
|
|
97
|
-
/**/
|
|
98
|
-
/* /* Tablet */ */
|
|
99
|
-
/* @media only screen and (min-width: 768px) and (max-width: 1023px) { */
|
|
100
|
-
/* .grid-wrapper { */
|
|
101
|
-
/* grid-template-columns: repeat(2, minmax(auto, 1fr)); */
|
|
102
|
-
/* } */
|
|
103
|
-
/* } */
|
|
104
|
-
/**/
|
|
105
|
-
/* /* Mobile */ */
|
|
106
|
-
/* @media only screen and (max-width: 767px) { */
|
|
107
|
-
/* .grid-wrapper { */
|
|
108
|
-
/* grid-template-columns: minmax(auto, 1fr); */
|
|
109
|
-
/* } */
|
|
110
|
-
/* .navigation-pages { */
|
|
111
|
-
/* display: none; */
|
|
112
|
-
/* } */
|
|
113
|
-
/* } */
|
|
@@ -7,6 +7,7 @@ export class AicoNewsList {
|
|
|
7
7
|
this.pageNumber = 1;
|
|
8
8
|
this.aicoUrl = undefined;
|
|
9
9
|
this.aicoBearerToken = undefined;
|
|
10
|
+
this.newsChannels = [];
|
|
10
11
|
this.nextButtonText = 'Next';
|
|
11
12
|
this.previousButtonText = 'Previous';
|
|
12
13
|
}
|
|
@@ -19,17 +20,17 @@ export class AicoNewsList {
|
|
|
19
20
|
this.newsListFetchController.abort('disconnected');
|
|
20
21
|
}
|
|
21
22
|
async componentWillLoad() {
|
|
22
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal);
|
|
23
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);
|
|
23
24
|
}
|
|
24
25
|
async componentWillUpdate() {
|
|
25
26
|
this.newsListFetchController = new AbortController();
|
|
26
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal);
|
|
27
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);
|
|
27
28
|
}
|
|
28
29
|
render() {
|
|
29
30
|
var _a, _b, _c;
|
|
30
|
-
return (h(Host, null, h("div", { class: "
|
|
31
|
+
return (h(Host, null, h("div", { class: "row row-cols-1 row-cols-sm-2 row-cols-lg-4 g-4 mb-4" }, (_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.data.map(article => (h("div", { class: "col" }, h("aico-news-list-item", { article: article, onArticleClick: e => {
|
|
31
32
|
var _a;
|
|
32
|
-
(_a = this.
|
|
33
|
+
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
33
34
|
} }))))), h("nav", { class: "w-100", "aria-label": "News navigation" }, h("ul", { class: "pagination justify-content-center" }, h("li", { 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: () => {
|
|
34
35
|
if (this.pageNumber > 1) {
|
|
35
36
|
this.pageNumber -= 1;
|
|
@@ -123,6 +124,22 @@ export class AicoNewsList {
|
|
|
123
124
|
"attribute": "aico-bearer-token",
|
|
124
125
|
"reflect": false
|
|
125
126
|
},
|
|
127
|
+
"newsChannels": {
|
|
128
|
+
"type": "unknown",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "string[]",
|
|
132
|
+
"resolved": "string[]",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": ""
|
|
140
|
+
},
|
|
141
|
+
"defaultValue": "[]"
|
|
142
|
+
},
|
|
126
143
|
"nextButtonText": {
|
|
127
144
|
"type": "string",
|
|
128
145
|
"mutable": false,
|
|
@@ -169,8 +186,8 @@ export class AicoNewsList {
|
|
|
169
186
|
}
|
|
170
187
|
static get events() {
|
|
171
188
|
return [{
|
|
172
|
-
"method": "
|
|
173
|
-
"name": "
|
|
189
|
+
"method": "articleClick",
|
|
190
|
+
"name": "articleClick",
|
|
174
191
|
"bubbles": true,
|
|
175
192
|
"cancelable": true,
|
|
176
193
|
"composed": true,
|