@commversion/libs 0.6.0-alpha-2 → 0.7.0-pre.0
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.
- package/dist/lc-show-hide.js +1 -1
- package/package.json +2 -1
package/dist/lc-show-hide.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const
|
|
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))})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commversion/libs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-pre.0",
|
|
4
4
|
"author": "Marios Antonoudiou <mariosant@sent.com>",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"test": "wtr ./scripts/**/*.test.js --node-resolve",
|
|
9
9
|
"prepack": "concurrently npm:build:*",
|
|
10
10
|
"release": "release-it",
|
|
11
|
+
"release:pre": "release-it --preRelease=pre",
|
|
11
12
|
"dev:lc-experiment": "vite serve scripts/lc-experiment/src/",
|
|
12
13
|
"build:lc-experiment": "vite build -c scripts/lc-experiment/vite.config.js",
|
|
13
14
|
"dev:lc-gtm": "vite serve scripts/lc-gtm/src/",
|