@envive-ai/react-widgets-v3 0.3.49 → 0.3.51
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/CXIntegration/implementations/useTalkdeskUnifiedCXButton.cjs +33 -8
- package/dist/CXIntegration/implementations/useTalkdeskUnifiedCXButton.js +33 -8
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/package.json +1 -1
- package/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.ts +45 -8
|
@@ -4,16 +4,41 @@ let __envive_ai_react_hooks_application_utils = require("@envive-ai/react-hooks/
|
|
|
4
4
|
let __envive_ai_react_hooks_hooks_ElementObserver = require("@envive-ai/react-hooks/hooks/ElementObserver");
|
|
5
5
|
|
|
6
6
|
//#region src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.ts
|
|
7
|
+
const TALKDESK_TRIGGER_ID = "talkdesk-chat-widget-trigger";
|
|
8
|
+
const HIDE_STYLE_ID = "envive-talkdesk-trigger-hide";
|
|
9
|
+
/**
|
|
10
|
+
* Hide the merchant trigger with an injected CSS rule instead of toggling
|
|
11
|
+
* `display` on a specific element reference.
|
|
12
|
+
*
|
|
13
|
+
* Talkdesk frequently removes and re-creates its trigger node (repositioning the
|
|
14
|
+
* widget, opening/closing, general re-renders). A rule keyed by the element id
|
|
15
|
+
* keeps applying no matter how many times the node is swapped out, whereas the
|
|
16
|
+
* observer's cached reference can end up stale/detached — in which case hiding it
|
|
17
|
+
* silently does nothing and the merchant button reappears next to ours. That
|
|
18
|
+
* decoupling is the intermittent "both buttons show" bug.
|
|
19
|
+
*/
|
|
20
|
+
const hideMerchantTrigger = () => {
|
|
21
|
+
if (document.getElementById(HIDE_STYLE_ID)) return;
|
|
22
|
+
const style = document.createElement("style");
|
|
23
|
+
style.id = HIDE_STYLE_ID;
|
|
24
|
+
style.textContent = `#${TALKDESK_TRIGGER_ID} { display: none !important; }`;
|
|
25
|
+
document.head.appendChild(style);
|
|
26
|
+
};
|
|
27
|
+
const showMerchantTrigger = () => {
|
|
28
|
+
document.getElementById(HIDE_STYLE_ID)?.remove();
|
|
29
|
+
};
|
|
7
30
|
const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMerchantButton }) => {
|
|
8
31
|
const talkdeskButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("talkdesk-chat-widget-trigger"));
|
|
9
32
|
const talkdeskWidget = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("talkdesk-chat-widget"));
|
|
10
33
|
const talkdeskContainer = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("tdWebchat"));
|
|
11
34
|
const enviveFloatingButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id(require_constants.FLOATING_BUTTON_ID));
|
|
12
35
|
const toggle = () => {
|
|
36
|
+
const triggerButton = document.getElementById(TALKDESK_TRIGGER_ID);
|
|
37
|
+
if (!triggerButton) return;
|
|
13
38
|
onSwitchToAgent();
|
|
14
39
|
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
15
|
-
|
|
16
|
-
|
|
40
|
+
showMerchantTrigger();
|
|
41
|
+
triggerButton.click();
|
|
17
42
|
};
|
|
18
43
|
const isTalkdeskButtonEnabled = () => {
|
|
19
44
|
if (!document.getElementById("tdWebchat")) return false;
|
|
@@ -22,16 +47,16 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
22
47
|
const isSwitchEnabled = () => isTalkdeskButtonEnabled();
|
|
23
48
|
talkdeskButton.onAdd(() => {
|
|
24
49
|
if (suppressMerchantButton) {
|
|
25
|
-
|
|
50
|
+
hideMerchantTrigger();
|
|
26
51
|
enviveFloatingButton.show();
|
|
27
52
|
}
|
|
28
53
|
});
|
|
29
54
|
talkdeskWidget.onAdd((el) => {
|
|
30
55
|
if (el && suppressMerchantButton) if (el.getAttribute("aria-hidden") === "false") {
|
|
31
|
-
|
|
56
|
+
showMerchantTrigger();
|
|
32
57
|
enviveFloatingButton.hide();
|
|
33
58
|
} else {
|
|
34
|
-
|
|
59
|
+
hideMerchantTrigger();
|
|
35
60
|
enviveFloatingButton.show();
|
|
36
61
|
}
|
|
37
62
|
});
|
|
@@ -40,14 +65,14 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
40
65
|
const ariaHidden = el.getAttribute("aria-hidden");
|
|
41
66
|
if (ariaHidden === "false") {
|
|
42
67
|
if (suppressMerchantButton) {
|
|
43
|
-
|
|
68
|
+
showMerchantTrigger();
|
|
44
69
|
enviveFloatingButton.hide();
|
|
45
70
|
}
|
|
46
71
|
}
|
|
47
72
|
if (ariaHidden === "true") {
|
|
48
73
|
onCXClose?.();
|
|
49
74
|
if (suppressMerchantButton) {
|
|
50
|
-
|
|
75
|
+
hideMerchantTrigger();
|
|
51
76
|
enviveFloatingButton.show();
|
|
52
77
|
}
|
|
53
78
|
}
|
|
@@ -56,7 +81,7 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
56
81
|
talkdeskContainer.onRemove(() => {
|
|
57
82
|
onCXClose?.();
|
|
58
83
|
if (suppressMerchantButton) {
|
|
59
|
-
|
|
84
|
+
hideMerchantTrigger();
|
|
60
85
|
enviveFloatingButton.show();
|
|
61
86
|
}
|
|
62
87
|
});
|
|
@@ -3,16 +3,41 @@ import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
|
|
|
3
3
|
import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
|
|
4
4
|
|
|
5
5
|
//#region src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.ts
|
|
6
|
+
const TALKDESK_TRIGGER_ID = "talkdesk-chat-widget-trigger";
|
|
7
|
+
const HIDE_STYLE_ID = "envive-talkdesk-trigger-hide";
|
|
8
|
+
/**
|
|
9
|
+
* Hide the merchant trigger with an injected CSS rule instead of toggling
|
|
10
|
+
* `display` on a specific element reference.
|
|
11
|
+
*
|
|
12
|
+
* Talkdesk frequently removes and re-creates its trigger node (repositioning the
|
|
13
|
+
* widget, opening/closing, general re-renders). A rule keyed by the element id
|
|
14
|
+
* keeps applying no matter how many times the node is swapped out, whereas the
|
|
15
|
+
* observer's cached reference can end up stale/detached — in which case hiding it
|
|
16
|
+
* silently does nothing and the merchant button reappears next to ours. That
|
|
17
|
+
* decoupling is the intermittent "both buttons show" bug.
|
|
18
|
+
*/
|
|
19
|
+
const hideMerchantTrigger = () => {
|
|
20
|
+
if (document.getElementById(HIDE_STYLE_ID)) return;
|
|
21
|
+
const style = document.createElement("style");
|
|
22
|
+
style.id = HIDE_STYLE_ID;
|
|
23
|
+
style.textContent = `#${TALKDESK_TRIGGER_ID} { display: none !important; }`;
|
|
24
|
+
document.head.appendChild(style);
|
|
25
|
+
};
|
|
26
|
+
const showMerchantTrigger = () => {
|
|
27
|
+
document.getElementById(HIDE_STYLE_ID)?.remove();
|
|
28
|
+
};
|
|
6
29
|
const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMerchantButton }) => {
|
|
7
30
|
const talkdeskButton = useElementObserver(SelectorFactory.id("talkdesk-chat-widget-trigger"));
|
|
8
31
|
const talkdeskWidget = useElementObserver(SelectorFactory.id("talkdesk-chat-widget"));
|
|
9
32
|
const talkdeskContainer = useElementObserver(SelectorFactory.id("tdWebchat"));
|
|
10
33
|
const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
|
|
11
34
|
const toggle = () => {
|
|
35
|
+
const triggerButton = document.getElementById(TALKDESK_TRIGGER_ID);
|
|
36
|
+
if (!triggerButton) return;
|
|
12
37
|
onSwitchToAgent();
|
|
13
38
|
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
14
|
-
|
|
15
|
-
|
|
39
|
+
showMerchantTrigger();
|
|
40
|
+
triggerButton.click();
|
|
16
41
|
};
|
|
17
42
|
const isTalkdeskButtonEnabled = () => {
|
|
18
43
|
if (!document.getElementById("tdWebchat")) return false;
|
|
@@ -21,16 +46,16 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
21
46
|
const isSwitchEnabled = () => isTalkdeskButtonEnabled();
|
|
22
47
|
talkdeskButton.onAdd(() => {
|
|
23
48
|
if (suppressMerchantButton) {
|
|
24
|
-
|
|
49
|
+
hideMerchantTrigger();
|
|
25
50
|
enviveFloatingButton.show();
|
|
26
51
|
}
|
|
27
52
|
});
|
|
28
53
|
talkdeskWidget.onAdd((el) => {
|
|
29
54
|
if (el && suppressMerchantButton) if (el.getAttribute("aria-hidden") === "false") {
|
|
30
|
-
|
|
55
|
+
showMerchantTrigger();
|
|
31
56
|
enviveFloatingButton.hide();
|
|
32
57
|
} else {
|
|
33
|
-
|
|
58
|
+
hideMerchantTrigger();
|
|
34
59
|
enviveFloatingButton.show();
|
|
35
60
|
}
|
|
36
61
|
});
|
|
@@ -39,14 +64,14 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
39
64
|
const ariaHidden = el.getAttribute("aria-hidden");
|
|
40
65
|
if (ariaHidden === "false") {
|
|
41
66
|
if (suppressMerchantButton) {
|
|
42
|
-
|
|
67
|
+
showMerchantTrigger();
|
|
43
68
|
enviveFloatingButton.hide();
|
|
44
69
|
}
|
|
45
70
|
}
|
|
46
71
|
if (ariaHidden === "true") {
|
|
47
72
|
onCXClose?.();
|
|
48
73
|
if (suppressMerchantButton) {
|
|
49
|
-
|
|
74
|
+
hideMerchantTrigger();
|
|
50
75
|
enviveFloatingButton.show();
|
|
51
76
|
}
|
|
52
77
|
}
|
|
@@ -55,7 +80,7 @@ const useTalkdeskUnifiedCXButton = ({ onSwitchToAgent, onCXClose, suppressMercha
|
|
|
55
80
|
talkdeskContainer.onRemove(() => {
|
|
56
81
|
onCXClose?.();
|
|
57
82
|
if (suppressMerchantButton) {
|
|
58
|
-
|
|
83
|
+
hideMerchantTrigger();
|
|
59
84
|
enviveFloatingButton.show();
|
|
60
85
|
}
|
|
61
86
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
5
|
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
-
(props: P):
|
|
6
|
+
(props: P): react_jsx_runtime9.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
5
|
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
-
(props: P):
|
|
6
|
+
(props: P): react_jsx_runtime15.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchResults/SearchResultsWidget.d.ts
|
|
4
4
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
5
|
-
declare const SearchResultsWidget: () =>
|
|
5
|
+
declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts
|
|
5
5
|
declare const ChatPreviewComparisonWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewComparisonWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewComparisonWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewComparisonWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewComparisonWidgetProps):
|
|
15
|
+
}: ChatPreviewComparisonWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
|
|
5
5
|
declare const ChatPreviewLoadingWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime4.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewLoadingWidgetProps {
|
|
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const ChatPreviewLoadingWidget: ({
|
|
13
13
|
widgetConfigId
|
|
14
|
-
}: ChatPreviewLoadingWidgetProps) =>
|
|
14
|
+
}: ChatPreviewLoadingWidgetProps) => react_jsx_runtime4.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
|
|
5
5
|
declare const ChatPreviewLoadingWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime13.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewLoadingWidgetProps {
|
|
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const ChatPreviewLoadingWidget: ({
|
|
13
13
|
widgetConfigId
|
|
14
|
-
}: ChatPreviewLoadingWidgetProps) =>
|
|
14
|
+
}: ChatPreviewLoadingWidgetProps) => react_jsx_runtime13.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts
|
|
5
5
|
declare const ChatPreviewWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime10.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewWidgetProps):
|
|
15
|
+
}: ChatPreviewWidgetProps): react_jsx_runtime10.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts
|
|
5
5
|
declare const ChatPreviewWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewWidgetProps):
|
|
15
|
+
}: ChatPreviewWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
|
|
|
13
13
|
previewChatAlwaysOpen,
|
|
14
14
|
previewCXButtonsEnabled,
|
|
15
15
|
previewDisclaimer
|
|
16
|
-
}?: FloatingChatWidgetProps):
|
|
16
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime17.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
|
|
|
13
13
|
previewChatAlwaysOpen,
|
|
14
14
|
previewCXButtonsEnabled,
|
|
15
15
|
previewDisclaimer
|
|
16
|
-
}?: FloatingChatWidgetProps):
|
|
16
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime9.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
|
|
|
8
8
|
declare const FullPageSalesAgentWidget: {
|
|
9
9
|
({
|
|
10
10
|
widgetConfigId
|
|
11
|
-
}: FullPageSalesAgentBaseWidgetProps):
|
|
11
|
+
}: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
|
|
|
8
8
|
declare const FullPageSalesAgentWidget: {
|
|
9
9
|
({
|
|
10
10
|
widgetConfigId
|
|
11
|
-
}: FullPageSalesAgentBaseWidgetProps):
|
|
11
|
+
}: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime10.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
4
|
interface ProductCardWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface ProductCardWidgetProps {
|
|
|
7
7
|
declare const ProductCardWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: ProductCardWidgetProps):
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime6.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
4
|
interface ProductCardWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface ProductCardWidgetProps {
|
|
|
7
7
|
declare const ProductCardWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: ProductCardWidgetProps):
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime8.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime12.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface PromptButtonCarouselWithImageWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface PromptButtonCarouselWithImageWidgetProps {
|
|
|
12
12
|
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: PromptButtonCarouselWithImageWidgetProps):
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime12.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime3.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface PromptButtonCarouselWithImageWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface PromptButtonCarouselWithImageWidgetProps {
|
|
|
12
12
|
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: PromptButtonCarouselWithImageWidgetProps):
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime3.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
4
|
interface PromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface PromptCarouselWidgetProps {
|
|
|
7
7
|
declare const PromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: PromptCarouselWidgetProps):
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime14.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
4
|
interface PromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface PromptCarouselWidgetProps {
|
|
|
7
7
|
declare const PromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: PromptCarouselWidgetProps):
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime12.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
4
|
interface SocialProofFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface SocialProofFlowWidgetProps {
|
|
|
7
7
|
declare const SocialProofFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: SocialProofFlowWidgetProps):
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
4
|
interface SocialProofFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface SocialProofFlowWidgetProps {
|
|
|
7
7
|
declare const SocialProofFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: SocialProofFlowWidgetProps):
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime1.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime1.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
|
|
4
4
|
interface TitledPromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
|
|
|
7
7
|
declare const TitledPromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TitledPromptCarouselWidgetProps):
|
|
10
|
+
}: TitledPromptCarouselWidgetProps): react_jsx_runtime1.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
|
|
4
4
|
interface TypingAnimationFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
|
|
|
7
7
|
declare const TypingAnimationFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TypingAnimationFlowWidgetProps):
|
|
10
|
+
}: TypingAnimationFlowWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime15.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime15.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchResults/SearchResultsWidget.d.ts
|
|
4
4
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
5
|
-
declare const SearchResultsWidget: () =>
|
|
5
|
+
declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
|
|
8
8
|
//#endregion
|
package/package.json
CHANGED
|
@@ -3,6 +3,34 @@ import { useElementObserver } from '@envive-ai/react-hooks/hooks/ElementObserver
|
|
|
3
3
|
import { FLOATING_BUTTON_ID } from '../../widgets/FloatingChatWidget/constants';
|
|
4
4
|
import { CustomerServiceImplProps, UnifiedCXButton } from '../types';
|
|
5
5
|
|
|
6
|
+
const TALKDESK_TRIGGER_ID = 'talkdesk-chat-widget-trigger';
|
|
7
|
+
const HIDE_STYLE_ID = 'envive-talkdesk-trigger-hide';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Hide the merchant trigger with an injected CSS rule instead of toggling
|
|
11
|
+
* `display` on a specific element reference.
|
|
12
|
+
*
|
|
13
|
+
* Talkdesk frequently removes and re-creates its trigger node (repositioning the
|
|
14
|
+
* widget, opening/closing, general re-renders). A rule keyed by the element id
|
|
15
|
+
* keeps applying no matter how many times the node is swapped out, whereas the
|
|
16
|
+
* observer's cached reference can end up stale/detached — in which case hiding it
|
|
17
|
+
* silently does nothing and the merchant button reappears next to ours. That
|
|
18
|
+
* decoupling is the intermittent "both buttons show" bug.
|
|
19
|
+
*/
|
|
20
|
+
const hideMerchantTrigger = () => {
|
|
21
|
+
if (document.getElementById(HIDE_STYLE_ID)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const style = document.createElement('style');
|
|
25
|
+
style.id = HIDE_STYLE_ID;
|
|
26
|
+
style.textContent = `#${TALKDESK_TRIGGER_ID} { display: none !important; }`;
|
|
27
|
+
document.head.appendChild(style);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const showMerchantTrigger = () => {
|
|
31
|
+
document.getElementById(HIDE_STYLE_ID)?.remove();
|
|
32
|
+
};
|
|
33
|
+
|
|
6
34
|
interface UseTalkdeskUnifiedCXButtonProps extends CustomerServiceImplProps {}
|
|
7
35
|
|
|
8
36
|
export const useTalkdeskUnifiedCXButton = ({
|
|
@@ -16,12 +44,21 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
16
44
|
const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
|
|
17
45
|
|
|
18
46
|
const toggle = () => {
|
|
47
|
+
// Resolve the trigger from the live DOM at click time rather than relying on
|
|
48
|
+
// the observer's cached node, which Talkdesk's frequent re-renders can leave
|
|
49
|
+
// stale — firing on a detached node would silently no-op.
|
|
50
|
+
const triggerButton = document.getElementById(TALKDESK_TRIGGER_ID) as HTMLElement | null;
|
|
51
|
+
|
|
52
|
+
if (!triggerButton) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
19
56
|
onSwitchToAgent();
|
|
20
57
|
if (suppressMerchantButton) {
|
|
21
58
|
enviveFloatingButton.hide();
|
|
22
59
|
}
|
|
23
|
-
|
|
24
|
-
|
|
60
|
+
showMerchantTrigger();
|
|
61
|
+
triggerButton.click();
|
|
25
62
|
};
|
|
26
63
|
|
|
27
64
|
const isTalkdeskButtonEnabled = () => {
|
|
@@ -39,7 +76,7 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
39
76
|
// Hide Talkdesk button when it's added to DOM (if suppressMerchantButton is enabled)
|
|
40
77
|
talkdeskButton.onAdd(() => {
|
|
41
78
|
if (suppressMerchantButton) {
|
|
42
|
-
|
|
79
|
+
hideMerchantTrigger();
|
|
43
80
|
enviveFloatingButton.show();
|
|
44
81
|
}
|
|
45
82
|
});
|
|
@@ -51,11 +88,11 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
51
88
|
|
|
52
89
|
// Widget is open initially (aria-hidden="false")
|
|
53
90
|
if (ariaHidden === 'false') {
|
|
54
|
-
|
|
91
|
+
showMerchantTrigger();
|
|
55
92
|
enviveFloatingButton.hide();
|
|
56
93
|
} else {
|
|
57
94
|
// Widget is closed initially
|
|
58
|
-
|
|
95
|
+
hideMerchantTrigger();
|
|
59
96
|
enviveFloatingButton.show();
|
|
60
97
|
}
|
|
61
98
|
}
|
|
@@ -69,7 +106,7 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
69
106
|
// Widget is open (aria-hidden="false")
|
|
70
107
|
if (ariaHidden === 'false') {
|
|
71
108
|
if (suppressMerchantButton) {
|
|
72
|
-
|
|
109
|
+
showMerchantTrigger();
|
|
73
110
|
enviveFloatingButton.hide();
|
|
74
111
|
}
|
|
75
112
|
}
|
|
@@ -78,7 +115,7 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
78
115
|
if (ariaHidden === 'true') {
|
|
79
116
|
onCXClose?.();
|
|
80
117
|
if (suppressMerchantButton) {
|
|
81
|
-
|
|
118
|
+
hideMerchantTrigger();
|
|
82
119
|
enviveFloatingButton.show();
|
|
83
120
|
}
|
|
84
121
|
}
|
|
@@ -89,7 +126,7 @@ export const useTalkdeskUnifiedCXButton = ({
|
|
|
89
126
|
talkdeskContainer.onRemove(() => {
|
|
90
127
|
onCXClose?.();
|
|
91
128
|
if (suppressMerchantButton) {
|
|
92
|
-
|
|
129
|
+
hideMerchantTrigger();
|
|
93
130
|
enviveFloatingButton.show();
|
|
94
131
|
}
|
|
95
132
|
});
|