@microsoft/omnichannel-chat-widget 0.1.0-main.edd8c2a → 0.1.0-main.f4c21f0

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 (369) hide show
  1. package/README.md +259 -0
  2. package/lib/cjs/assets/Audios.js +8 -0
  3. package/lib/cjs/assets/Icons.js +30 -0
  4. package/lib/cjs/common/Constants.js +54 -151
  5. package/lib/cjs/common/KeyCodes.js +3 -4
  6. package/lib/cjs/common/contextDataStore/DataStoreManager.js +12 -0
  7. package/lib/cjs/{assets/assets.d.js → common/interfaces/IContextDataStore.js} +0 -0
  8. package/lib/cjs/common/storage/default/defaultCacheManager.js +26 -0
  9. package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +111 -0
  10. package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +78 -0
  11. package/lib/cjs/common/telemetry/TelemetryConstants.js +88 -22
  12. package/lib/cjs/common/telemetry/TelemetryHelper.js +39 -59
  13. package/lib/cjs/common/telemetry/TelemetryManager.js +25 -35
  14. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
  15. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -3
  16. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +59 -32
  17. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +9 -14
  18. package/lib/cjs/common/utils.js +80 -80
  19. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +21 -45
  20. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -26
  21. package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
  22. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +15 -86
  23. package/lib/cjs/components/dimlayer/DimLayer.js +0 -4
  24. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +11 -39
  25. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -8
  26. package/lib/cjs/components/footerstateful/FooterStateful.js +14 -46
  27. package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +0 -6
  28. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +15 -44
  29. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -8
  30. package/lib/cjs/components/headerstateful/HeaderStateful.js +26 -35
  31. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -14
  32. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +39 -0
  33. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +20 -0
  34. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  35. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +34 -0
  36. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +64 -0
  37. package/lib/cjs/components/livechatwidget/common/Deferred.js +37 -0
  38. package/lib/cjs/components/livechatwidget/common/authHelper.js +50 -0
  39. package/lib/cjs/components/livechatwidget/common/createAdapter.js +10 -9
  40. package/lib/cjs/components/livechatwidget/common/createFooter.js +4 -23
  41. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -10
  42. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +36 -44
  43. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +14 -0
  44. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +146 -68
  45. package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +11 -0
  46. package/lib/cjs/components/livechatwidget/common/endChat.js +168 -54
  47. package/lib/cjs/components/livechatwidget/common/getGeneralStylesForButton.js +0 -6
  48. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +10 -14
  49. package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -8
  50. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +51 -54
  51. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +98 -66
  52. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +13 -22
  53. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +18 -29
  54. package/lib/cjs/components/livechatwidget/common/shareObservable.js +41 -0
  55. package/lib/cjs/components/livechatwidget/common/startChat.js +310 -67
  56. package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -11
  57. package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +2 -11
  58. package/lib/cjs/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
  59. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +370 -160
  60. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +20 -20
  61. package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +57 -0
  62. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +9 -14
  63. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +9 -14
  64. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +32 -23
  65. package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  66. package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +13 -0
  67. package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  68. package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  69. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +27 -43
  70. package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
  71. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +27 -35
  72. package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
  73. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -24
  74. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -19
  75. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -7
  76. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -6
  77. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
  78. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -27
  79. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +9 -16
  80. package/lib/cjs/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -24
  81. package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +56 -88
  82. package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -8
  83. package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  84. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  85. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +12 -0
  86. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -5
  87. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  88. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  89. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  90. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  91. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  92. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  93. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  94. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  95. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +0 -7
  96. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -5
  97. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +33 -80
  98. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +10 -22
  99. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +27 -61
  100. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +7 -15
  101. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
  102. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +82 -0
  103. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
  104. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +10 -0
  105. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
  106. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
  107. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +10 -0
  108. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -9
  109. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +89 -0
  110. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +7 -18
  111. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +8 -42
  112. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +4 -22
  113. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +13 -30
  114. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -9
  115. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -34
  116. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -10
  117. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +7 -18
  118. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -19
  119. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +1 -9
  120. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -9
  121. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +13 -34
  122. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +1 -10
  123. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +7 -11
  124. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +5 -14
  125. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -21
  126. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +33 -0
  127. package/lib/cjs/contexts/ChatAdapterStore.js +0 -2
  128. package/lib/cjs/contexts/ChatContextStore.js +0 -2
  129. package/lib/cjs/contexts/ChatSDKStore.js +0 -2
  130. package/lib/cjs/contexts/common/ConversationState.js +4 -3
  131. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +30 -23
  132. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +21 -12
  133. package/lib/cjs/contexts/createReducer.js +181 -101
  134. package/lib/cjs/controller/componentController.js +5 -34
  135. package/lib/cjs/hooks/useChatAdapterStore.js +0 -6
  136. package/lib/cjs/hooks/useChatContextStore.js +0 -6
  137. package/lib/cjs/hooks/useChatSDKStore.js +0 -6
  138. package/lib/cjs/index.js +0 -5
  139. package/lib/cjs/plugins/newMessageEventHandler.js +82 -0
  140. package/lib/esm/assets/Audios.js +1 -0
  141. package/lib/esm/assets/Icons.js +12 -0
  142. package/lib/esm/common/Constants.js +49 -139
  143. package/lib/esm/common/KeyCodes.js +3 -3
  144. package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
  145. package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
  146. package/lib/esm/common/storage/default/defaultCacheManager.js +18 -0
  147. package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +104 -0
  148. package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +70 -0
  149. package/lib/esm/common/telemetry/TelemetryConstants.js +87 -17
  150. package/lib/esm/common/telemetry/TelemetryHelper.js +40 -49
  151. package/lib/esm/common/telemetry/TelemetryManager.js +24 -27
  152. package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
  153. package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  154. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +62 -23
  155. package/lib/esm/common/telemetry/loggers/consoleLogger.js +9 -10
  156. package/lib/esm/common/utils.js +73 -45
  157. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +21 -16
  158. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +23 -13
  159. package/lib/esm/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
  160. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +16 -62
  161. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +11 -18
  162. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -6
  163. package/lib/esm/components/footerstateful/FooterStateful.js +15 -26
  164. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +15 -37
  165. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -6
  166. package/lib/esm/components/headerstateful/HeaderStateful.js +27 -21
  167. package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -2
  168. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +32 -0
  169. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +13 -0
  170. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  171. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +27 -0
  172. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +57 -0
  173. package/lib/esm/components/livechatwidget/common/Deferred.js +30 -0
  174. package/lib/esm/components/livechatwidget/common/authHelper.js +42 -0
  175. package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -4
  176. package/lib/esm/components/livechatwidget/common/createFooter.js +4 -16
  177. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -5
  178. package/lib/esm/components/livechatwidget/common/createMarkdown.js +38 -37
  179. package/lib/esm/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +7 -0
  180. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +148 -58
  181. package/lib/esm/components/livechatwidget/common/disposeTelemetryLoggers.js +4 -0
  182. package/lib/esm/components/livechatwidget/common/endChat.js +171 -42
  183. package/lib/esm/components/livechatwidget/common/getGeneralStylesForButton.js +0 -2
  184. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +12 -11
  185. package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -5
  186. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +53 -26
  187. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +98 -58
  188. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +13 -11
  189. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +19 -21
  190. package/lib/esm/components/livechatwidget/common/shareObservable.js +35 -0
  191. package/lib/esm/components/livechatwidget/common/startChat.js +313 -52
  192. package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
  193. package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +4 -2
  194. package/lib/esm/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
  195. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +371 -114
  196. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +20 -8
  197. package/lib/esm/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +50 -0
  198. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +9 -4
  199. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +9 -4
  200. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +32 -11
  201. package/lib/esm/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  202. package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +6 -0
  203. package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  204. package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  205. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +30 -28
  206. package/lib/esm/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
  207. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +30 -14
  208. package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
  209. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -6
  210. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -4
  211. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
  212. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
  213. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
  214. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +12 -19
  215. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +9 -12
  216. package/lib/esm/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -16
  217. package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +7 -17
  218. package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -6
  219. package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  220. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  221. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
  222. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -3
  223. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  224. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  225. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  226. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  227. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  228. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  229. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  230. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  231. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +2 -5
  232. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -4
  233. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +34 -66
  234. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +12 -14
  235. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +27 -40
  236. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +9 -8
  237. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +34 -0
  238. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +80 -0
  239. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
  240. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +3 -0
  241. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -1
  242. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -1
  243. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +3 -0
  244. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -7
  245. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +83 -0
  246. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +8 -9
  247. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +9 -28
  248. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +5 -14
  249. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +15 -19
  250. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +5 -8
  251. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -29
  252. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -7
  253. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +9 -14
  254. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -14
  255. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -7
  256. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -7
  257. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +15 -27
  258. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -5
  259. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +9 -9
  260. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +7 -9
  261. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -13
  262. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +27 -0
  263. package/lib/esm/contexts/ChatAdapterStore.js +2 -1
  264. package/lib/esm/contexts/ChatContextStore.js +2 -1
  265. package/lib/esm/contexts/ChatSDKStore.js +2 -1
  266. package/lib/esm/contexts/common/ConversationState.js +4 -3
  267. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +30 -23
  268. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +21 -8
  269. package/lib/esm/contexts/createReducer.js +181 -97
  270. package/lib/esm/controller/componentController.js +6 -5
  271. package/lib/esm/hooks/useChatAdapterStore.js +0 -4
  272. package/lib/esm/hooks/useChatContextStore.js +0 -4
  273. package/lib/esm/hooks/useChatSDKStore.js +0 -4
  274. package/lib/esm/plugins/newMessageEventHandler.js +75 -0
  275. package/lib/types/assets/Audios.d.ts +1 -0
  276. package/lib/types/assets/Icons.d.ts +12 -0
  277. package/lib/types/common/Constants.d.ts +41 -1
  278. package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
  279. package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
  280. package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
  281. package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
  282. package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
  283. package/lib/types/common/telemetry/TelemetryConstants.d.ts +62 -4
  284. package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
  285. package/lib/types/common/telemetry/TelemetryManager.d.ts +1 -0
  286. package/lib/types/common/telemetry/definitions/Contracts.d.ts +7 -4
  287. package/lib/types/common/telemetry/definitions/Payload.d.ts +16 -9
  288. package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +1 -0
  289. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +2 -0
  290. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +16 -0
  291. package/lib/types/common/utils.d.ts +8 -1
  292. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
  293. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
  294. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +5 -1
  295. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
  296. package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
  297. package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
  298. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
  299. package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
  300. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
  301. package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
  302. package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -0
  303. package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -0
  304. package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
  305. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -4
  306. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
  307. package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
  308. package/lib/types/components/livechatwidget/common/startChat.d.ts +5 -2
  309. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
  310. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
  311. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +4 -1
  312. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +8 -3
  313. package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -0
  314. package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -0
  315. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
  316. package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -0
  317. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
  318. package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
  319. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
  320. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -2
  321. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
  322. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +2 -0
  323. package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
  324. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
  325. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
  326. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +4 -1
  327. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
  328. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
  329. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +0 -1
  330. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
  331. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
  332. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
  333. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
  334. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -0
  335. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -0
  336. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
  337. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
  338. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
  339. package/lib/types/contexts/common/ConversationState.d.ts +4 -2
  340. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +8 -3
  341. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +30 -22
  342. package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
  343. package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
  344. package/package.json +14 -13
  345. package/lib/cjs/assets/audios/newMessageNotification.mp3 +0 -0
  346. package/lib/cjs/assets/icons/archiveIcon.svg +0 -3
  347. package/lib/cjs/assets/icons/audioIcon.svg +0 -6
  348. package/lib/cjs/assets/icons/blankIcon.svg +0 -6
  349. package/lib/cjs/assets/icons/excelIcon.svg +0 -6
  350. package/lib/cjs/assets/icons/imageIcon.svg +0 -6
  351. package/lib/cjs/assets/icons/oneNoteIcon.svg +0 -6
  352. package/lib/cjs/assets/icons/pdfIcon.svg +0 -6
  353. package/lib/cjs/assets/icons/powerpointIcon.svg +0 -6
  354. package/lib/cjs/assets/icons/videoIcon.svg +0 -6
  355. package/lib/cjs/assets/icons/visioIcon.svg +0 -6
  356. package/lib/cjs/assets/icons/wordIcon.svg +0 -6
  357. package/lib/esm/assets/assets.d.js +0 -0
  358. package/lib/esm/assets/audios/newMessageNotification.mp3 +0 -0
  359. package/lib/esm/assets/icons/archiveIcon.svg +0 -3
  360. package/lib/esm/assets/icons/audioIcon.svg +0 -6
  361. package/lib/esm/assets/icons/blankIcon.svg +0 -6
  362. package/lib/esm/assets/icons/excelIcon.svg +0 -6
  363. package/lib/esm/assets/icons/imageIcon.svg +0 -6
  364. package/lib/esm/assets/icons/oneNoteIcon.svg +0 -6
  365. package/lib/esm/assets/icons/pdfIcon.svg +0 -6
  366. package/lib/esm/assets/icons/powerpointIcon.svg +0 -6
  367. package/lib/esm/assets/icons/videoIcon.svg +0 -6
  368. package/lib/esm/assets/icons/visioIcon.svg +0 -6
  369. package/lib/esm/assets/icons/wordIcon.svg +0 -6
@@ -5,36 +5,48 @@ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
5
5
  import { defaultGeneralLoadingPaneStyleProps } from "./common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps";
6
6
  import { findAllFocusableElement } from "../../common/utils";
7
7
  import useChatContextStore from "../../hooks/useChatContextStore";
8
+ import { errorUILoadingPaneStyleProps } from "./common/errorUIStyleProps/errorUILoadingPaneStyleProps";
8
9
  export const LoadingPaneStateful = props => {
9
10
  var _props$styleProps;
10
-
11
11
  const [state] = useChatContextStore();
12
12
  const generalStyleProps = Object.assign({}, defaultGeneralLoadingPaneStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps);
13
- const styleProps = { ...props.styleProps,
13
+ const styleProps = {
14
+ ...props.styleProps,
14
15
  generalStyleProps: generalStyleProps
15
16
  };
17
+ const errorUIStyleProps = {
18
+ ...errorUILoadingPaneStyleProps
19
+ };
16
20
  const controlProps = {
17
21
  id: "oc-lcw-loading-pane",
18
22
  dir: state.domainStates.globalDir,
19
23
  ...props.controlProps
20
- }; // Move focus to the first button
24
+ };
25
+ const errorUIControlProps = {
26
+ id: "oc-lcw-alert-pane",
27
+ dir: state.domainStates.globalDir,
28
+ titleText: "Chat is failing to load.",
29
+ subtitleText: "Please Close the chat and try again.",
30
+ hideSpinner: true,
31
+ hideSpinnerText: true,
32
+ ...props.controlProps
33
+ };
21
34
 
35
+ // Move focus to the first button
22
36
  useEffect(() => {
23
37
  const firstElement = findAllFocusableElement(`#${state.domainStates.widgetElementId}`);
24
-
25
38
  if (firstElement && firstElement[0]) {
26
39
  firstElement[0].focus();
27
40
  }
28
-
29
- TelemetryHelper.logActionEvent(LogLevel.INFO, {
41
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
30
42
  Event: TelemetryEvent.LoadingPaneLoaded,
31
43
  Description: "Loading pane loaded."
32
44
  });
33
45
  }, []);
34
46
  return /*#__PURE__*/React.createElement(LoadingPane, {
35
47
  componentOverrides: props.componentOverrides,
36
- controlProps: controlProps,
37
- styleProps: styleProps
48
+ controlProps: state.appStates.isStartChatFailing ? errorUIControlProps : controlProps,
49
+ styleProps: state.appStates.isStartChatFailing ? errorUIStyleProps : styleProps
38
50
  });
39
51
  };
