@envive-ai/react-widgets-v3 0.3.62 → 0.3.64
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/debug/MessageContent.cjs +1 -1
- package/dist/debug/MessageContent.js +1 -1
- package/dist/debug/chatEmbed.cjs +1 -1
- package/dist/debug/chatEmbed.js +1 -1
- package/dist/debug/reportIssue.cjs +1 -1
- package/dist/debug/reportIssue.js +1 -1
- package/dist/hocs/withBaseWidget/types.d.cts +7 -0
- package/dist/hocs/withBaseWidget/types.d.ts +7 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.cjs +30 -3
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.js +30 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +2 -2
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs +2 -2
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +2 -2
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +2 -2
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +2 -2
- package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.cjs +2 -2
- package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.js +2 -2
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +1 -1
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +1 -1
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +8 -18
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +8 -18
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +2 -2
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +1 -1
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +1 -1
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +1 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +1 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +2 -2
- package/dist/widgets/utils/functions.cjs +1 -1
- package/dist/widgets/utils/functions.js +1 -1
- package/package.json +1 -1
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +51 -0
- package/src/hocs/withBaseWidget/types.ts +7 -0
- package/src/hocs/withBaseWidget/withBaseWidget.tsx +56 -6
- package/src/stories/FullPageSalesAgentWidget.stories.tsx +64 -0
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +13 -18
- package/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.tsx +75 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_index = require('../node_modules/react-icons/fa/index.cjs');
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
let classnames = require("classnames");
|
|
6
6
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
7
7
|
let __envive_ai_react_toolkit_v3_ReviewCard = require("@envive-ai/react-toolkit-v3/ReviewCard");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FaFile, FaLink, FaPaperclip, FaSearch, FaTag } from "../node_modules/react-icons/fa/index.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { ReviewCard } from "@envive-ai/react-toolkit-v3/ReviewCard";
|
|
6
6
|
import { Message } from "@envive-ai/react-toolkit-v3/Message";
|
package/dist/debug/chatEmbed.cjs
CHANGED
|
@@ -2,10 +2,10 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_MessageContent = require('./MessageContent.cjs');
|
|
3
3
|
let react = require("react");
|
|
4
4
|
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
5
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
7
8
|
let jotai = require("jotai");
|
|
8
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
9
9
|
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
10
10
|
let classnames = require("classnames");
|
|
11
11
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
package/dist/debug/chatEmbed.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MessageContent } from "./MessageContent.js";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { chatAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
5
6
|
import { useAtomValue } from "jotai";
|
|
6
|
-
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
7
7
|
import { PromptCarousel, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
|
|
@@ -6,10 +6,10 @@ const require_chatEmbed = require('./chatEmbed.cjs');
|
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let __envive_ai_react_hooks_application_logging = require("@envive-ai/react-hooks/application/logging");
|
|
8
8
|
__envive_ai_react_hooks_application_logging = require_rolldown_runtime.__toESM(__envive_ai_react_hooks_application_logging);
|
|
9
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
9
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
11
|
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
11
12
|
let jotai = require("jotai");
|
|
12
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
13
13
|
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
14
14
|
let classnames = require("classnames");
|
|
15
15
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
@@ -3,10 +3,10 @@ import { GenericSelect } from "./GenericSelect.js";
|
|
|
3
3
|
import chatEmbed_default from "./chatEmbed.js";
|
|
4
4
|
import { useCallback, useEffect, useState } from "react";
|
|
5
5
|
import Logger from "@envive-ai/react-hooks/application/logging";
|
|
6
|
+
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
8
9
|
import { useAtomValue } from "jotai";
|
|
9
|
-
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
10
10
|
import { userIdAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
11
11
|
import { ReportSessionRequestReportPriorityEnum, ReportSessionRequestReportTypeEnum } from "@spiffy-ai/commerce-api-client";
|
|
12
12
|
import classNames from "classnames";
|
|
@@ -12,6 +12,13 @@ interface BaseWidgetProps {
|
|
|
12
12
|
uiConfig?: OrgUIConfigV3;
|
|
13
13
|
isLoading?: boolean;
|
|
14
14
|
isHardcopyLoading?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* True once THIS widget's own hardcopy request has settled (resolved or errored),
|
|
17
|
+
* regardless of whether it produced content. Lets a widget tell "hardcopy not received
|
|
18
|
+
* yet" apart from "hardcopy finished with no content" so it can leave a loading placeholder
|
|
19
|
+
* after a failed fetch instead of showing it forever.
|
|
20
|
+
*/
|
|
21
|
+
isHardcopySettled?: boolean;
|
|
15
22
|
isPageLoading?: boolean;
|
|
16
23
|
isWidgetConfigLoading?: boolean;
|
|
17
24
|
isUiConfigLoading?: boolean;
|
|
@@ -12,6 +12,13 @@ interface BaseWidgetProps {
|
|
|
12
12
|
uiConfig?: OrgUIConfigV3;
|
|
13
13
|
isLoading?: boolean;
|
|
14
14
|
isHardcopyLoading?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* True once THIS widget's own hardcopy request has settled (resolved or errored),
|
|
17
|
+
* regardless of whether it produced content. Lets a widget tell "hardcopy not received
|
|
18
|
+
* yet" apart from "hardcopy finished with no content" so it can leave a loading placeholder
|
|
19
|
+
* after a failed fetch instead of showing it forever.
|
|
20
|
+
*/
|
|
21
|
+
isHardcopySettled?: boolean;
|
|
15
22
|
isPageLoading?: boolean;
|
|
16
23
|
isWidgetConfigLoading?: boolean;
|
|
17
24
|
isUiConfigLoading?: boolean;
|
|
@@ -8,6 +8,9 @@ let __envive_ai_react_hooks_contexts_hardcopyContext = require("@envive-ai/react
|
|
|
8
8
|
let __envive_ai_react_hooks_contexts_pageContext = require("@envive-ai/react-hooks/contexts/pageContext");
|
|
9
9
|
let __envive_ai_react_hooks_contexts_widgetConfigContext = require("@envive-ai/react-hooks/contexts/widgetConfigContext");
|
|
10
10
|
let __envive_ai_react_hooks_contexts_uiConfigContext = require("@envive-ai/react-hooks/contexts/uiConfigContext");
|
|
11
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
12
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
13
|
+
let __envive_ai_react_hooks_hooks_WidgetLoadDiagnostics = require("@envive-ai/react-hooks/hooks/WidgetLoadDiagnostics");
|
|
11
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
15
|
|
|
13
16
|
//#region src/hocs/withBaseWidget/withBaseWidget.tsx
|
|
@@ -30,10 +33,14 @@ function withBaseWidget(Widget, options) {
|
|
|
30
33
|
const [widgetConfigSettled, setWidgetConfigSettled] = (0, react.useState)(false);
|
|
31
34
|
const [uiConfigSettled, setUiConfigSettled] = (0, react.useState)(false);
|
|
32
35
|
const ownRequestsSettled = hardcopySettled && widgetConfigSettled && uiConfigSettled;
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
36
|
+
const loadId = (0, react.useRef)(`${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`).current;
|
|
37
|
+
const { featureFlagService } = (0, __envive_ai_react_hooks_contexts_featureFlagServiceContext.useFeatureFlagService)();
|
|
38
|
+
const diagnosticsEnabled = !featureFlagService?.isFeatureGateEnabled(__envive_ai_react_hooks_application_models.FeatureGates.IsWidgetDiagnosticsDisabled);
|
|
39
|
+
const hardcopyErrorRef = (0, react.useRef)(void 0);
|
|
40
|
+
const { isVisible, visibilitySource } = (0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(widgetRef, {
|
|
35
41
|
widget_config_id: widgetConfigId,
|
|
36
42
|
widget_type: widgetType,
|
|
43
|
+
load_id: loadId,
|
|
37
44
|
...options?.visibilityEventProps
|
|
38
45
|
}, options?.rootMargin || "0px", isReady);
|
|
39
46
|
const startLoading = (0, react.useMemo)(() => {
|
|
@@ -44,6 +51,7 @@ function withBaseWidget(Widget, options) {
|
|
|
44
51
|
widgetConfigId,
|
|
45
52
|
widgetType
|
|
46
53
|
]);
|
|
54
|
+
const isLoading = startLoading && !ownRequestsSettled;
|
|
47
55
|
const settledStateRef = (0, react.useRef)({
|
|
48
56
|
hardcopy: false,
|
|
49
57
|
widgetConfig: false,
|
|
@@ -78,7 +86,9 @@ function withBaseWidget(Widget, options) {
|
|
|
78
86
|
getHardcopy({
|
|
79
87
|
widgetType,
|
|
80
88
|
userEvent
|
|
81
|
-
}).then(setHardcopyContent).catch(() => {
|
|
89
|
+
}).then(setHardcopyContent).catch((error) => {
|
|
90
|
+
hardcopyErrorRef.current = error instanceof Error && error.message.includes("timed out") ? "hardcopy_timeout" : "hardcopy_error";
|
|
91
|
+
}).finally(() => {
|
|
82
92
|
setHardcopySettled(true);
|
|
83
93
|
});
|
|
84
94
|
}, [
|
|
@@ -113,12 +123,29 @@ function withBaseWidget(Widget, options) {
|
|
|
113
123
|
widgetType,
|
|
114
124
|
getWidgetConfig
|
|
115
125
|
]);
|
|
126
|
+
(0, __envive_ai_react_hooks_hooks_WidgetLoadDiagnostics.useWidgetLoadDiagnostics)({
|
|
127
|
+
enabled: diagnosticsEnabled,
|
|
128
|
+
loadId,
|
|
129
|
+
widgetType,
|
|
130
|
+
widgetConfigId,
|
|
131
|
+
startLoading,
|
|
132
|
+
ownRequestsSettled,
|
|
133
|
+
hardcopyContent,
|
|
134
|
+
visibilitySource,
|
|
135
|
+
pendingRequests: [
|
|
136
|
+
hardcopySettled ? null : "hardcopy",
|
|
137
|
+
widgetConfigSettled ? null : "widgetConfig",
|
|
138
|
+
uiConfigSettled ? null : "uiConfig"
|
|
139
|
+
].filter((name) => name !== null),
|
|
140
|
+
hardcopyErrorReason: hardcopyErrorRef.current
|
|
141
|
+
});
|
|
116
142
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
117
143
|
ref: widgetRef,
|
|
118
144
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Widget, {
|
|
119
145
|
...props,
|
|
120
146
|
isLoading,
|
|
121
147
|
isHardcopyLoading,
|
|
148
|
+
isHardcopySettled: hardcopySettled,
|
|
122
149
|
isPageLoading,
|
|
123
150
|
isWidgetConfigLoading,
|
|
124
151
|
isUiConfigLoading,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 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_runtime13.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_runtime18 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_runtime18.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -6,6 +6,9 @@ import { useHardcopy } from "@envive-ai/react-hooks/contexts/hardcopyContext";
|
|
|
6
6
|
import { usePage } from "@envive-ai/react-hooks/contexts/pageContext";
|
|
7
7
|
import { useWidgetConfig } from "@envive-ai/react-hooks/contexts/widgetConfigContext";
|
|
8
8
|
import { useUiConfig } from "@envive-ai/react-hooks/contexts/uiConfigContext";
|
|
9
|
+
import { FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
10
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
11
|
+
import { useWidgetLoadDiagnostics } from "@envive-ai/react-hooks/hooks/WidgetLoadDiagnostics";
|
|
9
12
|
import { jsx } from "react/jsx-runtime";
|
|
10
13
|
|
|
11
14
|
//#region src/hocs/withBaseWidget/withBaseWidget.tsx
|
|
@@ -28,10 +31,14 @@ function withBaseWidget(Widget, options) {
|
|
|
28
31
|
const [widgetConfigSettled, setWidgetConfigSettled] = useState(false);
|
|
29
32
|
const [uiConfigSettled, setUiConfigSettled] = useState(false);
|
|
30
33
|
const ownRequestsSettled = hardcopySettled && widgetConfigSettled && uiConfigSettled;
|
|
31
|
-
const
|
|
32
|
-
const {
|
|
34
|
+
const loadId = useRef(`${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`).current;
|
|
35
|
+
const { featureFlagService } = useFeatureFlagService();
|
|
36
|
+
const diagnosticsEnabled = !featureFlagService?.isFeatureGateEnabled(FeatureGates.IsWidgetDiagnosticsDisabled);
|
|
37
|
+
const hardcopyErrorRef = useRef(void 0);
|
|
38
|
+
const { isVisible, visibilitySource } = useTrackComponentVisibleEvent(widgetRef, {
|
|
33
39
|
widget_config_id: widgetConfigId,
|
|
34
40
|
widget_type: widgetType,
|
|
41
|
+
load_id: loadId,
|
|
35
42
|
...options?.visibilityEventProps
|
|
36
43
|
}, options?.rootMargin || "0px", isReady);
|
|
37
44
|
const startLoading = useMemo(() => {
|
|
@@ -42,6 +49,7 @@ function withBaseWidget(Widget, options) {
|
|
|
42
49
|
widgetConfigId,
|
|
43
50
|
widgetType
|
|
44
51
|
]);
|
|
52
|
+
const isLoading = startLoading && !ownRequestsSettled;
|
|
45
53
|
const settledStateRef = useRef({
|
|
46
54
|
hardcopy: false,
|
|
47
55
|
widgetConfig: false,
|
|
@@ -76,7 +84,9 @@ function withBaseWidget(Widget, options) {
|
|
|
76
84
|
getHardcopy({
|
|
77
85
|
widgetType,
|
|
78
86
|
userEvent
|
|
79
|
-
}).then(setHardcopyContent).catch(() => {
|
|
87
|
+
}).then(setHardcopyContent).catch((error) => {
|
|
88
|
+
hardcopyErrorRef.current = error instanceof Error && error.message.includes("timed out") ? "hardcopy_timeout" : "hardcopy_error";
|
|
89
|
+
}).finally(() => {
|
|
80
90
|
setHardcopySettled(true);
|
|
81
91
|
});
|
|
82
92
|
}, [
|
|
@@ -111,12 +121,29 @@ function withBaseWidget(Widget, options) {
|
|
|
111
121
|
widgetType,
|
|
112
122
|
getWidgetConfig
|
|
113
123
|
]);
|
|
124
|
+
useWidgetLoadDiagnostics({
|
|
125
|
+
enabled: diagnosticsEnabled,
|
|
126
|
+
loadId,
|
|
127
|
+
widgetType,
|
|
128
|
+
widgetConfigId,
|
|
129
|
+
startLoading,
|
|
130
|
+
ownRequestsSettled,
|
|
131
|
+
hardcopyContent,
|
|
132
|
+
visibilitySource,
|
|
133
|
+
pendingRequests: [
|
|
134
|
+
hardcopySettled ? null : "hardcopy",
|
|
135
|
+
widgetConfigSettled ? null : "widgetConfig",
|
|
136
|
+
uiConfigSettled ? null : "uiConfig"
|
|
137
|
+
].filter((name) => name !== null),
|
|
138
|
+
hardcopyErrorReason: hardcopyErrorRef.current
|
|
139
|
+
});
|
|
114
140
|
return /* @__PURE__ */ jsx("span", {
|
|
115
141
|
ref: widgetRef,
|
|
116
142
|
children: /* @__PURE__ */ jsx(Widget, {
|
|
117
143
|
...props,
|
|
118
144
|
isLoading,
|
|
119
145
|
isHardcopyLoading,
|
|
146
|
+
isHardcopySettled: hardcopySettled,
|
|
120
147
|
isPageLoading,
|
|
121
148
|
isWidgetConfigLoading,
|
|
122
149
|
isUiConfigLoading,
|
|
@@ -4,14 +4,14 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
4
4
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
8
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
7
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
10
|
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
9
11
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
10
12
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
11
13
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
12
14
|
let jotai = require("jotai");
|
|
13
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
14
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
15
15
|
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
16
16
|
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
17
17
|
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
@@ -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/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts
|
|
5
5
|
declare const ChatPreviewComparisonWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime4.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_runtime4.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_runtime12 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_runtime12.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_runtime12.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -3,14 +3,14 @@ import { getMessageText, getRecentProductImageUrls } from "../utils/functions.js
|
|
|
3
3
|
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
4
4
|
import { useCallback, useMemo } from "react";
|
|
5
5
|
import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
|
+
import { ChatElementDisplayLocationV3, FeatureGates, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
|
|
7
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
6
8
|
import { jsx } from "react/jsx-runtime";
|
|
7
9
|
import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
8
10
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
9
11
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
10
12
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
11
13
|
import { useAtomValue } from "jotai";
|
|
12
|
-
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
13
|
-
import { ChatElementDisplayLocationV3, FeatureGates, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
|
|
14
14
|
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
15
15
|
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
16
16
|
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
3
|
const require_PromptCarouselWidget = require('../PromptCarouselWidget/PromptCarouselWidget.cjs');
|
|
4
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
5
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
4
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
7
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
6
8
|
let jotai = require("jotai");
|
|
7
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
8
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
9
9
|
let __envive_ai_react_hooks_atoms_widget = require("@envive-ai/react-hooks/atoms/widget");
|
|
10
10
|
let __envive_ai_react_toolkit_v3_ChatPreviewLoading = require("@envive-ai/react-toolkit-v3/ChatPreviewLoading");
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 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_runtime11.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_runtime11.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_runtime9 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_runtime9.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_runtime9.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
2
|
import { PromptCarouselWidget } from "../PromptCarouselWidget/PromptCarouselWidget.js";
|
|
3
|
+
import { FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
4
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
3
5
|
import { jsx } from "react/jsx-runtime";
|
|
4
6
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
5
7
|
import { useAtomValue } from "jotai";
|
|
6
|
-
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
7
|
-
import { FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
8
8
|
import { chatPreviewLoadingDataAtom } from "@envive-ai/react-hooks/atoms/widget";
|
|
9
9
|
import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
|
|
10
10
|
|
|
@@ -4,14 +4,14 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
4
4
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
8
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
7
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
10
|
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
9
11
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
10
12
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
11
13
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
12
14
|
let jotai = require("jotai");
|
|
13
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
14
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
15
15
|
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
16
16
|
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
17
17
|
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 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_runtime16.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_runtime16.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -3,14 +3,14 @@ import { getMessageText } from "../utils/functions.js";
|
|
|
3
3
|
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
4
4
|
import { useCallback, useMemo } from "react";
|
|
5
5
|
import { EnviveMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
|
+
import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
7
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
6
8
|
import { jsx } from "react/jsx-runtime";
|
|
7
9
|
import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
8
10
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
9
11
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
10
12
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
11
13
|
import { useAtomValue } from "jotai";
|
|
12
|
-
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
13
|
-
import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
14
14
|
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
15
15
|
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
16
16
|
import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
@@ -12,12 +12,12 @@ const require_useAutoPopup = require('./hooks/useAutoPopup.cjs');
|
|
|
12
12
|
let react = require("react");
|
|
13
13
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
14
14
|
let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
|
|
15
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
16
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
15
17
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
18
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
17
19
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
18
20
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
19
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
20
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
21
21
|
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
22
22
|
let __envive_ai_react_toolkit_v3_FloatingButton = require("@envive-ai/react-toolkit-v3/FloatingButton");
|
|
23
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime18 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_runtime18.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -11,12 +11,12 @@ import { useAutoPopup } from "./hooks/useAutoPopup.js";
|
|
|
11
11
|
import { Suspense, lazy, useEffect, useMemo, useRef, useState } from "react";
|
|
12
12
|
import { useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
13
13
|
import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
|
|
14
|
+
import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
15
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
14
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
17
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
16
18
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
17
19
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
18
|
-
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
19
|
-
import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
20
20
|
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
21
21
|
import { FloatingButton } from "@envive-ai/react-toolkit-v3/FloatingButton";
|
|
22
22
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
let react = require("react");
|
|
3
|
-
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
4
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
5
3
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
4
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
5
|
+
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
6
6
|
|
|
7
7
|
//#region src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts
|
|
8
8
|
const useAutoPopup = ({ autoPopupConfig }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
|
-
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
3
|
-
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
4
2
|
import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
3
|
+
import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
|
|
4
|
+
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
5
5
|
|
|
6
6
|
//#region src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts
|
|
7
7
|
const useAutoPopup = ({ autoPopupConfig }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
let react = require("react");
|
|
3
|
-
let jotai = require("jotai");
|
|
4
3
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
4
|
+
let jotai = require("jotai");
|
|
5
5
|
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
6
6
|
let __envive_ai_react_toolkit_v3_FloatingButton = require("@envive-ai/react-toolkit-v3/FloatingButton");
|
|
7
7
|
let __envive_ai_react_hooks_atoms_org = require("@envive-ai/react-hooks/atoms/org");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { useAtomValue } from "jotai";
|
|
3
2
|
import { FeatureGates } from "@envive-ai/react-hooks/application/models";
|
|
3
|
+
import { useAtomValue } from "jotai";
|
|
4
4
|
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
5
5
|
import { FloatingButtonShow } from "@envive-ai/react-toolkit-v3/FloatingButton";
|
|
6
6
|
import { featureFlagServiceAtom } from "@envive-ai/react-hooks/atoms/org";
|
|
@@ -2,10 +2,10 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
3
|
require('../../hocs/withBaseWidget/index.cjs');
|
|
4
4
|
const require_debugBar = require('../../debug/debugBar.cjs');
|
|
5
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
6
|
+
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
5
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
8
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
7
|
-
let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
|
|
8
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
9
9
|
let __envive_ai_react_toolkit_v3_FullPageSalesAgent = require("@envive-ai/react-toolkit-v3/FullPageSalesAgent");
|
|
10
10
|
|
|
11
11
|
//#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx
|