lm-web-controls 1.4.15 → 1.4.17

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import e from"react";import a from"moment";function t(t){var o,c,n,l,r,i,m,d=t.featured,s=t.icon,u=t.nestedUrl,g=t.category;return e.createElement("section",{className:"featured-blog-main-container"},e.createElement("div",{className:"featured-blog-image-container"},e.createElement("img",{src:d.featuredImage,alt:d.title,className:"featured-blog-image"}),e.createElement("a",{className:"post-category",href:"".concat(u?"/".concat(u):"","/category/").concat(null===(o=d.categoryInfo)||void 0===o?void 0:o.slug)},(null===(c=null==d?void 0:d.categoryInfo)||void 0===c?void 0:c.name)||"General")),e.createElement("div",{className:"featured-blog-data-container"},e.createElement("a",{href:"".concat(u?"/".concat(u):"","/post").concat(g?"/".concat(null===(n=d.categoryInfo)||void 0===n?void 0:n.slug):"","/").concat(d.slug),className:"featured-blog-title-link"},e.createElement("h2",{className:"featured-blog-title"},d.title)),e.createElement("div",{className:"featured-blog-avatar-main-container"},e.createElement("div",{className:"featured-blog-avatar"},(null===(l=d.author)||void 0===l?void 0:l.name)?null===(r=d.author)||void 0===r?void 0:r.name[0]:""),e.createElement("div",{className:"featured-blog-author-container"},e.createElement("h3",{className:"featured-blog-author-name"},(null===(i=d.author)||void 0===i?void 0:i.name)||""),e.createElement("div",{className:"featured-blog-date-read"},"On ".concat(a(d.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(d.readTime?"".concat(d.readTime," Min read"):"3 Min read")),e.createElement("h3",{className:"featured-blog-view-count"},d.views||0," ",1===(d.views||0)?"View":"Views"))),e.createElement("p",{className:"featured-blog-preview-content"},d.previewContent),e.createElement("a",{className:"read-more-container",href:"".concat(u?"/".concat(u):"","/post").concat(g?"/".concat(null===(m=d.categoryInfo)||void 0===m?void 0:m.slug):"","/").concat(d.slug)},e.createElement("p",null,"Read More"),s||null)))}export{t as FeaturedBlog};
2
+ import e from"react";import a from"moment";function t(t){var o,c,n,l,r,i,m,d=t.featured,s=t.icon,u=t.nestedUrl,g=t.categoryUrl,v=t.category;return e.createElement("section",{className:"featured-blog-main-container"},e.createElement("div",{className:"featured-blog-image-container"},e.createElement("img",{src:d.featuredImage,alt:d.title,className:"featured-blog-image"}),e.createElement("a",{className:"post-category",href:"".concat(g?"/".concat(g):"","/category/").concat(null===(o=d.categoryInfo)||void 0===o?void 0:o.slug)},(null===(c=null==d?void 0:d.categoryInfo)||void 0===c?void 0:c.name)||"General")),e.createElement("div",{className:"featured-blog-data-container"},e.createElement("a",{href:"".concat(u?"/".concat(u):"","/post").concat(v?"/".concat(null===(n=d.categoryInfo)||void 0===n?void 0:n.slug):"","/").concat(d.slug),className:"featured-blog-title-link"},e.createElement("h2",{className:"featured-blog-title"},d.title)),e.createElement("div",{className:"featured-blog-avatar-main-container"},e.createElement("div",{className:"featured-blog-avatar"},(null===(l=d.author)||void 0===l?void 0:l.name)?null===(r=d.author)||void 0===r?void 0:r.name[0]:""),e.createElement("div",{className:"featured-blog-author-container"},e.createElement("h3",{className:"featured-blog-author-name"},(null===(i=d.author)||void 0===i?void 0:i.name)||""),e.createElement("div",{className:"featured-blog-date-read"},"On ".concat(a(d.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(d.readTime?"".concat(d.readTime," Min read"):"3 Min read")),e.createElement("h3",{className:"featured-blog-view-count"},d.views||0," ",1===(d.views||0)?"View":"Views"))),e.createElement("p",{className:"featured-blog-preview-content"},d.previewContent),e.createElement("a",{className:"read-more-container",href:"".concat(u?"/".concat(u):"","/post").concat(v?"/".concat(null===(m=d.categoryInfo)||void 0===m?void 0:m.slug):"","/").concat(d.slug)},e.createElement("p",null,"Read More"),s||null)))}export{t as FeaturedBlog};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import e,{useState as t,useEffect as a}from"react";import n from"moment";function o(o){var i,c,r,l,d,m=o.post,s=o.ish1,p=o.views,u=o.nestedUrl,h=t(""),v=h[0],g=h[1];return a(function(){"undefined"!=typeof window&&g(window.location.href)},[]),a(function(){var e,t;if(v){var a={"@context":"https://schema.org","@type":"Article",headline:m.title,image:[m.featuredImage],author:{"@type":"Person",name:(null===(e=m.author)||void 0===e?void 0:e.name)||"Admin"},datePublished:n(m.publishedOn).toISOString(),dateModified:n(m.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":v},publisher:{"@type":"Organization",name:(null===(t=m.author)||void 0===t?void 0:t.name)||"Admin"},description:m.previewContent,articleBody:m.content.replace(/<[^>]+>/g,"")},o=document.getElementById("post-json-ld-schema");o&&document.head.removeChild(o);var i=document.createElement("script");return i.type="application/ld+json",i.id="post-json-ld-schema",i.innerHTML=JSON.stringify(a),document.head.appendChild(i),function(){document.head.contains(i)&&document.head.removeChild(i)}}},[v,m]),e.createElement("section",{className:"post-main-container"},s?e.createElement("h1",{className:"post-title"},m.title):e.createElement("h2",{className:"post-title"},m.title),e.createElement("div",{className:"post-avatar-main-container"},e.createElement("div",{className:"post-avatar"},(null===(i=m.author)||void 0===i?void 0:i.name)?null===(c=m.author)||void 0===c?void 0:c.name[0]:""),e.createElement("div",{className:"post-author-container"},e.createElement("h3",{className:"post-author-name"},(null===(r=m.author)||void 0===r?void 0:r.name)||""),e.createElement("div",{className:"post-date-read"},"On ".concat(n(m.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(m.readTime?"".concat(m.readTime," Min read"):"3 Min read"),e.createElement("h3",{className:"post-view-count"},p||0," ",1===(p||0)?"View":"Views")))),e.createElement("div",{className:"post-image-container"},e.createElement("img",{src:m.featuredImage,alt:m.title,className:"post-image"}),e.createElement("a",{className:"post-category",href:"".concat(u?"/".concat(u):"","/category/").concat(null===(l=m.categoryInfo)||void 0===l?void 0:l.slug)},(null===(d=null==m?void 0:m.categoryInfo)||void 0===d?void 0:d.name)||"General")),e.createElement("span",{dangerouslySetInnerHTML:{__html:m.content},className:"post-content",id:"post-content"}))}export{o as Post};
2
+ import e,{useState as t,useEffect as a}from"react";import n from"moment";function o(o){var i,c,r,l,d,m=o.post,s=o.ish1,p=o.views,u=o.categoryUrl,h=t(""),v=h[0],g=h[1];return a(function(){"undefined"!=typeof window&&g(window.location.href)},[]),a(function(){var e,t;if(v){var a={"@context":"https://schema.org","@type":"Article",headline:m.title,image:[m.featuredImage],author:{"@type":"Person",name:(null===(e=m.author)||void 0===e?void 0:e.name)||"Admin"},datePublished:n(m.publishedOn).toISOString(),dateModified:n(m.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":v},publisher:{"@type":"Organization",name:(null===(t=m.author)||void 0===t?void 0:t.name)||"Admin"},description:m.previewContent,articleBody:m.content.replace(/<[^>]+>/g,"")},o=document.getElementById("post-json-ld-schema");o&&document.head.removeChild(o);var i=document.createElement("script");return i.type="application/ld+json",i.id="post-json-ld-schema",i.innerHTML=JSON.stringify(a),document.head.appendChild(i),function(){document.head.contains(i)&&document.head.removeChild(i)}}},[v,m]),e.createElement("section",{className:"post-main-container"},s?e.createElement("h1",{className:"post-title"},m.title):e.createElement("h2",{className:"post-title"},m.title),e.createElement("div",{className:"post-avatar-main-container"},e.createElement("div",{className:"post-avatar"},(null===(i=m.author)||void 0===i?void 0:i.name)?null===(c=m.author)||void 0===c?void 0:c.name[0]:""),e.createElement("div",{className:"post-author-container"},e.createElement("h3",{className:"post-author-name"},(null===(r=m.author)||void 0===r?void 0:r.name)||""),e.createElement("div",{className:"post-date-read"},"On ".concat(n(m.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(m.readTime?"".concat(m.readTime," Min read"):"3 Min read"),e.createElement("h3",{className:"post-view-count"},p||0," ",1===(p||0)?"View":"Views")))),e.createElement("div",{className:"post-image-container"},e.createElement("img",{src:m.featuredImage,alt:m.title,className:"post-image"}),e.createElement("a",{className:"post-category",href:"".concat(u?"/".concat(u):"","/category/").concat(null===(l=m.categoryInfo)||void 0===l?void 0:l.slug)},(null===(d=null==m?void 0:m.categoryInfo)||void 0===d?void 0:d.name)||"General")),e.createElement("span",{dangerouslySetInnerHTML:{__html:m.content},className:"post-content",id:"post-content"}))}export{o as Post};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lm-web-controls",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "description": "leadmetrics-lm-web-controls",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -127,6 +127,7 @@ declare module "lm-web-controls" {
127
127
  post: PostModel;
128
128
  ish1?: boolean;
129
129
  views: number;
130
+ categoryUrl?: string;
130
131
  };
131
132
 
132
133
  type FeaturedBlogProps = {
@@ -134,6 +135,7 @@ declare module "lm-web-controls" {
134
135
  icon: ReactNode;
135
136
  nestedUrl?: string;
136
137
  category?: boolean;
138
+ categoryUrl?: string;
137
139
  };
138
140
 
139
141
  type RelatedPostProps = {