@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-news-list.js","sourceRoot":"","sources":["../../../src/components/aico-news-list/aico-news-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAUtD,MAAM,OAAO,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,OA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G,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1E,IAAI,CAAC,IAAI,CAAC,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,CAAC,GAAG,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,CAAC,GAAG,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;IACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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() 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"]}
|
|
1
|
+
{"version":3,"file":"aico-news-list.js","sourceRoot":"","sources":["../../../src/components/aico-news-list/aico-news-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAUtD,MAAM,OAAO,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;IAC1E,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,uBAAwB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,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,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAClJ,CAAC;IAED,KAAK,CAAC,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,IAA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AC,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,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;IACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-news-list.stories.js","sourceRoot":"","sources":["../../../src/components/aico-news-list/aico-news-list.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aico-news-list.stories.js","sourceRoot":"","sources":["../../../src/components/aico-news-list/aico-news-list.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAA2B;IACnC,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,cAAc,EAAE,EAAE,IAAI,EAAE,UAAU,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,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,UAAU;KAC/B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAU;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,sCAAsC;QAC/C,eAAe,EAAE,0CAA0C;QAC3D,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,UAAU;KAC/B;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport { JSX } from '../../components';\n\nconst meta: Meta<JSX.AicoNewsList> = {\n component: 'aico-news-list',\n argTypes: {\n onArticleClick: { type: 'function' },\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 nextButtonText: 'Next',\n previousButtonText: 'Previous',\n },\n};\n\nexport const Fcz: Story = {\n args: {\n aicoUrl: 'https://app.aico.swiss/19838/api/v1/',\n aicoBearerToken: 'B3NXuTbnCeppJl9NHu27Kjs7Hm3EOKSGCkR6CVwO',\n nextButtonText: 'Next',\n previousButtonText: 'Previous',\n },\n};\n"]}
|
|
@@ -5,7 +5,10 @@ export class AicoNewsListItem {
|
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
7
|
var _a, _b;
|
|
8
|
-
return (h("div", { class: "card h-100
|
|
8
|
+
return (h("div", { class: "card h-100 pe-auto", style: { cursor: 'pointer' }, onClick: () => {
|
|
9
|
+
var _a;
|
|
10
|
+
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(this.article);
|
|
11
|
+
} }, 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))));
|
|
9
12
|
}
|
|
10
13
|
static get is() { return "aico-news-list-item"; }
|
|
11
14
|
static get encapsulation() { return "scoped"; }
|
|
@@ -46,8 +49,8 @@ export class AicoNewsListItem {
|
|
|
46
49
|
}
|
|
47
50
|
static get events() {
|
|
48
51
|
return [{
|
|
49
|
-
"method": "
|
|
50
|
-
"name": "
|
|
52
|
+
"method": "articleClick",
|
|
53
|
+
"name": "articleClick",
|
|
51
54
|
"bubbles": true,
|
|
52
55
|
"cancelable": true,
|
|
53
56
|
"composed": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-news-list-item.js","sourceRoot":"","sources":["../../../src/components/aico-news-list-item/aico-news-list-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAQxE,MAAM,OAAO,gBAAgB;;;;IAK3B,MAAM;;QACJ,OAAO,CACL,WAAK,KAAK,EAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"aico-news-list-item.js","sourceRoot":"","sources":["../../../src/components/aico-news-list-item/aico-news-list-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAQxE,MAAM,OAAO,gBAAgB;;;;IAK3B,MAAM;;QACJ,OAAO,CACL,WAAK,KAAK,EAAC,oBAAoB,EAC3B,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAC5B,OAAO,EAAE,GAAG,EAAE;;gBACZ,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC;YACH,WAAK,KAAK,EAAC,kCAAkC;gBAC3C,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;gBACF,WAAK,KAAK,EAAC,6CAA6C,GAA0C,CAC9F;YACN,WAAK,KAAK,EAAC,WAAW;gBACpB,UAAI,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAM;gBAC1D,SAAG,KAAK,EAAC,WAAW,IAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAK,CACtD,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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"]}
|
|
@@ -7,6 +7,7 @@ export class AicoSpecialNewsCarousel {
|
|
|
7
7
|
this.newsResponse = undefined;
|
|
8
8
|
this.aicoUrl = undefined;
|
|
9
9
|
this.aicoBearerToken = undefined;
|
|
10
|
+
this.newsChannels = [];
|
|
10
11
|
this.numberOfArticles = 6;
|
|
11
12
|
}
|
|
12
13
|
connectedCallback() {
|
|
@@ -17,11 +18,11 @@ export class AicoSpecialNewsCarousel {
|
|
|
17
18
|
this.newsListFetchController.abort('disconnected');
|
|
18
19
|
}
|
|
19
20
|
async componentWillLoad() {
|
|
20
|
-
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal);
|
|
21
|
+
this.newsResponse = await fetchSpecialNewsArticles(this.api, 1, this.numberOfArticles, this.newsListFetchController.signal, this.newsChannels);
|
|
21
22
|
}
|
|
22
23
|
async componentWillUpdate() {
|
|
23
24
|
this.newsListFetchController = new AbortController();
|
|
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
|
componentDidLoad() {
|
|
27
28
|
$('.carousel').slick({
|
|
@@ -92,6 +93,22 @@ export class AicoSpecialNewsCarousel {
|
|
|
92
93
|
"attribute": "aico-bearer-token",
|
|
93
94
|
"reflect": false
|
|
94
95
|
},
|
|
96
|
+
"newsChannels": {
|
|
97
|
+
"type": "unknown",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "string[]",
|
|
101
|
+
"resolved": "string[]",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": ""
|
|
109
|
+
},
|
|
110
|
+
"defaultValue": "[]"
|
|
111
|
+
},
|
|
95
112
|
"numberOfArticles": {
|
|
96
113
|
"type": "number",
|
|
97
114
|
"mutable": false,
|
package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-special-news-carousel.js","sourceRoot":"","sources":["../../../src/components/aico-special-news-carousel/aico-special-news-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAI/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,gBAAgB,CAAC;AAOxB,MAAM,OAAO,uBAAuB;;;;;
|
|
1
|
+
{"version":3,"file":"aico-special-news-carousel.js","sourceRoot":"","sources":["../../../src/components/aico-special-news-carousel/aico-special-news-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAI/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,gBAAgB,CAAC;AAOxB,MAAM,OAAO,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;IAC1E,CAAC;IAED,oBAAoB;QAClB,IAAI,C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BAA6B;gBACtC,WAAK,KAAK,EAAC,WAAW;oBACpB,UAAI,KAAK,EAAC,uCAAuC;wBAC/C,SACE,KAAK,EAAC,iCAAiC,EACvC,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,CAAC,CAAC,EAAE;;gCACX,CAAC,CAAC,cAAc,EAAE,CAAC;gCACnB,MAAA,IAAI,CAAC,cAAc,0CAAE,IAAI,CAAC,OAAO,CAAC,CAAC;4BACrC,CAAC,IAEA,OAAO,CAAC,UAAU,CAAC,IAAI,CACtB,CACD,CACD;gBACN,WAAK,KAAK,EAAC,0BAA0B,EAAC,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;oBACjE,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,CACP,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -2,11 +2,12 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export class AicoAskingContent {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.content = undefined;
|
|
5
|
+
this.locale = 'de';
|
|
5
6
|
}
|
|
6
7
|
render() {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
const translation = this.content.asking.translations.
|
|
9
|
-
return (h("div", { class: "card" }, h("div", { class: "card-body" }, h("div", { class: "card-text d-block" }, h("h1", { class: "card-title" }, "Asking"), h("table", { class: "team-table" }, h("tbody", null, h("tr", { class: "agenda-event" }, h("td", null, h("h3", null, this.content.asking.startsAt.toLocaleDateString())), h("td", null, `${this.content.asking.startTime.toLocaleDateString()} - ${(
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
const translation = (_a = this.content.asking.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
10
|
+
return (h("div", { class: "card" }, h("div", { class: "card-body" }, h("div", { class: "card-text d-block" }, h("h1", { class: "card-title" }, "Asking"), h("table", { class: "team-table" }, h("tbody", null, h("tr", { class: "agenda-event" }, h("td", null, h("h3", null, this.content.asking.startsAt.toLocaleDateString())), h("td", null, `${this.content.asking.startTime.toLocaleDateString()} - ${(_c = (_b = this.content.asking.endTime) === null || _b === void 0 ? void 0 : _b.toLocaleDateString()) !== null && _c !== void 0 ? _c : 'N/A'}`), h("td", { style: { width: '49%' } }, translation === null || translation === void 0 ? void 0 : translation.title)), h("tr", { class: "event-details" }, h("td", { colSpan: 3, style: { padding: '0' } }, h("table", { class: "more-details-table" }, h("tbody", null, h("tr", null, h("th", null, "Description"), h("td", null, this.content.asking.description)), h("tr", null, h("th", null, "Gathering"), h("td", null, this.content.asking.meetingPoint)), h("tr", null, h("th", null, "Place (Address)"), h("td", null, this.content.asking.location)), h("tr", null, h("th", null, "Asking for"), h("td", { style: { 'white-space': 'pre' } }, this.content.asking.recipents)), h("tr", null, h("th", null, "Clothing / Equipment"), h("td", { style: { 'white-space': 'pre' } }, this.content.asking.clothingEquipment)), h("tr", null, h("th", null, "Provisions"), h("td", null, this.content.asking.catering)), h("tr", null, h("th", null, "Coaching"), h("td", null, this.content.asking.coaching))))))))))));
|
|
10
11
|
}
|
|
11
12
|
static get is() { return "aico-asking-content"; }
|
|
12
13
|
static get encapsulation() { return "scoped"; }
|
|
@@ -42,6 +43,24 @@ export class AicoAskingContent {
|
|
|
42
43
|
"tags": [],
|
|
43
44
|
"text": ""
|
|
44
45
|
}
|
|
46
|
+
},
|
|
47
|
+
"locale": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "string",
|
|
52
|
+
"resolved": "string",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": ""
|
|
60
|
+
},
|
|
61
|
+
"attribute": "locale",
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"defaultValue": "'de'"
|
|
45
64
|
}
|
|
46
65
|
};
|
|
47
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-asking-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-asking-content/aico-asking-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQnD,MAAM,OAAO,iBAAiB
|
|
1
|
+
{"version":3,"file":"aico-asking-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-asking-content/aico-asking-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQnD,MAAM,OAAO,iBAAiB;;;sBAEH,IAAI;;IAE7B,MAAM;;QACJ,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC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ACE,qCAA6B;gDAC7B,UAAI,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,IAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAM,CAC9E;4CAEL;gDACE,2BAAmB;gDACnB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAM,CACpC;4CAEL;gDACE,yBAAiB;gDACjB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAM,CACpC,CACC,CACF,CACL,CACF,CACC,CACF,CACJ,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { AskingContent } from '../../../model/article/content/AskingContent';\n\n@Component({\n tag: 'aico-asking-content',\n styleUrl: 'aico-asking-content.css',\n scoped: true,\n})\nexport class AicoAskingContent {\n @Prop() content!: AskingContent;\n @Prop() locale: string = 'de';\n\n render() {\n const translation = this.content.asking.translations.find(translation => translation.locale === this.locale) ?? null;\n\n return (\n <div class=\"card\">\n <div class=\"card-body\">\n <div class=\"card-text d-block\">\n <h1 class=\"card-title\">Asking</h1>\n <table class=\"team-table\">\n <tbody>\n <tr class=\"agenda-event\">\n <td>\n <h3>{this.content.asking.startsAt.toLocaleDateString()}</h3>\n </td>\n <td>{`${this.content.asking.startTime.toLocaleDateString()} - ${this.content.asking.endTime?.toLocaleDateString() ?? 'N/A'}`}</td>\n <td style={{ width: '49%' }}>{translation?.title}</td>\n </tr>\n <tr class=\"event-details\">\n <td colSpan={3} style={{ padding: '0' }}>\n <table class=\"more-details-table\">\n <tbody>\n <tr>\n <th>Description</th>\n <td>{this.content.asking.description}</td>\n </tr>\n\n <tr>\n <th>Gathering</th>\n <td>{this.content.asking.meetingPoint}</td>\n </tr>\n\n <tr>\n <th>Place (Address)</th>\n <td>{this.content.asking.location}</td>\n </tr>\n\n <tr>\n <th>Asking for</th>\n <td style={{ 'white-space': 'pre' }}>{this.content.asking.recipents}</td>\n </tr>\n\n <tr>\n <th>Clothing / Equipment</th>\n <td style={{ 'white-space': 'pre' }}>{this.content.asking.clothingEquipment}</td>\n </tr>\n\n <tr>\n <th>Provisions</th>\n <td>{this.content.asking.catering}</td>\n </tr>\n\n <tr>\n <th>Coaching</th>\n <td>{this.content.asking.coaching}</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js
CHANGED
|
@@ -4,6 +4,7 @@ const meta = {
|
|
|
4
4
|
export default meta;
|
|
5
5
|
export const Example = {
|
|
6
6
|
args: {
|
|
7
|
+
locale: 'de',
|
|
7
8
|
content: {
|
|
8
9
|
id: 1234,
|
|
9
10
|
createdAt: new Date(),
|
|
@@ -18,6 +19,21 @@ export const Example = {
|
|
|
18
19
|
createdAt: new Date(),
|
|
19
20
|
updatedAt: new Date(),
|
|
20
21
|
title: 'Asking title',
|
|
22
|
+
locale: 'de'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 1234,
|
|
26
|
+
createdAt: new Date(),
|
|
27
|
+
updatedAt: new Date(),
|
|
28
|
+
title: 'Asking title en',
|
|
29
|
+
locale: 'en'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 1234,
|
|
33
|
+
createdAt: new Date(),
|
|
34
|
+
updatedAt: new Date(),
|
|
35
|
+
title: 'Asking title ru',
|
|
36
|
+
locale: 'ru'
|
|
21
37
|
},
|
|
22
38
|
],
|
|
23
39
|
startsAt: new Date(),
|
package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-asking-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-asking-content/aico-asking-content.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAAS;IACjB,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,MAAM,EAAE;gBACN,EAAE,EAAE,IAAI;gBACR,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,YAAY,EAAE;oBACZ;wBACE,EAAE,EAAE,IAAI;wBACR,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,KAAK,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"aico-asking-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-asking-content/aico-asking-content.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAAS;IACjB,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,MAAM,EAAE;gBACN,EAAE,EAAE,IAAI;gBACR,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,YAAY,EAAE;oBACZ;wBACE,EAAE,EAAE,IAAI;wBACR,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,KAAK,EAAE,cAAc;wBACrB,MAAM,EAAE,IAAI;qBACb;oBACD;wBACE,EAAE,EAAE,IAAI;wBACR,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,KAAK,EAAE,iBAAiB;wBACxB,MAAM,EAAE,IAAI;qBACb;oBACD;wBACE,EAAE,EAAE,IAAI;wBACR,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;wBACrB,KAAK,EAAE,iBAAiB;wBACxB,MAAM,EAAE,IAAI;qBACb;iBACF;gBACD,QAAQ,EAAE,IAAI,IAAI,EAAE;gBACpB,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,OAAO,EAAE,IAAI,IAAI,EAAE;gBACnB,WAAW,EAAE,aAAa;gBAC1B,YAAY,EAAE,eAAe;gBAC7B,QAAQ,EAAE,UAAU;gBACpB,SAAS,EAAE,WAAW;gBACtB,iBAAiB,EAAE,oBAAoB;gBACvC,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,UAAU;aACrB;SACe;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { AskingContent } from '../../../model/article/content/AskingContent';\n\nconst meta: Meta = {\n component: 'aico-asking-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Example: Story = {\n args: {\n locale: 'de',\n content: {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n asking: {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n title: 'Asking title',\n locale: 'de'\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n title: 'Asking title en',\n locale: 'en'\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n title: 'Asking title ru',\n locale: 'ru'\n },\n ],\n startsAt: new Date(),\n startTime: new Date(),\n endTime: new Date(),\n description: 'Description',\n meetingPoint: 'Meeting point',\n location: 'Location',\n recipents: 'Recipents',\n clothingEquipment: 'Clothing equipment',\n catering: 'Catering',\n coaching: 'Coaching',\n },\n } as AskingContent,\n },\n};\n"]}
|
package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js
CHANGED
|
@@ -3,9 +3,11 @@ import ConditionalRender from "../../../utils/ConditionalRender";
|
|
|
3
3
|
export class AicoBlockQuoteContent {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.content = undefined;
|
|
6
|
+
this.locale = 'de';
|
|
6
7
|
}
|
|
7
8
|
render() {
|
|
8
|
-
|
|
9
|
+
var _a;
|
|
10
|
+
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
9
11
|
return (h(ConditionalRender, { condition: translation !== null }, h("blockquote", { class: "blockquote", style: { 'background-color': this.content.quotesColor } }, h("p", { class: "mb-2", style: { color: this.content.textColor } }, translation.quoteText), h("footer", { class: "blockquote-footer ms-2", style: { color: this.content.authorColor } }, translation.quoteAuthorLine))));
|
|
10
12
|
}
|
|
11
13
|
static get is() { return "aico-block-quote-content"; }
|
|
@@ -42,6 +44,24 @@ export class AicoBlockQuoteContent {
|
|
|
42
44
|
"tags": [],
|
|
43
45
|
"text": ""
|
|
44
46
|
}
|
|
47
|
+
},
|
|
48
|
+
"locale": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "string",
|
|
53
|
+
"resolved": "string",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": ""
|
|
61
|
+
},
|
|
62
|
+
"attribute": "locale",
|
|
63
|
+
"reflect": false,
|
|
64
|
+
"defaultValue": "'de'"
|
|
45
65
|
}
|
|
46
66
|
};
|
|
47
67
|
}
|
package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-block-quote-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-block-quote-content/aico-block-quote-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,MAAM,OAAO,qBAAqB
|
|
1
|
+
{"version":3,"file":"aico-block-quote-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-block-quote-content/aico-block-quote-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,MAAM,OAAO,qBAAqB;;;sBAEP,IAAI;;IAE7B,MAAM;;QACJ,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,mCAAI,IAAI,CAAC;QAG9G,OAAO,CACL,EAAC,iBAAiB,IAAC,SAAS,EAAE,WAAW,KAAK,IAAI;YAChD,kBAAY,KAAK,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;gBACpF,SAAG,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IACrD,WAAY,CAAC,SAAS,CACrB;gBACJ,cAAQ,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAC9E,WAAY,CAAC,eAAe,CACtB,CACE,CACK,CACrB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport type { BlockQuoteContent } from '../../../model/article/content/BlockQuoteContent';\nimport ConditionalRender from '../../../utils/ConditionalRender';\n\n@Component({\n tag: 'aico-block-quote-content',\n styleUrl: 'aico-block-quote-content.css',\n scoped: true,\n})\nexport class AicoBlockQuoteContent {\n @Prop() content!: BlockQuoteContent;\n @Prop() locale: string = 'de';\n\n render() {\n const translation = this.content.translations.find(translation => translation.locale === this.locale) ?? null;\n\n\n return (\n <ConditionalRender condition={translation !== null}>\n <blockquote class=\"blockquote\" style={{ 'background-color': this.content.quotesColor }}>\n <p class=\"mb-2\" style={{ color: this.content.textColor }}>\n {translation!.quoteText}\n </p>\n <footer class=\"blockquote-footer ms-2\" style={{ color: this.content.authorColor }}>\n {translation!.quoteAuthorLine}\n </footer>\n </blockquote>\n </ConditionalRender>\n );\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ const meta = {
|
|
|
4
4
|
export default meta;
|
|
5
5
|
export const Example = {
|
|
6
6
|
args: {
|
|
7
|
+
locale: 'de',
|
|
7
8
|
content: {
|
|
8
9
|
id: 1234,
|
|
9
10
|
createdAt: new Date(),
|
|
@@ -15,6 +16,23 @@ export const Example = {
|
|
|
15
16
|
updatedAt: new Date(),
|
|
16
17
|
quoteText: 'foo bar baz',
|
|
17
18
|
quoteAuthorLine: 'John Doe',
|
|
19
|
+
locale: 'de'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 1234,
|
|
23
|
+
createdAt: new Date(),
|
|
24
|
+
updatedAt: new Date(),
|
|
25
|
+
quoteText: 'foo bar baz en',
|
|
26
|
+
quoteAuthorLine: 'John Doe en',
|
|
27
|
+
locale: 'en'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 1234,
|
|
31
|
+
createdAt: new Date(),
|
|
32
|
+
updatedAt: new Date(),
|
|
33
|
+
quoteText: 'foo bar baz ru',
|
|
34
|
+
quoteAuthorLine: 'John Doe ru',
|
|
35
|
+
locale: 'ru'
|
|
18
36
|
},
|
|
19
37
|
],
|
|
20
38
|
quotesColor: 'gray',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-block-quote-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-block-quote-content/aico-block-quote-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAoC;IAC5C,SAAS,EAAE,0BAA0B;CACtC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,aAAa;oBACxB,eAAe,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"aico-block-quote-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-block-quote-content/aico-block-quote-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAoC;IAC5C,SAAS,EAAE,0BAA0B;CACtC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,aAAa;oBACxB,eAAe,EAAE,UAAU;oBAC3B,MAAM,EAAE,IAAI;iBACb;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,gBAAgB;oBAC3B,eAAe,EAAE,aAAa;oBAC9B,MAAM,EAAE,IAAI;iBACb;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,gBAAgB;oBAC3B,eAAe,EAAE,aAAa;oBAC9B,MAAM,EAAE,IAAI;iBACb;aACF;YACD,WAAW,EAAE,MAAM;YACnB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,MAAM;SACC;KACvB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { BlockQuoteContent } from '../../../model/article/content/BlockQuoteContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoBlockQuoteContent> = {\n component: 'aico-block-quote-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Example: Story = {\n args: {\n locale: 'de',\n content: {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n quoteText: 'foo bar baz',\n quoteAuthorLine: 'John Doe',\n locale: 'de'\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n quoteText: 'foo bar baz en',\n quoteAuthorLine: 'John Doe en',\n locale: 'en'\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n quoteText: 'foo bar baz ru',\n quoteAuthorLine: 'John Doe ru',\n locale: 'ru'\n },\n ],\n quotesColor: 'gray',\n textColor: 'red',\n authorColor: 'pink',\n } as BlockQuoteContent,\n },\n};\n"]}
|
|
@@ -4,9 +4,11 @@ import ConditionalRender from "../../../utils/ConditionalRender";
|
|
|
4
4
|
export class AicoBulletContent {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.content = undefined;
|
|
7
|
+
this.locale = 'de';
|
|
7
8
|
}
|
|
8
9
|
render() {
|
|
9
|
-
|
|
10
|
+
var _a;
|
|
11
|
+
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
10
12
|
const styles = new Map();
|
|
11
13
|
if (this.content.fontSize) {
|
|
12
14
|
styles.set('font-size', this.content.fontSize);
|
|
@@ -14,17 +16,17 @@ export class AicoBulletContent {
|
|
|
14
16
|
if (this.content.fontFamily) {
|
|
15
17
|
styles.set('font-family', this.content.fontFamily);
|
|
16
18
|
}
|
|
17
|
-
return (h("div", { class: "content", style: Object.fromEntries(styles) }, h(ConditionalRender, { condition: translation !== null }, h("aico-title-content", { content: this.makeTitleContent(translation) })), h("ul", null, this.content.bulletBullets
|
|
19
|
+
return (h("div", { class: "content", style: Object.fromEntries(styles) }, h(ConditionalRender, { condition: translation !== null }, h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), h("ul", null, this.content.bulletBullets
|
|
18
20
|
.sort((a, b) => { var _a, _b; return ((_a = a.sort) !== null && _a !== void 0 ? _a : 0) - ((_b = b.sort) !== null && _b !== void 0 ? _b : 0); })
|
|
19
21
|
.map(bullet => {
|
|
20
22
|
if (bullet.translations.length === 0) {
|
|
21
23
|
return null;
|
|
22
24
|
}
|
|
23
|
-
const translation = bullet.translations
|
|
24
|
-
if (strIsNullOrEmptyOrWhitespace(translation.text)) {
|
|
25
|
+
const translation = bullet.translations.find(translation => translation.locale === this.locale);
|
|
26
|
+
if (strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.text)) {
|
|
25
27
|
return null;
|
|
26
28
|
}
|
|
27
|
-
return h("li", null, translation.text);
|
|
29
|
+
return h("li", null, translation === null || translation === void 0 ? void 0 : translation.text);
|
|
28
30
|
}))));
|
|
29
31
|
}
|
|
30
32
|
makeTitleContent(translation) {
|
|
@@ -72,6 +74,24 @@ export class AicoBulletContent {
|
|
|
72
74
|
"tags": [],
|
|
73
75
|
"text": ""
|
|
74
76
|
}
|
|
77
|
+
},
|
|
78
|
+
"locale": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "string",
|
|
83
|
+
"resolved": "string",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": false,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": ""
|
|
91
|
+
},
|
|
92
|
+
"attribute": "locale",
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"defaultValue": "'de'"
|
|
75
95
|
}
|
|
76
96
|
};
|
|
77
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-bullet-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-bullet-content/aico-bullet-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,MAAM,OAAO,iBAAiB
|
|
1
|
+
{"version":3,"file":"aico-bullet-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-bullet-content/aico-bullet-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,MAAM,OAAO,iBAAiB;;;sBAEH,IAAI;;IAE7B,MAAM;;QAEJ,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW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X,WAAW,CAAE,IAAI,CAAC,EAAE;oBACnD,OAAO,IAAI,CAAC;iBACb;gBAED,OAAO,cAAK,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,CAAM,CAAC;YACtC,CAAC,CAAC,CACD,CACD,CACP,CAAC;IACJ,CAAC;IAEO,gBAAgB,CAAC,WAAwB;;QAC/C,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE;YACnB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;YACjC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;YACjC,aAAa,EAAE,KAAK;YACpB,IAAI,EAAE,MAAA,IAAI,CAAC,OAAO,CAAC,SAAS,mCAAI,IAAI;YACpC,YAAY,EAAE,mBAAM,WAAW,EAAG;SACnC,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport type { BulletContent } from '../../../model/article/content/BulletContent';\nimport { strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\nimport type { Translation } from '../../../model/article/Translation';\nimport type { TitleContent } from '../../../model/article/content/TitleContent';\nimport ConditionalRender from '../../../utils/ConditionalRender';\n\n@Component({\n tag: 'aico-bullet-content',\n styleUrl: 'aico-bullet-content.css',\n scoped: true,\n})\nexport class AicoBulletContent {\n @Prop() content!: BulletContent;\n @Prop() locale: string = 'de';\n\n render() {\n\n const translation = this.content.translations.find(translation => translation.locale === this.locale) ?? null;\n\n const styles = new Map<string, string>();\n if (this.content.fontSize) {\n styles.set('font-size', this.content.fontSize);\n }\n\n if (this.content.fontFamily) {\n styles.set('font-family', this.content.fontFamily);\n }\n\n return (\n <div class=\"content\" style={Object.fromEntries(styles)}>\n <ConditionalRender condition={translation !== null}>\n <aico-title-content content={this.makeTitleContent(translation!)} locale={this.locale} />\n </ConditionalRender>\n <ul>\n {this.content.bulletBullets\n .sort((a, b) => (a.sort ?? 0) - (b.sort ?? 0))\n .map(bullet => {\n if (bullet.translations.length === 0) {\n return null;\n }\n\n const translation = bullet.translations.find(translation => translation.locale === this.locale);\n if (strIsNullOrEmptyOrWhitespace(translation?.text)) {\n return null;\n }\n\n return <li>{translation?.text}</li>;\n })}\n </ul>\n </div>\n );\n }\n\n private makeTitleContent(translation: Translation): TitleContent {\n return {\n id: this.content.id,\n createdAt: this.content.createdAt,\n updatedAt: this.content.updatedAt,\n hasUnderscore: false,\n size: this.content.titleSize ?? 'h1',\n translations: [{ ...translation }],\n };\n }\n}\n"]}
|
package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js
CHANGED
|
@@ -4,6 +4,7 @@ const meta = {
|
|
|
4
4
|
export default meta;
|
|
5
5
|
export const Example = {
|
|
6
6
|
args: {
|
|
7
|
+
locale: 'de',
|
|
7
8
|
content: {
|
|
8
9
|
id: 1234,
|
|
9
10
|
createdAt: new Date(),
|
|
@@ -17,6 +18,13 @@ export const Example = {
|
|
|
17
18
|
locale: 'en-GB',
|
|
18
19
|
title: 'Bullet list title',
|
|
19
20
|
},
|
|
21
|
+
{
|
|
22
|
+
id: 1234,
|
|
23
|
+
createdAt: new Date(),
|
|
24
|
+
updatedAt: new Date(),
|
|
25
|
+
locale: 'de',
|
|
26
|
+
title: 'Bullet list title de',
|
|
27
|
+
},
|
|
20
28
|
],
|
|
21
29
|
bulletBullets: [
|
|
22
30
|
{
|
|
@@ -32,6 +40,13 @@ export const Example = {
|
|
|
32
40
|
locale: 'en-GB',
|
|
33
41
|
text: 'bar',
|
|
34
42
|
},
|
|
43
|
+
{
|
|
44
|
+
id: 1234,
|
|
45
|
+
createdAt: new Date(),
|
|
46
|
+
updatedAt: new Date(),
|
|
47
|
+
locale: 'de',
|
|
48
|
+
text: 'bar de',
|
|
49
|
+
},
|
|
35
50
|
],
|
|
36
51
|
},
|
|
37
52
|
{
|
|
@@ -47,6 +62,13 @@ export const Example = {
|
|
|
47
62
|
locale: 'en-GB',
|
|
48
63
|
text: 'foo',
|
|
49
64
|
},
|
|
65
|
+
{
|
|
66
|
+
id: 1234,
|
|
67
|
+
createdAt: new Date(),
|
|
68
|
+
updatedAt: new Date(),
|
|
69
|
+
locale: 'de',
|
|
70
|
+
text: 'foo de',
|
|
71
|
+
},
|
|
50
72
|
],
|
|
51
73
|
},
|
|
52
74
|
{
|
|
@@ -62,6 +84,13 @@ export const Example = {
|
|
|
62
84
|
locale: 'en-GB',
|
|
63
85
|
text: 'baz',
|
|
64
86
|
},
|
|
87
|
+
{
|
|
88
|
+
id: 1234,
|
|
89
|
+
createdAt: new Date(),
|
|
90
|
+
updatedAt: new Date(),
|
|
91
|
+
locale: 'de',
|
|
92
|
+
text: 'baz de',
|
|
93
|
+
},
|
|
65
94
|
],
|
|
66
95
|
},
|
|
67
96
|
],
|
package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-bullet-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-bullet-content/aico-bullet-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAgC;IACxC,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,mBAAmB;iBAC3B;aACF;YACD,aAAa,EAAE;gBACb;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,IAAI,EAAE,CAAC;oBACP,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,IAAI,EAAE,KAAK;yBACZ;qBACF;iBACF;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,IAAI,EAAE,CAAC;oBACP,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,IAAI,EAAE,KAAK;yBACZ;qBACF;iBACF;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,IAAI,EAAE,CAAC;oBACP,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,IAAI,EAAE,KAAK;yBACZ;qBACF;iBACF;aACF;SACe;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { BulletContent } from '../../../model/article/content/BulletContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoBulletContent> = {\n component: 'aico-bullet-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Example: Story = {\n args: {\n content: {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n titleSize: 'h2',\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n title: 'Bullet list title',\n },\n ],\n bulletBullets: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 2,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'bar',\n },\n ],\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 1,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'foo',\n },\n ],\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 3,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'baz',\n },\n ],\n },\n ],\n } as BulletContent,\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"aico-bullet-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-bullet-content/aico-bullet-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAgC;IACxC,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE;YACP,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,mBAAmB;iBAC3B;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBAC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EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,IAAI,EAAE,KAAK;yBACZ;wBACD;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,IAAI;4BACZ,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;aACF;SACe;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { BulletContent } from '../../../model/article/content/BulletContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoBulletContent> = {\n component: 'aico-bullet-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Example: Story = {\n args: {\n locale: 'de',\n content: {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n titleSize: 'h2',\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n title: 'Bullet list title',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n title: 'Bullet list title de',\n },\n ],\n bulletBullets: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 2,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'bar',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n text: 'bar de',\n },\n ],\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 1,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'foo',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n text: 'foo de',\n },\n ],\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n sort: 3,\n translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'en-GB',\n text: 'baz',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n text: 'baz de',\n },\n ],\n },\n ],\n } as BulletContent,\n },\n};\n"]}
|