@envive-ai/react-hooks 0.3.4 → 0.3.5

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.
Files changed (277) hide show
  1. package/dist/application/commerce-api.cjs +1 -1
  2. package/dist/application/commerce-api.js +1 -1
  3. package/dist/application/models/chatElementDisplayLocationV3.cjs +7 -1
  4. package/dist/application/models/chatElementDisplayLocationV3.d.cts +7 -1
  5. package/dist/application/models/chatElementDisplayLocationV3.d.ts +7 -1
  6. package/dist/application/models/chatElementDisplayLocationV3.js +7 -1
  7. package/dist/application/models/featureGates.cjs +6 -2
  8. package/dist/application/models/featureGates.d.cts +6 -2
  9. package/dist/application/models/featureGates.d.ts +6 -2
  10. package/dist/application/models/featureGates.js +6 -2
  11. package/dist/application/models/guards/api/isApiFormResponse.cjs +1 -1
  12. package/dist/application/models/guards/api/isApiFormResponse.js +1 -1
  13. package/dist/application/models/guards/api/isApiFormSubmittedResponseAttributes.cjs +1 -1
  14. package/dist/application/models/guards/api/isApiFormSubmittedResponseAttributes.js +1 -1
  15. package/dist/application/models/guards/api/isApiOrderResponseAttributes.cjs +1 -1
  16. package/dist/application/models/guards/api/isApiOrderResponseAttributes.js +1 -1
  17. package/dist/application/models/guards/api/isApiPDPEventAttributes.cjs +2 -2
  18. package/dist/application/models/guards/api/isApiPDPEventAttributes.js +2 -2
  19. package/dist/application/models/guards/api/isApiProductResponseAttributes.cjs +1 -1
  20. package/dist/application/models/guards/api/isApiProductResponseAttributes.js +1 -1
  21. package/dist/application/models/guards/api/isApiResponse.cjs +1 -1
  22. package/dist/application/models/guards/api/isApiResponse.js +1 -1
  23. package/dist/application/utils/analyticsUtils.cjs +1 -1
  24. package/dist/application/utils/analyticsUtils.js +1 -1
  25. package/dist/atoms/app/index.cjs +3 -1
  26. package/dist/atoms/app/index.d.cts +3 -3
  27. package/dist/atoms/app/index.d.ts +9 -9
  28. package/dist/atoms/app/index.js +3 -3
  29. package/dist/atoms/app/variant.cjs +2 -1
  30. package/dist/atoms/app/variant.d.cts +14 -6
  31. package/dist/atoms/app/variant.d.ts +17 -9
  32. package/dist/atoms/app/variant.js +2 -2
  33. package/dist/atoms/chat/chatState.d.cts +1 -1
  34. package/dist/atoms/chat/chatState.d.ts +18 -18
  35. package/dist/atoms/chat/form.d.cts +2 -2
  36. package/dist/atoms/chat/form.d.ts +2 -2
  37. package/dist/atoms/chat/index.d.cts +1 -1
  38. package/dist/atoms/chat/index.d.ts +3 -3
  39. package/dist/atoms/chat/lastMessage.d.cts +2 -2
  40. package/dist/atoms/chat/lastMessage.d.ts +2 -2
  41. package/dist/atoms/chat/performanceMetrics.d.cts +6 -6
  42. package/dist/atoms/chat/performanceMetrics.d.ts +6 -6
  43. package/dist/atoms/chat/renderedWidgetRefs.d.cts +2 -2
  44. package/dist/atoms/chat/renderedWidgetRefs.d.ts +2 -2
  45. package/dist/atoms/chat/replies.d.cts +1 -1
  46. package/dist/atoms/chat/replies.d.ts +3 -3
  47. package/dist/atoms/chat/suggestions.d.cts +2 -2
  48. package/dist/atoms/chat/suggestions.d.ts +2 -2
  49. package/dist/atoms/envive/enviveConfig.cjs +1 -11
  50. package/dist/atoms/envive/enviveConfig.js +1 -11
  51. package/dist/atoms/globalSearch/globalSearch.d.cts +5 -5
  52. package/dist/atoms/globalSearch/globalSearch.d.ts +5 -5
  53. package/dist/atoms/org/customerService.d.cts +6 -6
  54. package/dist/atoms/org/graphqlConfig.d.cts +4 -4
  55. package/dist/atoms/org/newOrgConfigAtom.d.cts +2 -2
  56. package/dist/atoms/org/orgAnalyticsConfig.d.ts +5 -5
  57. package/dist/atoms/search/chatSearch.d.ts +17 -17
  58. package/dist/atoms/search/productRetrievalAPI.cjs +1 -7
  59. package/dist/atoms/search/productRetrievalAPI.js +1 -7
  60. package/dist/atoms/search/productRetrievalAdapter.cjs +4 -4
  61. package/dist/atoms/search/productRetrievalAdapter.js +4 -4
  62. package/dist/atoms/search/searchAPI.d.ts +13 -13
  63. package/dist/atoms/search/types.d.cts +1 -1
  64. package/dist/atoms/search/types.d.ts +1 -1
  65. package/dist/atoms/search/utils.d.cts +1 -1
  66. package/dist/atoms/search/utils.d.ts +1 -1
  67. package/dist/atoms/widget/chatPreviewLoading.d.cts +2 -2
  68. package/dist/contexts/enviveContext/enviveContext.cjs +14 -11
  69. package/dist/contexts/enviveContext/enviveContext.d.cts +2 -1
  70. package/dist/contexts/enviveContext/enviveContext.d.ts +2 -1
  71. package/dist/contexts/enviveContext/enviveContext.js +14 -11
  72. package/dist/contexts/enviveContext/types.d.ts +1 -1
  73. package/dist/contexts/featureFlagContext/featureFlagContext.cjs +1 -1
  74. package/dist/contexts/featureFlagContext/featureFlagContext.js +1 -1
  75. package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.cjs +1 -1
  76. package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.js +1 -1
  77. package/dist/contexts/graphqlContext/graphqlContext.cjs +87 -6
  78. package/dist/contexts/graphqlContext/graphqlContext.js +87 -6
  79. package/dist/contexts/graphqlContext/mockV3Config.cjs +56 -14
  80. package/dist/contexts/graphqlContext/mockV3Config.js +56 -14
  81. package/dist/contexts/hardcopyContext/hardcopyContext.cjs +33 -20
  82. package/dist/contexts/hardcopyContext/hardcopyContext.d.cts +2 -2
  83. package/dist/contexts/hardcopyContext/hardcopyContext.d.ts +2 -2
  84. package/dist/contexts/hardcopyContext/hardcopyContext.js +33 -20
  85. package/dist/contexts/pageContext/index.cjs +1 -0
  86. package/dist/contexts/pageContext/index.d.cts +2 -2
  87. package/dist/contexts/pageContext/index.d.ts +2 -2
  88. package/dist/contexts/pageContext/index.js +2 -2
  89. package/dist/contexts/pageContext/mapping.cjs +91 -1
  90. package/dist/contexts/pageContext/mapping.d.cts +5 -2
  91. package/dist/contexts/pageContext/mapping.d.ts +5 -2
  92. package/dist/contexts/pageContext/mapping.js +90 -2
  93. package/dist/contexts/pageContext/pageContext.cjs +33 -5
  94. package/dist/contexts/pageContext/pageContext.d.cts +2 -1
  95. package/dist/contexts/pageContext/pageContext.d.ts +2 -1
  96. package/dist/contexts/pageContext/pageContext.js +34 -6
  97. package/dist/contexts/pageContext/types.d.cts +2 -2
  98. package/dist/contexts/pageContext/types.d.ts +2 -2
  99. package/dist/contexts/salesAgentContext/chatAPI.cjs +4 -1
  100. package/dist/contexts/salesAgentContext/chatAPI.d.cts +4 -1
  101. package/dist/contexts/salesAgentContext/chatAPI.d.ts +4 -1
  102. package/dist/contexts/salesAgentContext/chatAPI.js +4 -1
  103. package/dist/contexts/salesAgentContext/index.d.cts +2 -2
  104. package/dist/contexts/salesAgentContext/index.d.ts +2 -2
  105. package/dist/contexts/salesAgentContext/salesAgentContext.cjs +4 -2
  106. package/dist/contexts/salesAgentContext/salesAgentContext.d.cts +2 -2
  107. package/dist/contexts/salesAgentContext/salesAgentContext.d.ts +2 -2
  108. package/dist/contexts/salesAgentContext/salesAgentContext.js +4 -2
  109. package/dist/contexts/salesAgentContext/salesAgentService.cjs +7 -4
  110. package/dist/contexts/salesAgentContext/salesAgentService.js +8 -5
  111. package/dist/contexts/systemSettingsContext/systemSettingsContext.d.cts +2 -2
  112. package/dist/contexts/types.d.cts +1 -1
  113. package/dist/contexts/types.d.ts +1 -1
  114. package/dist/contexts/typesV3.cjs +20 -17
  115. package/dist/contexts/typesV3.d.cts +39 -12
  116. package/dist/contexts/typesV3.d.ts +39 -12
  117. package/dist/contexts/typesV3.js +5 -2
  118. package/dist/hooks/ChatToggle/useChatToggle.cjs +1 -1
  119. package/dist/hooks/ChatToggle/useChatToggle.d.cts +5 -5
  120. package/dist/hooks/ChatToggle/useChatToggle.d.ts +5 -5
  121. package/dist/hooks/ChatToggle/useChatToggle.js +1 -1
  122. package/dist/hooks/ElementObserver/useElementObserver.cjs +10 -10
  123. package/dist/hooks/ElementObserver/useElementObserver.js +10 -10
  124. package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.cts +2 -2
  125. package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.ts +2 -2
  126. package/dist/hooks/Search/useSearch.cjs +1 -1
  127. package/dist/hooks/Search/useSearch.js +1 -1
  128. package/dist/hooks/utils.d.cts +1 -1
  129. package/dist/merchants/domInsertion.cjs +1 -1
  130. package/dist/merchants/domInsertion.d.cts +1 -1
  131. package/dist/merchants/domInsertion.d.ts +1 -1
  132. package/dist/merchants/domInsertion.js +1 -1
  133. package/dist/packages/components-v3/dist/ChatHeader/ChatHeader.cjs +2 -0
  134. package/dist/packages/components-v3/dist/ChatHeader/ChatHeader.js +4 -0
  135. package/dist/packages/components-v3/dist/ChatHeader/components/CloseButton.cjs +16 -0
  136. package/dist/packages/components-v3/dist/ChatHeader/components/CloseButton.js +17 -0
  137. package/dist/packages/components-v3/dist/ChatHeader/components/Handle.cjs +6 -0
  138. package/dist/packages/components-v3/dist/ChatHeader/components/Handle.js +8 -0
  139. package/dist/packages/components-v3/dist/ChatHeader/components/Layout.cjs +4 -0
  140. package/dist/packages/components-v3/dist/ChatHeader/components/Layout.js +6 -0
  141. package/dist/packages/components-v3/dist/ChatHeader/components/Logo.cjs +3 -0
  142. package/dist/packages/components-v3/dist/ChatHeader/components/Logo.js +5 -0
  143. package/dist/packages/components-v3/dist/ChatHeader/components/Toggle.cjs +7 -0
  144. package/dist/packages/components-v3/dist/ChatHeader/components/Toggle.js +9 -0
  145. package/dist/packages/components-v3/dist/ChatHeader/components/ToggleItem.cjs +6 -0
  146. package/dist/packages/components-v3/dist/ChatHeader/components/ToggleItem.js +8 -0
  147. package/dist/packages/components-v3/dist/ChatHeader/components/index.cjs +6 -0
  148. package/dist/packages/components-v3/dist/ChatHeader/components/index.js +8 -0
  149. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetCloseButtonProperties.cjs +22 -0
  150. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetCloseButtonProperties.js +23 -0
  151. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetHandleProperties.cjs +58 -0
  152. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetHandleProperties.js +59 -0
  153. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetLayoutProperties.cjs +8 -0
  154. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetLayoutProperties.js +9 -0
  155. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleOptionProperties.cjs +1 -0
  156. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleOptionProperties.js +3 -0
  157. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleProperties.cjs +12 -0
  158. package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleProperties.js +13 -0
  159. package/dist/packages/components-v3/dist/ChatHeader/index.cjs +2 -0
  160. package/dist/packages/components-v3/dist/ChatHeader/index.js +4 -0
  161. package/dist/packages/components-v3/dist/ChatHeader/types/index.cjs +11 -0
  162. package/dist/packages/components-v3/dist/ChatHeader/types/index.js +10 -0
  163. package/dist/packages/components-v3/dist/ImageGallery/components/Layout.cjs +2 -2
  164. package/dist/packages/components-v3/dist/ImageGallery/components/Layout.js +2 -2
  165. package/dist/packages/components-v3/dist/PromptButton/PromptButton.cjs +1 -1
  166. package/dist/packages/components-v3/dist/PromptButton/PromptButton.js +1 -1
  167. package/dist/packages/components-v3/dist/PromptButton/components/Layout.cjs +1 -1
  168. package/dist/packages/components-v3/dist/PromptButton/components/Layout.js +1 -1
  169. package/dist/packages/components-v3/dist/PromptButton/hooks/useGetLayoutBaseProperties.cjs +1 -1
  170. package/dist/packages/components-v3/dist/PromptButton/hooks/useGetLayoutBaseProperties.js +1 -1
  171. package/dist/packages/components-v3/dist/Tokens/index.cjs +11 -0
  172. package/dist/packages/components-v3/dist/Tokens/index.js +13 -0
  173. package/dist/packages/components-v3/dist/WelcomeMessage/WelcomeMessage.cjs +2 -0
  174. package/dist/packages/components-v3/dist/WelcomeMessage/WelcomeMessage.js +4 -0
  175. package/dist/packages/components-v3/dist/WelcomeMessage/components/Container.cjs +14 -0
  176. package/dist/packages/components-v3/dist/WelcomeMessage/components/Container.js +15 -0
  177. package/dist/packages/components-v3/dist/WelcomeMessage/components/SparkleIcon.cjs +3 -0
  178. package/dist/packages/components-v3/dist/WelcomeMessage/components/SparkleIcon.js +5 -0
  179. package/dist/packages/components-v3/dist/WelcomeMessage/components/Text.cjs +3 -0
  180. package/dist/packages/components-v3/dist/WelcomeMessage/components/Text.js +5 -0
  181. package/dist/packages/components-v3/dist/WelcomeMessage/components/Title.cjs +3 -0
  182. package/dist/packages/components-v3/dist/WelcomeMessage/components/Title.js +5 -0
  183. package/dist/packages/components-v3/dist/WelcomeMessage/components/index.cjs +4 -0
  184. package/dist/packages/components-v3/dist/WelcomeMessage/components/index.js +6 -0
  185. package/dist/packages/components-v3/dist/WelcomeMessage/hooks/useGetContainerProperties.cjs +1 -0
  186. package/dist/packages/components-v3/dist/WelcomeMessage/hooks/useGetContainerProperties.js +3 -0
  187. package/dist/packages/components-v3/dist/WelcomeMessage/hooks/useGetSparkleIconProperties.cjs +1 -0
  188. package/dist/packages/components-v3/dist/WelcomeMessage/hooks/useGetSparkleIconProperties.js +3 -0
  189. package/dist/packages/components-v3/dist/WelcomeMessage/index.cjs +2 -0
  190. package/dist/packages/components-v3/dist/WelcomeMessage/index.js +4 -0
  191. package/dist/packages/components-v3/dist/WelcomeMessage/types/types.cjs +14 -0
  192. package/dist/packages/components-v3/dist/WelcomeMessage/types/types.js +14 -0
  193. package/dist/packages/components-v3/dist/src/models/colorsConfig.cjs +26 -0
  194. package/dist/packages/components-v3/dist/src/models/colorsConfig.js +25 -0
  195. package/dist/packages/components-v3/dist/tokens/aspectRatio/aspectRatio.cjs +16 -0
  196. package/dist/packages/components-v3/dist/tokens/aspectRatio/aspectRatio.js +17 -0
  197. package/dist/packages/components-v3/dist/tokens/breakpoints/breakpoints.cjs +25 -0
  198. package/dist/packages/components-v3/dist/tokens/breakpoints/breakpoints.js +23 -0
  199. package/dist/packages/components-v3/dist/tokens/colors/colors.cjs +51 -0
  200. package/dist/packages/components-v3/dist/tokens/colors/colors.js +51 -0
  201. package/dist/packages/components-v3/dist/tokens/radius/radius.cjs +64 -0
  202. package/dist/packages/components-v3/dist/tokens/radius/radius.js +65 -0
  203. package/dist/packages/components-v3/dist/tokens/theme/theme.cjs +13 -0
  204. package/dist/packages/components-v3/dist/tokens/theme/theme.js +12 -0
  205. package/dist/packages/components-v3/dist/tokens/typography/fontFamily.cjs +25 -0
  206. package/dist/packages/components-v3/dist/tokens/typography/fontFamily.js +25 -0
  207. package/dist/packages/components-v3/dist/tokens/typography/fontSize.cjs +37 -0
  208. package/dist/packages/components-v3/dist/tokens/typography/fontSize.js +38 -0
  209. package/dist/packages/components-v3/dist/tokens/typography/fontWeight.cjs +17 -0
  210. package/dist/packages/components-v3/dist/tokens/typography/fontWeight.js +18 -0
  211. package/dist/packages/components-v3/dist/tokens/typography/letterSpacing.cjs +15 -0
  212. package/dist/packages/components-v3/dist/tokens/typography/letterSpacing.js +16 -0
  213. package/dist/packages/components-v3/dist/tokens/typography/lineHeight.cjs +31 -0
  214. package/dist/packages/components-v3/dist/tokens/typography/lineHeight.js +32 -0
  215. package/dist/packages/components-v3/dist/tokens/typography/typography.cjs +5 -0
  216. package/dist/packages/components-v3/dist/tokens/typography/typography.js +7 -0
  217. package/dist/packages/components-v3/dist/tokens/utils.cjs +7 -0
  218. package/dist/packages/components-v3/dist/tokens/utils.js +6 -0
  219. package/dist/packages/components-v3/dist/utils/useResponsiveValue.cjs +2 -2
  220. package/dist/packages/components-v3/dist/utils/useResponsiveValue.js +2 -2
  221. package/dist/packages/icons/dist/IconCloseRounded.cjs +22 -0
  222. package/dist/packages/icons/dist/IconCloseRounded.js +22 -0
  223. package/dist/packages/icons/dist/IconCloseSharp.cjs +31 -0
  224. package/dist/packages/icons/dist/IconCloseSharp.js +31 -0
  225. package/dist/packages/icons/dist/IconCloseTransparent.cjs +24 -0
  226. package/dist/packages/icons/dist/IconCloseTransparent.js +24 -0
  227. package/dist/packages/icons/dist/Sparkles.cjs +8 -0
  228. package/dist/packages/icons/dist/Sparkles.js +9 -0
  229. package/dist/types/customerService.cjs +20 -0
  230. package/dist/types/customerService.js +19 -0
  231. package/package.json +1 -5
  232. package/src/application/models/chatElementDisplayLocationV3.ts +6 -0
  233. package/src/application/models/featureGates.ts +6 -1
  234. package/src/application/models/guards/api/isApiPDPEventAttributes.ts +5 -1
  235. package/src/atoms/app/index.ts +7 -1
  236. package/src/atoms/app/variant.ts +3 -2
  237. package/src/atoms/envive/enviveConfig.ts +0 -11
  238. package/src/atoms/search/productRetrievalAPI.ts +0 -8
  239. package/src/atoms/search/productRetrievalAdapter.ts +6 -10
  240. package/src/contexts/amplitudeContext/__tests__/amplitudeContext.test.tsx +0 -1
  241. package/src/contexts/enviveContext/enviveContext.tsx +5 -3
  242. package/src/contexts/graphqlContext/graphqlContext.tsx +128 -9
  243. package/src/contexts/graphqlContext/mockV3Config.ts +53 -12
  244. package/src/contexts/hardcopyContext/hardcopyContext.tsx +29 -13
  245. package/src/contexts/pageContext/__tests__/pageContext.test.tsx +119 -69
  246. package/src/contexts/pageContext/mapping.ts +184 -2
  247. package/src/contexts/pageContext/pageContext.tsx +30 -5
  248. package/src/contexts/pageContext/types.ts +1 -2
  249. package/src/contexts/salesAgentContext/chatAPI.ts +9 -0
  250. package/src/contexts/salesAgentContext/salesAgentContext.tsx +10 -3
  251. package/src/contexts/salesAgentContext/salesAgentService.ts +13 -1
  252. package/src/contexts/typesV3.ts +52 -20
  253. package/src/contexts/uiConfigContext/__tests__/uiConfigContext.test.tsx +14 -6
  254. package/src/contexts/widgetConfigContext/__tests__/widgetConfigContext.test.tsx +1 -1
  255. package/src/hooks/ChatToggle/useChatToggle.ts +4 -4
  256. package/src/hooks/ElementObserver/useElementObserver.ts +9 -9
  257. package/src/merchants/domInsertion.ts +0 -16
  258. package/dist/hooks/ChatToggleAnalytics/index.cjs +0 -3
  259. package/dist/hooks/ChatToggleAnalytics/index.d.cts +0 -2
  260. package/dist/hooks/ChatToggleAnalytics/index.d.ts +0 -2
  261. package/dist/hooks/ChatToggleAnalytics/index.js +0 -3
  262. package/dist/hooks/ChatToggleAnalytics/useChatToggleAnalytics.cjs +0 -19
  263. package/dist/hooks/ChatToggleAnalytics/useChatToggleAnalytics.d.cts +0 -9
  264. package/dist/hooks/ChatToggleAnalytics/useChatToggleAnalytics.d.ts +0 -9
  265. package/dist/hooks/ChatToggleAnalytics/useChatToggleAnalytics.js +0 -18
  266. package/dist/packages/components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.cjs +0 -25
  267. package/dist/packages/components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.js +0 -23
  268. package/src/application/utils/cdnUtils.ts +0 -8
  269. package/src/config/divIds.ts +0 -31
  270. package/src/config/locators/components/chat/entrypoints.ts +0 -13
  271. package/src/config/locators/components/chat/preview.ts +0 -12
  272. package/src/config/locators/components/report-issue.ts +0 -21
  273. package/src/config/socialProofClasses.ts +0 -12
  274. package/src/events/registerAnalyticsListeners.ts +0 -44
  275. package/src/hooks/ChatToggleAnalytics/index.ts +0 -1
  276. package/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts +0 -15
  277. package/src/types/FilterAttribute.ts +0 -32
