@xapp/chat-widget 1.74.5 → 1.74.7

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 (243) hide show
  1. package/dist/assets/output-B4kLFve7.css +1 -0
  2. package/dist/assets/output-B5WHWtrB.css +1 -0
  3. package/dist/assets/output-BB5x_PD8.css +1 -0
  4. package/dist/assets/output-Bizd8tmp.css +1 -0
  5. package/dist/assets/output-BmV069H_.css +1 -0
  6. package/dist/assets/output-BotE6HlA.css +1 -0
  7. package/dist/assets/output-BwJrsZrX.css +1 -0
  8. package/dist/assets/output-C6gSgO0Q.css +1 -0
  9. package/dist/assets/output-CEB5ht2X.css +1 -0
  10. package/dist/assets/output-CSSvjqZL.css +1 -0
  11. package/dist/assets/output-CbYqsx_A.css +1 -0
  12. package/dist/assets/output-Cn2P3DqK.css +1 -0
  13. package/dist/assets/output-DGDiwflb.css +1 -0
  14. package/dist/assets/output-DHioEyrg.css +1 -0
  15. package/dist/assets/output-DJVzMmgl.css +1 -0
  16. package/dist/assets/output-DZ4EdrS_.css +1 -0
  17. package/dist/assets/output-DdfvH_7f.css +1 -0
  18. package/dist/assets/output-Do5coYdq.css +1 -0
  19. package/dist/assets/output-NPWS6DNo.css +1 -0
  20. package/dist/assets/output-Nwzb9y6E.css +1 -0
  21. package/dist/assets/output-XKzdPxqL.css +1 -0
  22. package/dist/assets/output-Zcv3Z-J3.css +1 -0
  23. package/dist/assets/output-ofkDxzgJ.css +1 -0
  24. package/dist/assets/output-qKWLqRqY.css +1 -0
  25. package/dist/assets/output-rQGbdmCA.css +1 -0
  26. package/dist/assets/output-resGFQlr.css +1 -0
  27. package/dist/index.es.js +73 -50
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/index.js +73 -50
  30. package/dist/index.js.map +1 -1
  31. package/dist/packages/chat-widget/src/App.d.ts +0 -0
  32. package/dist/packages/chat-widget/src/components/ActionButton/ActionButton.d.ts +0 -0
  33. package/dist/packages/chat-widget/src/components/ActionButton/index.d.ts +0 -0
  34. package/dist/packages/chat-widget/src/components/ActionItem/ActionItem.d.ts +0 -0
  35. package/dist/packages/chat-widget/src/components/ActionItem/ActionItemImage.d.ts +0 -0
  36. package/dist/packages/chat-widget/src/components/ActionItem/index.d.ts +0 -0
  37. package/dist/packages/chat-widget/src/components/AdminBar/AdminBar.d.ts +0 -0
  38. package/dist/packages/chat-widget/src/components/Avatar/Avatar.d.ts +0 -0
  39. package/dist/packages/chat-widget/src/components/Avatar/index.d.ts +0 -0
  40. package/dist/packages/chat-widget/src/components/CancelButton/CancelButton.d.ts +0 -0
  41. package/dist/packages/chat-widget/src/components/CancelButton/index.d.ts +0 -0
  42. package/dist/packages/chat-widget/src/components/CardContainer/CardContainer.d.ts +0 -0
  43. package/dist/packages/chat-widget/src/components/CardContainer/index.d.ts +0 -0
  44. package/dist/packages/chat-widget/src/components/Carousel/Carousel.d.ts +0 -0
  45. package/dist/packages/chat-widget/src/components/Carousel/index.d.ts +0 -0
  46. package/dist/packages/chat-widget/src/components/CarouselItem/CarouselItem.d.ts +0 -0
  47. package/dist/packages/chat-widget/src/components/CarouselItem/index.d.ts +0 -0
  48. package/dist/packages/chat-widget/src/components/ChatActionButtons/ChatActionButton.d.ts +0 -0
  49. package/dist/packages/chat-widget/src/components/ChatActionButtons/ChatActionButtons.d.ts +0 -0
  50. package/dist/packages/chat-widget/src/components/ChatActionButtons/index.d.ts +0 -0
  51. package/dist/packages/chat-widget/src/components/ChatBranding/ChatBranding.d.ts +0 -0
  52. package/dist/packages/chat-widget/src/components/ChatButton/ChatButton.d.ts +0 -0
  53. package/dist/packages/chat-widget/src/components/ChatButton/index.d.ts +0 -0
  54. package/dist/packages/chat-widget/src/components/ChatCard/ChatCard.d.ts +0 -0
  55. package/dist/packages/chat-widget/src/components/ChatCard/index.d.ts +0 -0
  56. package/dist/packages/chat-widget/src/components/ChatChip/ChatChip.d.ts +0 -0
  57. package/dist/packages/chat-widget/src/components/ChatChip/index.d.ts +0 -0
  58. package/dist/packages/chat-widget/src/components/ChatChips/ChatChips.d.ts +0 -0
  59. package/dist/packages/chat-widget/src/components/ChatChips/ChatChipsContainer.d.ts +0 -0
  60. package/dist/packages/chat-widget/src/components/ChatChips/index.d.ts +0 -0
  61. package/dist/packages/chat-widget/src/components/ChatFooter/ChatFooter.d.ts +0 -0
  62. package/dist/packages/chat-widget/src/components/ChatFooter/index.d.ts +0 -0
  63. package/dist/packages/chat-widget/src/components/ChatHeader/ChatHeader.d.ts +0 -0
  64. package/dist/packages/chat-widget/src/components/ChatHeader/index.d.ts +0 -0
  65. package/dist/packages/chat-widget/src/components/ChatImage/ChatImage.d.ts +0 -0
  66. package/dist/packages/chat-widget/src/components/ChatImage/index.d.ts +0 -0
  67. package/dist/packages/chat-widget/src/components/ChatMarkdownMessage/ChatMarkdownMessage.d.ts +0 -0
  68. package/dist/packages/chat-widget/src/components/ChatMenu/ChatMenu.d.ts +0 -0
  69. package/dist/packages/chat-widget/src/components/ChatMenu/ChatMenuItem.d.ts +0 -0
  70. package/dist/packages/chat-widget/src/components/ChatMenu/index.d.ts +0 -0
  71. package/dist/packages/chat-widget/src/components/ChatMessage/ChatMessage.d.ts +0 -0
  72. package/dist/packages/chat-widget/src/components/ChatMessage/index.d.ts +0 -0
  73. package/dist/packages/chat-widget/src/components/ChatMessageBubble/ChatMessageBubble.d.ts +0 -0
  74. package/dist/packages/chat-widget/src/components/ChatMessageBubble/index.d.ts +0 -0
  75. package/dist/packages/chat-widget/src/components/ChatMessagePart/ChatMessagePart.d.ts +0 -0
  76. package/dist/packages/chat-widget/src/components/ChatMessagePart/index.d.ts +0 -0
  77. package/dist/packages/chat-widget/src/components/ChatPermissionMessage/ChatPermissionMessage.d.ts +0 -0
  78. package/dist/packages/chat-widget/src/components/ChatPermissionMessage/index.d.ts +0 -0
  79. package/dist/packages/chat-widget/src/components/ChatRating/ChatRating.d.ts +0 -0
  80. package/dist/packages/chat-widget/src/components/ChatRating/ChatRatingContainer.d.ts +0 -0
  81. package/dist/packages/chat-widget/src/components/ChatRating/index.d.ts +0 -0
  82. package/dist/packages/chat-widget/src/components/ChatScheduleWidget/ChatScheduleWidget.d.ts +0 -0
  83. package/dist/packages/chat-widget/src/components/ChatScheduleWidget/index.d.ts +0 -0
  84. package/dist/packages/chat-widget/src/components/ChatTextMessage/ChatTextMessage.d.ts +0 -0
  85. package/dist/packages/chat-widget/src/components/ChatWidget/ChatWidget.d.ts +0 -0
  86. package/dist/packages/chat-widget/src/components/ChatWidget/ChatWidgetContainer.d.ts +0 -0
  87. package/dist/packages/chat-widget/src/components/ChatWidget/ModalContent.d.ts +0 -0
  88. package/dist/packages/chat-widget/src/components/ChatWidget/StaticChatWidgetContainer.d.ts +0 -0
  89. package/dist/packages/chat-widget/src/components/ChatWidget/StaticMessagesChatWidgetContainer.d.ts +0 -0
  90. package/dist/packages/chat-widget/src/components/ChatWidget/index.d.ts +0 -0
  91. package/dist/packages/chat-widget/src/components/ChevronLeft/ChevronLeft.d.ts +0 -0
  92. package/dist/packages/chat-widget/src/components/ChevronLeft/index.d.ts +0 -0
  93. package/dist/packages/chat-widget/src/components/ChevronRight/ChevronRight.d.ts +0 -0
  94. package/dist/packages/chat-widget/src/components/ChevronRight/index.d.ts +0 -0
  95. package/dist/packages/chat-widget/src/components/CtaBubble/CtaBubble.d.ts +0 -0
  96. package/dist/packages/chat-widget/src/components/CtaBubble/CtaBubbleContainer.d.ts +0 -0
  97. package/dist/packages/chat-widget/src/components/CtaBubble/index.d.ts +0 -0
  98. package/dist/packages/chat-widget/src/components/DrawerBars/DrawerBars.d.ts +0 -0
  99. package/dist/packages/chat-widget/src/components/DrawerBars/index.d.ts +0 -0
  100. package/dist/packages/chat-widget/src/components/ExternalLink/ExternalLink.d.ts +0 -0
  101. package/dist/packages/chat-widget/src/components/ExternalLink/index.d.ts +0 -0
  102. package/dist/packages/chat-widget/src/components/FailureMessage/FailureMessage.d.ts +0 -0
  103. package/dist/packages/chat-widget/src/components/FailureMessage/index.d.ts +0 -0
  104. package/dist/packages/chat-widget/src/components/Icons/CloseIcon.d.ts +0 -0
  105. package/dist/packages/chat-widget/src/components/Icons/LeftDownArrowIcon.d.ts +0 -0
  106. package/dist/packages/chat-widget/src/components/Icons/SendIcon.d.ts +0 -0
  107. package/dist/packages/chat-widget/src/components/Icons/index.d.ts +0 -0
  108. package/dist/packages/chat-widget/src/components/Input/Input.d.ts +0 -0
  109. package/dist/packages/chat-widget/src/components/Input/index.d.ts +0 -0
  110. package/dist/packages/chat-widget/src/components/List/List.d.ts +0 -0
  111. package/dist/packages/chat-widget/src/components/List/index.d.ts +0 -0
  112. package/dist/packages/chat-widget/src/components/ListItem/ListItem.d.ts +0 -0
  113. package/dist/packages/chat-widget/src/components/ListItem/index.d.ts +0 -0
  114. package/dist/packages/chat-widget/src/components/MardownBuilder/MarkdownBuilder.d.ts +0 -0
  115. package/dist/packages/chat-widget/src/components/MardownBuilder/index.d.ts +0 -0
  116. package/dist/packages/chat-widget/src/components/MessageForm/MessageForm.d.ts +0 -0
  117. package/dist/packages/chat-widget/src/components/MessageForm/index.d.ts +0 -0
  118. package/dist/packages/chat-widget/src/components/MessageList/MessageList.d.ts +0 -0
  119. package/dist/packages/chat-widget/src/components/MessageList/index.d.ts +0 -0
  120. package/dist/packages/chat-widget/src/components/MessageSvg/MessageSvg.d.ts +0 -0
  121. package/dist/packages/chat-widget/src/components/MessageSvg/index.d.ts +0 -0
  122. package/dist/packages/chat-widget/src/components/MinimizeButton/MinimizeButton.d.ts +0 -0
  123. package/dist/packages/chat-widget/src/components/MinimizeButton/index.d.ts +0 -0
  124. package/dist/packages/chat-widget/src/components/MultiSelect/MultiSelect.d.ts +0 -0
  125. package/dist/packages/chat-widget/src/components/MultiSelect/index.d.ts +0 -0
  126. package/dist/packages/chat-widget/src/components/OfflineForm/OfflineForm.d.ts +0 -0
  127. package/dist/packages/chat-widget/src/components/OfflineForm/OfflineFormContainer.d.ts +0 -0
  128. package/dist/packages/chat-widget/src/components/OfflineForm/index.d.ts +0 -0
  129. package/dist/packages/chat-widget/src/components/OptionalLink/OptionalLink.d.ts +0 -0
  130. package/dist/packages/chat-widget/src/components/OptionalLink/index.d.ts +0 -0
  131. package/dist/packages/chat-widget/src/components/PrechatForm/PrechatForm.d.ts +0 -0
  132. package/dist/packages/chat-widget/src/components/PrechatForm/PrechatFormContainer.d.ts +0 -0
  133. package/dist/packages/chat-widget/src/components/QueuePosition/QueuePosition.d.ts +0 -0
  134. package/dist/packages/chat-widget/src/components/QueuePosition/index.d.ts +0 -0
  135. package/dist/packages/chat-widget/src/components/RefreshButton/RefreshButton.d.ts +0 -0
  136. package/dist/packages/chat-widget/src/components/RefreshButton/index.d.ts +0 -0
  137. package/dist/packages/chat-widget/src/components/SendButton/SendButton.d.ts +0 -0
  138. package/dist/packages/chat-widget/src/components/SendButton/index.d.ts +0 -0
  139. package/dist/packages/chat-widget/src/components/ServerOffline/ServerOffline.d.ts +0 -0
  140. package/dist/packages/chat-widget/src/components/ServerOffline/index.d.ts +0 -0
  141. package/dist/packages/chat-widget/src/components/SmartLink/SmartLink.d.ts +0 -0
  142. package/dist/packages/chat-widget/src/components/SmartLink/index.d.ts +0 -0
  143. package/dist/packages/chat-widget/src/components/SmartLink/utils.d.ts +0 -0
  144. package/dist/packages/chat-widget/src/components/Suggestions/Suggestions.d.ts +0 -0
  145. package/dist/packages/chat-widget/src/components/SystemMessage/SystemMessage.d.ts +0 -0
  146. package/dist/packages/chat-widget/src/components/SystemMessage/index.d.ts +0 -0
  147. package/dist/packages/chat-widget/src/components/TypingIndicator/TypingIndicator.d.ts +0 -0
  148. package/dist/packages/chat-widget/src/components/TypingIndicator/index.d.ts +0 -0
  149. package/dist/packages/chat-widget/src/components/TypingStatus/TypingStatus.d.ts +0 -0
  150. package/dist/packages/chat-widget/src/components/TypingStatus/index.d.ts +0 -0
  151. package/dist/packages/chat-widget/src/components/UknownMessage/UnknownMessage.d.ts +0 -0
  152. package/dist/packages/chat-widget/src/components/UknownMessage/index.d.ts +0 -0
  153. package/dist/packages/chat-widget/src/components/WidgetStylesheet/WidgetStylesheet.d.ts +0 -0
  154. package/dist/packages/chat-widget/src/components/WidgetStylesheet/index.d.ts +0 -0
  155. package/dist/packages/chat-widget/src/config/config.d.ts +0 -0
  156. package/dist/packages/chat-widget/src/config/index.d.ts +0 -0
  157. package/dist/packages/chat-widget/src/hooks/index.d.ts +0 -0
  158. package/dist/packages/chat-widget/src/hooks/useButtonCallback.d.ts +0 -0
  159. package/dist/packages/chat-widget/src/hooks/useExecuteActionCallback.d.ts +0 -0
  160. package/dist/packages/chat-widget/src/hooks/useOpenUrlCallback.d.ts +0 -0
  161. package/dist/packages/chat-widget/src/index.d.ts +0 -0
  162. package/dist/packages/chat-widget/src/middlewares/card-middleware.d.ts +0 -0
  163. package/dist/packages/chat-widget/src/middlewares/index.d.ts +0 -0
  164. package/dist/packages/chat-widget/src/middlewares/join.d.ts +0 -0
  165. package/dist/packages/chat-widget/src/middlewares/late-middleware.d.ts +0 -0
  166. package/dist/packages/chat-widget/src/middlewares/list-middleware.d.ts +0 -0
  167. package/dist/packages/chat-widget/src/middlewares/message-middleware.d.ts +0 -0
  168. package/dist/packages/chat-widget/src/middlewares/middleware-ctx-factory.d.ts +0 -0
  169. package/dist/packages/chat-widget/src/middlewares/multiselect-middleware.d.ts +0 -0
  170. package/dist/packages/chat-widget/src/middlewares/standard-middleware.d.ts +0 -0
  171. package/dist/packages/chat-widget/src/store/BrowserStateStorage.d.ts +0 -0
  172. package/dist/packages/chat-widget/src/store/ChatState.d.ts +0 -0
  173. package/dist/packages/chat-widget/src/store/ChatStaticStore.d.ts +0 -0
  174. package/dist/packages/chat-widget/src/store/DefaultState.d.ts +0 -0
  175. package/dist/packages/chat-widget/src/store/LocalStorage.d.ts +0 -0
  176. package/dist/packages/chat-widget/src/store/StateStorage.d.ts +0 -0
  177. package/dist/packages/chat-widget/src/store/actions/executeAction.d.ts +0 -0
  178. package/dist/packages/chat-widget/src/store/actions/index.d.ts +0 -0
  179. package/dist/packages/chat-widget/src/store/actions/receiveToken.d.ts +0 -0
  180. package/dist/packages/chat-widget/src/store/actions/resetAction.d.ts +0 -0
  181. package/dist/packages/chat-widget/src/store/actions/sendBargeIn.d.ts +0 -0
  182. package/dist/packages/chat-widget/src/store/actions/sendBargeOut.d.ts +0 -0
  183. package/dist/packages/chat-widget/src/store/actions/sendChatRating.d.ts +0 -0
  184. package/dist/packages/chat-widget/src/store/actions/sendFile.d.ts +0 -0
  185. package/dist/packages/chat-widget/src/store/actions/sendGreeting.d.ts +0 -0
  186. package/dist/packages/chat-widget/src/store/actions/sendMessage.d.ts +0 -0
  187. package/dist/packages/chat-widget/src/store/actions/sendOfflineMsg.d.ts +0 -0
  188. package/dist/packages/chat-widget/src/store/actions/sendTyping.d.ts +0 -0
  189. package/dist/packages/chat-widget/src/store/actions/sendVisitorInfo.d.ts +0 -0
  190. package/dist/packages/chat-widget/src/store/actions/setAccountStatus.d.ts +0 -0
  191. package/dist/packages/chat-widget/src/store/actions/setConnectionStatus.d.ts +0 -0
  192. package/dist/packages/chat-widget/src/store/actions/setSessionId.d.ts +0 -0
  193. package/dist/packages/chat-widget/src/store/actions/setVisualStatus.d.ts +0 -0
  194. package/dist/packages/chat-widget/src/store/actions/types.d.ts +0 -0
  195. package/dist/packages/chat-widget/src/store/actions/writeMessage.d.ts +0 -0
  196. package/dist/packages/chat-widget/src/store/reducers/connectionReducer.d.ts +0 -0
  197. package/dist/packages/chat-widget/src/store/reducers/joinMessages.d.ts +0 -0
  198. package/dist/packages/chat-widget/src/store/reducers/memberJoin.d.ts +0 -0
  199. package/dist/packages/chat-widget/src/store/reducers/memberLeave.d.ts +0 -0
  200. package/dist/packages/chat-widget/src/store/reducers/persistStateReducer.d.ts +0 -0
  201. package/dist/packages/chat-widget/src/store/reducers/resetReducer.d.ts +0 -0
  202. package/dist/packages/chat-widget/src/utils/checkSessionExpiration.d.ts +0 -0
  203. package/dist/packages/chat-widget/src/utils/compiler/compileSlotValues.d.ts +0 -0
  204. package/dist/packages/chat-widget/src/utils/compiler/models.d.ts +0 -0
  205. package/dist/packages/chat-widget/src/utils/compiler/response.d.ts +0 -0
  206. package/dist/packages/chat-widget/src/utils/configurableMessages.d.ts +0 -0
  207. package/dist/packages/chat-widget/src/utils/convertToSeconds.d.ts +0 -0
  208. package/dist/packages/chat-widget/src/utils/fingerprint.d.ts +0 -0
  209. package/dist/packages/chat-widget/src/utils/guards.d.ts +0 -0
  210. package/dist/packages/chat-widget/src/utils/http-utils.d.ts +0 -0
  211. package/dist/packages/chat-widget/src/utils/index.d.ts +0 -0
  212. package/dist/packages/chat-widget/src/utils/insertSorted.d.ts +0 -0
  213. package/dist/packages/chat-widget/src/utils/nick-utils.d.ts +0 -0
  214. package/dist/packages/chat-widget/src/utils/parseEnv.d.ts +0 -0
  215. package/dist/packages/chat-widget/src/utils/requestFromMessage.d.ts +0 -0
  216. package/dist/packages/chat-widget/src/utils/requestToMessage.d.ts +0 -0
  217. package/dist/packages/chat-widget/src/utils/resolveUrlPolicy.d.ts +0 -0
  218. package/dist/packages/chat-widget/src/utils/responseToMessage.d.ts +0 -0
  219. package/dist/packages/chat-widget/src/utils/retryRequest.d.ts +0 -0
  220. package/dist/packages/chat-widget/src/utils/subscribable-array.d.ts +0 -0
  221. package/dist/packages/chat-widget/src/utils/throwBadKind.d.ts +0 -0
  222. package/dist/packages/chat-widget/src/utils/time.d.ts +0 -0
  223. package/dist/packages/chat-widget/src/utils/useChatDispatch.d.ts +0 -0
  224. package/dist/packages/chat-widget/src/utils/useChatServerDispatch.d.ts +0 -0
  225. package/dist/packages/chat-widget/src/utils/useDimensions.d.ts +0 -0
  226. package/dist/packages/chat-widget/src/utils/useExternalScript.d.ts +0 -0
  227. package/dist/packages/chat-widget/src/utils/useFetchStylesheet.d.ts +0 -0
  228. package/dist/packages/chat-widget/src/utils/useGreeting.d.ts +0 -0
  229. package/dist/packages/chat-widget/src/utils/useIsMounted.d.ts +0 -0
  230. package/dist/packages/chat-widget/src/utils/useSuggestions.d.ts +0 -0
  231. package/dist/packages/chat-widget/src/utils/useSuggestionsFetch.d.ts +0 -0
  232. package/dist/packages/chat-widget/src/xapp/Attachment.d.ts +0 -0
  233. package/dist/packages/chat-widget/src/xapp/ChatServer.d.ts +0 -0
  234. package/dist/packages/chat-widget/src/xapp/ChatServerMessage.d.ts +0 -0
  235. package/dist/packages/chat-widget/src/xapp/LogChat.d.ts +0 -0
  236. package/dist/packages/chat-widget/src/xapp/StentorDirectChat.d.ts +0 -0
  237. package/dist/packages/chat-widget/src/xapp/StentorLocalChat.d.ts +0 -0
  238. package/dist/packages/chat-widget/src/xapp/StentorRouterChat.d.ts +0 -0
  239. package/dist/packages/chat-widget/src/xapp/StentorServerChat.d.ts +0 -0
  240. package/dist/packages/chat-widget/src/xapp/XappChat.d.ts +0 -0
  241. package/dist/xapp-chat-widget.js +3 -3
  242. package/dist/xapp-chat-widget.js.map +1 -1
  243. package/package.json +20 -20
package/dist/index.js CHANGED
@@ -36,13 +36,14 @@ function getServerConfig(env) {
36
36
  }
37
37
  function useServerConfig(env, nonce) {
38
38
  var connection = getServerConfig(env);
39
- var accountKey = connection.accountKey, serverUrl = connection.serverUrl, type = connection.type;
39
+ var accountKey = connection.accountKey, serverUrl = connection.serverUrl, type = connection.type, timeout = connection.timeout;
40
40
  return React$1.useMemo(function () { return ({
41
41
  accountKey: accountKey,
42
42
  serverUrl: serverUrl,
43
+ timeout: timeout,
43
44
  type: type,
44
- nonce: nonce
45
- }); }, [accountKey, serverUrl, type, nonce]);
45
+ nonce: nonce,
46
+ }); }, [accountKey, serverUrl, timeout, type, nonce]);
46
47
  }
47
48
  function useConnectionInfo(env) {
48
49
  var nonce = reactRedux.useSelector(function (state) { return state.connection.nonce; });
@@ -77,6 +78,18 @@ var __assign = function() {
77
78
  return __assign.apply(this, arguments);
78
79
  };
79
80
 
81
+ function __rest(s, e) {
82
+ var t = {};
83
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
+ t[p] = s[p];
85
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
86
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
88
+ t[p[i]] = s[p[i]];
89
+ }
90
+ return t;
91
+ }
92
+
80
93
  function __awaiter$1(thisArg, _arguments, P, generator) {
81
94
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
82
95
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -983,10 +996,13 @@ function writeMessage(msg, user) {
983
996
  };
984
997
  }
