@microsoft/omnichannel-chat-widget 1.8.5 → 1.8.6

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 (347) hide show
  1. package/lib/cjs/assets/Audios.js +1 -2
  2. package/lib/cjs/assets/Icons.js +16 -32
  3. package/lib/cjs/common/Constants.js +58 -86
  4. package/lib/cjs/common/KeyCodes.js +9 -10
  5. package/lib/cjs/common/contextDataStore/DataStoreManager.js +7 -8
  6. package/lib/cjs/common/facades/FacadeChatSDK.js +11 -13
  7. package/lib/cjs/common/storage/default/defaultCacheManager.js +7 -8
  8. package/lib/cjs/common/telemetry/AppInsightsEvents.js +2 -3
  9. package/lib/cjs/common/telemetry/ScenarioMarker.js +10 -12
  10. package/lib/cjs/common/telemetry/TelemetryConstants.js +31 -29
  11. package/lib/cjs/common/telemetry/TelemetryHelper.js +39 -39
  12. package/lib/cjs/common/telemetry/TelemetryManager.js +21 -24
  13. package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +2 -3
  14. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +2 -3
  15. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +2 -3
  16. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryInternalData.js +2 -3
  17. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -8
  18. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
  19. package/lib/cjs/common/utils/SecureEventBus.js +36 -10
  20. package/lib/cjs/common/utils/dispatchCustomEvent.js +2 -3
  21. package/lib/cjs/common/utils/xssUtils.js +1 -1
  22. package/lib/cjs/common/utils.js +10 -11
  23. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +15 -17
  24. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +10 -12
  25. package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +2 -3
  26. package/lib/cjs/components/citationpanestateful/CitationDim.js +3 -4
  27. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +3 -6
  28. package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +3 -5
  29. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +3 -5
  30. package/lib/cjs/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.js +2 -3
  31. package/lib/cjs/components/dimlayer/DimLayer.js +1 -1
  32. package/lib/cjs/components/draggable/DraggableChatWidget.js +3 -5
  33. package/lib/cjs/components/draggable/DraggableEventEmitter.js +4 -6
  34. package/lib/cjs/components/draggable/DraggableEventNames.js +4 -5
  35. package/lib/cjs/components/draggable/DraggableEventReceiver.js +2 -4
  36. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -10
  37. package/lib/cjs/components/errorboundary/ErrorBoundary.js +17 -21
  38. package/lib/cjs/components/footerstateful/FooterStateful.js +9 -11
  39. package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +2 -4
  40. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +4 -4
  41. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.js +1 -2
  42. package/lib/cjs/components/headerstateful/HeaderStateful.js +13 -15
  43. package/lib/cjs/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.js +2 -3
  44. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -8
  45. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +10 -14
  46. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +26 -32
  47. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +10 -12
  48. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +9 -11
  49. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +9 -11
  50. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +9 -11
  51. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +12 -17
  52. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +4 -5
  53. package/lib/cjs/components/livechatwidget/common/Deferred.js +10 -13
  54. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +12 -15
  55. package/lib/cjs/components/livechatwidget/common/authHelper.js +1 -1
  56. package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
  57. package/lib/cjs/components/livechatwidget/common/createAdapter.js +3 -3
  58. package/lib/cjs/components/livechatwidget/common/createDownloadTranscriptProps.js +1 -2
  59. package/lib/cjs/components/livechatwidget/common/createFooter.js +1 -1
  60. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
  61. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +1 -2
  62. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +2 -3
  63. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +2 -3
  64. package/lib/cjs/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.js +2 -3
  65. package/lib/cjs/components/livechatwidget/common/endChat.js +12 -13
  66. package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +1 -1
  67. package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
  68. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +17 -17
  69. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
  70. package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +4 -5
  71. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +6 -6
  72. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
  73. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
  74. package/lib/cjs/components/livechatwidget/common/startChat.js +37 -37
  75. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -7
  76. package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +3 -4
  77. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +76 -78
  78. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +6 -8
  79. package/lib/cjs/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.js +2 -3
  80. package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +2 -3
  81. package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +37 -40
  82. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +2 -3
  83. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +2 -3
  84. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +3 -5
  85. package/lib/cjs/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.js +2 -3
  86. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +3 -5
  87. package/lib/cjs/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.js +2 -3
  88. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +4 -6
  89. package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +2 -3
  90. package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +1 -2
  91. package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -4
  92. package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -4
  93. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +10 -12
  94. package/lib/cjs/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.js +2 -3
  95. package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +2 -3
  96. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -10
  97. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +4 -6
  98. package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +15 -17
  99. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +2 -3
  100. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +2 -3
  101. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +2 -3
  102. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +2 -3
  103. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +2 -3
  104. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +34 -37
  105. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +18 -21
  106. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -20
  107. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +21 -24
  108. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +20 -23
  109. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +4 -5
  110. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +4 -5
  111. package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +1 -2
  112. package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +2 -3
  113. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +3 -4
  114. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.js +2 -3
  115. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.js +2 -3
  116. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -3
  117. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -4
  118. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -3
  119. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +2 -3
  120. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.js +2 -3
  121. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -3
  122. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -15
  123. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +10 -12
  124. package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
  125. package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +10 -13
  126. package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
  127. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +3 -4
  128. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +7 -8
  129. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +2 -3
  130. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +7 -8
  131. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -4
  132. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -4
  133. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -4
  134. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -4
  135. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -4
  136. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -4
  137. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -4
  138. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -4
  139. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +9 -11
  140. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +1 -2
  141. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +1 -2
  142. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +2 -3
  143. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +2 -3
  144. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +60 -42
  145. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +2 -4
  146. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +8 -9
  147. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -1
  148. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +4 -4
  149. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +11 -12
  150. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +2 -3
  151. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +2 -3
  152. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +3 -4
  153. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +4 -5
  154. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +3 -4
  155. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +3 -4
  156. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +2 -3
  157. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +1 -1
  158. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
  159. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.js +2 -3
  160. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.js +2 -3
  161. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.js +2 -3
  162. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.js +2 -3
  163. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.js +2 -3
  164. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.js +2 -3
  165. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.js +2 -3
  166. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.js +2 -3
  167. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.js +2 -3
  168. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +2 -3
  169. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +2 -3
  170. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +2 -3
  171. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +2 -3
  172. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +2 -3
  173. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +2 -3
  174. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.js +2 -3
  175. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
  176. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
  177. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.js +2 -3
  178. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.js +2 -3
  179. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.js +2 -3
  180. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +2 -3
  181. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.js +2 -3
  182. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
  183. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
  184. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
  185. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +1 -1
  186. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -4
  187. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
  188. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +1 -2
  189. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +2 -3
  190. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -4
  191. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -8
  192. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/callActionMiddleware.js +1 -2
  193. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -4
  194. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
  195. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +9 -10
  196. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +3 -4
  197. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +1 -2
  198. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +4 -5
  199. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -4
  200. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +4 -5
  201. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
  202. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -4
  203. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +1 -2
  204. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +2 -3
  205. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +8 -10
  206. package/lib/cjs/contexts/ChatAdapterStore.js +1 -2
  207. package/lib/cjs/contexts/ChatContextStore.js +1 -2
  208. package/lib/cjs/contexts/ChatSDKStore.js +1 -2
  209. package/lib/cjs/contexts/FacadeChatSDKStore.js +1 -2
  210. package/lib/cjs/contexts/common/ConversationState.js +3 -4
  211. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +211 -4
  212. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
  213. package/lib/cjs/contexts/common/StartChatFailureType.js +3 -4
  214. package/lib/cjs/controller/componentController.js +1 -1
  215. package/lib/cjs/firstresponselatency/Constants.js +3 -4
  216. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +9 -11
  217. package/lib/cjs/firstresponselatency/util.js +8 -8
  218. package/lib/cjs/hooks/useChatAdapterStore.js +1 -2
  219. package/lib/cjs/hooks/useChatContextStore.js +1 -2
  220. package/lib/cjs/hooks/useChatSDKStore.js +1 -2
  221. package/lib/cjs/hooks/useFacadeChatSDKStore.js +1 -2
  222. package/lib/cjs/hooks/useWindowDimensions.js +1 -1
  223. package/lib/cjs/index.js +1 -1
  224. package/lib/cjs/plugins/createChatTranscript.js +25 -28
  225. package/lib/cjs/plugins/newMessageEventHandler.js +2 -2
  226. package/lib/esm/common/Constants.js +40 -39
  227. package/lib/esm/common/KeyCodes.js +9 -9
  228. package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -6
  229. package/lib/esm/common/facades/FacadeChatSDK.js +9 -10
  230. package/lib/esm/common/storage/default/defaultCacheManager.js +6 -6
  231. package/lib/esm/common/telemetry/ScenarioMarker.js +9 -10
  232. package/lib/esm/common/telemetry/TelemetryConstants.js +33 -25
  233. package/lib/esm/common/telemetry/TelemetryHelper.js +38 -37
  234. package/lib/esm/common/telemetry/TelemetryManager.js +19 -20
  235. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +5 -5
  236. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
  237. package/lib/esm/common/utils/SecureEventBus.js +9 -8
  238. package/lib/esm/common/utils.js +10 -11
  239. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +12 -12
  240. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +7 -7
  241. package/lib/esm/components/citationpanestateful/CitationDim.js +1 -1
  242. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +0 -1
  243. package/lib/esm/components/draggable/DraggableEventEmitter.js +1 -1
  244. package/lib/esm/components/draggable/DraggableEventNames.js +3 -3
  245. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -5
  246. package/lib/esm/components/errorboundary/ErrorBoundary.js +15 -17
  247. package/lib/esm/components/footerstateful/FooterStateful.js +6 -6
  248. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +3 -3
  249. package/lib/esm/components/headerstateful/HeaderStateful.js +10 -10
  250. package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -3
  251. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +9 -12
  252. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +23 -28
  253. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +8 -9
  254. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +7 -8
  255. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +7 -8
  256. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -8
  257. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +10 -14
  258. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +3 -3
  259. package/lib/esm/components/livechatwidget/common/Deferred.js +8 -10
  260. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +10 -12
  261. package/lib/esm/components/livechatwidget/common/authHelper.js +1 -1
  262. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
  263. package/lib/esm/components/livechatwidget/common/createAdapter.js +3 -3
  264. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
  265. package/lib/esm/components/livechatwidget/common/createMarkdown.js +0 -1
  266. package/lib/esm/components/livechatwidget/common/endChat.js +12 -13
  267. package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
  268. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -16
  269. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
  270. package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +3 -3
  271. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +6 -6
  272. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
  273. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
  274. package/lib/esm/components/livechatwidget/common/startChat.js +37 -37
  275. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +6 -7
  276. package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
  277. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +73 -73
  278. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +3 -3
  279. package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +34 -35
  280. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +1 -1
  281. package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -3
  282. package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -3
  283. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -7
  284. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +5 -5
  285. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +1 -1
  286. package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +12 -12
  287. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +31 -32
  288. package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +15 -17
  289. package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +15 -17
  290. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +18 -20
  291. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +18 -20
  292. package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +3 -3
  293. package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +3 -3
  294. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +1 -1
  295. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +10 -12
  296. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +7 -8
  297. package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
  298. package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +7 -7
  299. package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
  300. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -1
  301. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -6
  302. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -6
  303. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -3
  304. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -3
  305. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -3
  306. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -3
  307. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -3
  308. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -3
  309. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -3
  310. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -3
  311. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +7 -8
  312. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +28 -35
  313. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +6 -6
  314. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -3
  315. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +9 -9
  316. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +1 -1
  317. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +3 -3
  318. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +1 -1
  319. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +1 -1
  320. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
  321. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
  322. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
  323. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -1
  324. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +0 -1
  325. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +2 -2
  326. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -6
  327. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +2 -2
  328. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
  329. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +8 -8
  330. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +2 -2
  331. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -3
  332. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +2 -2
  333. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +2 -2
  334. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
  335. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +2 -2
  336. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +6 -7
  337. package/lib/esm/contexts/common/ConversationState.js +3 -3
  338. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +211 -3
  339. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
  340. package/lib/esm/contexts/common/StartChatFailureType.js +3 -3
  341. package/lib/esm/controller/componentController.js +1 -2
  342. package/lib/esm/firstresponselatency/Constants.js +3 -3
  343. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +7 -8
  344. package/lib/esm/firstresponselatency/util.js +8 -8
  345. package/lib/esm/plugins/createChatTranscript.js +23 -25
  346. package/lib/esm/plugins/newMessageEventHandler.js +2 -2
  347. package/package.json +28 -22