40
52
  export default LoadingPaneStateful;
@@ -0,0 +1,50 @@
1
+ import { ImageFit } from "@fluentui/react";
2
+ import { AlertIcon } from "../../../../assets/Icons";
3
+ export const errorUILoadingPaneStyleProps = {
4
+ generalStyleProps: {
5
+ position: "initial",
6
+ width: "100%",
7
+ height: "100%",
8
+ left: "0%",
9
+ top: "0%",
10
+ borderRadius: "0 0 4px 4px",
11
+ borderWidth: "0px",
12
+ backgroundColor: "#FFFFFF"
13
+ },
14
+ titleStyleProps: {
15
+ fontFamily: "'Segoe UI',Arial,sans-serif",
16
+ fontWeight: "normal",
17
+ fontSize: "18px",
18
+ color: "#36454F",
19
+ textAlign: "center",
20
+ display: "flex",
21
+ order: 2,
22
+ alignSelf: "auto"
23
+ },
24
+ subtitleStyleProps: {
25
+ fontFamily: "'Segoe UI',Arial,sans-serif",
26
+ fontWeight: "normal",
27
+ fontSize: "18px",
28
+ color: "#36454F",
29
+ textAlign: "center",
30
+ display: "flex",
31
+ order: 3,
32
+ alignSelf: "auto"
33
+ },
34
+ iconStyleProps: {
35
+ display: "flex",
36
+ order: 1,
37
+ alignSelf: "auto",
38
+ backgroundColor: "#FFFFFF",
39
+ boxShadow: "#FFFFFF 0px 0px 0px 0px",
40
+ margin: "0px 0px 0px 0px"
41
+ },
42
+ iconImageProps: {
43
+ src: AlertIcon,
44
+ imageFit: ImageFit.center,
45
+ width: "86px",
46
+ height: "86px",
47
+ shouldFadeIn: false,
48
+ shouldStartVisible: true
49
+ }
50
+ };
@@ -1,28 +1,33 @@
1
+ import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
1
2
  import React, { useEffect } from "react";
