@commversion/libs 0.17.8 → 0.17.9

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 +1 @@
1
- (function(){"use strict";const s=e=>({rule:o,value:n})=>{const{href:t}=e.location;if(o==="contains")return t.includes(n);if(o==="equals")return t===n;throw new Error(`Wrong rule: ${o}: ${n}`)},r=(e,o)=>!e.some(s(o)),d=(e,o)=>e.some(s(o)),c=e=>{const o=new RegExp(e),{pathname:n}=window.location;return!o.test(n)},h=(e,o)=>{const n=new RegExp(e),{pathname:t}=o.location;return n.test(t)},u=["browsing"],w=e=>e.show&&e.hide?{predicateFn:()=>console.error("Cannot set both show and hide configuration. Please choose one.")}:typeof e.show=="string"?{predicateFn:c,pluginConfiguration:e.show}:typeof e.show=="object"?{predicateFn:r,pluginConfiguration:e.show}:typeof e.hide=="string"?{predicateFn:h,pluginConfiguration:e.hide}:typeof e.hide=="object"?{predicateFn:d,pluginConfiguration:e.hide}:{predicateFn:()=>console.error("No configuration for show/hide script.")},a=e=>({customerData:o})=>{const{LiveChatWidget:n}=window,{predicateFn:t,pluginConfiguration:i}=w(e);t(i,window)&&u.includes(o.status)&&n.call("hide")};window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",a(window.commversion))})();
1
+ (function(){"use strict";const s=e=>({rule:o,value:n})=>{const{href:t}=e.location;if(o==="contains")return t.includes(n);if(o==="equals")return t===n;throw new Error(`Wrong rule: ${o}: ${n}`)},d=(e,o)=>!e.some(s(o)),c=(e,o)=>e.some(s(o)),h=e=>{const o=new RegExp(e),{pathname:n}=window.location;return!o.test(n)},l=(e,o)=>{const n=new RegExp(e),{pathname:t}=o.location;return n.test(t)},u=["browsing"],a=e=>e.show&&e.hide?{predicateFn:()=>console.error("Cannot set both show and hide configuration. Please choose one.")}:typeof e.show=="string"?{predicateFn:h,pluginConfiguration:e.show}:typeof e.show=="object"?{predicateFn:d,pluginConfiguration:e.show}:typeof e.hide=="string"?{predicateFn:l,pluginConfiguration:e.hide}:typeof e.hide=="object"?{predicateFn:c,pluginConfiguration:e.hide}:{predicateFn:()=>console.error("No configuration for show/hide script.")},w=e=>({customerData:o})=>{const{LiveChatWidget:n}=window,{predicateFn:t,pluginConfiguration:i}=a(e);if(t(i,window)&&u.includes(o.status)){n.call("hide");const r=document.getElementById("chat-overlay-container");r&&(r.style.display="none")}};window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",w(window.commversion))})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commversion/libs",
3
- "version": "0.17.8",
3
+ "version": "0.17.9",
4
4
  "author": "Commversion",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {