@everymatrix/blog-articles-grid
Advanced tools
Comparing version 1.13.23 to 1.13.24
@@ -1,1 +0,1 @@ | ||
import{p as e,b as t}from"./p-ed2f13d0.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-53160722",[[1,"blog-articles-grid",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],handleClick:[513,"handle-click"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showContent:[516,"show-content"],showButton:[516,"show-button"],usePostmessage:[516,"use-postmessage"],postMessageEvent:[513,"post-message-event"],blogsLimit:[514,"blogs-limit"],paginationActive:[516,"pagination-active"],arrowsActive:[516,"arrows-active"],secondaryArrowsActive:[516,"secondary-arrows-active"],numberedNavActive:[516,"numbered-nav-active"],intlDateTimeFormat:[1,"intl-date-time-format"],paginationBlogList:[32],currentPage:[32],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],bannerMatrixReady:[32],nextPage:[32],previousPage:[32],device:[32]},[[8,"BannerMatrixReady","handleBannerReady"],[0,"hpPageChange","hpPageChange"]]],[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]]],e))); | ||
import{p as e,b as t}from"./p-ed2f13d0.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-b0c0846e",[[1,"blog-articles-grid",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],handleClick:[513,"handle-click"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showContent:[516,"show-content"],showButton:[516,"show-button"],usePostmessage:[516,"use-postmessage"],postMessageEvent:[513,"post-message-event"],blogsLimit:[514,"blogs-limit"],paginationActive:[516,"pagination-active"],arrowsActive:[516,"arrows-active"],secondaryArrowsActive:[516,"secondary-arrows-active"],numberedNavActive:[516,"numbered-nav-active"],intlDateTimeFormat:[1,"intl-date-time-format"],paginationBlogList:[32],currentPage:[32],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],bannerMatrixReady:[32],nextPage:[32],previousPage:[32],device:[32]},[[8,"BannerMatrixReady","handleBannerReady"],[0,"hpPageChange","hpPageChange"]]],[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]]],e))); |
@@ -213,2 +213,17 @@ 'use strict'; | ||
}; | ||
this.setImage = (image) => { | ||
let source = ''; | ||
switch (this.device) { | ||
case 'mobile': | ||
source = image.sources[0].pictureSource; | ||
break; | ||
case 'tablet': | ||
source = image.sources[1].pictureSource; | ||
break; | ||
case 'desktop': | ||
source = image.sources[2].pictureSource; | ||
break; | ||
} | ||
return source; | ||
}; | ||
this.renderContentConditionally = (content) => { | ||
@@ -353,5 +368,5 @@ if (!content) | ||
return index.h("div", { class: "GridContainer" }, this.showPublishingDate && | ||
index.h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (index.h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (index.h("img", { src: data.image.src, alt: data.image.src })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (index.h("video", { src: data.video.sources[this.device], controls: true })) : (index.h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
index.h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (index.h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (index.h("img", { src: this.setImage(data.image), alt: data.image.slug })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (index.h("video", { src: data.video.sources[this.device], controls: true })) : (index.h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
index.h("div", { class: "BlogTitle" }, data === null || data === void 0 ? void 0 : data.title), this.showContent && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.content), this.showButton && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.descriptionPreview), this.showButton && | ||
index.h("div", { class: "BlogLink" }, index.h("button", { onClick: () => this.handleAction(data === null || data === void 0 ? void 0 : data.postID, data === null || data === void 0 ? void 0 : data.slug) }, translate$1('readmore', this.language)))); | ||
@@ -358,0 +373,0 @@ })))); |
@@ -133,2 +133,17 @@ import { Component, Prop, State, Event, Watch, h, Listen } from '@stencil/core'; | ||
}; | ||
this.setImage = (image) => { | ||
let source = ''; | ||
switch (this.device) { | ||
case 'mobile': | ||
source = image.sources[0].pictureSource; | ||
break; | ||
case 'tablet': | ||
source = image.sources[1].pictureSource; | ||
break; | ||
case 'desktop': | ||
source = image.sources[2].pictureSource; | ||
break; | ||
} | ||
return source; | ||
}; | ||
this.renderContentConditionally = (content) => { | ||
@@ -278,7 +293,7 @@ if (!content) | ||
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), | ||
this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: data.image.src, alt: data.image.src })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), | ||
this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: this.setImage(data.image), alt: data.image.slug })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), | ||
this.showTitle && | ||
h("div", { class: "BlogTitle" }, data === null || data === void 0 ? void 0 : data.title), | ||
this.showContent && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.content), | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.descriptionPreview), | ||
this.showButton && | ||
@@ -285,0 +300,0 @@ h("div", { class: "BlogLink" }, |
@@ -212,2 +212,17 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client'; | ||
}; | ||
this.setImage = (image) => { | ||
let source = ''; | ||
switch (this.device) { | ||
case 'mobile': | ||
source = image.sources[0].pictureSource; | ||
break; | ||
case 'tablet': | ||
source = image.sources[1].pictureSource; | ||
break; | ||
case 'desktop': | ||
source = image.sources[2].pictureSource; | ||
break; | ||
} | ||
return source; | ||
}; | ||
this.renderContentConditionally = (content) => { | ||
@@ -352,5 +367,5 @@ if (!content) | ||
return h("div", { class: "GridContainer" }, this.showPublishingDate && | ||
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: data.image.src, alt: data.image.src })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: this.setImage(data.image), alt: data.image.slug })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
h("div", { class: "BlogTitle" }, data === null || data === void 0 ? void 0 : data.title), this.showContent && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.content), this.showButton && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.descriptionPreview), this.showButton && | ||
h("div", { class: "BlogLink" }, h("button", { onClick: () => this.handleAction(data === null || data === void 0 ? void 0 : data.postID, data === null || data === void 0 ? void 0 : data.slug) }, translate('readmore', this.language)))); | ||
@@ -357,0 +372,0 @@ })))); |
@@ -209,2 +209,17 @@ import { r as registerInstance, c as createEvent, h } from './index-c02b7464.js'; | ||
}; | ||
this.setImage = (image) => { | ||
let source = ''; | ||
switch (this.device) { | ||
case 'mobile': | ||
source = image.sources[0].pictureSource; | ||
break; | ||
case 'tablet': | ||
source = image.sources[1].pictureSource; | ||
break; | ||
case 'desktop': | ||
source = image.sources[2].pictureSource; | ||
break; | ||
} | ||
return source; | ||
}; | ||
this.renderContentConditionally = (content) => { | ||
@@ -349,5 +364,5 @@ if (!content) | ||
return h("div", { class: "GridContainer" }, this.showPublishingDate && | ||
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: data.image.src, alt: data.image.src })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
h("div", { class: "BlogDate" }, this.formatDate(data === null || data === void 0 ? void 0 : data.publishingDate)), this.showImage && (h("div", { class: "BlogBanner" }, ((_a = data.image) === null || _a === void 0 ? void 0 : _a.src) ? (h("img", { src: this.setImage(data.image), alt: data.image.slug })) : (((_b = data.video) === null || _b === void 0 ? void 0 : _b.sources[this.device]) ? (h("video", { src: data.video.sources[this.device], controls: true })) : (h("h1", { style: { color: "white" } }, "No Image"))))), this.showTitle && | ||
h("div", { class: "BlogTitle" }, data === null || data === void 0 ? void 0 : data.title), this.showContent && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.content), this.showButton && | ||
this.renderContentConditionally(data === null || data === void 0 ? void 0 : data.descriptionPreview), this.showButton && | ||
h("div", { class: "BlogLink" }, h("button", { onClick: () => this.handleAction(data === null || data === void 0 ? void 0 : data.postID, data === null || data === void 0 ? void 0 : data.slug) }, translate$1('readmore', this.language)))); | ||
@@ -354,0 +369,0 @@ })))); |
@@ -112,2 +112,3 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
setClientStylingURL: () => void; | ||
setImage: (image: any) => string; | ||
formatDate(dateString: any): string; | ||
@@ -114,0 +115,0 @@ renderContentConditionally: (content: string) => HTMLElement; |
{ | ||
"name": "@everymatrix/blog-articles-grid", | ||
"version": "1.13.23", | ||
"version": "1.13.24", | ||
"main": "./dist/index.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.js", |
454005
8132