2
3
  import { OutOfOfficeHoursPane } from "@microsoft/omnichannel-chat-components";
4
+ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
3
5
  import { defaultGeneralStyleProps } from "./common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps";
4
6
  import { findAllFocusableElement } from "../../common/utils";
5
7
  import useChatContextStore from "../../hooks/useChatContextStore";
6
8
  export const OutOfOfficeHoursPaneStateful = props => {
7
9
  var _props$styleProps;
8
-
9
10
  const [state] = useChatContextStore();
10
11
  const generalStyleProps = Object.assign({}, defaultGeneralStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps);
11
- const styleProps = { ...props.styleProps,
12
+ const styleProps = {
13
+ ...props.styleProps,
12
14
  generalStyleProps: generalStyleProps
13
15
  };
14
16
  const controlProps = {
15
17
  id: "oc-lcw-outofofficehours-pane",
16
18
  dir: state.domainStates.globalDir,
17
19
  ...props.controlProps
18
- }; // Move focus to the first button
20
+ };
19
21
 
22
+ // Move focus to the first button
20
23
  useEffect(() => {
21
24
  const firstElement = findAllFocusableElement(`#${state.domainStates.widgetElementId}`);
22
-
23
25
  if (firstElement && firstElement[0]) {
24
26
  firstElement[0].focus();
25
27
  }
28
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
29
+ Event: TelemetryEvent.OutOfOfficePaneLoaded
30
+ });
26
31
  }, []);
