@aiconomy/aico-components 0.0.57 → 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.
Files changed (222) hide show
  1. package/dist/aico-components/aico-components.css +1 -1
  2. package/dist/aico-components/aico-components.esm.js +1 -1
  3. package/dist/aico-components/aico-components.esm.js.map +1 -1
  4. package/dist/aico-components/p-0b6e7469.entry.js +2 -0
  5. package/dist/aico-components/p-0b6e7469.entry.js.map +1 -0
  6. package/dist/aico-components/p-19752961.entry.js +2 -0
  7. package/dist/aico-components/p-19752961.entry.js.map +1 -0
  8. package/dist/aico-components/p-2677f2ab.js +2 -0
  9. package/dist/aico-components/p-2677f2ab.js.map +1 -0
  10. package/dist/aico-components/{p-1c4a07ef.entry.js → p-368503ee.entry.js} +3 -3
  11. package/dist/aico-components/p-368503ee.entry.js.map +1 -0
  12. package/dist/aico-components/p-7e0074f7.entry.js +2 -0
  13. package/dist/aico-components/p-7e0074f7.entry.js.map +1 -0
  14. package/dist/aico-components/p-9ea26390.entry.js +2 -0
  15. package/dist/aico-components/p-9ea26390.entry.js.map +1 -0
  16. package/dist/aico-components/p-bccf08d0.entry.js +2 -0
  17. package/dist/aico-components/p-bccf08d0.entry.js.map +1 -0
  18. package/dist/aico-components/p-c9eea1b1.entry.js +2 -0
  19. package/dist/aico-components/p-c9eea1b1.entry.js.map +1 -0
  20. package/dist/cjs/aico-album-content_19.cjs.entry.js +76 -53
  21. package/dist/cjs/aico-album-content_19.cjs.entry.js.map +1 -1
  22. package/dist/cjs/aico-article-detail.cjs.entry.js +18 -17
  23. package/dist/cjs/aico-article-detail.cjs.entry.js.map +1 -1
  24. package/dist/cjs/aico-components.cjs.js +1 -1
  25. package/dist/cjs/aico-fetch-article-detail.cjs.entry.js +3 -2
  26. package/dist/cjs/aico-fetch-article-detail.cjs.entry.js.map +1 -1
  27. package/dist/cjs/aico-news-list-item.cjs.entry.js +1 -1
  28. package/dist/cjs/aico-news-list-item.cjs.entry.js.map +1 -1
  29. package/dist/cjs/aico-news-list.cjs.entry.js +4 -3
  30. package/dist/cjs/aico-news-list.cjs.entry.js.map +1 -1
  31. package/dist/cjs/aico-no-content_2.cjs.entry.js +5 -3
  32. package/dist/cjs/aico-no-content_2.cjs.entry.js.map +1 -1
  33. package/dist/cjs/aico-special-news-carousel.cjs.entry.js +4 -3
  34. package/dist/cjs/aico-special-news-carousel.cjs.entry.js.map +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/cjs/{utils-095ed22b.js → utils-c1b7a052.js} +11 -5
  37. package/dist/cjs/utils-c1b7a052.js.map +1 -0
  38. package/dist/collection/components/aico-article-detail/aico-article-detail.js +36 -17
  39. package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
  40. package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js +20 -1
  41. package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map +1 -1
  42. package/dist/collection/components/aico-news-list/aico-news-list.js +19 -2
  43. package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
  44. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +1 -1
  45. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
  46. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +19 -2
  47. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
  48. package/dist/collection/components/content/aico-asking-content/aico-asking-content.js +22 -3
  49. package/dist/collection/components/content/aico-asking-content/aico-asking-content.js.map +1 -1
  50. package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js +16 -0
  51. package/dist/collection/components/content/aico-asking-content/aico-asking-content.stories.js.map +1 -1
  52. package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js +21 -1
  53. package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.js.map +1 -1
  54. package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js +18 -0
  55. package/dist/collection/components/content/aico-block-quote-content/aico-block-quote-content.stories.js.map +1 -1
  56. package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js +25 -5
  57. package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.js.map +1 -1
  58. package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js +29 -0
  59. package/dist/collection/components/content/aico-bullet-content/aico-bullet-content.stories.js.map +1 -1
  60. package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js +25 -3
  61. package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.js.map +1 -1
  62. package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js +35 -3
  63. package/dist/collection/components/content/aico-carousel-content/aico-carousel-content.stories.js.map +1 -1
  64. package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js +22 -3
  65. package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.js.map +1 -1
  66. package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js +10 -0
  67. package/dist/collection/components/content/aico-content-card-content/aico-content-card-content.stories.js.map +1 -1
  68. package/dist/collection/components/content/aico-divider-content/aico-divider-content.js +21 -1
  69. package/dist/collection/components/content/aico-divider-content/aico-divider-content.js.map +1 -1
  70. package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js +9 -0
  71. package/dist/collection/components/content/aico-divider-content/aico-divider-content.stories.js.map +1 -1
  72. package/dist/collection/components/content/aico-document-content/aico-document-content.js +22 -3
  73. package/dist/collection/components/content/aico-document-content/aico-document-content.js.map +1 -1
  74. package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js +11 -0
  75. package/dist/collection/components/content/aico-document-content/aico-document-content.stories.js.map +1 -1
  76. package/dist/collection/components/content/aico-faq-content/aico-faq-content.js +21 -1
  77. package/dist/collection/components/content/aico-faq-content/aico-faq-content.js.map +1 -1
  78. package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js +25 -0
  79. package/dist/collection/components/content/aico-faq-content/aico-faq-content.stories.js.map +1 -1
  80. package/dist/collection/components/content/aico-heading-content/aico-heading-content.js +22 -2
  81. package/dist/collection/components/content/aico-heading-content/aico-heading-content.js.map +1 -1
  82. package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js +10 -0
  83. package/dist/collection/components/content/aico-heading-content/aico-heading-content.stories.js.map +1 -1
  84. package/dist/collection/components/content/aico-html-content/aico-html-content.js +22 -4
  85. package/dist/collection/components/content/aico-html-content/aico-html-content.js.map +1 -1
  86. package/dist/collection/components/content/aico-link-content/aico-link-content.js +22 -3
  87. package/dist/collection/components/content/aico-link-content/aico-link-content.js.map +1 -1
  88. package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js +24 -0
  89. package/dist/collection/components/content/aico-link-content/aico-link-content.stories.js.map +1 -1
  90. package/dist/collection/components/content/aico-page-content/aico-page-content.js +23 -4
  91. package/dist/collection/components/content/aico-page-content/aico-page-content.js.map +1 -1
  92. package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js +11 -0
  93. package/dist/collection/components/content/aico-page-content/aico-page-content.stories.js.map +1 -1
  94. package/dist/collection/components/content/aico-table-content/aico-table-content.js +26 -6
  95. package/dist/collection/components/content/aico-table-content/aico-table-content.js.map +1 -1
  96. package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js +58 -0
  97. package/dist/collection/components/content/aico-table-content/aico-table-content.stories.js.map +1 -1
  98. package/dist/collection/components/content/aico-text-content/aico-text-content.js +25 -9
  99. package/dist/collection/components/content/aico-text-content/aico-text-content.js.map +1 -1
  100. package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js +55 -0
  101. package/dist/collection/components/content/aico-text-content/aico-text-content.stories.js.map +1 -1
  102. package/dist/collection/components/content/aico-title-content/aico-title-content.js +23 -3
  103. package/dist/collection/components/content/aico-title-content/aico-title-content.js.map +1 -1
  104. package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js +12 -1
  105. package/dist/collection/components/content/aico-title-content/aico-title-content.stories.js.map +1 -1
  106. package/dist/collection/components/content/aico-upload-content/aico-upload-content.js +22 -2
  107. package/dist/collection/components/content/aico-upload-content/aico-upload-content.js.map +1 -1
  108. package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js +8 -0
  109. package/dist/collection/components/content/aico-upload-content/aico-upload-content.stories.js.map +1 -1
  110. package/dist/collection/components/content/aico-video-content/aico-video-content.js +22 -2
  111. package/dist/collection/components/content/aico-video-content/aico-video-content.js.map +1 -1
  112. package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js +17 -0
  113. package/dist/collection/components/content/aico-video-content/aico-video-content.stories.js.map +1 -1
  114. package/dist/collection/model/article/content/CarouselContent.js.map +1 -1
  115. package/dist/collection/utils/utils.js +10 -4
  116. package/dist/collection/utils/utils.js.map +1 -1
  117. package/dist/components/aico-article-detail2.js +20 -18
  118. package/dist/components/aico-article-detail2.js.map +1 -1
  119. package/dist/components/aico-asking-content2.js +6 -4
  120. package/dist/components/aico-asking-content2.js.map +1 -1
  121. package/dist/components/aico-block-quote-content2.js +5 -2
  122. package/dist/components/aico-block-quote-content2.js.map +1 -1
  123. package/dist/components/aico-bullet-content2.js +9 -6
  124. package/dist/components/aico-bullet-content2.js.map +1 -1
  125. package/dist/components/aico-carousel-content2.js +9 -4
  126. package/dist/components/aico-carousel-content2.js.map +1 -1
  127. package/dist/components/aico-content-card-content2.js +6 -4
  128. package/dist/components/aico-content-card-content2.js.map +1 -1
  129. package/dist/components/aico-divider-content2.js +5 -2
  130. package/dist/components/aico-divider-content2.js.map +1 -1
  131. package/dist/components/aico-document-content2.js +6 -4
  132. package/dist/components/aico-document-content2.js.map +1 -1
  133. package/dist/components/aico-faq-content2.js +5 -2
  134. package/dist/components/aico-faq-content2.js.map +1 -1
  135. package/dist/components/aico-fetch-article-detail.js +3 -1
  136. package/dist/components/aico-fetch-article-detail.js.map +1 -1
  137. package/dist/components/aico-heading-content2.js +6 -3
  138. package/dist/components/aico-heading-content2.js.map +1 -1
  139. package/dist/components/aico-html-content2.js +7 -12
  140. package/dist/components/aico-html-content2.js.map +1 -1
  141. package/dist/components/aico-link-content2.js +6 -4
  142. package/dist/components/aico-link-content2.js.map +1 -1
  143. package/dist/components/aico-news-list-item2.js +1 -1
  144. package/dist/components/aico-news-list-item2.js.map +1 -1
  145. package/dist/components/aico-news-list.js +4 -2
  146. package/dist/components/aico-news-list.js.map +1 -1
  147. package/dist/components/aico-page-content2.js +7 -5
  148. package/dist/components/aico-page-content2.js.map +1 -1
  149. package/dist/components/aico-special-news-carousel.js +4 -2
  150. package/dist/components/aico-special-news-carousel.js.map +1 -1
  151. package/dist/components/aico-table-content2.js +10 -7
  152. package/dist/components/aico-table-content2.js.map +1 -1
  153. package/dist/components/aico-text-content2.js +9 -10
  154. package/dist/components/aico-text-content2.js.map +1 -1
  155. package/dist/components/aico-title-content2.js +7 -4
  156. package/dist/components/aico-title-content2.js.map +1 -1
  157. package/dist/components/aico-upload-content2.js +6 -3
  158. package/dist/components/aico-upload-content2.js.map +1 -1
  159. package/dist/components/aico-video-content2.js +6 -3
  160. package/dist/components/aico-video-content2.js.map +1 -1
  161. package/dist/components/utils.js +10 -4
  162. package/dist/components/utils.js.map +1 -1
  163. package/dist/esm/aico-album-content_19.entry.js +76 -53
  164. package/dist/esm/aico-album-content_19.entry.js.map +1 -1
  165. package/dist/esm/aico-article-detail.entry.js +18 -17
  166. package/dist/esm/aico-article-detail.entry.js.map +1 -1
  167. package/dist/esm/aico-components.js +1 -1
  168. package/dist/esm/aico-fetch-article-detail.entry.js +3 -2
  169. package/dist/esm/aico-fetch-article-detail.entry.js.map +1 -1
  170. package/dist/esm/aico-news-list-item.entry.js +1 -1
  171. package/dist/esm/aico-news-list-item.entry.js.map +1 -1
  172. package/dist/esm/aico-news-list.entry.js +4 -3
  173. package/dist/esm/aico-news-list.entry.js.map +1 -1
  174. package/dist/esm/aico-no-content_2.entry.js +5 -3
  175. package/dist/esm/aico-no-content_2.entry.js.map +1 -1
  176. package/dist/esm/aico-special-news-carousel.entry.js +4 -3
  177. package/dist/esm/aico-special-news-carousel.entry.js.map +1 -1
  178. package/dist/esm/loader.js +1 -1
  179. package/dist/esm/{utils-54ffec33.js → utils-b4eec8e9.js} +11 -5
  180. package/dist/esm/utils-b4eec8e9.js.map +1 -0
  181. package/dist/types/components/aico-article-detail/aico-article-detail.d.ts +1 -0
  182. package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.d.ts +1 -0
  183. package/dist/types/components/aico-news-list/aico-news-list.d.ts +1 -0
  184. package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.d.ts +1 -0
  185. package/dist/types/components/content/aico-asking-content/aico-asking-content.d.ts +1 -0
  186. package/dist/types/components/content/aico-block-quote-content/aico-block-quote-content.d.ts +1 -0
  187. package/dist/types/components/content/aico-bullet-content/aico-bullet-content.d.ts +1 -0
  188. package/dist/types/components/content/aico-carousel-content/aico-carousel-content.d.ts +1 -0
  189. package/dist/types/components/content/aico-content-card-content/aico-content-card-content.d.ts +1 -0
  190. package/dist/types/components/content/aico-divider-content/aico-divider-content.d.ts +1 -0
  191. package/dist/types/components/content/aico-document-content/aico-document-content.d.ts +1 -0
  192. package/dist/types/components/content/aico-faq-content/aico-faq-content.d.ts +1 -0
  193. package/dist/types/components/content/aico-heading-content/aico-heading-content.d.ts +1 -0
  194. package/dist/types/components/content/aico-html-content/aico-html-content.d.ts +1 -0
  195. package/dist/types/components/content/aico-link-content/aico-link-content.d.ts +1 -0
  196. package/dist/types/components/content/aico-page-content/aico-page-content.d.ts +1 -0
  197. package/dist/types/components/content/aico-table-content/aico-table-content.d.ts +1 -0
  198. package/dist/types/components/content/aico-text-content/aico-text-content.d.ts +1 -0
  199. package/dist/types/components/content/aico-title-content/aico-title-content.d.ts +1 -0
  200. package/dist/types/components/content/aico-upload-content/aico-upload-content.d.ts +1 -0
  201. package/dist/types/components/content/aico-video-content/aico-video-content.d.ts +1 -0
  202. package/dist/types/components.d.ts +42 -0
  203. package/dist/types/model/article/content/CarouselContent.d.ts +4 -2
  204. package/dist/types/utils/utils.d.ts +2 -2
  205. package/package.json +3 -2
  206. package/dist/aico-components/p-0ca1f065.entry.js +0 -2
  207. package/dist/aico-components/p-0ca1f065.entry.js.map +0 -1
  208. package/dist/aico-components/p-1c4a07ef.entry.js.map +0 -1
  209. package/dist/aico-components/p-406fa2e5.entry.js +0 -2
  210. package/dist/aico-components/p-406fa2e5.entry.js.map +0 -1
  211. package/dist/aico-components/p-4c0f3325.entry.js +0 -2
  212. package/dist/aico-components/p-4c0f3325.entry.js.map +0 -1
  213. package/dist/aico-components/p-5109399b.entry.js +0 -2
  214. package/dist/aico-components/p-5109399b.entry.js.map +0 -1
  215. package/dist/aico-components/p-6464810e.entry.js +0 -2
  216. package/dist/aico-components/p-6464810e.entry.js.map +0 -1
  217. package/dist/aico-components/p-b1f8308f.entry.js +0 -2
  218. package/dist/aico-components/p-b1f8308f.entry.js.map +0 -1
  219. package/dist/aico-components/p-dfd3b0d3.js +0 -2
  220. package/dist/aico-components/p-dfd3b0d3.js.map +0 -1
  221. package/dist/cjs/utils-095ed22b.js.map +0 -1
  222. package/dist/esm/utils-54ffec33.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as i,c as s,h as t,H as e}from"./p-ae20e789.js";import{b as l}from"./p-2677f2ab.js";const o="";const n=class{constructor(t){i(this,t);this.articleClick=s(this,"articleClick",7);this.pageSize=16;this.newsResponse=undefined;this.pageNumber=1;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.newsChannels=[];this.nextButtonText="Next";this.previousButtonText="Previous"}connectedCallback(){this.newsListFetchController=new AbortController;this.pageNumber=1;this.api={baseApi:this.aicoUrl,bearerToken:this.aicoBearerToken}}disconnectedCallback(){this.newsListFetchController.abort("disconnected")}async componentWillLoad(){this.newsResponse=await l(this.api,this.pageNumber,this.pageSize,this.newsListFetchController.signal,this.newsChannels)}async componentWillUpdate(){this.newsListFetchController=new AbortController;this.newsResponse=await l(this.api,this.pageNumber,this.pageSize,this.newsListFetchController.signal,this.newsChannels)}render(){var i,s,l;return t(e,null,t("div",{class:"row row-cols-1 row-cols-sm-2 row-cols-lg-4 g-4 mb-4"},(i=this.newsResponse)===null||i===void 0?void 0:i.data.map((i=>t("div",{class:"col"},t("aico-news-list-item",{article:i,onArticleClick:i=>{var s;(s=this.articleClick)===null||s===void 0?void 0:s.emit(i.detail)}}))))),t("nav",{class:"w-100","aria-label":"News navigation"},t("ul",{class:"pagination justify-content-center"},t("li",{class:`page-item page-link user-select-none d-flex align-items-center ${!((s=this.newsResponse)===null||s===void 0?void 0:s.links.prev)?"disabled":""}`,style:{cursor:"pointer"},onClick:()=>{if(this.pageNumber>1){this.pageNumber-=1}return false}},t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-chevron-left me-1 fs-4",style:{width:"1em",height:"1em"},viewBox:"0 0 16 16"},t("path",{"fill-rule":"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"})),this.previousButtonText),this.getViewablePages().map((i=>t("li",{class:`page-item page-link user-select-none ${i==="..."?"disabled":Number(i)===this.pageNumber?"active":""}`,style:{cursor:"pointer"},onClick:()=>{if(i!=="..."){this.pageNumber=Number(i)}return false}},i))),t("li",{class:`page-item page-link user-select-none d-flex align-items-center ${!((l=this.newsResponse)===null||l===void 0?void 0:l.links.next)?"disabled":""}`,style:{cursor:"pointer"},onClick:()=>{var i,s;if(((i=this.newsResponse)===null||i===void 0?void 0:i.meta.page.lastPage)&&this.pageNumber<((s=this.newsResponse)===null||s===void 0?void 0:s.meta.page.lastPage)){this.pageNumber+=1}}},this.nextButtonText,t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-chevron-right ms-1 fs-4",style:{width:"1em",height:"1em"},viewBox:"0 0 16 16"},t("path",{"fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"}))))))}getViewablePages(i=2){var s,t,e,l,o,n,a;const h=[];if(this.pageNumber-i>=2){h.push("1")}if(this.pageNumber-i>2){h.push("...")}for(let s=this.pageNumber-i;s<this.pageNumber;s+=1){if(s>=1){h.push(`${s}`)}}h.push(`${this.pageNumber}`);for(let e=this.pageNumber+1;e<=this.pageNumber+i;e+=1){if(e<=((t=(s=this.newsResponse)===null||s===void 0?void 0:s.meta.page.lastPage)!==null&&t!==void 0?t:0)){h.push(`${e}`)}}if(this.pageNumber+i<((l=(e=this.newsResponse)===null||e===void 0?void 0:e.meta.page.lastPage)!==null&&l!==void 0?l:0)-1){h.push("...")}if(this.pageNumber+i<=((n=(o=this.newsResponse)===null||o===void 0?void 0:o.meta.page.lastPage)!==null&&n!==void 0?n:0)-1){h.push(`${(a=this.newsResponse)===null||a===void 0?void 0:a.meta.page.lastPage}`)}return h}};n.style=o;export{n as aico_news_list};
