lm-web-controls 1.4.9 → 1.4.10

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,{useState as t,useEffect as a}from"react";import n from"moment";function o(o){var i,r,c,l,m=o.post,d=o.ish1,s=t(""),p=s[0],u=s[1];return a(function(){"undefined"!=typeof window&&u(window.location.href)},[]),a(function(){var e,t;if(p){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":p},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)}}},[p,m]),e.createElement("section",{className:"post-main-container"},d?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===(r=m.author)||void 0===r?void 0:r.name[0]:""),e.createElement("div",{className:"post-author-container"},e.createElement("h3",{className:"post-author-name"},(null===(c=m.author)||void 0===c?void 0:c.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"},m.views||0," Views")))),e.createElement("div",{className:"post-image-container"},e.createElement("img",{src:m.featuredImage,alt:m.title,className:"post-image"}),e.createElement("span",{className:"post-category"},(null===(l=null==m?void 0:m.categoryInfo)||void 0===l?void 0:l.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,r,c,l,m=o.post,d=o.ish1,s=o.views,p=t(""),u=p[0],h=p[1];return a(function(){"undefined"!=typeof window&&h(window.location.href)},[]),a(function(){var e,t;if(u){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":u},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)}}},[u,m]),e.createElement("section",{className:"post-main-container"},d?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===(r=m.author)||void 0===r?void 0:r.name[0]:""),e.createElement("div",{className:"post-author-container"},e.createElement("h3",{className:"post-author-name"},(null===(c=m.author)||void 0===c?void 0:c.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"},s||0," Views")))),e.createElement("div",{className:"post-image-container"},e.createElement("img",{src:m.featuredImage,alt:m.title,className:"post-image"}),e.createElement("span",{className:"post-category"},(null===(l=null==m?void 0:m.categoryInfo)||void 0===l?void 0:l.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.9",
3
+ "version": "1.4.10",
4
4
  "description": "leadmetrics-lm-web-controls",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -126,6 +126,7 @@ declare module "lm-web-controls" {
126
126
  type PostProps = {
127
127
  post: PostModel;
128
128
  ish1?: boolean;
129
+ views: number;
129
130
  };
130
131
 
131
132
  type FeaturedBlogProps = {