@@ -21,8 +21,8 @@ const createMaxMessageSizeValidator = localizedTexts => _ref => {
21
21
  } = _ref;
22
22
  return next => action => {
23
23
  if (action.type === _WebChatActionType.WebChatActionType.WEB_CHAT_SET_SEND_BOX) {
24
- var _action$payload, _action$payload$text;
25
- const textLength = ((_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : (_action$payload$text = _action$payload.text) === null || _action$payload$text === void 0 ? void 0 : _action$payload$text.length) || 0;
24
+ var _action$payload;
25
+ const textLength = ((_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.text) === null || _action$payload === void 0 ? void 0 : _action$payload.length) || 0;
26
26
  if (textLength > _Constants.WebChatMiddlewareConstants.maxTextLength) {
27
27
  _NotificationHandler.NotificationHandler.notifyError(_NotificationScenarios.NotificationScenarios.MaxSizeError, localizedTexts.MIDDLEWARE_MAX_CHARACTER_COUNT_EXCEEDED);
28
28
  return next(action);
@@ -33,5 +33,4 @@ const createMaxMessageSizeValidator = localizedTexts => _ref => {
33
33
  return next(action);
34
34
  };
35
35
  };
36
- var _default = createMaxMessageSizeValidator;
37
- exports.default = _default;
36
+ var _default = exports.default = createMaxMessageSizeValidator;
@@ -46,5 +46,4 @@ const preProcessingMiddleware = _ref => {
46
46
  return next(action);
47
47
  };
48
48
  };
49
- var _default = preProcessingMiddleware;
50
- exports.default = _default;
49
+ var _default = exports.default = preProcessingMiddleware;
@@ -8,7 +8,7 @@ var _dompurify = _interopRequireDefault(require("dompurify"));
8
8
  var _TelemetryConstants = require("../../../../../common/telemetry/TelemetryConstants");
9
9
  var _TelemetryHelper = require("../../../../../common/telemetry/TelemetryHelper");
10
10
  var _WebChatActionType = require("../../enums/WebChatActionType");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /******
13
13
  * SanitizationMiddleware
14
14
  *
@@ -56,5 +56,4 @@ const sanitizationMiddleware = _ref => {
56
56
  return next(action);
57
57
  };
58
58
  };
59
- var _default = sanitizationMiddleware;
60
- exports.default = _default;
59
+ var _default = exports.default = sanitizationMiddleware;
@@ -11,16 +11,16 @@ var _WebChatStoreLoader = require("../WebChatStoreLoader");
11
11
  var _utils = require("../../../../common/utils");
12
12
  var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
13
13
  var _TelemetryConstants = require("../../../../common/telemetry/TelemetryConstants");
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
16
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
- let NotificationHandler = /*#__PURE__*/function () {
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
+ let NotificationHandler = exports.NotificationHandler = /*#__PURE__*/function () {
20
20
  function NotificationHandler() {
21
21
  _classCallCheck(this, NotificationHandler);
22
22
  }
23
- _createClass(NotificationHandler, null, [{
23
+ return _createClass(NotificationHandler, null, [{
24
24
  key: "notify",
25
25
  value: function notify(id, level, message) {
26
26
  if (_WebChatStoreLoader.WebChatStoreLoader.store) {
@@ -107,6 +107,4 @@ let NotificationHandler = /*#__PURE__*/function () {
107
107
  };
108
108
  }
109
109
  }]);
110
- return NotificationHandler;
111
- }();
112
- exports.NotificationHandler = NotificationHandler;
110
+ }();
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ChatAdapterStore = void 0;
7
7
  var _react = require("react");
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
9
- const ChatAdapterStore = /*#__PURE__*/(0, _react.createContext)([undefined, adapter => {}]);
10
- exports.ChatAdapterStore = ChatAdapterStore;
9
+ const ChatAdapterStore = exports.ChatAdapterStore = /*#__PURE__*/(0, _react.createContext)([undefined, adapter => {}]);
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ChatContextStore = void 0;
7
7
  var _react = require("react");
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- const ChatContextStore = /*#__PURE__*/(0, _react.createContext)(undefined);
10
- exports.ChatContextStore = ChatContextStore;
9
+ const ChatContextStore = exports.ChatContextStore = /*#__PURE__*/(0, _react.createContext)(undefined);
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ChatSDKStore = void 0;
7
7
  var _react = require("react");
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- const ChatSDKStore = /*#__PURE__*/(0, _react.createContext)(undefined);
10
- exports.ChatSDKStore = ChatSDKStore;
9
+ const ChatSDKStore = exports.ChatSDKStore = /*#__PURE__*/(0, _react.createContext)(undefined);
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.FacadeChatSDKStore = void 0;
7
7
  var _react = require("react");
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
9
- const FacadeChatSDKStore = /*#__PURE__*/(0, _react.createContext)([undefined, facadeChatSDK => {}]);
10
- exports.FacadeChatSDKStore = FacadeChatSDKStore;
9
+ const FacadeChatSDKStore = exports.FacadeChatSDKStore = /*#__PURE__*/(0, _react.createContext)([undefined, facadeChatSDK => {}]);
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ConversationState = void 0;
7
- let ConversationState;
8
- exports.ConversationState = ConversationState;
9
- (function (ConversationState) {
7
+ let ConversationState = exports.ConversationState = /*#__PURE__*/function (ConversationState) {
10
8
  ConversationState[ConversationState["Prechat"] = 0] = "Prechat";
11
9
  ConversationState[ConversationState["Loading"] = 1] = "Loading";
12
10
  ConversationState[ConversationState["ReconnectChat"] = 2] = "ReconnectChat";
@@ -18,4 +16,5 @@ exports.ConversationState = ConversationState;
18
16
  ConversationState[ConversationState["Postchat"] = 8] = "Postchat";
19
17
  ConversationState[ConversationState["Closed"] = 9] = "Closed";
20
18
  ConversationState[ConversationState["Error"] = 10] = "Error";
21
- })(ConversationState || (exports.ConversationState = ConversationState = {}));
19
+ return ConversationState;
20
+ }({});
@@ -4,57 +4,264 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.LiveChatWidgetActionType = void 0;
7
- let LiveChatWidgetActionType;
8
- exports.LiveChatWidgetActionType = LiveChatWidgetActionType;
9
- (function (LiveChatWidgetActionType) {
7
+ let LiveChatWidgetActionType = exports.LiveChatWidgetActionType = /*#__PURE__*/function (LiveChatWidgetActionType) {
8
+ /*
9
+ Parameters:
10
+ - true: When the minimize button is clicked
11
+ - false: When the chat button is clicked after the chat is minimized (not closed)
12
+ */
10
13
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_ELEMENT_ID"] = 0] = "SET_WIDGET_ELEMENT_ID";
14
+ /*
15
+ Parameters:
16
+ - props: The rendering middleware props
17
+ */
11
18
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RENDERING_MIDDLEWARE_PROPS"] = 1] = "SET_RENDERING_MIDDLEWARE_PROPS";
19
+ /*
20
+ Parameters:
21
+ - props: The localized middlware texts
22
+ */
12
23
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_MIDDLEWARE_LOCALIZED_TEXTS"] = 2] = "SET_MIDDLEWARE_LOCALIZED_TEXTS";
24
+ // New: store citation map produced by the citations middleware
13
25
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CITATIONS"] = 3] = "SET_CITATIONS";
26
+ /*
27
+ Parameters:
28
+ - dir: The global direction prop that will apply to each component if noit specified
29
+ */
14
30
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_GLOBAL_DIR"] = 4] = "SET_GLOBAL_DIR";
31
+ /*
32
+ Parameters:
33
+ - true: When the minimize button is clicked
34
+ - false: When the chat button is clicked after the chat is minimized (not closed)
35
+ */
15
36
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_MINIMIZED"] = 5] = "SET_MINIMIZED";
37
+ /*
38
+ Parameters:
39
+ ConversationState enum : Enum that controls different Conversation behaviour
40
+ */
16
41
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_STATE"] = 6] = "SET_CONVERSATION_STATE";
42
+ /*
43
+ Parameters:
44
+ string or null: The element id that the control will return to after a popup/modal is closed
45
+ */
17
46
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PREVIOUS_FOCUSED_ELEMENT_ID"] = 7] = "SET_PREVIOUS_FOCUSED_ELEMENT_ID";
47
+ /*
48
+ Parameters:
49
+ - true: When chat is failing to start
50
+ - false: When chat is functioning normally
51
+ */
18
52
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILING"] = 8] = "SET_START_CHAT_FAILING";
53
+ /*
54
+ Parameters:
55
+ - string: The start chat failure type
56
+ */
19
57
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILURE_TYPE"] = 9] = "SET_START_CHAT_FAILURE_TYPE";
58
+ /*
59
+ Parameters:
60
+ - true: When chat is outside operating hours
61
+ - false: When chat is not outside operatin hours
62
+ */
20
63
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_OUTSIDE_OPERATING_HOURS"] = 10] = "SET_OUTSIDE_OPERATING_HOURS";
64
+ /*
65
+ Parameters:
66
+ string: The PreChat Survey JSON payload in string format
67
+ */
21
68
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRE_CHAT_SURVEY_RESPONSE"] = 11] = "SET_PRE_CHAT_SURVEY_RESPONSE";
69
+ /*
70
+ Parameters:
71
+ string: The custom context in json format
72
+ */
22
73
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CUSTOM_CONTEXT"] = 12] = "SET_CUSTOM_CONTEXT";
74
+ /*
75
+ Parameters:
76
+ - true: When close chat button is clicked
77
+ - false: when clicked on Confirm button on confirmation pane
78
+ */
23
79
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 13] = "SET_SHOW_CONFIRMATION";
80
+ /*
81
+ Parameters:
82
+ - true: When Email Transcript button is clicked
83
+ - false: when Done button clicked on Email Transcript pane
84
+ */
24
85
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 14] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
86
+ /*
87
+ Parameters:
88
+ string: Email id from prechat survey pane(if available)
89
+ */
25
90
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 15] = "SET_PRECHAT_RESPONSE_EMAIL";
91
+ /*
92
+ Parameters:
93
+ true: When audio notification on
94
+ null: During initialization
95
+ false: When audio notification off
96
+ */
26
97
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 16] = "SET_AUDIO_NOTIFICATION";
98
+ /*
99
+ Parameters:
100
+ true: If voice and video calling is enabled
101
+ false: Incase of disabled
102
+ */
27
103
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 17] = "SET_E2VV_ENABLED";
104
+ /*
105
+ Parameters:
106
+ any: Contains the Post Chat Context information if set
107
+ */
28
108
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 18] = "SET_POST_CHAT_CONTEXT";
109
+ /*
110
+ Parameters:
111
+ true: When call is initiated from from an agent
112
+ false: To hide the calling container
113
+ */
29
114
  LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 19] = "SHOW_CALLING_CONTAINER";
115
+ /*
116
+ Parameters:
117
+ true: To show the incoming call container
118
+ false: When call is accepted or rejected
119
+ */
30
120
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 20] = "SET_INCOMING_CALL";
121
+ /*
122
+ Parameters:
123
+ true: When both local and remote video are disabled to hide video calling container
124
+ false: If any of remote or local video is enabled to Show video calling container
125
+ */
31
126
  LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 21] = "DISABLE_VIDEO_CALL";