2
+ //# sourceMappingURL=p-7e0074f7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["aicoNewsListCss","AicoNewsList","this","pageSize","connectedCallback","newsListFetchController","AbortController","pageNumber","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","newsResponse","fetchNewsArticles","signal","newsChannels","componentWillUpdate","render","h","Host","class","_a","data","map","article","onArticleClick","e","articleClick","emit","detail","_b","links","prev","style","cursor","onClick","xmlns","fill","width","height","viewBox","d","previousButtonText","getViewablePages","page","Number","_c","next","meta","lastPage","nextButtonText","lookAhead","pages","push","i","_d","_f","_e","_g"],"sources":["src/components/aico-news-list/aico-news-list.css?tag=aico-news-list&encapsulation=scoped","src/components/aico-news-list/aico-news-list.tsx"],"sourcesContent":[null,"import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticles } from '../../utils/utils';\nimport { NewsResponse } from '../../model/NewsResponse';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list',\n styleUrl: 'aico-news-list.css',\n scoped: true,\n})\nexport class AicoNewsList {\n private readonly pageSize = 16;\n\n @State() newsResponse?: NewsResponse;\n\n @State() pageNumber = 1;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() newsChannels: string[] = [];\n\n @Prop() nextButtonText: string = 'Next';\n\n @Prop() previousButtonText: string = 'Previous';\n\n @Event() articleClick?: EventEmitter<Article>;\n\n private api?: AicoApiRequestInfo;\n private newsListFetchController?: AbortController;\n\n connectedCallback() {\n this.newsListFetchController = new AbortController();\n this.pageNumber = 1;\n\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.newsListFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController!.signal, this.newsChannels);\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchNewsArticles(this.api!, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannels);\n }\n\n render() {\n return (\n <Host>\n <div class=\"row row-cols-1 row-cols-sm-2 row-cols-lg-4 g-4 mb-4\">\n {this.newsResponse?.data.map(article => (\n <div class=\"col\">\n <aico-news-list-item\n article={article}\n onArticleClick={e => {\n this.articleClick?.emit(e.detail);\n }}\n />\n </div>\n ))}\n </div>\n <nav class=\"w-100\" aria-label=\"News navigation\">\n <ul class=\"pagination justify-content-center\">\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.prev ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.pageNumber > 1) {\n this.pageNumber -= 1;\n }\n\n return false;\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-left me-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\" />\n </svg>\n {this.previousButtonText}\n </li>\n {this.getViewablePages().map(page => (\n <li\n class={`page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (page !== '...') {\n this.pageNumber = Number(page);\n }\n return false;\n }}\n >\n {page}\n </li>\n ))}\n <li\n class={`page-item page-link user-select-none d-flex align-items-center ${!this.newsResponse?.links.next ? 'disabled' : ''}`}\n style={{ cursor: 'pointer' }}\n onClick={() => {\n if (this.newsResponse?.meta.page.lastPage && this.pageNumber < this.newsResponse?.meta.page.lastPage) {\n this.pageNumber += 1;\n }\n }}\n >\n {this.nextButtonText}\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" class=\"bi bi-chevron-right ms-1 fs-4\" style={{ width: '1em', height: '1em' }} viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\" />\n </svg>\n </li>\n </ul>\n </nav>\n </Host>\n );\n }\n\n private getViewablePages(lookAhead: number = 2) {\n const pages: string[] = [];\n if (this.pageNumber - lookAhead >= 2) {\n pages.push('1');\n }\n\n if (this.pageNumber - lookAhead > 2) {\n pages.push('...');\n }\n\n for (let i = this.pageNumber - lookAhead; i < this.pageNumber; i += 1) {\n if (i >= 1) {\n pages.push(`${i}`);\n }\n }\n\n pages.push(`${this.pageNumber}`);\n for (let i = this.pageNumber + 1; i <= this.pageNumber + lookAhead; i += 1) {\n if (i <= (this.newsResponse?.meta.page.lastPage ?? 0)) {\n pages.push(`${i}`);\n }\n }\n\n if (this.pageNumber + lookAhead < (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push('...');\n }\n\n if (this.pageNumber + lookAhead <= (this.newsResponse?.meta.page.lastPage ?? 0) - 1) {\n pages.push(`${this.newsResponse?.meta.page.lastPage}`);\n }\n\n return pages;\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAkB,G,MCWXC,EAAY,M,oEACNC,KAAAC,SAAW,G,4CAIN,E,wEAMW,G,oBAEA,O,wBAEI,U,CAOrC,iBAAAC,GACEF,KAAKG,wBAA0B,IAAIC,gBACnCJ,KAAKK,WAAa,EAElBL,KAAKM,IAAM,CAAEC,QAASP,KAAKQ,QAASC,YAAaT,KAAKU,gB,CAGxD,oBAAAC,GACEX,KAAKG,wBAAyBS,MAAM,e,CAGtC,uBAAMC,GACJb,KAAKc,mBAAqBC,EAAkBf,KAAKM,IAAMN,KAAKK,WAAYL,KAAKC,SAAUD,KAAKG,wBAAyBa,OAAQhB,KAAKiB,a,CAGpI,yBAAMC,GACJlB,KAAKG,wBAA0B,IAAIC,gBACnCJ,KAAKc,mBAAqBC,EAAkBf,KAAKM,IAAMN,KAAKK,WAAYL,KAAKC,SAAUD,KAAKG,wBAAwBa,OAAQhB,KAAKiB,a,CAGnI,MAAAE,G,UACE,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAM,wDACRC,EAAAvB,KAAKc,gBAAY,MAAAS,SAAA,SAAAA,EAAEC,KAAKC,KAAIC,GAC3BN,EAAA,OAAKE,MAAM,OACTF,EAAA,uBACEM,QAASA,EACTC,eAAgBC,I,OACdL,EAAAvB,KAAK6B,gBAAY,MAAAN,SAAA,SAAAA,EAAEO,KAAKF,EAAEG,OAAO,QAM3CX,EAAA,OAAKE,MAAM,QAAO,aAAY,mBAC5BF,EAAA,MAAIE,MAAM,qCACRF,EAAA,MACEE,MAAO,qEAAmEU,EAAAhC,KAAKc,gBAAY,MAAAkB,SAAA,SAAAA,EAAEC,MAAMC,MAAO,WAAa,KACvHC,MAAO,CAAEC,OAAQ,WACjBC,QAAS,KACP,GAAIrC,KAAKK,WAAa,EAAG,CACvBL,KAAKK,YAAc,C,CAGrB,OAAO,KAAK,GAGde,EAAA,OAAKkB,MAAM,6BAA6BC,KAAK,eAAejB,MAAM,+BAA+Ba,MAAO,CAAEK,MAAO,MAAOC,OAAQ,OAASC,QAAQ,aAC/ItB,EAAA,oBAAgB,UAAUuB,EAAE,0HAE7B3C,KAAK4C,oBAEP5C,KAAK6C,mBAAmBpB,KAAIqB,GAC3B1B,EAAA,MACEE,MAAO,wCAAwCwB,IAAS,MAAQ,WAAaC,OAAOD,KAAU9C,KAAKK,WAAa,SAAW,KAC3H8B,MAAO,CAAEC,OAAQ,WACjBC,QAAS,KACP,GAAIS,IAAS,MAAO,CAClB9C,KAAKK,WAAa0C,OAAOD,E,CAE3B,OAAO,KAAK,GAGbA,KAGL1B,EAAA,MACEE,MAAO,qEAAmE0B,EAAAhD,KAAKc,gBAAY,MAAAkC,SAAA,SAAAA,EAAEf,MAAMgB,MAAO,WAAa,KACvHd,MAAO,CAAEC,OAAQ,WACjBC,QAAS,K,QACP,KAAId,EAAAvB,KAAKc,gBAAY,MAAAS,SAAA,SAAAA,EAAE2B,KAAKJ,KAAKK,WAAYnD,KAAKK,aAAa2B,EAAAhC,KAAKc,gBAAY,MAAAkB,SAAA,SAAAA,EAAEkB,KAAKJ,KAAKK,UAAU,CACpGnD,KAAKK,YAAc,C,IAItBL,KAAKoD,eACNhC,EAAA,OAAKkB,MAAM,6BAA6BC,KAAK,eAAejB,MAAM,gCAAgCa,MAAO,CAAEK,MAAO,MAAOC,OAAQ,OAASC,QAAQ,aAChJtB,EAAA,oBAAgB,UAAUuB,EAAE,8H,CASlC,gBAAAE,CAAiBQ,EAAoB,G,kBAC3C,MAAMC,EAAkB,GACxB,GAAItD,KAAKK,WAAagD,GAAa,EAAG,CACpCC,EAAMC,KAAK,I,CAGb,GAAIvD,KAAKK,WAAagD,EAAY,EAAG,CACnCC,EAAMC,KAAK,M,CAGb,IAAK,IAAIC,EAAIxD,KAAKK,WAAagD,EAAWG,EAAIxD,KAAKK,WAAYmD,GAAK,EAAG,CACrE,GAAIA,GAAK,EAAG,CACVF,EAAMC,KAAK,GAAGC,I,EAIlBF,EAAMC,KAAK,GAAGvD,KAAKK,cACnB,IAAK,IAAImD,EAAIxD,KAAKK,WAAa,EAAGmD,GAAKxD,KAAKK,WAAagD,EAAWG,GAAK,EAAG,CAC1E,GAAIA,KAAMxB,GAAAT,EAAAvB,KAAKc,gBAAY,MAAAS,SAAA,SAAAA,EAAE2B,KAAKJ,KAAKK,YAAQ,MAAAnB,SAAA,EAAAA,EAAI,GAAI,CACrDsB,EAAMC,KAAK,GAAGC,I,EAIlB,GAAIxD,KAAKK,WAAagD,IAAaI,GAAAT,EAAAhD,KAAKc,gBAAY,MAAAkC,SAAA,SAAAA,EAAEE,KAAKJ,KAAKK,YAAQ,MAAAM,SAAA,EAAAA,EAAI,GAAK,EAAG,CAClFH,EAAMC,KAAK,M,CAGb,GAAIvD,KAAKK,WAAagD,KAAcK,GAAAC,EAAA3D,KAAKc,gBAAY,MAAA6C,SAAA,SAAAA,EAAET,KAAKJ,KAAKK,YAAQ,MAAAO,SAAA,EAAAA,EAAI,GAAK,EAAG,CACnFJ,EAAMC,KAAK,IAAGK,EAAA5D,KAAKc,gBAAY,MAAA8C,SAAA,SAAAA,EAAEV,KAAKJ,KAAKK,W,CAG7C,OAAOG,C"}
@@ -0,0 +1,2 @@
1
+ import{r as s,c as i,h as t}from"./p-ae20e789.js";const e="";const r=class{constructor(t){s(this,t);this.articleClick=i(this,"articleClick",7);this.article=undefined}render(){var s,i;return t("div",{class:"card h-100 pe-auto",style:{cursor:"pointer"},onClick:()=>{var s;(s=this.articleClick)===null||s===void 0?void 0:s.emit(this.article)}},t("div",{class:"ratio ratio-16x9 overflow-hidden"},t("img",{class:"object-fit-cover",style:{"min-height":"15rem"},alt:"Article image",src:(i=(s=this.article.attributes.optimizedListImage)!==null&&s!==void 0?s:this.article.attributes.optimizedImage)!==null&&i!==void 0?i:this.article.attributes.image}),t("div",{class:"card-img-overlay d-flex justify-content-end"})),t("div",{class:"card-body"},t("h5",{class:"card-title"},this.article.attributes.name),t("p",{class:"card-text"},this.article.attributes.excerpt)))}};r.style=e;export{r as aico_news_list_item};
2
+ //# sourceMappingURL=p-9ea26390.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["aicoNewsListItemCss","AicoNewsListItem","render","h","class","style","cursor","onClick","_a","this","articleClick","emit","article","alt","src","_b","attributes","optimizedListImage","optimizedImage","image","name","excerpt"],"sources":["src/components/aico-news-list-item/aico-news-list-item.css?tag=aico-news-list-item&encapsulation=scoped","src/components/aico-news-list-item/aico-news-list-item.tsx"],"sourcesContent":[null,"import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list-item',\n styleUrl: 'aico-news-list-item.css',\n scoped: true,\n})\nexport class AicoNewsListItem {\n @Prop() article!: Article;\n\n @Event() articleClick?: EventEmitter<Article>;\n\n render() {\n return (\n <div class=\"card h-100 pe-auto\"\n style={{ cursor: 'pointer' }}\n onClick={() => {\n this.articleClick?.emit(this.article);\n }}>\n <div class=\"ratio ratio-16x9 overflow-hidden\">\n <img\n class=\"object-fit-cover\"\n style={{ 'min-height': '15rem' }}\n alt=\"Article image\"\n src={this.article.attributes.optimizedListImage ?? this.article.attributes.optimizedImage ?? this.article.attributes.image}\n />\n <div class=\"card-img-overlay d-flex justify-content-end\">{/*TODO: set the date top-right?*/}</div>\n </div>\n <div class=\"card-body\">\n <h5 class=\"card-title\">{this.article.attributes.name}</h5>\n <p class=\"card-text\">{this.article.attributes.excerpt}</p>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAsB,G,MCQfC,EAAgB,M,2FAK3B,MAAAC,G,QACE,OACEC,EAAA,OAAKC,MAAM,qBACPC,MAAO,CAAEC,OAAQ,WACjBC,QAAS,K,OACPC,EAAAC,KAAKC,gBAAY,MAAAF,SAAA,SAAAA,EAAEG,KAAKF,KAAKG,QAAQ,GAEzCT,EAAA,OAAKC,MAAM,oCACTD,EAAA,OACEC,MAAM,mBACNC,MAAO,CAAE,aAAc,SACvBQ,IAAI,gBACJC,KAAKC,GAAAP,EAAAC,KAAKG,QAAQI,WAAWC,sBAAkB,MAAAT,SAAA,EAAAA,EAAIC,KAAKG,QAAQI,WAAWE,kBAAc,MAAAH,SAAA,EAAAA,EAAIN,KAAKG,QAAQI,WAAWG,QAEvHhB,EAAA,OAAKC,MAAM,iDAEbD,EAAA,OAAKC,MAAM,aACTD,EAAA,MAAIC,MAAM,cAAcK,KAAKG,QAAQI,WAAWI,MAChDjB,EAAA,KAAGC,MAAM,aAAaK,KAAKG,QAAQI,WAAWK,U"}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i}from"./p-ae20e789.js";import{f as e,a as s}from"./p-2677f2ab.js";const h="";const r=class{constructor(i){t(this,i);this.article=undefined;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.locale="de";this.articleId=undefined;this.articleUrlHandle=undefined}connectedCallback(){this.articleFetchController=new AbortController;this.api={baseApi:this.aicoUrl,bearerToken:this.aicoBearerToken}}disconnectedCallback(){this.articleFetchController.abort("disconnected")}async componentWillLoad(){if(!this.articleId&&!this.articleUrlHandle){throw new Error("Either the article id or the url handle must be provided.")}if(this.articleUrlHandle){this.article=await e(this.api,this.articleUrlHandle,this.articleFetchController.signal);return}this.article=await s(this.api,this.articleId,this.articleFetchController.signal)}render(){return i("aico-article-detail",{article:this.article,locale:this.locale})}};r.style=h;export{r as aico_fetch_article_detail};
2
+ //# sourceMappingURL=p-bccf08d0.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["aicoFetchArticleDetailCss","AicoFetchArticleDetail","connectedCallback","this","articleFetchController","AbortController","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","articleId","articleUrlHandle","Error","article","fetchNewsArticleByHandle","signal","fetchNewsArticle","render","h","locale"],"sources":["src/components/aico-fetch-article-detail/aico-fetch-article-detail.css?tag=aico-fetch-article-detail&encapsulation=scoped","src/components/aico-fetch-article-detail/aico-fetch-article-detail.tsx"],"sourcesContent":[null,"import { Component, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticle, fetchNewsArticleByHandle } from '../../utils/utils';\nimport { Article } from '../../model/Article';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\n\n@Component({\n tag: 'aico-fetch-article-detail',\n styleUrl: 'aico-fetch-article-detail.css',\n scoped: true,\n})\nexport class AicoFetchArticleDetail {\n @State() article!: Article;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() locale: string = 'de';\n\n /**\n * The id will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleId?: string;\n\n /**\n * The url handle will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleUrlHandle?: string;\n\n private api?: AicoApiRequestInfo;\n private articleFetchController?: AbortController;\n\n connectedCallback() {\n this.articleFetchController = new AbortController();\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.articleFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n if (!this.articleId && !this.articleUrlHandle) {\n throw new Error('Either the article id or the url handle must be provided.');\n }\n\n if (this.articleUrlHandle) {\n this.article = await fetchNewsArticleByHandle(this.api!, this.articleUrlHandle, this.articleFetchController!.signal);\n return;\n }\n\n this.article = await fetchNewsArticle(this.api!, this.articleId!, this.articleFetchController!.signal);\n }\n\n render() {\n return <aico-article-detail article={this.article} locale={this.locale} />;\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAA4B,G,MCUrBC,EAAsB,M,kHAOR,K,yDAqBzB,iBAAAC,GACEC,KAAKC,uBAAyB,IAAIC,gBAClCF,KAAKG,IAAM,CAAEC,QAASJ,KAAKK,QAASC,YAAaN,KAAKO,gB,CAGxD,oBAAAC,GACER,KAAKC,uBAAwBQ,MAAM,e,CAGrC,uBAAMC,GACJ,IAAKV,KAAKW,YAAcX,KAAKY,iBAAkB,CAC7C,MAAM,IAAIC,MAAM,4D,CAGlB,GAAIb,KAAKY,iBAAkB,CACzBZ,KAAKc,cAAgBC,EAAyBf,KAAKG,IAAMH,KAAKY,iBAAkBZ,KAAKC,uBAAwBe,QAC7G,M,CAGFhB,KAAKc,cAAgBG,EAAiBjB,KAAKG,IAAMH,KAAKW,UAAYX,KAAKC,uBAAwBe,O,CAGjG,MAAAE,GACE,OAAOC,EAAA,uBAAqBL,QAASd,KAAKc,QAASM,OAAQpB,KAAKoB,Q"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as e}from"./p-ae20e789.js";import{c as i}from"./p-2677f2ab.js";import{j as a}from"./p-86c7fdc7.js";const o=".slick-slide.sc-aico-special-news-carousel>div.sc-aico-special-news-carousel{height:100% !important}";const c=class{constructor(e){t(this,e);this.articleClicked=s(this,"articleClicked",7);this.newsResponse=undefined;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.newsChannels=[];this.numberOfArticles=6}connectedCallback(){this.newsListFetchController=new AbortController;this.api={baseApi:this.aicoUrl,bearerToken:this.aicoBearerToken}}disconnectedCallback(){this.newsListFetchController.abort("disconnected")}async componentWillLoad(){this.newsResponse=await i(this.api,1,this.numberOfArticles,this.newsListFetchController.signal,this.newsChannels)}async componentWillUpdate(){this.newsListFetchController=new AbortController;this.newsResponse=await i(this.api,1,this.numberOfArticles,this.newsListFetchController.signal,this.newsChannels)}componentDidLoad(){a(".carousel").slick({autoplay:true,autoplaySpeed:6e3,dots:true,arrows:false,pauseOnDotsHover:true})}render(){return e("div",{class:"carousel"},this.newsResponse.data.map((t=>{var s;const i=t.attributes.focusXPercentage?`${t.attributes.focusXPercentage}%`:"center";const a=t.attributes.focusYPercentage?`${t.attributes.focusYPercentage}%`:"center";return e("div",{class:"carousel-item card border-0"},e("div",{class:"card-body"},e("h5",{class:"card-title text-center text-uppercase"},e("a",{class:"text-reset text-decoration-none",href:"#",onClick:s=>{var e;s.preventDefault();(e=this.articleClicked)===null||e===void 0?void 0:e.emit(t)}},t.attributes.name))),e("div",{class:"ratio ratio-16x9 mx-auto",style:{"max-width":"50%"}},e("img",{class:"card-img-bottom object-fit-cover",style:{"object-position":`${i} ${a}`,"min-height":"15rem"},alt:"News Picture","data-lazy":(s=t.attributes.optimizedImage)!==null&&s!==void 0?s:t.attributes.image})))})))}};c.style=o;export{c as aico_special_news_carousel};
2
+ //# sourceMappingURL=p-c9eea1b1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["aicoSpecialNewsCarouselCss","AicoSpecialNewsCarousel","connectedCallback","this","newsListFetchController","AbortController","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","newsResponse","fetchSpecialNewsArticles","numberOfArticles","signal","newsChannels","componentWillUpdate","componentDidLoad","$","slick","autoplay","autoplaySpeed","dots","arrows","pauseOnDotsHover","render","h","class","data","map","article","focusX","attributes","focusXPercentage","focusY","focusYPercentage","href","onClick","e","preventDefault","_a","articleClicked","emit","name","style","alt","optimizedImage","image"],"sources":["src/components/aico-special-news-carousel/aico-special-news-carousel.css?tag=aico-special-news-carousel&encapsulation=scoped","src/components/aico-special-news-carousel/aico-special-news-carousel.tsx"],"sourcesContent":[".slick-slide > div {\n height: 100% !important;\n}\n","import { Component, Event, EventEmitter, Prop, State, h } from '@stencil/core';\nimport type { NewsResponse } from '../../model/NewsResponse';\nimport type { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\nimport type { Article } from '../../model/Article';\nimport { fetchSpecialNewsArticles } from '../../utils/utils';\n\nimport $ from 'jquery';\nimport 'slick-carousel';\n\n@Component({\n tag: 'aico-special-news-carousel',\n styleUrl: 'aico-special-news-carousel.css',\n scoped: true,\n})\nexport class AicoSpecialNewsCarousel {\n @State() newsResponse!: NewsResponse;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() newsChannels: string[] = [];\n\n @Prop() numberOfArticles: number = 6;\n\n @Event() articleClicked?: EventEmitter<Article>;\n\n private api?: AicoApiRequestInfo;\n private newsListFetchController?: AbortController;\n\n connectedCallback() {\n this.newsListFetchController = new AbortController();\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.newsListFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.newsResponse = await fetchSpecialNewsArticles(this.api!, 1, this.numberOfArticles, this.newsListFetchController!.signal, this.newsChannels);\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchSpecialNewsArticles(this.api!, 1, this.numberOfArticles, this.newsListFetchController.signal, this.newsChannels);\n }\n\n componentDidLoad() {\n $('.carousel').slick({\n autoplay: true,\n autoplaySpeed: 6000,\n dots: true,\n arrows: false,\n pauseOnDotsHover: true,\n });\n }\n\n render() {\n return (\n <div class=\"carousel\">\n {this.newsResponse.data.map(article => {\n const focusX = article.attributes.focusXPercentage ? `${article.attributes.focusXPercentage}%` : 'center';\n const focusY = article.attributes.focusYPercentage ? `${article.attributes.focusYPercentage}%` : 'center';\n return (\n <div class=\"carousel-item card border-0\">\n <div class=\"card-body\">\n <h5 class=\"card-title text-center text-uppercase\">\n <a\n class=\"text-reset text-decoration-none\"\n href=\"#\"\n onClick={e => {\n e.preventDefault();\n this.articleClicked?.emit(article);\n }}\n >\n {article.attributes.name}\n </a>\n </h5>\n </div>\n <div class=\"ratio ratio-16x9 mx-auto\" style={{ 'max-width': '50%' }}>\n <img\n class=\"card-img-bottom object-fit-cover\"\n style={{ 'object-position': `${focusX} ${focusY}`, 'min-height': '15rem' }}\n alt=\"News Picture\"\n data-lazy={article.attributes.optimizedImage ?? article.attributes.image}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n}\n"],"mappings":"0HAAA,MAAMA,EAA6B,uG,MCctBC,EAAuB,M,4KAOD,G,sBAEE,C,CAOnC,iBAAAC,GACEC,KAAKC,wBAA0B,IAAIC,gBACnCF,KAAKG,IAAM,CAAEC,QAASJ,KAAKK,QAASC,YAAaN,KAAKO,gB,CAGxD,oBAAAC,GACER,KAAKC,wBAAyBQ,MAAM,e,CAGtC,uBAAMC,GACJV,KAAKW,mBAAqBC,EAAyBZ,KAAKG,IAAM,EAAGH,KAAKa,iBAAkBb,KAAKC,wBAAyBa,OAAQd,KAAKe,a,CAGrI,yBAAMC,GACJhB,KAAKC,wBAA0B,IAAIC,gBACnCF,KAAKW,mBAAqBC,EAAyBZ,KAAKG,IAAM,EAAGH,KAAKa,iBAAkBb,KAAKC,wBAAwBa,OAAQd,KAAKe,a,CAGpI,gBAAAE,GACEC,EAAE,aAAaC,MAAM,CACnBC,SAAU,KACVC,cAAe,IACfC,KAAM,KACNC,OAAQ,MACRC,iBAAkB,M,CAItB,MAAAC,GACE,OACEC,EAAA,OAAKC,MAAM,YACR3B,KAAKW,aAAaiB,KAAKC,KAAIC,I,MAC1B,MAAMC,EAASD,EAAQE,WAAWC,iBAAmB,GAAGH,EAAQE,WAAWC,oBAAsB,SACjG,MAAMC,EAASJ,EAAQE,WAAWG,iBAAmB,GAAGL,EAAQE,WAAWG,oBAAsB,SACjG,OACET,EAAA,OAAKC,MAAM,+BACTD,EAAA,OAAKC,MAAM,aACTD,EAAA,MAAIC,MAAM,yCACRD,EAAA,KACEC,MAAM,kCACNS,KAAK,IACLC,QAASC,I,MACPA,EAAEC,kBACFC,EAAAxC,KAAKyC,kBAAc,MAAAD,SAAA,SAAAA,EAAEE,KAAKZ,EAAQ,GAGnCA,EAAQE,WAAWW,QAI1BjB,EAAA,OAAKC,MAAM,2BAA2BiB,MAAO,CAAE,YAAa,QAC1DlB,EAAA,OACEC,MAAM,mCACNiB,MAAO,CAAE,kBAAmB,GAAGb,KAAUG,IAAU,aAAc,SACjEW,IAAI,eAAc,aACPL,EAAAV,EAAQE,WAAWc,kBAAc,MAAAN,SAAA,EAAAA,EAAIV,EAAQE,WAAWe,SAGnE,I"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e52034b7.js');
6
6
  const slick = require('./slick-d0dfbd94.js');
