@2uinc/frontend-component-xpert-chatbot 1.19.1 → 1.19.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.
- package/dist/lib/index.min.js +4 -3
- package/package.json +1 -1
package/dist/lib/index.min.js
CHANGED
@@ -12655,6 +12655,7 @@ function Ri({ submitEventExternal: e }) {
|
|
12655
12655
|
);
|
12656
12656
|
const P = Rt(
|
12657
12657
|
({ name: Z, payload: ie }) => {
|
12658
|
+
if (!a.enabled) return;
|
12658
12659
|
const ke = Co(a == null ? void 0 : a.payloadParams, ie);
|
12659
12660
|
e ? e({ name: Z, payload: ke }) : A.current.track(
|
12660
12661
|
// TODO: this is untestable - create a custom hook to get submit event function.
|
@@ -12662,7 +12663,7 @@ function Ri({ submitEventExternal: e }) {
|
|
12662
12663
|
ke
|
12663
12664
|
);
|
12664
12665
|
},
|
12665
|
-
[e, a.payloadParams]
|
12666
|
+
[e, a.enabled, a == null ? void 0 : a.payloadParams]
|
12666
12667
|
), M = Rt(async () => {
|
12667
12668
|
if (window != null && window.OnetrustActiveGroups && window.OnetrustActiveGroups.split(",").includes("C0003"))
|
12668
12669
|
try {
|
@@ -12711,7 +12712,7 @@ function Ri({ submitEventExternal: e }) {
|
|
12711
12712
|
let Z, ie;
|
12712
12713
|
return a.enabled && (Z = setInterval(() => {
|
12713
12714
|
var Se;
|
12714
|
-
console.log("Chatbot - Finding Segment"), (Se = window.analytics) != null && Se.track && (console.log("Chatbot - Segment found"), A.current = window.analytics, clearInterval(Z), clearTimeout(ie), z(!0));
|
12715
|
+
console.log("Chatbot - Finding Segment"), ((Se = window.analytics) != null && Se.track || e) && (console.log("Chatbot - Segment found"), A.current = window.analytics, clearInterval(Z), clearTimeout(ie), z(!0));
|
12715
12716
|
}, 1e3), ie = setTimeout(() => {
|
12716
12717
|
clearInterval(Z);
|
12717
12718
|
}, 6e4)), () => {
|
@@ -12745,7 +12746,7 @@ function Ri({ submitEventExternal: e }) {
|
|
12745
12746
|
return o.enabled && !o.experimentName && console.log(
|
12746
12747
|
`Chatbot - Experiment not setup: ${l}, ${$}, ${window.optimizely}`
|
12747
12748
|
), _ || console.log(`Chatbot - Test user not setup: ${l}, ${_}`), null;
|
12748
|
-
if (a.prefix && !((Pt = A == null ? void 0 : A.current) != null && Pt.track) && !e)
|
12749
|
+
if (a.enabled && a.prefix && !((Pt = A == null ? void 0 : A.current) != null && Pt.track) && !e)
|
12749
12750
|
return console.log(`Chatbot - Segment not setup: ${l}`), null;
|
12750
12751
|
const p = () => {
|
12751
12752
|
q(""), O.current.value = "", O.current.style.height = "auto";
|