127
+ /*
128
+ Parameters:
129
+ true/false: Local video toggle
130
+ */
32
131
  LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_LOCAL_VIDEO"] = 22] = "DISABLE_LOCAL_VIDEO";
132
+ /*
133
+ Parameters:
134
+ true/false: remote video toggle
135
+ */
33
136
  LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_REMOTE_VIDEO"] = 23] = "DISABLE_REMOTE_VIDEO";
137
+ /*
138
+ Parameters:
139
+ any: Contains the chat token data
140
+ */
34
141
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_TOKEN"] = 24] = "SET_CHAT_TOKEN";
142
+ /*
143
+ Parameters:
144
+ true/false: Decides whether to show the start chat button
145
+ */
35
146
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_BUTTON_DISPLAY"] = 25] = "SET_START_CHAT_BUTTON_DISPLAY";
147
+ /*
148
+ Parameters:
149
+ any: Proactive chat parameter when proactive chat starts
150
+ */
36
151
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PROACTIVE_CHAT_PARAMS"] = 26] = "SET_PROACTIVE_CHAT_PARAMS";
152
+ /*
153
+ Parameters:
154
+ IInternalTelemetryData: Sets internal telemetry data for telemetry logging
155
+ */
37
156
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 27] = "SET_TELEMETRY_DATA";
157
+ /*
158
+ Parameters:
159
+ string: Reconnect Id for chat reconnect
160
+ */
38
161
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 28] = "SET_RECONNECT_ID";
162
+ /*
163
+ Parameters:
164
+ number: Keeps track of unread message count on chat minimize
165
+ */
39
166
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 29] = "SET_UNREAD_MESSAGE_COUNT";
167
+ /*
168
+ Parameters:
169
+ number: Toggle focus on chat button
170
+ */
40
171
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 30] = "SET_FOCUS_CHAT_BUTTON";
172
+ /*
173
+ Parameters:
174
+ any: Set conversation ended by agent state
175
+ */
41
176
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED"] = 31] = "SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED";
177
+ /*
178
+ Parameters:
179
+ any: Set conversation ended entity
180
+ */
42
181
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY"] = 32] = "SET_CONVERSATION_ENDED_BY";
182
+ /*
183
+ Parameters:
184
+ any: Set widget state from cache
185
+ */
43
186
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 33] = "SET_WIDGET_STATE";
187
+ /*
188
+ Parameters:
189
+ any: Set live chat context
190
+ */
44
191
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 34] = "SET_LIVE_CHAT_CONTEXT";
192
+ /*
193
+ string: SignIn ID for authentication
194
+ */
45
195
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_OAUTH_SIGNIN_ID"] = 35] = "SET_BOT_OAUTH_SIGNIN_ID";
196
+ /*
197
+ Parameters:
198
+ any: Set height and width of Widget
199
+ */
46
200
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_SIZE"] = 36] = "SET_WIDGET_SIZE";
201
+ /*
202
+ Parameters:
203
+ any: Set widget instance id
204
+ */
47
205
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_INSTANCE_ID"] = 37] = "SET_WIDGET_INSTANCE_ID";
206
+ /*
207
+ Parameters:
208
+ any: Set live chat config
209
+ */
48
210
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONFIG"] = 38] = "SET_LIVE_CHAT_CONFIG";
211
+ /*
212
+ Parameters:
213
+ true/false: Checks if Postchat workflow is already initiated
214
+ */
49
215
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_WORKFLOW_IN_PROGRESS"] = 39] = "SET_POST_CHAT_WORKFLOW_IN_PROGRESS";
216
+ /*
217
+ Parameters:
218
+ any: Set initial chat sdk request id (for reconnect scenario when start new chat is deferred)
219
+ */
50
220
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INITIAL_CHAT_SDK_REQUEST_ID"] = 40] = "SET_INITIAL_CHAT_SDK_REQUEST_ID";
221
+ /*
222
+ Parameters:
223
+ true/false: To check if bot configured survey needs to be used
224
+ */
51
225
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOULD_USE_BOT_SURVEY"] = 41] = "SET_SHOULD_USE_BOT_SURVEY";
226
+ /*
227
+ Parameters:
228
+ any: Set customer disconnect
229
+ */
52
230
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_DISCONNECT_EVENT_RECEIVED"] = 42] = "SET_CHAT_DISCONNECT_EVENT_RECEIVED";
231
+ /*
232
+ Parameters:
233
+ any: Set selected survey mode
234
+ */
53
235
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SURVEY_MODE"] = 43] = "SET_SURVEY_MODE";
236
+ /*
237
+ Parameters:
238
+ ConfirmationState: Set confirmation state(OK/Cancel/NotSet)
239
+ */
54
240
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONFIRMATION_STATE"] = 44] = "SET_CONFIRMATION_STATE";
241
+ /*
242
+ Parameters:
243
+ ParticipantType: Set participant type when rendering post chat survey
244
+ */
55
245
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_PARTICIPANT_TYPE"] = 45] = "SET_POST_CHAT_PARTICIPANT_TYPE";
246
+ /*
247
+ Parameters:
248
+ true/false: Determines if conversational survey feature is enabled
249
+ */
56
250
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_ENABLED"] = 46] = "SET_CONVERSATIONAL_SURVEY_ENABLED";
251
+ /*
252
+ Parameters:
253
+ true/false: Determines if conversational survey flow is active
254
+ */
57
255
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_DISPLAY"] = 47] = "SET_CONVERSATIONAL_SURVEY_DISPLAY";
256
+ /*
257
+ Parameters:
258
+ null payload, simply returns the existing inMemory state
259
+ */
58
260
  LiveChatWidgetActionType[LiveChatWidgetActionType["GET_IN_MEMORY_STATE"] = 48] = "GET_IN_MEMORY_STATE";