27
32
  return /*#__PURE__*/React.createElement(OutOfOfficeHoursPane, {
28
33
  componentOverrides: props.componentOverrides,
@@ -3,12 +3,14 @@ import { LoadingPane } from "@microsoft/omnichannel-chat-components";
3
3
  import { defaultGeneralPostChatLoadingPaneStyleProps } from "./common/defaultgeneralPostChatLoadingPaneStyleProps";
4
4
  import { findAllFocusableElement } from "../../common/utils";
5
5
  import useChatContextStore from "../../hooks/useChatContextStore";
6
+ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
7
+ import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
6
8
  export const PostChatLoadingPaneStateful = props => {
7
9
  var _props$styleProps;
8
-
9
10
  const [state] = useChatContextStore();
10
11
  const generalStyleProps = Object.assign({}, defaultGeneralPostChatLoadingPaneStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps);
11
- const styleProps = { ...props.styleProps,
12
+ const styleProps = {
13
+ ...props.styleProps,
12
14
  generalStyleProps: generalStyleProps
13
15
  };
14
16
  const controlProps = {
@@ -20,14 +22,17 @@ export const PostChatLoadingPaneStateful = props => {
20
22
  hideSpinnerText: true,
21
23
  subtitleText: "Please take a moment to give us feedback about your chat experience. We are loading the survey for you now.",
22
24
  ...props.controlProps
23
- }; // Move focus to the first button
25
+ };
24
26
 
27
+ // Move focus to the first button
25
28
  useEffect(() => {
26
29
  const firstElement = findAllFocusableElement(`#${state.domainStates.widgetElementId}`);
27
-
28
30
  if (firstElement && firstElement[0]) {
29
31
  firstElement[0].focus();
30
32
  }
33
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
34
+ Event: TelemetryEvent.PostChatSurveyLoadingPaneLoaded
35
+ });
31
36
  }, []);
32
37
  return /*#__PURE__*/React.createElement(LoadingPane, {
33
38
  componentOverrides: props.componentOverrides,
@@ -5,39 +5,60 @@ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
5
5
  import { defaultGeneralPostChatSurveyPaneStyleProps } from "./common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps";
6
6
  import { findAllFocusableElement } from "../../common/utils";
7
7
  import useChatContextStore from "../../hooks/useChatContextStore";
8
+ import { PostChatSurveyMode } from "./enums/PostChatSurveyMode";
9
+ import { CustomerVoiceEvents } from "./enums/CustomerVoiceEvents";
8
10
  export const PostChatSurveyPaneStateful = props => {
9
- var _props$styleProps, _props$controlProps;
10
-
11
- const [state] = useChatContextStore(); // ToDo : TASK 2628392 Fix PostChat iframe reloading on Minimize
12
-
11
+ var _state$domainStates$l, _state$domainStates$l2, _props$styleProps, _props$controlProps;
12
+ const [state] = useChatContextStore();
13
+ const postChatSurveyMode = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveymode;
13
14
  const generalStyleProps = Object.assign({}, defaultGeneralPostChatSurveyPaneStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps, {
14
15
  display: state.appStates.isMinimized ? "none" : ""
15
16
  });
16
17
  let surveyInviteLink = "";
17
-
18
18
  if (state.domainStates.postChatContext.surveyInviteLink) {
19
- surveyInviteLink = state.domainStates.postChatContext.surveyInviteLink + "&lang=" + (state.domainStates.postChatContext.formsProLocale ?? "en");
19
+ surveyInviteLink = state.domainStates.postChatContext.surveyInviteLink + "&embed=" + (postChatSurveyMode === PostChatSurveyMode.Embed).toString() + "&compact=" + (props.isCustomerVoiceSurveyCompact ?? true).toString() + "&lang=" + (state.domainStates.postChatContext.formsProLocale ?? "en") + "&showmultilingual=false";
20
20
  }
21
-
22
- const styleProps = { ...props.styleProps,
21
+ const styleProps = {
22
+ ...props.styleProps,
23
23
  generalStyleProps: generalStyleProps
24
24
  };
25
25
  const controlProps = {
26
26
  id: "oc-lcw-postchatsurvey-pane",
27
27
  surveyURL: ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.surveyURL) ?? surveyInviteLink,
28
28
  ...props.controlProps
29
- }; // Move focus to the first button
29
+ };
30
30
 
31
+ // Move focus to the first button
31
32
  useEffect(() => {
32
33
  const firstElement = findAllFocusableElement(`#${controlProps.id}`);
33
-
34
34
  if (firstElement && firstElement[0]) {
35
35
  firstElement[0].focus();
36
36
  }
37
-
38
37
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
39
38
  Event: TelemetryEvent.PostChatSurveyLoaded
40
39
  });
40
+
41
+ //Customer Voice Telemetry Events
42
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
+ window.addEventListener("message", message => {
44
+ const {
45
+ data
46
+ } = message;
47
+ if (!data) return;
48
+ if (data === CustomerVoiceEvents.ResponsePageLoaded) {
49
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
50
+ Event: TelemetryEvent.CustomerVoiceResponsePageLoaded
51
+ });
52
+ } else if (data === CustomerVoiceEvents.FormResponseSubmitted) {
53
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
54
+ Event: TelemetryEvent.CustomerVoiceFormResponseSubmitted
55
+ });
56
+ } else if (data === CustomerVoiceEvents.FormResponseError) {
57
+ TelemetryHelper.logActionEvent(LogLevel.ERROR, {
58
+ Event: TelemetryEvent.CustomerVoiceFormResponseError
59
+ });
60
+ }
61
+ });
41
62
  }, []);