985
998
 
986
- function executeAction(text, token) {
999
+ function executeAction(text, meta) {
987
1000
  return function (chatServer) { return function (dispatch, getState) {
1001
+ // add in attributes from meta
988
1002
  var attributes = getState().attributes;
989
1003
  attributes = __assign(__assign({}, attributes), { currentUrl: window.location.href });
1004
+ var _a = meta || {}, token = _a.token, rest = __rest(_a, ["token"]);
1005
+ attributes = __assign(__assign({}, attributes), rest);
990
1006
  chatServer.sendChatMsg({ text: text, token: token, attributes: attributes }, function (err) {
991
1007
  if (err) {
992
1008
  log("Error sending message", err);
@@ -995,7 +1011,7 @@ function executeAction(text, token) {
995
1011
  });
996
1012
  var visitor = getState().visitor;
997
1013
  dispatch(writeMessage({
998
- text: !token ? text : "".concat(text, " (from the list)")
1014
+ text: !token ? text : "".concat(text, " (from the list)"),
999
1015
  }, visitor));
1000
1016
  }; };
1001
1017
  }
@@ -2154,8 +2170,8 @@ var StentorDirectChat = /** @class */ (function () {
2154
2170
  type: "chat.msg",
2155
2171
  user: __assign(__assign({}, data.user), { nick: "agent:robot" }),
2156
2172
  msg: data.msg,
2157
- timestamp: +new Date()
2158
- }
2173
+ timestamp: +new Date(),
2174
+ },
2159
2175
  });
2160
2176
  };
