@envive-ai/react-widgets-v3 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/dist/CXIntegration/hooks/useUnifiedCXButton.cjs +23 -0
  2. package/dist/CXIntegration/hooks/useUnifiedCXButton.js +22 -0
  3. package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.cjs +11 -0
  4. package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.js +10 -0
  5. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.cjs +20 -0
  6. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.js +19 -0
  7. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.cjs +53 -0
  8. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +52 -0
  9. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.cjs +45 -0
  10. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.js +44 -0
  11. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.cjs +70 -0
  12. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.js +69 -0
  13. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.cjs +59 -0
  14. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.js +58 -0
  15. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.cjs +65 -0
  16. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +64 -0
  17. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.cjs +53 -0
  18. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +52 -0
  19. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.cjs +18 -0
  20. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.js +17 -0
  21. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.cjs +54 -0
  22. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.js +53 -0
  23. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.cjs +18 -0
  24. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.js +17 -0
  25. package/dist/CXIntegration/types.cjs +19 -0
  26. package/dist/CXIntegration/types.js +18 -0
  27. package/dist/CXIntegration/utils/functions.cjs +30 -0
  28. package/dist/CXIntegration/utils/functions.js +30 -0
  29. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  30. package/dist/hocs/withBaseWidget/index.cjs +3 -0
  31. package/dist/hocs/withBaseWidget/index.d.cts +3 -0
  32. package/dist/hocs/withBaseWidget/index.d.ts +3 -0
  33. package/dist/hocs/withBaseWidget/index.js +3 -0
  34. package/dist/hocs/withBaseWidget/types.d.cts +37 -0
  35. package/dist/hocs/withBaseWidget/types.d.ts +39 -0
  36. package/dist/hocs/withBaseWidget/withBaseWidget.cjs +101 -0
  37. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +10 -0
  38. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +10 -0
  39. package/dist/hocs/withBaseWidget/withBaseWidget.js +100 -0
  40. package/dist/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
  41. package/dist/hooks/dist/application/models/frontendConfig.d.ts +1 -0
  42. package/dist/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
  43. package/dist/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
  44. package/dist/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
  45. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +8 -0
  46. package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +11 -0
  47. package/dist/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
  48. package/dist/hooks/dist/contexts/types.d.cts +44 -0
  49. package/dist/hooks/dist/contexts/types.d.ts +47 -0
  50. package/dist/hooks/dist/contexts/typesV3.d.cts +201 -0
  51. package/dist/hooks/dist/contexts/typesV3.d.ts +201 -0
  52. package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.cts +36 -0
  53. package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.ts +37 -0
  54. package/dist/hooks/dist/types/customerService.d.cts +18 -0
  55. package/dist/hooks/dist/types/customerService.d.ts +18 -0
  56. package/dist/stories/SalesAgentTest/index.cjs +0 -0
  57. package/dist/stories/SalesAgentTest/index.d.cts +1 -0
  58. package/dist/stories/SalesAgentTest/index.d.ts +1 -0
  59. package/dist/stories/SalesAgentTest/index.js +0 -0
  60. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +98 -0
  61. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +19 -0
  62. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +19 -0
  63. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +96 -0
  64. package/dist/widgets/ChatPreviewComparisonWidget/index.cjs +4 -0
  65. package/dist/widgets/ChatPreviewComparisonWidget/index.d.cts +2 -0
  66. package/dist/widgets/ChatPreviewComparisonWidget/index.d.ts +2 -0
  67. package/dist/widgets/ChatPreviewComparisonWidget/index.js +3 -0
  68. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs +44 -0
  69. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +16 -0
  70. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +16 -0
  71. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +42 -0
  72. package/dist/widgets/ChatPreviewLoadingWidget/index.cjs +4 -0
  73. package/dist/widgets/ChatPreviewLoadingWidget/index.d.cts +2 -0
  74. package/dist/widgets/ChatPreviewLoadingWidget/index.d.ts +2 -0
  75. package/dist/widgets/ChatPreviewLoadingWidget/index.js +3 -0
  76. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +86 -0
  77. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +19 -0
  78. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +19 -0
  79. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +84 -0
  80. package/dist/widgets/ChatPreviewWidget/index.cjs +4 -0
  81. package/dist/widgets/ChatPreviewWidget/index.d.cts +2 -0
  82. package/dist/widgets/ChatPreviewWidget/index.d.ts +2 -0
  83. package/dist/widgets/ChatPreviewWidget/index.js +3 -0
  84. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +66 -0
  85. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +64 -0
  86. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +70 -0
  87. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +10 -0
  88. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +10 -0
  89. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +69 -0
  90. package/dist/widgets/FloatingChatWidget/constants.cjs +6 -0
  91. package/dist/widgets/FloatingChatWidget/constants.d.cts +4 -0
  92. package/dist/widgets/FloatingChatWidget/constants.d.ts +4 -0
  93. package/dist/widgets/FloatingChatWidget/constants.js +5 -0
  94. package/dist/widgets/FloatingChatWidget/index.cjs +5 -0
  95. package/dist/widgets/FloatingChatWidget/index.d.cts +3 -0
  96. package/dist/widgets/FloatingChatWidget/index.d.ts +3 -0
  97. package/dist/widgets/FloatingChatWidget/index.js +4 -0
  98. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +60 -0
  99. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +19 -0
  100. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +19 -0
  101. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +58 -0
  102. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.cjs +4 -0
  103. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.cts +2 -0
  104. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.ts +2 -0
  105. package/dist/widgets/PromptButtonCarouselWithImageWidget/index.js +3 -0
  106. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +64 -0
  107. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +14 -0
  108. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +14 -0
  109. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +63 -0
  110. package/dist/widgets/PromptCarouselWidget/index.cjs +3 -0
  111. package/dist/widgets/PromptCarouselWidget/index.d.cts +2 -0
  112. package/dist/widgets/PromptCarouselWidget/index.d.ts +2 -0
  113. package/dist/widgets/PromptCarouselWidget/index.js +3 -0
  114. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +35 -0
  115. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +14 -0
  116. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +14 -0
  117. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +34 -0
  118. package/dist/widgets/SocialProofFlowWidget/index.cjs +3 -0
  119. package/dist/widgets/SocialProofFlowWidget/index.d.cts +2 -0
  120. package/dist/widgets/SocialProofFlowWidget/index.d.ts +2 -0
  121. package/dist/widgets/SocialProofFlowWidget/index.js +3 -0
  122. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +118 -0
  123. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +19 -0
  124. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +19 -0
  125. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +116 -0
  126. package/dist/widgets/SocialProofWidget/index.cjs +4 -0
  127. package/dist/widgets/SocialProofWidget/index.d.cts +2 -0
  128. package/dist/widgets/SocialProofWidget/index.d.ts +2 -0
  129. package/dist/widgets/SocialProofWidget/index.js +3 -0
  130. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +67 -0
  131. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +14 -0
  132. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +14 -0
  133. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +66 -0
  134. package/dist/widgets/TitledPromptCarouselWidget/index.cjs +3 -0
  135. package/dist/widgets/TitledPromptCarouselWidget/index.d.cts +2 -0
  136. package/dist/widgets/TitledPromptCarouselWidget/index.d.ts +2 -0
  137. package/dist/widgets/TitledPromptCarouselWidget/index.js +3 -0
  138. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +35 -0
  139. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +14 -0
  140. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +14 -0
  141. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +34 -0
  142. package/dist/widgets/TypingAnimationFlowWidget/index.cjs +3 -0
  143. package/dist/widgets/TypingAnimationFlowWidget/index.d.cts +2 -0
  144. package/dist/widgets/TypingAnimationFlowWidget/index.d.ts +2 -0
  145. package/dist/widgets/TypingAnimationFlowWidget/index.js +3 -0
  146. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +90 -0
  147. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +19 -0
  148. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +19 -0
  149. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +88 -0
  150. package/dist/widgets/TypingAnimationWidget/index.cjs +4 -0
  151. package/dist/widgets/TypingAnimationWidget/index.d.cts +2 -0
  152. package/dist/widgets/TypingAnimationWidget/index.d.ts +2 -0
  153. package/dist/widgets/TypingAnimationWidget/index.js +3 -0
  154. package/dist/widgets/dist/SearchResults/SearchResults.d.cts +15 -0
  155. package/dist/widgets/dist/SearchResults/SearchResults.d.ts +15 -0
  156. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +9 -0
  157. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.ts +9 -0
  158. package/dist/widgets/dist/SearchResults/index.d.ts +2 -0
  159. package/dist/widgets/dist/SearchResults/types.d.cts +20 -0
  160. package/dist/widgets/dist/SearchResults/types.d.ts +20 -0
  161. package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.cts +10 -0
  162. package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.ts +10 -0
  163. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +18 -0
  164. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +18 -0
  165. package/dist/widgets/dist/SearchZeroState/index.d.ts +4 -0
  166. package/dist/widgets/dist/SearchZeroState/types.d.cts +13 -0
  167. package/dist/widgets/dist/SearchZeroState/types.d.ts +13 -0
  168. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +36 -0
  169. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.ts +36 -0
  170. package/dist/widgets/dist/SuggestionBar/index.d.ts +2 -0
  171. package/dist/widgets/dist/SuggestionBar/types.d.cts +9 -0
  172. package/dist/widgets/dist/SuggestionBar/types.d.ts +9 -0
  173. package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +9 -0
  174. package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +9 -0
  175. package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +20 -0
  176. package/dist/widgets/dist/SuggestionButtonContainer/types.d.ts +20 -0
  177. package/dist/widgets/dist/config/BaseWidgetConfig.d.cts +13 -0
  178. package/dist/widgets/dist/config/BaseWidgetConfig.d.ts +13 -0
  179. package/dist/widgets/dist/config/WidgetType.d.cts +23 -0
  180. package/dist/widgets/dist/config/WidgetType.d.ts +23 -0
  181. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +14 -0
  182. package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
  183. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +15 -0
  184. package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
  185. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +73 -0
  186. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
  187. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +61 -0
  188. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
  189. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +25 -0
  190. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
  191. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +35 -0
  192. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
  193. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +32 -0
  194. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
  195. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +32 -0
  196. package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
  197. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
  198. package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
  199. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
  200. package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.ts +61 -0
  201. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
  202. package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
  203. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +11 -0
  204. package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +11 -0
  205. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
  206. package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
  207. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
  208. package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
  209. package/dist/widgets/hooks/useGetWidgetStatus.cjs +27 -0
  210. package/dist/widgets/hooks/useGetWidgetStatus.js +26 -0
  211. package/dist/widgets/utils/functions.cjs +55 -0
  212. package/dist/widgets/utils/functions.js +48 -0
  213. package/dist/widgets-v2/SearchResults/index.cjs +5 -0
  214. package/dist/widgets-v2/SearchResults/index.d.cts +3 -0
  215. package/dist/widgets-v2/SearchResults/index.d.ts +4 -0
  216. package/dist/widgets-v2/SearchResults/index.js +3 -0
  217. package/dist/widgets-v2/SearchZeroState/index.cjs +8 -0
  218. package/dist/widgets-v2/SearchZeroState/index.d.cts +5 -0
  219. package/dist/widgets-v2/SearchZeroState/index.d.ts +6 -0
  220. package/dist/widgets-v2/SearchZeroState/index.js +3 -0
  221. package/dist/widgets-v2/SuggestionBar/index.cjs +5 -0
  222. package/dist/widgets-v2/SuggestionBar/index.d.cts +3 -0
  223. package/dist/widgets-v2/SuggestionBar/index.d.ts +4 -0
  224. package/dist/widgets-v2/SuggestionBar/index.js +3 -0
  225. package/dist/widgets-v2/SuggestionButtonContainer/index.cjs +5 -0
  226. package/dist/widgets-v2/SuggestionButtonContainer/index.d.cts +3 -0
  227. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +3 -0
  228. package/dist/widgets-v2/SuggestionButtonContainer/index.js +3 -0
  229. package/package.json +158 -0
  230. package/src/CXIntegration/hooks/useUnifiedCXButton.ts +38 -0
  231. package/src/CXIntegration/implementations/useDefaultUnifiedCXButton.ts +8 -0
  232. package/src/CXIntegration/implementations/useGladlyUnifiedCXButton.ts +28 -0
  233. package/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.ts +67 -0
  234. package/src/CXIntegration/implementations/useGrooveUnifiedCXButton.ts +83 -0
  235. package/src/CXIntegration/implementations/useKustomerUnifiedCXButton.ts +120 -0
  236. package/src/CXIntegration/implementations/useReDoUnifiedCXButton.ts +80 -0
  237. package/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts +83 -0
  238. package/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts +78 -0
  239. package/src/CXIntegration/implementations/useTidioUnifiedCXButton.ts +34 -0
  240. package/src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts +69 -0
  241. package/src/CXIntegration/implementations/useZowieUnifiedCXButton.ts +34 -0
  242. package/src/CXIntegration/types.ts +24 -0
  243. package/src/CXIntegration/utils/functions.ts +50 -0
  244. package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +689 -0
  245. package/src/hocs/withBaseWidget/index.ts +2 -0
  246. package/src/hocs/withBaseWidget/types.ts +39 -0
  247. package/src/hocs/withBaseWidget/withBaseWidget.tsx +126 -0
  248. package/src/stories/FloatingChatWidget.stories.tsx +56 -0
  249. package/src/stories/PromptButtonCarouselWithImageWidget.stories.tsx +54 -0
  250. package/src/stories/PromptCarouselWidget.stories.tsx +54 -0
  251. package/src/stories/SalesAgentTest/SalesAgentTest.stories.tsx +18 -0
  252. package/src/stories/SalesAgentTest/SalesAgentTest.tsx +111 -0
  253. package/src/stories/SalesAgentTest/index.ts +0 -0
  254. package/src/stories/SearchResults.stories.tsx +29 -0
  255. package/src/stories/SearchZeroState.stories.tsx +52 -0
  256. package/src/stories/SocialProofFlowWidget.stories.tsx +77 -0
  257. package/src/stories/SuggestionBar.stories.tsx +45 -0
  258. package/src/stories/TitledPromptCarouselWidget.stories.tsx +71 -0
  259. package/src/stories/TypingAnimationFlowWidget.stories.tsx +67 -0
  260. package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +152 -0
  261. package/src/widgets/ChatPreviewComparisonWidget/index.ts +7 -0
  262. package/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.tsx +82 -0
  263. package/src/widgets/ChatPreviewLoadingWidget/index.ts +7 -0
  264. package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +119 -0
  265. package/src/widgets/ChatPreviewWidget/index.ts +4 -0
  266. package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +115 -0
  267. package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +110 -0
  268. package/src/widgets/FloatingChatWidget/constants.ts +1 -0
  269. package/src/widgets/FloatingChatWidget/index.ts +5 -0
  270. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +87 -0
  271. package/src/widgets/PromptButtonCarouselWithImageWidget/index.ts +6 -0
  272. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +83 -0
  273. package/src/widgets/PromptCarouselWidget/index.ts +2 -0
  274. package/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.tsx +61 -0
  275. package/src/widgets/SocialProofFlowWidget/index.ts +4 -0
  276. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +160 -0
  277. package/src/widgets/SocialProofWidget/index.ts +2 -0
  278. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +93 -0
  279. package/src/widgets/TitledPromptCarouselWidget/index.ts +2 -0
  280. package/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.tsx +61 -0
  281. package/src/widgets/TypingAnimationFlowWidget/index.ts +4 -0
  282. package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +115 -0
  283. package/src/widgets/TypingAnimationWidget/index.ts +2 -0
  284. package/src/widgets/hooks/useGetWidgetStatus.tsx +29 -0
  285. package/src/widgets/utils/functions.ts +104 -0
  286. package/src/widgets-v2/SearchResults/index.ts +3 -0
  287. package/src/widgets-v2/SearchZeroState/index.ts +15 -0
  288. package/src/widgets-v2/SuggestionBar/index.ts +6 -0
  289. package/src/widgets-v2/SuggestionButtonContainer/index.ts +6 -0