7
- const utils = require('./utils-095ed22b.js');
7
+ const utils = require('./utils-c1b7a052.js');
8
8
 
9
9
  const aicoAlbumContentCss = "";
10
10
 
@@ -80,11 +80,12 @@ const AicoAskingContent = class {
80
80
  constructor(hostRef) {
81
81
  index.registerInstance(this, hostRef);
82
82
  this.content = undefined;
83
+ this.locale = 'de';
83
84
  }
84
85
  render() {
85
- var _a, _b;
86
- const translation = this.content.asking.translations.length > 0 ? this.content.asking.translations[0] : null;
87
- return (index.h("div", { class: "card" }, index.h("div", { class: "card-body" }, index.h("div", { class: "card-text d-block" }, index.h("h1", { class: "card-title" }, "Asking"), index.h("table", { class: "team-table" }, index.h("tbody", null, index.h("tr", { class: "agenda-event" }, index.h("td", null, index.h("h3", null, this.content.asking.startsAt.toLocaleDateString())), index.h("td", null, `${this.content.asking.startTime.toLocaleDateString()} - ${(_b = (_a = this.content.asking.endTime) === null || _a === void 0 ? void 0 : _a.toLocaleDateString()) !== null && _b !== void 0 ? _b : 'N/A'}`), index.h("td", { style: { width: '49%' } }, translation === null || translation === void 0 ? void 0 : translation.title)), index.h("tr", { class: "event-details" }, index.h("td", { colSpan: 3, style: { padding: '0' } }, index.h("table", { class: "more-details-table" }, index.h("tbody", null, index.h("tr", null, index.h("th", null, "Description"), index.h("td", null, this.content.asking.description)), index.h("tr", null, index.h("th", null, "Gathering"), index.h("td", null, this.content.asking.meetingPoint)), index.h("tr", null, index.h("th", null, "Place (Address)"), index.h("td", null, this.content.asking.location)), index.h("tr", null, index.h("th", null, "Asking for"), index.h("td", { style: { 'white-space': 'pre' } }, this.content.asking.recipents)), index.h("tr", null, index.h("th", null, "Clothing / Equipment"), index.h("td", { style: { 'white-space': 'pre' } }, this.content.asking.clothingEquipment)), index.h("tr", null, index.h("th", null, "Provisions"), index.h("td", null, this.content.asking.catering)), index.h("tr", null, index.h("th", null, "Coaching"), index.h("td", null, this.content.asking.coaching))))))))))));
86
+ var _a, _b, _c;
87
+ const translation = (_a = this.content.asking.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
88
+ return (index.h("div", { class: "card" }, index.h("div", { class: "card-body" }, index.h("div", { class: "card-text d-block" }, index.h("h1", { class: "card-title" }, "Asking"), index.h("table", { class: "team-table" }, index.h("tbody", null, index.h("tr", { class: "agenda-event" }, index.h("td", null, index.h("h3", null, this.content.asking.startsAt.toLocaleDateString())), index.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'}`), index.h("td", { style: { width: '49%' } }, translation === null || translation === void 0 ? void 0 : translation.title)), index.h("tr", { class: "event-details" }, index.h("td", { colSpan: 3, style: { padding: '0' } }, index.h("table", { class: "more-details-table" }, index.h("tbody", null, index.h("tr", null, index.h("th", null, "Description"), index.h("td", null, this.content.asking.description)), index.h("tr", null, index.h("th", null, "Gathering"), index.h("td", null, this.content.asking.meetingPoint)), index.h("tr", null, index.h("th", null, "Place (Address)"), index.h("td", null, this.content.asking.location)), index.h("tr", null, index.h("th", null, "Asking for"), index.h("td", { style: { 'white-space': 'pre' } }, this.content.asking.recipents)), index.h("tr", null, index.h("th", null, "Clothing / Equipment"), index.h("td", { style: { 'white-space': 'pre' } }, this.content.asking.clothingEquipment)), index.h("tr", null, index.h("th", null, "Provisions"), index.h("td", null, this.content.asking.catering)), index.h("tr", null, index.h("th", null, "Coaching"), index.h("td", null, this.content.asking.coaching))))))))))));
88
89
  }
89
90
  };
90
91
  AicoAskingContent.style = aicoAskingContentCss;
@@ -99,9 +100,11 @@ const AicoBlockQuoteContent = class {
99
100
  constructor(hostRef) {
100
101
  index.registerInstance(this, hostRef);
101
102
  this.content = undefined;
103
+ this.locale = 'de';
102
104
  }
103
105
  render() {
104
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
106
+ var _a;
107
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
105
108
  return (index.h(ConditionalRender, { condition: translation !== null }, index.h("blockquote", { class: "blockquote", style: { 'background-color': this.content.quotesColor } }, index.h("p", { class: "mb-2", style: { color: this.content.textColor } }, translation.quoteText), index.h("footer", { class: "blockquote-footer ms-2", style: { color: this.content.authorColor } }, translation.quoteAuthorLine))));
106
109
  }
107
110
  };
@@ -113,9 +116,11 @@ const AicoBulletContent = class {
113
116
  constructor(hostRef) {
114
117
  index.registerInstance(this, hostRef);
115
118
  this.content = undefined;
119
+ this.locale = 'de';
116
120
  }
117
121
  render() {
118
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
122
+ var _a;
123
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
119
124
  const styles = new Map();
120
125
  if (this.content.fontSize) {
121
126
  styles.set('font-size', this.content.fontSize);
@@ -123,17 +128,17 @@ const AicoBulletContent = class {
123
128
  if (this.content.fontFamily) {
124
129
  styles.set('font-family', this.content.fontFamily);
125
130
  }
126
- return (index.h("div", { class: "content", style: Object.fromEntries(styles) }, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation) })), index.h("ul", null, this.content.bulletBullets
131
+ return (index.h("div", { class: "content", style: Object.fromEntries(styles) }, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h("ul", null, this.content.bulletBullets
127
132
  .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); })
128
133
  .map(bullet => {
129
134
  if (bullet.translations.length === 0) {
130
135
  return null;
131
136
  }
132
- const translation = bullet.translations[0];
133
- if (utils.strIsNullOrEmptyOrWhitespace(translation.text)) {
137
+ const translation = bullet.translations.find(translation => translation.locale === this.locale);
138
+ if (utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.text)) {
134
139
  return null;
135
140
  }
136
- return index.h("li", null, translation.text);
141
+ return index.h("li", null, translation === null || translation === void 0 ? void 0 : translation.text);
137
142
  }))));
138
143
  }
139
144
  makeTitleContent(translation) {
@@ -157,6 +162,7 @@ const AicoCarouselContent = class {
157
162
  index.registerInstance(this, hostRef);
158
163
  this.content = undefined;
159
164
  this.hasArrows = true;
165
+ this.locale = 'de';
160
166
  }
161
167
  componentDidLoad() {
162
168
  slick.jquery('.carousel').slick({
@@ -169,11 +175,14 @@ const AicoCarouselContent = class {
169
175
  });
170
176
  }
171
177
  render() {
172
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
173
- return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation) })), index.h("div", { class: "carousel" }, this.content.contentCarouselImages
178
+ var _a;
179
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
180
+ return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h("div", { class: "carousel" }, this.content.contentCarouselImages
174
181
  .sort((a, b) => a.order - b.order)
175
182
  .map(content => {
176
- return (index.h("div", { class: "carousel-item card text-bg-dark text-white" }, index.h("div", { class: "ratio ratio-16x9 mx-auto", style: { 'max-width': '50%' } }, index.h("img", { class: "card-img d-block object-fit-cover", alt: "Carousel Picture", "data-lazy": content.picture })), index.h(ConditionalRender, { condition: content.translations.length > 0 && !utils.strIsNullOrEmptyOrWhitespace(content.translations[0].title) }, index.h("div", { class: "card-img-overlay d-flex align-items-end" }, index.h("h5", { class: "card-title text-uppercase" }, content.translations[0].title)))));
183
+ var _a;
184
+ const translation = (_a = content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
185
+ return (index.h("div", { class: "carousel-item card text-bg-dark text-white" }, index.h("div", { class: "ratio ratio-16x9 mx-auto", style: { 'max-width': '50%' } }, index.h("img", { class: "card-img d-block object-fit-cover", alt: "Carousel Picture", "data-lazy": translation === null || translation === void 0 ? void 0 : translation.picture })), index.h(ConditionalRender, { condition: content.translations.length > 0 && !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, index.h("div", { class: "card-img-overlay d-flex align-items-end" }, index.h("h5", { class: "card-title text-uppercase" }, translation === null || translation === void 0 ? void 0 : translation.title)))));
177
186
  }))));
178
187
  }
179
188
  makeTitleContent(translation) {
@@ -195,11 +204,12 @@ const AicoContentCardContent = class {
195
204
  constructor(hostRef) {
196
205
  index.registerInstance(this, hostRef);
197
206
  this.content = undefined;
207
+ this.locale = 'de';
198
208
  }
199
209
  render() {
200
- var _a;
201
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
202
- return (index.h("div", { class: "card", style: { width: '18rem' } }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.picture) }, index.h("img", { class: "card-img-top", alt: "Card picture", src: this.content.picture })), index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, index.h("aico-title-content", { class: "card-title", content: this.makeTitleContent(translation) })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.link) }, index.h("a", { class: "card-link", href: this.content.link, target: "_blank" }, (_a = translation === null || translation === void 0 ? void 0 : translation.linkText) !== null && _a !== void 0 ? _a : 'link')))));
210
+ var _a, _b;
211
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
212
+ return (index.h("div", { class: "card", style: { width: '18rem' } }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.picture) }, index.h("img", { class: "card-img-top", alt: "Card picture", src: this.content.picture })), index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, index.h("aico-title-content", { class: "card-title", content: this.makeTitleContent(translation), locale: this.locale })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.link) }, index.h("a", { class: "card-link", href: this.content.link, target: "_blank" }, (_b = translation === null || translation === void 0 ? void 0 : translation.linkText) !== null && _b !== void 0 ? _b : 'link')))));
203
213
  }