2161
2177
  StentorDirectChat.prototype.userJoined = function (data) {
@@ -2166,7 +2182,7 @@ var StentorDirectChat = /** @class */ (function () {
2166
2182
  type: "chat.memberjoin",
2167
2183
  user: __assign(__assign({}, data.user), { nick: "agent:robot" }),
2168
2184
  timestamp: +new Date(),
2169
- }
2185
+ },
2170
2186
  });
2171
2187
  };
2172
2188
  // private userLeft(data: UserLeaveMessage) {
@@ -2192,8 +2208,8 @@ var StentorDirectChat = /** @class */ (function () {
2192
2208
  nick: "agent:robot",
2193
2209
  },
2194
2210
  typing: true,
2195
- timestamp: +new Date()
2196
- }
2211
+ timestamp: +new Date(),
2212
+ },
2197
2213
  });
2198
2214
  };
2199
2215
  StentorDirectChat.prototype.stopTyping = function () {
@@ -2205,8 +2221,8 @@ var StentorDirectChat = /** @class */ (function () {
2205
2221
  nick: "agent:robot",
2206
2222
  },
2207
2223
  typing: false,
2208
- timestamp: +new Date()
2209
- }
2224
+ timestamp: +new Date(),
2225
+ },
2210
2226
  });
2211
2227
  };
