@aiconomy/aico-components 0.0.95 → 0.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +671 -32
- package/dist/aico-components/aico-components.esm.js +1 -1
- package/dist/aico-components/aico-components.esm.js.map +1 -1
- package/dist/aico-components/p-34bd96ca.js +2 -0
- package/dist/aico-components/p-34bd96ca.js.map +1 -0
- package/dist/aico-components/p-7f6fcb2e.entry.js +2 -0
- package/dist/aico-components/p-7f6fcb2e.entry.js.map +1 -0
- package/dist/aico-components/p-a4f7ae53.entry.js +2 -0
- package/dist/aico-components/p-a4f7ae53.entry.js.map +1 -0
- package/dist/aico-components/p-b61bc8e9.entry.js +2 -0
- package/dist/aico-components/p-b61bc8e9.entry.js.map +1 -0
- package/dist/aico-components/{p-7ea04e72.entry.js → p-b9bc0400.entry.js} +3 -3
- package/dist/aico-components/p-b9bc0400.entry.js.map +1 -0
- package/dist/aico-components/p-bf3db54a.entry.js +2 -0
- package/dist/aico-components/p-bf3db54a.entry.js.map +1 -0
- package/dist/aico-components/p-e187bbea.js +2 -0
- package/dist/aico-components/p-e187bbea.js.map +1 -0
- package/dist/cjs/ConditionalRender-52579540.js +9 -0
- package/dist/cjs/ConditionalRender-52579540.js.map +1 -0
- package/dist/cjs/aico-album-content_19.cjs.entry.js +22 -25
- package/dist/cjs/aico-album-content_19.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-article-detail.cjs.entry.js +11 -1
- package/dist/cjs/aico-article-detail.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-components.cjs.js +1 -1
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js +4 -2
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-news-list.cjs.entry.js +7 -4
- package/dist/cjs/aico-news-list.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js +6 -3
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-9ae3486f.js → utils-3d8a97f6.js} +16 -9
- package/dist/cjs/utils-3d8a97f6.js.map +1 -0
- package/dist/collection/components/aico-article-detail/aico-article-detail.js +48 -2
- package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js +42 -4
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js +78 -9
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +58 -7
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
- package/dist/collection/model/Article.js.map +1 -1
- package/dist/collection/model/NewsTag.js +2 -0
- package/dist/collection/model/NewsTag.js.map +1 -0
- package/dist/collection/utils/utils.js +15 -8
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/aico-article-detail2.js +14 -2
- package/dist/components/aico-article-detail2.js.map +1 -1
- package/dist/components/aico-fetch-article-detail.js +5 -1
- package/dist/components/aico-fetch-article-detail.js.map +1 -1
- package/dist/components/aico-news-list.js +10 -3
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/components/aico-special-news-carousel.js +8 -2
- package/dist/components/aico-special-news-carousel.js.map +1 -1
- package/dist/components/utils.js +15 -8
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/ConditionalRender-7460c386.js +7 -0
- package/dist/esm/ConditionalRender-7460c386.js.map +1 -0
- package/dist/esm/aico-album-content_19.entry.js +2 -5
- package/dist/esm/aico-album-content_19.entry.js.map +1 -1
- package/dist/esm/aico-article-detail.entry.js +11 -1
- package/dist/esm/aico-article-detail.entry.js.map +1 -1
- package/dist/esm/aico-components.js +1 -1
- package/dist/esm/aico-fetch-article-detail.entry.js +4 -2
- package/dist/esm/aico-fetch-article-detail.entry.js.map +1 -1
- package/dist/esm/aico-news-list.entry.js +7 -4
- package/dist/esm/aico-news-list.entry.js.map +1 -1
- package/dist/esm/aico-special-news-carousel.entry.js +6 -3
- package/dist/esm/aico-special-news-carousel.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-25eef7c7.js → utils-f81eb958.js} +16 -9
- package/dist/esm/utils-f81eb958.js.map +1 -0
- package/dist/types/components/aico-article-detail/aico-article-detail.d.ts +13 -0
- package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.d.ts +19 -0
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +36 -1
- package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.d.ts +29 -0
- package/dist/types/components.d.ts +172 -0
- package/dist/types/model/Article.d.ts +2 -1
- package/dist/types/model/NewsTag.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +2 -2
- package/package.json +2 -3
- package/dist/aico-components/p-19752961.entry.js +0 -2
- package/dist/aico-components/p-19752961.entry.js.map +0 -1
- package/dist/aico-components/p-59bfd021.js +0 -2
- package/dist/aico-components/p-59bfd021.js.map +0 -1
- package/dist/aico-components/p-7ea04e72.entry.js.map +0 -1
- package/dist/aico-components/p-80cb133a.entry.js +0 -2
- package/dist/aico-components/p-80cb133a.entry.js.map +0 -1
- package/dist/aico-components/p-918b9928.entry.js +0 -2
- package/dist/aico-components/p-918b9928.entry.js.map +0 -1
- package/dist/aico-components/p-c900f292.entry.js +0 -2
- package/dist/aico-components/p-c900f292.entry.js.map +0 -1
- package/dist/cjs/utils-9ae3486f.js.map +0 -1
- package/dist/esm/utils-25eef7c7.js.map +0 -1
- package/docs/components/aico-article-detail/readme.md +0 -83
- package/docs/components/aico-fetch-article-detail/readme.md +0 -63
- package/docs/components/aico-news-list/readme.md +0 -41
- package/docs/components/aico-news-list-item/readme.md +0 -37
- package/docs/components/aico-special-news-carousel/readme.md +0 -27
- package/docs/components/content/aico-album-content/readme.md +0 -30
- package/docs/components/content/aico-asking-content/readme.md +0 -31
- package/docs/components/content/aico-asking-list-content/readme.md +0 -10
- package/docs/components/content/aico-block-quote-content/readme.md +0 -31
- package/docs/components/content/aico-bullet-content/readme.md +0 -37
- package/docs/components/content/aico-carousel-content/readme.md +0 -38
- package/docs/components/content/aico-collection-content/readme.md +0 -10
- package/docs/components/content/aico-content-card-content/readme.md +0 -37
- package/docs/components/content/aico-divider-content/readme.md +0 -31
- package/docs/components/content/aico-document-content/readme.md +0 -31
- package/docs/components/content/aico-faq-content/readme.md +0 -31
- package/docs/components/content/aico-heading-content/readme.md +0 -37
- package/docs/components/content/aico-html-content/readme.md +0 -31
- package/docs/components/content/aico-link-content/readme.md +0 -31
- package/docs/components/content/aico-news-content/readme.md +0 -37
- package/docs/components/content/aico-no-content/readme.md +0 -23
- package/docs/components/content/aico-page-content/readme.md +0 -38
- package/docs/components/content/aico-table-content/readme.md +0 -37
- package/docs/components/content/aico-testimonial-content/readme.md +0 -30
- package/docs/components/content/aico-text-content/readme.md +0 -37
- package/docs/components/content/aico-title-content/readme.md +0 -52
- package/docs/components/content/aico-upload-content/readme.md +0 -37
- package/docs/components/content/aico-video-content/readme.md +0 -37
|
@@ -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-e187bbea.js";const o="";const n=class{constructor(t){i(this,t);this.articleClick=s(this,"articleClick",7);this.newsResponse=undefined;this.pageNumber=1;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.newsChannels=[];this.newsSellerIds=[];this.newsBrandIds=[];this.newsLanguageLocales=[];this.pageSize=16;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,this.newsSellerIds,this.newsBrandIds,this.newsLanguageLocales)}async componentWillUpdate(){this.newsListFetchController=new AbortController;this.newsResponse=await l(this.api,this.pageNumber,this.pageSize,this.newsListFetchController.signal,this.newsChannels,this.newsSellerIds,this.newsBrandIds,this.newsLanguageLocales)}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,h;const a=[];if(this.pageNumber-i>=2){a.push("1")}if(this.pageNumber-i>2){a.push("...")}for(let s=this.pageNumber-i;s<this.pageNumber;s+=1){if(s>=1){a.push(`${s}`)}}a.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)){a.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){a.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){a.push(`${(h=this.newsResponse)===null||h===void 0?void 0:h.meta.page.lastPage}`)}return a}};n.style=o;export{n as aico_news_list};
|
|
2
|
+
//# sourceMappingURL=p-bf3db54a.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aicoNewsListCss","AicoNewsList","connectedCallback","this","newsListFetchController","AbortController","pageNumber","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","newsResponse","fetchNewsArticles","pageSize","signal","newsChannels","newsSellerIds","newsBrandIds","newsLanguageLocales","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 @State() newsResponse?: NewsResponse;\n\n @State() pageNumber = 1;\n\n /**\n * The url of the Aico Api that will be used to retrieve the article.\n */\n @Prop() aicoUrl!: string;\n\n /**\n * The token used to authenticate against he Aico Api.\n */\n @Prop() aicoBearerToken!: string;\n\n /**\n * Channel names used to filter the results.\n */\n @Prop() newsChannels: string[] = [];\n\n /**\n * Sellers used to filter the results.\n */\n @Prop() newsSellerIds: string[] = [];\n\n /**\n * Brands used to filter the results.\n */\n @Prop() newsBrandIds: string[] = [];\n\n /**\n * Language locales used to filter the results.\n */\n @Prop() newsLanguageLocales: string[] = [];\n\n /**\n * The page size. Prefer this number to be even.\n */\n @Prop() pageSize: number = 16;\n\n /**\n * The text used by the next button in the pagination component.\n */\n @Prop() nextButtonText: string = 'Next';\n\n /**\n * The text used by the previous button in the pagination component.\n */\n @Prop() previousButtonText: string = 'Previous';\n\n /**\n * Event emitted when a user clicks an article.\n *\n * The handler receives the entire Article entity.\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(\n this.api!,\n this.pageNumber,\n this.pageSize,\n this.newsListFetchController!.signal,\n this.newsChannels,\n this.newsSellerIds,\n this.newsBrandIds,\n this.newsLanguageLocales,\n );\n }\n\n async componentWillUpdate(): Promise<void> {\n this.newsListFetchController = new AbortController();\n this.newsResponse = await fetchNewsArticles(\n this.api!,\n this.pageNumber,\n this.pageSize,\n this.newsListFetchController.signal,\n this.newsChannels,\n this.newsSellerIds,\n this.newsBrandIds,\n this.newsLanguageLocales,\n );\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":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=e=>{const t=new Headers;t.append("Accept","application/vnd.api+json");t.append("Authorization",`Bearer ${e}`);return t};const t=(t,n,r,a)=>new Request(new URL(`${n}?${r.toString()}`,t.baseApi),{headers:e(t.bearerToken),signal:a});function n(e,t,n){for(const r of n){e.append(t,r)}}async function r(e,r,a,s,c=[],i=[],u=[],l=[]){const o=new URLSearchParams;o.set("page[number]",String(r));o.set("page[size]",String(a));o.set("sort","-publishDate");o.set("filter[isActive]","1");o.set("filter[excludeTag][]","Eisnull");n(o,"filter[channel][]",c);n(o,"filter[sellerIds][]",i);n(o,"filter[brandId][]",u);n(o,"filter[newsLanguage][]",l);const f=t(e,"news",o,s);const w=await fetch(f);return await w.json()}async function a(e,r,a,s,c=[],i=[],u=[],l=[]){const o=new URLSearchParams;o.set("page[number]",String(r));o.set("page[size]",String(a));o.set("sort","-publishDate");o.set("filter[isActive]","1");o.set("filter[isSpecialArticle]","1");o.set("filter[isLightVersion]","true");o.set("filter[excludeTag][]","Eisnull");n(o,"filter[channel][]",c);n(o,"filter[sellerIds][]",i);n(o,"filter[brandId][]",u);n(o,"filter[newsLanguage][]",l);const f=t(e,"news",o,s);const w=await fetch(f);return await w.json()}async function s(e,n,r){const a=t(e,`news/${n}`,new URLSearchParams,r);const s=await fetch(a);const c=await s.json();return c.data}async function c(e,n,r){const a=new URLSearchParams;a.set("filter[urlHandle]",n);const s=t(e,"news",a,r);const c=await fetch(s);const i=await c.json();return i.data[0]}function i(e){switch(e){case"extra-small":return"28%";case"small":return"40%";case"large":return"80%";case"extra large":return"100%";default:return"60%"}}function u(e){const t=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;const n=e.match(t);if(n&&n[1].length==11){return`https://www.youtube.com/embed/${n[1]}`}return null}function l(e){if(!e||e===" "){return true}return false}function o(e){const t=[];for(const n of Object.entries(e)){if(n[1]){t.push(n[0])}}return t.join(" ")}export{s as a,r as b,a as c,o as d,u as e,c as f,i as g,l as s};
|
|
2
|
+
//# sourceMappingURL=p-e187bbea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getAuthenticatedHeaders","bearerToken","headers","Headers","append","getAuthenticatedRequest","api","route","query","signal","Request","URL","toString","baseApi","setArrayFilter","queryParams","key","values","value","async","fetchNewsArticles","page","size","newsChannels","newsSellerIds","newsBrandIds","newsLanguageLocales","URLSearchParams","set","String","request","response","fetch","json","fetchSpecialNewsArticles","fetchNewsArticle","articleId","article","data","fetchNewsArticleByHandle","urlHandle","articles","getImageWidthPrc","pictureSize","getYoutubeURL","url","regExp","match","length","strIsNullOrEmptyOrWhitespace","str","getClass","conditions","classes","kvp","Object","entries","push","join"],"sources":["src/model/AicoApiRequestInfo.ts","src/utils/utils.ts"],"sourcesContent":["export type AicoApiRequestInfo = {\n baseApi: string;\n bearerToken: string;\n};\n\nexport const getAuthenticatedHeaders = (bearerToken: string): Headers => {\n const headers = new Headers();\n headers.append('Accept', 'application/vnd.api+json');\n headers.append('Authorization', `Bearer ${bearerToken}`);\n return headers;\n};\n\nexport const getAuthenticatedRequest = (api: AicoApiRequestInfo, route: string, query: URLSearchParams, signal?: AbortSignal): Request => {\n return new Request(new URL(`${route}?${query.toString()}`, api.baseApi), {\n headers: getAuthenticatedHeaders(api.bearerToken),\n signal,\n });\n};\n","import { Article } from '../components';\nimport { AicoApiRequestInfo, getAuthenticatedHeaders, getAuthenticatedRequest } from '../model/AicoApiRequestInfo';\nimport { NewsResponse } from '../model/NewsResponse';\n\nfunction setArrayFilter(queryParams: URLSearchParams, key: string, values: string[]) {\n for (const value of values) {\n queryParams.append(key, value);\n }\n}\n\nexport async function fetchNewsArticles(\n api: AicoApiRequestInfo,\n page: number,\n size: number,\n signal: AbortSignal,\n newsChannels: string[] = [],\n newsSellerIds: string[] = [],\n newsBrandIds: string[] = [],\n newsLanguageLocales: string[] = [],\n): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n setArrayFilter(queryParams, 'filter[channel][]', newsChannels);\n setArrayFilter(queryParams, 'filter[sellerIds][]', newsSellerIds);\n setArrayFilter(queryParams, 'filter[brandId][]', newsBrandIds);\n setArrayFilter(queryParams, 'filter[newsLanguage][]', newsLanguageLocales);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchSpecialNewsArticles(\n api: AicoApiRequestInfo,\n page: number,\n size: number,\n signal: AbortSignal,\n newsChannels: string[] = [],\n newsSellerIds: string[] = [],\n newsBrandIds: string[] = [],\n newsLanguageLocales: string[] = [],\n): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('sort', '-publishDate');\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[isSpecialArticle]', '1');\n queryParams.set('filter[isLightVersion]', 'true');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n setArrayFilter(queryParams, 'filter[channel][]', newsChannels);\n setArrayFilter(queryParams, 'filter[sellerIds][]', newsSellerIds);\n setArrayFilter(queryParams, 'filter[brandId][]', newsBrandIds);\n setArrayFilter(queryParams, 'filter[newsLanguage][]', newsLanguageLocales);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article> {\n const request = getAuthenticatedRequest(api, `news/${articleId}`, new URLSearchParams(), signal);\n const response = await fetch(request);\n const article = await response.json();\n return article.data;\n}\n\nexport async function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article> {\n const queryParams = new URLSearchParams();\n queryParams.set('filter[urlHandle]', urlHandle);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n const articles = await response.json();\n return articles.data[0];\n}\n\nexport async function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article> {\n const request = new Request(new URL(url), {\n headers: getAuthenticatedHeaders(bearerToken),\n signal,\n });\n const response = await fetch(request);\n return await response.json();\n}\n\nexport function getImageWidthPrc(pictureSize?: string): string {\n switch (pictureSize) {\n case 'extra-small':\n return '28%';\n case 'small':\n return '40%';\n case 'large':\n return '80%';\n case 'extra large': // TODO: has - or not?\n return '100%';\n default:\n return '60%';\n }\n}\n\nexport function getYoutubeURL(url: string): string | null {\n const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#&?]*).*/;\n const match = url.match(regExp);\n if (match && match[1].length == 11) {\n return `https://www.youtube.com/embed/${match[1]}`;\n }\n\n return null;\n}\n\nexport function strIsNullOrEmptyOrWhitespace(str?: string | null): boolean {\n if (!str || str === ' ') {\n return true;\n }\n\n return false;\n}\n\nexport function getClass(conditions: { [key: string]: boolean }): string {\n const classes: string[] = [];\n for (const kvp of Object.entries(conditions)) {\n if (kvp[1]) {\n classes.push(kvp[0]);\n }\n }\n\n return classes.join(' ');\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ConditionalRender-52579540.js","mappings":";;MAMM,iBAAiB,GAAgD,CAAC,EAAE,SAAS,EAAE,EAAE,QAAQ;IAC7F,OAAO,SAAS,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC;AACtE;;;;","names":[],"sources":["src/utils/ConditionalRender.tsx"],"sourcesContent":["import { FunctionalComponent } from '@stencil/core';\n\nexport type ConditionalRenderProps = {\n condition: boolean;\n};\n\nconst ConditionalRender: FunctionalComponent<ConditionalRenderProps> = ({ condition }, children) => {\n return condition && children && children.length > 0 ? children : [];\n};\n\nexport default ConditionalRender;\n"],"version":3}
|
|
@@ -4,7 +4,8 @@ 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
|
|
7
|
+
const ConditionalRender = require('./ConditionalRender-52579540.js');
|
|
8
|
+
const utils = require('./utils-3d8a97f6.js');
|
|
8
9
|
|
|
9
10
|
const aicoAlbumContentCss = "";
|
|
10
11
|
|
|
@@ -90,10 +91,6 @@ const AicoAskingContent = class {
|
|
|
90
91
|
};
|
|
91
92
|
AicoAskingContent.style = aicoAskingContentCss;
|
|
92
93
|
|
|
93
|
-
const ConditionalRender = ({ condition }, children) => {
|
|
94
|
-
return condition && children && children.length > 0 ? children : [];
|
|
95
|
-
};
|
|
96
|
-
|
|
97
94
|
const aicoBlockQuoteContentCss = "";
|
|
98
95
|
|
|
99
96
|
const AicoBlockQuoteContent = class {
|
|
@@ -105,7 +102,7 @@ const AicoBlockQuoteContent = class {
|
|
|
105
102
|
render() {
|
|
106
103
|
var _a;
|
|
107
104
|
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
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))));
|
|
105
|
+
return (index.h(ConditionalRender.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))));
|
|
109
106
|
}
|
|
110
107
|
};
|
|
111
108
|
AicoBlockQuoteContent.style = aicoBlockQuoteContentCss;
|
|
@@ -128,7 +125,7 @@ const AicoBulletContent = class {
|
|
|
128
125
|
if (this.content.fontFamily) {
|
|
129
126
|
styles.set('font-family', this.content.fontFamily);
|
|
130
127
|
}
|
|
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
|
|
128
|
+
return (index.h("div", { class: "content", style: Object.fromEntries(styles) }, index.h(ConditionalRender.ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h("ul", null, this.content.bulletBullets
|
|
132
129
|
.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); })
|
|
133
130
|
.map(bullet => {
|
|
134
131
|
if (bullet.translations.length === 0) {
|
|
@@ -177,12 +174,12 @@ const AicoCarouselContent = class {
|
|
|
177
174
|
render() {
|
|
178
175
|
var _a;
|
|
179
176
|
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
|
|
177
|
+
return (index.h(index.Host, null, index.h(ConditionalRender.ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h("div", { class: "carousel" }, this.content.contentCarouselImages
|
|
181
178
|
.sort((a, b) => a.order - b.order)
|
|
182
179
|
.map(content => {
|
|
183
180
|
var _a;
|
|
184
181
|
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)))));
|
|
182
|
+
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.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)))));
|
|
186
183
|
}))));
|
|
187
184
|
}
|
|
188
185
|
makeTitleContent(translation) {
|
|
@@ -209,7 +206,7 @@ const AicoContentCardContent = class {
|
|
|
209
206
|
render() {
|
|
210
207
|
var _a, _b;
|
|
211
208
|
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')))));
|
|
209
|
+
return (index.h("div", { class: "card", style: { width: '18rem' } }, index.h(ConditionalRender.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.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.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')))));
|
|
213
210
|
}
|
|
214
211
|
makeTitleContent(translation) {
|
|
215
212
|
var _a;
|
|
@@ -275,7 +272,7 @@ const AicoDocumentContent = class {
|
|
|
275
272
|
if (this.content.isDocumentDisplayedAsButton && this.content.buttonHoverColor) {
|
|
276
273
|
buttonStyles['--hover-button-color'] = this.content.buttonHoverColor;
|
|
277
274
|
}
|
|
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')))));
|
|
275
|
+
return (index.h("div", { class: "card" }, index.h(ConditionalRender.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.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.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')))));
|
|
279
276
|
}
|
|
280
277
|
};
|
|
281
278
|
AicoDocumentContent.style = aicoDocumentContentCss;
|
|
@@ -6595,7 +6592,7 @@ const AicoHeadingContent = class {
|
|
|
6595
6592
|
if (!utils.strIsNullOrEmptyOrWhitespace(this.content.textColor)) {
|
|
6596
6593
|
descriptionStyle['color'] = this.content.textColor;
|
|
6597
6594
|
}
|
|
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))));
|
|
6595
|
+
return (index.h("div", { class: this.content.isHeadingAlignedWithText ? 'content content-align-with-text' : 'content', style: contentStyle }, index.h(ConditionalRender.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))));
|
|
6599
6596
|
}
|
|
6600
6597
|
makeTitleContent(translation) {
|
|
6601
6598
|
var _a;
|
|
@@ -6623,7 +6620,7 @@ const AicoHtmlContent = class {
|
|
|
6623
6620
|
render() {
|
|
6624
6621
|
var _a;
|
|
6625
6622
|
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 })));
|
|
6623
|
+
return (index.h(ConditionalRender.ConditionalRender, { condition: translation !== null && !utils.strIsNullOrEmptyOrWhitespace(translation.text) }, index.h("div", { innerHTML: translation.text })));
|
|
6627
6624
|
}
|
|
6628
6625
|
};
|
|
6629
6626
|
AicoHtmlContent.style = aicoHtmlContentCss;
|
|
@@ -6655,8 +6652,8 @@ const AicoLinkContent = class {
|
|
|
6655
6652
|
if (this.content.hoverColor) {
|
|
6656
6653
|
buttonLinkStyle['--hover-button-color'] = this.content.hoverColor;
|
|
6657
6654
|
}
|
|
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 :
|
|
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")))));
|
|
6655
|
+
return (index.h(index.Host, null, index.h(ConditionalRender.ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation === null || translation === void 0 ? void 0 : translation.title) }, index.h("label", null, translation === null || translation === void 0 ? void 0 :
|
|
6656
|
+
translation.title, ": ")), index.h(ConditionalRender.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.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")))));
|
|
6660
6657
|
}
|
|
6661
6658
|
};
|
|
6662
6659
|
AicoLinkContent.style = aicoLinkContentCss;
|
|
@@ -6675,7 +6672,7 @@ const AicoNewsContent = class {
|
|
|
6675
6672
|
return (index.h("div", { class: "news-article card h-100 pe-auto", onClick: () => {
|
|
6676
6673
|
var _a;
|
|
6677
6674
|
(_a = this.newsArticleClicked) === null || _a === void 0 ? void 0 : _a.emit(news);
|
|
6678
|
-
} }, index.h("div", { class: "ratio ratio-4x3 overflow-hidden " }, index.h("img", { class: "news-article-img card-img-top img-fluid object-fit-cover", style: { 'object-position': 'center' }, src: (_b = (_a = news.image) !== null && _a !== void 0 ? _a : news.headlineImage) !== null && _b !== void 0 ? _b : 'https://cdn.shopify.com/s/files/1/0565/2201/4813/files/blank-img.png?v=13432316686103745237%20406w' })), index.h("div", { class: "card-body", style: { 'min-height': '6rem', 'background-color': (_c = this.content.textBackgroundColor) !== null && _c !== void 0 ? _c : 'royalBlue' } }, index.h("h5", { class: "card-title" }, news.name)), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(news.excerpt) }, index.h("div", { class: "card-footer", style: { 'background-color': (_d = this.content.textBackgroundColor) !== null && _d !== void 0 ? _d : 'royalBlue', 'color': 'white' } }, index.h("small", { class: "text-muted" }, news.excerpt)))));
|
|
6675
|
+
} }, index.h("div", { class: "ratio ratio-4x3 overflow-hidden " }, index.h("img", { class: "news-article-img card-img-top img-fluid object-fit-cover", style: { 'object-position': 'center' }, src: (_b = (_a = news.image) !== null && _a !== void 0 ? _a : news.headlineImage) !== null && _b !== void 0 ? _b : 'https://cdn.shopify.com/s/files/1/0565/2201/4813/files/blank-img.png?v=13432316686103745237%20406w' })), index.h("div", { class: "card-body", style: { 'min-height': '6rem', 'background-color': (_c = this.content.textBackgroundColor) !== null && _c !== void 0 ? _c : 'royalBlue' } }, index.h("h5", { class: "card-title" }, news.name)), index.h(ConditionalRender.ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(news.excerpt) }, index.h("div", { class: "card-footer", style: { 'background-color': (_d = this.content.textBackgroundColor) !== null && _d !== void 0 ? _d : 'royalBlue', 'color': 'white' } }, index.h("small", { class: "text-muted" }, news.excerpt)))));
|
|
6679
6676
|
})));
|
|
6680
6677
|
}
|
|
6681
6678
|
};
|
|
@@ -6693,11 +6690,11 @@ const AicoPageContent = class {
|
|
|
6693
6690
|
render() {
|
|
6694
6691
|
var _a, _b, _c, _d, _e;
|
|
6695
6692
|
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 => {
|
|
6693
|
+
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.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.ConditionalRender, { condition: !this.content.openExternalLink }, index.h("a", { href: "#", class: "card-link", onClick: e => {
|
|
6697
6694
|
var _a;
|
|
6698
6695
|
e.preventDefault();
|
|
6699
6696
|
(_a = this.pageClicked) === null || _a === void 0 ? void 0 : _a.emit(this.content);
|
|
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))))));
|
|
6697
|
+
} }, (_e = translation === null || translation === void 0 ? void 0 : translation.buttonText) !== null && _e !== void 0 ? _e : 'Navigate to page'))), index.h(ConditionalRender.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))))));
|
|
6701
6698
|
}
|
|
6702
6699
|
};
|
|
6703
6700
|
AicoPageContent.style = aicoPageContentCss;
|
|
@@ -6715,7 +6712,7 @@ const AicoTableContent = class {
|
|
|
6715
6712
|
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
6716
6713
|
const firstBackgroundColor = (_b = this.content.firstColor) !== null && _b !== void 0 ? _b : '#d6dfe1';
|
|
6717
6714
|
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
|
|
6715
|
+
return (index.h("div", { class: "content-table card" }, index.h("div", { class: "card-body" }, index.h(ConditionalRender.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
|
|
6719
6716
|
.sort((a, b) => a.sort - b.sort)
|
|
6720
6717
|
.map((row, index$1) => {
|
|
6721
6718
|
return (index.h("tr", { style: { 'font-weight': '400', 'background-color': index$1 % 2 === 0 ? firstBackgroundColor : secondBackgroundColor } }, row.rowColumns.map(col => {
|
|
@@ -6750,7 +6747,7 @@ const AicoTestimonialContent = class {
|
|
|
6750
6747
|
this.content = undefined;
|
|
6751
6748
|
}
|
|
6752
6749
|
render() {
|
|
6753
|
-
return (index.h("div", { class: "card" }, index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.testimonial.image) }, index.h("img", { class: "card-img-top", alt: "image", src: this.content.testimonial.image })), index.h("div", { class: "card-body" }, index.h("h2", { class: "card-title" }, this.content.testimonial.title), index.h("p", { class: "card-text" }, this.content.testimonial.text), index.h(ConditionalRender, { condition: this.content.testimonial.rating !== null }, index.h("div", { class: "star-rating star-5" }, Array.from({ length: this.content.testimonial.rating }, (_, i) => i + 1).map(index$1 => {
|
|
6750
|
+
return (index.h("div", { class: "card" }, index.h(ConditionalRender.ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(this.content.testimonial.image) }, index.h("img", { class: "card-img-top", alt: "image", src: this.content.testimonial.image })), index.h("div", { class: "card-body" }, index.h("h2", { class: "card-title" }, this.content.testimonial.title), index.h("p", { class: "card-text" }, this.content.testimonial.text), index.h(ConditionalRender.ConditionalRender, { condition: this.content.testimonial.rating !== null }, index.h("div", { class: "star-rating star-5" }, Array.from({ length: this.content.testimonial.rating }, (_, i) => i + 1).map(index$1 => {
|
|
6754
6751
|
return (index.h(index.Fragment, null, index.h("input", { type: "radio", id: `star${index$1}`, name: "rating", value: index$1 }), index.h("i", { style: { opacity: this.content.testimonial.rating >= index$1 ? '1' : '0' } })));
|
|
6755
6752
|
}))))));
|
|
6756
6753
|
}
|
|
@@ -6788,7 +6785,7 @@ const AicoTextContent = class {
|
|
|
6788
6785
|
contentStyles['display'] = 'flex';
|
|
6789
6786
|
contentStyles['align-items'] = (_d = this.content.verticalAlign) !== null && _d !== void 0 ? _d : 'flex-start';
|
|
6790
6787
|
}
|
|
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({
|
|
6788
|
+
return (index.h(ConditionalRender.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.ConditionalRender, { condition: this.shouldDisplayTextAndPicture(translation) }, index.h("div", { class: "row g-4" }, index.h("div", { class: utils.getClass({
|
|
6792
6789
|
'col-md-8': true,
|
|
6793
6790
|
'order-1': this.content.picturePosition === 'right',
|
|
6794
6791
|
'order-2': this.content.picturePosition === 'left',
|
|
@@ -6796,11 +6793,11 @@ const AicoTextContent = class {
|
|
|
6796
6793
|
'col-md-4 justify-content-center': true,
|
|
6797
6794
|
'order-2': this.content.picturePosition === 'right',
|
|
6798
6795
|
'order-1': this.content.picturePosition === 'left',
|
|
6799
|
-
}) }, this.getImageComponent(translation)))), index.h(ConditionalRender, { condition: this.shouldDisplayOnlyPicture(translation) }, this.getImageComponent(translation)), index.h(ConditionalRender, { condition: this.shouldDisplayOnlyText(translation) }, this.getTextComponent(translation)))))));
|
|
6796
|
+
}) }, this.getImageComponent(translation)))), index.h(ConditionalRender.ConditionalRender, { condition: this.shouldDisplayOnlyPicture(translation) }, this.getImageComponent(translation)), index.h(ConditionalRender.ConditionalRender, { condition: this.shouldDisplayOnlyText(translation) }, this.getTextComponent(translation)))))));
|
|
6800
6797
|
}
|
|
6801
6798
|
getImageComponent(translation) {
|
|
6802
6799
|
var _a;
|
|
6803
|
-
return (index.h("div", { class: "card text-bg-dark text-white" }, index.h("img", { class: "card-img img-fluid object-fit-contain", src: (_a = translation.optimizedPicture) !== null && _a !== void 0 ? _a : translation.picture }), index.h(ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation.pictureLabel) }, index.h("div", { class: "card-img-overlay" }, index.h("p", { class: utils.getClass({
|
|
6800
|
+
return (index.h("div", { class: "card text-bg-dark text-white" }, index.h("img", { class: "card-img img-fluid object-fit-contain", src: (_a = translation.optimizedPicture) !== null && _a !== void 0 ? _a : translation.picture }), index.h(ConditionalRender.ConditionalRender, { condition: !utils.strIsNullOrEmptyOrWhitespace(translation.pictureLabel) }, index.h("div", { class: "card-img-overlay" }, index.h("p", { class: utils.getClass({
|
|
6804
6801
|
'card-text': true,
|
|
6805
6802
|
'text-end': this.content.pictureLabelPosition === 'right',
|
|
6806
6803
|
'text-center': this.content.pictureLabelPosition === 'center',
|
|
@@ -6856,7 +6853,7 @@ const AicoUploadContent = class {
|
|
|
6856
6853
|
var _a;
|
|
6857
6854
|
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
6858
6855
|
const youtubeUrl = this.content && this.content.videoUrl ? utils.getYoutubeURL(this.content.videoUrl) : null;
|
|
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 => {
|
|
6856
|
+
return (index.h(index.Host, null, index.h(ConditionalRender.ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h(ConditionalRender.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.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 => {
|
|
6860
6857
|
if (utils.strIsNullOrEmptyOrWhitespace(upload.path)) {
|
|
6861
6858
|
return null;
|
|
6862
6859
|
}
|
|
@@ -6888,7 +6885,7 @@ const AicoVideoContent = class {
|
|
|
6888
6885
|
var _a;
|
|
6889
6886
|
const translation = (_a = this.content.translations.find(translation => translation.locale === this.locale)) !== null && _a !== void 0 ? _a : null;
|
|
6890
6887
|
const youtubeUrl = translation && translation.videoUrl ? utils.getYoutubeURL(translation.videoUrl) : null;
|
|
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" }))))));
|
|
6888
|
+
return (index.h(index.Host, null, index.h(ConditionalRender.ConditionalRender, { condition: translation !== null }, index.h("aico-title-content", { content: this.makeTitleContent(translation), locale: this.locale })), index.h(ConditionalRender.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.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" }))))));
|
|
6892
6889
|
}
|
|
6893
6890
|
makeTitleContent(translation) {
|
|
6894
6891
|
var _a;
|