204
214
  makeTitleContent(translation) {
205
215
  var _a;
@@ -221,9 +231,11 @@ const AicoDividerContent = class {
221
231
  constructor(hostRef) {
222
232
  index.registerInstance(this, hostRef);
223
233
  this.content = undefined;
234
+ this.locale = 'de';
224
235
  }
225
236
  render() {
226
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
237
+ var _a;
238
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
227
239
  const isOnlyMargin = translation ? translation.isOnlyMargin : this.content.isOnlyMargin;
228
240
  return index.h(index.Host, null, isOnlyMargin ? index.h("div", { style: { 'padding-top': '40px' } }) : index.h("hr", { style: { margin: '5px' } }));
229
241
  }
@@ -236,10 +248,11 @@ const AicoDocumentContent = class {
236
248
  constructor(hostRef) {
237
249
  index.registerInstance(this, hostRef);
238
250
  this.content = undefined;
251
+ this.locale = 'de';
239
252
  }
240
253
  render() {
241
- var _a;
242
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
254
+ var _a, _b;
255
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
243
256
  const linkStyles = {};
244
257
  const buttonStyles = {};
245
258
  if (this.content.fontSize) {
@@ -262,7 +275,7 @@ const AicoDocumentContent = class {
262
275
  if (this.content.isDocumentDisplayedAsButton && this.content.buttonHoverColor) {
263
276
  buttonStyles['--hover-button-color'] = this.content.buttonHoverColor;
264
277
  }
265
- return (index.h("div", { class: "card" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.picture) }, index.h("img", { class: "card-img-top", alt: "image", src: translation.picture })), index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.link) }, index.h("a", { class: "card-link", style: linkStyles, href: this.content.link }, this.content.link)), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.document) }, index.h("a", { href: translation.document, target: "_blank", style: buttonStyles, class: `card-link align-middle ${this.content.isDocumentDisplayedAsButton ? 'btn button-link' : ''}` }, index.h("i", null, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "24", height: "24", viewBox: "0 0 50 50" }, index.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')))));
278
+ return (index.h("div", { class: "card" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.picture) }, index.h("img", { class: "card-img-top", alt: "image", src: translation.picture })), index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.link) }, index.h("a", { class: "card-link", style: linkStyles, href: this.content.link }, this.content.link)), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.document) }, index.h("a", { href: translation.document, target: "_blank", style: buttonStyles, class: `card-link align-middle ${this.content.isDocumentDisplayedAsButton ? 'btn button-link' : ''}` }, index.h("i", null, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", width: "24", height: "24", viewBox: "0 0 50 50" }, index.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" }))), (_b = translation.title) !== null && _b !== void 0 ? _b : 'File')))));
266
279
  }