2212
2228
  StentorDirectChat.prototype.sendFailureMessage = function (retry, delay, text) {
@@ -2216,15 +2232,15 @@ var StentorDirectChat = /** @class */ (function () {
2216
2232
  detail: {
2217
2233
  type: "chat.failureMsg",
2218
2234
  user: {
2219
- nick: "agent:robot"
2235
+ nick: "agent:robot",
2220
2236
  },
2221
2237
  failureMsg: {
2222
2238
  retry: retry,
2223
2239
  delay: delay,
2224
2240
  text: text,
2225
2241
  },
2226
- timestamp: +new Date()
2227
- }
2242
+ timestamp: +new Date(),
2243
+ },
2228
2244
  });
2229
2245
  };
2230
2246
  // private disconnect() {
@@ -2251,7 +2267,7 @@ var StentorDirectChat = /** @class */ (function () {
2251
2267
  timestamp: new Date().getTime(),
2252
2268
  agent: false,
2253
2269
  user: undefined,
2254
- type: "msg"
2270
+ type: "msg",
2255
2271
  }, cb)];
2256
2272
  });
2257
2273
  });
@@ -2300,8 +2316,7 @@ var StentorDirectChat = /** @class */ (function () {
2300
2316
  });
2301
2317
  });
2302
2318
  };