42
63
  return /*#__PURE__*/React.createElement(PostChatSurveyPane, {
43
64
  controlProps: controlProps,
@@ -6,5 +6,5 @@ export const defaultGeneralPostChatSurveyPaneStyleProps = {
6
6
  top: "0%",
7
7
  borderRadius: "0 0 4px 4px",
8
8
  borderWidth: "0px",
9
- overflowY: "auto"
9
+ maxHeight: "calc(100% - 80px)"
10
10
  };
@@ -0,0 +1,6 @@
1
+ export let CustomerVoiceEvents;
2
+ (function (CustomerVoiceEvents) {
3
+ CustomerVoiceEvents["ResponsePageLoaded"] = "ResponsePageLoaded";
4
+ CustomerVoiceEvents["FormResponseSubmitted"] = "FormResponseSubmitted";
5
+ CustomerVoiceEvents["FormResponseError"] = "FormResponseError";
6
+ })(CustomerVoiceEvents || (CustomerVoiceEvents = {}));
@@ -1,5 +1,4 @@
1
1
  export let PostChatSurveyMode;
2
-
3
2
  (function (PostChatSurveyMode) {
4
3
  PostChatSurveyMode["Embed"] = "192350000";
5
4
  PostChatSurveyMode["Link"] = "192350001";
@@ -1,18 +1,18 @@
1
+ import { HtmlAttributeNames, Regex } from "../../common/Constants";
1
2
  import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
2
3
  import React, { useEffect } from "react";
3
- import { extractPreChatSurveyResponseValues, findAllFocusableElement, parseAdaptiveCardPayload } from "../../common/utils";
4
+ import { extractPreChatSurveyResponseValues, findAllFocusableElement, getStateFromCache, isUndefinedOrEmpty, parseAdaptiveCardPayload } from "../../common/utils";
4
5
  import { ConversationState } from "../../contexts/common/ConversationState";
5
6
  import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
6
7
  import { PreChatSurveyPane } from "@microsoft/omnichannel-chat-components";
7
- import { HtmlAttributeNames, Regex } from "../../common/Constants";
8
8
  import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
9
9
  import { defaultGeneralPreChatSurveyPaneStyleProps } from "./common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps";
10
10
  import { defaultPreChatSurveyLocalizedTexts } from "./common/defaultProps/defaultPreChatSurveyLocalizedTexts";
11
- import useChatContextStore from "../../hooks/useChatContextStore"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+ import useChatContextStore from "../../hooks/useChatContextStore";
12
12
 
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
14
  export const PreChatSurveyPaneStateful = props => {
14
15
  var _surveyProps$stylePro, _props$surveyProps, _props$surveyProps$co;
15
-
16
16
  const [state, dispatch] = useChatContextStore();
17
17
  const {
18
18
  surveyProps,
@@ -20,8 +20,9 @@ export const PreChatSurveyPaneStateful = props => {
20
20
  } = props;
21
21
  const generalStyleProps = Object.assign({}, defaultGeneralPreChatSurveyPaneStyleProps, surveyProps === null || surveyProps === void 0 ? void 0 : (_surveyProps$stylePro = surveyProps.styleProps) === null || _surveyProps$stylePro === void 0 ? void 0 : _surveyProps$stylePro.generalStyleProps, {
22
22
  display: state.appStates.isMinimized ? "none" : ""
23
- }); // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
+ });
24
24
 
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
26
  const setPreChatResponseEmail = preChatResponse => {
26
27
  if (preChatResponse) {
27
28
  for (let index = 0; index < preChatResponse.length; index++) {
@@ -34,12 +35,11 @@ export const PreChatSurveyPaneStateful = props => {
34
35
  }
35
36
  }
36
37
  };
37
-
38
38
  const getAdaptiveCardPayload = (payload, requiredFieldMissingMessage) => {
39
39
  try {
40
40
  return parseAdaptiveCardPayload(payload, requiredFieldMissingMessage);
41
41
  } catch (ex) {
42
- TelemetryHelper.logLoadingEvent(LogLevel.ERROR, {
42
+ TelemetryHelper.logConfigDataEvent(LogLevel.ERROR, {
43
43
  Event: TelemetryEvent.ParseAdaptiveCardFailed,
44
44
  Description: "Adaptive Card JSON Parse Failed.",
45
45
  ExceptionDetails: {
@@ -48,7 +48,6 @@ export const PreChatSurveyPaneStateful = props => {
48
48
  });
49
49
  }
50
50
  };
51
-
52
51
  const requiredFieldMissingMessage = ((_props$surveyProps = props.surveyProps) === null || _props$surveyProps === void 0 ? void 0 : (_props$surveyProps$co = _props$surveyProps.controlProps) === null || _props$surveyProps$co === void 0 ? void 0 : _props$surveyProps$co.requiredFieldMissingMessage) ?? defaultPreChatSurveyLocalizedTexts.PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE;
53
52
  const controlProps = {
54
53
  id: "oc-lcw-prechatsurvey-pane",
@@ -64,16 +63,26 @@ export const PreChatSurveyPaneStateful = props => {
64
63
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
65
64
  payload: ConversationState.Loading
66
65
  });
67
-
68
66
  try {
69
- const prechatResponseValues = extractPreChatSurveyResponseValues(state.domainStates.preChatSurveyResponse, values);
70
- const optionalParams = {
71
- initContext: {
67
+ var _state$domainStates, _state$domainStates$t, _state$domainStates$t2, _persistedState$domai, _persistedState$appSt;
68
+ const persistedState = getStateFromCache(((_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : (_state$domainStates$t = _state$domainStates.telemetryInternalData) === null || _state$domainStates$t === void 0 ? void 0 : _state$domainStates$t.orgId) ?? "", ((_state$domainStates$t2 = state.domainStates.telemetryInternalData) === null || _state$domainStates$t2 === void 0 ? void 0 : _state$domainStates$t2.widgetId) ?? "", state.domainStates.widgetInstanceId ?? "");
69
+ let optionalParams = {};
70
+
71
+ //Connect to Active chats and chat is not popout
72
+ if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai = persistedState.domainStates) === null || _persistedState$domai === void 0 ? void 0 : _persistedState$domai.liveChatContext) && (persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$appSt = persistedState.appStates) === null || _persistedState$appSt === void 0 ? void 0 : _persistedState$appSt.conversationState) === ConversationState.Active && state.appStates.hideStartChatButton === false) {
73
+ var _persistedState$domai2;
74
+ optionalParams = {
75
+ liveChatContext: persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.liveChatContext
76
+ };
77
+ await initStartChat(optionalParams, persistedState);
78
+ } else {
79
+ const prechatResponseValues = extractPreChatSurveyResponseValues(state.domainStates.preChatSurveyResponse, values);
80
+ optionalParams = {
72
81
  preChatResponse: prechatResponseValues
73
- }
74
- };
75
- setPreChatResponseEmail(values);
76
- await initStartChat(optionalParams);
82
+ };
83
+ setPreChatResponseEmail(values);
84
+ await initStartChat(optionalParams);
85
+ }
77
86
  } catch (ex) {
78
87
  TelemetryHelper.logActionEvent(LogLevel.ERROR, {
79
88
  Event: TelemetryEvent.PreChatSurveyStartChatMethodFailed,
@@ -86,41 +95,34 @@ export const PreChatSurveyPaneStateful = props => {
86
95
  },
87
96
  ...(surveyProps === null || surveyProps === void 0 ? void 0 : surveyProps.controlProps)
88
97
  };
89
- const styleProps = { ...(surveyProps === null || surveyProps === void 0 ? void 0 : surveyProps.styleProps),
98
+ const styleProps = {
99
+ ...(surveyProps === null || surveyProps === void 0 ? void 0 : surveyProps.styleProps),
90
100
  generalStyleProps: generalStyleProps
91
101
  };
92
102
  useEffect(() => {
93
103
  // Set Aria-Label Attribute for Inputs
94
104
  const adaptiveCardElements = document.getElementsByClassName(HtmlAttributeNames.adaptiveCardClassName);
95
-
96
105
  if (adaptiveCardElements && adaptiveCardElements.length > 0) {
97
106
  const children = adaptiveCardElements[0].children;
98
107
  let value = "";
99
-
100
108
  for (let index = 0; index < children.length; index++) {
101
109
  const current = children[index];
102
-
103
110
  if (current && current.className == HtmlAttributeNames.adaptiveCardTextBlockClassName) {
104
111
  value = current.innerHTML;
105
112
  }
106
-
107
113
  if (current && current.tagName.toLowerCase() == HtmlAttributeNames.div && current.childElementCount > 0) {
108
114
  const input = current.children[0].children;
109
-
110
- if (input && input.length > 0 && input[0].className != HtmlAttributeNames.adaptiveCardToggleInputClassName) {
115
+ if ((input === null || input === void 0 ? void 0 : input.length) > 0 && input[0].className != HtmlAttributeNames.adaptiveCardToggleInputClassName && input[0].className != HtmlAttributeNames.adaptiveCardActionSetClassName) {
111
116
  input[0].setAttribute(HtmlAttributeNames.ariaLabel, value);
112
117
  }
113
118
  }
114
119
  }
115
- } // Move focus to the first button
116
-
117
-
120
+ }
121
+ // Move focus to the first button
118
122
  const firstElement = findAllFocusableElement(`#${controlProps.id}`);
119
-
120
123
  if (firstElement && firstElement[0]) {
121
124
  firstElement[0].focus();
122
125
  }
123
-
124
126
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
125
127
  Event: TelemetryEvent.PrechatSurveyLoaded
126
128
  });
@@ -1,7 +1,7 @@
1
1
  export const defaultGeneralPreChatSurveyPaneStyleProps = {
2
2
  borderStyle: "solid",
3
3
  borderRadius: "inherit",
4
- borderWidth: "3px",
4
+ borderWidth: "0px",
5
5
  backgroundColor: "#FFFFFF",
6
6
  borderColor: "#F1F1F1",
7
7
  overflowY: "auto",
@@ -1,4 +1,4 @@
1
- import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
1
+ import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
2
2
  import React, { useEffect, useState } from "react";
3
3
  import { createTimer, setFocusOnElement } from "../../common/utils";
4
4
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
@@ -8,55 +8,59 @@ import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetAc
8
8
  import { ProactiveChatPane } from "@microsoft/omnichannel-chat-components";
9
9
  import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
10
10
  import { TelemetryTimers } from "../../common/telemetry/TelemetryManager";
11
- import useChatContextStore from "../../hooks/useChatContextStore"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+ import useChatContextStore from "../../hooks/useChatContextStore";
12
12
 
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
14
  export const ProactiveChatPaneStateful = props => {
14
15
  var _proactiveChatProps$c;
15
-
16
16
  const [state, dispatch] = useChatContextStore();
17
17
  const {
18
18
  proactiveChatProps,
19
19
  startChat
20
- } = props; // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
-
20
+ } = props;
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
22
  const [timeoutRemoved, setTimeoutRemoved] = useState(false);
23
-
24
23
  const handleProactiveChatInviteTimeout = () => {
25
24
  if (!timeoutRemoved) {
26
25
  setTimeoutRemoved(true);
26
+ dispatch({
27
+ type: LiveChatWidgetActionType.SET_PROACTIVE_CHAT_PARAMS,
28
+ payload: {
29
+ proactiveChatBodyTitle: "",
30
+ proactiveChatEnablePrechat: false,
31
+ proactiveChatInNewWindow: false
32
+ }
33
+ });
27
34
  dispatch({
28
35
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
29
36
  payload: ConversationState.Closed
30
37
  });
31
- TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
38
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
32
39
  Event: TelemetryEvent.ProactiveChatRejected,
33
40
  ElapsedTimeInMilliseconds: TelemetryTimers.LcwLoadToChatButtonTimer.milliSecondsElapsed,
34
41
  Description: "Proactive chat invitation timed out."
35
42
  });
36
43
  }
37
44
  };
38
-
39
45
  const controlProps = {
40
46
  id: "oc-lcw-proactivechat",
41
47
  dir: state.domainStates.globalDir,
42
48
  onStart: async () => {
43
49
  var _state$domainStates$l, _state$domainStates$l2;
44
-
45
50
  setTimeoutRemoved(true);
46
51
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
47
52
  Event: TelemetryEvent.ProactiveChatAccepted,
48
53
  Description: "Proactive chat accepted."
49
54
  });
50
-
51
55
  if (state.appStates.proactiveChatStates.proactiveChatInNewWindow) {
52
56
  // TODO: BroadcastService: replace with the sdk broadcast service, when in place
53
57
  const startPopoutChatEvent = {
54
- eventName: "StartPopoutChat"
58
+ eventName: BroadcastEvent.ProactiveChatStartPopoutChat
55
59
  };
56
60
  BroadcastService.postMessage(startPopoutChatEvent);
57
61
  dispatch({
58
- type: LiveChatWidgetActionType.SET_SKIP_CHAT_BUTTON_RENDERING,
59
- payload: true
62
+ type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
63
+ payload: ConversationState.Closed
60
64
  });
61
65
  } else if (((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.OutOfOperatingHours) === "True") {
62
66
  dispatch({
@@ -68,6 +72,10 @@ export const ProactiveChatPaneStateful = props => {
68
72
  payload: ConversationState.OutOfOffice
69
73
  });
70
74
  } else {
75
+ const proactiveChatStarted = {
76
+ eventName: BroadcastEvent.ProactiveChatStartChat
77
+ };
78
+ BroadcastService.postMessage(proactiveChatStarted);
71
79
  await startChat();
72
80
  }
73
81
  },
@@ -77,13 +85,21 @@ export const ProactiveChatPaneStateful = props => {
77
85
  Event: TelemetryEvent.ProactiveChatClosed,
78
86
  Description: "Proactive chat closed."
79
87
  });
88
+ dispatch({
89
+ type: LiveChatWidgetActionType.SET_PROACTIVE_CHAT_PARAMS,
90
+ payload: {
91
+ proactiveChatBodyTitle: "",
92
+ proactiveChatEnablePrechat: false,
93
+ proactiveChatInNewWindow: false
94
+ }
95
+ });
80
96
  dispatch({
81
97
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
82
98
  payload: ConversationState.Closed
83
99
  });
84
100
  },
85
101
  ...(proactiveChatProps === null || proactiveChatProps === void 0 ? void 0 : proactiveChatProps.controlProps),
86
- bodyTitleText: state.appStates.proactiveChatStates.proactiveChatBodyTitle ?? (proactiveChatProps === null || proactiveChatProps === void 0 ? void 0 : (_proactiveChatProps$c = proactiveChatProps.controlProps) === null || _proactiveChatProps$c === void 0 ? void 0 : _proactiveChatProps$c.bodyTitleText)
102
+ bodyTitleText: state.appStates.proactiveChatStates.proactiveChatBodyTitle ? state.appStates.proactiveChatStates.proactiveChatBodyTitle : proactiveChatProps === null || proactiveChatProps === void 0 ? void 0 : (_proactiveChatProps$c = proactiveChatProps.controlProps) === null || _proactiveChatProps$c === void 0 ? void 0 : _proactiveChatProps$c.bodyTitleText
87
103
  };
88
104
  useEffect(() => {
89
105
  setFocusOnElement(document.getElementById(controlProps.id + "-startbutton"));
@@ -8,29 +8,30 @@ import { setFocusOnElement } from "../../common/utils";
8
8
  import useChatContextStore from "../../hooks/useChatContextStore";
9
9
  import useChatSDKStore from "../../hooks/useChatSDKStore";
10
10
  export const ReconnectChatPaneStateful = props => {
11
- const [state, dispatch] = useChatContextStore(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
-
11
+ const [state, dispatch] = useChatContextStore();
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
13
  const chatSDK = useChatSDKStore();
14
14
  const {
15
15
  reconnectChatProps,
16
16
  initStartChat
17
17
  } = props;
18
-
19
18
  const startChat = async continueChat => {
20
19
  dispatch({
21
20
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
22
21
  payload: ConversationState.Loading
23
22
  });
24
-
25
23
  if (continueChat && state.appStates.reconnectId) {
26
24
  const optionalParams = {
27
25
  reconnectId: state.appStates.reconnectId
28
26
  };
29
27
  await initStartChat(optionalParams);
30
28
  } else {
29
+ dispatch({
30
+ type: LiveChatWidgetActionType.SET_RECONNECT_ID,
31
+ payload: undefined
32
+ });
31
33
  const parseToJson = false;
32
34
  const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
33
-
34
35
  if (preChatSurveyResponse) {
35
36
  dispatch({
36
37
  type: LiveChatWidgetActionType.SET_PRE_CHAT_SURVEY_RESPONSE,
@@ -49,7 +50,6 @@ export const ReconnectChatPaneStateful = props => {
49
50
  }
50
51
  }
51
52
  };
52
-
53
53
  const controlProps = {
54
54
  id: "lcw-components-reconnect-chat-pane",
55
55
  dir: state.domainStates.globalDir,