267
280
  };
268
281
  AicoDocumentContent.style = aicoDocumentContentCss;
@@ -6537,10 +6550,12 @@ const AicoFaqContent = class {
6537
6550
  constructor(hostRef) {
6538
6551
  index.registerInstance(this, hostRef);
6539
6552
  this.content = undefined;
6553
+ this.locale = 'de';
6540
6554
  }
6541
6555
  render() {
6542
6556
  return (index.h(index.Host, null, index.h("h2", { class: "card-title mb-2" }, "FAQ"), index.h("div", { class: "accordion", id: "aico-faq-accordion" }, this.content.faqItems.map((faqItem, index$1) => {
6543
- const translation = faqItem.translations.length > 0 ? faqItem.translations[0] : null;
6557
+ var _a;
6558
+ const translation = (_a = faqItem.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6544
6559
  if (!translation) {
6545
6560
  return null;
6546
6561
  }
@@ -6556,9 +6571,11 @@ const AicoHeadingContent = class {
6556
6571
  constructor(hostRef) {
6557
6572
  index.registerInstance(this, hostRef);
6558
6573
  this.content = undefined;
6574
+ this.locale = 'de';
6559
6575
  }
6560
6576
  render() {
6561
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6577
+ var _a;
6578
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6562
6579
  const contentStyle = { 'justify-content': this.content.isTextAtMiddleOfImage ? 'center' : 'flex-end' };
6563
6580
  if (!utils.strIsNullOrEmptyOrWhitespace(this.content.picture)) {
6564
6581
  contentStyle['min-height'] = this.content.isImageHeightHalfSize ? '400px' : '600px';
@@ -6578,7 +6595,7 @@ const AicoHeadingContent = class {
6578
6595
  if (!utils.strIsNullOrEmptyOrWhitespace(this.content.textColor)) {
6579
6596
  descriptionStyle['color'] = this.content.textColor;
6580
6597
  }
6581
- return (index.h("div", { class: this.content.isHeadingAlignedWithText ? 'content content-align-with-text' : 'content', style: contentStyle }, index.h(ConditionalRender, { condition: translation !== null }, index.h("div", { class: "title-wrapper", style: titleWrapperStyle }, index.h("aico-title-content", { content: this.makeTitleContent(translation) })), index.h("span", { class: "description", style: descriptionStyle }, translation.description))));
6598
+ return (index.h("div", { class: this.content.isHeadingAlignedWithText ? 'content content-align-with-text' : 'content', style: contentStyle }, index.h(ConditionalRender, { condition: translation !== null }, index.h("div", { class: "title-wrapper", style: titleWrapperStyle }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h("span", { class: "description", style: descriptionStyle }, translation.description))));
6582
6599
  }
6583
6600
  makeTitleContent(translation) {
6584
6601
  var _a;
@@ -6601,12 +6618,12 @@ const AicoHtmlContent = class {
6601
6618
  constructor(hostRef) {
6602
6619
  index.registerInstance(this, hostRef);
6603
6620
  this.content = undefined;
6621
+ this.locale = 'de';
6604
6622
  }
6605
6623
  render() {
6606
- if (this.content.translations.length === 0) {
6607
- return index.h("aico-no-content", null);
6608
- }
6609
- return (index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.translations[0].text) }, index.h("div", { innerHTML: this.content.translations[0].text })));
6624
+ var _a;
6625
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6626
+ return (index.h(ConditionalRender, { condition: translation !== null && !utils.strIsNullOrEmptyOrWhitespace(translation.text) }, index.h("div", { innerHTML: translation.text })));
6610
6627
  }
6611
6628
  };
6612
6629
  AicoHtmlContent.style = aicoHtmlContentCss;
@@ -6617,10 +6634,11 @@ const AicoLinkContent = class {
6617
6634
  constructor(hostRef) {
6618
6635
  index.registerInstance(this, hostRef);
6619
6636
  this.content = undefined;
6637
+ this.locale = 'de';
6620
6638
  }
6621
6639
  render() {
6622
- var _a, _b;
6623
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6640
+ var _a, _b, _c;
6641
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6624
6642
  const buttonLinkStyle = {};
6625
6643
  if (this.content.textButtonColor) {
6626
6644
  buttonLinkStyle['color'] = this.content.textButtonColor;
@@ -6638,7 +6656,7 @@ const AicoLinkContent = class {
6638
6656
  buttonLinkStyle['--hover-button-color'] = this.content.hoverColor;
6639
6657
  }
6640
6658
  return (index.h(index.Host, null, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, index.h("label", null, translation === null || translation === void 0 ? void 0 :
6641
- translation.title, ": ")), index.h(ConditionalRender, { condition: this.content.isImageLink !== undefined && this.content.isImageLink }, index.h("div", { class: "image-link-wrapper", style: { 'justify-content': this.content.picturePosition } }, index.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%' : utils.getImageWidthPrc(this.content.pictureSize) } }, index.h("img", { src: translation === null || translation === void 0 ? void 0 : translation.imageUrl })))), index.h(ConditionalRender, { condition: this.content.isImageLink === null || !this.content.isImageLink }, index.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 }, index.h("span", { class: "arrow-button" }, " \u2192")))));
6659
+ translation.title, ": ")), index.h(ConditionalRender, { condition: this.content.isImageLink !== undefined && this.content.isImageLink }, index.h("div", { class: "image-link-wrapper", style: { 'justify-content': this.content.picturePosition } }, index.h("a", { href: (_b = translation === null || translation === void 0 ? void 0 : translation.link) !== null && _b !== void 0 ? _b : '#', target: "_blank", class: "image-link", style: { width: this.content.isImageFullSize ? '100%' : utils.getImageWidthPrc(this.content.pictureSize) } }, index.h("img", { src: translation === null || translation === void 0 ? void 0 : translation.imageUrl })))), index.h(ConditionalRender, { condition: this.content.isImageLink === null || !this.content.isImageLink }, index.h("a", { href: (_c = translation === null || translation === void 0 ? void 0 : translation.link) !== null && _c !== void 0 ? _c : '#', target: "_blank", class: this.content.isButtonLink ? 'button-link' : '', style: buttonLinkStyle }, index.h("span", { class: "arrow-button" }, " \u2192")))));
6642
6660
  }
6643
6661
  };
6644
6662
  AicoLinkContent.style = aicoLinkContentCss;
@@ -6670,15 +6688,16 @@ const AicoPageContent = class {
6670
6688
  index.registerInstance(this, hostRef);
6671
6689
  this.pageClicked = index.createEvent(this, "pageClicked", 7);
6672
6690
  this.content = undefined;
6691
+ this.locale = 'de';
6673
6692
  }
6674
6693
  render() {
6675
- var _a, _b, _c, _d;
6676
- const translation = this.content.landingPage.translations.length > 0 ? this.content.landingPage.translations[0] : null;
6677
- return (index.h(index.Host, { style: { 'max-width': '300px' } }, index.h("div", { class: "card pe-auto" }, index.h("div", { class: "ratio ratio-4x3" }, index.h("img", { class: "card-img-top img-fluid object-fit-cover", style: { 'object-position': 'center' }, src: (_a = this.content.landingPage.image) !== null && _a !== void 0 ? _a : 'https://cdn.shopify.com/s/files/1/0565/2201/4813/files/blank-img.png?v=13432316686103745237%20406w', alt: (_b = translation === null || translation === void 0 ? void 0 : translation.imageAlt) !== null && _b !== void 0 ? _b : 'Landing page image' })), index.h("div", { class: "card-body", style: { 'min-height': '6rem' } }, index.h("h5", { class: "card-title" }, translation === null || translation === void 0 ? void 0 : translation.name), index.h(ConditionalRender, { condition: this.content.openExternalLink && !utils.strIsNullOrEmptyOrWhitespace(this.content.externalLink) }, index.h("a", { href: this.content.externalLink, class: "card-link" }, (_c = translation === null || translation === void 0 ? void 0 : translation.buttonText) !== null && _c !== void 0 ? _c : 'Navigate to page')), index.h(ConditionalRender, { condition: !this.content.openExternalLink }, index.h("a", { href: "#", class: "card-link", onClick: e => {
6694
+ var _a, _b, _c, _d, _e;
6695
+ const translation = (_a = this.content.landingPage.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6696
+ return (index.h(index.Host, { style: { 'max-width': '300px' } }, index.h("div", { class: "card pe-auto" }, index.h("div", { class: "ratio ratio-4x3" }, index.h("img", { class: "card-img-top img-fluid object-fit-cover", style: { 'object-position': 'center' }, src: (_b = this.content.landingPage.image) !== null && _b !== void 0 ? _b : 'https://cdn.shopify.com/s/files/1/0565/2201/4813/files/blank-img.png?v=13432316686103745237%20406w', alt: (_c = translation === null || translation === void 0 ? void 0 : translation.imageAlt) !== null && _c !== void 0 ? _c : 'Landing page image' })), index.h("div", { class: "card-body", style: { 'min-height': '6rem' } }, index.h("h5", { class: "card-title" }, translation === null || translation === void 0 ? void 0 : translation.name), index.h(ConditionalRender, { condition: this.content.openExternalLink && !utils.strIsNullOrEmptyOrWhitespace(this.content.externalLink) }, index.h("a", { href: this.content.externalLink, class: "card-link" }, (_d = translation === null || translation === void 0 ? void 0 : translation.buttonText) !== null && _d !== void 0 ? _d : 'Navigate to page')), index.h(ConditionalRender, { condition: !this.content.openExternalLink }, index.h("a", { href: "#", class: "card-link", onClick: e => {
6678
6697
  var _a;
6679
6698
  e.preventDefault();
6680
6699
  (_a = this.pageClicked) === null || _a === void 0 ? void 0 : _a.emit(this.content);
6681
- } }, (_d = translation === null || translation === void 0 ? void 0 : translation.buttonText) !== null && _d !== void 0 ? _d : 'Navigate to page'))), index.h(ConditionalRender, { condition: translation !== null && !utils.strIsNullOrEmptyOrWhitespace(translation.excerpt) }, index.h("div", { class: "card-footer" }, index.h("small", { class: "text-muted" }, translation === null || translation === void 0 ? void 0 : translation.excerpt))))));
6700
+ } }, (_e = translation === null || translation === void 0 ? void 0 : translation.buttonText) !== null && _e !== void 0 ? _e : 'Navigate to page'))), index.h(ConditionalRender, { condition: translation !== null && !utils.strIsNullOrEmptyOrWhitespace(translation.excerpt) }, index.h("div", { class: "card-footer" }, index.h("small", { class: "text-muted" }, translation === null || translation === void 0 ? void 0 : translation.excerpt))))));
6682
6701
  }
6683
6702
  };
6684
6703
  AicoPageContent.style = aicoPageContentCss;
@@ -6689,17 +6708,19 @@ const AicoTableContent = class {
6689
6708
  constructor(hostRef) {
6690
6709
  index.registerInstance(this, hostRef);
6691
6710
  this.content = undefined;
6711
+ this.locale = 'de';
6692
6712
  }
6693
6713
  render() {
6694
- var _a, _b;
6695
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6696
- const firstBackgroundColor = (_a = this.content.firstColor) !== null && _a !== void 0 ? _a : '#d6dfe1';
6697
- const secondBackgroundColor = (_b = this.content.secondColor) !== null && _b !== void 0 ? _b : '#e6eced';
6698
- return (index.h("div", { class: "content-table card" }, index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { class: "card-title mt-0", content: this.makeTitleContent(translation) }), index.h("p", { class: "card-text" }, translation.additionalText)), index.h("table", { class: "table-content" }, this.content.tableRows
6714
+ var _a, _b, _c;
6715
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6716
+ const firstBackgroundColor = (_b = this.content.firstColor) !== null && _b !== void 0 ? _b : '#d6dfe1';
6717
+ const secondBackgroundColor = (_c = this.content.secondColor) !== null && _c !== void 0 ? _c : '#e6eced';
6718
+ return (index.h("div", { class: "content-table card" }, index.h("div", { class: "card-body" }, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { class: "card-title mt-0", content: this.makeTitleContent(translation), locale: this.locale }), index.h("p", { class: "card-text" }, translation.additionalText)), index.h("table", { class: "table-content" }, this.content.tableRows
6699
6719
  .sort((a, b) => a.sort - b.sort)
6700
6720
  .map((row, index$1) => {
6701
6721
  return (index.h("tr", { style: { 'font-weight': '400', 'background-color': index$1 % 2 === 0 ? firstBackgroundColor : secondBackgroundColor } }, row.rowColumns.map(col => {
6702
- const translation = col.translations.length > 0 ? col.translations[0] : null;
6722
+ var _a;
6723
+ const translation = (_a = col.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6703
6724
  if (!translation) {
6704
6725
  return row.isHeading ? index.h("th", null) : index.h("td", null);
6705
6726
  }
@@ -6746,17 +6767,15 @@ const AicoTextContent = class {
6746
6767
  constructor(hostRef) {
6747
6768
  index.registerInstance(this, hostRef);
6748
6769
  this.content = undefined;
6770
+ this.locale = 'de';
6749
6771
  }
6750
6772
  render() {
6751
- var _a, _b, _c;
6752
- if (this.content.translations.length === 0) {
6753
- return index.h("aico-no-content", null);
6754
- }
6755
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6773
+ var _a, _b, _c, _d;
6774
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6756
6775
  const contentStyles = {};
6757
6776
  if (this.content.hasBackgroundColor) {
6758
- contentStyles['background-color'] = (_a = this.content.backgroundColor) !== null && _a !== void 0 ? _a : 'white';
6759
- contentStyles['color'] = (_b = this.content.textColor) !== null && _b !== void 0 ? _b : 'black';
6777
+ contentStyles['background-color'] = (_b = this.content.backgroundColor) !== null && _b !== void 0 ? _b : 'white';
6778
+ contentStyles['color'] = (_c = this.content.textColor) !== null && _c !== void 0 ? _c : 'black';
6760
6779
  contentStyles['width'] = '100%';
6761
6780
  contentStyles['padding'] = '15px';
6762
6781
  contentStyles['margin-top'] = '10px';
@@ -6767,9 +6786,9 @@ const AicoTextContent = class {
6767
6786
  }
6768
6787
  if (this.content.alignmentEnabled) {
6769
6788
  contentStyles['display'] = 'flex';
6770
- contentStyles['align-items'] = (_c = this.content.verticalAlign) !== null && _c !== void 0 ? _c : 'flex-start';
6789
+ contentStyles['align-items'] = (_d = this.content.verticalAlign) !== null && _d !== void 0 ? _d : 'flex-start';
6771
6790
  }
6772
- return (index.h(ConditionalRender, { condition: translation !== null }, index.h(ConditionalWrap, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation.promptText), wrap: children => (index.h("div", { class: "accordion", id: "aico-text-content" }, index.h("div", { class: "accordion-item" }, index.h("h2", { class: "accordion-header", id: "heading" }, index.h("button", { class: "accordion-button collapsed", type: "button", "data-bs-toggle": "collapse", "data-bs-target": "#collapse", "aria-expanded": "false", "aria-controls": "collapse" }, translation.promptText)), index.h("div", { id: "collapse", class: "accordion-collapse collapse", "aria-labelledby": "heading", "data-bs-parent": "#aico-text-content" }, index.h("div", { class: "accordion-body" }, children))))) }, index.h("div", { class: "card", style: contentStyles }, index.h("div", { class: "card-body w-100 border-0" }, index.h("aico-title-content", { class: "card-title", content: this.makeTitleContent(translation) }), index.h(ConditionalRender, { condition: this.shouldDisplayTextAndPicture(translation) }, index.h("div", { class: "row g-4" }, index.h("div", { class: utils.getClass({
6791
+ return (index.h(ConditionalRender, { condition: translation !== null }, index.h(ConditionalWrap, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation.promptText), wrap: children => (index.h("div", { class: "accordion", id: "aico-text-content" }, index.h("div", { class: "accordion-item" }, index.h("h2", { class: "accordion-header", id: "heading" }, index.h("button", { class: "accordion-button collapsed", type: "button", "data-bs-toggle": "collapse", "data-bs-target": "#collapse", "aria-expanded": "false", "aria-controls": "collapse" }, translation.promptText)), index.h("div", { id: "collapse", class: "accordion-collapse collapse", "aria-labelledby": "heading", "data-bs-parent": "#aico-text-content" }, index.h("div", { class: "accordion-body" }, children))))) }, index.h("div", { class: "card", style: contentStyles }, index.h("div", { class: "card-body w-100 border-0" }, index.h("aico-title-content", { class: "card-title", content: this.makeTitleContent(translation), locale: this.locale }), index.h(ConditionalRender, { condition: this.shouldDisplayTextAndPicture(translation) }, index.h("div", { class: "row g-4" }, index.h("div", { class: utils.getClass({
6773
6792
  'col-md-8': true,
6774
6793
  'order-1': this.content.picturePosition === 'right',
6775
6794
  'order-2': this.content.picturePosition === 'left',
@@ -6831,11 +6850,13 @@ const AicoUploadContent = class {
6831
6850
  constructor(hostRef) {
6832
6851
  index.registerInstance(this, hostRef);
6833
6852
  this.content = undefined;
6853
+ this.locale = 'de';
6834
6854
  }
6835
6855
  render() {
6836
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6856
+ var _a;
6857
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6837
6858
  const youtubeUrl = this.content && this.content.videoUrl ? utils.getYoutubeURL(this.content.videoUrl) : null;
6838
- return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation) })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(youtubeUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), index.h(ConditionalRender, { condition: !this.content.shouldHideFile }, index.h("p", { class: "fs-3 mt-3" }, "Files:"), index.h("div", { class: "list-group list-group-flush" }, this.content.uploads.map(upload => {
6859
+ return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(youtubeUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), index.h(ConditionalRender, { condition: !this.content.shouldHideFile }, index.h("p", { class: "fs-3 mt-3" }, "Files:"), index.h("div", { class: "list-group list-group-flush" }, this.content.uploads.map(upload => {
6839
6860
  if (utils.strIsNullOrEmptyOrWhitespace(upload.path)) {
6840
6861
  return null;
6841
6862
  }
@@ -6861,11 +6882,13 @@ const AicoVideoContent = class {
6861
6882
  constructor(hostRef) {
6862
6883
  index.registerInstance(this, hostRef);
6863
6884
  this.content = undefined;
6885
+ this.locale = 'de';
6864
6886
  }
6865
6887
  render() {
6866
- const translation = this.content.translations.length > 0 ? this.content.translations[0] : null;
6888
+ var _a;
6889
+ const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
6867
6890
  const youtubeUrl = translation && translation.videoUrl ? utils.getYoutubeURL(translation.videoUrl) : null;
6868
- return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation) })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(youtubeUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.localVideoUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("video", { class: "media-card-video", controls: true, playsInline: true, style: { height: this.content.isVideoMinimized ? '400px' : '100%' } }, index.h("source", { src: this.content.localVideoUrl, type: "video/mp4" }))))));
6891
+ return (index.h(index.Host, null, index.h(ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(youtubeUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("iframe", { allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, src: youtubeUrl }))), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.localVideoUrl) }, index.h("div", { class: "ratio ratio-16x9" }, index.h("video", { class: "media-card-video", controls: true, playsInline: true, style: { height: this.content.isVideoMinimized ? '400px' : '100%' } }, index.h("source", { src: this.content.localVideoUrl, type: "video/mp4" }))))));
6869
6892
  }
6870
6893
  makeTitleContent(translation) {
6871
6894
  var _a;