lm-web-controls 1.2.43 → 1.2.44
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
|
|
2
|
+
import e,{useState as t,useEffect as a}from"react";import n from"moment";function i(i){var o=i.blogs,l=i.icon,c=i.title,r=i.nestedUrl,m=t(""),d=m[0],s=m[1],g=t("grid"),u=g[0],v=g[1];return a((function(){"undefined"!=typeof window&&s(window.location.origin)}),[]),a((function(){if(d){var e=o.map((function(e){return function(e){var t,a;return{"@context":"https://schema.org","@type":"Article",headline:e.title,image:[e.featuredImage],author:{"@type":"Person",name:(null===(t=e.author)||void 0===t?void 0:t.name)||"Admin"},datePublished:n(e.publishedOn).toISOString(),dateModified:n(e.publishedOn).toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":"".concat(d).concat(r?"/".concat(r):"","/post/").concat(e.slug)},publisher:{"@type":"Organization",name:(null===(a=e.author)||void 0===a?void 0:a.name)||"Admin"},description:e.previewContent}}(e)})),t=document.getElementById("blog-json-ld-schema");t&&document.head.removeChild(t);var a=document.createElement("script");return a.type="application/ld+json",a.id="blog-json-ld-schema",a.innerHTML=JSON.stringify(e),document.head.appendChild(a),function(){document.head.contains(a)&&document.head.removeChild(a)}}}),[d,o]),e.createElement("section",{className:"blog-list-main-container"},e.createElement("div",{className:"blog-list-top-container"},c&&e.createElement("h2",{className:"blog-list-main-title"},c),e.createElement("div",{className:"blog-list-icons-container"},l.grid&&e.createElement("div",{className:"blog-list-icon ".concat("grid"===u?"active":""),onClick:function(){return v("grid")},title:"Grid View"},l.grid),l.list&&e.createElement("div",{className:"blog-list-icon ".concat("list"===u?"active":""),onClick:function(){return v("list")},title:"List View"},l.list))),e.createElement("div",{className:"".concat("grid"===u?"blogs-grid-view":"blogs-list-view")},o.map((function(t){var a,i,o;return e.createElement("div",{key:t.slug,className:"".concat("grid"===u?"blog-item-grid":"blog-item-list")},e.createElement("a",{href:"".concat(r?"/".concat(r):"","/post/").concat(t.slug)},e.createElement("img",{src:t.featuredImage,alt:t.title,className:"".concat("grid"===u?"blog-item-grid-image":"blog-item-list-image")})),e.createElement("div",{className:"blog-details"},e.createElement("a",{href:"".concat(r?"/".concat(r):"","/post/").concat(t.slug)},e.createElement("h3",{className:"blog-item-title"},t.title)),e.createElement("div",{className:"blog-item-avatar-main-container"},e.createElement("div",{className:"blog-item-avatar"},(null===(a=t.author)||void 0===a?void 0:a.name)?null===(i=t.author)||void 0===i?void 0:i.name[0]:""),e.createElement("div",{className:"blog-item-author-container"},e.createElement("h3",{className:"blog-item-author-name"},(null===(o=t.author)||void 0===o?void 0:o.name)||""),e.createElement("div",{className:"blog-item-date-read"},"On ".concat(n(t.publishedOn).format("ddd, MMM DD, YYYY"),", ").concat(t.readTime?"".concat(t.readTime," Min read"):"3 Min read")))),e.createElement("p",{className:"blog-item-preview-content"},t.previewContent),e.createElement("a",{className:"blog-item-read-more-container",href:"".concat(r?"/".concat(r):"","/post/").concat(t.slug)},e.createElement("p",null,"Read More"),l.link?l.link:null)))}))))}export{i as BlogList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e,{useState as t}from"react";var
|
|
2
|
+
import e,{useEffect as n,useState as t}from"react";var a=function(n){var a=n.question,r=n.answer,c=n.icon,i=t(!1),o=i[0],s=i[1];return e.createElement("div",{className:"faq-item",onClick:function(){return s(!o)}},e.createElement("div",{className:"faq-question-container"},e.createElement("h3",{className:"faq-question"},a),e.createElement("img",{src:c,alt:"Toggle icon",className:"faq-icon ".concat(o?"rotate":"")})),e.createElement("div",{className:"faq-answer ".concat(o?"open":"closed")},e.createElement("p",null,r)))};function r(t){var r=t.faq,c=t.title,i=void 0===c?"Frequently Asked Questions":c,o=t.icon,s=void 0===o?"../../images/accordion.png":o,m=t.addSchema,l=void 0===m||m,u=Array.isArray(r)?r:r.items;if(!u.length)return null;var d={"@context":"https://schema.org","@type":"FAQPage",mainEntity:u.map((function(e){return{"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}}))};return n((function(){if(l){var e=document.getElementById("faq-json-ld-schema");e&&document.head.removeChild(e);var n=document.createElement("script");return n.type="application/ld+json",n.id="faq-json-ld-schema",n.innerHTML=JSON.stringify(d),document.head.appendChild(n),function(){document.head.contains(n)&&document.head.removeChild(n)}}}),[r,l]),e.createElement(e.Fragment,null,e.createElement("div",{className:"faq-main-container"},e.createElement("h2",{className:"faq-title"},i),e.createElement("div",{className:"faq-inner-container"},u.map((function(n,t){return n.question?e.createElement(a,{key:t,question:n.question,answer:n.answer,icon:s}):null})))))}export{r as Faq};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import{useEffect as e}from"react";function t(t){var n=t.faq,a=Array.isArray(n)?n:n.items;return e((function(){if(a.length){var e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:a.map((function(e){return{"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}}))},t=document.getElementById("faq-json-ld-schema");t&&document.head.removeChild(t);var n=document.createElement("script");return n.type="application/ld+json",n.id="faq-json-ld-schema",n.innerHTML=JSON.stringify(e),document.head.appendChild(n),function(){document.head.contains(n)&&document.head.removeChild(n)}}}),[a]),null}export{t as FaqSchema};
|
|
@@ -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,
|
|
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};
|