@everymatrix/blog-articles-grid
Advanced tools
Comparing version 1.14.25 to 1.15.0
@@ -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-65b901c5",[[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:[513,"intl-date-time-format"],page:[513],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-29cc671d",[[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:[513,"intl-date-time-format"],page:[513],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))); |
@@ -243,6 +243,6 @@ 'use strict'; | ||
} | ||
getArticleId(postId, slug) { | ||
this.articleActionButton.emit({ postId, slug }); | ||
getArticleId(postId, slug, customPath) { | ||
this.articleActionButton.emit({ postId, slug, customPath }); | ||
if (this.usePostmessage) { | ||
window.postMessage({ type: this.postMessageEvent, postId, slug }); | ||
window.postMessage({ type: this.postMessageEvent, postId, slug, customPath }); | ||
} | ||
@@ -263,3 +263,5 @@ } | ||
this.currentPage = Math.floor(((_a = this.paginationBlogList) === null || _a === void 0 ? void 0 : _a.offset) / ((_b = this.paginationBlogList) === null || _b === void 0 ? void 0 : _b.limit)); | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage + 1 > this.lastPage) { | ||
@@ -269,5 +271,2 @@ this.nextPage = null; | ||
} | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage < 0) { | ||
@@ -277,6 +276,7 @@ this.previousPage = null; | ||
} | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
this.getBlogArticleGrid(); | ||
} | ||
handleAction(postId, slug) { | ||
this.getArticleId(postId, slug); | ||
handleAction(postId, slug, customPath) { | ||
this.getArticleId(postId, slug, customPath); | ||
} | ||
@@ -385,3 +385,3 @@ connectedCallback() { | ||
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)))); | ||
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, data === null || data === void 0 ? void 0 : data.customPath) }, translate$1('readmore', this.language)))); | ||
})))); | ||
@@ -388,0 +388,0 @@ } |
@@ -165,6 +165,6 @@ import { Component, Prop, State, Event, Watch, h, Listen } from '@stencil/core'; | ||
} | ||
getArticleId(postId, slug) { | ||
this.articleActionButton.emit({ postId, slug }); | ||
getArticleId(postId, slug, customPath) { | ||
this.articleActionButton.emit({ postId, slug, customPath }); | ||
if (this.usePostmessage) { | ||
window.postMessage({ type: this.postMessageEvent, postId, slug }); | ||
window.postMessage({ type: this.postMessageEvent, postId, slug, customPath }); | ||
} | ||
@@ -185,3 +185,5 @@ } | ||
this.currentPage = Math.floor(((_a = this.paginationBlogList) === null || _a === void 0 ? void 0 : _a.offset) / ((_b = this.paginationBlogList) === null || _b === void 0 ? void 0 : _b.limit)); | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage + 1 > this.lastPage) { | ||
@@ -191,5 +193,2 @@ this.nextPage = null; | ||
} | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage < 0) { | ||
@@ -199,6 +198,7 @@ this.previousPage = null; | ||
} | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
this.getBlogArticleGrid(); | ||
} | ||
handleAction(postId, slug) { | ||
this.getArticleId(postId, slug); | ||
handleAction(postId, slug, customPath) { | ||
this.getArticleId(postId, slug, customPath); | ||
} | ||
@@ -316,3 +316,3 @@ connectedCallback() { | ||
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)))); | ||
h("button", { onClick: () => this.handleAction(data === null || data === void 0 ? void 0 : data.postID, data === null || data === void 0 ? void 0 : data.slug, data === null || data === void 0 ? void 0 : data.customPath) }, translate('readmore', this.language)))); | ||
})))); | ||
@@ -319,0 +319,0 @@ } |
@@ -242,6 +242,6 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client'; | ||
} | ||
getArticleId(postId, slug) { | ||
this.articleActionButton.emit({ postId, slug }); | ||
getArticleId(postId, slug, customPath) { | ||
this.articleActionButton.emit({ postId, slug, customPath }); | ||
if (this.usePostmessage) { | ||
window.postMessage({ type: this.postMessageEvent, postId, slug }); | ||
window.postMessage({ type: this.postMessageEvent, postId, slug, customPath }); | ||
} | ||
@@ -262,3 +262,5 @@ } | ||
this.currentPage = Math.floor(((_a = this.paginationBlogList) === null || _a === void 0 ? void 0 : _a.offset) / ((_b = this.paginationBlogList) === null || _b === void 0 ? void 0 : _b.limit)); | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage + 1 > this.lastPage) { | ||
@@ -268,5 +270,2 @@ this.nextPage = null; | ||
} | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage < 0) { | ||
@@ -276,6 +275,7 @@ this.previousPage = null; | ||
} | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
this.getBlogArticleGrid(); | ||
} | ||
handleAction(postId, slug) { | ||
this.getArticleId(postId, slug); | ||
handleAction(postId, slug, customPath) { | ||
this.getArticleId(postId, slug, customPath); | ||
} | ||
@@ -384,3 +384,3 @@ connectedCallback() { | ||
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)))); | ||
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, data === null || data === void 0 ? void 0 : data.customPath) }, translate('readmore', this.language)))); | ||
})))); | ||
@@ -387,0 +387,0 @@ } |
@@ -239,6 +239,6 @@ import { r as registerInstance, c as createEvent, h } from './index-c02b7464.js'; | ||
} | ||
getArticleId(postId, slug) { | ||
this.articleActionButton.emit({ postId, slug }); | ||
getArticleId(postId, slug, customPath) { | ||
this.articleActionButton.emit({ postId, slug, customPath }); | ||
if (this.usePostmessage) { | ||
window.postMessage({ type: this.postMessageEvent, postId, slug }); | ||
window.postMessage({ type: this.postMessageEvent, postId, slug, customPath }); | ||
} | ||
@@ -259,3 +259,5 @@ } | ||
this.currentPage = Math.floor(((_a = this.paginationBlogList) === null || _a === void 0 ? void 0 : _a.offset) / ((_b = this.paginationBlogList) === null || _b === void 0 ? void 0 : _b.limit)); | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage + 1 > this.lastPage) { | ||
@@ -265,5 +267,2 @@ this.nextPage = null; | ||
} | ||
if (this.page) { | ||
this.currentPage = this.currentPage + +this.page - 1; | ||
} | ||
if (this.currentPage < 0) { | ||
@@ -273,6 +272,7 @@ this.previousPage = null; | ||
} | ||
window.postMessage({ type: 'BlogArticlesGridActivePagination', currentPage: this.currentPage }, window.location.href); | ||
this.getBlogArticleGrid(); | ||
} | ||
handleAction(postId, slug) { | ||
this.getArticleId(postId, slug); | ||
handleAction(postId, slug, customPath) { | ||
this.getArticleId(postId, slug, customPath); | ||
} | ||
@@ -381,3 +381,3 @@ connectedCallback() { | ||
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)))); | ||
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, data === null || data === void 0 ? void 0 : data.customPath) }, translate$1('readmore', this.language)))); | ||
})))); | ||
@@ -384,0 +384,0 @@ } |
@@ -89,3 +89,3 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
articleActionButton: EventEmitter<Object>; | ||
getArticleId(postId: number, slug: string): void; | ||
getArticleId(postId: number, slug: string, customPath: string): void; | ||
paginationBlogList: any; | ||
@@ -107,3 +107,3 @@ currentPage: number; | ||
hpPageChange(event: CustomEvent<BlogArticlesGrid>): void; | ||
handleAction(postId: any, slug: string): void; | ||
handleAction(postId: any, slug: string, customPath: string): void; | ||
connectedCallback(): void; | ||
@@ -110,0 +110,0 @@ componentDidLoad(): void; |
{ | ||
"name": "@everymatrix/blog-articles-grid", | ||
"version": "1.14.25", | ||
"version": "1.15.0", | ||
"main": "./dist/index.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.js", |
457527
8226