@@ -0,0 +1,64 @@
1
+ import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
2
+ import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
3
+ import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
4
+
5
+ //#region src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts
6
+ const useRichpanelUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
7
+ const chatWindow = useElementObserver(SelectorFactory.chain("id|richpanel_messenger_iframe @ query|.rp-messenger-container"));
8
+ const chatButton = useElementObserver(SelectorFactory.query(".rp-messenger-trigger"));
9
+ const chatAlternativeButton = useElementObserver(SelectorFactory.query(".rp-micro-app-dummy-icon"));
10
+ const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
11
+ const toggle = () => {
12
+ chatWindow.show();
13
+ onSwitchToAgent();
14
+ if (chatButton) {
15
+ chatButton.show();
16
+ chatButton.fire("click");
17
+ if (suppressMerchantButton) enviveFloatingButton.hide();
18
+ }
19
+ if (chatAlternativeButton) {
20
+ chatAlternativeButton.show();
21
+ chatAlternativeButton.fire("click");
22
+ if (suppressMerchantButton) enviveFloatingButton.hide();
23
+ }
24
+ };
25
+ const isRichpanelButtonEnabled = () => {
26
+ return !!chatButton || !!chatAlternativeButton;
27
+ };
28
+ const isSwitchEnabled = () => isRichpanelButtonEnabled();
29
+ chatButton.onAdd(() => {
30
+ if (suppressMerchantButton) {
31
+ chatButton.hide();
32
+ chatWindow.hide();
33
+ }
34
+ enviveFloatingButton.show();
35
+ });
36
+ chatAlternativeButton.onAdd(() => {
37
+ if (suppressMerchantButton) {
38
+ chatAlternativeButton.hide();
39
+ chatWindow.hide();
40
+ }
41
+ enviveFloatingButton.show();
42
+ });
43
+ chatWindow.onChange((el) => {
44
+ if (el && suppressMerchantButton) {
45
+ const { classList } = el;
46
+ if (classList.contains("opened")) {
47
+ enviveFloatingButton.hide();
48
+ chatWindow.show();
49
+ } else if (classList.length === 1 && classList.contains("rp-messenger-container")) {
50
+ enviveFloatingButton.show();
51
+ chatButton.hide();
52
+ chatAlternativeButton.hide();
53
+ chatWindow.hide();
54
+ }
55
+ }
56
+ });
57
+ return {
58
+ toggle,
59
+ isSwitchEnabled
60
+ };
61
+ };
62
+
63
+ //#endregion
64
+ export { useRichpanelUnifiedCXButton };
@@ -0,0 +1,53 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_constants = require('../../widgets/FloatingChatWidget/constants.cjs');
3
+ let __envive_ai_react_hooks_application_utils = require("@envive-ai/react-hooks/application/utils");
4
+ let __envive_ai_react_hooks_hooks_ElementObserver = require("@envive-ai/react-hooks/hooks/ElementObserver");
5
+
6
+ //#region src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts
7
+ const useShopifyChatUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
8
+ const shopifyChatContainer = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("ShopifyChat"));
9
+ const shopifyButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|ShopifyChat @ query|.chat-app > button"));
10
+ const enviveFloatingButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id(require_constants.FLOATING_BUTTON_ID));
11
+ const toggle = () => {
12
+ if (suppressMerchantButton) enviveFloatingButton.hide();
13
+ shopifyButton.show();
14
+ onSwitchToAgent();
15
+ shopifyButton.fire("click");
16
+ };
17
+ const isShopifyButtonEnabled = () => {
18
+ return !!shopifyButton;
19
+ };
20
+ const isSwitchEnabled = () => isShopifyButtonEnabled();
21
+ const hideEnviveFloatingButton = () => {
22
+ enviveFloatingButton.hide();
23
+ shopifyButton.show();
24
+ };
25
+ const showEnviveFloatingButton = () => {
26
+ enviveFloatingButton.show();
27
+ shopifyButton.hide();
28
+ shopifyChatContainer.hide();
29
+ };
30
+ const handleChatStateChange = async (isOpen) => {
31
+ if (isOpen) {
32
+ hideEnviveFloatingButton();
33
+ return;
34
+ }
35
+ showEnviveFloatingButton();
36
+ };
37
+ shopifyButton.onAdd(() => {
38
+ if (suppressMerchantButton) handleChatStateChange(shopifyChatContainer.targetNode?.getAttribute("is-open") === "true");
39
+ });
40
+ shopifyChatContainer.onAdd((el) => {
41
+ if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
42
+ });
43
+ shopifyChatContainer.onChange((el) => {
44
+ if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
45
+ });
46
+ return {
47
+ toggle,
48
+ isSwitchEnabled
49
+ };
50
+ };
51
+
52
+ //#endregion
53
+ exports.useShopifyChatUnifiedCXButton = useShopifyChatUnifiedCXButton;
@@ -0,0 +1,52 @@
1
+ import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
2
+ import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
3
+ import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
4
+
5
+ //#region src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts
6
+ const useShopifyChatUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
7
+ const shopifyChatContainer = useElementObserver(SelectorFactory.id("ShopifyChat"));
8
+ const shopifyButton = useElementObserver(SelectorFactory.chain("id|ShopifyChat @ query|.chat-app > button"));
9
+ const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
10
+ const toggle = () => {
11
+ if (suppressMerchantButton) enviveFloatingButton.hide();
12
+ shopifyButton.show();
13
+ onSwitchToAgent();
14
+ shopifyButton.fire("click");
15
+ };
16
+ const isShopifyButtonEnabled = () => {
17
+ return !!shopifyButton;
18
+ };
19
+ const isSwitchEnabled = () => isShopifyButtonEnabled();
20
+ const hideEnviveFloatingButton = () => {
21
+ enviveFloatingButton.hide();
22
+ shopifyButton.show();
23
+ };
24
+ const showEnviveFloatingButton = () => {
25
+ enviveFloatingButton.show();
26
+ shopifyButton.hide();
27
+ shopifyChatContainer.hide();
28
+ };
29
+ const handleChatStateChange = async (isOpen) => {
30
+ if (isOpen) {
31
+ hideEnviveFloatingButton();
32
+ return;
33
+ }
34
+ showEnviveFloatingButton();
35
+ };
36
+ shopifyButton.onAdd(() => {
37
+ if (suppressMerchantButton) handleChatStateChange(shopifyChatContainer.targetNode?.getAttribute("is-open") === "true");
38
+ });
39
+ shopifyChatContainer.onAdd((el) => {
40
+ if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
41
+ });
42
+ shopifyChatContainer.onChange((el) => {
43
+ if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
44
+ });
45
+ return {
46
+ toggle,
47
+ isSwitchEnabled
48
+ };
49
+ };
50
+
51
+ //#endregion
52
+ export { useShopifyChatUnifiedCXButton };
@@ -0,0 +1,18 @@
1
+
2
+ //#region src/CXIntegration/implementations/useTidioUnifiedCXButton.ts
3
+ const useTidioUnifiedCXButton = ({ onSwitchToAgent }) => {
4
+ const tidioButton = window.tidioChatApi;
5
+ const toggle = () => {
6
+ onSwitchToAgent();
7
+ if (tidioButton) tidioButton.open();
8
+ };
9
+ const isTidioButtonEnabled = () => !!document.getElementById("tidio-chat-iframe");
10
+ const isSwitchEnabled = () => isTidioButtonEnabled();
11
+ return {
12
+ toggle,
13
+ isSwitchEnabled
14
+ };
15
+ };
16
+
17
+ //#endregion
18
+ exports.useTidioUnifiedCXButton = useTidioUnifiedCXButton;
@@ -0,0 +1,17 @@
1
+ //#region src/CXIntegration/implementations/useTidioUnifiedCXButton.ts
2
+ const useTidioUnifiedCXButton = ({ onSwitchToAgent }) => {
3
+ const tidioButton = window.tidioChatApi;
4
+ const toggle = () => {
5
+ onSwitchToAgent();
6
+ if (tidioButton) tidioButton.open();
7
+ };
8
+ const isTidioButtonEnabled = () => !!document.getElementById("tidio-chat-iframe");
9
+ const isSwitchEnabled = () => isTidioButtonEnabled();
10
+ return {
11
+ toggle,
12
+ isSwitchEnabled
13
+ };
14
+ };
15
+
16
+ //#endregion
17
+ export { useTidioUnifiedCXButton };
@@ -0,0 +1,54 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_constants = require('../../widgets/FloatingChatWidget/constants.cjs');
3
+ let __envive_ai_react_hooks_application_utils = require("@envive-ai/react-hooks/application/utils");
4
+ let __envive_ai_react_hooks_hooks_ElementObserver = require("@envive-ai/react-hooks/hooks/ElementObserver");
5
+
6
+ //#region src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts
7
+ const useZendeskUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
8
+ const zendeskButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|launcher @ query|button"));
9
+ const zendeskAlternativeIframe = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|webWidget"));
10
+ const enviveFloatingButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id(require_constants.FLOATING_BUTTON_ID));
11
+ const zendeskIframe = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("launcher"));
12
+ const toggle = () => {
13
+ zendeskIframe.hide();
14
+ onSwitchToAgent();
15
+ zendeskButton.fire("click");
16
+ if (suppressMerchantButton) enviveFloatingButton.hide();
17
+ };
18
+ const isZendeskButtonEnabled = () => {
19
+ return !!(document?.getElementById("launcher"))?.contentWindow?.document?.querySelector("button");
20
+ };
21
+ const isSwitchEnabled = () => isZendeskButtonEnabled();
22
+ zendeskIframe.onAdd(() => {
23
+ if (suppressMerchantButton) {
24
+ enviveFloatingButton.show();
25
+ zendeskIframe.hide();
26
+ }
27
+ });
28
+ zendeskButton.onChange((el) => {
29
+ if (el && suppressMerchantButton) {
30
+ const ariaLabel = el.getAttribute("aria-label");
31
+ if (ariaLabel === "Open messaging window") {
32
+ enviveFloatingButton.show();
33
+ zendeskIframe.hide();
34
+ }
35
+ if (ariaLabel === "Close messaging window") {
36
+ enviveFloatingButton.hide();
37
+ zendeskIframe.show();
38
+ }
39
+ }
40
+ });
41
+ zendeskAlternativeIframe.onRemove(() => {
42
+ if (suppressMerchantButton) {
43
+ enviveFloatingButton.show();
44
+ zendeskIframe.hide();
45
+ }
46
+ });
47
+ return {
48
+ toggle,
49
+ isSwitchEnabled
50
+ };
51
+ };
52
+
53
+ //#endregion
54
+ exports.useZendeskUnifiedCXButton = useZendeskUnifiedCXButton;
@@ -0,0 +1,53 @@
1
+ import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
2
+ import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
3
+ import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
4
+
5
+ //#region src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts
6
+ const useZendeskUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
7
+ const zendeskButton = useElementObserver(SelectorFactory.chain("id|launcher @ query|button"));
8
+ const zendeskAlternativeIframe = useElementObserver(SelectorFactory.chain("id|webWidget"));
9
+ const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
10
+ const zendeskIframe = useElementObserver(SelectorFactory.id("launcher"));
11
+ const toggle = () => {
12
+ zendeskIframe.hide();
13
+ onSwitchToAgent();
14
+ zendeskButton.fire("click");
15
+ if (suppressMerchantButton) enviveFloatingButton.hide();
16
+ };
17
+ const isZendeskButtonEnabled = () => {
18
+ return !!(document?.getElementById("launcher"))?.contentWindow?.document?.querySelector("button");
19
+ };
20
+ const isSwitchEnabled = () => isZendeskButtonEnabled();
21
+ zendeskIframe.onAdd(() => {
22
+ if (suppressMerchantButton) {
23
+ enviveFloatingButton.show();
24
+ zendeskIframe.hide();
25
+ }
26
+ });
27
+ zendeskButton.onChange((el) => {
28
+ if (el && suppressMerchantButton) {
29
+ const ariaLabel = el.getAttribute("aria-label");
30
+ if (ariaLabel === "Open messaging window") {
31
+ enviveFloatingButton.show();
32
+ zendeskIframe.hide();
33
+ }
34
+ if (ariaLabel === "Close messaging window") {
35
+ enviveFloatingButton.hide();
36
+ zendeskIframe.show();
37
+ }
38
+ }
39
+ });
40
+ zendeskAlternativeIframe.onRemove(() => {
41
+ if (suppressMerchantButton) {
42
+ enviveFloatingButton.show();
43
+ zendeskIframe.hide();
44
+ }
45
+ });
46
+ return {
47
+ toggle,
48
+ isSwitchEnabled
49
+ };
50
+ };
51
+
52
+ //#endregion
53
+ export { useZendeskUnifiedCXButton };
@@ -0,0 +1,18 @@
1
+
2
+ //#region src/CXIntegration/implementations/useZowieUnifiedCXButton.ts
3
+ const useZowieUnifiedCXButton = ({ onSwitchToAgent }) => {
4
+ const zowieButton = window?.Zowie;
5
+ const toggle = () => {
6
+ onSwitchToAgent();
7
+ if (zowieButton) zowieButton?.open();
8
+ };
9
+ const isZowieButtonEnabled = () => !!zowieButton;
10
+ const isSwitchEnabled = () => isZowieButtonEnabled();
11
+ return {
12
+ toggle,
13
+ isSwitchEnabled
14
+ };
15
+ };
16
+
17
+ //#endregion
18
+ exports.useZowieUnifiedCXButton = useZowieUnifiedCXButton;
@@ -0,0 +1,17 @@
1
+ //#region src/CXIntegration/implementations/useZowieUnifiedCXButton.ts
2
+ const useZowieUnifiedCXButton = ({ onSwitchToAgent }) => {
3
+ const zowieButton = window?.Zowie;
4
+ const toggle = () => {
5
+ onSwitchToAgent();
6
+ if (zowieButton) zowieButton?.open();
7
+ };
8
+ const isZowieButtonEnabled = () => !!zowieButton;
9
+ const isSwitchEnabled = () => isZowieButtonEnabled();
10
+ return {
11
+ toggle,
12
+ isSwitchEnabled
13
+ };
14
+ };
15
+
16
+ //#endregion
17
+ export { useZowieUnifiedCXButton };
@@ -0,0 +1,19 @@
1
+
2
+ //#region src/CXIntegration/types.ts
3
+ let CustomerServiceType = /* @__PURE__ */ function(CustomerServiceType$1) {
4
+ CustomerServiceType$1["shopify"] = "shopify";
5
+ CustomerServiceType$1["gorgias"] = "gorgias";
6
+ CustomerServiceType$1["kustomer"] = "kustomer";
7
+ CustomerServiceType$1["groove"] = "groove";
8
+ CustomerServiceType$1["tidio"] = "tidio";
9
+ CustomerServiceType$1["zowie"] = "zowie";
10
+ CustomerServiceType$1["redo"] = "redo";
11
+ CustomerServiceType$1["gladly"] = "gladly";
12
+ CustomerServiceType$1["richpanel"] = "richpanel";
13
+ CustomerServiceType$1["zendesk"] = "zendesk";
14
+ CustomerServiceType$1["unsupported"] = "unsupported";
15
+ return CustomerServiceType$1;
16
+ }({});
17
+
18
+ //#endregion
19
+ exports.CustomerServiceType = CustomerServiceType;
@@ -0,0 +1,18 @@
1
+ //#region src/CXIntegration/types.ts
2
+ let CustomerServiceType = /* @__PURE__ */ function(CustomerServiceType$1) {
3
+ CustomerServiceType$1["shopify"] = "shopify";
4
+ CustomerServiceType$1["gorgias"] = "gorgias";
5
+ CustomerServiceType$1["kustomer"] = "kustomer";
6
+ CustomerServiceType$1["groove"] = "groove";
7
+ CustomerServiceType$1["tidio"] = "tidio";
8
+ CustomerServiceType$1["zowie"] = "zowie";
9
+ CustomerServiceType$1["redo"] = "redo";
10
+ CustomerServiceType$1["gladly"] = "gladly";
11
+ CustomerServiceType$1["richpanel"] = "richpanel";
12
+ CustomerServiceType$1["zendesk"] = "zendesk";
13
+ CustomerServiceType$1["unsupported"] = "unsupported";
14
+ return CustomerServiceType$1;
15
+ }({});
16
+
17
+ //#endregion
18
+ export { CustomerServiceType };
@@ -0,0 +1,30 @@
1
+ const require_types = require('../types.cjs');
2
+ const require_useGrooveUnifiedCXButton = require('../implementations/useGrooveUnifiedCXButton.cjs');
3
+ const require_useShopifyChatUnifiedCXButton = require('../implementations/useShopifyChatUnifiedCXButton.cjs');
4
+ const require_useGladlyUnifiedCXButton = require('../implementations/useGladlyUnifiedCXButton.cjs');
5
+ const require_useGorgiasUnifiedCXButton = require('../implementations/useGorgiasUnifiedCXButton.cjs');
6
+ const require_useTidioUnifiedCXButton = require('../implementations/useTidioUnifiedCXButton.cjs');
7
+ const require_useZowieUnifiedCXButton = require('../implementations/useZowieUnifiedCXButton.cjs');
8
+ const require_useReDoUnifiedCXButton = require('../implementations/useReDoUnifiedCXButton.cjs');
9
+ const require_useRichpanelUnifiedCXButton = require('../implementations/useRichpanelUnifiedCXButton.cjs');
10
+ const require_useZendeskUnifiedCXButton = require('../implementations/useZendeskUnifiedCXButton.cjs');
11
+ const require_useKustomerUnifiedCXButton = require('../implementations/useKustomerUnifiedCXButton.cjs');
12
+ const require_useDefaultUnifiedCXButton = require('../implementations/useDefaultUnifiedCXButton.cjs');
13
+
14
+ //#region src/CXIntegration/utils/functions.ts
15
+ const findCustomerServiceImpl = (provider) => {
16
+ if (provider === require_types.CustomerServiceType.kustomer) return require_useKustomerUnifiedCXButton.useKustomerUnifiedCXButton;
17
+ if (provider === require_types.CustomerServiceType.groove) return require_useGrooveUnifiedCXButton.useGrooveUnifiedCXButton;
18
+ if (provider === require_types.CustomerServiceType.gladly) return require_useGladlyUnifiedCXButton.useGladlyUnifiedCXButton;
19
+ if (provider === require_types.CustomerServiceType.shopify) return require_useShopifyChatUnifiedCXButton.useShopifyChatUnifiedCXButton;
20
+ if (provider === require_types.CustomerServiceType.gorgias) return require_useGorgiasUnifiedCXButton.useGorgiasUnifiedCXButton;
21
+ if (provider === require_types.CustomerServiceType.tidio) return require_useTidioUnifiedCXButton.useTidioUnifiedCXButton;
22
+ if (provider === require_types.CustomerServiceType.zowie) return require_useZowieUnifiedCXButton.useZowieUnifiedCXButton;
23
+ if (provider === require_types.CustomerServiceType.redo) return require_useReDoUnifiedCXButton.useReDoUnifiedCXButton;
24
+ if (provider === require_types.CustomerServiceType.richpanel) return require_useRichpanelUnifiedCXButton.useRichpanelUnifiedCXButton;
25
+ if (provider === require_types.CustomerServiceType.zendesk) return require_useZendeskUnifiedCXButton.useZendeskUnifiedCXButton;
26
+ return require_useDefaultUnifiedCXButton.useDefaultUnifiedCXButton;
27
+ };
28
+
29
+ //#endregion
30
+ exports.findCustomerServiceImpl = findCustomerServiceImpl;
@@ -0,0 +1,30 @@
1
+ import { CustomerServiceType } from "../types.js";
2
+ import { useGrooveUnifiedCXButton } from "../implementations/useGrooveUnifiedCXButton.js";
3
+ import { useShopifyChatUnifiedCXButton } from "../implementations/useShopifyChatUnifiedCXButton.js";
4
+ import { useGladlyUnifiedCXButton } from "../implementations/useGladlyUnifiedCXButton.js";
5
+ import { useGorgiasUnifiedCXButton } from "../implementations/useGorgiasUnifiedCXButton.js";
6
+ import { useTidioUnifiedCXButton } from "../implementations/useTidioUnifiedCXButton.js";
7
+ import { useZowieUnifiedCXButton } from "../implementations/useZowieUnifiedCXButton.js";
8
+ import { useReDoUnifiedCXButton } from "../implementations/useReDoUnifiedCXButton.js";
9
+ import { useRichpanelUnifiedCXButton } from "../implementations/useRichpanelUnifiedCXButton.js";
10
+ import { useZendeskUnifiedCXButton } from "../implementations/useZendeskUnifiedCXButton.js";
11
+ import { useKustomerUnifiedCXButton } from "../implementations/useKustomerUnifiedCXButton.js";
12
+ import { useDefaultUnifiedCXButton } from "../implementations/useDefaultUnifiedCXButton.js";
13
+
14
+ //#region src/CXIntegration/utils/functions.ts
15
+ const findCustomerServiceImpl = (provider) => {
16
+ if (provider === CustomerServiceType.kustomer) return useKustomerUnifiedCXButton;
17
+ if (provider === CustomerServiceType.groove) return useGrooveUnifiedCXButton;
18
+ if (provider === CustomerServiceType.gladly) return useGladlyUnifiedCXButton;
19
+ if (provider === CustomerServiceType.shopify) return useShopifyChatUnifiedCXButton;
20
+ if (provider === CustomerServiceType.gorgias) return useGorgiasUnifiedCXButton;
21
+ if (provider === CustomerServiceType.tidio) return useTidioUnifiedCXButton;
22
+ if (provider === CustomerServiceType.zowie) return useZowieUnifiedCXButton;
23
+ if (provider === CustomerServiceType.redo) return useReDoUnifiedCXButton;
24
+ if (provider === CustomerServiceType.richpanel) return useRichpanelUnifiedCXButton;
25
+ if (provider === CustomerServiceType.zendesk) return useZendeskUnifiedCXButton;
26
+ return useDefaultUnifiedCXButton;
27
+ };
28
+
29
+ //#endregion
30
+ export { findCustomerServiceImpl };
@@ -0,0 +1,29 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -0,0 +1,3 @@
1
+ const require_withBaseWidget = require('./withBaseWidget.cjs');
2
+
3
+ exports.withBaseWidget = require_withBaseWidget.withBaseWidget;
@@ -0,0 +1,3 @@
1
+ import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
2
+ import { withBaseWidget } from "./withBaseWidget.cjs";
3
+ export { type BaseWidgetProps, type WithBaseWidgetOptions, withBaseWidget };
@@ -0,0 +1,3 @@
1
+ import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.js";
2
+ import { withBaseWidget } from "./withBaseWidget.js";
3
+ export { type BaseWidgetProps, type WithBaseWidgetOptions, withBaseWidget };
@@ -0,0 +1,3 @@
1
+ import { withBaseWidget } from "./withBaseWidget.js";
2
+
3
+ export { withBaseWidget };
@@ -0,0 +1,37 @@
1
+ import { OrgUIConfigV3, WidgetConfigV3, WidgetTypeV3 } from "../../hooks/dist/contexts/typesV3.cjs";
2
+ import { SpiffyMetricsEventName } from "../../hooks/dist/services/amplitudeService/amplitudeService.cjs";
3
+ import { HardcopyResponse } from "../../hooks/dist/contexts/hardcopyContext/hardcopyContext.cjs";
4
+ import { RefObject } from "react";
5
+
6
+ //#region src/hocs/withBaseWidget/types.d.ts
7
+ interface BaseWidgetProps {
8
+ widgetConfigId?: string;
9
+ widgetType: WidgetTypeV3;
10
+ observedWidget?: RefObject<BaseWidgetProps>;
11
+ hardcopyContent?: HardcopyResponse;
12
+ widgetConfig?: WidgetConfigV3;
13
+ uiConfig?: OrgUIConfigV3;
14
+ isLoading?: boolean;
15
+ isHardcopyLoading?: boolean;
16
+ isPageLoading?: boolean;
17
+ isWidgetConfigLoading?: boolean;
18
+ isUiConfigLoading?: boolean;
19
+ }
20
+ interface WithBaseWidgetOptions {
21
+ /**
22
+ * The Amplitude event name to track when the widget becomes visible.
23
+ * Defaults to a generic component visible event if not provided.
24
+ */
25
+ visibilityEventName?: SpiffyMetricsEventName;
26
+ /**
27
+ * Additional properties to include with the visibility event.
28
+ */
29
+ visibilityEventProps?: Record<string, unknown>;
30
+ /**
31
+ * Root margin for the IntersectionObserver (e.g., '0px', '100px').
32
+ * Defaults to '0px'.
33
+ */
34
+ rootMargin?: string;
35
+ }
36
+ //#endregion
37
+ export { BaseWidgetProps, WithBaseWidgetOptions };
@@ -0,0 +1,39 @@
1
+ import { OrgUIConfigV3, WidgetConfigV3, WidgetTypeV3 } from "../../hooks/dist/contexts/typesV3.js";
2
+ import { SpiffyMetricsEventName } from "../../hooks/dist/services/amplitudeService/amplitudeService.js";
3
+ import "../../hooks/dist/contexts/amplitudeContext/index.js";
4
+ import { HardcopyResponse } from "../../hooks/dist/contexts/hardcopyContext/hardcopyContext.js";
5
+ import "../../hooks/dist/contexts/hardcopyContext/index.js";
6
+ import { RefObject } from "react";
7
+
8
+ //#region src/hocs/withBaseWidget/types.d.ts
9
+ interface BaseWidgetProps {
10
+ widgetConfigId?: string;
11
+ widgetType: WidgetTypeV3;
12
+ observedWidget?: RefObject<BaseWidgetProps>;
13
+ hardcopyContent?: HardcopyResponse;
14
+ widgetConfig?: WidgetConfigV3;
15
+ uiConfig?: OrgUIConfigV3;
16
+ isLoading?: boolean;
17
+ isHardcopyLoading?: boolean;
18
+ isPageLoading?: boolean;
19
+ isWidgetConfigLoading?: boolean;
20
+ isUiConfigLoading?: boolean;
21
+ }
22
+ interface WithBaseWidgetOptions {
23
+ /**
24
+ * The Amplitude event name to track when the widget becomes visible.
25
+ * Defaults to a generic component visible event if not provided.
26
+ */
27
+ visibilityEventName?: SpiffyMetricsEventName;
28
+ /**
29
+ * Additional properties to include with the visibility event.
30
+ */
31
+ visibilityEventProps?: Record<string, unknown>;
32
+ /**
33
+ * Root margin for the IntersectionObserver (e.g., '0px', '100px').
34
+ * Defaults to '0px'.
35
+ */
36
+ rootMargin?: string;
37
+ }
38
+ //#endregion
39
+ export { BaseWidgetProps, WithBaseWidgetOptions };