@commversion/libs 0.17.1 → 0.17.2

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.
@@ -22,5 +22,4 @@
22
22
  display: block;
23
23
  }
24
24
  `,document.head.appendChild(t)}function p(t){if(t.style.right&&t.style.right!=="auto")return"right";if(t.style.left&&t.style.left!=="auto")return"left";const e=window.getComputedStyle(t);return e.right!=="auto"?"right":e.left!=="auto"?"left":"right"}function d(t){const e=document.querySelector(t.chatWidgetSelector);if(!e||(e.style.overflow="unset",c(),e.querySelector(".lc-whatsapp-wrapper")))return;const r=p(e)==="left",n=document.createElement("div");n.className=`lc-whatsapp-wrapper ${r?"right":"left"}`,n.onclick=function(){const o=l()==="mobile"?`https://wa.me/${t.number}`:`https://web.whatsapp.com/send?phone=${t.number}`;window.open(o,"_blank","noopener,noreferrer")};const a=document.createElement("img");a.className="lc-whatsapp-icon",a.alt="WhatsApp",a.src="data:image/svg+xml;utf8,"+encodeURIComponent(`<?xml version="1.0" encoding="utf-8"?>
25
- <!-- License: PD. Made by Mary Akveo: https://maryakveo.com/ -->
26
25
  <svg fill="#05e896" width="800px" height="800px" viewBox="0 0 24 24" id="whatsapp" data-name="Flat Color" xmlns="http://www.w3.org/2000/svg" class="icon flat-color"><path id="primary" d="M19.07,4.93A10,10,0,0,0,3,16.26L2,20.8a1,1,0,0,0,.27.91A1,1,0,0,0,3.2,22L7.74,21A9.89,9.89,0,0,0,12,22a10.61,10.61,0,0,0,1.85-.17,10,10,0,0,0,5.22-16.9Z" style="fill: #05e896;"></path><path id="secondary" d="M15.68,17a7,7,0,0,1-3-.74l-.16-.08a10.69,10.69,0,0,1-2.71-2,10.52,10.52,0,0,1-2-2.71l-.08-.16A6.36,6.36,0,0,1,7,7.84,1,1,0,0,1,8,7H9.81a1,1,0,0,1,1,.72l.4,1.4a1,1,0,0,1-.25,1l-1,1a9.8,9.8,0,0,0,1.32,1.65,9.42,9.42,0,0,0,1.65,1.32l1-1a1,1,0,0,1,1-.25l1.4.4a1,1,0,0,1,.72,1V16a1,1,0,0,1-.84,1A4.2,4.2,0,0,1,15.68,17Z" style="fill: #fff;"></path></svg>`),n.appendChild(a),e.appendChild(n)}function h(t,e,{interval:i=300,maxRetries:r=10}={}){let n=0;const a=setInterval(()=>{const o=document.querySelector(t);if(o){clearInterval(a),e(o);return}++n>=r&&clearInterval(a)},i)}function w(t={}){const e=t.whatsappConfig||{},i={chatWidgetSelector:e.chatWidgetSelector||"#chat-widget-container",number:e.number||"",visibility:e.visibility||"mobile"};i.visibility!==l()&&i.visibility!=="both"||(c(),h(i.chatWidgetSelector,()=>{d(i)}))}window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",w(window.commversion))})();
@@ -20,5 +20,4 @@
20
20
  pointer-events: none;
21
21
  }
22
22
  `,document.head.appendChild(a)}function w(o,e){if(document.querySelector(".wa-widget-wrapper"))return;m(e);const n=document.createElement("div");n.className="wa-widget-wrapper",n.onclick=()=>{const i=s()==="mobile"?`https://wa.me/${o}`:`https://web.whatsapp.com/send?phone=${o}`;window.open(i,"_blank","noopener,noreferrer")};const t=document.createElement("img");t.className="wa-widget-icon",t.alt="WhatsApp",t.src="data:image/svg+xml;utf8,"+encodeURIComponent(`<?xml version="1.0" encoding="utf-8"?>
23
- <!-- License: PD. Made by Mary Akveo: https://maryakveo.com/ -->
24
- <svg fill="#05e896" width="800px" height="800px" viewBox="0 0 24 24" id="whatsapp" data-name="Flat Color" xmlns="http://www.w3.org/2000/svg" class="icon flat-color"><path id="primary" d="M19.07,4.93A10,10,0,0,0,3,16.26L2,20.8a1,1,0,0,0,.27.91A1,1,0,0,0,3.2,22L7.74,21A9.89,9.89,0,0,0,12,22a10.61,10.61,0,0,0,1.85-.17,10,10,0,0,0,5.22-16.9Z" style="fill: #05e896;"></path><path id="secondary" d="M15.68,17a7,7,0,0,1-3-.74l-.16-.08a10.69,10.69,0,0,1-2.71-2,10.52,10.52,0,0,1-2-2.71l-.08-.16A6.36,6.36,0,0,1,7,7.84,1,1,0,0,1,8,7H9.81a1,1,0,0,1,1,.72l.4,1.4a1,1,0,0,1-.25,1l-1,1a9.8,9.8,0,0,0,1.32,1.65,9.42,9.42,0,0,0,1.65,1.32l1-1a1,1,0,0,1,1-.25l1.4.4a1,1,0,0,1,.72,1V16a1,1,0,0,1-.84,1A4.2,4.2,0,0,1,15.68,17Z" style="fill: #fff;"></path></svg>`),n.appendChild(t),document.body.appendChild(n)}function h(o={}){const e=o.whatsapp;if(!(e!=null&&e.phone_number))return;const n=s(),t=e[n];!(t!=null&&t.enabled)||!t.position||w(e.phone_number,t)}window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",h(window.commversion))})();
23
+ <svg fill="#05e896" width="800px" height="800px" viewBox="0 0 24 24" id="whatsapp" data-name="Flat Color" xmlns="http://www.w3.org/2000/svg" class="icon flat-color"><path id="primary" d="M19.07,4.93A10,10,0,0,0,3,16.26L2,20.8a1,1,0,0,0,.27.91A1,1,0,0,0,3.2,22L7.74,21A9.89,9.89,0,0,0,12,22a10.61,10.61,0,0,0,1.85-.17,10,10,0,0,0,5.22-16.9Z" style="fill: #05e896;"></path><path id="secondary" d="M15.68,17a7,7,0,0,1-3-.74l-.16-.08a10.69,10.69,0,0,1-2.71-2,10.52,10.52,0,0,1-2-2.71l-.08-.16A6.36,6.36,0,0,1,7,7.84,1,1,0,0,1,8,7H9.81a1,1,0,0,1,1,.72l.4,1.4a1,1,0,0,1-.25,1l-1,1a9.8,9.8,0,0,0,1.32,1.65,9.42,9.42,0,0,0,1.65,1.32l1-1a1,1,0,0,1,1-.25l1.4.4a1,1,0,0,1,.72,1V16a1,1,0,0,1-.84,1A4.2,4.2,0,0,1,15.68,17Z" style="fill: #fff;"></path></svg>`),n.appendChild(t),document.body.appendChild(n)}function h(o={}){const e=o.whatsapp;if(!(e!=null&&e.phone_number))return;const n=s(),t=e[n];!(t!=null&&t.enabled)||!t.position||w(e.phone_number,t)}window.commversion=window.commversion||{},h(window.commversion)})();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commversion/libs",
3
- "version": "0.17.1",
4
- "author": "Marios Antonoudiou <mariosant@sent.com>",
3
+ "version": "0.17.2",
4
+ "author": "Commversion",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "lint": "prettier -c .",
@@ -57,8 +57,8 @@
57
57
  "build:lc-input-error": "vite build -c scripts/lc-input-error/vite.config.js",
58
58
  "dev:lc-whatsapp-widget-combo": "vite serve scripts/lc-whatsapp-widget-combo/src/",
59
59
  "build:lc-whatsapp-widget-combo": "vite build -c scripts/lc-whatsapp-widget-combo/vite.config.js",
60
- "dev:whatsapp-widget-only": "vite serve scripts/lc-whatsapp-widget-only/src/",
61
- "build:whatsapp-widget-only": "vite build -c scripts/lc-whatsapp-widget-only/vite.config.js"
60
+ "dev:lc-whatsapp-widget-only": "vite serve scripts/lc-whatsapp-widget-only/src/",
61
+ "build:lc-whatsapp-widget-only": "vite build -c scripts/lc-whatsapp-widget-only/vite.config.js"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"