@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-upload-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-upload-content/aico-upload-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,MAAM,OAAO,iBAAiB
|
|
1
|
+
{"version":3,"file":"aico-upload-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-upload-content/aico-upload-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAI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AG,IAAI,EAAE,MAAM,CAAC,IAAK,EAAE,MAAM,EAAC,QAAQ,EAAC,KAAK,EAAC,wCAAwC,IAClF,MAAM,CAAC,IAAI,CACV,CACL,CAAC;gBACJ,CAAC,CAAC,CACE,CACY,CACf,CACR,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,IAAI;YACV,YAAY,EAAE,mBAAM,WAAW,EAAG;SACnC,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport type { UploadContent } from '../../../model/article/content/UploadContent';\nimport type { Translation } from '../../../model/article/Translation';\nimport type { TitleContent } from '../../../model/article/content/TitleContent';\nimport { getYoutubeURL, strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\nimport ConditionalRender from '../../../utils/ConditionalRender';\n\n@Component({\n tag: 'aico-upload-content',\n styleUrl: 'aico-upload-content.css',\n scoped: true,\n})\nexport class AicoUploadContent {\n @Prop() content!: UploadContent;\n\n @Prop() locale: string = 'de';\n\n render() {\n const translation = this.content.translations.find(translation => translation.locale === this.locale) ?? null;\n const youtubeUrl = this.content && this.content.videoUrl ? getYoutubeURL(this.content.videoUrl) : null;\n\n return (\n <Host>\n <ConditionalRender condition={translation !== null}>\n <aico-title-content content={this.makeTitleContent(translation!)} locale={this.locale} />\n </ConditionalRender>\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(youtubeUrl)}>\n <div class=\"ratio ratio-16x9\">\n <iframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowFullScreen src={youtubeUrl!} />\n </div>\n </ConditionalRender>\n <ConditionalRender condition={!this.content.shouldHideFile}>\n <p class=\"fs-3 mt-3\">Files:</p>\n <div class=\"list-group list-group-flush\">\n {this.content.uploads.map(upload => {\n if (strIsNullOrEmptyOrWhitespace(upload.path)) {\n return null;\n }\n\n return (\n <a href={upload.path!} target=\"_blank\" class=\"list-group-item list-group-item-action\">\n {upload.name}\n </a>\n );\n })}\n </div>\n </ConditionalRender>\n </Host>\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: 'h2',\n translations: [{ ...translation }],\n };\n }\n}\n"]}
|
package/dist/collection/components/content/aico-upload-content/aico-upload-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(),
|
|
@@ -16,6 +17,13 @@ export const Example = {
|
|
|
16
17
|
locale: 'en-GB',
|
|
17
18
|
title: 'Hello :)',
|
|
18
19
|
},
|
|
20
|
+
{
|
|
21
|
+
id: 1234,
|
|
22
|
+
createdAt: new Date(),
|
|
23
|
+
updatedAt: new Date(),
|
|
24
|
+
locale: 'de',
|
|
25
|
+
title: 'Hello de :)',
|
|
26
|
+
},
|
|
19
27
|
],
|
|
20
28
|
videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',
|
|
21
29
|
shouldHideFile: false,
|
package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-upload-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-upload-content/aico-upload-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAgC;IACxC,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;iBAClB;aACF;YACD,QAAQ,EAAE,6CAA6C;YACvD,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;aACF;SACe;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { UploadContent } from '../../../model/article/content/UploadContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoUploadContent> = {\n component: 'aico-upload-content',\n};\n\nexport default meta;\n\nexport const Example: StoryObj = {\n args: {\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 locale: 'en-GB',\n title: 'Hello :)',\n },\n ],\n videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n shouldHideFile: false,\n uploads: [\n {\n name: 'foo',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n {\n name: 'bar',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n {\n name: 'baz',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n ],\n } as UploadContent,\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"aico-upload-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-upload-content/aico-upload-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAgC;IACxC,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;iBAClB;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,aAAa;iBACrB;aACF;YACD,QAAQ,EAAE,6CAA6C;YACvD,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,6CAA6C;iBACpD;aACF;SACe;KACnB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { UploadContent } from '../../../model/article/content/UploadContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoUploadContent> = {\n component: 'aico-upload-content',\n};\n\nexport default meta;\n\nexport const Example: StoryObj = {\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 locale: 'en-GB',\n title: 'Hello :)',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n title: 'Hello de :)',\n },\n ],\n videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n shouldHideFile: false,\n uploads: [\n {\n name: 'foo',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n {\n name: 'bar',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n {\n name: 'baz',\n path: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n ],\n } as UploadContent,\n },\n};\n"]}
|
|
@@ -4,11 +4,13 @@ import { getYoutubeURL, strIsNullOrEmptyOrWhitespace } from "../../../utils/util
|
|
|
4
4
|
export class AicoVideoContent {
|
|
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 youtubeUrl = translation && translation.videoUrl ? getYoutubeURL(translation.videoUrl) : null;
|
|
11
|
-
return (h(Host, null, h(ConditionalRender, { condition: translation !== null }, h("aico-title-content", { content: this.makeTitleContent(translation) })), h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(youtubeUrl) }, h("div", { class: "ratio ratio-16x9" }, h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(this.content.localVideoUrl) }, h("div", { class: "ratio ratio-16x9" }, h("video", { class: "media-card-video", controls: true, playsInline: true, style: { height: this.content.isVideoMinimized ? '400px' : '100%' } }, h("source", { src: this.content.localVideoUrl, type: "video/mp4" }))))));
|
|
13
|
+
return (h(Host, null, h(ConditionalRender, { condition: translation !== null }, h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(youtubeUrl) }, h("div", { class: "ratio ratio-16x9" }, h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(this.content.localVideoUrl) }, h("div", { class: "ratio ratio-16x9" }, h("video", { class: "media-card-video", controls: true, playsInline: true, style: { height: this.content.isVideoMinimized ? '400px' : '100%' } }, h("source", { src: this.content.localVideoUrl, type: "video/mp4" }))))));
|
|
12
14
|
}
|
|
13
15
|
makeTitleContent(translation) {
|
|
14
16
|
var _a;
|
|
@@ -55,6 +57,24 @@ export class AicoVideoContent {
|
|
|
55
57
|
"tags": [],
|
|
56
58
|
"text": ""
|
|
57
59
|
}
|
|
60
|
+
},
|
|
61
|
+
"locale": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "string",
|
|
66
|
+
"resolved": "string",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": ""
|
|
74
|
+
},
|
|
75
|
+
"attribute": "locale",
|
|
76
|
+
"reflect": false,
|
|
77
|
+
"defaultValue": "'de'"
|
|
58
78
|
}
|
|
59
79
|
};
|
|
60
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-video-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-video-content/aico-video-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAOnF,MAAM,OAAO,gBAAgB
|
|
1
|
+
{"version":3,"file":"aico-video-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-video-content/aico-video-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAOnF,MAAM,OAAO,gBAAgB;;;sBAGF,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;QAC9G,MAAM,UAAU,GAAG,WAAW,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAEpG,OAAO,CACL,EAAC,IAAI;YACH,EAAC,iBAAiB,IAAC,SAAS,EAAE,WAAW,KAAK,IAAI;gBAChD,0BAAoB,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,WAAY,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CACvE;YACpB,EAAC,iBAAiB,IAAC,SAAS,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC;gBACrE,WAAK,KAAK,EAAC,kBAAkB;oBAC3B,cAAQ,KAAK,EAAC,0FAA0F,EAAC,eAAe,QAAC,GAAG,EAAE,UAAW,GAAI,CACzI,CACY;YACpB,EAAC,iBAAiB,IAAC,SAAS,EAAE,CAAC,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;gBACrF,WAAK,KAAK,EAAC,kBAAkB;oBAC3B,aAAO,KAAK,EAAC,kBAAkB,EAAC,QAAQ,QAAC,WAAW,QAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE;wBACtH,cAAQ,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,EAAC,WAAW,GAAG,CACtD,CACJ,CACY,CACf,CACR,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, Host, Prop, h } from '@stencil/core';\nimport type { VideoContent } from '../../../model/article/content/VideoContent';\nimport type { Translation } from '../../../model/article/Translation';\nimport type { TitleContent } from '../../../model/article/content/TitleContent';\nimport ConditionalRender from '../../../utils/ConditionalRender';\nimport { getYoutubeURL, strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\n\n@Component({\n tag: 'aico-video-content',\n styleUrl: 'aico-video-content.css',\n scoped: true,\n})\nexport class AicoVideoContent {\n @Prop() content!: VideoContent;\n\n @Prop() locale: string = 'de';\n\n render() {\n const translation = this.content.translations.find(translation => translation.locale === this.locale) ?? null;\n const youtubeUrl = translation && translation.videoUrl ? getYoutubeURL(translation.videoUrl) : null;\n\n return (\n <Host>\n <ConditionalRender condition={translation !== null}>\n <aico-title-content content={this.makeTitleContent(translation!)} locale={this.locale} />\n </ConditionalRender>\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(youtubeUrl)}>\n <div class=\"ratio ratio-16x9\">\n <iframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowFullScreen src={youtubeUrl!} />\n </div>\n </ConditionalRender>\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(this.content.localVideoUrl)}>\n <div class=\"ratio ratio-16x9\">\n <video class=\"media-card-video\" controls playsInline style={{ height: this.content.isVideoMinimized ? '400px' : '100%' }}>\n <source src={this.content.localVideoUrl} type=\"video/mp4\" />\n </video>\n </div>\n </ConditionalRender>\n </Host>\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 ?? 'h2',\n translations: [{ ...translation }],\n };\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ const meta = {
|
|
|
4
4
|
export default meta;
|
|
5
5
|
export const Youtube = {
|
|
6
6
|
args: {
|
|
7
|
+
locale: 'de',
|
|
7
8
|
content: {
|
|
8
9
|
id: 1234,
|
|
9
10
|
createdAt: new Date(),
|
|
@@ -17,12 +18,21 @@ export const Youtube = {
|
|
|
17
18
|
title: 'Hello :)',
|
|
18
19
|
videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',
|
|
19
20
|
},
|
|
21
|
+
{
|
|
22
|
+
id: 1234,
|
|
23
|
+
createdAt: new Date(),
|
|
24
|
+
updatedAt: new Date(),
|
|
25
|
+
locale: 'de',
|
|
26
|
+
title: 'Hello de :)',
|
|
27
|
+
videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',
|
|
28
|
+
},
|
|
20
29
|
],
|
|
21
30
|
},
|
|
22
31
|
},
|
|
23
32
|
};
|
|
24
33
|
export const HtmlVideo = {
|
|
25
34
|
args: {
|
|
35
|
+
locale: 'de',
|
|
26
36
|
content: {
|
|
27
37
|
id: 1234,
|
|
28
38
|
createdAt: new Date(),
|
|
@@ -35,6 +45,13 @@ export const HtmlVideo = {
|
|
|
35
45
|
locale: 'en-GB',
|
|
36
46
|
title: 'Hello :)',
|
|
37
47
|
},
|
|
48
|
+
{
|
|
49
|
+
id: 1234,
|
|
50
|
+
createdAt: new Date(),
|
|
51
|
+
updatedAt: new Date(),
|
|
52
|
+
locale: 'de',
|
|
53
|
+
title: 'Hello de :)',
|
|
54
|
+
},
|
|
38
55
|
],
|
|
39
56
|
localVideoUrl: 'https://63vod-adaptive.akamaized.net/exp=1705508449~acl=%2Fa156ad05-7584-419d-88f0-f3b8178c6856%2F%2A~hmac=c5c0e2ae58210ded1ca504ec11ff52843417d2fec0b748409741f033595117fb/a156ad05-7584-419d-88f0-f3b8178c6856/parcel/audio/e3e208cf.mp4',
|
|
40
57
|
},
|
package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aico-video-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-video-content/aico-video-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAA+B;IACvC,SAAS,EAAE,oBAAoB;CAChC,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE,6CAA6C;iBACxD;aACF;SACc;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;iBAClB;aACF;YACD,aAAa,EACX,4OAA4O;SAC/N;KAClB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { VideoContent } from '../../../model/article/content/VideoContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoVideoContent> = {\n component: 'aico-video-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Youtube: Story = {\n args: {\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 locale: 'en-GB',\n title: 'Hello :)',\n videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n ],\n } as VideoContent,\n },\n};\n\nexport const HtmlVideo: Story = {\n args: {\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 locale: 'en-GB',\n title: 'Hello :)',\n },\n ],\n localVideoUrl:\n 'https://63vod-adaptive.akamaized.net/exp=1705508449~acl=%2Fa156ad05-7584-419d-88f0-f3b8178c6856%2F%2A~hmac=c5c0e2ae58210ded1ca504ec11ff52843417d2fec0b748409741f033595117fb/a156ad05-7584-419d-88f0-f3b8178c6856/parcel/audio/e3e208cf.mp4',\n } as VideoContent,\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"aico-video-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-video-content/aico-video-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAA+B;IACvC,SAAS,EAAE,oBAAoB;CAChC,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE,6CAA6C;iBACxD;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,aAAa;oBACpB,QAAQ,EAAE,6CAA6C;iBACxD;aACF;SACc;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,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,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,UAAU;iBAClB;gBACD;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,aAAa;iBACrB;aACF;YACD,aAAa,EACX,4OAA4O;SAC/N;KAClB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { VideoContent } from '../../../model/article/content/VideoContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoVideoContent> = {\n component: 'aico-video-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Youtube: 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 locale: 'en-GB',\n title: 'Hello :)',\n videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n title: 'Hello de :)',\n videoUrl: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n ],\n } as VideoContent,\n },\n};\n\nexport const HtmlVideo: 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 locale: 'en-GB',\n title: 'Hello :)',\n },\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n locale: 'de',\n title: 'Hello de :)',\n },\n ],\n localVideoUrl:\n 'https://63vod-adaptive.akamaized.net/exp=1705508449~acl=%2Fa156ad05-7584-419d-88f0-f3b8178c6856%2F%2A~hmac=c5c0e2ae58210ded1ca504ec11ff52843417d2fec0b748409741f033595117fb/a156ad05-7584-419d-88f0-f3b8178c6856/parcel/audio/e3e208cf.mp4',\n } as VideoContent,\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselContent.js","sourceRoot":"","sources":["../../../../src/model/article/content/CarouselContent.ts"],"names":[],"mappings":"","sourcesContent":["import { Entity } from '../../Entity';\nimport { Translation } from '../Translation';\n\nexport type CarouselImage = Entity & {\n order: number;\n picture
|
|
1
|
+
{"version":3,"file":"CarouselContent.js","sourceRoot":"","sources":["../../../../src/model/article/content/CarouselContent.ts"],"names":[],"mappings":"","sourcesContent":["import { Entity } from '../../Entity';\nimport { Translation } from '../Translation';\n\nexport type CarouselImage = Entity & {\n order: number;\n picture?: string;\n translations: (Translation & {\n picture?: string;\n })[];\n};\n\nexport type CarouselContent = Entity & {\n translations: Translation[];\n arrowsBackground?: string;\n contentCarouselImages: CarouselImage[];\n};\n"]}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import { getAuthenticatedHeaders, getAuthenticatedRequest } from "../model/AicoApiRequestInfo";
|
|
2
|
-
export async function fetchNewsArticles(api, page, size, signal) {
|
|
2
|
+
export async function fetchNewsArticles(api, page, size, signal, newsChannels = []) {
|
|
3
3
|
const queryParams = new URLSearchParams();
|
|
4
4
|
queryParams.set('page[number]', String(page));
|
|
5
5
|
queryParams.set('page[size]', String(size));
|
|
6
|
+
queryParams.set('sort', '-publishDate');
|
|
6
7
|
queryParams.set('filter[isActive]', '1');
|
|
7
8
|
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
8
|
-
|
|
9
|
+
for (const newsChannel of newsChannels) {
|
|
10
|
+
queryParams.set('filter[channel][]', newsChannel);
|
|
11
|
+
}
|
|
9
12
|
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
10
13
|
const response = await fetch(request);
|
|
11
14
|
return await response.json();
|
|
12
15
|
}
|
|
13
|
-
export async function fetchSpecialNewsArticles(api, page, size, signal) {
|
|
16
|
+
export async function fetchSpecialNewsArticles(api, page, size, signal, newsChannels = []) {
|
|
14
17
|
const queryParams = new URLSearchParams();
|
|
15
18
|
queryParams.set('page[number]', String(page));
|
|
16
19
|
queryParams.set('page[size]', String(size));
|
|
20
|
+
queryParams.set('sort', '-publishDate');
|
|
17
21
|
queryParams.set('filter[isActive]', '1');
|
|
18
22
|
queryParams.set('filter[isSpecialArticle]', '1');
|
|
19
23
|
queryParams.set('filter[isLightVersion]', 'true');
|
|
20
24
|
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
21
|
-
|
|
25
|
+
for (const newsChannel of newsChannels) {
|
|
26
|
+
queryParams.set('filter[channel][]', newsChannel);
|
|
27
|
+
}
|
|
22
28
|
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
23
29
|
const response = await fetch(request);
|
|
24
30
|
return await response.json();
|
|
@@ -29,6 +35,14 @@ export async function fetchNewsArticle(api, articleId, signal) {
|
|
|
29
35
|
const article = await response.json();
|
|
30
36
|
return article.data;
|
|
31
37
|
}
|
|
38
|
+
export async function fetchNewsArticleByHandle(api, urlHandle, signal) {
|
|
39
|
+
const queryParams = new URLSearchParams();
|
|
40
|
+
queryParams.set('filter[urlHandle]', urlHandle);
|
|
41
|
+
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
42
|
+
const response = await fetch(request);
|
|
43
|
+
const articles = await response.json();
|
|
44
|
+
return articles.data[0];
|
|
45
|
+
}
|
|
32
46
|
export async function fetchArticle(url, bearerToken, signal) {
|
|
33
47
|
const request = new Request(new URL(url), {
|
|
34
48
|
headers: getAuthenticatedHeaders(bearerToken),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGnH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAuB,EAAE,IAAY,EAAE,IAAY,EAAE,MAAmB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"m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,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE;QACvB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,UAAsC;IAC7D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC5C,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;YACV,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACtB;KACF;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import { Article } from '../components';\nimport { AicoApiRequestInfo, getAuthenticatedHeaders, getAuthenticatedRequest } from '../model/AicoApiRequestInfo';\nimport { NewsResponse } from '../model/NewsResponse';\n\nexport async function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels: string[] = []): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n for (const newsChannel of newsChannels) {\n queryParams.set('filter[channel][]', newsChannel);\n }\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal, newsChannels: string[] = []): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[isSpecialArticle]', '1');\n queryParams.set('filter[isLightVersion]', 'true');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n for (const newsChannel of newsChannels) {\n queryParams.set('filter[channel][]', newsChannel);\n }\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article> {\n const request = getAuthenticatedRequest(api, `news/${articleId}`, new URLSearchParams(), signal);\n const response = await fetch(request);\n const article = await response.json();\n return article.data;\n}\n\nexport async function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article> {\n const queryParams = new URLSearchParams();\n queryParams.set('filter[urlHandle]', urlHandle);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n const articles = await response.json();\n return articles.data[0];\n}\n\nexport async function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article> {\n const request = new Request(new URL(url), {\n headers: getAuthenticatedHeaders(bearerToken),\n signal,\n });\n const response = await fetch(request);\n return await response.json();\n}\n\nexport function getImageWidthPrc(pictureSize?: string): string {\n switch (pictureSize) {\n case 'extra-small':\n return '28%';\n case 'small':\n return '40%';\n case 'large':\n return '80%';\n case 'extra large': // TODO: has - or not?\n return '100%';\n default:\n return '60%';\n }\n}\n\nexport function getYoutubeURL(url: string): string | null {\n const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#&?]*).*/;\n const match = url.match(regExp);\n if (match && match[1].length == 11) {\n return `https://www.youtube.com/embed/${match[1]}`;\n }\n\n return null;\n}\n\nexport function strIsNullOrEmptyOrWhitespace(str?: string | null): boolean {\n if (!str || str === ' ') {\n return true;\n }\n\n return false;\n}\n\nexport function getClass(conditions: { [key: string]: boolean }): string {\n const classes: string[] = [];\n for (const kvp of Object.entries(conditions)) {\n if (kvp[1]) {\n classes.push(kvp[0]);\n }\n }\n\n return classes.join(' ');\n}\n"]}
|
|
@@ -62,6 +62,7 @@ const AicoArticleDetail = /*@__PURE__*/ proxyCustomElement(class AicoArticleDeta
|
|
|
62
62
|
this.__registerHost();
|
|
63
63
|
this.dateOptions = { day: 'numeric', month: 'long', year: 'numeric' };
|
|
64
64
|
this.article = undefined;
|
|
65
|
+
this.locale = 'de';
|
|
65
66
|
}
|
|
66
67
|
render() {
|
|
67
68
|
const articleDate = new Date(this.article.attributes.publishDate);
|
|
@@ -84,43 +85,43 @@ const AicoArticleDetail = /*@__PURE__*/ proxyCustomElement(class AicoArticleDeta
|
|
|
84
85
|
case ContentType.ALBUM:
|
|
85
86
|
return h("aico-album-content", { content: content });
|
|
86
87
|
case ContentType.ASKING:
|
|
87
|
-
return h("aico-asking-content", { content: content });
|
|
88
|
+
return h("aico-asking-content", { content: content, locale: this.locale });
|
|
88
89
|
case ContentType.BLOCK_QUOTE:
|
|
89
|
-
return h("aico-block-quote-content", { content: content });
|
|
90
|
+
return h("aico-block-quote-content", { content: content, locale: this.locale });
|
|
90
91
|
case ContentType.BULLET:
|
|
91
|
-
return h("aico-bullet-content", { content: content });
|
|
92
|
+
return h("aico-bullet-content", { content: content, locale: this.locale });
|
|
92
93
|
case ContentType.CAROUSEL:
|
|
93
|
-
return h("aico-carousel-content", { content: content });
|
|
94
|
+
return h("aico-carousel-content", { content: content, locale: this.locale });
|
|
94
95
|
case ContentType.CONTENT_CARD:
|
|
95
|
-
return h("aico-content-card-content", { content: content });
|
|
96
|
+
return h("aico-content-card-content", { content: content, locale: this.locale });
|
|
96
97
|
case ContentType.DIVIDER:
|
|
97
|
-
return h("aico-divider-content", { content: content });
|
|
98
|
+
return h("aico-divider-content", { content: content, locale: this.locale });
|
|
98
99
|
case ContentType.DOCUMENT:
|
|
99
|
-
return h("aico-document-content", { content: content });
|
|
100
|
+
return h("aico-document-content", { content: content, locale: this.locale });
|
|
100
101
|
case ContentType.FAQ:
|
|
101
|
-
return h("aico-faq-content", { content: content });
|
|
102
|
+
return h("aico-faq-content", { content: content, locale: this.locale });
|
|
102
103
|
case ContentType.HEADING:
|
|
103
|
-
return h("aico-heading-content", { content: content });
|
|
104
|
+
return h("aico-heading-content", { content: content, locale: this.locale });
|
|
104
105
|
case ContentType.HTML:
|
|
105
|
-
return h("aico-html-content", { content: content });
|
|
106
|
+
return h("aico-html-content", { content: content, locale: this.locale });
|
|
106
107
|
case ContentType.LINK:
|
|
107
|
-
return h("aico-link-content", { content: content });
|
|
108
|
+
return h("aico-link-content", { content: content, locale: this.locale });
|
|
108
109
|
case ContentType.NEWS:
|
|
109
110
|
return h("aico-news-content", { content: content });
|
|
110
111
|
case ContentType.PAGE:
|
|
111
|
-
return h("aico-page-content", { content: content });
|
|
112
|
+
return h("aico-page-content", { content: content, locale: this.locale });
|
|
112
113
|
case ContentType.TABLE:
|
|
113
|
-
return h("aico-table-content", { content: content });
|
|
114
|
+
return h("aico-table-content", { content: content, locale: this.locale });
|
|
114
115
|
case ContentType.TESTIMONIAL:
|
|
115
116
|
return h("aico-testimonial-content", { content: content });
|
|
116
117
|
case ContentType.TEXT:
|
|
117
|
-
return h("aico-text-content", { content: content });
|
|
118
|
+
return h("aico-text-content", { content: content, locale: this.locale });
|
|
118
119
|
case ContentType.TITLE:
|
|
119
|
-
return h("aico-title-content", { content: content });
|
|
120
|
+
return h("aico-title-content", { content: content, locale: this.locale });
|
|
120
121
|
case ContentType.UPLOAD:
|
|
121
|
-
return h("aico-upload-content", { content: content });
|
|
122
|
+
return h("aico-upload-content", { content: content, locale: this.locale });
|
|
122
123
|
case ContentType.VIDEO:
|
|
123
|
-
return h("aico-video-content", { content: content });
|
|
124
|
+
return h("aico-video-content", { content: content, locale: this.locale });
|
|
124
125
|
case ContentType.PRODUCT:
|
|
125
126
|
case ContentType.AGENDA:
|
|
126
127
|
case ContentType.LIST_ASKING:
|
|
@@ -136,7 +137,8 @@ const AicoArticleDetail = /*@__PURE__*/ proxyCustomElement(class AicoArticleDeta
|
|
|
136
137
|
}
|
|
137
138
|
static get style() { return aicoArticleDetailCss; }
|
|
138
139
|
}, [2, "aico-article-detail", {
|
|
139
|
-
"article": [16]
|
|
140
|
+
"article": [16],
|
|
141
|
+
"locale": [1]
|
|
140
142
|
}]);
|
|
141
143
|
function defineCustomElement() {
|
|
142
144
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-article-detail2.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;;MC6BlB,iBAAiB;;;;QAGX,gBAAW,GAA+B,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;;IAE9G,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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-detail2.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;;MC6BlB,iBAAiB;;;;QAKX,gBAAW,GAA+B,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sBAFrF,IAAI;;IAI7B,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC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AAM,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}
|
|
@@ -7,15 +7,17 @@ const AicoAskingContent = /*@__PURE__*/ proxyCustomElement(class AicoAskingConte
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.content = undefined;
|
|
10
|
+
this.locale = 'de';
|
|
10
11
|
}
|
|
11
12
|
render() {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
const translation = this.content.asking.translations.
|
|
14
|
-
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()} - ${(
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
const translation = (_a = this.content.asking.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
15
|
+
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))))))))))));
|
|
15
16
|
}
|
|
16
17
|
static get style() { return aicoAskingContentCss; }
|
|
17
18
|
}, [2, "aico-asking-content", {
|
|
18
|
-
"content": [16]
|
|
19
|
+
"content": [16],
|
|
20
|
+
"locale": [1]
|
|
19
21
|
}]);
|
|
20
22
|
function defineCustomElement() {
|
|
21
23
|
if (typeof customElements === "undefined")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AM,CACvC,EAEL,cACE,0BAAkB,EAClB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAM,CACxC,EAEL,cACE,gCAAwB,EACxB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAM,CACpC,EAEL,cACE,2BAAmB,EACnB,UAAI,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,IAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAM,CACtE,EAEL,cACE,qCAA6B,EAC7B,UAAI,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,IAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAM,CAC9E,EAEL,cACE,2BAAmB,EACnB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAM,CACpC,EAEL,cACE,yBAAiB,EACjB,cAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAM,CACpC,CACC,CACF,CACL,CACF,CACC,CACF,CACJ,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/content/aico-asking-content/aico-asking-content.css?tag=aico-asking-content&encapsulation=scoped","src/components/content/aico-asking-content/aico-asking-content.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.card {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: border-box;\n border: 1px solid rgba(0, 0, 0, 0.125);\n border-radius: 0.25rem;\n}\n\n.card-img-top {\n border-top-left-radius: calc(0.25rem - 1px);\n border-top-right-radius: calc(0.25rem - 1px);\n}\n\n.card-body {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n padding: 1.25rem;\n}\n\n.card-title {\n margin-bottom: 0.75rem;\n}\n\n.team-table,\n.more-details-table {\n border: 0;\n color: black;\n border-collapse: collapse;\n}\n\n.more-details-table th {\n text-transform: uppercase;\n}\n\n.more-details-table {\n width: 100%;\n text-align: left;\n margin-left: 1%;\n}\n\n.team-table {\n width: 100%;\n max-width: 700px;\n margin: 1rem 0;\n}\n\n.more-details-table tr:nth-child(odd) {\n background-color: #fafafa;\n}\n","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"],"version":3}
|
|
@@ -8,14 +8,17 @@ const AicoBlockQuoteContent = /*@__PURE__*/ proxyCustomElement(class AicoBlockQu
|
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.content = undefined;
|
|
11
|
+
this.locale = 'de';
|
|
11
12
|
}
|
|
12
13
|
render() {
|
|
13
|
-
|
|
14
|
+
var _a;
|
|
15
|
+
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
14
16
|
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))));
|
|
15
17
|
}
|
|
16
18
|
static get style() { return aicoBlockQuoteContentCss; }
|
|
17
19
|
}, [2, "aico-block-quote-content", {
|
|
18
|
-
"content": [16]
|
|
20
|
+
"content": [16],
|
|
21
|
+
"locale": [1]
|
|
19
22
|
}]);
|
|
20
23
|
function defineCustomElement() {
|
|
21
24
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-block-quote-content2.js","mappings":";;;AAAA,MAAM,wBAAwB,GAAG,EAAE;;MCStB,qBAAqB
|
|
1
|
+
{"file":"aico-block-quote-content2.js","mappings":";;;AAAA,MAAM,wBAAwB,GAAG,EAAE;;MCStB,qBAAqB;;;;;sBAEP,IAAI;;IAE7B,MAAM;;QACJ,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;QAG9G,QACE,EAAC,iBAAiB,IAAC,SAAS,EAAE,WAAW,KAAK,IAAI,IAChD,kBAAY,KAAK,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IACpF,SAAG,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IACrD,WAAY,CAAC,SAAS,CACrB,EACJ,cAAQ,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAC9E,WAAY,CAAC,eAAe,CACtB,CACE,CACK,EACpB;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/content/aico-block-quote-content/aico-block-quote-content.css?tag=aico-block-quote-content&encapsulation=scoped","src/components/content/aico-block-quote-content/aico-block-quote-content.tsx"],"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"],"version":3}
|
|
@@ -11,9 +11,11 @@ const AicoBulletContent = /*@__PURE__*/ proxyCustomElement(class AicoBulletConte
|
|
|
11
11
|
super();
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.content = undefined;
|
|
14
|
+
this.locale = 'de';
|
|
14
15
|
}
|
|
15
16
|
render() {
|
|
16
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
17
19
|
const styles = new Map();
|
|
18
20
|
if (this.content.fontSize) {
|
|
19
21
|
styles.set('font-size', this.content.fontSize);
|
|
@@ -21,17 +23,17 @@ const AicoBulletContent = /*@__PURE__*/ proxyCustomElement(class AicoBulletConte
|
|
|
21
23
|
if (this.content.fontFamily) {
|
|
22
24
|
styles.set('font-family', this.content.fontFamily);
|
|
23
25
|
}
|
|
24
|
-
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
|
|
26
|
+
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
|
|
25
27
|
.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); })
|
|
26
28
|
.map(bullet => {
|
|
27
29
|
if (bullet.translations.length === 0) {
|
|
28
30
|
return null;
|
|
29
31
|
}
|
|
30
|
-
const translation = bullet.translations
|
|
31
|
-
if (strIsNullOrEmptyOrWhitespace(translation.text)) {
|
|
32
|
+
const translation = bullet.translations.find(translation => translation.locale === this.locale);
|
|
33
|
+
if (strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.text)) {
|
|
32
34
|
return null;
|
|
33
35
|
}
|
|
34
|
-
return h("li", null, translation.text);
|
|
36
|
+
return h("li", null, translation === null || translation === void 0 ? void 0 : translation.text);
|
|
35
37
|
}))));
|
|
36
38
|
}
|
|
37
39
|
makeTitleContent(translation) {
|
|
@@ -47,7 +49,8 @@ const AicoBulletContent = /*@__PURE__*/ proxyCustomElement(class AicoBulletConte
|
|
|
47
49
|
}
|
|
48
50
|
static get style() { return aicoBulletContentCss; }
|
|
49
51
|
}, [2, "aico-bullet-content", {
|
|
50
|
-
"content": [16]
|
|
52
|
+
"content": [16],
|
|
53
|
+
"locale": [1]
|
|
51
54
|
}]);
|
|
52
55
|
function defineCustomElement() {
|
|
53
56
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"aico-bullet-content2.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCYlB,iBAAiB
|
|
1
|
+
{"file":"aico-bullet-content2.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,EAAE;;MCYlB,iBAAiB;;;;;sBAEH,IAAI;;IAE7B,MAAM;;QAEJ,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;QAE9G,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;QACzC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACzB,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SAChD;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;SACpD;QAED,QACE,WAAK,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IACpD,EAAC,iBAAiB,IAAC,SAAS,EAAE,WAAW,KAAK,IAAI,IAChD,0BAAoB,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,WAAY,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CACvE,EACpB,cACG,IAAI,CAAC,OAAO,CAAC,aAAa;aACxB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAK,OAAA,CAAC,MAAA,CAAC,CAAC,IAAI,mCAAI,CAAC,KAAK,MAAA,CAAC,CAAC,IAAI,mCAAI,CAAC,CAAC,CAAA,EAAA,CAAC;aAC7C,GAAG,CAAC,MAAM;YACT,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpC,OAAO,IAAI,CAAC;aACb;YAED,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC;YAChG,IAAI,4BAA4B,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,CAAC,EAAE;gBACnD,OAAO,IAAI,CAAC;aACb;YAED,OAAO,cAAK,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,CAAM,CAAC;SACrC,CAAC,CACD,CACD,EACN;KACH;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;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/content/aico-bullet-content/aico-bullet-content.css?tag=aico-bullet-content&encapsulation=scoped","src/components/content/aico-bullet-content/aico-bullet-content.tsx"],"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"],"version":3}
|