@aiconomy/aico-components 0.0.13 → 0.0.53
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/dist/aico-components/aico-components.css +6 -0
- package/dist/aico-components/aico-components.esm.js +2 -0
- package/dist/aico-components/aico-components.esm.js.map +1 -0
- package/dist/aico-components/assets/slick/ajax-loader.gif +0 -0
- package/dist/aico-components/assets/slick/slick.eot +0 -0
- package/dist/aico-components/assets/slick/slick.svg +14 -0
- package/dist/aico-components/assets/slick/slick.ttf +0 -0
- package/dist/aico-components/assets/slick/slick.woff +0 -0
- package/dist/aico-components/index.esm.js +2 -0
- package/dist/aico-components/index.esm.js.map +1 -0
- package/dist/aico-components/p-1a6625c0.entry.js +2 -0
- package/dist/aico-components/p-1a6625c0.entry.js.map +1 -0
- package/dist/aico-components/p-2aae1a0e.js +3 -0
- package/dist/aico-components/p-2aae1a0e.js.map +1 -0
- package/dist/aico-components/p-31666f10.js +2 -0
- package/dist/aico-components/p-31666f10.js.map +1 -0
- package/dist/aico-components/p-42b98baf.entry.js +2 -0
- package/dist/aico-components/p-42b98baf.entry.js.map +1 -0
- package/dist/aico-components/p-54708dd0.entry.js +2 -0
- package/dist/aico-components/p-54708dd0.entry.js.map +1 -0
- package/dist/aico-components/p-776352ba.entry.js +2 -0
- package/dist/aico-components/p-776352ba.entry.js.map +1 -0
- package/dist/aico-components/p-7c05cd02.entry.js +2 -0
- package/dist/aico-components/p-7c05cd02.entry.js.map +1 -0
- package/dist/aico-components/p-83655dd4.entry.js +2 -0
- package/dist/aico-components/p-83655dd4.entry.js.map +1 -0
- package/dist/aico-components/p-86c7fdc7.js +13 -0
- package/dist/aico-components/p-86c7fdc7.js.map +1 -0
- package/dist/aico-components/p-a58972e9.entry.js +7 -0
- package/dist/aico-components/p-a58972e9.entry.js.map +1 -0
- package/dist/aico-components/p-b0325a83.entry.js +2 -0
- package/dist/aico-components/p-b0325a83.entry.js.map +1 -0
- package/dist/aico-components/p-b78d7799.entry.js +2 -0
- package/dist/aico-components/p-b78d7799.entry.js.map +1 -0
- package/dist/aico-components/p-c99617a8.entry.js +2 -0
- package/dist/aico-components/p-c99617a8.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_19.cjs.entry.js +6906 -0
- package/dist/cjs/aico-album-content_19.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-article-detail.cjs.entry.js +124 -0
- package/dist/cjs/aico-article-detail.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-asking-list-content.cjs.entry.js +21 -0
- package/dist/cjs/aico-asking-list-content.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-collection-content.cjs.entry.js +21 -0
- package/dist/cjs/aico-collection-content.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-components.cjs.js +25 -0
- package/dist/cjs/aico-components.cjs.js.map +1 -0
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js +36 -0
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-news-list-item.cjs.entry.js +24 -0
- package/dist/cjs/aico-news-list-item.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-news-list.cjs.entry.js +92 -0
- package/dist/cjs/aico-news-list.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-no-content_2.cjs.entry.js +49 -0
- package/dist/cjs/aico-no-content_2.cjs.entry.js.map +1 -0
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js +60 -0
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js.map +1 -0
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js +38 -0
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js.map +1 -0
- package/dist/cjs/index-75c0e002.js +2280 -0
- package/dist/cjs/index-75c0e002.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/slick-d0dfbd94.js +13662 -0
- package/dist/cjs/slick-d0dfbd94.js.map +1 -0
- package/dist/cjs/utils-406a9df3.js +92 -0
- package/dist/cjs/utils-406a9df3.js.map +1 -0
- package/dist/collection/assets/slick/ajax-loader.gif +0 -0
- package/dist/collection/assets/slick/slick.eot +0 -0
- package/dist/collection/assets/slick/slick.svg +14 -0
- package/dist/collection/assets/slick/slick.ttf +0 -0
- package/dist/collection/assets/slick/slick.woff +0 -0
- package/dist/collection/collection-manifest.json +40 -0
- package/dist/collection/components/aico-article-detail/aico-article-detail.css +0 -0
- package/dist/collection/components/aico-article-detail/aico-article-detail.js +117 -0
- package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -0
- package/dist/collection/components/aico-article-detail/test/aico-article-detail.e2e.js +6 -0
- package/dist/collection/components/aico-article-detail/test/aico-article-detail.e2e.js.map +1 -0
- package/dist/collection/components/aico-article-detail/test/aico-article-detail.spec.js +6 -0
- package/dist/collection/components/aico-article-detail/test/aico-article-detail.spec.js.map +1 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.css +0 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js +96 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map +1 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js +19 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js.map +1 -0
- package/dist/collection/components/aico-fetch-article-detail/test/aico-fetch-article-detail.e2e.js +6 -0
- package/dist/collection/components/aico-fetch-article-detail/test/aico-fetch-article-detail.e2e.js.map +1 -0
- package/dist/collection/components/aico-fetch-article-detail/test/aico-fetch-article-detail.spec.js +6 -0
- package/dist/collection/components/aico-fetch-article-detail/test/aico-fetch-article-detail.spec.js.map +1 -0
- package/dist/collection/components/aico-news-list/aico-news-list.css +113 -0
- package/dist/collection/components/aico-news-list/aico-news-list.js +195 -0
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -0
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js +21 -0
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js.map +1 -0
- package/dist/collection/components/aico-news-list/test/aico-news-list.e2e.js +6 -0
- package/dist/collection/components/aico-news-list/test/aico-news-list.e2e.js.map +1 -0
- package/dist/collection/components/aico-news-list/test/aico-news-list.spec.js +6 -0
- package/dist/collection/components/aico-news-list/test/aico-news-list.spec.js.map +1 -0
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.css +0 -0
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +72 -0
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -0
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.stories.js +61 -0
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.stories.js.map +1 -0
- package/dist/collection/components/aico-news-list-item/test/aico-news-list-item.e2e.js +6 -0
- package/dist/collection/components/aico-news-list-item/test/aico-news-list-item.e2e.js.map +1 -0
- package/dist/collection/components/aico-news-list-item/test/aico-news-list-item.spec.js +6 -0
- package/dist/collection/components/aico-news-list-item/test/aico-news-list-item.spec.js.map +1 -0
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.css +3 -0
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +145 -0
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -0
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.stories.js +30 -0
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.stories.js.map +1 -0
- package/dist/collection/components/aico-special-news-carousel/test/aico-special-news-carousel.e2e.js +6 -0
- package/dist/collection/components/aico-special-news-carousel/test/aico-special-news-carousel.e2e.js.map +1 -0
- package/dist/collection/components/aico-special-news-carousel/test/aico-special-news-carousel.spec.js +6 -0
- package/dist/collection/components/aico-special-news-carousel/test/aico-special-news-carousel.spec.js.map +1 -0
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.css +6 -0
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js +37 -0
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js.map +1 -0
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js +6 -0
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js.map +1 -0
- package/dist/collection/components/content/aico-album-content/aico-album-content.css +0 -0
- package/dist/collection/components/content/aico-album-content/aico-album-content.js +104 -0
- package/dist/collection/components/content/aico-album-content/aico-album-content.js.map +1 -0
- package/dist/collection/components/content/aico-album-content/aico-album-content.stories.js +70 -0
- package/dist/collection/components/content/aico-album-content/aico-album-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.css +63 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.js +49 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.js.map +1 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js +37 -0
- package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-asking-list-content/aico-asking-list-content.css +85 -0
- package/dist/collection/components/content/aico-asking-list-content/aico-asking-list-content.js +19 -0
- package/dist/collection/components/content/aico-asking-list-content/aico-asking-list-content.js.map +1 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.css +0 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js +49 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js.map +1 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js +26 -0
- package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.css +0 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js +79 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js.map +1 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js +71 -0
- package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.css +1 -0
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js +95 -0
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js.map +1 -0
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js +73 -0
- package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-collection-content/aico-collection-content.css +3 -0
- package/dist/collection/components/content/aico-collection-content/aico-collection-content.js +19 -0
- package/dist/collection/components/content/aico-collection-content/aico-collection-content.js.map +1 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.css +0 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js +62 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js.map +1 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js +26 -0
- package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.css +0 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.js +49 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.js.map +1 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js +23 -0
- package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.css +8 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.js +73 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.js.map +1 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js +30 -0
- package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.css +0 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.js +54 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.js.map +1 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js +60 -0
- package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.css +36 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.js +81 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.js.map +1 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js +31 -0
- package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-html-content/aico-html-content.css +3 -0
- package/dist/collection/components/content/aico-html-content/aico-html-content.js +52 -0
- package/dist/collection/components/content/aico-html-content/aico-html-content.js.map +1 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.css +37 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.js +68 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.js.map +1 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js +59 -0
- package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-news-content/aico-news-content.css +11 -0
- package/dist/collection/components/content/aico-news-content/aico-news-content.js +79 -0
- package/dist/collection/components/content/aico-news-content/aico-news-content.js.map +1 -0
- package/dist/collection/components/content/aico-news-content/aico-news-content.stories.js +43 -0
- package/dist/collection/components/content/aico-news-content/aico-news-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-no-content/aico-no-content.css +3 -0
- package/dist/collection/components/content/aico-no-content/aico-no-content.js +19 -0
- package/dist/collection/components/content/aico-no-content/aico-no-content.js.map +1 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.css +3 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.js +79 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.js.map +1 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js +37 -0
- package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.css +21 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.js +73 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.js.map +1 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js +130 -0
- package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-testimonial-content/aico-testimonial-content.css +93 -0
- package/dist/collection/components/content/aico-testimonial-content/aico-testimonial-content.js +51 -0
- package/dist/collection/components/content/aico-testimonial-content/aico-testimonial-content.js.map +1 -0
- package/dist/collection/components/content/aico-testimonial-content/aico-testimonial-content.stories.js +23 -0
- package/dist/collection/components/content/aico-testimonial-content/aico-testimonial-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.css +0 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.js +127 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.js.map +1 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js +173 -0
- package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-title-content/aico-title-content.css +3 -0
- package/dist/collection/components/content/aico-title-content/aico-title-content.js +61 -0
- package/dist/collection/components/content/aico-title-content/aico-title-content.js.map +1 -0
- package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js +28 -0
- package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.css +3 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.js +66 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.js.map +1 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js +39 -0
- package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js.map +1 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.css +10 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.js +62 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.js.map +1 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js +43 -0
- package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js.map +1 -0
- package/dist/collection/components/content/content-styles.css +113 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/model/AicoApiRequestInfo.js +13 -0
- package/dist/collection/model/AicoApiRequestInfo.js.map +1 -0
- package/dist/collection/model/Article.js +2 -0
- package/dist/collection/model/Article.js.map +1 -0
- package/dist/collection/model/Entity.js +7 -0
- package/dist/collection/model/Entity.js.map +1 -0
- package/dist/collection/model/NewsCategory.js +2 -0
- package/dist/collection/model/NewsCategory.js.map +1 -0
- package/dist/collection/model/NewsResponse.js +2 -0
- package/dist/collection/model/NewsResponse.js.map +1 -0
- package/dist/collection/model/article/ContentType.js +33 -0
- package/dist/collection/model/article/ContentType.js.map +1 -0
- package/dist/collection/model/article/Translation.js +8 -0
- package/dist/collection/model/article/Translation.js.map +1 -0
- package/dist/collection/model/article/content/AlbumContent.js +2 -0
- package/dist/collection/model/article/content/AlbumContent.js.map +1 -0
- package/dist/collection/model/article/content/AskingContent.js +21 -0
- package/dist/collection/model/article/content/AskingContent.js.map +1 -0
- package/dist/collection/model/article/content/AskingListContent.js +7 -0
- package/dist/collection/model/article/content/AskingListContent.js.map +1 -0
- package/dist/collection/model/article/content/BlockQuoteContent.js +2 -0
- package/dist/collection/model/article/content/BlockQuoteContent.js.map +1 -0
- package/dist/collection/model/article/content/BulletContent.js +2 -0
- package/dist/collection/model/article/content/BulletContent.js.map +1 -0
- package/dist/collection/model/article/content/CardContent.js +2 -0
- package/dist/collection/model/article/content/CardContent.js.map +1 -0
- package/dist/collection/model/article/content/CarouselContent.js +2 -0
- package/dist/collection/model/article/content/CarouselContent.js.map +1 -0
- package/dist/collection/model/article/content/CollectionContent.js +52 -0
- package/dist/collection/model/article/content/CollectionContent.js.map +1 -0
- package/dist/collection/model/article/content/DividerContent.js +2 -0
- package/dist/collection/model/article/content/DividerContent.js.map +1 -0
- package/dist/collection/model/article/content/DocumentContent.js +2 -0
- package/dist/collection/model/article/content/DocumentContent.js.map +1 -0
- package/dist/collection/model/article/content/FaqContent.js +12 -0
- package/dist/collection/model/article/content/FaqContent.js.map +1 -0
- package/dist/collection/model/article/content/HeadingContent.js +2 -0
- package/dist/collection/model/article/content/HeadingContent.js.map +1 -0
- package/dist/collection/model/article/content/HtmlContent.js +2 -0
- package/dist/collection/model/article/content/HtmlContent.js.map +1 -0
- package/dist/collection/model/article/content/LinkContent.js +2 -0
- package/dist/collection/model/article/content/LinkContent.js.map +1 -0
- package/dist/collection/model/article/content/NewsContent.js +19 -0
- package/dist/collection/model/article/content/NewsContent.js.map +1 -0
- package/dist/collection/model/article/content/PageContent.js +37 -0
- package/dist/collection/model/article/content/PageContent.js.map +1 -0
- package/dist/collection/model/article/content/TableContet.js +2 -0
- package/dist/collection/model/article/content/TableContet.js.map +1 -0
- package/dist/collection/model/article/content/TestimonialContent.js +2 -0
- package/dist/collection/model/article/content/TestimonialContent.js.map +1 -0
- package/dist/collection/model/article/content/TextContent.js +2 -0
- package/dist/collection/model/article/content/TextContent.js.map +1 -0
- package/dist/collection/model/article/content/TitleContent.js +2 -0
- package/dist/collection/model/article/content/TitleContent.js.map +1 -0
- package/dist/collection/model/article/content/UploadContent.js +13 -0
- package/dist/collection/model/article/content/UploadContent.js.map +1 -0
- package/dist/collection/model/article/content/VideoContent.js +2 -0
- package/dist/collection/model/article/content/VideoContent.js.map +1 -0
- package/dist/collection/model/article/content/news/NewsAlbum.js +20 -0
- package/dist/collection/model/article/content/news/NewsAlbum.js.map +1 -0
- package/dist/collection/model/article/content/news/NewsArticle.js +43 -0
- package/dist/collection/model/article/content/news/NewsArticle.js.map +1 -0
- package/dist/collection/model/article/content/news/NewsCategory.js +17 -0
- package/dist/collection/model/article/content/news/NewsCategory.js.map +1 -0
- package/dist/collection/model/article/content/news/NewsTag.js +10 -0
- package/dist/collection/model/article/content/news/NewsTag.js.map +1 -0
- package/dist/collection/utils/ConditionalRender.js +5 -0
- package/dist/collection/utils/ConditionalRender.js.map +1 -0
- package/dist/collection/utils/ConditionalWrap.js +5 -0
- package/dist/collection/utils/ConditionalWrap.js.map +1 -0
- package/dist/collection/utils/utils.js +77 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +6 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/ConditionalRender.js +7 -0
- package/dist/components/ConditionalRender.js.map +1 -0
- package/dist/components/aico-album-content.d.ts +11 -0
- package/dist/components/aico-album-content.js +8 -0
- package/dist/components/aico-album-content.js.map +1 -0
- package/dist/components/aico-album-content2.js +90 -0
- package/dist/components/aico-album-content2.js.map +1 -0
- package/dist/components/aico-article-detail.d.ts +11 -0
- package/dist/components/aico-article-detail.js +8 -0
- package/dist/components/aico-article-detail.js.map +1 -0
- package/dist/components/aico-article-detail2.js +262 -0
- package/dist/components/aico-article-detail2.js.map +1 -0
- package/dist/components/aico-asking-content.d.ts +11 -0
- package/dist/components/aico-asking-content.js +8 -0
- package/dist/components/aico-asking-content.js.map +1 -0
- package/dist/components/aico-asking-content2.js +36 -0
- package/dist/components/aico-asking-content2.js.map +1 -0
- package/dist/components/aico-asking-list-content.d.ts +11 -0
- package/dist/components/aico-asking-list-content.js +34 -0
- package/dist/components/aico-asking-list-content.js.map +1 -0
- package/dist/components/aico-block-quote-content.d.ts +11 -0
- package/dist/components/aico-block-quote-content.js +8 -0
- package/dist/components/aico-block-quote-content.js.map +1 -0
- package/dist/components/aico-block-quote-content2.js +36 -0
- package/dist/components/aico-block-quote-content2.js.map +1 -0
- package/dist/components/aico-bullet-content.d.ts +11 -0
- package/dist/components/aico-bullet-content.js +8 -0
- package/dist/components/aico-bullet-content.js.map +1 -0
- package/dist/components/aico-bullet-content2.js +78 -0
- package/dist/components/aico-bullet-content2.js.map +1 -0
- package/dist/components/aico-carousel-content.d.ts +11 -0
- package/dist/components/aico-carousel-content.js +8 -0
- package/dist/components/aico-carousel-content.js.map +1 -0
- package/dist/components/aico-carousel-content2.js +76 -0
- package/dist/components/aico-carousel-content2.js.map +1 -0
- package/dist/components/aico-collection-content.d.ts +11 -0
- package/dist/components/aico-collection-content.js +34 -0
- package/dist/components/aico-collection-content.js.map +1 -0
- package/dist/components/aico-content-card-content.d.ts +11 -0
- package/dist/components/aico-content-card-content.js +8 -0
- package/dist/components/aico-content-card-content.js.map +1 -0
- package/dist/components/aico-content-card-content2.js +61 -0
- package/dist/components/aico-content-card-content2.js.map +1 -0
- package/dist/components/aico-divider-content.d.ts +11 -0
- package/dist/components/aico-divider-content.js +8 -0
- package/dist/components/aico-divider-content.js.map +1 -0
- package/dist/components/aico-divider-content2.js +36 -0
- package/dist/components/aico-divider-content2.js.map +1 -0
- package/dist/components/aico-document-content.d.ts +11 -0
- package/dist/components/aico-document-content.js +8 -0
- package/dist/components/aico-document-content.js.map +1 -0
- package/dist/components/aico-document-content2.js +60 -0
- package/dist/components/aico-document-content2.js.map +1 -0
- package/dist/components/aico-faq-content.d.ts +11 -0
- package/dist/components/aico-faq-content.js +8 -0
- package/dist/components/aico-faq-content.js.map +1 -0
- package/dist/components/aico-faq-content2.js +41 -0
- package/dist/components/aico-faq-content2.js.map +1 -0
- package/dist/components/aico-fetch-article-detail.d.ts +11 -0
- package/dist/components/aico-fetch-article-detail.js +186 -0
- package/dist/components/aico-fetch-article-detail.js.map +1 -0
- package/dist/components/aico-heading-content.d.ts +11 -0
- package/dist/components/aico-heading-content.js +8 -0
- package/dist/components/aico-heading-content.js.map +1 -0
- package/dist/components/aico-heading-content2.js +80 -0
- package/dist/components/aico-heading-content2.js.map +1 -0
- package/dist/components/aico-html-content.d.ts +11 -0
- package/dist/components/aico-html-content.js +8 -0
- package/dist/components/aico-html-content.js.map +1 -0
- package/dist/components/aico-html-content2.js +45 -0
- package/dist/components/aico-html-content2.js.map +1 -0
- package/dist/components/aico-link-content.d.ts +11 -0
- package/dist/components/aico-link-content.js +8 -0
- package/dist/components/aico-link-content.js.map +1 -0
- package/dist/components/aico-link-content2.js +55 -0
- package/dist/components/aico-link-content2.js.map +1 -0
- package/dist/components/aico-news-content.d.ts +11 -0
- package/dist/components/aico-news-content.js +8 -0
- package/dist/components/aico-news-content.js.map +1 -0
- package/dist/components/aico-news-content2.js +43 -0
- package/dist/components/aico-news-content2.js.map +1 -0
- package/dist/components/aico-news-list-item.d.ts +11 -0
- package/dist/components/aico-news-list-item.js +8 -0
- package/dist/components/aico-news-list-item.js.map +1 -0
- package/dist/components/aico-news-list-item2.js +36 -0
- package/dist/components/aico-news-list-item2.js.map +1 -0
- package/dist/components/aico-news-list.d.ts +11 -0
- package/dist/components/aico-news-list.js +118 -0
- package/dist/components/aico-news-list.js.map +1 -0
- package/dist/components/aico-no-content.d.ts +11 -0
- package/dist/components/aico-no-content.js +8 -0
- package/dist/components/aico-no-content.js.map +1 -0
- package/dist/components/aico-no-content2.js +31 -0
- package/dist/components/aico-no-content2.js.map +1 -0
- package/dist/components/aico-page-content.d.ts +11 -0
- package/dist/components/aico-page-content.js +8 -0
- package/dist/components/aico-page-content.js.map +1 -0
- package/dist/components/aico-page-content2.js +43 -0
- package/dist/components/aico-page-content2.js.map +1 -0
- package/dist/components/aico-special-news-carousel.d.ts +11 -0
- package/dist/components/aico-special-news-carousel.js +78 -0
- package/dist/components/aico-special-news-carousel.js.map +1 -0
- package/dist/components/aico-table-content.d.ts +11 -0
- package/dist/components/aico-table-content.js +8 -0
- package/dist/components/aico-table-content.js.map +1 -0
- package/dist/components/aico-table-content2.js +72 -0
- package/dist/components/aico-table-content2.js.map +1 -0
- package/dist/components/aico-testimonial-content.d.ts +11 -0
- package/dist/components/aico-testimonial-content.js +8 -0
- package/dist/components/aico-testimonial-content.js.map +1 -0
- package/dist/components/aico-testimonial-content2.js +38 -0
- package/dist/components/aico-testimonial-content2.js.map +1 -0
- package/dist/components/aico-text-content.d.ts +11 -0
- package/dist/components/aico-text-content.js +8 -0
- package/dist/components/aico-text-content.js.map +1 -0
- package/dist/components/aico-text-content2.js +127 -0
- package/dist/components/aico-text-content2.js.map +1 -0
- package/dist/components/aico-title-content.d.ts +11 -0
- package/dist/components/aico-title-content.js +8 -0
- package/dist/components/aico-title-content.js.map +1 -0
- package/dist/components/aico-title-content2.js +54 -0
- package/dist/components/aico-title-content2.js.map +1 -0
- package/dist/components/aico-upload-content.d.ts +11 -0
- package/dist/components/aico-upload-content.js +8 -0
- package/dist/components/aico-upload-content.js.map +1 -0
- package/dist/components/aico-upload-content2.js +65 -0
- package/dist/components/aico-upload-content2.js.map +1 -0
- package/dist/components/aico-video-content.d.ts +11 -0
- package/dist/components/aico-video-content.js +8 -0
- package/dist/components/aico-video-content.js.map +1 -0
- package/dist/components/aico-video-content2.js +61 -0
- package/dist/components/aico-video-content2.js.map +1 -0
- package/dist/components/assets/slick/ajax-loader.gif +0 -0
- package/dist/components/assets/slick/slick.eot +0 -0
- package/dist/components/assets/slick/slick.svg +14 -0
- package/dist/components/assets/slick/slick.ttf +0 -0
- package/dist/components/assets/slick/slick.woff +0 -0
- package/dist/components/bootstrap-slick-test.d.ts +11 -0
- package/dist/components/bootstrap-slick-test.js +51 -0
- package/dist/components/bootstrap-slick-test.js.map +1 -0
- package/dist/components/bootstrap.esm.js +6265 -0
- package/dist/components/bootstrap.esm.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/slick.js +13660 -0
- package/dist/components/slick.js.map +1 -0
- package/dist/components/utils.js +84 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/esm/aico-album-content_19.entry.js +6884 -0
- package/dist/esm/aico-album-content_19.entry.js.map +1 -0
- package/dist/esm/aico-article-detail.entry.js +120 -0
- package/dist/esm/aico-article-detail.entry.js.map +1 -0
- package/dist/esm/aico-asking-list-content.entry.js +17 -0
- package/dist/esm/aico-asking-list-content.entry.js.map +1 -0
- package/dist/esm/aico-collection-content.entry.js +17 -0
- package/dist/esm/aico-collection-content.entry.js.map +1 -0
- package/dist/esm/aico-components.js +20 -0
- package/dist/esm/aico-components.js.map +1 -0
- package/dist/esm/aico-fetch-article-detail.entry.js +32 -0
- package/dist/esm/aico-fetch-article-detail.entry.js.map +1 -0
- package/dist/esm/aico-news-list-item.entry.js +20 -0
- package/dist/esm/aico-news-list-item.entry.js.map +1 -0
- package/dist/esm/aico-news-list.entry.js +88 -0
- package/dist/esm/aico-news-list.entry.js.map +1 -0
- package/dist/esm/aico-no-content_2.entry.js +44 -0
- package/dist/esm/aico-no-content_2.entry.js.map +1 -0
- package/dist/esm/aico-special-news-carousel.entry.js +56 -0
- package/dist/esm/aico-special-news-carousel.entry.js.map +1 -0
- package/dist/esm/bootstrap-slick-test.entry.js +34 -0
- package/dist/esm/bootstrap-slick-test.entry.js.map +1 -0
- package/dist/esm/index-f9f11572.js +2250 -0
- package/dist/esm/index-f9f11572.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/slick-d11cf173.js +13660 -0
- package/dist/esm/slick-d11cf173.js.map +1 -0
- package/dist/esm/utils-2b7ec879.js +84 -0
- package/dist/esm/utils-2b7ec879.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/aico-article-detail/aico-article-detail.d.ts +10 -0
- package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.d.ts +13 -0
- package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.d.ts +7 -0
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +21 -0
- package/dist/types/components/aico-news-list/aico-news-list.stories.d.ts +6 -0
- package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +7 -0
- package/dist/types/components/aico-news-list-item/aico-news-list-item.stories.d.ts +6 -0
- package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.d.ts +19 -0
- package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.stories.d.ts +7 -0
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.d.ts +5 -0
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.stories.d.ts +5 -0
- package/dist/types/components/content/aico-album-content/aico-album-content.d.ts +7 -0
- package/dist/types/components/content/aico-album-content/aico-album-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-asking-content/aico-asking-content.d.ts +5 -0
- package/dist/types/components/content/aico-asking-content/aico-asking-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-asking-list-content/aico-asking-list-content.d.ts +3 -0
- package/dist/types/components/content/aico-block-quote-content/aico-block-quote-content.d.ts +5 -0
- package/dist/types/components/content/aico-block-quote-content/aico-block-quote-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-bullet-content/aico-bullet-content.d.ts +6 -0
- package/dist/types/components/content/aico-bullet-content/aico-bullet-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-carousel-content/aico-carousel-content.d.ts +9 -0
- package/dist/types/components/content/aico-carousel-content/aico-carousel-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-collection-content/aico-collection-content.d.ts +3 -0
- package/dist/types/components/content/aico-content-card-content/aico-content-card-content.d.ts +6 -0
- package/dist/types/components/content/aico-content-card-content/aico-content-card-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-divider-content/aico-divider-content.d.ts +5 -0
- package/dist/types/components/content/aico-divider-content/aico-divider-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-document-content/aico-document-content.d.ts +5 -0
- package/dist/types/components/content/aico-document-content/aico-document-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-faq-content/aico-faq-content.d.ts +6 -0
- package/dist/types/components/content/aico-faq-content/aico-faq-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-heading-content/aico-heading-content.d.ts +6 -0
- package/dist/types/components/content/aico-heading-content/aico-heading-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-html-content/aico-html-content.d.ts +5 -0
- package/dist/types/components/content/aico-link-content/aico-link-content.d.ts +5 -0
- package/dist/types/components/content/aico-link-content/aico-link-content.stories.d.ts +7 -0
- package/dist/types/components/content/aico-news-content/aico-news-content.d.ts +8 -0
- package/dist/types/components/content/aico-news-content/aico-news-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-no-content/aico-no-content.d.ts +3 -0
- package/dist/types/components/content/aico-page-content/aico-page-content.d.ts +7 -0
- package/dist/types/components/content/aico-page-content/aico-page-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-table-content/aico-table-content.d.ts +6 -0
- package/dist/types/components/content/aico-table-content/aico-table-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-testimonial-content/aico-testimonial-content.d.ts +5 -0
- package/dist/types/components/content/aico-testimonial-content/aico-testimonial-content.stories.d.ts +6 -0
- package/dist/types/components/content/aico-text-content/aico-text-content.d.ts +12 -0
- package/dist/types/components/content/aico-text-content/aico-text-content.stories.d.ts +10 -0
- package/dist/types/components/content/aico-title-content/aico-title-content.d.ts +5 -0
- package/dist/types/components/content/aico-title-content/aico-title-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-upload-content/aico-upload-content.d.ts +6 -0
- package/dist/types/components/content/aico-upload-content/aico-upload-content.stories.d.ts +5 -0
- package/dist/types/components/content/aico-video-content/aico-video-content.d.ts +6 -0
- package/dist/types/components/content/aico-video-content/aico-video-content.stories.d.ts +7 -0
- package/dist/types/components.d.ts +591 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model/AicoApiRequestInfo.d.ts +6 -0
- package/dist/types/model/Article.d.ts +103 -0
- package/dist/types/model/Entity.d.ts +15 -0
- package/dist/types/model/NewsCategory.d.ts +14 -0
- package/dist/types/model/NewsResponse.d.ts +25 -0
- package/dist/types/model/article/ContentType.d.ts +31 -0
- package/dist/types/model/article/Translation.d.ts +24 -0
- package/dist/types/model/article/content/AlbumContent.d.ts +26 -0
- package/dist/types/model/article/content/AskingContent.d.ts +152 -0
- package/dist/types/model/article/content/AskingListContent.d.ts +17 -0
- package/dist/types/model/article/content/BlockQuoteContent.d.ts +11 -0
- package/dist/types/model/article/content/BulletContent.d.ts +14 -0
- package/dist/types/model/article/content/CardContent.d.ts +10 -0
- package/dist/types/model/article/content/CarouselContent.d.ts +12 -0
- package/dist/types/model/article/content/CollectionContent.d.ts +364 -0
- package/dist/types/model/article/content/DividerContent.d.ts +8 -0
- package/dist/types/model/article/content/DocumentContent.d.ts +19 -0
- package/dist/types/model/article/content/FaqContent.d.ts +106 -0
- package/dist/types/model/article/content/HeadingContent.d.ts +16 -0
- package/dist/types/model/article/content/HtmlContent.d.ts +5 -0
- package/dist/types/model/article/content/LinkContent.d.ts +23 -0
- package/dist/types/model/article/content/NewsContent.d.ts +836 -0
- package/dist/types/model/article/content/PageContent.d.ts +313 -0
- package/dist/types/model/article/content/TableContet.d.ts +30 -0
- package/dist/types/model/article/content/TestimonialContent.d.ts +9 -0
- package/dist/types/model/article/content/TextContent.d.ts +39 -0
- package/dist/types/model/article/content/TitleContent.d.ts +9 -0
- package/dist/types/model/article/content/UploadContent.d.ts +77 -0
- package/dist/types/model/article/content/VideoContent.d.ts +14 -0
- package/dist/types/model/article/content/news/NewsAlbum.d.ts +150 -0
- package/dist/types/model/article/content/news/NewsArticle.d.ts +577 -0
- package/dist/types/model/article/content/news/NewsCategory.d.ts +88 -0
- package/dist/types/model/article/content/news/NewsTag.d.ts +63 -0
- package/dist/types/stencil-public-runtime.d.ts +1681 -0
- package/dist/types/utils/ConditionalRender.d.ts +6 -0
- package/dist/types/utils/ConditionalWrap.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +13 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +13 -4
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import ConditionalRender from "../../../utils/ConditionalRender";
|
|
3
|
+
import { strIsNullOrEmptyOrWhitespace } from "../../../utils/utils";
|
|
4
|
+
export class AicoDocumentContent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.content = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
var _a;
|
|
10
|
+
const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
|
|
11
|
+
const linkStyles = {};
|
|
12
|
+
const buttonStyles = {};
|
|
13
|
+
if (this.content.fontSize) {
|
|
14
|
+
linkStyles['font-size'] = `${this.content.fontSize}px`;
|
|
15
|
+
buttonStyles['font-size'] = `${this.content.fontSize}px`;
|
|
16
|
+
}
|
|
17
|
+
if (this.content.fontFamily) {
|
|
18
|
+
linkStyles['font-family'] = this.content.fontFamily;
|
|
19
|
+
buttonStyles['font-family'] = this.content.fontFamily;
|
|
20
|
+
}
|
|
21
|
+
if (this.content.isDocumentDisplayedAsButton && this.content.buttonTextColor) {
|
|
22
|
+
buttonStyles['color'] = this.content.buttonTextColor;
|
|
23
|
+
}
|
|
24
|
+
if (this.content.isDocumentDisplayedAsButton && this.content.buttonBackgroundColor) {
|
|
25
|
+
buttonStyles['background-color'] = this.content.buttonBackgroundColor;
|
|
26
|
+
}
|
|
27
|
+
if (this.content.isDocumentDisplayedAsButton && this.content.buttonBorderColor) {
|
|
28
|
+
buttonStyles['border-color'] = this.content.buttonBorderColor;
|
|
29
|
+
}
|
|
30
|
+
if (this.content.isDocumentDisplayedAsButton && this.content.buttonHoverColor) {
|
|
31
|
+
buttonStyles['--hover-button-color'] = this.content.buttonHoverColor;
|
|
32
|
+
}
|
|
33
|
+
return (h("div", { class: "card" }, h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.picture) }, h("img", { class: "card-img-top", alt: "image", src: translation.picture })), h("div", { class: "card-body" }, h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(this.content.link) }, h("a", { class: "card-link", style: linkStyles, href: this.content.link }, this.content.link)), h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.document) }, h("a", { href: translation.document, target: "_blank", style: buttonStyles, class: `card-link align-middle ${this.content.isDocumentDisplayedAsButton ? 'btn button-link' : ''}` }, h("i", null, h("svg", { xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "24", height: "24", viewBox: "0 0 50 50" }, h("path", { d: "M 7 2 L 7 48 L 43 48 L 43 14.59375 L 42.71875 14.28125 L 30.71875 2.28125 L 30.40625 2 Z M 9 4 L 29 4 L 29 16 L 41 16 L 41 46 L 9 46 Z M 31 5.4375 L 39.5625 14 L 31 14 Z" }))), (_a = translation.title) !== null && _a !== void 0 ? _a : 'File')))));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "aico-document-content"; }
|
|
36
|
+
static get encapsulation() { return "scoped"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["aico-document-content.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["aico-document-content.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"content": {
|
|
50
|
+
"type": "unknown",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "DocumentContent",
|
|
54
|
+
"resolved": "{ id: string | number; createdAt: Date; updatedAt: Date; } & { translations: ({ id: string | number; createdAt: Date; updatedAt: Date; locale: string; text?: string | null | undefined; title?: string | null | undefined; } & { document?: string | undefined; picture?: string | undefined; })[]; document: null; picture: null; title: null; link?: string | undefined; isDocumentDisplayedAsButton: boolean; buttonBackgroundColor?: string | undefined; buttonTextColor?: string | undefined; buttonHoverColor?: string | undefined; buttonBorderColor?: string | undefined; fontSize?: string | undefined; fontFamily?: string | undefined; }",
|
|
55
|
+
"references": {
|
|
56
|
+
"DocumentContent": {
|
|
57
|
+
"location": "import",
|
|
58
|
+
"path": "../../../model/article/content/DocumentContent",
|
|
59
|
+
"id": "src/model/article/content/DocumentContent.ts::DocumentContent"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"required": true,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": ""
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=aico-document-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-document-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-document-content/aico-document-content.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport ConditionalRender from '../../../utils/ConditionalRender';\nimport { strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\nimport type { DocumentContent } from '../../../model/article/content/DocumentContent';\n\n@Component({\n tag: 'aico-document-content',\n styleUrl: 'aico-document-content.css',\n scoped: true,\n})\nexport class AicoDocumentContent {\n @Prop() content!: DocumentContent;\n\n render() {\n const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;\n const linkStyles: { [key: string]: string | undefined } = {};\n const buttonStyles: { [key: string]: string | undefined } = {};\n\n if (this.content.fontSize) {\n linkStyles['font-size'] = `${this.content.fontSize}px`;\n buttonStyles['font-size'] = `${this.content.fontSize}px`;\n }\n\n if (this.content.fontFamily) {\n linkStyles['font-family'] = this.content.fontFamily;\n buttonStyles['font-family'] = this.content.fontFamily;\n }\n\n if (this.content.isDocumentDisplayedAsButton && this.content.buttonTextColor) {\n buttonStyles['color'] = this.content.buttonTextColor;\n }\n\n if (this.content.isDocumentDisplayedAsButton && this.content.buttonBackgroundColor) {\n buttonStyles['background-color'] = this.content.buttonBackgroundColor;\n }\n\n if (this.content.isDocumentDisplayedAsButton && this.content.buttonBorderColor) {\n buttonStyles['border-color'] = this.content.buttonBorderColor;\n }\n\n if (this.content.isDocumentDisplayedAsButton && this.content.buttonHoverColor) {\n buttonStyles['--hover-button-color'] = this.content.buttonHoverColor;\n }\n\n return (\n <div class=\"card\">\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(translation?.picture)}>\n <img class=\"card-img-top\" alt=\"image\" src={translation!.picture} />\n </ConditionalRender>\n <div class=\"card-body\">\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(this.content.link)}>\n <a class=\"card-link\" style={linkStyles} href={this.content.link}>\n {this.content.link}\n </a>\n </ConditionalRender>\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(translation?.document)}>\n <a\n href={translation!.document}\n target=\"_blank\"\n style={buttonStyles}\n class={`card-link align-middle ${this.content.isDocumentDisplayedAsButton ? 'btn button-link' : ''}`}\n >\n <i>\n <svg xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" width=\"24\" height=\"24\" viewBox=\"0 0 50 50\">\n <path d=\"M 7 2 L 7 48 L 43 48 L 43 14.59375 L 42.71875 14.28125 L 30.71875 2.28125 L 30.40625 2 Z M 9 4 L 29 4 L 29 16 L 41 16 L 41 46 L 9 46 Z M 31 5.4375 L 39.5625 14 L 31 14 Z\"></path>\n </svg>\n </i>\n {translation!.title ?? 'File'}\n </a>\n </ConditionalRender>\n </div>\n </div>\n );\n }\n}\n"]}
|
package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
component: 'aico-document-content',
|
|
3
|
+
};
|
|
4
|
+
export default meta;
|
|
5
|
+
export const Example = {
|
|
6
|
+
args: {
|
|
7
|
+
content: {
|
|
8
|
+
id: 1234,
|
|
9
|
+
createdAt: new Date(),
|
|
10
|
+
updatedAt: new Date(),
|
|
11
|
+
translations: [
|
|
12
|
+
{
|
|
13
|
+
id: 1234,
|
|
14
|
+
createdAt: new Date(),
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
title: 'Document title',
|
|
17
|
+
picture: 'https://source.unsplash.com/random/320x240',
|
|
18
|
+
document: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
link: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',
|
|
22
|
+
isDocumentDisplayedAsButton: true,
|
|
23
|
+
buttonBorderColor: 'red',
|
|
24
|
+
buttonBackgroundColor: 'gray',
|
|
25
|
+
buttonTextColor: 'green',
|
|
26
|
+
buttonHoverColor: 'pink',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=aico-document-content.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-document-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-document-content/aico-document-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAkC;IAC1C,SAAS,EAAE,uBAAuB;CACnC,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,KAAK,EAAE,gBAAgB;oBACvB,OAAO,EAAE,4CAA4C;oBACrD,QAAQ,EAAE,6CAA6C;iBACxD;aACF;YACD,IAAI,EAAE,6CAA6C;YACnD,2BAA2B,EAAE,IAAI;YACjC,iBAAiB,EAAE,KAAK;YACxB,qBAAqB,EAAE,MAAM;YAC7B,eAAe,EAAE,OAAO;YACxB,gBAAgB,EAAE,MAAM;SACN;KACrB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { DocumentContent } from '../../../model/article/content/DocumentContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoDocumentContent> = {\n component: 'aico-document-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 translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n title: 'Document title',\n picture: 'https://source.unsplash.com/random/320x240',\n document: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n },\n ],\n link: 'https://www.youtube.com/watch?v=xvFZjo5PgG0',\n isDocumentDisplayedAsButton: true,\n buttonBorderColor: 'red',\n buttonBackgroundColor: 'gray',\n buttonTextColor: 'green',\n buttonHoverColor: 'pink',\n } as DocumentContent,\n },\n};\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import "bootstrap";
|
|
3
|
+
export class AicoFaqContent {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.content = undefined;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, null, h("h2", { class: "card-title mb-2" }, "FAQ"), h("div", { class: "accordion", id: "aico-faq-accordion" }, this.content.faqItems.map((faqItem, index) => {
|
|
9
|
+
const translation = faqItem.translations.length > 0 ? faqItem.translations[0] : null;
|
|
10
|
+
if (!translation) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return (h("div", { class: "accordion-item" }, h("h2", { class: "accordion-header", id: `heading-${index}` }, h("button", { class: "accordion-button collapsed", type: "button", "data-bs-toggle": "collapse", "data-bs-target": `#collapse-${index}`, "aria-expanded": "false", "aria-controls": `collapse-${index}` }, translation.question)), h("div", { id: `collapse-${index}`, class: "accordion-collapse collapse", "aria-labelledby": `heading-${index}`, "data-bs-parent": "#aico-faq-accordion" }, h("div", { class: "accordion-body" }, translation.answer))));
|
|
14
|
+
}))));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "aico-faq-content"; }
|
|
17
|
+
static get encapsulation() { return "scoped"; }
|
|
18
|
+
static get originalStyleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["aico-faq-content.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get styleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["aico-faq-content.css"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get properties() {
|
|
29
|
+
return {
|
|
30
|
+
"content": {
|
|
31
|
+
"type": "unknown",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "FaqContent",
|
|
35
|
+
"resolved": "{ id: string | number; createdAt: Date; updatedAt: Date; faqItems: { id: string | number; createdAt: Date; updatedAt: Date; translations: { id: string | number; createdAt: Date; updatedAt: Date; locale: string; title?: string | null | undefined; text?: string | null | undefined; question?: string | null | undefined; answer?: string | null | undefined; }[]; }[]; }",
|
|
36
|
+
"references": {
|
|
37
|
+
"FaqContent": {
|
|
38
|
+
"location": "import",
|
|
39
|
+
"path": "../../../model/article/content/FaqContent",
|
|
40
|
+
"id": "src/model/article/content/FaqContent.ts::FaqContent"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": true,
|
|
45
|
+
"optional": false,
|
|
46
|
+
"docs": {
|
|
47
|
+
"tags": [],
|
|
48
|
+
"text": ""
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=aico-faq-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-faq-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-faq-content/aico-faq-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,WAAW,CAAC;AAOnB,MAAM,OAAO,cAAc;;;;IAGzB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,UAAI,KAAK,EAAC,iBAAiB,UAAS;YACpC,WAAK,KAAK,EAAC,WAAW,EAAC,EAAE,EAAC,oBAAoB,IAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;gBAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBACrF,IAAI,CAAC,WAAW,EAAE;oBAChB,OAAO,IAAI,CAAC;iBACb;gBAED,OAAO,CACL,WAAK,KAAK,EAAC,gBAAgB;oBACzB,UAAI,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAE,WAAW,KAAK,EAAE;wBACjD,cACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,QAAQ,oBACE,UAAU,oBACT,aAAa,KAAK,EAAE,mBACtB,OAAO,mBACN,YAAY,KAAK,EAAE,IAEjC,WAAW,CAAC,QAAQ,CACd,CACN;oBACL,WAAK,EAAE,EAAE,YAAY,KAAK,EAAE,EAAE,KAAK,EAAC,6BAA6B,qBAAkB,WAAW,KAAK,EAAE,oBAAiB,qBAAqB;wBACzI,WAAK,KAAK,EAAC,gBAAgB,IAAE,WAAW,CAAC,MAAM,CAAO,CAClD,CACF,CACP,CAAC;YACJ,CAAC,CAAC,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport type { FaqContent } from '../../../model/article/content/FaqContent';\nimport 'bootstrap';\n\n@Component({\n tag: 'aico-faq-content',\n styleUrl: 'aico-faq-content.css',\n scoped: true,\n})\nexport class AicoFaqContent {\n @Prop() content!: FaqContent;\n\n render() {\n return (\n <Host>\n <h2 class=\"card-title mb-2\">FAQ</h2>\n <div class=\"accordion\" id=\"aico-faq-accordion\">\n {this.content.faqItems.map((faqItem, index) => {\n const translation = faqItem.translations.length > 0 ? faqItem.translations[0] : null;\n if (!translation) {\n return null;\n }\n\n return (\n <div class=\"accordion-item\">\n <h2 class=\"accordion-header\" id={`heading-${index}`}>\n <button\n class=\"accordion-button collapsed\"\n type=\"button\"\n data-bs-toggle=\"collapse\"\n data-bs-target={`#collapse-${index}`}\n aria-expanded=\"false\"\n aria-controls={`collapse-${index}`}\n >\n {translation.question}\n </button>\n </h2>\n <div id={`collapse-${index}`} class=\"accordion-collapse collapse\" aria-labelledby={`heading-${index}`} data-bs-parent=\"#aico-faq-accordion\">\n <div class=\"accordion-body\">{translation.answer}</div>\n </div>\n </div>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
component: 'aico-faq-content',
|
|
3
|
+
};
|
|
4
|
+
export default meta;
|
|
5
|
+
export const Example = {
|
|
6
|
+
args: {
|
|
7
|
+
content: {
|
|
8
|
+
createdAt: new Date(),
|
|
9
|
+
updatedAt: new Date(),
|
|
10
|
+
faqItems: [
|
|
11
|
+
{
|
|
12
|
+
id: 1234,
|
|
13
|
+
createdAt: new Date(),
|
|
14
|
+
updatedAt: new Date(),
|
|
15
|
+
translations: [
|
|
16
|
+
{
|
|
17
|
+
id: 1234,
|
|
18
|
+
createdAt: new Date(),
|
|
19
|
+
updatedAt: new Date(),
|
|
20
|
+
locale: 'en-GB',
|
|
21
|
+
question: 'Foo?',
|
|
22
|
+
answer: 'Foo!',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 1234,
|
|
28
|
+
createdAt: new Date(),
|
|
29
|
+
updatedAt: new Date(),
|
|
30
|
+
translations: [
|
|
31
|
+
{
|
|
32
|
+
id: 1234,
|
|
33
|
+
createdAt: new Date(),
|
|
34
|
+
updatedAt: new Date(),
|
|
35
|
+
locale: 'en-GB',
|
|
36
|
+
question: 'Bar?',
|
|
37
|
+
answer: 'Bar!',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 1234,
|
|
43
|
+
createdAt: new Date(),
|
|
44
|
+
updatedAt: new Date(),
|
|
45
|
+
translations: [
|
|
46
|
+
{
|
|
47
|
+
id: 1234,
|
|
48
|
+
createdAt: new Date(),
|
|
49
|
+
updatedAt: new Date(),
|
|
50
|
+
locale: 'en-GB',
|
|
51
|
+
question: 'Baz?',
|
|
52
|
+
answer: 'Baz!',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=aico-faq-content.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-faq-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-faq-content/aico-faq-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAA6B;IACrC,SAAS,EAAE,kBAAkB;CAC9B,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,MAAM;yBACf;qBACF;iBACF;gBAED;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,MAAM;yBACf;qBACF;iBACF;gBAED;oBACE,EAAE,EAAE,IAAI;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,YAAY,EAAE;wBACZ;4BACE,EAAE,EAAE,IAAI;4BACR,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;4BACrB,MAAM,EAAE,OAAO;4BACf,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,MAAM;yBACf;qBACF;iBACF;aACF;SACY;KAChB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { FaqContent } from '../../../model/article/content/FaqContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoFaqContent> = {\n component: 'aico-faq-content',\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Example: Story = {\n args: {\n content: {\n createdAt: new Date(),\n updatedAt: new Date(),\n faqItems: [\n {\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 question: 'Foo?',\n answer: 'Foo!',\n },\n ],\n },\n\n {\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 question: 'Bar?',\n answer: 'Bar!',\n },\n ],\n },\n\n {\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 question: 'Baz?',\n answer: 'Baz!',\n },\n ],\n },\n ],\n } as FaqContent,\n },\n};\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.content {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-flow: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin: 10px auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.content-align-with-text {
|
|
9
|
+
align-content: space-between;
|
|
10
|
+
max-width: 1278px;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-flow: row wrap;
|
|
13
|
+
width: 100%;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.title-wrapper {
|
|
18
|
+
width: fit-content;
|
|
19
|
+
border-radius: 10px;
|
|
20
|
+
margin-bottom: 10px;
|
|
21
|
+
margin-left: 0;
|
|
22
|
+
padding: 15px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.description {
|
|
26
|
+
width: fit-content;
|
|
27
|
+
padding: 10px;
|
|
28
|
+
border-radius: 10px;
|
|
29
|
+
white-space: pre-line;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media screen and (max-width: 768px) {
|
|
33
|
+
.content {
|
|
34
|
+
min-height: 300px !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import ConditionalRender from "../../../utils/ConditionalRender";
|
|
3
|
+
import { strIsNullOrEmptyOrWhitespace } from "../../../utils/utils";
|
|
4
|
+
export class AicoHeadingContent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.content = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
|
|
10
|
+
const contentStyle = { 'justify-content': this.content.isTextAtMiddleOfImage ? 'center' : 'flex-end' };
|
|
11
|
+
if (!strIsNullOrEmptyOrWhitespace(this.content.picture)) {
|
|
12
|
+
contentStyle['min-height'] = this.content.isImageHeightHalfSize ? '400px' : '600px';
|
|
13
|
+
contentStyle['background-size'] = this.content.isImageHeightHalfSize ? '100%' : 'cover';
|
|
14
|
+
contentStyle['background-image'] = `url(${this.content.picture})`;
|
|
15
|
+
contentStyle['background-repeat'] = 'no-repeat';
|
|
16
|
+
contentStyle['background-position'] = 'center';
|
|
17
|
+
}
|
|
18
|
+
const titleWrapperStyle = { 'background-color': this.content.textBackgroundColor };
|
|
19
|
+
if (this.content.fontSize) {
|
|
20
|
+
titleWrapperStyle['font-size'] = `${this.content.fontSize}px`;
|
|
21
|
+
}
|
|
22
|
+
if (!strIsNullOrEmptyOrWhitespace(this.content.fontFamily)) {
|
|
23
|
+
titleWrapperStyle['font-family'] = this.content.fontFamily;
|
|
24
|
+
}
|
|
25
|
+
const descriptionStyle = { 'background-color': this.content.textBackgroundColor };
|
|
26
|
+
if (!strIsNullOrEmptyOrWhitespace(this.content.textColor)) {
|
|
27
|
+
descriptionStyle['color'] = this.content.textColor;
|
|
28
|
+
}
|
|
29
|
+
return (h("div", { class: this.content.isHeadingAlignedWithText ? 'content content-align-with-text' : 'content', style: contentStyle }, h(ConditionalRender, { condition: translation !== null }, h("div", { class: "title-wrapper", style: titleWrapperStyle }, h("aico-title-content", { content: this.makeTitleContent(translation) })), h("span", { class: "description", style: descriptionStyle }, translation.description))));
|
|
30
|
+
}
|
|
31
|
+
makeTitleContent(translation) {
|
|
32
|
+
var _a;
|
|
33
|
+
return {
|
|
34
|
+
id: this.content.id,
|
|
35
|
+
createdAt: this.content.createdAt,
|
|
36
|
+
updatedAt: this.content.updatedAt,
|
|
37
|
+
hasUnderscore: false,
|
|
38
|
+
size: (_a = this.content.titleSize) !== null && _a !== void 0 ? _a : 'h1',
|
|
39
|
+
titleColor: this.content.textColor,
|
|
40
|
+
translations: [Object.assign({}, translation)],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static get is() { return "aico-heading-content"; }
|
|
44
|
+
static get encapsulation() { return "scoped"; }
|
|
45
|
+
static get originalStyleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["aico-heading-content.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get styleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["aico-heading-content.css"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"content": {
|
|
58
|
+
"type": "unknown",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "HeadingContent",
|
|
62
|
+
"resolved": "{ id: string | number; createdAt: Date; updatedAt: Date; } & { translations: ({ id: string | number; createdAt: Date; updatedAt: Date; locale: string; text?: string | null | undefined; title?: string | null | undefined; } & { description?: string | undefined; })[]; picture?: string | undefined; titleSize?: string | undefined; textColor?: string | undefined; textBackgroundColor: string; isImageHeightHalfSize: boolean; isHeadingAlignedWithText: boolean; isTextAtMiddleOfImage: boolean; fontFamily?: string | undefined; fontSize?: number | undefined; }",
|
|
63
|
+
"references": {
|
|
64
|
+
"HeadingContent": {
|
|
65
|
+
"location": "import",
|
|
66
|
+
"path": "../../../model/article/content/HeadingContent",
|
|
67
|
+
"id": "src/model/article/content/HeadingContent.ts::HeadingContent"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": true,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=aico-heading-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-heading-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-heading-content/aico-heading-content.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport ConditionalRender from '../../../utils/ConditionalRender';\nimport { strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\nimport type { HeadingContent } from '../../../model/article/content/HeadingContent';\nimport type { Translation } from '../../../model/article/Translation';\nimport type { TitleContent } from '../../../model/article/content/TitleContent';\n\n@Component({\n tag: 'aico-heading-content',\n styleUrl: 'aico-heading-content.css',\n scoped: true,\n})\nexport class AicoHeadingContent {\n @Prop() content!: HeadingContent;\n\n render() {\n const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;\n const contentStyle: { [key: string]: string | undefined } = { 'justify-content': this.content.isTextAtMiddleOfImage ? 'center' : 'flex-end' };\n if (!strIsNullOrEmptyOrWhitespace(this.content.picture)) {\n contentStyle['min-height'] = this.content.isImageHeightHalfSize ? '400px' : '600px';\n contentStyle['background-size'] = this.content.isImageHeightHalfSize ? '100%' : 'cover';\n contentStyle['background-image'] = `url(${this.content.picture})`;\n contentStyle['background-repeat'] = 'no-repeat';\n contentStyle['background-position'] = 'center';\n }\n\n const titleWrapperStyle: { [key: string]: string | undefined } = { 'background-color': this.content.textBackgroundColor };\n if (this.content.fontSize) {\n titleWrapperStyle['font-size'] = `${this.content.fontSize}px`;\n }\n\n if (!strIsNullOrEmptyOrWhitespace(this.content.fontFamily)) {\n titleWrapperStyle['font-family'] = this.content.fontFamily;\n }\n\n const descriptionStyle: { [key: string]: string | undefined } = { 'background-color': this.content.textBackgroundColor };\n if (!strIsNullOrEmptyOrWhitespace(this.content.textColor)) {\n descriptionStyle['color'] = this.content.textColor;\n }\n\n return (\n <div class={this.content.isHeadingAlignedWithText ? 'content content-align-with-text' : 'content'} style={contentStyle}>\n <ConditionalRender condition={translation !== null}>\n <div class=\"title-wrapper\" style={titleWrapperStyle}>\n <aico-title-content content={this.makeTitleContent(translation!)} />\n </div>\n <span class=\"description\" style={descriptionStyle}>\n {translation!.description}\n </span>\n </ConditionalRender>\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 titleColor: this.content.textColor,\n translations: [{ ...translation }],\n };\n }\n}\n"]}
|
package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
component: 'aico-heading-content',
|
|
3
|
+
};
|
|
4
|
+
export default meta;
|
|
5
|
+
export const Example = {
|
|
6
|
+
args: {
|
|
7
|
+
content: {
|
|
8
|
+
id: 1234,
|
|
9
|
+
createdAt: new Date(),
|
|
10
|
+
updatedAt: new Date(),
|
|
11
|
+
translations: [
|
|
12
|
+
{
|
|
13
|
+
id: 1234,
|
|
14
|
+
createdAt: new Date(),
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
title: 'Heading title',
|
|
17
|
+
description: 'Heading description',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
textColor: 'red',
|
|
21
|
+
textBackgroundColor: 'gray',
|
|
22
|
+
titleSize: 'h2',
|
|
23
|
+
picture: 'https://source.unsplash.com/random/320x240',
|
|
24
|
+
fontSize: 69,
|
|
25
|
+
isHeadingAlignedWithText: true,
|
|
26
|
+
isTextAtMiddleOfImage: true,
|
|
27
|
+
isImageHeightHalfSize: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=aico-heading-content.stories.js.map
|
package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-heading-content.stories.js","sourceRoot":"","sources":["../../../../src/components/content/aico-heading-content/aico-heading-content.stories.ts"],"names":[],"mappings":"AAIA,MAAM,IAAI,GAAiC;IACzC,SAAS,EAAE,sBAAsB;CAClC,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,KAAK,EAAE,eAAe;oBACtB,WAAW,EAAE,qBAAqB;iBACnC;aACF;YACD,SAAS,EAAE,KAAK;YAChB,mBAAmB,EAAE,MAAM;YAC3B,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,4CAA4C;YACrD,QAAQ,EAAE,EAAE;YACZ,wBAAwB,EAAE,IAAI;YAC9B,qBAAqB,EAAE,IAAI;YAC3B,qBAAqB,EAAE,IAAI;SACV;KACpB;CACF,CAAC","sourcesContent":["import type { Meta, StoryObj } from '@storybook/web-components';\nimport type { HeadingContent } from '../../../model/article/content/HeadingContent';\nimport { JSX } from '../../../components';\n\nconst meta: Meta<JSX.AicoHeadingContent> = {\n component: 'aico-heading-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 translations: [\n {\n id: 1234,\n createdAt: new Date(),\n updatedAt: new Date(),\n title: 'Heading title',\n description: 'Heading description',\n },\n ],\n textColor: 'red',\n textBackgroundColor: 'gray',\n titleSize: 'h2',\n picture: 'https://source.unsplash.com/random/320x240',\n fontSize: 69,\n isHeadingAlignedWithText: true,\n isTextAtMiddleOfImage: true,\n isImageHeightHalfSize: true,\n } as HeadingContent,\n },\n};\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import ConditionalRender from "../../../utils/ConditionalRender";
|
|
3
|
+
import { strIsNullOrEmptyOrWhitespace } from "../../../utils/utils";
|
|
4
|
+
export class AicoHtmlContent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.content = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
if (this.content.translations.length === 0) {
|
|
10
|
+
return h("aico-no-content", null);
|
|
11
|
+
}
|
|
12
|
+
return (h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(this.content.translations[0].text) }, h("div", { innerHTML: this.content.translations[0].text })));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "aico-html-content"; }
|
|
15
|
+
static get encapsulation() { return "scoped"; }
|
|
16
|
+
static get originalStyleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["aico-html-content.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get styleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["aico-html-content.css"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"content": {
|
|
29
|
+
"type": "unknown",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "HtmlContent",
|
|
33
|
+
"resolved": "{ id: string | number; createdAt: Date; updatedAt: Date; } & { translations: { id: string | number; createdAt: Date; updatedAt: Date; locale: string; text?: string | null | undefined; title?: string | null | undefined; }[]; }",
|
|
34
|
+
"references": {
|
|
35
|
+
"HtmlContent": {
|
|
36
|
+
"location": "import",
|
|
37
|
+
"path": "../../../model/article/content/HtmlContent",
|
|
38
|
+
"id": "src/model/article/content/HtmlContent.ts::HtmlContent"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": true,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": ""
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=aico-html-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-html-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-html-content/aico-html-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAOpE,MAAM,OAAO,eAAe;;;;IAG1B,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1C,OAAO,0BAAmB,CAAC;SAC5B;QAED,OAAO,CACL,EAAC,iBAAiB,IAAC,SAAS,EAAE,CAAC,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5F,WAAK,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAK,GAAI,CACpC,CACrB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { HtmlContent } from '../../../model/article/content/HtmlContent';\nimport ConditionalRender from '../../../utils/ConditionalRender';\nimport { strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\n\n@Component({\n tag: 'aico-html-content',\n styleUrl: 'aico-html-content.css',\n scoped: true,\n})\nexport class AicoHtmlContent {\n @Prop() content!: HtmlContent;\n\n render() {\n if (this.content.translations.length === 0) {\n return <aico-no-content />;\n }\n\n return (\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(this.content.translations[0].text)}>\n <div innerHTML={this.content.translations[0].text!} />\n </ConditionalRender>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--hover-button-color: unset;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.image-link-wrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.image-link {
|
|
10
|
+
display: block;
|
|
11
|
+
text-align: center;
|
|
12
|
+
&:hover {
|
|
13
|
+
opacity: 0.5;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.arrow-button {
|
|
18
|
+
float: right;
|
|
19
|
+
font-size: 30px;
|
|
20
|
+
margin-top: -10px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.button_link {
|
|
24
|
+
display: block;
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
padding: 12px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
font-weight: 900;
|
|
30
|
+
font-size: 1.5rem;
|
|
31
|
+
line-height: 1;
|
|
32
|
+
letter-spacing: 0.03rem;
|
|
33
|
+
border-radius: 5px;
|
|
34
|
+
&:hover {
|
|
35
|
+
background-color: var(--hover-button-color) !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import ConditionalRender from "../../../utils/ConditionalRender";
|
|
3
|
+
import { getImageWidthPrc, strIsNullOrEmptyOrWhitespace } from "../../../utils/utils";
|
|
4
|
+
export class AicoLinkContent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.content = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
|
|
11
|
+
const buttonLinkStyle = {};
|
|
12
|
+
if (this.content.textButtonColor) {
|
|
13
|
+
buttonLinkStyle['color'] = this.content.textButtonColor;
|
|
14
|
+
}
|
|
15
|
+
if (this.content.textButtonColor) {
|
|
16
|
+
buttonLinkStyle['background-color'] = this.content.textButtonColor;
|
|
17
|
+
}
|
|
18
|
+
if (this.content.fontSize) {
|
|
19
|
+
buttonLinkStyle['font-size'] = `${this.content.fontSize}px`;
|
|
20
|
+
}
|
|
21
|
+
if (this.content.fontFamily) {
|
|
22
|
+
buttonLinkStyle['font-family'] = this.content.fontFamily;
|
|
23
|
+
}
|
|
24
|
+
if (this.content.hoverColor) {
|
|
25
|
+
buttonLinkStyle['--hover-button-color'] = this.content.hoverColor;
|
|
26
|
+
}
|
|
27
|
+
return (h(Host, null, h(ConditionalRender, { condition: !strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, h("label", null, translation === null || translation === void 0 ? void 0 :
|
|
28
|
+
translation.title, ": ")), h(ConditionalRender, { condition: this.content.isImageLink !== undefined && this.content.isImageLink }, h("div", { class: "image-link-wrapper", style: { 'justify-content': this.content.picturePosition } }, h("a", { href: (_a = translation === null || translation === void 0 ? void 0 : translation.link) !== null && _a !== void 0 ? _a : '#', target: "_blank", class: "image-link", style: { width: this.content.isImageFullSize ? '100%' : getImageWidthPrc(this.content.pictureSize) } }, h("img", { src: translation === null || translation === void 0 ? void 0 : translation.imageUrl })))), h(ConditionalRender, { condition: this.content.isImageLink === null || !this.content.isImageLink }, h("a", { href: (_b = translation === null || translation === void 0 ? void 0 : translation.link) !== null && _b !== void 0 ? _b : '#', target: "_blank", class: this.content.isButtonLink ? 'button-link' : '', style: buttonLinkStyle }, h("span", { class: "arrow-button" }, " \u2192")))));
|
|
29
|
+
}
|
|
30
|
+
static get is() { return "aico-link-content"; }
|
|
31
|
+
static get encapsulation() { return "scoped"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["aico-link-content.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["aico-link-content.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get properties() {
|
|
43
|
+
return {
|
|
44
|
+
"content": {
|
|
45
|
+
"type": "unknown",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "LinkContent",
|
|
49
|
+
"resolved": "{ id: string | number; createdAt: Date; updatedAt: Date; } & { translations: ({ id: string | number; createdAt: Date; updatedAt: Date; locale: string; text?: string | null | undefined; title?: string | null | undefined; } & { link?: string | undefined; linkText?: string | undefined; imageUrl?: string | undefined; })[]; link?: string | undefined; linkText?: string | undefined; title?: string | undefined; imageUrl?: string | undefined; pictureSize: string; picturePosition?: string | undefined; isButtonLink: boolean; isImageFullSize: boolean; isImageLink?: boolean | undefined; backgroundButtonColor?: string | undefined; textButtonColor?: string | undefined; hoverColor?: string | undefined; fontSize?: number | undefined; fontFamily?: string | undefined; }",
|
|
50
|
+
"references": {
|
|
51
|
+
"LinkContent": {
|
|
52
|
+
"location": "import",
|
|
53
|
+
"path": "../../../model/article/content/LinkContent",
|
|
54
|
+
"id": "src/model/article/content/LinkContent.ts::LinkContent"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": true,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=aico-link-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aico-link-content.js","sourceRoot":"","sources":["../../../../src/components/content/aico-link-content/aico-link-content.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport ConditionalRender from '../../../utils/ConditionalRender';\nimport { getImageWidthPrc, strIsNullOrEmptyOrWhitespace } from '../../../utils/utils';\nimport type { LinkContent } from '../../../model/article/content/LinkContent';\n\n@Component({\n tag: 'aico-link-content',\n styleUrl: 'aico-link-content.css',\n scoped: true,\n})\nexport class AicoLinkContent {\n @Prop() content!: LinkContent;\n\n render() {\n const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;\n const buttonLinkStyle: { [key: string]: string | undefined } = {};\n if (this.content.textButtonColor) {\n buttonLinkStyle['color'] = this.content.textButtonColor;\n }\n\n if (this.content.textButtonColor) {\n buttonLinkStyle['background-color'] = this.content.textButtonColor;\n }\n\n if (this.content.fontSize) {\n buttonLinkStyle['font-size'] = `${this.content.fontSize}px`;\n }\n\n if (this.content.fontFamily) {\n buttonLinkStyle['font-family'] = this.content.fontFamily;\n }\n\n if (this.content.hoverColor) {\n buttonLinkStyle['--hover-button-color'] = this.content.hoverColor;\n }\n\n return (\n <Host>\n <ConditionalRender condition={!strIsNullOrEmptyOrWhitespace(translation?.title)}>\n <label>{translation?.title}: </label>\n </ConditionalRender>\n <ConditionalRender condition={this.content.isImageLink !== undefined && this.content.isImageLink}>\n <div class=\"image-link-wrapper\" style={{ 'justify-content': this.content.picturePosition }}>\n <a\n href={translation?.link ?? '#'}\n target=\"_blank\"\n class=\"image-link\"\n style={{ width: this.content.isImageFullSize ? '100%' : getImageWidthPrc(this.content.pictureSize) }}\n >\n <img src={translation?.imageUrl} />\n </a>\n </div>\n </ConditionalRender>\n <ConditionalRender condition={this.content.isImageLink === null || !this.content.isImageLink}>\n <a href={translation?.link ?? '#'} target=\"_blank\" class={this.content.isButtonLink ? 'button-link' : ''} style={buttonLinkStyle}>\n <span class=\"arrow-button\"> →</span>\n </a>\n </ConditionalRender>\n </Host>\n );\n }\n}\n"]}
|