lm-web-controls 1.2.44 → 1.2.46

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.
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{useState as e,useEffect as n}from"react";import t from"moment";function o(o){var i=o.blogs,a=o.nestedUrl,d=e(""),r=d[0],c=d[1];return n((function(){"undefined"!=typeof window&&c(window.location.origin)}),[]),n((function(){if(r){var e=i.map((function(e){return function(e){var n,o;return{"@context":"https://schema.org","@type":"Article",headline:e.title,image:[e.featuredImage],author:{"@type":"Person",name:(null===(n=e.author)||void 0===n?void 0:n.name)||"Admin"},datePublished:t(e.publishedOn).toISOString(),dateModified:t(e.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":"".concat(r).concat(a?"/".concat(a):"","/post/").concat(e.slug)},publisher:{"@type":"Organization",name:(null===(o=e.author)||void 0===o?void 0:o.name)||"Admin"},description:e.previewContent}}(e)})),n=document.getElementById("blog-json-ld-schema");n&&document.head.removeChild(n);var o=document.createElement("script");return o.type="application/ld+json",o.id="blog-json-ld-schema",o.innerHTML=JSON.stringify(e),document.head.appendChild(o),function(){document.head.contains(o)&&document.head.removeChild(o)}}}),[r,i]),null}export{o as BlogListJsonLD};
@@ -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,d,m,c=o.post,l=t(""),s=l[0],p=l[1];return a((function(){"undefined"!=typeof window&&p(window.location.href)}),[]),a((function(){var e,t;if(s){var a={"@context":"https://schema.org","@type":"Article",headline:c.title,image:[c.featuredImage],author:{"@type":"Person",name:(null===(e=c.author)||void 0===e?void 0:e.name)||"Admin"},datePublished:n(c.publishedOn).toISOString(),dateModified:n(c.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":s},publisher:{"@type":"Organization",name:(null===(t=c.author)||void 0===t?void 0:t.name)||"Admin"},description:c.previewContent,articleBody:c.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)}}}),[s,c]),e.createElement("section",{className:"post-main-container"},e.createElement("h2",{className:"post-title"},c.title),e.createElement("div",{className:"post-avatar-main-container"},e.createElement("div",{className:"post-avatar"},(null===(i=c.author)||void 0===i?void 0:i.name)?null===(r=c.author)||void 0===r?void 0:r.name[0]:""),e.createElement("div",{className:"post-author-container"},e.createElement("h3",{className:"post-author-name"},(null===(d=c.author)||void 0===d?void 0:d.name)||""),e.createElement("div",{className:"post-date-read"},"On ".concat(n(c.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(c.readTime?"".concat(c.readTime," Min read"):"3 Min read")))),e.createElement("div",{className:"post-image-container"},e.createElement("img",{src:c.featuredImage,alt:c.title,className:"post-image"}),e.createElement("span",{className:"post-category"},(null===(m=null==c?void 0:c.categoryInfo)||void 0===m?void 0:m.name)||"General")),e.createElement("span",{dangerouslySetInnerHTML:{__html:c.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,d,l,m=o.post,c=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"},c?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===(d=m.author)||void 0===d?void 0:d.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("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};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{useState as e,useEffect as t}from"react";import n from"moment";function i(i){var o=i.post,d=e(""),a=d[0],r=d[1];return t((function(){"undefined"!=typeof window&&r(window.location.href)}),[]),t((function(){var e,t;if(a){var i={"@context":"https://schema.org","@type":"Article",headline:o.title,image:[o.featuredImage],author:{"@type":"Person",name:(null===(e=o.author)||void 0===e?void 0:e.name)||"Admin"},datePublished:n(o.publishedOn).toISOString(),dateModified:n(o.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":a},publisher:{"@type":"Organization",name:(null===(t=o.author)||void 0===t?void 0:t.name)||"Admin"},description:o.previewContent,articleBody:o.content.replace(/<[^>]+>/g,"")},d=document.getElementById("post-json-ld-schema");d&&document.head.removeChild(d);var r=document.createElement("script");return r.type="application/ld+json",r.id="post-json-ld-schema",r.innerHTML=JSON.stringify(i),document.head.appendChild(r),function(){document.head.contains(r)&&document.head.removeChild(r)}}}),[a,o]),null}export{i as PostJsonLD};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{Copyright}from"./controls/copyright/index.js";export{Email}from"./controls/email/index.js";export{INSTA_MEDIA_TYPES,InstaFeed}from"./controls/instaFeed/index.js";export{Map}from"./controls/map/index.js";export{Phone}from"./controls/phone/index.js";export{BackToTop}from"./controls/backToTop/index.js";export{CopyrightWithUTM}from"./controls/copyrightWithUTM/index.js";export{SocialShare}from"./controls/socialShare/index.js";export{ReadingProgressBar}from"./controls/readingProgressBar/index.js";export{TableOfContents}from"./controls/tableOfContents/index.js";export{Faq}from"./controls/faq/index.js";export{FaqSchema}from"./controls/faqSchema/index.js";export{FeaturedBlog}from"./controls/featuredBlog/index.js";export{Post}from"./controls/post/index.js";export{RelatedPosts}from"./controls/relatedPosts/index.js";export{BlogList}from"./controls/blogList/index.js";export{ModalForm}from"./controls/modalForm/index.js";export{BreadCrumbJsonLD}from"./controls/breadCrumbSchema/index.js";export{OrganizationJsonLD}from"./controls/organizationSchema/index.js";
1
+ export{Copyright}from"./controls/copyright/index.js";export{Email}from"./controls/email/index.js";export{INSTA_MEDIA_TYPES,InstaFeed}from"./controls/instaFeed/index.js";export{Map}from"./controls/map/index.js";export{Phone}from"./controls/phone/index.js";export{BackToTop}from"./controls/backToTop/index.js";export{CopyrightWithUTM}from"./controls/copyrightWithUTM/index.js";export{SocialShare}from"./controls/socialShare/index.js";export{ReadingProgressBar}from"./controls/readingProgressBar/index.js";export{TableOfContents}from"./controls/tableOfContents/index.js";export{Faq}from"./controls/faq/index.js";export{FaqSchema}from"./controls/faqSchema/index.js";export{FeaturedBlog}from"./controls/featuredBlog/index.js";export{Post}from"./controls/post/index.js";export{PostJsonLD}from"./controls/postSchema/index.js";export{RelatedPosts}from"./controls/relatedPosts/index.js";export{BlogList}from"./controls/blogList/index.js";export{BlogListJsonLD}from"./controls/blogListSchema/index.js";export{ModalForm}from"./controls/modalForm/index.js";export{BreadCrumbJsonLD}from"./controls/breadCrumbSchema/index.js";export{OrganizationJsonLD}from"./controls/organizationSchema/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lm-web-controls",
3
- "version": "1.2.44",
3
+ "version": "1.2.46",
4
4
  "description": "leadmetrics-lm-web-controls",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -1,12 +1,5 @@
1
1
  import React, { ReactNode } from "react";
2
- import {
3
- FaqProps,
4
- FaqSchemaProps,
5
- FeaturedBlogProps,
6
- PostProps,
7
- RelatedPostProps,
8
- BlogListProps,
9
- } from "../src";
2
+
10
3
  declare module "lm-web-controls" {
11
4
  type EmailProps = {
12
5
  value: string;
@@ -88,6 +81,11 @@ declare module "lm-web-controls" {
88
81
  name?: string;
89
82
  id?: string;
90
83
  };
84
+ seo: {
85
+ title: string;
86
+ description: string;
87
+ keywords: string;
88
+ };
91
89
  };
92
90
 
93
91
  type ModalFormProps = {
@@ -114,6 +112,70 @@ declare module "lm-web-controls" {
114
112
  };
115
113
  };
116
114
 
115
+ type BlogListJsonLDSchemaProps = {
116
+ blogs: PostModel[];
117
+ nestedUrl?: string;
118
+ };
119
+
120
+ type PostJsonLDSchemaProps = {
121
+ post: PostModel;
122
+ };
123
+
124
+ type PostProps = {
125
+ post: PostModel;
126
+ ish1?: boolean;
127
+ };
128
+
129
+ type FeaturedBlogProps = {
130
+ featured: PostModel;
131
+ icon: ReactNode;
132
+ nestedUrl?: string;
133
+ };
134
+
135
+ type BlogListProps = {
136
+ blogs: PostModel[];
137
+ icon?: {
138
+ grid?: ReactNode;
139
+ list?: ReactNode;
140
+ link?: ReactNode;
141
+ };
142
+ title?: string;
143
+ nestedUrl?: string;
144
+ };
145
+
146
+ type RelatedPostProps = {
147
+ relatedPosts: PostModel[];
148
+ title?: string;
149
+ nestedUrl?: string;
150
+ };
151
+
152
+ type FAQItem = {
153
+ id: string;
154
+ question: string;
155
+ answer: string;
156
+ createdOn: string;
157
+ updatedOn: string | null;
158
+ };
159
+
160
+ type FAQData = {
161
+ description: string;
162
+ items: FAQItem[];
163
+ publishedOn: string | null;
164
+ slug: string;
165
+ title: string;
166
+ };
167
+
168
+ type FaqProps = {
169
+ faq: FAQData | FAQItem[];
170
+ title?: string;
171
+ icon?: string;
172
+ addSchema?: boolean;
173
+ };
174
+
175
+ type FaqSchemaProps = {
176
+ faq: FAQData | FAQItem[];
177
+ };
178
+
117
179
  export const Email: React.FC<EmailProps>;
118
180
  export const Copyright: React.FC<CopyrightProps>;
119
181
  export const Phone: React.FC<PhoneProps>;
@@ -133,6 +195,8 @@ declare module "lm-web-controls" {
133
195
  export const ModalForm: React.FC<ModalFormProps>;
134
196
  export const BreadCrumbJsonLD: React.FC;
135
197
  export const OrganizationJsonLD: React.FC<OrganizationSchemaProps>;
198
+ export const PostJsonLD: React.FC<PostJsonLDSchemaProps>;
199
+ export const BlogListJsonLD: React.FC<BlogListJsonLDSchemaProps>;
136
200
 
137
201
  export const INSTA_MEDIA_TYPES: {
138
202
  readonly IMAGE: 1;