@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-4621a8ba.js';
|
|
2
2
|
|
|
3
3
|
var ContentType;
|
|
4
4
|
(function (ContentType) {
|
|
@@ -40,6 +40,7 @@ const AicoArticleDetail = class {
|
|
|
40
40
|
registerInstance(this, hostRef);
|
|
41
41
|
this.dateOptions = { day: 'numeric', month: 'long', year: 'numeric' };
|
|
42
42
|
this.article = undefined;
|
|
43
|
+
this.locale = 'de';
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
46
|
const articleDate = new Date(this.article.attributes.publishDate);
|
|
@@ -62,43 +63,43 @@ const AicoArticleDetail = class {
|
|
|
62
63
|
case ContentType.ALBUM:
|
|
63
64
|
return h("aico-album-content", { content: content });
|
|
64
65
|
case ContentType.ASKING:
|
|
65
|
-
return h("aico-asking-content", { content: content });
|
|
66
|
+
return h("aico-asking-content", { content: content, locale: this.locale });
|
|
66
67
|
case ContentType.BLOCK_QUOTE:
|
|
67
|
-
return h("aico-block-quote-content", { content: content });
|
|
68
|
+
return h("aico-block-quote-content", { content: content, locale: this.locale });
|
|
68
69
|
case ContentType.BULLET:
|
|
69
|
-
return h("aico-bullet-content", { content: content });
|
|
70
|
+
return h("aico-bullet-content", { content: content, locale: this.locale });
|
|
70
71
|
case ContentType.CAROUSEL:
|
|
71
|
-
return h("aico-carousel-content", { content: content });
|
|
72
|
+
return h("aico-carousel-content", { content: content, locale: this.locale });
|
|
72
73
|
case ContentType.CONTENT_CARD:
|
|
73
|
-
return h("aico-content-card-content", { content: content });
|
|
74
|
+
return h("aico-content-card-content", { content: content, locale: this.locale });
|
|
74
75
|
case ContentType.DIVIDER:
|
|
75
|
-
return h("aico-divider-content", { content: content });
|
|
76
|
+
return h("aico-divider-content", { content: content, locale: this.locale });
|
|
76
77
|
case ContentType.DOCUMENT:
|
|
77
|
-
return h("aico-document-content", { content: content });
|
|
78
|
+
return h("aico-document-content", { content: content, locale: this.locale });
|
|
78
79
|
case ContentType.FAQ:
|
|
79
|
-
return h("aico-faq-content", { content: content });
|
|
80
|
+
return h("aico-faq-content", { content: content, locale: this.locale });
|
|
80
81
|
case ContentType.HEADING:
|
|
81
|
-
return h("aico-heading-content", { content: content });
|
|
82
|
+
return h("aico-heading-content", { content: content, locale: this.locale });
|
|
82
83
|
case ContentType.HTML:
|
|
83
|
-
return h("aico-html-content", { content: content });
|
|
84
|
+
return h("aico-html-content", { content: content, locale: this.locale });
|
|
84
85
|
case ContentType.LINK:
|
|
85
|
-
return h("aico-link-content", { content: content });
|
|
86
|
+
return h("aico-link-content", { content: content, locale: this.locale });
|
|
86
87
|
case ContentType.NEWS:
|
|
87
88
|
return h("aico-news-content", { content: content });
|
|
88
89
|
case ContentType.PAGE:
|
|
89
|
-
return h("aico-page-content", { content: content });
|
|
90
|
+
return h("aico-page-content", { content: content, locale: this.locale });
|
|
90
91
|
case ContentType.TABLE:
|
|
91
|
-
return h("aico-table-content", { content: content });
|
|
92
|
+
return h("aico-table-content", { content: content, locale: this.locale });
|
|
92
93
|
case ContentType.TESTIMONIAL:
|
|
93
94
|
return h("aico-testimonial-content", { content: content });
|
|
94
95
|
case ContentType.TEXT:
|
|
95
|
-
return h("aico-text-content", { content: content });
|
|
96
|
+
return h("aico-text-content", { content: content, locale: this.locale });
|
|
96
97
|
case ContentType.TITLE:
|
|
97
|
-
return h("aico-title-content", { content: content });
|
|
98
|
+
return h("aico-title-content", { content: content, locale: this.locale });
|
|
98
99
|
case ContentType.UPLOAD:
|
|
99
|
-
return h("aico-upload-content", { content: content });
|
|
100
|
+
return h("aico-upload-content", { content: content, locale: this.locale });
|
|
100
101
|
case ContentType.VIDEO:
|
|
101
|
-
return h("aico-video-content", { content: content });
|
|
102
|
+
return h("aico-video-content", { content: content, locale: this.locale });
|
|
102
103
|
case ContentType.PRODUCT:
|
|
103
104
|
case ContentType.AGENDA:
|
|
104
105
|
case ContentType.LIST_ASKING:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-article-detail.entry.js","mappings":";;AAAA,IAAY,WA8BX;AA9BD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;IAC3B,0CAA2B,CAAA;IAC3B,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,4BAAa,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,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;KACF;;;;;;","names":[],"sources":["src/model/article/ContentType.ts","src/components/aico-article-detail/aico-article-detail.css?tag=aico-article-detail&encapsulation=scoped","src/components/aico-article-detail/aico-article-detail.tsx"],"sourcesContent":["export enum ContentType {\n BULLET = 'BULLET',\n TEXT = 'TEXT',\n VIDEO = 'VIDEO',\n TABLE = 'TABLE',\n HEADING = 'HEADING',\n TITLE = 'TITLE',\n CONTENT_CARD = 'CONTENT_CARD',\n TESTIMONIAL = 'TESTIMONIAL',\n PRODUCT = 'PRODUCT',\n NEWS = 'NEWS',\n ASKING = 'ASKING',\n AGENDA = 'AGENDA',\n LIST_ASKING = 'LIST_ASKING',\n LIST_AGENDA = 'LIST_AGENDA',\n CRM = 'CRM',\n B2B = 'B2B',\n FORM_BUILDER = 'FORM_BUILDER',\n BLOCK_QUOTE = 'BLOCK_QUOTE',\n FAQ = 'FAQ',\n COURSE = 'COURSE',\n DOCUMENT = 'DOCUMENT',\n LINK = 'LINK',\n HTML = 'HTML',\n DIVIDER = 'DIVIDER',\n COLLECTION = 'COLLECTION',\n CAROUSEL = 'CAROUSEL',\n PAGE = 'PAGE',\n ALBUM = 'ALBUM',\n UPLOAD = 'UPLOAD',\n}\n","","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"],"version":3}
|
|
1
|
+
{"file":"aico-article-detail.entry.js","mappings":";;AAAA,IAAY,WA8BX;AA9BD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;IAC3B,0CAA2B,CAAA;IAC3B,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,wCAAyB,CAAA;IACzB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EA9BW,WAAW,KAAX,WAAW;;ACAvB,MAAM,oBAAoB,GAAG,EAAE;;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CAA0B,OAAO,EAAE,OAA6B,GAAI,CAAC;YAE9E,KAAK,WAAW,CAAC,IAAI;gBACnB,OAAO,yBAAmB,OAAO,EAAE,OAAsB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;YAErF,KAAK,WAAW,CAAC,KAAK;gBACpB,OAAO,0BAAoB,OAAO,EAAE,OAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;YAEvF,KAAK,WAAW,CAAC,MAAM;gBACrB,OAAO,2BAAqB,OAAO,EAAE,OAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;YAEzF,KAAK,WAAW,CAAC,KAAK;gBACpB,OAAO,0BAAoB,OAAO,EAAE,OAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;YAEvF,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;KACF;;;;;;","names":[],"sources":["src/model/article/ContentType.ts","src/components/aico-article-detail/aico-article-detail.css?tag=aico-article-detail&encapsulation=scoped","src/components/aico-article-detail/aico-article-detail.tsx"],"sourcesContent":["export enum ContentType {\n BULLET = 'BULLET',\n TEXT = 'TEXT',\n VIDEO = 'VIDEO',\n TABLE = 'TABLE',\n HEADING = 'HEADING',\n TITLE = 'TITLE',\n CONTENT_CARD = 'CONTENT_CARD',\n TESTIMONIAL = 'TESTIMONIAL',\n PRODUCT = 'PRODUCT',\n NEWS = 'NEWS',\n ASKING = 'ASKING',\n AGENDA = 'AGENDA',\n LIST_ASKING = 'LIST_ASKING',\n LIST_AGENDA = 'LIST_AGENDA',\n CRM = 'CRM',\n B2B = 'B2B',\n FORM_BUILDER = 'FORM_BUILDER',\n BLOCK_QUOTE = 'BLOCK_QUOTE',\n FAQ = 'FAQ',\n COURSE = 'COURSE',\n DOCUMENT = 'DOCUMENT',\n LINK = 'LINK',\n HTML = 'HTML',\n DIVIDER = 'DIVIDER',\n COLLECTION = 'COLLECTION',\n CAROUSEL = 'CAROUSEL',\n PAGE = 'PAGE',\n ALBUM = 'ALBUM',\n UPLOAD = 'UPLOAD',\n}\n","","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"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-4621a8ba.js';
|
|
2
2
|
|
|
3
3
|
const aicoAskingListContentCss = ".card.sc-aico-asking-list-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0, 0, 0, 0.125);border-radius:0.25rem}.so-tab.sc-aico-asking-list-content{position:relative;width:100%;overflow:hidden;margin:10px 0}.so-tab.sc-aico-asking-list-content label.sc-aico-asking-list-content{position:relative;display:block;padding:0 25px 0 0;line-height:normal;cursor:pointer}.so-tab.sc-aico-asking-list-content input.sc-aico-asking-list-content{position:absolute;opacity:0;z-index:-1}.so-tab-content.sc-aico-asking-list-content{max-height:0;overflow:hidden;transition:max-height 0.35s;line-height:1.2;font-size:15px}.so-tab.sc-aico-asking-list-content input.sc-aico-asking-list-content:checked~.so-tab-content.sc-aico-asking-list-content{max-height:none}.so-tab.sc-aico-asking-list-content label.sc-aico-asking-list-content::before{position:absolute;top:0;left:0;display:inline-block;-webkit-transition:all 0.35s;-o-transition:all 0.35s;transition:all 0.35s}.so-tab.sc-aico-asking-list-content label.sc-aico-asking-list-content{font-size:15px}.so-tab.sc-aico-asking-list-content input[type='checkbox'].sc-aico-asking-list-content+label.sc-aico-asking-list-content::before{content:'+ ';font-size:18px;font-weight:bold;line-height:0.3}.so-tab.sc-aico-asking-list-content input[type='radio'].sc-aico-asking-list-content+label.sc-aico-asking-list-content::before{content:'\\25B3'}.so-tab.sc-aico-asking-list-content input[type='checkbox'].sc-aico-asking-list-content:checked+label.sc-aico-asking-list-content::before{transform:rotate(315deg)}.so-tab.sc-aico-asking-list-content input[type='radio'].sc-aico-asking-list-content:checked+label.sc-aico-asking-list-content::before{transform:rotateX(180deg)}";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-4621a8ba.js';
|
|
2
|
+
export { s as setNonce } from './index-4621a8ba.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["aico-fetch-article-detail",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"articleId":[1,"article-id"],"article":[32]}]]],["aico-news-list",[[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",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-special-news-carousel",[[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"numberOfArticles":[2,"number-of-articles"],"newsResponse":[32]}]]],["
|
|
17
|
+
return bootstrapLazy([["aico-fetch-article-detail",[[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",[[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",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-special-news-carousel",[[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",[[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]],["aico-album-content_19",[[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",[[2,"aico-article-detail",{"article":[16],"locale":[1]}]]],["aico-news-list-item",[[2,"aico-news-list-item",{"article":[16]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=aico-components.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h
|
|
2
|
-
import { f as fetchNewsArticle } from './utils-
|
|
1
|
+
import { r as registerInstance, h } from './index-4621a8ba.js';
|
|
2
|
+
import { f as fetchNewsArticleByHandle, a as fetchNewsArticle } from './utils-b4eec8e9.js';
|
|
3
3
|
|
|
4
4
|
const aicoFetchArticleDetailCss = "";
|
|
5
5
|
|
|
@@ -9,7 +9,9 @@ const AicoFetchArticleDetail = class {
|
|
|
9
9
|
this.article = undefined;
|
|
10
10
|
this.aicoUrl = undefined;
|
|
11
11
|
this.aicoBearerToken = undefined;
|
|
12
|
+
this.locale = 'de';
|
|
12
13
|
this.articleId = undefined;
|
|
14
|
+
this.articleUrlHandle = undefined;
|
|
13
15
|
}
|
|
14
16
|
connectedCallback() {
|
|
15
17
|
this.articleFetchController = new AbortController();
|
|
@@ -19,10 +21,17 @@ const AicoFetchArticleDetail = class {
|
|
|
19
21
|
this.articleFetchController.abort('disconnected');
|
|
20
22
|
}
|
|
21
23
|
async componentWillLoad() {
|
|
24
|
+
if (!this.articleId && !this.articleUrlHandle) {
|
|
25
|
+
throw new Error('Either the article id or the url handle must be provided.');
|
|
26
|
+
}
|
|
27
|
+
if (this.articleUrlHandle) {
|
|
28
|
+
this.article = await fetchNewsArticleByHandle(this.api, this.articleUrlHandle, this.articleFetchController.signal);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
22
31
|
this.article = await fetchNewsArticle(this.api, this.articleId, this.articleFetchController.signal);
|
|
23
32
|
}
|
|
24
33
|
render() {
|
|
25
|
-
return
|
|
34
|
+
return h("aico-article-detail", { article: this.article, locale: this.locale });
|
|
26
35
|
}
|
|
27
36
|
};
|
|
28
37
|
AicoFetchArticleDetail.style = aicoFetchArticleDetailCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-fetch-article-detail.entry.js","mappings":";;;AAAA,MAAM,yBAAyB,GAAG,EAAE;;MCUvB,sBAAsB
|
|
1
|
+
{"file":"aico-fetch-article-detail.entry.js","mappings":";;;AAAA,MAAM,yBAAyB,GAAG,EAAE;;MCUvB,sBAAsB;;;;;;sBAOR,IAAI;;;;IAqB7B,iBAAiB;QACf,IAAI,CAAC,sBAAsB,GAAG,IAAI,eAAe,EAAE,CAAC;QACpD,IAAI,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;IAED,oBAAoB;QAClB,IAAI,CAAC,sBAAuB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;KACpD;IAED,MAAM,iBAAiB;QACrB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC7C,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;SAC9E;QAED,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,IAAI,CAAC,OAAO,GAAG,MAAM,wBAAwB,CAAC,IAAI,CAAC,GAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,sBAAuB,CAAC,MAAM,CAAC,CAAC;YACrH,OAAO;SACR;QAED,IAAI,CAAC,OAAO,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,GAAI,EAAE,IAAI,CAAC,SAAU,EAAE,IAAI,CAAC,sBAAuB,CAAC,MAAM,CAAC,CAAC;KACxG;IAED,MAAM;QACJ,OAAO,2BAAqB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;KAC5E;;;;;;","names":[],"sources":["src/components/aico-fetch-article-detail/aico-fetch-article-detail.css?tag=aico-fetch-article-detail&encapsulation=scoped","src/components/aico-fetch-article-detail/aico-fetch-article-detail.tsx"],"sourcesContent":["","import { Component, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticle, fetchNewsArticleByHandle } from '../../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"],"version":3}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-4621a8ba.js';
|
|
2
2
|
|
|
3
3
|
const aicoNewsListItemCss = "";
|
|
4
4
|
|
|
5
5
|
const AicoNewsListItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.
|
|
8
|
+
this.articleClick = createEvent(this, "articleClick", 7);
|
|
9
9
|
this.article = undefined;
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
return (h("div", { class: "card h-100
|
|
13
|
+
return (h("div", { class: "card h-100 pe-auto", style: { cursor: 'pointer' }, onClick: () => {
|
|
14
|
+
var _a;
|
|
15
|
+
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(this.article);
|
|
16
|
+
} }, h("div", { class: "ratio ratio-16x9 overflow-hidden" }, h("img", { class: "object-fit-cover", style: { 'min-height': '15rem' }, alt: "Article image", src: (_b = (_a = this.article.attributes.optimizedListImage) !== null && _a !== void 0 ? _a : this.article.attributes.optimizedImage) !== null && _b !== void 0 ? _b : this.article.attributes.image }), h("div", { class: "card-img-overlay d-flex justify-content-end" })), h("div", { class: "card-body" }, h("h5", { class: "card-title" }, this.article.attributes.name), h("p", { class: "card-text" }, this.article.attributes.excerpt))));
|
|
14
17
|
}
|
|
15
18
|
};
|
|
16
19
|
AicoNewsListItem.style = aicoNewsListItemCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-news-list-item.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,EAAE;;MCQjB,gBAAgB;;;;;;IAK3B,MAAM;;QACJ,QACE,WAAK,KAAK,EAAC,YAAY,
|
|
1
|
+
{"file":"aico-news-list-item.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,EAAE;;MCQjB,gBAAgB;;;;;;IAK3B,MAAM;;QACJ,QACE,WAAK,KAAK,EAAC,oBAAoB,EAC3B,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAC5B,OAAO,EAAE;;gBACP,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACvC,IACH,WAAK,KAAK,EAAC,kCAAkC,IAC3C,WACE,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAChC,GAAG,EAAC,eAAe,EACnB,GAAG,EAAE,MAAA,MAAA,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,mCAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,mCAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,GAC1H,EACF,WAAK,KAAK,EAAC,6CAA6C,GAA0C,CAC9F,EACN,WAAK,KAAK,EAAC,WAAW,IACpB,UAAI,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAM,EAC1D,SAAG,KAAK,EAAC,WAAW,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAK,CACtD,CACF,EACN;KACH;;;;;;","names":[],"sources":["src/components/aico-news-list-item/aico-news-list-item.css?tag=aico-news-list-item&encapsulation=scoped","src/components/aico-news-list-item/aico-news-list-item.tsx"],"sourcesContent":["","import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list-item',\n styleUrl: 'aico-news-list-item.css',\n scoped: true,\n})\nexport class AicoNewsListItem {\n @Prop() article!: Article;\n\n @Event() articleClick?: EventEmitter<Article>;\n\n render() {\n return (\n <div class=\"card h-100 pe-auto\"\n style={{ cursor: 'pointer' }}\n onClick={() => {\n this.articleClick?.emit(this.article);\n }}>\n <div class=\"ratio ratio-16x9 overflow-hidden\">\n <img\n class=\"object-fit-cover\"\n style={{ 'min-height': '15rem' }}\n alt=\"Article image\"\n src={this.article.attributes.optimizedListImage ?? this.article.attributes.optimizedImage ?? this.article.attributes.image}\n />\n <div class=\"card-img-overlay d-flex justify-content-end\">{/*TODO: set the date top-right?*/}</div>\n </div>\n <div class=\"card-body\">\n <h5 class=\"card-title\">{this.article.attributes.name}</h5>\n <p class=\"card-text\">{this.article.attributes.excerpt}</p>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-4621a8ba.js';
|
|
2
|
+
import { b as fetchNewsArticles } from './utils-b4eec8e9.js';
|
|
3
3
|
|
|
4
|
-
const aicoNewsListCss = "
|
|
4
|
+
const aicoNewsListCss = "";
|
|
5
5
|
|
|
6
6
|
const AicoNewsList = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
|
-
this.
|
|
9
|
+
this.articleClick = createEvent(this, "articleClick", 7);
|
|
10
10
|
this.pageSize = 16;
|
|
11
11
|
this.newsResponse = undefined;
|
|
12
12
|
this.pageNumber = 1;
|
|
13
13
|
this.aicoUrl = undefined;
|
|
14
14
|
this.aicoBearerToken = undefined;
|
|
15
|
+
this.newsChannels = [];
|
|
15
16
|
this.nextButtonText = 'Next';
|
|
16
17
|
this.previousButtonText = 'Previous';
|
|
17
18
|
}
|
|
@@ -24,17 +25,17 @@ const AicoNewsList = class {
|
|
|
24
25
|
this.newsListFetchController.abort('disconnected');
|
|
25
26
|
}
|
|
26
27
|
async componentWillLoad() {
|
|
27
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal);
|
|
28
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);
|
|
28
29
|
}
|
|
29
30
|
async componentWillUpdate() {
|
|
30
31
|
this.newsListFetchController = new AbortController();
|
|
31
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal);
|
|
32
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);
|
|
32
33
|
}
|
|
33
34
|
render() {
|
|
34
35
|
var _a, _b, _c;
|
|
35
|
-
return (h(Host, null, h("div", { class: "
|
|
36
|
+
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 => {
|
|
36
37
|
var _a;
|
|
37
|
-
(_a = this.
|
|
38
|
+
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
38
39
|
} }))))), 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: () => {
|
|
39
40
|
if (this.pageNumber > 1) {
|
|
40
41
|
this.pageNumber -= 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-news-list.entry.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,qBAAqB;;MCWhC,YAAY;;;;QACN,aAAQ,GAAG,EAAE,CAAC;;0BAIT,CAAC;;;8BAMU,MAAM;kCAEF,UAAU;;IAO/C,iBAAiB;QACf,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAe,EAAE,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAEpB,IAAI,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;IAED,oBAAoB;QAClB,IAAI,CAAC,uBAAwB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;KACrD;IAED,MAAM,iBAAiB;QACrB,IAAI,CAAC,YAAY,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,GAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,uBAAwB,CAAC,MAAM,CAAC,CAAC;KAC9H;IAED,MAAM,mBAAmB;QACvB,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAe,EAAE,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,GAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;KAC7H;I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,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE;YACrE,IAAI,CAAC,IAAI,CAAC,EAAE;gBACV,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;aACpB;SACF;QAED,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1E,IAAI,CAAC,KAAK,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,CAAC,EAAE;gBACrD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;aACpB;SACF;QAED,IAAI,IAAI,CAAC,UAAU,GAAG,SAAS,GAAG,CAAC,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,IAAI,CAAC,EAAE;YAClF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QAED,IAAI,IAAI,CAAC,UAAU,GAAG,SAAS,IAAI,CAAC,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,IAAI,CAAC,EAAE;YACnF,KAAK,CAAC,IAAI,CAAC,GAAG,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;SACxD;QAED,OAAO,KAAK,CAAC;KACd;;;;;;","names":[],"sources":["src/components/aico-news-list/aico-news-list.css?tag=aico-news-list&encapsulation=scoped","src/components/aico-news-list/aico-news-list.tsx"],"sourcesContent":["/* :host { */\n/* display: block; */\n/* } */\n/**/\n/* .grid-wrapper { */\n/* display: grid; */\n/* height: 100%; */\n/* width: 100%; */\n/* justify-items: center; */\n/* align-items: stretch; */\n/* grid-template-columns: repeat(4, minmax(auto, 1fr)); */\n/* grid-auto-rows: minmax(0, 1fr); */\n/* grid-gap: 10px; */\n/* } */\n/**/\n/* .navigation-wrapper { */\n/* display: flex; */\n/* justify-content: space-around; */\n/* justify-items: center; */\n/* align-content: center; */\n/* } */\n/**/\n/* .navigation-button { */\n/* display: inline-block; */\n/* outline: none; */\n/* cursor: pointer; */\n/* font-size: 14px; */\n/* padding: 0 12px; */\n/* line-height: 20px; */\n/* height: 30px; */\n/* max-height: 30px; */\n/* background: none; */\n/* font-weight: 700; */\n/* border: 0; */\n/* border-radius: 0; */\n/* color: #9ca3af; */\n/* transition-timing-function: ease-in-out; */\n/* transition-property: background; */\n/* transition-duration: 150ms; */\n/* box-shadow: none; */\n/* &:enabled &:hover { */\n/* color: #374151; */\n/* } */\n/* } */\n/**/\n/* .navigation-pages { */\n/* display: inline-flex; */\n/* list-style-type: none; */\n/* margin: 0; */\n/* padding: 0; */\n/* margin-left: -1px; */\n/* font-size: 14px; */\n/* line-height: 20px; */\n/* } */\n/**/\n/* .navigation-pages > li { */\n/* display: flex; */\n/* padding-left: 12px; */\n/* padding-right: 12px; */\n/* justify-content: center; */\n/* align-items: center; */\n/* border-width: 1px; */\n/* border-color: #d1d5db; */\n/* border-radius: 8px; */\n/* height: 2rem; */\n/* line-height: 1.25; */\n/* color: #6b7280; */\n/* background-color: #ffffff; */\n/* } */\n/**/\n/* .navigation-pages > li.page-number { */\n/* cursor: pointer; */\n/* &:hover { */\n/* color: #374151; */\n/* background-color: #f3f4f6; */\n/* } */\n/* } */\n/**/\n/* .navigation-pages > li.page-selected { */\n/* display: flex; */\n/* padding-left: 12px; */\n/* padding-right: 12px; */\n/* justify-content: center; */\n/* align-items: center; */\n/* border-width: 1px; */\n/* border-color: #d1d5db; */\n/* border-radius: 8px; */\n/* height: 2rem; */\n/* color: #2563eb; */\n/* background-color: #eff6ff; */\n/**/\n/* &:hover { */\n/* color: #1d4ed8; */\n/* background-color: #dbeafe; */\n/* } */\n/* } */\n/**/\n/* /* Tablet */ */\n/* @media only screen and (min-width: 768px) and (max-width: 1023px) { */\n/* .grid-wrapper { */\n/* grid-template-columns: repeat(2, minmax(auto, 1fr)); */\n/* } */\n/* } */\n/**/\n/* /* Mobile */ */\n/* @media only screen and (max-width: 767px) { */\n/* .grid-wrapper { */\n/* grid-template-columns: minmax(auto, 1fr); */\n/* } */\n/* .navigation-pages { */\n/* display: none; */\n/* } */\n/* } */\n","import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticles } from '../../utils/utils';\nimport { NewsResponse } from '../../model/NewsResponse';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list',\n styleUrl: 'aico-news-list.css',\n scoped: true,\n})\nexport class AicoNewsList {\n private readonly pageSize = 16;\n\n @State() newsResponse?: NewsResponse;\n\n @State() pageNumber = 1;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() nextButtonText: string = 'Next';\n\n @Prop() previousButtonText: string = 'Previous';\n\n @Event() articleClicked?: EventEmitter<Article>;\n\n private api?: AicoApiRequestInfo;\n private newsListFetchController?: AbortController;\n\n connectedCallback() {\n this.newsListFetchController = new AbortController();\n this.pageNumber = 1;\n\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.newsListFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController!.signal);\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController.signal);\n }\n\n render() {\n return (\n <Host>\n <div class=\"axaxa row row-cols-1 row-cols-sm-2 row-cols-lg-4 g-4 mb-4\">\n {this.newsResponse?.data.map(article => (\n <div class=\"col\">\n <aico-news-list-item\n article={article}\n onArticleClicked={e => {\n this.articleClicked?.emit(e.detail);\n }}\n />\n </div>\n ))}\n </div>\n <nav class=\"w-100\" aria-label=\"News navigation\">\n <ul class=\"pagination justify-content-center\">\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.prev ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.pageNumber > 1) {\n this.pageNumber -= 1;\n }\n\n return false;\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-left me-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\" />\n </svg>\n {this.previousButtonText}\n </li>\n {this.getViewablePages().map(page => (\n <li\n class={`page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (page !== '...') {\n this.pageNumber = Number(page);\n }\n return false;\n }}\n >\n {page}\n </li>\n ))}\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.next ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.newsResponse?.meta.page.lastPage && this.pageNumber < this.newsResponse?.meta.page.lastPage) {\n this.pageNumber += 1;\n }\n }}\n >\n {this.nextButtonText}\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-right ms-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\" />\n </svg>\n </li>\n </ul>\n </nav>\n </Host>\n );\n }\n\n private getViewablePages(lookAhead: number = 2) {\n const pages: string[] = [];\n if (this.pageNumber - lookAhead >= 2) {\n pages.push('1');\n }\n\n if (this.pageNumber - lookAhead > 2) {\n pages.push('...');\n }\n\n for (let i = this.pageNumber - lookAhead; i < this.pageNumber; i += 1) {\n if (i >= 1) {\n pages.push(`${i}`);\n }\n }\n\n pages.push(`${this.pageNumber}`);\n for (let i = this.pageNumber + 1; i <= this.pageNumber + lookAhead; i += 1) {\n if (i <= (this.newsResponse?.meta.page.lastPage ?? 0)) {\n pages.push(`${i}`);\n }\n }\n\n if (this.pageNumber + lookAhead < (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push('...');\n }\n\n if (this.pageNumber + lookAhead <= (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push(`${this.newsResponse?.meta.page.lastPage}`);\n }\n\n return pages;\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"aico-news-list.entry.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,EAAE;;MCWb,YAAY;;;;QACN,aAAQ,GAAG,EAAE,CAAC;;0BAIT,CAAC;;;4BAMU,EAAE;8BAEF,MAAM;kCAEF,UAAU;;IAO/C,iBAAiB;QACf,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAe,EAAE,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAEpB,IAAI,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;IAED,oBAAoB;QAClB,IAAI,CAAC,uBAAwB,CAAC,KAAK,CA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,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,IAAI,CAAC,EAAE;YAClF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QAED,IAAI,IAAI,CAAC,UAAU,GAAG,SAAS,IAAI,CAAC,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,IAAI,CAAC,EAAE;YACnF,KAAK,CAAC,IAAI,CAAC,GAAG,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;SACxD;QAED,OAAO,KAAK,CAAC;KACd;;;;;;","names":[],"sources":["src/components/aico-news-list/aico-news-list.css?tag=aico-news-list&encapsulation=scoped","src/components/aico-news-list/aico-news-list.tsx"],"sourcesContent":["","import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticles } from '../../utils/utils';\nimport { NewsResponse } from '../../model/NewsResponse';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list',\n styleUrl: 'aico-news-list.css',\n scoped: true,\n})\nexport class AicoNewsList {\n private readonly pageSize = 16;\n\n @State() newsResponse?: NewsResponse;\n\n @State() pageNumber = 1;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() newsChannels: string[] = [];\n\n @Prop() nextButtonText: string = 'Next';\n\n @Prop() previousButtonText: string = 'Previous';\n\n @Event() articleClick?: EventEmitter<Article>;\n\n private api?: AicoApiRequestInfo;\n private newsListFetchController?: AbortController;\n\n connectedCallback() {\n this.newsListFetchController = new AbortController();\n this.pageNumber = 1;\n\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.newsListFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController!.signal, this.newsChannels);\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);\n }\n\n render() {\n return (\n <Host>\n <div class=\"row row-cols-1 row-cols-sm-2 row-cols-lg-4 g-4 mb-4\">\n {this.newsResponse?.data.map(article => (\n <div class=\"col\">\n <aico-news-list-item\n article={article}\n onArticleClick={e => {\n this.articleClick?.emit(e.detail);\n }}\n />\n </div>\n ))}\n </div>\n <nav class=\"w-100\" aria-label=\"News navigation\">\n <ul class=\"pagination justify-content-center\">\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.prev ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.pageNumber > 1) {\n this.pageNumber -= 1;\n }\n\n return false;\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-left me-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\" />\n </svg>\n {this.previousButtonText}\n </li>\n {this.getViewablePages().map(page => (\n <li\n class={`page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (page !== '...') {\n this.pageNumber = Number(page);\n }\n return false;\n }}\n >\n {page}\n </li>\n ))}\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.next ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.newsResponse?.meta.page.lastPage && this.pageNumber < this.newsResponse?.meta.page.lastPage) {\n this.pageNumber += 1;\n }\n }}\n >\n {this.nextButtonText}\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-right ms-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\" />\n </svg>\n </li>\n </ul>\n </nav>\n </Host>\n );\n }\n\n private getViewablePages(lookAhead: number = 2) {\n const pages: string[] = [];\n if (this.pageNumber - lookAhead >= 2) {\n pages.push('1');\n }\n\n if (this.pageNumber - lookAhead > 2) {\n pages.push('...');\n }\n\n for (let i = this.pageNumber - lookAhead; i < this.pageNumber; i += 1) {\n if (i >= 1) {\n pages.push(`${i}`);\n }\n }\n\n pages.push(`${this.pageNumber}`);\n for (let i = this.pageNumber + 1; i <= this.pageNumber + lookAhead; i += 1) {\n if (i <= (this.newsResponse?.meta.page.lastPage ?? 0)) {\n pages.push(`${i}`);\n }\n }\n\n if (this.pageNumber + lookAhead < (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push('...');\n }\n\n if (this.pageNumber + lookAhead <= (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push(`${this.newsResponse?.meta.page.lastPage}`);\n }\n\n return pages;\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-4621a8ba.js';
|
|
2
2
|
|
|
3
3
|
const aicoNoContentCss = ".sc-aico-no-content-h{display:block}";
|
|
4
4
|
|
|
@@ -18,12 +18,14 @@ const AicoTitleContent = class {
|
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
registerInstance(this, hostRef);
|
|
20
20
|
this.content = undefined;
|
|
21
|
+
this.locale = 'de';
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
var _a;
|
|
24
|
+
var _a, _b;
|
|
24
25
|
if (!this.content.size || this.content.translations.length === 0) {
|
|
25
26
|
return h("aico-no-content", null);
|
|
26
27
|
}
|
|
28
|
+
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
27
29
|
const CustomTag = this.content.size;
|
|
28
30
|
const defaultColor = 'black';
|
|
29
31
|
const styles = {
|
|
@@ -31,10 +33,10 @@ const AicoTitleContent = class {
|
|
|
31
33
|
};
|
|
32
34
|
if (this.content.hasUnderscore) {
|
|
33
35
|
styles['text-decoration-line'] = 'underline';
|
|
34
|
-
styles['text-decoration-color'] = (
|
|
36
|
+
styles['text-decoration-color'] = (_b = this.content.underscoreColor) !== null && _b !== void 0 ? _b : defaultColor;
|
|
35
37
|
styles['text-decoration-thickness'] = '3px';
|
|
36
38
|
}
|
|
37
|
-
return (h(CustomTag, null, h("span", { style: styles },
|
|
39
|
+
return (h(CustomTag, null, h("span", { style: styles }, translation === null || translation === void 0 ? void 0 : translation.title)));
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
42
|
AicoTitleContent.style = aicoTitleContentCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-no-content.aico-title-content.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,sCAAsC;;MCOlD,aAAa;;;;IACxB,MAAM;QACJ,QACE,eACE,kGAA4F,CACxF,EACN;KACH;;;;ACdH,MAAM,mBAAmB,GAAG,yCAAyC;;MCQxD,gBAAgB
|
|
1
|
+
{"file":"aico-no-content.aico-title-content.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,sCAAsC;;MCOlD,aAAa;;;;IACxB,MAAM;QACJ,QACE,eACE,kGAA4F,CACxF,EACN;KACH;;;;ACdH,MAAM,mBAAmB,GAAG,yCAAyC;;MCQxD,gBAAgB;;;;sBAGF,IAAI;;IAE7B,MAAM;;QACJ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAChE,OAAO,0BAAmB,CAAC;SAC5B;QAED,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,mCAAI,IAAI,CAAC;QAC9G,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAEpC,MAAM,YAAY,GAAG,OAAO,CAAC;QAC7B,MAAM,MAAM,GAA8B;YACxC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,YAAY;SACxE,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC9B,MAAM,CAAC,sBAAsB,CAAC,GAAG,WAAW,CAAC;YAC7C,MAAM,CAAC,uBAAuB,CAAC,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,eAAe,mCAAI,YAAY,CAAC;YAC/E,MAAM,CAAC,2BAA2B,CAAC,GAAG,KAAK,CAAC;SAC7C;QAED,QACE,EAAC,SAAS,QACR,YAAM,KAAK,EAAE,MAAM,IAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,CAAQ,CACtC,EACZ;KACH;;;;;;","names":[],"sources":["src/components/content/aico-no-content/aico-no-content.css?tag=aico-no-content&encapsulation=scoped","src/components/content/aico-no-content/aico-no-content.tsx","src/components/content/aico-title-content/aico-title-content.css?tag=aico-title-content&encapsulation=scoped","src/components/content/aico-title-content/aico-title-content.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'aico-no-content',\n styleUrl: 'aico-no-content.css',\n scoped: true,\n})\nexport class AicoNoContent {\n render() {\n return (\n <div>\n <span>The content cannot be rendered because it is either malformed or not supported.</span>\n </div>\n );\n }\n}\n",":host {\n display: block;\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { TitleContent } from '../../../model/article/content/TitleContent';\n\n@Component({\n tag: 'aico-title-content',\n styleUrl: 'aico-title-content.css',\n scoped: true,\n})\nexport class AicoTitleContent {\n @Prop() content!: TitleContent;\n\n @Prop() locale: string = 'de';\n\n render() {\n if (!this.content.size || this.content.translations.length === 0) {\n return <aico-no-content />;\n }\n\n const translation = this.content.translations.find(translation => translation.locale === this.locale) ?? null;\n const CustomTag = this.content.size;\n\n const defaultColor = 'black';\n const styles: { [key: string]: string } = {\n color: this.content.titleColor ? this.content.titleColor : defaultColor,\n };\n\n if (this.content.hasUnderscore) {\n styles['text-decoration-line'] = 'underline';\n styles['text-decoration-color'] = this.content.underscoreColor ?? defaultColor;\n styles['text-decoration-thickness'] = '3px';\n }\n\n return (\n <CustomTag>\n <span style={styles}>{translation?.title}</span>\n </CustomTag>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-4621a8ba.js';
|
|
2
|
+
import { c as fetchSpecialNewsArticles } from './utils-b4eec8e9.js';
|
|
3
3
|
import { j as jquery } from './slick-d11cf173.js';
|
|
4
4
|
|
|
5
5
|
const aicoSpecialNewsCarouselCss = ".slick-slide.sc-aico-special-news-carousel>div.sc-aico-special-news-carousel{height:100% !important}";
|
|
@@ -11,6 +11,7 @@ const AicoSpecialNewsCarousel = class {
|
|
|
11
11
|
this.newsResponse = undefined;
|
|
12
12
|
this.aicoUrl = undefined;
|
|
13
13
|
this.aicoBearerToken = undefined;
|
|
14
|
+
this.newsChannels = [];
|
|
14
15
|
this.numberOfArticles = 6;
|
|
15
16
|
}
|
|
16
17
|
connectedCallback() {
|
|
@@ -21,11 +22,11 @@ const AicoSpecialNewsCarousel = class {
|
|
|
21
22
|
this.newsListFetchController.abort('disconnected');
|
|
22
23
|
}
|
|
23
24
|
async componentWillLoad() {
|
|
24
|
-
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal);
|
|
25
|
+
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal, this.newsChannels);
|
|
25
26
|
}
|
|
26
27
|
async componentWillUpdate() {
|
|
27
28
|
this.newsListFetchController = new AbortController();
|
|
28
|
-
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal);
|
|
29
|
+
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal, this.newsChannels);
|
|
29
30
|
}
|
|
30
31
|
componentDidLoad() {
|
|
31
32
|
jquery('.carousel').slick({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-special-news-carousel.entry.js","mappings":";;;;AAAA,MAAM,0BAA0B,GAAG,sGAAsG;;MCc5H,uBAAuB;;;;;;;
|
|
1
|
+
{"file":"aico-special-news-carousel.entry.js","mappings":";;;;AAAA,MAAM,0BAA0B,GAAG,sGAAsG;;MCc5H,uBAAuB;;;;;;;4BAOD,EAAE;gCAEA,CAAC;;IAOpC,iBAAiB;QACf,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAe,EAAE,CAAC;QACrD,IAAI,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;IAED,oBAAoB;QAClB,IAAI,CAAC,uBAAwB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;KACrD;IAED,MAAM,iBAAiB;QACrB,IAAI,CAAC,YAAY,GAAG,MAAM,wBAAwB,CAAC,IAAI,CAAC,GAAI,EAAE,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,IA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I,CACtB,CACD,CACD,EACN,WAAK,KAAK,EAAC,0BAA0B,EAAC,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,IACjE,WACE,KAAK,EAAC,kCAAkC,EACxC,KAAK,EAAE,EAAE,iBAAiB,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAC1E,GAAG,EAAC,cAAc,eACP,MAAA,OAAO,CAAC,UAAU,CAAC,cAAc,mCAAI,OAAO,CAAC,UAAU,CAAC,KAAK,GACxE,CACE,CACF,EACN;SACH,CAAC,CACE,EACN;KACH;;;;;;","names":["$"],"sources":["src/components/aico-special-news-carousel/aico-special-news-carousel.css?tag=aico-special-news-carousel&encapsulation=scoped","src/components/aico-special-news-carousel/aico-special-news-carousel.tsx"],"sourcesContent":[".slick-slide > div {\n height: 100% !important;\n}\n","import { Component, Event, EventEmitter, Prop, State, h } from '@stencil/core';\nimport type { NewsResponse } from '../../model/NewsResponse';\nimport type { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\nimport type { Article } from '../../model/Article';\nimport { fetchSpecialNewsArticles } from '../../utils/utils';\n\nimport $ from 'jquery';\nimport 'slick-carousel';\n\n@Component({\n tag: 'aico-special-news-carousel',\n styleUrl: 'aico-special-news-carousel.css',\n scoped: true,\n})\nexport class AicoSpecialNewsCarousel {\n @State() newsResponse!: NewsResponse;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() newsChannels: string[] = [];\n\n @Prop() numberOfArticles: number = 6;\n\n @Event() articleClicked?: EventEmitter<Article>;\n\n private api?: AicoApiRequestInfo;\n private newsListFetchController?: AbortController;\n\n connectedCallback() {\n this.newsListFetchController = new AbortController();\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.newsListFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.newsResponse = await fetchSpecialNewsArticles(this.api!, 1, this.numberOfArticles, this.newsListFetchController!.signal, this.newsChannels);\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchSpecialNewsArticles(this.api!, 1, this.numberOfArticles, this.newsListFetchController.signal, this.newsChannels);\n }\n\n componentDidLoad() {\n $('.carousel').slick({\n autoplay: true,\n autoplaySpeed: 6000,\n dots: true,\n arrows: false,\n pauseOnDotsHover: true,\n });\n }\n\n render() {\n return (\n <div class=\"carousel\">\n {this.newsResponse.data.map(article => {\n const focusX = article.attributes.focusXPercentage ? `${article.attributes.focusXPercentage}%` : 'center';\n const focusY = article.attributes.focusYPercentage ? `${article.attributes.focusYPercentage}%` : 'center';\n return (\n <div class=\"carousel-item card border-0\">\n <div class=\"card-body\">\n <h5 class=\"card-title text-center text-uppercase\">\n <a\n class=\"text-reset text-decoration-none\"\n href=\"#\"\n onClick={e => {\n e.preventDefault();\n this.articleClicked?.emit(article);\n }}\n >\n {article.attributes.name}\n </a>\n </h5>\n </div>\n <div class=\"ratio ratio-16x9 mx-auto\" style={{ 'max-width': '50%' }}>\n <img\n class=\"card-img-bottom object-fit-cover\"\n style={{ 'object-position': `${focusX} ${focusY}`, 'min-height': '15rem' }}\n alt=\"News Picture\"\n data-lazy={article.attributes.optimizedImage ?? article.attributes.image}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -17,10 +17,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
17
17
|
let checkSlotRelocate = false;
|
|
18
18
|
let isSvgMode = false;
|
|
19
19
|
let queuePending = false;
|
|
20
|
-
const getAssetPath = (path) => {
|
|
21
|
-
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
22
|
-
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
23
|
-
};
|
|
24
20
|
const createTime = (fnName, tagName = '') => {
|
|
25
21
|
{
|
|
26
22
|
return () => {
|
|
@@ -2245,6 +2241,6 @@ const flush = () => {
|
|
|
2245
2241
|
const nextTick = (cb) => promiseResolve().then(cb);
|
|
2246
2242
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2247
2243
|
|
|
2248
|
-
export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c,
|
|
2244
|
+
export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2249
2245
|
|
|
2250
|
-
//# sourceMappingURL=index-
|
|
2246
|
+
//# sourceMappingURL=index-4621a8ba.js.map
|