2303
- StentorDirectChat.prototype.sendTyping = function () {
2304
- };
2319
+ StentorDirectChat.prototype.sendTyping = function () { };
2305
2320
  StentorDirectChat.prototype.setVisitorInfo = function (visitorInfo, sessionId, cb) {
2306
2321
  this.visitorInfo = visitorInfo;
2307
2322
  this._attributes = __assign({}, this.visitorInfo.attributes);
@@ -2319,26 +2334,22 @@ var StentorDirectChat = /** @class */ (function () {
2319
2334
  // This is for the bot
2320
2335
  this.userJoined({
2321
2336
  user: this.getBot(undefined),
2322
- token: ""
2337
+ token: "",
2323
2338
  });
2324
2339
  this.startSession(sessionId);
2325
2340
  cb();
2326
2341
  };
2327
- StentorDirectChat.prototype.sendChatRating = function () {
2328
- };
2342
+ StentorDirectChat.prototype.sendChatRating = function () { };
2329
2343
  StentorDirectChat.prototype.sendFile = function (_, cb) {
2330
2344
  cb();
2331
2345
  };
2332
2346
  StentorDirectChat.prototype.markAsRead = function () {
2347
+ // mark the messages read
2333
2348
  };
2334
- StentorDirectChat.prototype.flush = function () {
2335
- };
2336
- StentorDirectChat.prototype.dispose = function () {
2337
- };
2338
- StentorDirectChat.prototype.sleep = function () {
2339
- };
2340
- StentorDirectChat.prototype.wakeup = function () {
2341
- };
2349
+ StentorDirectChat.prototype.flush = function () { };
2350
+ StentorDirectChat.prototype.dispose = function () { };
2351
+ StentorDirectChat.prototype.sleep = function () { };
2352
+ StentorDirectChat.prototype.wakeup = function () { };
2342
2353
  StentorDirectChat.prototype.postMessage = function (message) {
2343
2354
  return __awaiter$1(this, void 0, void 0, function () {
2344
2355
  var request, userId, sessionId, accessToken, attributes, rwgToken, merchantId, environment, enablePreferredTime, service, origin, now, permissionRequest, expired, text, granted, userProfile, isEmail, configurableMessages, botResponse, successResult, success, fail, i, timeout, responseMessage;
@@ -2387,7 +2398,7 @@ var StentorDirectChat = /** @class */ (function () {
2387
2398
  platform: "stentor-platform",
2388
2399
  channel: "widget",
2389
2400
  accessToken: accessToken,
2390
- attributes: attributes
2401
+ attributes: attributes,
2391
2402
  };
2392
2403
  }
2393
2404
  else {
@@ -2408,12 +2419,14 @@ var StentorDirectChat = /** @class */ (function () {
2408
2419
  }
2409
2420
  if (permissionRequest.type === "LOCATION_PRECISE") {
2410
2421
  granted = !!message.msg.location;
2411
- userProfile.preciseLocation = message.msg.location ? {
2412
- coordinates: {
2413
- latitude: message.msg.location.latitude,
2414
- longitude: message.msg.location.longitude
2422
+ userProfile.preciseLocation = message.msg.location
2423
+ ? {
2424
+ coordinates: {
2425
+ latitude: message.msg.location.latitude,
2426
+ longitude: message.msg.location.longitude,
2427
+ },
2415
2428
  }
2416
- } : undefined;
2429
+ : undefined;
2417
2430
  }
2418
2431
  }
2419
2432
  request = {
@@ -2428,7 +2441,7 @@ var StentorDirectChat = /** @class */ (function () {
2428
2441
  platform: "stentor-platform",
2429
2442
  channel: "widget",
2430
2443
  accessToken: accessToken,
2431
- attributes: attributes
2444
+ attributes: attributes,
2432
2445
  };
2433
2446
  }
2434
2447
  else if (message.type === "custom") {
@@ -2449,7 +2462,7 @@ var StentorDirectChat = /** @class */ (function () {
2449
2462
  platform: "stentor-platform",
2450
2463
  channel: "widget",
2451
2464
  accessToken: accessToken,
2452
- attributes: attributes
2465
+ attributes: attributes,
2453
2466
  };
2454
2467
  }
2455
2468
  else {
@@ -2463,7 +2476,7 @@ var StentorDirectChat = /** @class */ (function () {
2463
2476
  platform: "stentor-platform",
2464
2477
  channel: "widget",
2465
2478
  accessToken: accessToken,
2466
- attributes: attributes
2479
+ attributes: attributes,
2467
2480
  };
2468
2481
  }
2469
2482
  }
@@ -2495,6 +2508,7 @@ var StentorDirectChat = /** @class */ (function () {
2495
2508
  case 1:
2496
2509
  if (!(i < configurableMessages.length)) return [3 /*break*/, 4];
2497
2510
  timeout = this.config.timeout || 15000;
2511
+ log("POST attempt ".concat(i, " with timeout ").concat(timeout));
2498
2512
  this.typing();
2499
2513
  // We don't start typing IF we have a failure message displayed and we are waiting on the timeout
2500
2514
  return [4 /*yield*/, new RetryRequest({ retries: 1, timeout: timeout })
@@ -2527,12 +2541,14 @@ var StentorDirectChat = /** @class */ (function () {
2527
2541
  timestamp: now,
2528
2542
  msg: {},
2529
2543
  user: undefined,
2530
- endSession: true
2544
+ endSession: true,
2531
2545
  };
2532
2546
  responseMessage.msg = {
2533
- //eslint-disable-next-line
2534
- //@ts-ignore
2535
- text: (botResponse === null || botResponse === void 0 ? void 0 : botResponse.hasOwnProperty("errorText")) ? botResponse.errorText : "The assistant is not responding right now. Please close the widget and open it again."
2547
+ text: (botResponse === null || botResponse === void 0 ? void 0 : botResponse.hasOwnProperty("errorText"))
2548
+ ? //eslint-disable-next-line
2549
+ //@ts-ignore
2550
+ botResponse.errorText
2551
+ : "The assistant is not responding right now. Please close the widget and open it again.",
2536
2552
  };
2537
2553
  }
2538
2554
  if (typeof ((_e = this.hooks) === null || _e === void 0 ? void 0 : _e.onResponse) === "function") {
@@ -7565,7 +7581,11 @@ var ChatChipsContainer = function (_) {
7565
7581
  openUrl(actionUrl, chatDispatch, visuals);
7566
7582
  }
7567
7583
  else {
7568
- dispatch(executeAction(getChatServerActionLinkLabel(option)));
7584
+ // add metadata
7585
+ dispatch(executeAction(getChatServerActionLinkLabel(option), {
7586
+ action: "click",
7587
+ ui: "chip",
7588
+ }));
7569
7589
  }
7570
7590
  }
7571
7591
  return (React$1.createElement("div", { className: "message-list-container__chips ".concat(!(chips === null || chips === void 0 ? void 0 : chips.length) ? "message-list-container__chips--empty" : "") },
@@ -7806,8 +7826,8 @@ var ChatMessagePart = function (props) {
7806
7826
 
7807
7827
  function useExecuteActionCallback() {
7808
7828
  var dispatch = useChatServerDispatch();
7809
- return React$1.useCallback(function (text, token) {
7810
- dispatch(executeAction(text, token));
7829
+ return React$1.useCallback(function (text, meta) {
7830
+ dispatch(executeAction(text, meta));
7811
7831
  }, [dispatch]);
7812
7832
  }
7813
7833
 
@@ -8108,14 +8128,17 @@ var ListMiddlewareWidget = function (props) {
8108
8128
  throw new TypeError("ctx not provided to ".concat(ListMiddlewareWidget.name));
8109
8129
  }
8110
8130
  var list = React$1.useMemo(function () { return convertFromListDisplay(msg); }, [msg]);
8111
- var handleExecute = useExecuteActionCallback();
8131
+ var executeActionCallback = useExecuteActionCallback();
8132
+ var handleExecute = React$1.useCallback(function (ui, text, token) {
8133
+ executeActionCallback(text, { token: token, action: "click", ui: ui });
8134
+ }, [executeActionCallback]);
8112
8135
  var handleButton = useButtonCallback();
8113
8136
  var user = ctx.user;
8114
8137
  return (React$1.createElement(ChatMessagePart, { showAvatar: false, user: user },
8115
- list.type === "CAROUSEL" && React$1.createElement("div", { className: "chat-msg chat-msg--fullwidth chat-msg--no-ava" },
8116
- React$1.createElement(Carousel, { list: list, onExecute: handleExecute, onButtonClick: handleButton, onOpenUrl: ctx.openUrl })),
8117
- list.type === "LIST" && React$1.createElement("div", { className: "chat-msg chat-msg--expand" },
8118
- React$1.createElement(List, { list: list, onExecute: handleExecute, onButtonClick: handleButton, onOpenUrl: ctx.openUrl }))));
8138
+ list.type === "CAROUSEL" && (React$1.createElement("div", { className: "chat-msg chat-msg--fullwidth chat-msg--no-ava" },
8139
+ React$1.createElement(Carousel, { list: list, onExecute: handleExecute.bind(null, "carousel"), onButtonClick: handleButton, onOpenUrl: ctx.openUrl }))),
8140
+ list.type === "LIST" && (React$1.createElement("div", { className: "chat-msg chat-msg--expand" },
8141
+ React$1.createElement(List, { list: list, onExecute: handleExecute.bind(null, "list"), onButtonClick: handleButton, onOpenUrl: ctx.openUrl })))));
8119
8142
  };
8120
8143
  var ListMiddleware = function (next) { return function (props) {
8121
8144
  var msg = props.msg, ctx = props.ctx;