@@ -19,7 +19,7 @@ import { useSystemSettingsContext } from 'src/hooks/SystemSettingsContext';
19
19
  import { SalesAgentChatAPI, useSalesAgentChatAPI } from './chatAPI';
20
20
  import { useSalesAgentService } from './salesAgentService';
21
21
 
22
- interface SalesAgent extends SalesAgentChatAPI {
22
+ export interface SalesAgent extends SalesAgentChatAPI {
23
23
  // Messages are the full list of all turns
24
24
  messages: Message[][];
25
25
  // Pending messages are messages that the user has clicked/typed but have not yet been sent to the backend.
@@ -148,8 +148,13 @@ export const useSalesAgent = (): SalesAgent => {
148
148
  const isResponseStreaming = useAtomValue(responseStreamingAtom);
149
149
  const isPendingResponse = useAtomValue(pendingResponseAtom);
150
150
  const isInitialized = useAtomValue(initializedAtom);
151
- const { logPageVisit, onSuggestionClicked, onTypedMessageSubmitted, onFormResponseSubmitted } =
152
- useSalesAgentChatAPI();
151
+ const {
152
+ logPageVisit,
153
+ logUserEvent,
154
+ onSuggestionClicked,
155
+ onTypedMessageSubmitted,
156
+ onFormResponseSubmitted,
157
+ } = useSalesAgentChatAPI();
153
158
 
154
159
  const salesAgent: SalesAgent = useMemo(() => {
155
160
  return {
@@ -160,6 +165,7 @@ export const useSalesAgent = (): SalesAgent => {
160
165
  isResponseStreaming,
161
166
  isPendingResponse,
162
167
  logPageVisit,
168
+ logUserEvent,
163
169
  onSuggestionClicked,
164
170
  onTypedMessageSubmitted,
165
171
  onFormResponseSubmitted,
@@ -172,6 +178,7 @@ export const useSalesAgent = (): SalesAgent => {
172
178
  isResponseStreaming,
173
179
  isPendingResponse,
174
180
  logPageVisit,
181
+ logUserEvent,
175
182
  onSuggestionClicked,
176
183
  onTypedMessageSubmitted,
177
184
  onFormResponseSubmitted,
@@ -18,6 +18,7 @@ import {
18
18
  messagesAtom,
19
19
  pendingResponseAtom,
20
20
  requestFailureAtom,
21
+ responseStreamingAtom,
21
22
  suggestionsAtom,
22
23
  } from 'src/atoms/chat/chatState';
23
24
  import { useMessageInterceptor } from 'src/interceptors/useMessageInterceptor';
@@ -111,6 +112,7 @@ const processStreamingResponse = async (
111
112
  stream: AsyncIterable<Response>,
112
113
  messageInterceptor: { intercept: (response?: Response) => boolean | undefined },
113
114
  setMessages: (updater: (prev: Message[][]) => Message[][]) => void,
115
+ setResponseStreaming: (responseStreaming: boolean) => void,
114
116
  ): Promise<void> => {
115
117
  let lastMessage: Message | undefined;
116
118
 
@@ -123,6 +125,9 @@ const processStreamingResponse = async (
123
125
  if (!response) {
124
126
  throw new Error('No response from stream');
125
127
  }
128
+
129
+ setResponseStreaming(true);
130
+
126
131
  const message = messageFromResponse(response);
127
132
  if (!message) {
128
133
  throw new Error('Failed to transform API response to client message');
@@ -151,6 +156,7 @@ export const useSalesAgentService: () => SalesAgentService = () => {
151
156
  const setMessages = useSetAtom(messagesAtom);
152
157
  const setSuggestions = useSetAtom(suggestionsAtom);
153
158
  const setPendingResponse = useSetAtom(pendingResponseAtom);
159
+ const setResponseStreaming = useSetAtom(responseStreamingAtom);
154
160
  const messageInterceptor = useMessageInterceptor();
155
161
 
156
162
  const featureFlagService = useFeatureFlagService();
@@ -195,7 +201,12 @@ export const useSalesAgentService: () => SalesAgentService = () => {
195
201
  try {
196
202
  setRequestFailure(false);
197
203
 
198
- await processStreamingResponse(stream, messageInterceptor, setMessages);
204
+ await processStreamingResponse(
205
+ stream,
206
+ messageInterceptor,
207
+ setMessages,
208
+ setResponseStreaming,
209
+ );
199
210
 
200
211
  // TODO: Add support for the Chrome Extension communication
201
212
  // Log successful next_responses call
@@ -230,6 +241,7 @@ export const useSalesAgentService: () => SalesAgentService = () => {
230
241
  throw e;
231
242
  } finally {
232
243
  setPendingResponse(false);
244
+ setResponseStreaming(false);
233
245
  // logPerfMetric(PerfMetricsEvents.FirstResponseCompleted);
234
246
  }
235
247
  },
@@ -2,13 +2,12 @@ import { AnimationSpeed, PromptCarouselRows } from '@envive-ai/react-toolkit-v3/
2
2
  import { ImageGalleryImage, ImageGalleryLayout } from '@envive-ai/react-toolkit-v3/ImageGallery';
3
3
  import { PromptButtonVariant } from '@envive-ai/react-toolkit-v3/PromptButton';
4
4
  import { WidgetWrapperVariant } from '@envive-ai/react-toolkit-v3/WidgetWrapper';
5
+ import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
5
6
  import { DynamicLayout } from '@envive-ai/react-toolkit-v3/SocialProof';
6
- import {
7
- ColorNames,
8
- CustomerServiceIntegration,
9
- MerchantVariantSettings,
10
- SearchConfig,
11
- } from './types';
7
+ import { SparkleIconColor } from '@envive-ai/react-toolkit-v3/WelcomeMessage';
8
+ import { ColorNames } from '../application/models/colorsConfigV3';
9
+ import { CustomerServiceType } from '../types/customerService';
10
+ import type { MerchantVariantSettings, SearchConfig } from './types';
12
11
 
13
12
  export enum LetterSpacingCSSVar {
14
13
  Tight0 = 'envive-typography-letter-spacing-tight-0',
@@ -93,8 +92,6 @@ export const enum ButtonColorsVars {
93
92
  DarkButtonIconColor = 'envive-colors-button-dark-icon-color',
94
93
  }
95
94
 
96
- type Theme = 'standard' | 'modern' | 'minimal';
97
-
98
95
  type ImageAspectRatio = '1/1' | '3/4';
99
96
 
100
97
  type ButtonColors = {
@@ -154,7 +151,8 @@ type Typography = {
154
151
  type LookAndFeelConfig = {
155
152
  theme: Theme;
156
153
  agentName: string;
157
- chatHeaderLogoSrc: string;
154
+ chatHeaderLogoDarkSrc: string;
155
+ chatHeaderLogoLightSrc: string;
158
156
  widgetLogoSrc: string;
159
157
  hideWidgetLogo: boolean;
160
158
  elementRadius: number;
@@ -172,19 +170,15 @@ type ConfigVersion = ConfigVersionEnum.V3 | ConfigVersionEnum.Deprecated | undef
172
170
 
173
171
  type Mode = 'dark' | 'light';
174
172
 
175
- type Position = 'bottom-left' | 'middle-left' | 'middle-right' | 'bottom-right';
173
+ type Position = 'bottomLeft' | 'middleLeft' | 'middleRight' | 'bottomRight';
176
174
 
177
- type ShowOptions =
178
- | 'always'
179
- | 'after-interaction-on-mobile-always-desktop'
180
- | 'after-interaction-anywhere'
181
- | 'never';
175
+ type ShowOptions = 'always' | 'postInteraction' | 'none';
182
176
 
183
177
  type Style = 'attached' | 'detached';
184
178
 
185
179
  type FloatingButtonConfig = {
186
180
  position: Position;
187
- backgroundColor: string;
181
+ backgroundColor?: string;
188
182
  mode: Mode;
189
183
  showOption: ShowOptions;
190
184
  iconSVGSrc?: string;
@@ -192,14 +186,23 @@ type FloatingButtonConfig = {
192
186
  };
193
187
 
194
188
  type FloatingChatConfig = {
195
- headerBackgroundColor: string;
189
+ headerBackgroundColor?: string;
196
190
  headerMode: Mode;
197
- welcomeMessageIconColor: string;
191
+ welcomeMessageIconColor: SparkleIconColor;
198
192
  showVerifiedBuyer: boolean;
199
- userCanEditQueries: boolean;
193
+ userQueryInputEnabled: boolean;
200
194
  showEnviveLogo: boolean;
201
195
  ignoreFirstModelResponse?: boolean;
202
196
  neverShowSingleProductCards?: boolean;
197
+ welcomeMessageTitle: string;
198
+ welcomeMessageText: string;
199
+ chatFooterTextFieldPlaceholderText: string;
200
+ };
201
+
202
+ type CustomerServiceIntegration = {
203
+ enabled: boolean;
204
+ provider: CustomerServiceType;
205
+ suppressMerchantButton?: boolean;
203
206
  };
204
207
 
205
208
  type OrgUIConfigV3 = {
@@ -233,8 +236,11 @@ export enum WidgetTypeV3 {
233
236
  ChatPreviewComparisonV3 = 'ChatPreviewComparisonV3',
234
237
  ChatPreviewLoadingV3 = 'ChatPreviewLoadingV3',
235
238
  ImagePromptCardV3 = 'ImagePromptCardV3',
239
+ PromptButtonCarouselWithImageV3 = 'PromptButtonCarouselWithImageV3',
236
240
  ImageBannerV3 = 'ImageBannerV3',
237
241
  SingleImagePromptV3 = 'SingleImagePromptV3',
242
+ FloatingChatV3 = 'FloatingChatV3',
243
+ FloatingButtonV3 = 'FloatingButtonV3',
238
244
  }
239
245
 
240
246
  interface BaseWidgetConfig<T extends WidgetTypeV3> {
@@ -275,6 +281,14 @@ interface SocialProofWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.Social
275
281
  images?: ImageGalleryImage[];
276
282
  }
277
283
 
284
+ interface TypingAnimationWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TypingAnimationV3> {
285
+ widgetVariant?: WidgetWrapperVariant;
286
+ cardColor?: string;
287
+ promptButtonType?: PromptButtonVariant;
288
+ promptCarouselRows?: PromptCarouselRows;
289
+ showTextField?: boolean;
290
+ }
291
+
278
292
  interface ChatPreviewComparisonWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewComparisonV3> {
279
293
  variant: WidgetWrapperVariant;
280
294
  hexCardColor?: string;
@@ -294,23 +308,41 @@ interface ChatPreviewWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPr
294
308
  hideTextField?: boolean;
295
309
  }
296
310
 
311
+ interface PromptButtonCarouselWithImageWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptButtonCarouselWithImageV3> {
312
+ promptButtonType?: PromptButtonVariant;
313
+ image?: ImageGalleryImage;
314
+ hideTextField?: boolean;
315
+ }
316
+
317
+ interface FloatingChatWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FloatingChatV3> {}
318
+
297
319
  type WidgetConfigV3 =
298
320
  | PromptCarouselWidgetV3Config
299
321
  | SocialProofWidgetV3Config
322
+ | TitledPromptCarouselWidgetV3Config
300
323
  | ChatPreviewComparisonWidgetV3Config
301
324
  | ChatPreviewLoadingWidgetV3Config
325
+ | TypingAnimationWidgetV3Config
302
326
  | ChatPreviewWidgetV3Config
303
- | TitledPromptCarouselWidgetV3Config;
327
+ | PromptButtonCarouselWithImageWidgetV3Config
328
+ | FloatingChatWidgetV3Config;
304
329
 
305
330
  export type {
306
331
  OrgUIConfigV3,
307
332
  WidgetConfigV3,
333
+ LookAndFeelConfig,
308
334
  SocialProofWidgetV3Config,
309
335
  PromptCarouselWidgetV3Config,
310
336
  ChatPreviewComparisonWidgetV3Config,
311
337
  ChatPreviewLoadingWidgetV3Config,
312
338
  ChatPreviewWidgetV3Config,
313
339
  TitledPromptCarouselWidgetV3Config,
340
+ TypingAnimationWidgetV3Config,
341
+ PromptButtonCarouselWithImageWidgetV3Config,
342
+ FloatingChatWidgetV3Config,
343
+ FloatingChatConfig,
344
+ CustomerServiceIntegration,
345
+ Position,
314
346
  };
315
347
 
316
348
  export { SocialProofWidgetKind };
@@ -2,8 +2,11 @@ import React from 'react';
2
2
  import { act, render, screen, waitFor } from '@testing-library/react';
3
3
  import Logger from 'src/application/logging/logger';
4
4
  import { useNewOrgConfig } from 'src/hooks/NewOrgConfig';
5
+ import { SparkleIconColor } from '@envive-ai/react-toolkit-v3/WelcomeMessage';
6
+ import { ChatHeaderVariant } from '@envive-ai/react-toolkit-v3/ChatHeader';
5
7
  import { UiConfigProvider, useUiConfig } from '../uiConfigContext';
6
8
  import { ConfigVersionEnum, OrgUIConfigV3 } from '../../typesV3';
9
+ import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
7
10
 
8
11
  // Mock the Logger to avoid console output in tests
9
12
  vi.spyOn(Logger, 'logInfo').mockImplementation(() => {});
@@ -83,9 +86,10 @@ describe('UiConfigProvider', () => {
83
86
  version: ConfigVersionEnum.V3,
84
87
  shortName: 'test-merchant',
85
88
  lookAndFeel: {
86
- theme: 'standard',
89
+ theme: Theme.STANDARD,
87
90
  agentName: 'Test Agent',
88
- chatHeaderLogoSrc: '',
91
+ chatHeaderLogoDarkSrc: '',
92
+ chatHeaderLogoLightSrc: '',
89
93
  widgetLogoSrc: '',
90
94
  hideWidgetLogo: false,
91
95
  elementRadius: 8,
@@ -103,7 +107,7 @@ describe('UiConfigProvider', () => {
103
107
  },
104
108
  },
105
109
  floatingButton: {
106
- position: 'bottom-right',
110
+ position: 'bottomRight',
107
111
  backgroundColor: '#000000',
108
112
  mode: 'light',
109
113
  showOption: 'always',
@@ -111,11 +115,15 @@ describe('UiConfigProvider', () => {
111
115
  },
112
116
  floatingChat: {
113
117
  headerBackgroundColor: '#ffffff',
114
- headerMode: 'light',
115
- welcomeMessageIconColor: '#000000',
118
+ headerMode: ChatHeaderVariant.LIGHT,
119
+ welcomeMessageIconColor: SparkleIconColor.ACCENT_PRIMARY,
116
120
  showVerifiedBuyer: true,
117
- userCanEditQueries: true,
121
+ userQueryInputEnabled: true,
118
122
  showEnviveLogo: false,
123
+ welcomeMessageTitle: 'Welcome to Envive AI',
124
+ welcomeMessageText:
125
+ 'Your personal shopper trained on the collective knowledge of thousands of real experts!',
126
+ chatFooterTextFieldPlaceholderText: 'Ask me anything...',
119
127
  },
120
128
  });
121
129
 
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { act, render, screen, waitFor } from '@testing-library/react';
3
3
  import Logger from 'src/application/logging/logger';
4
4
  import { useNewOrgConfig } from 'src/hooks/NewOrgConfig';
5
+ import { PromptButtonVariant } from '@envive-ai/react-toolkit-v3/PromptButton';
5
6
  import { WidgetConfigProvider, useWidgetConfig } from '../widgetConfigContext';
6
7
  import { WidgetConfigV3, WidgetTypeV3 } from '../../typesV3';
7
- import { PromptButtonVariant } from '@envive-ai/react-toolkit-v3/PromptButton';
8
8
 
9
9
  // Mock the Logger to avoid console output in tests
10
10
  vi.spyOn(Logger, 'logInfo').mockImplementation(() => {});
@@ -1,5 +1,5 @@
1
1
  import { useAtomValue, useSetAtom } from 'jotai';
2
- import { ChatElementDisplayLocation } from 'src/application/models/chatElementDisplayLocation';
2
+ import { ChatElementDisplayLocationV3 } from 'src/application/models';
3
3
  import { chatAtom, chatOnToggleAtom } from 'src/atoms/chat';
4
4
  import {
5
5
  SpiffyMetricsEventName,
@@ -11,7 +11,7 @@ export const useChatToggle = () => {
11
11
  const { isOpen } = useAtomValue(chatAtom);
12
12
  const { trackEvent } = useAmplitude();
13
13
 
14
- const toggle = (triggerLocation: ChatElementDisplayLocation, triggerId?: string) => {
14
+ const toggle = (triggerLocation: ChatElementDisplayLocationV3, triggerId?: string) => {
15
15
  if (!isOpen) {
16
16
  trackEvent({
17
17
  eventName: SpiffyMetricsEventName.ChatComponentExpanded,
@@ -37,13 +37,13 @@ export const useChatToggle = () => {
37
37
  onToggle();
38
38
  };
39
39
 
40
- const openChat = (triggerLocation: ChatElementDisplayLocation, triggerId?: string) => {
40
+ const openChat = (triggerLocation: ChatElementDisplayLocationV3, triggerId?: string) => {
41
41
  if (!isOpen) {
42
42
  toggle(triggerLocation, triggerId);
43
43
  }
44
44
  };
45
45
 
46
- const closeChat = (triggerLocation: ChatElementDisplayLocation, triggerId?: string) => {
46
+ const closeChat = (triggerLocation: ChatElementDisplayLocationV3, triggerId?: string) => {
47
47
  if (isOpen) {
48
48
  toggle(triggerLocation, triggerId);
49
49
  }
@@ -138,7 +138,7 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
138
138
  event: K,
139
139
  fn: EventListenerOrEventListenerObject,
140
140
  ) => {
141
- eoRef.current.registerEvent(event, fn);
141
+ eoRef.current?.registerEvent(event, fn);
142
142
  };
143
143
 
144
144
  /**
@@ -149,7 +149,7 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
149
149
  */
150
150
  const render = (fn: () => ReactElement) => {
151
151
  if (!renderBlocked) {
152
- return eoRef.current.render(fn);
152
+ return eoRef.current?.render(fn);
153
153
  }
154
154
  return undefined;
155
155
  };
@@ -159,7 +159,7 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
159
159
  *
160
160
  * @returns
161
161
  */
162
- const exists = () => !!eoRef.current.getNode();
162
+ const exists = () => !!eoRef.current?.getNode();
163
163
 
164
164
  /**
165
165
  * Checks if rendering is unblocked.
@@ -174,7 +174,7 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
174
174
  * @param event
175
175
  */
176
176
  const fire = (event: MouseEventTypes) => {
177
- eoRef.current.fire(event);
177
+ eoRef.current?.fire(event);
178
178
  };
179
179
 
180
180
  /**
@@ -182,14 +182,14 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
182
182
  *
183
183
  * @returns
184
184
  */
185
- const show = () => eoRef.current.show();
185
+ const show = () => eoRef.current?.show();
186
186
 
187
187
  /**
188
188
  * Hides the HTML element.
189
189
  *
190
190
  * @returns
191
191
  */
192
- const hide = () => eoRef.current.hide();
192
+ const hide = () => eoRef.current?.hide();
193
193
 
194
194
  /**
195
195
  * Blocks the rendering of elements.
@@ -216,14 +216,14 @@ export const useElementObserver = (selector: NodeSelector): ElementObserverUtili
216
216
  };
217
217
 
218
218
  useEffect(() => {
219
- eoRef.current.init();
220
- eoRef.current.registerOnReset(() => setRenderBlocked(INITIAL_RENDER_STATE));
219
+ eoRef.current?.init();
220
+ eoRef.current?.registerOnReset(() => setRenderBlocked(INITIAL_RENDER_STATE));
221
221
  DOMObserver.observe();
222
222
  return () => DOMObserver.remove(selector);
223
223
  }, [selector.getPattern()]);
224
224
 
225
225
  return {
226
- targetNode: eoRef.current.getNode(),
226
+ targetNode: eoRef.current?.getNode(),
227
227
  onChange,
228
228
  onAdd,
229
229
  onRemove,
@@ -9,20 +9,4 @@ enum DOMInsertionType {
9
9
  NONE = 'none',
10
10
  }
11
11
 
12
- export const DOMInsertionTypeToInsertPosition = (type: DOMInsertionType): InsertPosition => {
13
- switch (type) {
14
- case DOMInsertionType.ADJACENT_AFTER_BEGIN:
15
- return 'afterbegin';
16
- case DOMInsertionType.BEFORE:
17
- case DOMInsertionType.ADJACENT_BEFORE_BEGIN:
18
- return 'beforebegin';
19
- case DOMInsertionType.ADJACENT_BEFORE_END:
20
- return 'beforeend';
21
- case DOMInsertionType.AFTER:
22
- case DOMInsertionType.ADJACENT_AFTER_END:
23
- default:
24
- return 'afterend';
25
- }
26
- };
27
-
28
12
  export { DOMInsertionType };
@@ -1,3 +0,0 @@
1
- const require_useChatToggleAnalytics = require('./useChatToggleAnalytics.cjs');
2
-
3
- exports.useChatToggleAnalytics = require_useChatToggleAnalytics.useChatToggleAnalytics;
@@ -1,2 +0,0 @@
1
- import { useChatToggleAnalytics } from "./useChatToggleAnalytics.cjs";
2
- export { useChatToggleAnalytics };
@@ -1,2 +0,0 @@
1
- import { useChatToggleAnalytics } from "./useChatToggleAnalytics.js";
2
- export { useChatToggleAnalytics };
@@ -1,3 +0,0 @@
1
- import { useChatToggleAnalytics } from "./useChatToggleAnalytics.js";
2
-
3
- export { useChatToggleAnalytics };
@@ -1,19 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_atoms_chat_chatState = require('../../atoms/chat/chatState.cjs');
3
- const require_useAmplitudeOperations = require('../AmplitudeOperations/useAmplitudeOperations.cjs');
4
- require('../AmplitudeOperations/index.cjs');
5
- let jotai = require("jotai");
6
-
7
- //#region src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts
8
- const useChatToggleAnalytics = () => {
9
- const setChatOnToggle = (0, jotai.useSetAtom)(require_atoms_chat_chatState.chatOnToggleAtom);
10
- const { track } = require_useAmplitudeOperations.useAmplitudeTracking();
11
- const toggleChat = (triggerLocation) => {
12
- setChatOnToggle(triggerLocation, track);
13
- };
14
- return { toggleChat };
15
- };
16
-
17
- //#endregion
18
- exports.useChatToggleAnalytics = useChatToggleAnalytics;
19
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQ2hhdFRvZ2dsZUFuYWx5dGljcy5janMiLCJuYW1lcyI6WyJjaGF0T25Ub2dnbGVBdG9tIiwidXNlQW1wbGl0dWRlVHJhY2tpbmciXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaG9va3MvQ2hhdFRvZ2dsZUFuYWx5dGljcy91c2VDaGF0VG9nZ2xlQW5hbHl0aWNzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHVzZVNldEF0b20gfSBmcm9tICdqb3RhaSc7XG5pbXBvcnQgeyBjaGF0T25Ub2dnbGVBdG9tIH0gZnJvbSAnc3JjL2F0b21zL2NoYXQvY2hhdFN0YXRlJztcbmltcG9ydCB7IENoYXRFbGVtZW50RGlzcGxheUxvY2F0aW9uIH0gZnJvbSAnc3JjL2FwcGxpY2F0aW9uL21vZGVscy9jaGF0RWxlbWVudERpc3BsYXlMb2NhdGlvbic7XG5pbXBvcnQgeyB1c2VBbXBsaXR1ZGVUcmFja2luZyB9IGZyb20gJy4uL0FtcGxpdHVkZU9wZXJhdGlvbnMnO1xuXG5leHBvcnQgY29uc3QgdXNlQ2hhdFRvZ2dsZUFuYWx5dGljcyA9ICgpID0+IHtcbiAgY29uc3Qgc2V0Q2hhdE9uVG9nZ2xlID0gdXNlU2V0QXRvbShjaGF0T25Ub2dnbGVBdG9tKTtcbiAgY29uc3QgeyB0cmFjayB9ID0gdXNlQW1wbGl0dWRlVHJhY2tpbmcoKTtcblxuICBjb25zdCB0b2dnbGVDaGF0ID0gKHRyaWdnZXJMb2NhdGlvbj86IENoYXRFbGVtZW50RGlzcGxheUxvY2F0aW9uKSA9PiB7XG4gICAgc2V0Q2hhdE9uVG9nZ2xlKHRyaWdnZXJMb2NhdGlvbiwgdHJhY2spO1xuICB9O1xuXG4gIHJldHVybiB7IHRvZ2dsZUNoYXQgfTtcbn07XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFLQSxNQUFhLCtCQUErQjtDQUMxQyxNQUFNLHdDQUE2QkEsOENBQWlCO0NBQ3BELE1BQU0sRUFBRSxVQUFVQyxxREFBc0I7Q0FFeEMsTUFBTSxjQUFjLG9CQUFpRDtBQUNuRSxrQkFBZ0IsaUJBQWlCLE1BQU07O0FBR3pDLFFBQU8sRUFBRSxZQUFZIn0=
@@ -1,9 +0,0 @@
1
- import { ChatElementDisplayLocation } from "../../application/models/chatElementDisplayLocation.cjs";
2
-
3
- //#region src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.d.ts
4
- declare const useChatToggleAnalytics: () => {
5
- toggleChat: (triggerLocation?: ChatElementDisplayLocation) => void;
6
- };
7
- //#endregion
8
- export { useChatToggleAnalytics };
9
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQ2hhdFRvZ2dsZUFuYWx5dGljcy5kLmN0cyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaG9va3MvQ2hhdFRvZ2dsZUFuYWx5dGljcy91c2VDaGF0VG9nZ2xlQW5hbHl0aWNzLmQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2hhdEVsZW1lbnREaXNwbGF5TG9jYXRpb24gfSBmcm9tICdzcmMvYXBwbGljYXRpb24vbW9kZWxzL2NoYXRFbGVtZW50RGlzcGxheUxvY2F0aW9uJztcbmV4cG9ydCBkZWNsYXJlIGNvbnN0IHVzZUNoYXRUb2dnbGVBbmFseXRpY3M6ICgpID0+IHtcbiAgICB0b2dnbGVDaGF0OiAodHJpZ2dlckxvY2F0aW9uPzogQ2hhdEVsZW1lbnREaXNwbGF5TG9jYXRpb24pID0+IHZvaWQ7XG59O1xuIl0sIm1hcHBpbmdzIjoiOzs7QUFDQSxJQUFXLHlCQUF5QixDQUFDLFdBQVcsMkJBQUcifQ==
@@ -1,9 +0,0 @@
1
- import { ChatElementDisplayLocation } from "../../application/models/chatElementDisplayLocation.js";
2
-
3
- //#region src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.d.ts
4
- declare const useChatToggleAnalytics: () => {
5
- toggleChat: (triggerLocation?: ChatElementDisplayLocation) => void;
6
- };
7
- //#endregion
8
- export { useChatToggleAnalytics };
9
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQ2hhdFRvZ2dsZUFuYWx5dGljcy5kLnRzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ob29rcy9DaGF0VG9nZ2xlQW5hbHl0aWNzL3VzZUNoYXRUb2dnbGVBbmFseXRpY3MuZC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGF0RWxlbWVudERpc3BsYXlMb2NhdGlvbiB9IGZyb20gJ3NyYy9hcHBsaWNhdGlvbi9tb2RlbHMvY2hhdEVsZW1lbnREaXNwbGF5TG9jYXRpb24nO1xuZXhwb3J0IGRlY2xhcmUgY29uc3QgdXNlQ2hhdFRvZ2dsZUFuYWx5dGljczogKCkgPT4ge1xuICAgIHRvZ2dsZUNoYXQ6ICh0cmlnZ2VyTG9jYXRpb24/OiBDaGF0RWxlbWVudERpc3BsYXlMb2NhdGlvbikgPT4gdm9pZDtcbn07XG4iXSwibWFwcGluZ3MiOiI7OztBQUNBLElBQVcseUJBQXlCLENBQUMsV0FBVywyQkFBRyJ9
@@ -1,18 +0,0 @@
1
- import { chatOnToggleAtom } from "../../atoms/chat/chatState.js";
2
- import { useAmplitudeTracking } from "../AmplitudeOperations/useAmplitudeOperations.js";
3
- import "../AmplitudeOperations/index.js";
4
- import { useSetAtom } from "jotai";
5
-
6
- //#region src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts
7
- const useChatToggleAnalytics = () => {
8
- const setChatOnToggle = useSetAtom(chatOnToggleAtom);
9
- const { track } = useAmplitudeTracking();
10
- const toggleChat = (triggerLocation) => {
11
- setChatOnToggle(triggerLocation, track);
12
- };
13
- return { toggleChat };
14
- };
15
-
16
- //#endregion
17
- export { useChatToggleAnalytics };
18
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQ2hhdFRvZ2dsZUFuYWx5dGljcy5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaG9va3MvQ2hhdFRvZ2dsZUFuYWx5dGljcy91c2VDaGF0VG9nZ2xlQW5hbHl0aWNzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHVzZVNldEF0b20gfSBmcm9tICdqb3RhaSc7XG5pbXBvcnQgeyBjaGF0T25Ub2dnbGVBdG9tIH0gZnJvbSAnc3JjL2F0b21zL2NoYXQvY2hhdFN0YXRlJztcbmltcG9ydCB7IENoYXRFbGVtZW50RGlzcGxheUxvY2F0aW9uIH0gZnJvbSAnc3JjL2FwcGxpY2F0aW9uL21vZGVscy9jaGF0RWxlbWVudERpc3BsYXlMb2NhdGlvbic7XG5pbXBvcnQgeyB1c2VBbXBsaXR1ZGVUcmFja2luZyB9IGZyb20gJy4uL0FtcGxpdHVkZU9wZXJhdGlvbnMnO1xuXG5leHBvcnQgY29uc3QgdXNlQ2hhdFRvZ2dsZUFuYWx5dGljcyA9ICgpID0+IHtcbiAgY29uc3Qgc2V0Q2hhdE9uVG9nZ2xlID0gdXNlU2V0QXRvbShjaGF0T25Ub2dnbGVBdG9tKTtcbiAgY29uc3QgeyB0cmFjayB9ID0gdXNlQW1wbGl0dWRlVHJhY2tpbmcoKTtcblxuICBjb25zdCB0b2dnbGVDaGF0ID0gKHRyaWdnZXJMb2NhdGlvbj86IENoYXRFbGVtZW50RGlzcGxheUxvY2F0aW9uKSA9PiB7XG4gICAgc2V0Q2hhdE9uVG9nZ2xlKHRyaWdnZXJMb2NhdGlvbiwgdHJhY2spO1xuICB9O1xuXG4gIHJldHVybiB7IHRvZ2dsZUNoYXQgfTtcbn07XG4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUtBLE1BQWEsK0JBQStCO0NBQzFDLE1BQU0sa0JBQWtCLFdBQVcsaUJBQWlCO0NBQ3BELE1BQU0sRUFBRSxVQUFVLHNCQUFzQjtDQUV4QyxNQUFNLGNBQWMsb0JBQWlEO0FBQ25FLGtCQUFnQixpQkFBaUIsTUFBTTs7QUFHekMsUUFBTyxFQUFFLFlBQVkifQ==
@@ -1,25 +0,0 @@
1
-
2
- //#region ../components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.js
3
- const screensBreakpointsVariables = {
4
- base: 0,
5
- xs: 480,
6
- sm: 640,
7
- md: 768,
8
- lg: 1024,
9
- xl: 1280,
10
- "2xl": 1536
11
- };
12
- const screensBreakpointsOrder = [
13
- "base",
14
- "xs",
15
- "sm",
16
- "md",
17
- "lg",
18
- "xl",
19
- "2xl"
20
- ];
21
-
22
- //#endregion
23
- exports.screensBreakpointsOrder = screensBreakpointsOrder;
24
- exports.screensBreakpointsVariables = screensBreakpointsVariables;
25
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWtwb2ludHMuY2pzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2NvbXBvbmVudHMtdjMvZGlzdC9wYWNrYWdlcy9jb21wb25lbnRzLXYzL3Rva2Vucy9icmVha3BvaW50cy9icmVha3BvaW50cy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyNyZWdpb24gdG9rZW5zL2JyZWFrcG9pbnRzL2JyZWFrcG9pbnRzLnRzXG5jb25zdCBzY3JlZW5zQnJlYWtwb2ludHNWYXJpYWJsZXMgPSB7XG5cdGJhc2U6IDAsXG5cdHhzOiA0ODAsXG5cdHNtOiA2NDAsXG5cdG1kOiA3NjgsXG5cdGxnOiAxMDI0LFxuXHR4bDogMTI4MCxcblx0XCIyeGxcIjogMTUzNlxufTtcbmNvbnN0IHRhaWx3aW5kU2NyZWVucyA9IHtcblx0eHM6IFwiNDgwcHhcIixcblx0c206IFwiNjQwcHhcIixcblx0bWQ6IFwiNzY4cHhcIixcblx0bGc6IFwiMTAyNHB4XCIsXG5cdHhsOiBcIjEyODBweFwiLFxuXHRcIjJ4bFwiOiBcIjE1MzZweFwiXG59O1xuY29uc3Qgc2NyZWVuc0JyZWFrcG9pbnRzT3JkZXIgPSBbXG5cdFwiYmFzZVwiLFxuXHRcInhzXCIsXG5cdFwic21cIixcblx0XCJtZFwiLFxuXHRcImxnXCIsXG5cdFwieGxcIixcblx0XCIyeGxcIlxuXTtcblxuLy8jZW5kcmVnaW9uXG5leHBvcnQgeyBzY3JlZW5zQnJlYWtwb2ludHNPcmRlciwgc2NyZWVuc0JyZWFrcG9pbnRzVmFyaWFibGVzLCB0YWlsd2luZFNjcmVlbnMgfTsiXSwibWFwcGluZ3MiOiI7O0FBQ0EsTUFBTSw4QkFBOEI7Q0FDbkMsTUFBTTtDQUNOLElBQUk7Q0FDSixJQUFJO0NBQ0osSUFBSTtDQUNKLElBQUk7Q0FDSixJQUFJO0NBQ0osT0FBTztDQUNQO0FBU0QsTUFBTSwwQkFBMEI7Q0FDL0I7Q0FDQTtDQUNBO0NBQ0E7Q0FDQTtDQUNBO0NBQ0E7Q0FDQSJ9
@@ -1,23 +0,0 @@
1
- //#region ../components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.js
2
- const screensBreakpointsVariables = {
3
- base: 0,
4
- xs: 480,
5
- sm: 640,
6
- md: 768,
7
- lg: 1024,
8
- xl: 1280,
9
- "2xl": 1536
10
- };
11
- const screensBreakpointsOrder = [
12
- "base",
13
- "xs",
14
- "sm",
15
- "md",
16
- "lg",
17
- "xl",
18
- "2xl"
19
- ];
20
-
21
- //#endregion
22
- export { screensBreakpointsOrder, screensBreakpointsVariables };
23
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWtwb2ludHMuanMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vY29tcG9uZW50cy12My9kaXN0L3BhY2thZ2VzL2NvbXBvbmVudHMtdjMvdG9rZW5zL2JyZWFrcG9pbnRzL2JyZWFrcG9pbnRzLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vI3JlZ2lvbiB0b2tlbnMvYnJlYWtwb2ludHMvYnJlYWtwb2ludHMudHNcbmNvbnN0IHNjcmVlbnNCcmVha3BvaW50c1ZhcmlhYmxlcyA9IHtcblx0YmFzZTogMCxcblx0eHM6IDQ4MCxcblx0c206IDY0MCxcblx0bWQ6IDc2OCxcblx0bGc6IDEwMjQsXG5cdHhsOiAxMjgwLFxuXHRcIjJ4bFwiOiAxNTM2XG59O1xuY29uc3QgdGFpbHdpbmRTY3JlZW5zID0ge1xuXHR4czogXCI0ODBweFwiLFxuXHRzbTogXCI2NDBweFwiLFxuXHRtZDogXCI3NjhweFwiLFxuXHRsZzogXCIxMDI0cHhcIixcblx0eGw6IFwiMTI4MHB4XCIsXG5cdFwiMnhsXCI6IFwiMTUzNnB4XCJcbn07XG5jb25zdCBzY3JlZW5zQnJlYWtwb2ludHNPcmRlciA9IFtcblx0XCJiYXNlXCIsXG5cdFwieHNcIixcblx0XCJzbVwiLFxuXHRcIm1kXCIsXG5cdFwibGdcIixcblx0XCJ4bFwiLFxuXHRcIjJ4bFwiXG5dO1xuXG4vLyNlbmRyZWdpb25cbmV4cG9ydCB7IHNjcmVlbnNCcmVha3BvaW50c09yZGVyLCBzY3JlZW5zQnJlYWtwb2ludHNWYXJpYWJsZXMsIHRhaWx3aW5kU2NyZWVucyB9OyJdLCJtYXBwaW5ncyI6IjtBQUNBLE1BQU0sOEJBQThCO0NBQ25DLE1BQU07Q0FDTixJQUFJO0NBQ0osSUFBSTtDQUNKLElBQUk7Q0FDSixJQUFJO0NBQ0osSUFBSTtDQUNKLE9BQU87Q0FDUDtBQVNELE1BQU0sMEJBQTBCO0NBQy9CO0NBQ0E7Q0FDQTtDQUNBO0NBQ0E7Q0FDQTtDQUNBO0NBQ0EifQ==
@@ -1,8 +0,0 @@
1
- import { getAtomStore } from 'src/atoms/atomStore/atomStore';
2
- import { cdnUrlAtom } from 'src/atoms/envive/enviveConfig';
3
-
4
- export const getCdnAssetURL = (assetName: string, orgShortName: string): string => {
5
- const atomStore = getAtomStore();
6
- const cdnUrl = atomStore.get(cdnUrlAtom) || 'https://cdn.spiffy.ai/other';
7
- return `${cdnUrl}/assets/${orgShortName}/${assetName}`;
8
- };
@@ -1,31 +0,0 @@
1
- // TODO turn this into an enum
2
- export const SPIFFY_ROOT_ID = 'spiffy-ai-root';
3
- export const CONTAINER_ID = 'spiffy-ai-container';
4
-
5
- export const FLOATING_BUTTON_ID = 'spiffy-ai-floating-button';
6
- export const CHAT_PREVIEW_CONTAINER_ID = 'spiffy-ai-chat-preview';
7
- export const GLOBAL_SEARCH_ENTRYPOINT_ID = 'spiffy-ai-global-search-entrypoint';
8
- export const SEARCH_RESULTS_ENTRYPOINT_ID = 'spiffy-ai-search-results-entrypoint';
9
- export const SEARCH_RESULTS_NO_OP_ID = 'spiffy-ai-search-results-no-op-entrypoint';
10
- export const SEARCH_OVERLAY_ENTRYPOINT_ID = 'spiffy-ai-search-overlay-entrypoint';
11
- export const SEARCH_OVERLAY_PORTAL_ID = 'spiffy-ai-search-overlay-portal'; // The inner div the overlay portal will render into
12
- export const HOMEPAGE_DESKTOP_GLOBAL_SEARCH_ENTRYPOINT_ID =
13
- 'spiffy-ai-global-search-entrypoint-desktop-homepage';
14
- export const HOMEPAGE_TABLET_GLOBAL_SEARCH_ENTRYPOINT_ID =
15
- 'spiffy-ai-global-search-entrypoint-tablet-homepage';
16
- export const HOMEPAGE_MOBILE_GLOBAL_SEARCH_ENTRYPOINT_ID =
17
- 'spiffy-ai-global-search-entrypoint-mobile-homepage';
18
- export const MOBILE_GLOBAL_SEARCH_ENTRYPOINT_ID = 'spiffy-ai-global-search-entrypoint-mobile';
19
- export const MOBILE_ICON_ONLY_GLOBAL_SEARCH_ENTRYPOINT_ID =
20
- 'spiffy-ai-global-search-entrypoint-mobile-icon-only';
21
- export const TABLET_GLOBAL_SEARCH_ENTYPOINT_ID = 'spiffy-ai-global-search-entrypoint-tablet';
22
- export const BOTTOM_REVIEWS_BAR_ID = 'spiffy-bottom-reviews-bar-id';
23
- export const TOP_SUGGESTION_BAR_PDP_ID = 'spiffy-top-suggestion-bar-id';
24
-
25
- export const TOP_PLP_IMAGE_BANNER_ID = 'spiffy-top-plp-image-banner-id';
26
- export const BOTTOM_PLP_IMAGE_BANNER_ID = 'spiffy-bottom-plp-image-banner-id';
27
- export const PROMPT_CARD_ID = 'spiffy-ai-prompt-card';
28
-
29
- export const CONVERSATIONAL_SEARCH_ENTRYPOINT_ID = 'spiffy-ai-conversational-search-entrypoint';
30
- export const CONVERSATIONAL_SEARCH_INPUT_ID = 'spiffy-ai-conversational-search-input';
31
- export const CONVERSATIONAL_SEARCH_MODAL_ID = 'spiffy-ai-conversational-search-modal';
@@ -1,13 +0,0 @@
1
- export const SOCIAL_PROOF_CUSTOMER_COUNT_MESSAGE_TESTID =
2
- 'spiffy-social-proof-customer-count-message';
3
- export const SOCIAL_PROOF_CUSTOMER_COUNT_BUTTON_TESTID =
4
- 'spiffy-social-proof-customer-count-button';
5
- export const SOCIAL_PROOF_PDP_CONTENTS_TESTID = 'spiffy-social-proof-pdp-contents';
6
- export const SOCIAL_PROOF_PLP_CONTENTS_TESTID = 'spiffy-social-proof-plp-contents';
7
- export const SOCIAL_PROOF_SUGGESTION_FOOTER_TESTID = 'spiffy-social-proof-suggestion-footer';
8
- export const SOCIAL_PROOF_WIDGET_TESTID = 'spiffy-social-proof-widget';
9
- export const SOCIAL_PROOF_WIDGET_HEADER_TESTID = 'spiffy-social-proof-widget-header';
10
-
11
- // used in spanx config
12
- export const TOP_IMAGE_BANNER_PLP_TESTID = 'spiffy-top-image-banner-plp';
13
- export const BOTTOM_IMAGE_BANNER_PLP_TESTID = 'spiffy-bottom-image-banner-plp';
@@ -1,12 +0,0 @@
1
- export const CHAT_PREVIEW_FOOTER_TESTID = 'spiffy-chat-preview-footer';
2
- export const CHAT_PREVIEW_TESTID = 'spiffy-chat-preview';
3
- export const CHAT_PREVIEW_SHADOW_DOM_TESTID = 'chat-preview-shadow-dom-container';
4
- export const CHAT_PREVIEW_BODY_TESTID = 'spiffy-chat-preview-body';
5
- export const CHAT_PREVIEW_HEADING_TESTID = 'spiffy-chat-preview-heading';
6
- export const CHAT_PREVIEW_LOADING_TESTID = 'spiffy-chat-preview-loading';
7
- export const CHAT_PREVIEW_USER_QUERY_BUTTON_TESTID = 'spiffy-chat-preview-user-query-button';
8
- export const CHAT_PREVIEW_HEADER_TESTID = 'spiffy-chat-preview-header';
9
-
10
- // used in spanx config
11
- export const CHAT_PREVIEW_PLP_TESTID = 'spiffy-chat-preview-plp';
12
- export const CHAT_PREVIEW_PDP_TESTID = 'spiffy-chat-preview-pdp';