@everymatrix/blog-article-details 1.99.62 → 1.99.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blog-article-details/blog-article-details.entry.js +1 -1
- package/dist/blog-article-details/blog-article-details.esm.js +1 -1
- package/dist/cjs/blog-article-details.cjs.entry.js +14 -3
- package/dist/cjs/blog-article-details.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/blog-article-details/blog-article-details.css +32 -2
- package/dist/collection/components/blog-article-details/blog-article-details.js +42 -2
- package/dist/collection/utils/locale.utils.js +7 -0
- package/dist/esm/blog-article-details.entry.js +14 -3
- package/dist/esm/blog-article-details.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/blog-article-details/blog-article-details.d.ts +8 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./index-39cf8680.js";const i={en:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},ro:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},fr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},ar:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},hr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},"pt-br":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"},"es-mx":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article"}},n=(t,e)=>i[void 0!==e&&e in i?e:"en"][t],o="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function s(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function l(t){return t.includes("android")}const a=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"},h=class{constructor(i){t(this,i),this.articleRequest=0,this.neighboursRequest=0,this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?e("div",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showImage=!0,this.showTitle=!0,this.showBreadcrumb=!1,this.hideCategory="",this.showContent=!0,this.showMoreArticles=!1,this.showRelatedArticles=!1,this.showBackButton=!1,this.postId=void 0,this.postSlug=void 0,this.postCustomPath=void 0,this.intlDateTimeFormat="",this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.device="mobile",this.categories=[],this.neighbours={},this.relatedPosts=[]}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,e){t!==e&&(this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)?this.getBlogArticleDetails():(this.articleRequest++,this.categories=[],this.neighbours={},this.relatedPosts=[]))}handleRelatedArticlesChange(){this.relatedPosts=[],this.showRelatedArticles&&!this.isLoading&&this.blogData&&this.fetchRelatedArticles(this.articleRequest)}handleMoreArticlesChange(){this.neighboursRequest++,this.neighbours={},this.showMoreArticles&&!this.isLoading&&this.blogData&&this.fetchMoreArticles(this.articleRequest)}handleClientStylingChange(t,e){t!==e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!==e&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)&&this.getBlogArticleDetails()}getBlogArticleDetails(){if(!this.postId&&!this.postSlug&&!this.postCustomPath)throw this.hasErrors=!0,new Error("postId, postSlug or postCustomPath parameter has to be provided!");const t=++this.articleRequest;this.categories=[],this.neighbours={},this.neighboursRequest++,this.hasErrors=!1,this.isLoading=!0;let e=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath?"":"/"+(this.postSlug||this.postId)}`);e.searchParams.append("env",this.cmsEnv),e.searchParams.append("userRoles",this.userRoles),e.searchParams.append("device",a()),this.postCustomPath&&e.searchParams.append("customURL",this.postCustomPath),this.fetchCategories(t),fetch(e.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((e=>{if(t===this.articleRequest){if(e.count>=1&&this.postCustomPath){let t=new Date(e.items[0].publishingDate),i=0;for(let n=1;n<e.items.length;n++){const o=new Date(e.items[n].publishingDate);t.getTime()<o.getTime()&&(t=o,i=n)}this.blogData=e.items[i]}else this.blogData=e;this.showMoreArticles&&this.fetchMoreArticles(t),this.showRelatedArticles&&this.fetchRelatedArticles(t)}})).catch((e=>{t===this.articleRequest&&(this.hasErrors=!0,console.log("Error",e))})).finally((()=>{t===this.articleRequest&&(this.isLoading=!1)}))}async fetchMoreArticles(t){var e,i,n,o,r;if(!(this.cmsEndpoint&&this.language&&this.blogData&&this.showMoreArticles))return;const s=++this.neighboursRequest,l=null===(e=this.blogData)||void 0===e?void 0:e.postID,h=(null===(i=this.blogData)||void 0===i?void 0:i.customPath)||(null===(n=this.blogData)||void 0===n?void 0:n.slug)||this.postCustomPath||this.postSlug,c=[],d=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);d.searchParams.set("per_page","20"),d.searchParams.set("env",this.cmsEnv),d.searchParams.set("userRoles",this.userRoles),d.searchParams.set("device",a());try{for(let e=1;this.showMoreArticles&&s===this.neighboursRequest&&t===this.articleRequest;e++){d.searchParams.set("page",String(e));const i=await fetch(d.href);if(!i.ok)throw new Error("Failed to fetch adjacent articles");const n=await i.json();if(!this.showMoreArticles||s!==this.neighboursRequest||t!==this.articleRequest)return;if(!Array.isArray(null==n?void 0:n.items))return;c.push(...n.items.filter((t=>"string"==typeof((null==t?void 0:t.customPath)||(null==t?void 0:t.slug))&&(t.customPath||t.slug))));const a=c.findIndex((t=>null!=l&&t.postID===l||h&&(t.customPath||t.slug)===h));if(a>=0&&(a<c.length-1||!(null===(o=n.pages)||void 0===o?void 0:o.next)))return void(this.neighbours={previous:c[a+1],next:c[a-1]});if(!(null===(r=n.pages)||void 0===r?void 0:r.next))return}}catch(t){console.error("Error fetching adjacent articles",t)}}async fetchRelatedArticles(t){var e,i;const n=null===(i=null===(e=this.blogData)||void 0===e?void 0:e.blogCategory)||void 0===i?void 0:i[0];if(!this.cmsEndpoint||!this.language||!n)return;const o=this.blogData.postID,r=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);r.searchParams.set("category",n),r.searchParams.set("per_page","5"),r.searchParams.set("env",this.cmsEnv),r.searchParams.set("userRoles",this.userRoles),r.searchParams.set("device",a());try{const e=await fetch(r.href);if(!e.ok)throw new Error("Failed to fetch related articles");const i=await e.json();if(!this.showRelatedArticles||t!==this.articleRequest||!Array.isArray(null==i?void 0:i.items))return;this.relatedPosts=i.items.filter((t=>t.postID!==o&&(t.customPath||t.slug))).slice(0,4)}catch(t){console.error("Error fetching related articles",t)}}async fetchCategories(t){try{const e=await fetch(`${this.cmsEndpoint}/${this.language}/blog-posts/category`);if(!e.ok)throw new Error("Failed to fetch categories");const i=await e.json();if(t===this.articleRequest){const t=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),e=Array.isArray(i)?i.filter((e=>"string"==typeof(null==e?void 0:e.name)&&e.name&&"string"==typeof e.slug&&e.slug&&!t.includes(e.name.toLowerCase()))):[];this.categories=e}}catch(e){t===this.articleRequest&&(this.categories=[])}}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(t,e,i,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e);window[o]||(window[o]={});const r=(i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const n=t.getRootNode(),r=window[o];let s=r[e]&&r[e].sheet;s?r[e].refCount=r[e].refCount+1:(s=new CSSStyleSheet,s.replaceSync(i),r[e]={sheet:s,refCount:1});const l=n.adoptedStyleSheets||[];l.includes(s)||(n.adoptedStyleSheets=[...l,s])}))}(t,e)).unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[o][e]){const t=window[o][e];t.refCount>1?t.refCount=t.refCount-1:delete window[o][e]}r()},i}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.detectAndAlertDeviceType(),this.handleClientStyling()}disconnectedCallback(){this.articleRequest++,this.neighboursRequest++,this.stylingSubscription&&this.stylingSubscription.unsubscribe()}detectAndAlertDeviceType(){this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const e=navigator.userAgent.toLowerCase(),i=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(e))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(e))return"mobile";if(function(t,e){return l(t)&&(t.includes("mobile")||t.includes("mobi")||e<=599)}(e,i))return"mobile";if(function(t,e){return l(t)&&!t.includes("mobile")&&!t.includes("mobi")&&e>599}(e,i))return"tablet";if(t){if(i<=599)return"mobile";if(i<=1099)return"tablet"}return"desktop"})()}parseDate(t){const e=new Date(t);if(e instanceof Date&&!Number.isNaN(e.getTime()))return e;const[i,n,o]=t.trim().split("/").map(Number);return new Date(o,n-1,i)}formatDate(t){const e=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB",{day:"numeric",month:"short",year:"numeric"}).format(e)}setImage(t){var e,i;return null===(i=null===(e=null==t?void 0:t.sources)||void 0===e?void 0:e["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===i?void 0:i.pictureSource}render(){var t,i,o,r,s,l,a;if(this.hasErrors)return e("div",{class:"BlogArticleDetails"},e("div",{class:"Title"},n("error",this.language)));const h=`/${encodeURIComponent(this.language)}`,c=!this.isLoading&&Array.isArray(null===(t=this.blogData)||void 0===t?void 0:t.blogCategory)?this.blogData.blogCategory.map((t=>this.categories.find((e=>e.slug===t)))).filter(Boolean):[],d=c[0],p=null===(i=this.blogData)||void 0===i?void 0:i.image,g=this.setImage(p),{previous:u,next:f}=this.neighbours;return e("div",{ref:t=>this.stylingContainer=t},!this.isLoading&&e("div",{class:"DetailsContainer"},this.showBackButton&&e("a",{class:"BackButton",href:`${h}/blog`},"← ",n("backToBlog",this.language)),e("div",{class:"DetailsHeadWrapper"},this.showPublishingDate&&this.blogData.publishingDate&&e("time",{class:"BlogDate",dateTime:this.blogData.publishingDate},this.formatDate(this.blogData.publishingDate)),this.showImage&&e("div",{class:`BlogBanner ${this.device}`},g?e("img",{src:g,alt:(null==p?void 0:p.alt)||""}):(null===(r=null===(o=this.blogData.video)||void 0===o?void 0:o.sources)||void 0===r?void 0:r[this.device])?e("video",{src:this.blogData.video.sources[this.device],controls:!0}):null)),e("div",{class:"DetailsBodyWrapper"},this.showTitle&&e("div",{class:"BlogTitle"},null===(s=this.blogData)||void 0===s?void 0:s.title),this.showBreadcrumb&&e("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},e("a",{href:h},n("home",this.language)),e("span",{"aria-hidden":"true"},"›"),e("a",{href:`${h}/blog`},n("blog",this.language)),e("span",{"aria-hidden":"true"},"›"),d&&[e("a",{href:`${h}/blog/category/${encodeURIComponent(d.slug)}`},d.name),e("span",{"aria-hidden":"true"},"›")],e("span",{"aria-current":"page"},null===(l=this.blogData)||void 0===l?void 0:l.title)),c.length>0&&e("div",{class:"BlogCategoryPills"},c.map((t=>e("a",{class:"BlogCategoryLink",href:`${h}/blog/category/${encodeURIComponent(t.slug)}`},t.name)))),this.showContent&&this.renderContentConditionally(null===(a=this.blogData)||void 0===a?void 0:a.content)),this.showRelatedArticles&&this.relatedPosts.length>0&&e("nav",{class:"RelatedPosts","aria-label":n("relatedArticles",this.language)},e("h2",{class:"RelatedPostsTitle"},n("relatedArticles",this.language)),e("ul",{class:"RelatedPostsList"},this.relatedPosts.map((t=>e("li",null,e("a",{href:`${h}/blog/${encodeURIComponent(t.customPath||t.slug||"")}`},t.title||t.customPath||t.slug)))))),this.showMoreArticles&&(u||f)&&e("nav",{class:"AdjacentPosts","aria-label":n("moreArticles",this.language)},u&&e("a",{href:`${h}/blog/${encodeURIComponent(u.customPath||u.slug||"")}`,rel:"prev"},"← ",n("previousArticle",this.language),": ",u.title||u.customPath||u.slug),f&&e("a",{href:`${h}/blog/${encodeURIComponent(f.customPath||f.slug||"")}`,rel:"next"},n("nextArticle",this.language),": ",f.title||f.customPath||f.slug," →"))))}static get watchers(){return{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],showRelatedArticles:["handleRelatedArticlesChange"],showMoreArticles:["handleMoreArticlesChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style=":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 4px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 12px;\n text-decoration: none;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n.AdjacentPosts a[rel=next] {\n margin-left: auto;\n text-align: right;\n}\n\n.RelatedPosts {\n padding: 30px 30px 0;\n}\n\n.RelatedPostsTitle {\n margin: 0 0 12px;\n font-size: 1.25em;\n}\n\n.RelatedPostsList {\n display: grid;\n gap: 8px;\n margin: 0;\n padding-left: 20px;\n}\n\n.RelatedPosts a,\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.RelatedPosts a:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}";export{h as blog_article_details}
|
|
1
|
+
import{r as t,h as i}from"./index-39cf8680.js";const e={en:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},ro:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},fr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},ar:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},hr:{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},"pt-br":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"},"es-mx":{error:"Error",home:"Home",blog:"Blog",backToBlog:"Back to blog",moreArticles:"More articles",relatedArticles:"Related articles",previousArticle:"Previous article",nextArticle:"Next article",by:"by"}},n=(t,i)=>e[void 0!==i&&i in e?i:"en"][t],o="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function s(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function l(t){return t.includes("android")}const a=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"},h=class{constructor(e){t(this,e),this.articleRequest=0,this.neighboursRequest=0,this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?i("div",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showImage=!0,this.showTitle=!0,this.showBreadcrumb=!1,this.hideCategory="",this.showContent=!0,this.showMoreArticles=!1,this.showRelatedArticles=!1,this.showBackButton=!1,this.postId=void 0,this.postSlug=void 0,this.postCustomPath=void 0,this.intlDateTimeFormat="",this.showArticleTitle=!1,this.showAuthor=!1,this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.device="mobile",this.categories=[],this.neighbours={},this.relatedPosts=[]}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){t!==i&&(this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)?this.getBlogArticleDetails():(this.articleRequest++,this.categories=[],this.neighbours={},this.relatedPosts=[]))}handleRelatedArticlesChange(){this.relatedPosts=[],this.showRelatedArticles&&!this.isLoading&&this.blogData&&this.fetchRelatedArticles(this.articleRequest)}handleMoreArticlesChange(){this.neighboursRequest++,this.neighbours={},this.showMoreArticles&&!this.isLoading&&this.blogData&&this.fetchMoreArticles(this.articleRequest)}handleClientStylingChange(t,i){t!==i&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.cmsEndpoint&&this.language&&(this.postCustomPath||this.postSlug||this.postId)&&this.getBlogArticleDetails()}getBlogArticleDetails(){if(!this.postId&&!this.postSlug&&!this.postCustomPath)throw this.hasErrors=!0,new Error("postId, postSlug or postCustomPath parameter has to be provided!");const t=++this.articleRequest;this.categories=[],this.neighbours={},this.neighboursRequest++,this.hasErrors=!1,this.isLoading=!0;let i=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts${this.postCustomPath?"":"/"+(this.postSlug||this.postId)}`);i.searchParams.append("env",this.cmsEnv),i.searchParams.append("userRoles",this.userRoles),i.searchParams.append("device",a()),this.postCustomPath&&i.searchParams.append("customURL",this.postCustomPath),this.fetchCategories(t),fetch(i.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((i=>{if(t===this.articleRequest){if(i.count>=1&&this.postCustomPath){let t=new Date(i.items[0].publishingDate),e=0;for(let n=1;n<i.items.length;n++){const o=new Date(i.items[n].publishingDate);t.getTime()<o.getTime()&&(t=o,e=n)}this.blogData=i.items[e]}else this.blogData=i;this.showMoreArticles&&this.fetchMoreArticles(t),this.showRelatedArticles&&this.fetchRelatedArticles(t)}})).catch((i=>{t===this.articleRequest&&(this.hasErrors=!0,console.log("Error",i))})).finally((()=>{t===this.articleRequest&&(this.isLoading=!1)}))}async fetchMoreArticles(t){var i,e,n,o,r;if(!(this.cmsEndpoint&&this.language&&this.blogData&&this.showMoreArticles))return;const s=++this.neighboursRequest,l=null===(i=this.blogData)||void 0===i?void 0:i.postID,h=(null===(e=this.blogData)||void 0===e?void 0:e.customPath)||(null===(n=this.blogData)||void 0===n?void 0:n.slug)||this.postCustomPath||this.postSlug,c=[],d=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);d.searchParams.set("per_page","20"),d.searchParams.set("env",this.cmsEnv),d.searchParams.set("userRoles",this.userRoles),d.searchParams.set("device",a());try{for(let i=1;this.showMoreArticles&&s===this.neighboursRequest&&t===this.articleRequest;i++){d.searchParams.set("page",String(i));const e=await fetch(d.href);if(!e.ok)throw new Error("Failed to fetch adjacent articles");const n=await e.json();if(!this.showMoreArticles||s!==this.neighboursRequest||t!==this.articleRequest)return;if(!Array.isArray(null==n?void 0:n.items))return;c.push(...n.items.filter((t=>"string"==typeof((null==t?void 0:t.customPath)||(null==t?void 0:t.slug))&&(t.customPath||t.slug))));const a=c.findIndex((t=>null!=l&&t.postID===l||h&&(t.customPath||t.slug)===h));if(a>=0&&(a<c.length-1||!(null===(o=n.pages)||void 0===o?void 0:o.next)))return void(this.neighbours={previous:c[a+1],next:c[a-1]});if(!(null===(r=n.pages)||void 0===r?void 0:r.next))return}}catch(t){console.error("Error fetching adjacent articles",t)}}async fetchRelatedArticles(t){var i,e;const n=null===(e=null===(i=this.blogData)||void 0===i?void 0:i.blogCategory)||void 0===e?void 0:e[0];if(!this.cmsEndpoint||!this.language||!n)return;const o=this.blogData.postID,r=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);r.searchParams.set("category",n),r.searchParams.set("per_page","5"),r.searchParams.set("env",this.cmsEnv),r.searchParams.set("userRoles",this.userRoles),r.searchParams.set("device",a());try{const i=await fetch(r.href);if(!i.ok)throw new Error("Failed to fetch related articles");const e=await i.json();if(!this.showRelatedArticles||t!==this.articleRequest||!Array.isArray(null==e?void 0:e.items))return;this.relatedPosts=e.items.filter((t=>t.postID!==o&&(t.customPath||t.slug))).slice(0,4)}catch(t){console.error("Error fetching related articles",t)}}async fetchCategories(t){try{const i=await fetch(`${this.cmsEndpoint}/${this.language}/blog-posts/category`);if(!i.ok)throw new Error("Failed to fetch categories");const e=await i.json();if(t===this.articleRequest){const t=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),i=Array.isArray(e)?e.filter((i=>"string"==typeof(null==i?void 0:i.name)&&i.name&&"string"==typeof i.slug&&i.slug&&!t.includes(i.name.toLowerCase()))):[];this.categories=i}}catch(i){t===this.articleRequest&&(this.categories=[])}}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(t,i,e,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i);window[o]||(window[o]={});const r=(e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const n=t.getRootNode(),r=window[o];let s=r[i]&&r[i].sheet;s?r[i].refCount=r[i].refCount+1:(s=new CSSStyleSheet,s.replaceSync(e),r[i]={sheet:s,refCount:1});const l=n.adoptedStyleSheets||[];l.includes(s)||(n.adoptedStyleSheets=[...l,s])}))}(t,i)).unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[o][i]){const t=window[o][i];t.refCount>1?t.refCount=t.refCount-1:delete window[o][i]}r()},e}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.detectAndAlertDeviceType(),this.handleClientStyling()}disconnectedCallback(){this.articleRequest++,this.neighboursRequest++,this.stylingSubscription&&this.stylingSubscription.unsubscribe()}detectAndAlertDeviceType(){this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const i=navigator.userAgent.toLowerCase(),e=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(i))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(i))return"mobile";if(function(t,i){return l(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,e))return"mobile";if(function(t,i){return l(t)&&!t.includes("mobile")&&!t.includes("mobi")&&i>599}(i,e))return"tablet";if(t){if(e<=599)return"mobile";if(e<=1099)return"tablet"}return"desktop"})()}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[e,n,o]=t.trim().split("/").map(Number);return new Date(o,n-1,e)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB",{day:"numeric",month:"short",year:"numeric"}).format(i)}setImage(t){var i,e;return null===(e=null===(i=null==t?void 0:t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===e?void 0:e.pictureSource}render(){var t,e,o,r,s,l,a,h,c,d;if(this.hasErrors)return i("div",{class:"BlogArticleDetails"},i("div",{class:"Title"},n("error",this.language)));const p=`/${encodeURIComponent(this.language)}`,g=!this.isLoading&&Array.isArray(null===(t=this.blogData)||void 0===t?void 0:t.blogCategory)?this.blogData.blogCategory.map((t=>this.categories.find((i=>i.slug===t)))).filter(Boolean):[],u=g[0],f=null===(e=this.blogData)||void 0===e?void 0:e.image,v=this.setImage(f),{previous:m,next:b}=this.neighbours;return i("div",{ref:t=>this.stylingContainer=t},!this.isLoading&&i("div",{class:"DetailsContainer"},this.showBackButton&&i("a",{class:"BackButton",href:`${p}/blog`},"← ",n("backToBlog",this.language)),i("div",{class:"DetailsHeadWrapper"},this.showPublishingDate&&this.blogData.publishingDate&&i("time",{class:"BlogDate",dateTime:this.blogData.publishingDate},this.formatDate(this.blogData.publishingDate)),this.showImage&&i("div",{class:`BlogBanner ${this.device}`},v?i("img",{src:v,alt:(null==f?void 0:f.alt)||""}):(null===(r=null===(o=this.blogData.video)||void 0===o?void 0:o.sources)||void 0===r?void 0:r[this.device])?i("video",{src:this.blogData.video.sources[this.device],controls:!0}):null)),i("div",{class:"DetailsBodyWrapper"},this.showTitle&&i("div",{class:"BlogTitle"},null===(s=this.blogData)||void 0===s?void 0:s.title),this.showBreadcrumb&&i("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},i("a",{href:p},n("home",this.language)),i("span",{"aria-hidden":"true"},"›"),i("a",{href:`${p}/blog`},n("blog",this.language)),i("span",{"aria-hidden":"true"},"›"),u&&[i("a",{href:`${p}/blog/category/${encodeURIComponent(u.slug)}`},u.name),i("span",{"aria-hidden":"true"},"›")],i("span",{"aria-current":"page"},null===(l=this.blogData)||void 0===l?void 0:l.title)),g.length>0&&i("div",{class:"BlogCategoryPills"},g.map((t=>i("a",{class:"BlogCategoryLink",href:`${p}/blog/category/${encodeURIComponent(t.slug)}`},t.name)))),this.showArticleTitle&&i("h1",{class:"BlogArticleTitle"},null===(a=this.blogData)||void 0===a?void 0:a.title),this.showAuthor&&(null===(h=this.blogData)||void 0===h?void 0:h.author)&&i("p",{class:"BlogAuthor"},n("by",this.language)," ",i("strong",{class:"BlogAuthorName"},null===(c=this.blogData)||void 0===c?void 0:c.author)),this.showContent&&this.renderContentConditionally(null===(d=this.blogData)||void 0===d?void 0:d.content)),this.showRelatedArticles&&this.relatedPosts.length>0&&i("nav",{class:"RelatedPosts","aria-label":n("relatedArticles",this.language)},i("h2",{class:"RelatedPostsTitle"},n("relatedArticles",this.language)),i("ul",{class:"RelatedPostsList"},this.relatedPosts.map((t=>i("li",null,i("a",{href:`${p}/blog/${encodeURIComponent(t.customPath||t.slug||"")}`},t.title||t.customPath||t.slug)))))),this.showMoreArticles&&(m||b)&&i("nav",{class:"AdjacentPosts","aria-label":n("moreArticles",this.language)},m&&i("a",{href:`${p}/blog/${encodeURIComponent(m.customPath||m.slug||"")}`,rel:"prev"},"← ",n("previousArticle",this.language),": ",m.title||m.customPath||m.slug),b&&i("a",{href:`${p}/blog/${encodeURIComponent(b.customPath||b.slug||"")}`,rel:"next"},n("nextArticle",this.language),": ",b.title||b.customPath||b.slug," →"))))}static get watchers(){return{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],showRelatedArticles:["handleRelatedArticlesChange"],showMoreArticles:["handleMoreArticlesChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style=":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 6px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 16px;\n text-decoration: none;\n margin-bottom: 30px;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n.AdjacentPosts a[rel=next] {\n margin-left: auto;\n text-align: right;\n}\n\n.RelatedPosts {\n padding: 30px 30px 0;\n}\n\n.RelatedPostsTitle {\n margin: 0 0 12px;\n font-size: 1.25em;\n}\n\n.RelatedPostsList {\n display: grid;\n gap: 8px;\n margin: 0;\n padding-left: 20px;\n}\n\n.RelatedPosts a,\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.RelatedPosts a:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}\n.BlogAuthor {\n display: flex;\n gap: 4px;\n min-width: 0;\n margin: 0 0 10px;\n font-size: 14px;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName {\n min-width: 0;\n overflow: hidden;\n font-weight: 700;\n text-decoration: underline;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName:hover {\n color: var(--emw--color-primary, #CD0B5E);\n}\n.BlogAuthor .BlogAuthorName:focus-visible {\n outline: 2px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: 2px;\n}\n\n.BlogArticleTitle {\n margin: 0;\n color: var(--emw--color-typography-contrast, #fff);\n}";export{h as blog_article_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as e}from"./index-39cf8680.js";export{s as setNonce}from"./index-39cf8680.js";import{g as
|
|
1
|
+
import{p as t,b as e}from"./index-39cf8680.js";export{s as setNonce}from"./index-39cf8680.js";import{g as o}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),t(s)})().then((async t=>(await o(),e([["blog-article-details",[[1,"blog-article-details",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showBreadcrumb:[516,"show-breadcrumb"],hideCategory:[513,"hide-category"],showContent:[516,"show-content"],showMoreArticles:[516,"show-more-articles"],showRelatedArticles:[516,"show-related-articles"],showBackButton:[516,"show-back-button"],postId:[513,"post-id"],postSlug:[513,"post-slug"],postCustomPath:[513,"post-custom-path"],intlDateTimeFormat:[1,"intl-date-time-format"],showArticleTitle:[516,"show-article-title"],showAuthor:[516,"show-author"],hasErrors:[32],isLoading:[32],bannerMatrixReady:[32],device:[32],categories:[32],neighbours:[32],relatedPosts:[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{postId:["watchEndpoint"],postSlug:["watchEndpoint"],postCustomPath:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],showRelatedArticles:["handleRelatedArticlesChange"],showMoreArticles:["handleMoreArticlesChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],t))));
|
|
@@ -15,6 +15,7 @@ const TRANSLATIONS = {
|
|
|
15
15
|
relatedArticles: 'Related articles',
|
|
16
16
|
previousArticle: 'Previous article',
|
|
17
17
|
nextArticle: 'Next article',
|
|
18
|
+
by: 'by',
|
|
18
19
|
},
|
|
19
20
|
ro: {
|
|
20
21
|
error: 'Error',
|
|
@@ -25,6 +26,7 @@ const TRANSLATIONS = {
|
|
|
25
26
|
relatedArticles: 'Related articles',
|
|
26
27
|
previousArticle: 'Previous article',
|
|
27
28
|
nextArticle: 'Next article',
|
|
29
|
+
by: 'by',
|
|
28
30
|
},
|
|
29
31
|
fr: {
|
|
30
32
|
error: 'Error',
|
|
@@ -35,6 +37,7 @@ const TRANSLATIONS = {
|
|
|
35
37
|
relatedArticles: 'Related articles',
|
|
36
38
|
previousArticle: 'Previous article',
|
|
37
39
|
nextArticle: 'Next article',
|
|
40
|
+
by: 'by',
|
|
38
41
|
},
|
|
39
42
|
ar: {
|
|
40
43
|
error: 'Error',
|
|
@@ -45,6 +48,7 @@ const TRANSLATIONS = {
|
|
|
45
48
|
relatedArticles: 'Related articles',
|
|
46
49
|
previousArticle: 'Previous article',
|
|
47
50
|
nextArticle: 'Next article',
|
|
51
|
+
by: 'by',
|
|
48
52
|
},
|
|
49
53
|
hr: {
|
|
50
54
|
error: 'Error',
|
|
@@ -55,6 +59,7 @@ const TRANSLATIONS = {
|
|
|
55
59
|
relatedArticles: 'Related articles',
|
|
56
60
|
previousArticle: 'Previous article',
|
|
57
61
|
nextArticle: 'Next article',
|
|
62
|
+
by: 'by',
|
|
58
63
|
},
|
|
59
64
|
'pt-br': {
|
|
60
65
|
error: 'Error',
|
|
@@ -65,6 +70,7 @@ const TRANSLATIONS = {
|
|
|
65
70
|
relatedArticles: 'Related articles',
|
|
66
71
|
previousArticle: 'Previous article',
|
|
67
72
|
nextArticle: 'Next article',
|
|
73
|
+
by: 'by',
|
|
68
74
|
},
|
|
69
75
|
'es-mx': {
|
|
70
76
|
error: 'Error',
|
|
@@ -75,6 +81,7 @@ const TRANSLATIONS = {
|
|
|
75
81
|
relatedArticles: 'Related articles',
|
|
76
82
|
previousArticle: 'Previous article',
|
|
77
83
|
nextArticle: 'Next article',
|
|
84
|
+
by: 'by',
|
|
78
85
|
}
|
|
79
86
|
};
|
|
80
87
|
const translate = (key, customLang) => {
|
|
@@ -287,7 +294,7 @@ const getDevicePlatform = () => {
|
|
|
287
294
|
return 'mtWeb';
|
|
288
295
|
};
|
|
289
296
|
|
|
290
|
-
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding:
|
|
297
|
+
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 6px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 16px;\n text-decoration: none;\n margin-bottom: 30px;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n.AdjacentPosts a[rel=next] {\n margin-left: auto;\n text-align: right;\n}\n\n.RelatedPosts {\n padding: 30px 30px 0;\n}\n\n.RelatedPostsTitle {\n margin: 0 0 12px;\n font-size: 1.25em;\n}\n\n.RelatedPostsList {\n display: grid;\n gap: 8px;\n margin: 0;\n padding-left: 20px;\n}\n\n.RelatedPosts a,\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.RelatedPosts a:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}\n.BlogAuthor {\n display: flex;\n gap: 4px;\n min-width: 0;\n margin: 0 0 10px;\n font-size: 14px;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName {\n min-width: 0;\n overflow: hidden;\n font-weight: 700;\n text-decoration: underline;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName:hover {\n color: var(--emw--color-primary, #CD0B5E);\n}\n.BlogAuthor .BlogAuthorName:focus-visible {\n outline: 2px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: 2px;\n}\n\n.BlogArticleTitle {\n margin: 0;\n color: var(--emw--color-typography-contrast, #fff);\n}";
|
|
291
298
|
const BlogArticleDetailsStyle0 = blogArticleDetailsCss;
|
|
292
299
|
|
|
293
300
|
const BlogArticleDetails = class {
|
|
@@ -324,6 +331,8 @@ const BlogArticleDetails = class {
|
|
|
324
331
|
this.postSlug = undefined;
|
|
325
332
|
this.postCustomPath = undefined;
|
|
326
333
|
this.intlDateTimeFormat = '';
|
|
334
|
+
this.showArticleTitle = false;
|
|
335
|
+
this.showAuthor = false;
|
|
327
336
|
this.hasErrors = false;
|
|
328
337
|
this.isLoading = true;
|
|
329
338
|
this.bannerMatrixReady = false;
|
|
@@ -565,7 +574,7 @@ const BlogArticleDetails = class {
|
|
|
565
574
|
return (_b = (_a = image === null || image === void 0 ? void 0 : image.sources) === null || _a === void 0 ? void 0 : _a[sourceIndex]) === null || _b === void 0 ? void 0 : _b.pictureSource;
|
|
566
575
|
}
|
|
567
576
|
render() {
|
|
568
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
577
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
569
578
|
if (this.hasErrors) {
|
|
570
579
|
return (index.h("div", { class: "BlogArticleDetails" }, index.h("div", { class: "Title" }, translate('error', this.language))));
|
|
571
580
|
}
|
|
@@ -582,7 +591,9 @@ const BlogArticleDetails = class {
|
|
|
582
591
|
index.h("div", { class: "BlogTitle" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title), this.showBreadcrumb && (index.h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, index.h("a", { href: homeUrl }, translate('home', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), index.h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), index.h("span", { "aria-hidden": "true" }, "\u203A"), primaryCategory && [
|
|
583
592
|
index.h("a", { href: `${homeUrl}/blog/category/${encodeURIComponent(primaryCategory.slug)}` }, primaryCategory.name),
|
|
584
593
|
index.h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
585
|
-
], index.h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (index.h("div", { class: "BlogCategoryPills" }, categories.map(category => (index.h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.
|
|
594
|
+
], index.h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (index.h("div", { class: "BlogCategoryPills" }, categories.map(category => (index.h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.showArticleTitle &&
|
|
595
|
+
index.h("h1", { class: "BlogArticleTitle" }, (_g = this.blogData) === null || _g === void 0 ? void 0 : _g.title), this.showAuthor && ((_h = this.blogData) === null || _h === void 0 ? void 0 : _h.author) &&
|
|
596
|
+
index.h("p", { class: "BlogAuthor" }, translate('by', this.language), " ", index.h("strong", { class: "BlogAuthorName" }, (_j = this.blogData) === null || _j === void 0 ? void 0 : _j.author)), this.showContent && this.renderContentConditionally((_k = this.blogData) === null || _k === void 0 ? void 0 : _k.content)), this.showRelatedArticles && this.relatedPosts.length > 0 && (index.h("nav", { class: "RelatedPosts", "aria-label": translate('relatedArticles', this.language) }, index.h("h2", { class: "RelatedPostsTitle" }, translate('relatedArticles', this.language)), index.h("ul", { class: "RelatedPostsList" }, this.relatedPosts.map(post => (index.h("li", null, index.h("a", { href: `${homeUrl}/blog/${encodeURIComponent(post.customPath || post.slug || '')}` }, post.title || post.customPath || post.slug))))))), this.showMoreArticles && (previous || next) && (index.h("nav", { class: "AdjacentPosts", "aria-label": translate('moreArticles', this.language) }, previous && index.h("a", { href: `${homeUrl}/blog/${encodeURIComponent(previous.customPath || previous.slug || '')}`, rel: "prev" }, "\u2190 ", translate('previousArticle', this.language), ": ", previous.title || previous.customPath || previous.slug), next && index.h("a", { href: `${homeUrl}/blog/${encodeURIComponent(next.customPath || next.slug || '')}`, rel: "next" }, translate('nextArticle', this.language), ": ", next.title || next.customPath || next.slug, " \u2192")))))));
|
|
586
597
|
}
|
|
587
598
|
static get watchers() { return {
|
|
588
599
|
"postId": ["watchEndpoint"],
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"showArticleTitle":[516,"show-article-title"],"showAuthor":[516,"show-author"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["blog-article-details.cjs",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"showArticleTitle":[516,"show-article-title"],"showAuthor":[516,"show-author"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
left: 30px;
|
|
48
48
|
}
|
|
49
49
|
.DetailsContainer .BlogTitle {
|
|
50
|
+
margin: 0;
|
|
50
51
|
font-size: 24px;
|
|
51
52
|
}
|
|
52
53
|
.DetailsContainer .BlogCategoryPills {
|
|
@@ -57,12 +58,13 @@
|
|
|
57
58
|
.DetailsContainer .BlogCategoryLink {
|
|
58
59
|
position: relative;
|
|
59
60
|
z-index: 3;
|
|
60
|
-
padding:
|
|
61
|
+
padding: 6px 12px;
|
|
61
62
|
border: 1px solid currentColor;
|
|
62
63
|
border-radius: 999px;
|
|
63
64
|
color: inherit;
|
|
64
|
-
font-size:
|
|
65
|
+
font-size: 16px;
|
|
65
66
|
text-decoration: none;
|
|
67
|
+
margin-bottom: 30px;
|
|
66
68
|
}
|
|
67
69
|
.DetailsContainer .BlogContent {
|
|
68
70
|
font-size: 14px;
|
|
@@ -158,4 +160,32 @@
|
|
|
158
160
|
.DetailsContainer {
|
|
159
161
|
font-size: 12px;
|
|
160
162
|
}
|
|
163
|
+
}
|
|
164
|
+
.BlogAuthor {
|
|
165
|
+
display: flex;
|
|
166
|
+
gap: 4px;
|
|
167
|
+
min-width: 0;
|
|
168
|
+
margin: 0 0 10px;
|
|
169
|
+
font-size: 14px;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
}
|
|
172
|
+
.BlogAuthor .BlogAuthorName {
|
|
173
|
+
min-width: 0;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
font-weight: 700;
|
|
176
|
+
text-decoration: underline;
|
|
177
|
+
text-overflow: ellipsis;
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
}
|
|
180
|
+
.BlogAuthor .BlogAuthorName:hover {
|
|
181
|
+
color: var(--emw--color-primary, #CD0B5E);
|
|
182
|
+
}
|
|
183
|
+
.BlogAuthor .BlogAuthorName:focus-visible {
|
|
184
|
+
outline: 2px solid var(--emw--color-primary, #CD0B5E);
|
|
185
|
+
outline-offset: 2px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.BlogArticleTitle {
|
|
189
|
+
margin: 0;
|
|
190
|
+
color: var(--emw--color-typography-contrast, #fff);
|
|
161
191
|
}
|
|
@@ -35,6 +35,8 @@ export class BlogArticleDetails {
|
|
|
35
35
|
this.postSlug = undefined;
|
|
36
36
|
this.postCustomPath = undefined;
|
|
37
37
|
this.intlDateTimeFormat = '';
|
|
38
|
+
this.showArticleTitle = false;
|
|
39
|
+
this.showAuthor = false;
|
|
38
40
|
this.hasErrors = false;
|
|
39
41
|
this.isLoading = true;
|
|
40
42
|
this.bannerMatrixReady = false;
|
|
@@ -277,7 +279,7 @@ export class BlogArticleDetails {
|
|
|
277
279
|
return (_b = (_a = image === null || image === void 0 ? void 0 : image.sources) === null || _a === void 0 ? void 0 : _a[sourceIndex]) === null || _b === void 0 ? void 0 : _b.pictureSource;
|
|
278
280
|
}
|
|
279
281
|
render() {
|
|
280
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
282
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
281
283
|
if (this.hasErrors) {
|
|
282
284
|
return (h("div", { class: "BlogArticleDetails" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
283
285
|
}
|
|
@@ -294,7 +296,9 @@ export class BlogArticleDetails {
|
|
|
294
296
|
h("div", { class: "BlogTitle" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title), this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: homeUrl }, translate('home', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), primaryCategory && [
|
|
295
297
|
h("a", { href: `${homeUrl}/blog/category/${encodeURIComponent(primaryCategory.slug)}` }, primaryCategory.name),
|
|
296
298
|
h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
297
|
-
], h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (h("div", { class: "BlogCategoryPills" }, categories.map(category => (h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.
|
|
299
|
+
], h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (h("div", { class: "BlogCategoryPills" }, categories.map(category => (h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.showArticleTitle &&
|
|
300
|
+
h("h1", { class: "BlogArticleTitle" }, (_g = this.blogData) === null || _g === void 0 ? void 0 : _g.title), this.showAuthor && ((_h = this.blogData) === null || _h === void 0 ? void 0 : _h.author) &&
|
|
301
|
+
h("p", { class: "BlogAuthor" }, translate('by', this.language), " ", h("strong", { class: "BlogAuthorName" }, (_j = this.blogData) === null || _j === void 0 ? void 0 : _j.author)), this.showContent && this.renderContentConditionally((_k = this.blogData) === null || _k === void 0 ? void 0 : _k.content)), this.showRelatedArticles && this.relatedPosts.length > 0 && (h("nav", { class: "RelatedPosts", "aria-label": translate('relatedArticles', this.language) }, h("h2", { class: "RelatedPostsTitle" }, translate('relatedArticles', this.language)), h("ul", { class: "RelatedPostsList" }, this.relatedPosts.map(post => (h("li", null, h("a", { href: `${homeUrl}/blog/${encodeURIComponent(post.customPath || post.slug || '')}` }, post.title || post.customPath || post.slug))))))), this.showMoreArticles && (previous || next) && (h("nav", { class: "AdjacentPosts", "aria-label": translate('moreArticles', this.language) }, previous && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(previous.customPath || previous.slug || '')}`, rel: "prev" }, "\u2190 ", translate('previousArticle', this.language), ": ", previous.title || previous.customPath || previous.slug), next && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(next.customPath || next.slug || '')}`, rel: "next" }, translate('nextArticle', this.language), ": ", next.title || next.customPath || next.slug, " \u2192")))))));
|
|
298
302
|
}
|
|
299
303
|
static get is() { return "blog-article-details"; }
|
|
300
304
|
static get encapsulation() { return "shadow"; }
|
|
@@ -664,6 +668,42 @@ export class BlogArticleDetails {
|
|
|
664
668
|
"attribute": "intl-date-time-format",
|
|
665
669
|
"reflect": false,
|
|
666
670
|
"defaultValue": "''"
|
|
671
|
+
},
|
|
672
|
+
"showArticleTitle": {
|
|
673
|
+
"type": "boolean",
|
|
674
|
+
"mutable": false,
|
|
675
|
+
"complexType": {
|
|
676
|
+
"original": "boolean",
|
|
677
|
+
"resolved": "boolean",
|
|
678
|
+
"references": {}
|
|
679
|
+
},
|
|
680
|
+
"required": false,
|
|
681
|
+
"optional": false,
|
|
682
|
+
"docs": {
|
|
683
|
+
"tags": [],
|
|
684
|
+
"text": "Property used to display Article title (above blog content)"
|
|
685
|
+
},
|
|
686
|
+
"attribute": "show-article-title",
|
|
687
|
+
"reflect": true,
|
|
688
|
+
"defaultValue": "false"
|
|
689
|
+
},
|
|
690
|
+
"showAuthor": {
|
|
691
|
+
"type": "boolean",
|
|
692
|
+
"mutable": false,
|
|
693
|
+
"complexType": {
|
|
694
|
+
"original": "boolean",
|
|
695
|
+
"resolved": "boolean",
|
|
696
|
+
"references": {}
|
|
697
|
+
},
|
|
698
|
+
"required": false,
|
|
699
|
+
"optional": false,
|
|
700
|
+
"docs": {
|
|
701
|
+
"tags": [],
|
|
702
|
+
"text": "Property used to display author."
|
|
703
|
+
},
|
|
704
|
+
"attribute": "show-author",
|
|
705
|
+
"reflect": true,
|
|
706
|
+
"defaultValue": "false"
|
|
667
707
|
}
|
|
668
708
|
};
|
|
669
709
|
}
|
|
@@ -9,6 +9,7 @@ const TRANSLATIONS = {
|
|
|
9
9
|
relatedArticles: 'Related articles',
|
|
10
10
|
previousArticle: 'Previous article',
|
|
11
11
|
nextArticle: 'Next article',
|
|
12
|
+
by: 'by',
|
|
12
13
|
},
|
|
13
14
|
ro: {
|
|
14
15
|
error: 'Error',
|
|
@@ -19,6 +20,7 @@ const TRANSLATIONS = {
|
|
|
19
20
|
relatedArticles: 'Related articles',
|
|
20
21
|
previousArticle: 'Previous article',
|
|
21
22
|
nextArticle: 'Next article',
|
|
23
|
+
by: 'by',
|
|
22
24
|
},
|
|
23
25
|
fr: {
|
|
24
26
|
error: 'Error',
|
|
@@ -29,6 +31,7 @@ const TRANSLATIONS = {
|
|
|
29
31
|
relatedArticles: 'Related articles',
|
|
30
32
|
previousArticle: 'Previous article',
|
|
31
33
|
nextArticle: 'Next article',
|
|
34
|
+
by: 'by',
|
|
32
35
|
},
|
|
33
36
|
ar: {
|
|
34
37
|
error: 'Error',
|
|
@@ -39,6 +42,7 @@ const TRANSLATIONS = {
|
|
|
39
42
|
relatedArticles: 'Related articles',
|
|
40
43
|
previousArticle: 'Previous article',
|
|
41
44
|
nextArticle: 'Next article',
|
|
45
|
+
by: 'by',
|
|
42
46
|
},
|
|
43
47
|
hr: {
|
|
44
48
|
error: 'Error',
|
|
@@ -49,6 +53,7 @@ const TRANSLATIONS = {
|
|
|
49
53
|
relatedArticles: 'Related articles',
|
|
50
54
|
previousArticle: 'Previous article',
|
|
51
55
|
nextArticle: 'Next article',
|
|
56
|
+
by: 'by',
|
|
52
57
|
},
|
|
53
58
|
'pt-br': {
|
|
54
59
|
error: 'Error',
|
|
@@ -59,6 +64,7 @@ const TRANSLATIONS = {
|
|
|
59
64
|
relatedArticles: 'Related articles',
|
|
60
65
|
previousArticle: 'Previous article',
|
|
61
66
|
nextArticle: 'Next article',
|
|
67
|
+
by: 'by',
|
|
62
68
|
},
|
|
63
69
|
'es-mx': {
|
|
64
70
|
error: 'Error',
|
|
@@ -69,6 +75,7 @@ const TRANSLATIONS = {
|
|
|
69
75
|
relatedArticles: 'Related articles',
|
|
70
76
|
previousArticle: 'Previous article',
|
|
71
77
|
nextArticle: 'Next article',
|
|
78
|
+
by: 'by',
|
|
72
79
|
}
|
|
73
80
|
};
|
|
74
81
|
export const translate = (key, customLang) => {
|
|
@@ -11,6 +11,7 @@ const TRANSLATIONS = {
|
|
|
11
11
|
relatedArticles: 'Related articles',
|
|
12
12
|
previousArticle: 'Previous article',
|
|
13
13
|
nextArticle: 'Next article',
|
|
14
|
+
by: 'by',
|
|
14
15
|
},
|
|
15
16
|
ro: {
|
|
16
17
|
error: 'Error',
|
|
@@ -21,6 +22,7 @@ const TRANSLATIONS = {
|
|
|
21
22
|
relatedArticles: 'Related articles',
|
|
22
23
|
previousArticle: 'Previous article',
|
|
23
24
|
nextArticle: 'Next article',
|
|
25
|
+
by: 'by',
|
|
24
26
|
},
|
|
25
27
|
fr: {
|
|
26
28
|
error: 'Error',
|
|
@@ -31,6 +33,7 @@ const TRANSLATIONS = {
|
|
|
31
33
|
relatedArticles: 'Related articles',
|
|
32
34
|
previousArticle: 'Previous article',
|
|
33
35
|
nextArticle: 'Next article',
|
|
36
|
+
by: 'by',
|
|
34
37
|
},
|
|
35
38
|
ar: {
|
|
36
39
|
error: 'Error',
|
|
@@ -41,6 +44,7 @@ const TRANSLATIONS = {
|
|
|
41
44
|
relatedArticles: 'Related articles',
|
|
42
45
|
previousArticle: 'Previous article',
|
|
43
46
|
nextArticle: 'Next article',
|
|
47
|
+
by: 'by',
|
|
44
48
|
},
|
|
45
49
|
hr: {
|
|
46
50
|
error: 'Error',
|
|
@@ -51,6 +55,7 @@ const TRANSLATIONS = {
|
|
|
51
55
|
relatedArticles: 'Related articles',
|
|
52
56
|
previousArticle: 'Previous article',
|
|
53
57
|
nextArticle: 'Next article',
|
|
58
|
+
by: 'by',
|
|
54
59
|
},
|
|
55
60
|
'pt-br': {
|
|
56
61
|
error: 'Error',
|
|
@@ -61,6 +66,7 @@ const TRANSLATIONS = {
|
|
|
61
66
|
relatedArticles: 'Related articles',
|
|
62
67
|
previousArticle: 'Previous article',
|
|
63
68
|
nextArticle: 'Next article',
|
|
69
|
+
by: 'by',
|
|
64
70
|
},
|
|
65
71
|
'es-mx': {
|
|
66
72
|
error: 'Error',
|
|
@@ -71,6 +77,7 @@ const TRANSLATIONS = {
|
|
|
71
77
|
relatedArticles: 'Related articles',
|
|
72
78
|
previousArticle: 'Previous article',
|
|
73
79
|
nextArticle: 'Next article',
|
|
80
|
+
by: 'by',
|
|
74
81
|
}
|
|
75
82
|
};
|
|
76
83
|
const translate = (key, customLang) => {
|
|
@@ -283,7 +290,7 @@ const getDevicePlatform = () => {
|
|
|
283
290
|
return 'mtWeb';
|
|
284
291
|
};
|
|
285
292
|
|
|
286
|
-
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding:
|
|
293
|
+
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n margin-bottom: 30px;\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.DetailsContainer {\n background-color: #07072A;\n position: relative;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n.DetailsContainer .BlogBanner img {\n display: block;\n width: 100%;\n height: 400px;\n object-fit: cover;\n}\n.DetailsContainer .DetailsHeadWrapper {\n position: relative;\n}\n.DetailsContainer .DetailsBodyWrapper {\n padding: 30px;\n}\n.DetailsContainer .BlogDate {\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n position: absolute;\n bottom: 0;\n left: 30px;\n}\n.DetailsContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n}\n.DetailsContainer .BlogCategoryPills {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.DetailsContainer .BlogCategoryLink {\n position: relative;\n z-index: 3;\n padding: 6px 12px;\n border: 1px solid currentColor;\n border-radius: 999px;\n color: inherit;\n font-size: 16px;\n text-decoration: none;\n margin-bottom: 30px;\n}\n.DetailsContainer .BlogContent {\n font-size: 14px;\n}\n.DetailsContainer .BlogContent p:last-child {\n margin-bottom: 0;\n}\n\n.BackButton {\n position: absolute;\n top: 30px;\n left: 30px;\n z-index: 2;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n min-width: 100px;\n height: 32px;\n padding: 0 12px;\n border: none;\n border-radius: 5px;\n background: var(--emw--color-primary, #524e52);\n color: var(--emw--color-typography-contrast, #fff);\n font: inherit;\n text-decoration: none;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: all 0.1s linear;\n}\n\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BackButton {\n position: static;\n align-self: flex-start;\n margin: 30px 30px 16px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogDate {\n position: static;\n display: block;\n margin-left: 30px;\n}\n.DetailsContainer:not(:has(.BlogBanner img, .BlogBanner video)) .BlogBanner {\n display: none;\n}\n\n.AdjacentPosts {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n gap: 20px;\n padding: 30px;\n}\n.AdjacentPosts a {\n flex: 1 1 250px;\n}\n.AdjacentPosts a[rel=next] {\n margin-left: auto;\n text-align: right;\n}\n\n.RelatedPosts {\n padding: 30px 30px 0;\n}\n\n.RelatedPostsTitle {\n margin: 0 0 12px;\n font-size: 1.25em;\n}\n\n.RelatedPostsList {\n display: grid;\n gap: 8px;\n margin: 0;\n padding-left: 20px;\n}\n\n.RelatedPosts a,\n.AdjacentPosts a {\n color: var(--emw--color-primary, #fff);\n font: inherit;\n text-decoration: underline;\n}\n\n.BackButton:focus-visible,\n.RelatedPosts a:focus-visible,\n.AdjacentPosts a:focus-visible {\n outline: 2px solid var(--emw--color-primary, #fff);\n outline-offset: 3px;\n}\n\n@container (max-width: 475px) {\n .DetailsContainer {\n font-size: 12px;\n }\n}\n.BlogAuthor {\n display: flex;\n gap: 4px;\n min-width: 0;\n margin: 0 0 10px;\n font-size: 14px;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName {\n min-width: 0;\n overflow: hidden;\n font-weight: 700;\n text-decoration: underline;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.BlogAuthor .BlogAuthorName:hover {\n color: var(--emw--color-primary, #CD0B5E);\n}\n.BlogAuthor .BlogAuthorName:focus-visible {\n outline: 2px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: 2px;\n}\n\n.BlogArticleTitle {\n margin: 0;\n color: var(--emw--color-typography-contrast, #fff);\n}";
|
|
287
294
|
const BlogArticleDetailsStyle0 = blogArticleDetailsCss;
|
|
288
295
|
|
|
289
296
|
const BlogArticleDetails = class {
|
|
@@ -320,6 +327,8 @@ const BlogArticleDetails = class {
|
|
|
320
327
|
this.postSlug = undefined;
|
|
321
328
|
this.postCustomPath = undefined;
|
|
322
329
|
this.intlDateTimeFormat = '';
|
|
330
|
+
this.showArticleTitle = false;
|
|
331
|
+
this.showAuthor = false;
|
|
323
332
|
this.hasErrors = false;
|
|
324
333
|
this.isLoading = true;
|
|
325
334
|
this.bannerMatrixReady = false;
|
|
@@ -561,7 +570,7 @@ const BlogArticleDetails = class {
|
|
|
561
570
|
return (_b = (_a = image === null || image === void 0 ? void 0 : image.sources) === null || _a === void 0 ? void 0 : _a[sourceIndex]) === null || _b === void 0 ? void 0 : _b.pictureSource;
|
|
562
571
|
}
|
|
563
572
|
render() {
|
|
564
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
573
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
565
574
|
if (this.hasErrors) {
|
|
566
575
|
return (h("div", { class: "BlogArticleDetails" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
567
576
|
}
|
|
@@ -578,7 +587,9 @@ const BlogArticleDetails = class {
|
|
|
578
587
|
h("div", { class: "BlogTitle" }, (_e = this.blogData) === null || _e === void 0 ? void 0 : _e.title), this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: homeUrl }, translate('home', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), h("a", { href: `${homeUrl}/blog` }, translate('blog', this.language)), h("span", { "aria-hidden": "true" }, "\u203A"), primaryCategory && [
|
|
579
588
|
h("a", { href: `${homeUrl}/blog/category/${encodeURIComponent(primaryCategory.slug)}` }, primaryCategory.name),
|
|
580
589
|
h("span", { "aria-hidden": "true" }, "\u203A"),
|
|
581
|
-
], h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (h("div", { class: "BlogCategoryPills" }, categories.map(category => (h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.
|
|
590
|
+
], h("span", { "aria-current": "page" }, (_f = this.blogData) === null || _f === void 0 ? void 0 : _f.title))), categories.length > 0 && (h("div", { class: "BlogCategoryPills" }, categories.map(category => (h("a", { class: "BlogCategoryLink", href: `${homeUrl}/blog/category/${encodeURIComponent(category.slug)}` }, category.name))))), this.showArticleTitle &&
|
|
591
|
+
h("h1", { class: "BlogArticleTitle" }, (_g = this.blogData) === null || _g === void 0 ? void 0 : _g.title), this.showAuthor && ((_h = this.blogData) === null || _h === void 0 ? void 0 : _h.author) &&
|
|
592
|
+
h("p", { class: "BlogAuthor" }, translate('by', this.language), " ", h("strong", { class: "BlogAuthorName" }, (_j = this.blogData) === null || _j === void 0 ? void 0 : _j.author)), this.showContent && this.renderContentConditionally((_k = this.blogData) === null || _k === void 0 ? void 0 : _k.content)), this.showRelatedArticles && this.relatedPosts.length > 0 && (h("nav", { class: "RelatedPosts", "aria-label": translate('relatedArticles', this.language) }, h("h2", { class: "RelatedPostsTitle" }, translate('relatedArticles', this.language)), h("ul", { class: "RelatedPostsList" }, this.relatedPosts.map(post => (h("li", null, h("a", { href: `${homeUrl}/blog/${encodeURIComponent(post.customPath || post.slug || '')}` }, post.title || post.customPath || post.slug))))))), this.showMoreArticles && (previous || next) && (h("nav", { class: "AdjacentPosts", "aria-label": translate('moreArticles', this.language) }, previous && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(previous.customPath || previous.slug || '')}`, rel: "prev" }, "\u2190 ", translate('previousArticle', this.language), ": ", previous.title || previous.customPath || previous.slug), next && h("a", { href: `${homeUrl}/blog/${encodeURIComponent(next.customPath || next.slug || '')}`, rel: "next" }, translate('nextArticle', this.language), ": ", next.title || next.customPath || next.slug, " \u2192")))))));
|
|
582
593
|
}
|
|
583
594
|
static get watchers() { return {
|
|
584
595
|
"postId": ["watchEndpoint"],
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"showArticleTitle":[516,"show-article-title"],"showAuthor":[516,"show-author"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
20
20
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showBreadcrumb":[516,"show-breadcrumb"],"hideCategory":[513,"hide-category"],"showContent":[516,"show-content"],"showMoreArticles":[516,"show-more-articles"],"showRelatedArticles":[516,"show-related-articles"],"showBackButton":[516,"show-back-button"],"postId":[513,"post-id"],"postSlug":[513,"post-slug"],"postCustomPath":[513,"post-custom-path"],"intlDateTimeFormat":[1,"intl-date-time-format"],"showArticleTitle":[516,"show-article-title"],"showAuthor":[516,"show-author"],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32],"categories":[32],"neighbours":[32],"relatedPosts":[32]},[[8,"BannerMatrixReady","handleBannerReady"]],{"postId":["watchEndpoint"],"postSlug":["watchEndpoint"],"postCustomPath":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"showRelatedArticles":["handleRelatedArticlesChange"],"showMoreArticles":["handleMoreArticlesChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -80,6 +80,14 @@ export declare class BlogArticleDetails {
|
|
|
80
80
|
* Intl date format
|
|
81
81
|
*/
|
|
82
82
|
intlDateTimeFormat: string;
|
|
83
|
+
/**
|
|
84
|
+
* Property used to display Article title (above blog content)
|
|
85
|
+
*/
|
|
86
|
+
showArticleTitle: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Property used to display author.
|
|
89
|
+
*/
|
|
90
|
+
showAuthor: boolean;
|
|
83
91
|
private hasErrors;
|
|
84
92
|
private isLoading;
|
|
85
93
|
bannerMatrixReady: boolean;
|
|
@@ -51,6 +51,14 @@ export namespace Components {
|
|
|
51
51
|
* Slug of post
|
|
52
52
|
*/
|
|
53
53
|
"postSlug"?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Property used to display Article title (above blog content)
|
|
56
|
+
*/
|
|
57
|
+
"showArticleTitle": boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Property used to display author.
|
|
60
|
+
*/
|
|
61
|
+
"showAuthor": boolean;
|
|
54
62
|
/**
|
|
55
63
|
* Display the Back to blog link.
|
|
56
64
|
*/
|
|
@@ -146,6 +154,14 @@ declare namespace LocalJSX {
|
|
|
146
154
|
* Slug of post
|
|
147
155
|
*/
|
|
148
156
|
"postSlug"?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Property used to display Article title (above blog content)
|
|
159
|
+
*/
|
|
160
|
+
"showArticleTitle"?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Property used to display author.
|
|
163
|
+
*/
|
|
164
|
+
"showAuthor"?: boolean;
|
|
149
165
|
/**
|
|
150
166
|
* Display the Back to blog link.
|
|
151
167
|
*/
|