261
+ /*
262
+ Parameters:
263
+ string: Sets/updates current bot avatar initials (used for dynamic refresh of persistent messages)
264
+ */
59
265
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_AVATAR_INITIALS"] = 49] = "SET_BOT_AVATAR_INITIALS";
60
- })(LiveChatWidgetActionType || (exports.LiveChatWidgetActionType = LiveChatWidgetActionType = {}));
266
+ return LiveChatWidgetActionType;
267
+ }({});
@@ -14,11 +14,11 @@ var _defaultWebChatStyles = require("../../components/webchatcontainerstateful/c
14
14
  const getLiveChatWidgetContextInitialState = props => {
15
15
  var _props$controlProps, _props$webChatContain;
16
16
  const isOutsideOperatingHours = () => {
17
- var _props$chatConfig, _props$chatConfig$Liv, _props$chatConfig$Liv2;
18
- return ((_props$chatConfig = props.chatConfig) === null || _props$chatConfig === void 0 ? void 0 : (_props$chatConfig$Liv = _props$chatConfig.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig$Liv === void 0 ? void 0 : (_props$chatConfig$Liv2 = _props$chatConfig$Liv.OutOfOperatingHours) === null || _props$chatConfig$Liv2 === void 0 ? void 0 : _props$chatConfig$Liv2.toString().toLowerCase()) === "true";
17
+ var _props$chatConfig;
18
+ return ((_props$chatConfig = props.chatConfig) === null || _props$chatConfig === void 0 || (_props$chatConfig = _props$chatConfig.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig === void 0 || (_props$chatConfig = _props$chatConfig.OutOfOperatingHours) === null || _props$chatConfig === void 0 ? void 0 : _props$chatConfig.toString().toLowerCase()) === "true";
19
19
  };
20
20
  const widgetCacheId = (0, _utils.getWidgetCacheIdfromProps)(props);
21
- const cacheTtlInMins = (props === null || props === void 0 ? void 0 : (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.cacheTtlInMins) ?? _Constants.Constants.CacheTtlInMinutes;
21
+ const cacheTtlInMins = (props === null || props === void 0 || (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.cacheTtlInMins) ?? _Constants.Constants.CacheTtlInMinutes;
22
22
  const storageType = (props === null || props === void 0 ? void 0 : props.useSessionStorage) === true ? _Constants.StorageType.sessionStorage : _Constants.StorageType.localStorage;
23
23
  const initialState = (0, _defaultClientDataStoreProvider.defaultClientDataStoreProvider)(cacheTtlInMins, storageType).getData(widgetCacheId);
24
24
  if (!(0, _utils.isNullOrUndefined)(initialState)) {
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StartChatFailureType = void 0;
7
- let StartChatFailureType;
8
- exports.StartChatFailureType = StartChatFailureType;
9
- (function (StartChatFailureType) {
7
+ let StartChatFailureType = exports.StartChatFailureType = /*#__PURE__*/function (StartChatFailureType) {
10
8
  StartChatFailureType["Unauthorized"] = "unauthorized";
11
9
  StartChatFailureType["AuthSetupError"] = "authSetupError";
12
10
  StartChatFailureType["Generic"] = "generic";
13
- })(StartChatFailureType || (exports.StartChatFailureType = StartChatFailureType = {}));
11
+ return StartChatFailureType;
12
+ }({});
@@ -7,7 +7,7 @@ exports.shouldShowWebChatContainer = exports.shouldShowStartChatErrorPane = expo
7
7
  var _ConversationState = require("../contexts/common/ConversationState");
8
8
  const shouldShowChatButton = state => {
9
9
  var _state$appStates;
10
- return (state.appStates.isMinimized || state.appStates.conversationState === _ConversationState.ConversationState.Closed) && (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.hideStartChatButton) === false; // Do not show chat button in case of popout
10
+ return (state.appStates.isMinimized || state.appStates.conversationState === _ConversationState.ConversationState.Closed) && (state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.hideStartChatButton) === false; // Do not show chat button in case of popout
11
11
  };
12
12
  exports.shouldShowChatButton = shouldShowChatButton;
13
13
  const shouldShowProactiveChatPane = state => {
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ScenarioType = void 0;
7
- let ScenarioType;
8
- exports.ScenarioType = ScenarioType;
9
- (function (ScenarioType) {
7
+ let ScenarioType = exports.ScenarioType = /*#__PURE__*/function (ScenarioType) {
10
8
  ScenarioType["UserSendMessageStrategy"] = "UserSendMessageStrategy";
11
9
  ScenarioType["SystemMessageStrategy"] = "SystemMessageStrategy";
12
10
  ScenarioType["ReceivedMessageStrategy"] = "ReceivedMessageStrategy";
13
- })(ScenarioType || (exports.ScenarioType = ScenarioType = {}));
11
+ return ScenarioType;
12
+ }({});
@@ -8,13 +8,13 @@ var _TelemetryConstants = require("../common/telemetry/TelemetryConstants");
8
8
  var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
9
9
  var _TelemetryHelper = require("../common/telemetry/TelemetryHelper");
10
10
  var _Constants = require("../common/Constants");
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
- let FirstResponseLatencyTracker = /*#__PURE__*/function () {
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
+ let FirstResponseLatencyTracker = exports.FirstResponseLatencyTracker = /*#__PURE__*/function () {
18
18
  function FirstResponseLatencyTracker() {
19
19
  _classCallCheck(this, FirstResponseLatencyTracker);
20
20
  _defineProperty(this, "isABotConversation", false);
@@ -51,7 +51,7 @@ let FirstResponseLatencyTracker = /*#__PURE__*/function () {
51
51
  // we do have a mechanism in place to prevent log agent messages.
52
52
  this.isABotConversation = true;
53
53
  }
54
- _createClass(FirstResponseLatencyTracker, [{
54
+ return _createClass(FirstResponseLatencyTracker, [{
55
55
  key: "createTrackingMessage",
56
56
  value: function createTrackingMessage(payload, type) {
57
57
  return {
@@ -218,6 +218,4 @@ let FirstResponseLatencyTracker = /*#__PURE__*/function () {
218
218
  this.historyListener.unsubscribe();
219
219
  }
220
220
  }]);
221
- return FirstResponseLatencyTracker;
222
- }();
223
- exports.FirstResponseLatencyTracker = FirstResponseLatencyTracker;
221
+ }();
@@ -72,14 +72,14 @@ const buildMessagePayload = (activity, userId) => {
72
72
  return {
73
73
  // To identify hidden contents vs empty content
74
74
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
- text: (activity === null || activity === void 0 ? void 0 : (_text = activity.text) === null || _text === void 0 ? void 0 : _text.length) >= 1 ? `*contents hidden (${activity === null || activity === void 0 ? void 0 : (_text2 = activity.text) === null || _text2 === void 0 ? void 0 : _text2.length} chars)*` : "",
75
+ text: (activity === null || activity === void 0 || (_text = activity.text) === null || _text === void 0 ? void 0 : _text.length) >= 1 ? `*contents hidden (${activity === null || activity === void 0 || (_text2 = activity.text) === null || _text2 === void 0 ? void 0 : _text2.length} chars)*` : "",
76
76
  type: activity === null || activity === void 0 ? void 0 : activity.type,
77
77
  timestamp: activity === null || activity === void 0 ? void 0 : activity.timestamp,
78
78
  userId: userId,
79
- tags: (activity === null || activity === void 0 ? void 0 : (_activity$channelData2 = activity.channelData) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.tags) || [],
79
+ tags: (activity === null || activity === void 0 || (_activity$channelData2 = activity.channelData) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.tags) || [],
80
80
  messageType: "",
81
81
  Id: activity === null || activity === void 0 ? void 0 : activity.id,
82
- role: activity === null || activity === void 0 ? void 0 : (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role,
82
+ role: activity === null || activity === void 0 || (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role,
83
83
  isChatComplete: false
84
84
  };
85
85
  };
@@ -89,22 +89,22 @@ const polyfillMessagePayloadForEvent = (activity, payload, conversationId) => {
89
89
  return {
90
90
  ...payload,
91
91
  channelData: activity === null || activity === void 0 ? void 0 : activity.channelData,
92
- chatId: activity === null || activity === void 0 ? void 0 : (_activity$conversatio = activity.conversation) === null || _activity$conversatio === void 0 ? void 0 : _activity$conversatio.id,
92
+ chatId: activity === null || activity === void 0 || (_activity$conversatio = activity.conversation) === null || _activity$conversatio === void 0 ? void 0 : _activity$conversatio.id,
93
93
  conversationId: conversationId,
94
94
  Id: activity === null || activity === void 0 ? void 0 : activity.id,
95
95
  isChatComplete: false,
96
96
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
97
97
  text: activity === null || activity === void 0 ? void 0 : activity.text,
98
98
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
- attachment: (activity === null || activity === void 0 ? void 0 : (_attachments = activity.attachments) === null || _attachments === void 0 ? void 0 : _attachments.length) >= 1 ? activity === null || activity === void 0 ? void 0 : activity.attachments : [],
100
- role: activity === null || activity === void 0 ? void 0 : (_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role
99
+ attachment: (activity === null || activity === void 0 || (_attachments = activity.attachments) === null || _attachments === void 0 ? void 0 : _attachments.length) >= 1 ? activity === null || activity === void 0 ? void 0 : activity.attachments : [],
100
+ role: activity === null || activity === void 0 || (_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role
101
101
  };
102
102
  };
103
103
  exports.polyfillMessagePayloadForEvent = polyfillMessagePayloadForEvent;
104
104
  const getScenarioType = activity => {
105
105
  var _activity$from3, _activity$channelData3;
106
- const role = activity === null || activity === void 0 ? void 0 : (_activity$from3 = activity.from) === null || _activity$from3 === void 0 ? void 0 : _activity$from3.role;
107
- const tags = activity === null || activity === void 0 ? void 0 : (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.tags;
106
+ const role = activity === null || activity === void 0 || (_activity$from3 = activity.from) === null || _activity$from3 === void 0 ? void 0 : _activity$from3.role;
107
+ const tags = activity === null || activity === void 0 || (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.tags;
108
108
  if (role === _Constants2.Constants.userMessageTag) {
109
109
  return _Constants.ScenarioType.UserSendMessageStrategy;
110
110
  }
@@ -14,5 +14,4 @@ const useChatAdapterStore = () => {
14
14
  }
15
15
  return adapter;
16
16
  };
17
- var _default = useChatAdapterStore;
18
- exports.default = _default;
17
+ var _default = exports.default = useChatAdapterStore;
@@ -13,5 +13,4 @@ const useChatContextStore = () => {
13
13
  }
14
14
  return context;
15
15
  };
16
- var _default = useChatContextStore;
17
- exports.default = _default;
16
+ var _default = exports.default = useChatContextStore;
@@ -13,5 +13,4 @@ const useChatSDKStore = () => {
13
13
  }
14
14
  return sdk;
15
15
  };
16
- var _default = useChatSDKStore;
17
- exports.default = _default;
16
+ var _default = exports.default = useChatSDKStore;
@@ -13,5 +13,4 @@ const useFacadeChatSDKStore = () => {
13
13
  }
14
14
  return facadeChatSDK;
15
15
  };
16
- var _default = useFacadeChatSDKStore;
17
- exports.default = _default;
16
+ var _default = exports.default = useFacadeChatSDKStore;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = useWindowDimensions;
7
7
  var _react = require("react");
8
8
  var _useDebounce = _interopRequireDefault(require("./useDebounce"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  function getWindowDimensions() {
11
11
  const {
12
12
  innerWidth: width,
package/lib/cjs/index.js CHANGED
@@ -110,4 +110,4 @@ Object.keys(_renderingmiddlewares).forEach(function (key) {
110
110
  }
111
111
  });
112
112
  });
113
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
113
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }