Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@everymatrix/blog-article-details

Package Overview
Dependencies
Maintainers
12
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@everymatrix/blog-article-details - npm Package Compare versions

Comparing version 1.13.24 to 1.14.0

dist/blog-article-details/p-dff3451f.entry.js

2

dist/blog-article-details/blog-article-details.esm.js

@@ -1,1 +0,1 @@

import{p as e,b as t}from"./p-68e0210a.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-fe2c1ce6",[[1,"blog-article-details",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],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"],postMessageEvent:[513,"post-message-event"],postId:[514,"post-id"],intlDateTimeFormat:[1,"intl-date-time-format"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],bannerMatrixReady:[32],device:[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]],e)));
import{p as e,b as t}from"./p-68e0210a.js";(()=>{const t=import.meta.url,s={};return""!==t&&(s.resourcesUrl=new URL(".",t).href),e(s)})().then((e=>t([["p-dff3451f",[[1,"blog-article-details",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],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"],postMessageEvent:[513,"post-message-event"],postId:[514,"post-id"],postSlug:[513,"post-slug"],intlDateTimeFormat:[1,"intl-date-time-format"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],bannerMatrixReady:[32],device:[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]],e)));

@@ -73,3 +73,3 @@ 'use strict';

const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";

@@ -187,8 +187,8 @@ const BlogArticleDetails = class {

getBlogArticleDetails() {
if (!this.postId && isNaN(this.postId)) {
if (!this.postId && !this.postSlug) {
this.hasErrors = true;
throw new Error('The postId parameter is missing!');
throw new Error('postId or postSlug parameter has to be provided!');
}
this.isLoading = true;
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postId}`);
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postSlug || this.postId}`);
url.searchParams.append('env', this.cmsEnv);

@@ -207,3 +207,2 @@ url.searchParams.append('userRoles', this.userRoles);

this.blogData = blogContent;
this.blogData.publishingDate = new Date(this.blogData.publishingDate).toLocaleDateString();
this.isLoading = false;

@@ -235,3 +234,3 @@ })

formatDate(dateString) {
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(new Date(dateString));
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(new Date(dateString));
}

@@ -238,0 +237,0 @@ render() {

@@ -18,3 +18,3 @@ 'use strict';

patchBrowser().then(options => {
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"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
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"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"postSlug":[513,"post-slug"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
});

@@ -17,3 +17,3 @@ 'use strict';

return patchEsm().then(() => {
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"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
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"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"postSlug":[513,"post-slug"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
});

@@ -20,0 +20,0 @@ };

@@ -114,8 +114,8 @@ import { Component, Prop, State, Watch, h, Listen } from '@stencil/core';

getBlogArticleDetails() {
if (!this.postId && isNaN(this.postId)) {
if (!this.postId && !this.postSlug) {
this.hasErrors = true;
throw new Error('The postId parameter is missing!');
throw new Error('postId or postSlug parameter has to be provided!');
}
this.isLoading = true;
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postId}`);
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postSlug || this.postId}`);
url.searchParams.append('env', this.cmsEnv);

@@ -134,3 +134,2 @@ url.searchParams.append('userRoles', this.userRoles);

this.blogData = blogContent;
this.blogData.publishingDate = new Date(this.blogData.publishingDate).toLocaleDateString();
this.isLoading = false;

@@ -162,3 +161,3 @@ })

formatDate(dateString) {
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(new Date(dateString));
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(new Date(dateString));
}

@@ -396,3 +395,3 @@ render() {

},
"required": true,
"required": false,
"optional": false,

@@ -406,2 +405,19 @@ "docs": {

},
"postSlug": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Slug of post"
},
"attribute": "post-slug",
"reflect": true
},
"intlDateTimeFormat": {

@@ -408,0 +424,0 @@ "type": "string",

@@ -69,3 +69,3 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";

@@ -185,8 +185,8 @@ const BlogArticleDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {

getBlogArticleDetails() {
if (!this.postId && isNaN(this.postId)) {
if (!this.postId && !this.postSlug) {
this.hasErrors = true;
throw new Error('The postId parameter is missing!');
throw new Error('postId or postSlug parameter has to be provided!');
}
this.isLoading = true;
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postId}`);
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postSlug || this.postId}`);
url.searchParams.append('env', this.cmsEnv);

@@ -205,3 +205,2 @@ url.searchParams.append('userRoles', this.userRoles);

this.blogData = blogContent;
this.blogData.publishingDate = new Date(this.blogData.publishingDate).toLocaleDateString();
this.isLoading = false;

@@ -233,3 +232,3 @@ })

formatDate(dateString) {
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(new Date(dateString));
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(new Date(dateString));
}

@@ -265,2 +264,3 @@ render() {

"postId": [514, "post-id"],
"postSlug": [513, "post-slug"],
"intlDateTimeFormat": [1, "intl-date-time-format"],

@@ -267,0 +267,0 @@ "hasErrors": [32],

@@ -69,3 +69,3 @@ import { r as registerInstance, h } from './index-a6d43dfd.js';

const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";
const blogArticleDetailsCss = ":host {\n display: block;\n}\n\n.GridContainer {\n overflow: auto;\n margin: auto;\n width: 100%;\n padding-bottom: 30px;\n background-color: #07072A;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 30px 60px 1fr 30px;\n gap: 10px;\n}\n.GridContainer .BlogBanner {\n grid-column: 1/5;\n grid-row: 1/3;\n}\n.GridContainer .BlogBanner img {\n width: 100%;\n height: auto;\n}\n.GridContainer .BlogDate {\n grid-column: 2/3;\n grid-row: 2/3;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: #FFF;\n background-color: #0D0D4D;\n z-index: 1;\n text-wrap: nowrap;\n}\n.GridContainer .BlogTitle {\n grid-column: 2/4;\n font-size: 24px;\n color: #FFF;\n}\n.GridContainer .BlogContent {\n grid-column: 2/4;\n font-size: 14px;\n color: #FFF;\n}\n\n@container (max-width: 475px) {\n .GridContainer {\n font-size: 12px;\n }\n}";

@@ -183,8 +183,8 @@ const BlogArticleDetails = class {

getBlogArticleDetails() {
if (!this.postId && isNaN(this.postId)) {
if (!this.postId && !this.postSlug) {
this.hasErrors = true;
throw new Error('The postId parameter is missing!');
throw new Error('postId or postSlug parameter has to be provided!');
}
this.isLoading = true;
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postId}`);
let url = new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/${this.postSlug || this.postId}`);
url.searchParams.append('env', this.cmsEnv);

@@ -203,3 +203,2 @@ url.searchParams.append('userRoles', this.userRoles);

this.blogData = blogContent;
this.blogData.publishingDate = new Date(this.blogData.publishingDate).toLocaleDateString();
this.isLoading = false;

@@ -231,3 +230,3 @@ })

formatDate(dateString) {
return new Intl.DateTimeFormat(this.intlDateTimeFormat).format(new Date(dateString));
return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB').format(new Date(dateString));
}

@@ -234,0 +233,0 @@ render() {

@@ -16,3 +16,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-a6d43dfd.js';

patchBrowser().then(options => {
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"postSlug":[513,"post-slug"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
});

@@ -13,3 +13,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-a6d43dfd.js';

return patchEsm().then(() => {
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
return bootstrapLazy([["blog-article-details",[[1,"blog-article-details",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"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"],"postMessageEvent":[513,"post-message-event"],"postId":[514,"post-id"],"postSlug":[513,"post-slug"],"intlDateTimeFormat":[1,"intl-date-time-format"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"bannerMatrixReady":[32],"device":[32]},[[8,"BannerMatrixReady","handleBannerReady"]]]]]], options);
});

@@ -16,0 +16,0 @@ };

@@ -43,2 +43,6 @@ /* eslint-disable */

/**
* Slug of post
*/
"postSlug": string;
/**
* Property used to display the description

@@ -105,3 +109,3 @@ */

*/
"postId": number;
"postId"?: number;
/**

@@ -112,2 +116,6 @@ * Event name to be sent when the button is clicked

/**
* Slug of post
*/
"postSlug"?: string;
/**
* Property used to display the description

@@ -114,0 +122,0 @@ */

@@ -51,2 +51,6 @@ export declare class BlogArticleDetails {

/**
* Slug of post
*/
postSlug: string;
/**
* Intl date format

@@ -53,0 +57,0 @@ */

{
"name": "@everymatrix/blog-article-details",
"version": "1.13.24",
"version": "1.14.0",
"main": "./dist/index.cjs.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc