@microsoft/omnichannel-chat-widget 1.8.5-0 → 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
@@ -59,13 +59,12 @@ var _useChatAdapterStore = _interopRequireDefault(require("../../../hooks/useCha
59
59
  var _useChatContextStore = _interopRequireDefault(require("../../../hooks/useChatContextStore"));
60
60
  var _useFacadeChatSDKStore = _interopRequireDefault(require("../../../hooks/useFacadeChatSDKStore"));
61
61
  var _renderSurveyHelpers = require("../common/renderSurveyHelpers");
62
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
64
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
65
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
62
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
63
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
64
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
66
65
  let uiTimer;
67
66
  const LiveChatWidgetStateful = props => {
68
- var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$webChatContain6, _props$webChatContain7, _props$webChatContain8, _props$webChatContain9, _props$styleProps, _props$webChatContain10, _props$webChatContain11, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain15, _state$appStates8, _props$webChatContain17, _props$webChatContain18, _props$controlProps12, _props$draggableChatW, _props$draggableChatW2, _props$draggableChatW3, _props$draggableChatW4, _props$draggableChatW5, _livechatProps$webCha, _livechatProps$styleP, _livechatProps$contro, _livechatProps$contro2, _livechatProps$compon, _livechatProps$contro3, _livechatProps$compon2, _livechatProps$contro4, _livechatProps$compon3, _livechatProps$contro5, _livechatProps$compon4, _livechatProps$contro6, _livechatProps$compon5, _livechatProps$contro7, _livechatProps$compon6, _livechatProps$contro8, _livechatProps$compon7, _livechatProps$contro9, _livechatProps$compon8, _livechatProps$contro10, _livechatProps$contro11, _livechatProps$compon9, _livechatProps$contro12, _livechatProps$compon10, _livechatProps$contro13, _livechatProps$compon11, _livechatProps$compon12, _livechatProps$compon13;
67
+ var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$styleProps, _props$webChatContain6, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain9, _state$appStates8, _props$webChatContain1, _props$webChatContain10, _props$controlProps10, _props$draggableChatW, _props$draggableChatW2, _props$draggableChatW3, _props$draggableChatW4, _props$draggableChatW5, _livechatProps$webCha, _livechatProps$styleP, _livechatProps$contro, _livechatProps$contro2, _livechatProps$compon, _livechatProps$contro3, _livechatProps$compon2, _livechatProps$contro4, _livechatProps$compon3, _livechatProps$contro5, _livechatProps$compon4, _livechatProps$contro6, _livechatProps$compon5, _livechatProps$contro7, _livechatProps$compon6, _livechatProps$contro8, _livechatProps$compon7, _livechatProps$contro9, _livechatProps$compon8, _livechatProps$contro0, _livechatProps$contro1, _livechatProps$compon9, _livechatProps$contro10, _livechatProps$compon0, _livechatProps$contro11, _livechatProps$compon1, _livechatProps$compon10, _livechatProps$compon11;
69
68
  (0, _react2.useEffect)(() => {
70
69
  uiTimer = (0, _utils.createTimer)();
71
70
  _TelemetryHelper.TelemetryHelper.logLoadingEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
@@ -92,8 +91,8 @@ const LiveChatWidgetStateful = props => {
92
91
  Composer
93
92
  } = _botframeworkWebchat.Components;
94
93
  const canStartProactiveChat = (0, _react2.useRef)(true);
95
- const bubbleBackground = ((_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 ? void 0 : (_props$webChatContain3 = _props$webChatContain2.webChatStyles) === null || _props$webChatContain3 === void 0 ? void 0 : _props$webChatContain3.bubbleBackground) ?? ((_props$webChatContain4 = props.webChatContainerProps) === null || _props$webChatContain4 === void 0 ? void 0 : (_props$webChatContain5 = _props$webChatContain4.adaptiveCardStyles) === null || _props$webChatContain5 === void 0 ? void 0 : _props$webChatContain5.background) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.background;
96
- const bubbleTextColor = ((_props$webChatContain6 = props.webChatContainerProps) === null || _props$webChatContain6 === void 0 ? void 0 : (_props$webChatContain7 = _props$webChatContain6.webChatStyles) === null || _props$webChatContain7 === void 0 ? void 0 : _props$webChatContain7.bubbleTextColor) ?? ((_props$webChatContain8 = props.webChatContainerProps) === null || _props$webChatContain8 === void 0 ? void 0 : (_props$webChatContain9 = _props$webChatContain8.adaptiveCardStyles) === null || _props$webChatContain9 === void 0 ? void 0 : _props$webChatContain9.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color;
94
+ const bubbleBackground = ((_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 || (_props$webChatContain2 = _props$webChatContain2.webChatStyles) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.bubbleBackground) ?? ((_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 || (_props$webChatContain3 = _props$webChatContain3.adaptiveCardStyles) === null || _props$webChatContain3 === void 0 ? void 0 : _props$webChatContain3.background) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.background;
95
+ const bubbleTextColor = ((_props$webChatContain4 = props.webChatContainerProps) === null || _props$webChatContain4 === void 0 || (_props$webChatContain4 = _props$webChatContain4.webChatStyles) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.bubbleTextColor) ?? ((_props$webChatContain5 = props.webChatContainerProps) === null || _props$webChatContain5 === void 0 || (_props$webChatContain5 = _props$webChatContain5.adaptiveCardStyles) === null || _props$webChatContain5 === void 0 ? void 0 : _props$webChatContain5.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color;
97
96
 
98
97
  // Process general styles
99
98
  const generalStyles = {
@@ -102,12 +101,12 @@ const LiveChatWidgetStateful = props => {
102
101
 
103
102
  //Scrollbar styles
104
103
  const scrollbarProps = Object.assign({}, _defaultScrollBarProps.defaultScrollBarProps, props === null || props === void 0 ? void 0 : props.scrollBarProps);
105
- const sendBoxTextArea = props === null || props === void 0 ? void 0 : (_props$webChatContain10 = props.webChatContainerProps) === null || _props$webChatContain10 === void 0 ? void 0 : (_props$webChatContain11 = _props$webChatContain10.sendBoxTextBox) === null || _props$webChatContain11 === void 0 ? void 0 : _props$webChatContain11.textarea;
104
+ const sendBoxTextArea = props === null || props === void 0 || (_props$webChatContain6 = props.webChatContainerProps) === null || _props$webChatContain6 === void 0 || (_props$webChatContain6 = _props$webChatContain6.sendBoxTextBox) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.textarea;
106
105
 
107
106
  // In case the broadcast channel is already initialized elsewhere; One tab can only hold 1 instance
108
- if ((props === null || props === void 0 ? void 0 : (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.skipBroadcastChannelInit) !== true) {
109
- var _facadeChatSDK$getCha, _facadeChatSDK$getCha2, _props$controlProps2;
110
- const broadcastServiceChannelName = (0, _utils.getBroadcastChannelName)((_facadeChatSDK$getCha = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha === void 0 ? void 0 : (_facadeChatSDK$getCha2 = _facadeChatSDK$getCha.omnichannelConfig) === null || _facadeChatSDK$getCha2 === void 0 ? void 0 : _facadeChatSDK$getCha2.widgetId, ((_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.widgetInstanceId) ?? "");
107
+ if ((props === null || props === void 0 || (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.skipBroadcastChannelInit) !== true) {
108
+ var _facadeChatSDK$getCha, _props$controlProps2;
109
+ const broadcastServiceChannelName = (0, _utils.getBroadcastChannelName)((_facadeChatSDK$getCha = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha === void 0 || (_facadeChatSDK$getCha = _facadeChatSDK$getCha.omnichannelConfig) === null || _facadeChatSDK$getCha === void 0 ? void 0 : _facadeChatSDK$getCha.widgetId, ((_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.widgetInstanceId) ?? "");
111
110
  (0, _omnichannelChatComponents.BroadcastServiceInitialize)(broadcastServiceChannelName);
112
111
  }
113
112
  _TelemetryManager.TelemetryTimers.LcwLoadToChatButtonTimer = (0, _utils.createTimer)();
@@ -124,13 +123,13 @@ const LiveChatWidgetStateful = props => {
124
123
  var _state$appStates2;
125
124
  activeCachedChatExist = true;
126
125
  optionalParams = {
127
- reconnectId: state === null || state === void 0 ? void 0 : (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.reconnectId
126
+ reconnectId: state === null || state === void 0 || (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.reconnectId
128
127
  };
129
- } else if (!(0, _utils.isUndefinedOrEmpty)(state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.liveChatContext) && (state === null || state === void 0 ? void 0 : (_state$appStates3 = state.appStates) === null || _state$appStates3 === void 0 ? void 0 : _state$appStates3.conversationState) === _ConversationState.ConversationState.Active) {
128
+ } else if (!(0, _utils.isUndefinedOrEmpty)(state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.liveChatContext) && (state === null || state === void 0 || (_state$appStates3 = state.appStates) === null || _state$appStates3 === void 0 ? void 0 : _state$appStates3.conversationState) === _ConversationState.ConversationState.Active) {
130
129
  var _state$domainStates2;
131
130
  activeCachedChatExist = true;
132
131
  optionalParams = {
133
- liveChatContext: state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
132
+ liveChatContext: state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
134
133
  };
135
134
  } else {
136
135
  activeCachedChatExist = false;
@@ -193,7 +192,7 @@ const LiveChatWidgetStateful = props => {
193
192
  } else {
194
193
  var _state$appStates4;
195
194
  // To avoid showing blank screen in popout
196
- if ((state === null || state === void 0 ? void 0 : (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.hideStartChatButton) === false) {
195
+ if ((state === null || state === void 0 || (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.hideStartChatButton) === false) {
197
196
  dispatch({
198
197
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
199
198
  payload: _ConversationState.ConversationState.Closed
@@ -214,7 +213,7 @@ const LiveChatWidgetStateful = props => {
214
213
  const widgetCacheId = (0, _utils.getWidgetCacheIdfromProps)(props);
215
214
  if (props.contextDataStore === undefined) {
216
215
  var _props$controlProps4;
217
- const cacheTtlInMins = (props === null || props === void 0 ? void 0 : (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.cacheTtlInMins) ?? _Constants.Constants.CacheTtlInMinutes;
216
+ const cacheTtlInMins = (props === null || props === void 0 || (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.cacheTtlInMins) ?? _Constants.Constants.CacheTtlInMinutes;
218
217
  const storageType = (props === null || props === void 0 ? void 0 : props.useSessionStorage) === true ? _Constants.StorageType.sessionStorage : _Constants.StorageType.localStorage;
219
218
  _DataStoreManager.DataStoreManager.clientDataStore = (0, _defaultClientDataStoreProvider.defaultClientDataStoreProvider)(cacheTtlInMins, storageType);
220
219
  (0, _defaultCacheManager.registerBroadcastServiceForStorage)(widgetCacheId, cacheTtlInMins, storageType);
@@ -223,7 +222,7 @@ const LiveChatWidgetStateful = props => {
223
222
  }
224
223
  };
225
224
  (0, _react2.useEffect)(() => {
226
- var _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$chatConfig, _props$chatConfig$Liv, _props$controlProps9, _props$chatConfig2, _props$chatConfig2$Ch, _state$appStates5;
225
+ var _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$chatConfig, _props$controlProps9, _props$chatConfig2, _state$appStates5;
227
226
  dispatch({
228
227
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_START_CHAT_FAILING,
229
228
  payload: false
@@ -255,7 +254,7 @@ const LiveChatWidgetStateful = props => {
255
254
  payload: (_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.widgetInstanceId
256
255
  });
257
256
  }
258
- if (((_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$Liv.msdyn_callingoptions) !== _Constants.E2VVOptions.NoCalling) {
257
+ if (((_props$chatConfig = props.chatConfig) === null || _props$chatConfig === void 0 || (_props$chatConfig = _props$chatConfig.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig === void 0 ? void 0 : _props$chatConfig.msdyn_callingoptions) !== _Constants.E2VVOptions.NoCalling) {
259
258
  (0, _initCallingSdk.initCallingSdk)(facadeChatSDK, setVoiceVideoCallingSDK).then(sdkCreated => {
260
259
  sdkCreated && dispatch({
261
260
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_E2VV_ENABLED,
@@ -271,7 +270,7 @@ const LiveChatWidgetStateful = props => {
271
270
  }
272
271
 
273
272
  // Initialize global dir
274
- const globalDir = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.dir) ?? (0, _utils.getLocaleDirection)((_props$chatConfig2 = props.chatConfig) === null || _props$chatConfig2 === void 0 ? void 0 : (_props$chatConfig2$Ch = _props$chatConfig2.ChatWidgetLanguage) === null || _props$chatConfig2$Ch === void 0 ? void 0 : _props$chatConfig2$Ch.msdyn_localeid);
273
+ const globalDir = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.dir) ?? (0, _utils.getLocaleDirection)((_props$chatConfig2 = props.chatConfig) === null || _props$chatConfig2 === void 0 || (_props$chatConfig2 = _props$chatConfig2.ChatWidgetLanguage) === null || _props$chatConfig2 === void 0 ? void 0 : _props$chatConfig2.msdyn_localeid);
275
274
  dispatch({
276
275
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_GLOBAL_DIR,
277
276
  payload: globalDir
@@ -279,7 +278,7 @@ const LiveChatWidgetStateful = props => {
279
278
  setOptionalParams();
280
279
 
281
280
  // Unauth chat
282
- if ((state === null || state === void 0 ? void 0 : (_state$appStates5 = state.appStates) === null || _state$appStates5 === void 0 ? void 0 : _state$appStates5.hideStartChatButton) === false) {
281
+ if ((state === null || state === void 0 || (_state$appStates5 = state.appStates) === null || _state$appStates5 === void 0 ? void 0 : _state$appStates5.hideStartChatButton) === false) {
283
282
  startChat(props);
284
283
  }
285
284
  }, []);
@@ -287,7 +286,7 @@ const LiveChatWidgetStateful = props => {
287
286
  // useEffect for when skip chat button rendering
288
287
  (0, _react2.useEffect)(() => {
289
288
  var _state$appStates6;
290
- if ((state === null || state === void 0 ? void 0 : (_state$appStates6 = state.appStates) === null || _state$appStates6 === void 0 ? void 0 : _state$appStates6.hideStartChatButton) === true) {
289
+ if ((state === null || state === void 0 || (_state$appStates6 = state.appStates) === null || _state$appStates6 === void 0 ? void 0 : _state$appStates6.hideStartChatButton) === true) {
291
290
  //handle OOH pane
292
291
  // Only set OutOfOffice state for new conversations, allow existing Active/InActive conversations to continue
293
292
  if (state.appStates.outsideOperatingHours === true && state.appStates.conversationState !== _ConversationState.ConversationState.Active) {
@@ -309,11 +308,11 @@ const LiveChatWidgetStateful = props => {
309
308
  //Pass the state to avoid getting stale state
310
309
  startChat(props, state);
311
310
  }
312
- }, [state === null || state === void 0 ? void 0 : (_state$appStates7 = state.appStates) === null || _state$appStates7 === void 0 ? void 0 : _state$appStates7.hideStartChatButton]);
311
+ }, [state === null || state === void 0 || (_state$appStates7 = state.appStates) === null || _state$appStates7 === void 0 ? void 0 : _state$appStates7.hideStartChatButton]);
313
312
 
314
313
  // useEffect for custom context
315
314
  (0, _react2.useEffect)(() => {
316
- var _facadeChatSDK$getCha3, _facadeChatSDK$getCha4, _facadeChatSDK$getCha5, _facadeChatSDK$getCha6, _props$controlProps11;
315
+ var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3, _props$controlProps1;
317
316
  // Add the custom context on receiving the SetCustomContext event
318
317
  _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.SetCustomContext).subscribe(msg => {
319
318
  _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
@@ -332,7 +331,7 @@ const LiveChatWidgetStateful = props => {
332
331
  });
333
332
  if (canStartProactiveChat.current === true) {
334
333
  var _msg$payload, _msg$payload2, _msg$payload3;
335
- (0, _startProactiveChat.startProactiveChat)(dispatch, msg === null || msg === void 0 ? void 0 : (_msg$payload = msg.payload) === null || _msg$payload === void 0 ? void 0 : _msg$payload.notificationConfig, msg === null || msg === void 0 ? void 0 : (_msg$payload2 = msg.payload) === null || _msg$payload2 === void 0 ? void 0 : _msg$payload2.enablePreChat, msg === null || msg === void 0 ? void 0 : (_msg$payload3 = msg.payload) === null || _msg$payload3 === void 0 ? void 0 : _msg$payload3.inNewWindow);
334
+ (0, _startProactiveChat.startProactiveChat)(dispatch, msg === null || msg === void 0 || (_msg$payload = msg.payload) === null || _msg$payload === void 0 ? void 0 : _msg$payload.notificationConfig, msg === null || msg === void 0 || (_msg$payload2 = msg.payload) === null || _msg$payload2 === void 0 ? void 0 : _msg$payload2.enablePreChat, msg === null || msg === void 0 || (_msg$payload3 = msg.payload) === null || _msg$payload3 === void 0 ? void 0 : _msg$payload3.inNewWindow);
336
335
  } else {
337
336
  _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
338
337
  Event: _TelemetryConstants.TelemetryEvent.ChatAlreadyTriggered,
@@ -345,17 +344,17 @@ const LiveChatWidgetStateful = props => {
345
344
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
346
345
  _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.HideChatVisibilityChangeEvent).subscribe(async event => {
347
346
  var _event$payload;
348
- if ((event === null || event === void 0 ? void 0 : (_event$payload = event.payload) === null || _event$payload === void 0 ? void 0 : _event$payload.isChatHidden) !== undefined) {
349
- var _props$controlProps10, _window, _window$location;
350
- if ((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideStartChatButton) {
347
+ if ((event === null || event === void 0 || (_event$payload = event.payload) === null || _event$payload === void 0 ? void 0 : _event$payload.isChatHidden) !== undefined) {
348
+ var _props$controlProps0, _window;
349
+ if ((_props$controlProps0 = props.controlProps) !== null && _props$controlProps0 !== void 0 && _props$controlProps0.hideStartChatButton) {
351
350
  var _event$payload2;
352
351
  dispatch({
353
352
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_MINIMIZED,
354
- payload: event === null || event === void 0 ? void 0 : (_event$payload2 = event.payload) === null || _event$payload2 === void 0 ? void 0 : _event$payload2.isChatHidden
353
+ payload: event === null || event === void 0 || (_event$payload2 = event.payload) === null || _event$payload2 === void 0 ? void 0 : _event$payload2.isChatHidden
355
354
  });
356
355
  }
357
356
  const dateNow = Date.now();
358
- if ((0, _utils.isThisSessionPopout)((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.href)) {
357
+ if ((0, _utils.isThisSessionPopout)((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.href)) {
359
358
  return;
360
359
  }
361
360
 
@@ -382,12 +381,12 @@ const LiveChatWidgetStateful = props => {
382
381
  }
383
382
  });
384
383
  _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.NetworkReconnected).subscribe(async () => {
385
- var _window2, _window2$location, _inMemoryState$appSta;
384
+ var _window2, _inMemoryState$appSta;
386
385
  const inMemoryState = (0, _createReducer.executeReducer)(state, {
387
386
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
388
387
  payload: null
389
388
  });
390
- if ((0, _utils.isThisSessionPopout)((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href) || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta = inMemoryState.appStates) === null || _inMemoryState$appSta === void 0 ? void 0 : _inMemoryState$appSta.conversationState) !== _ConversationState.ConversationState.Active) {
389
+ if ((0, _utils.isThisSessionPopout)((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.location) === null || _window2 === void 0 ? void 0 : _window2.href) || (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta = inMemoryState.appStates) === null || _inMemoryState$appSta === void 0 ? void 0 : _inMemoryState$appSta.conversationState) !== _ConversationState.ConversationState.Active) {
391
390
  return;
392
391
  }
393
392
  const conversationDetails = await (0, _utils.getConversationDetailsCall)(facadeChatSDK);
@@ -418,7 +417,7 @@ const LiveChatWidgetStateful = props => {
418
417
  var _msg$payload4;
419
418
  dispatch({
420
419
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_MINIMIZED,
421
- payload: msg === null || msg === void 0 ? void 0 : (_msg$payload4 = msg.payload) === null || _msg$payload4 === void 0 ? void 0 : _msg$payload4.minimized
420
+ payload: msg === null || msg === void 0 || (_msg$payload4 = msg.payload) === null || _msg$payload4 === void 0 ? void 0 : _msg$payload4.minimized
422
421
  });
423
422
  });
424
423
 
@@ -438,7 +437,7 @@ const LiveChatWidgetStateful = props => {
438
437
  return;
439
438
  }
440
439
  // If the startChat event is not initiated by the same tab. Ignore the call
441
- if (!(0, _utils.isNullOrUndefined)(msg === null || msg === void 0 ? void 0 : (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.runtimeId) && (msg === null || msg === void 0 ? void 0 : (_msg$payload6 = msg.payload) === null || _msg$payload6 === void 0 ? void 0 : _msg$payload6.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
440
+ if (!(0, _utils.isNullOrUndefined)(msg === null || msg === void 0 || (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.runtimeId) && (msg === null || msg === void 0 || (_msg$payload6 = msg.payload) === null || _msg$payload6 === void 0 ? void 0 : _msg$payload6.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
442
441
  return;
443
442
  }
444
443
  if (msg !== null && msg !== void 0 && (_msg$payload7 = msg.payload) !== null && _msg$payload7 !== void 0 && _msg$payload7.customContext) {
@@ -449,7 +448,7 @@ const LiveChatWidgetStateful = props => {
449
448
  });
450
449
  dispatch({
451
450
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CUSTOM_CONTEXT,
452
- payload: msg === null || msg === void 0 ? void 0 : (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
451
+ payload: msg === null || msg === void 0 || (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
453
452
  });
454
453
  }
455
454
  _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
@@ -460,7 +459,7 @@ const LiveChatWidgetStateful = props => {
460
459
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
461
460
  payload: null
462
461
  });
463
- inMemoryState.domainStates.customContext = msg === null || msg === void 0 ? void 0 : (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.customContext;
462
+ inMemoryState.domainStates.customContext = msg === null || msg === void 0 || (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.customContext;
464
463
  /*
465
464
  * If the conversation is in closed state then we start a new chat,
466
465
  * else if the conversation is in active state then we maximize the chat
@@ -482,8 +481,8 @@ const LiveChatWidgetStateful = props => {
482
481
  }
483
482
 
484
483
  // If minimized, maximize the chat
485
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta3 = inMemoryState.appStates) === null || _inMemoryState$appSta3 === void 0 ? void 0 : _inMemoryState$appSta3.isMinimized) === true || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta4 = inMemoryState.appStates) === null || _inMemoryState$appSta4 === void 0 ? void 0 : _inMemoryState$appSta4.isMinimized) === undefined) {
486
- var _inMemoryState$domain, _inMemoryState$domain2, _inMemoryState$domain3, _inMemoryState$domain4;
484
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta3 = inMemoryState.appStates) === null || _inMemoryState$appSta3 === void 0 ? void 0 : _inMemoryState$appSta3.isMinimized) === true || (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta4 = inMemoryState.appStates) === null || _inMemoryState$appSta4 === void 0 ? void 0 : _inMemoryState$appSta4.isMinimized) === undefined) {
485
+ var _inMemoryState$domain, _inMemoryState$domain2;
487
486
  dispatch({
488
487
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_MINIMIZED,
489
488
  payload: false
@@ -491,8 +490,8 @@ const LiveChatWidgetStateful = props => {
491
490
  _omnichannelChatComponents.BroadcastService.postMessage({
492
491
  eventName: _TelemetryConstants.BroadcastEvent.MaximizeChat,
493
492
  payload: {
494
- height: inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$domain = inMemoryState.domainStates) === null || _inMemoryState$domain === void 0 ? void 0 : (_inMemoryState$domain2 = _inMemoryState$domain.widgetSize) === null || _inMemoryState$domain2 === void 0 ? void 0 : _inMemoryState$domain2.height,
495
- width: inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$domain3 = inMemoryState.domainStates) === null || _inMemoryState$domain3 === void 0 ? void 0 : (_inMemoryState$domain4 = _inMemoryState$domain3.widgetSize) === null || _inMemoryState$domain4 === void 0 ? void 0 : _inMemoryState$domain4.width,
493
+ height: inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$domain = inMemoryState.domainStates) === null || _inMemoryState$domain === void 0 || (_inMemoryState$domain = _inMemoryState$domain.widgetSize) === null || _inMemoryState$domain === void 0 ? void 0 : _inMemoryState$domain.height,
494
+ width: inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$domain2 = inMemoryState.domainStates) === null || _inMemoryState$domain2 === void 0 || (_inMemoryState$domain2 = _inMemoryState$domain2.widgetSize) === null || _inMemoryState$domain2 === void 0 ? void 0 : _inMemoryState$domain2.width,
496
495
  lcwRuntimeId: _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId
497
496
  }
498
497
  });
@@ -500,9 +499,9 @@ const LiveChatWidgetStateful = props => {
500
499
  }
501
500
  });
502
501
  const handleInitiateEndChatForPersistentChat = async (msg, conversationDetails) => {
503
- var _msg$payload10, _msg$payload11, _msg$payload12;
502
+ var _msg$payload0, _msg$payload1, _msg$payload10;
504
503
  //If the payload does NOT include the skipSessionCloseForPersistentChat flag, default is false. Upon receiving the customer event, always ending session from C2.
505
- const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 ? void 0 : (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === _Constants.Constants.String && (msg === null || msg === void 0 ? void 0 : (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === _Constants.Constants.true || (msg === null || msg === void 0 ? void 0 : (_msg$payload12 = msg.payload) === null || _msg$payload12 === void 0 ? void 0 : _msg$payload12[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === true;
504
+ const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 || (_msg$payload0 = msg.payload) === null || _msg$payload0 === void 0 ? void 0 : _msg$payload0[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === _Constants.Constants.String && (msg === null || msg === void 0 || (_msg$payload1 = msg.payload) === null || _msg$payload1 === void 0 ? void 0 : _msg$payload1[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === _Constants.Constants.true || (msg === null || msg === void 0 || (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === true;
506
505
  _TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
507
506
  Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
508
507
  Description: "Processing initiateEndChat for persistent chat",
@@ -520,7 +519,7 @@ const LiveChatWidgetStateful = props => {
520
519
  Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
521
520
  Description: "Processing initiateEndChat, fetching postChatContext"
522
521
  });
523
- const postchatContext = (await (0, _renderSurveyHelpers.getPostChatContext)(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0 ? void 0 : (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.postChatContext);
522
+ const postchatContext = (await (0, _renderSurveyHelpers.getPostChatContext)(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.postChatContext);
524
523
  if (postchatContext) {
525
524
  _TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
526
525
  Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
@@ -613,10 +612,10 @@ const LiveChatWidgetStateful = props => {
613
612
  });
614
613
 
615
614
  // Listen to end chat event from other tabs
616
- const endChatEventName = (0, _utils.getWidgetEndChatEventName)((_facadeChatSDK$getCha3 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : (_facadeChatSDK$getCha4 = _facadeChatSDK$getCha3.omnichannelConfig) === null || _facadeChatSDK$getCha4 === void 0 ? void 0 : _facadeChatSDK$getCha4.orgId, (_facadeChatSDK$getCha5 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha5 === void 0 ? void 0 : (_facadeChatSDK$getCha6 = _facadeChatSDK$getCha5.omnichannelConfig) === null || _facadeChatSDK$getCha6 === void 0 ? void 0 : _facadeChatSDK$getCha6.widgetId, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.widgetInstanceId) ?? "");
615
+ const endChatEventName = (0, _utils.getWidgetEndChatEventName)((_facadeChatSDK$getCha2 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha2 === void 0 || (_facadeChatSDK$getCha2 = _facadeChatSDK$getCha2.omnichannelConfig) === null || _facadeChatSDK$getCha2 === void 0 ? void 0 : _facadeChatSDK$getCha2.orgId, (_facadeChatSDK$getCha3 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha3 === void 0 || (_facadeChatSDK$getCha3 = _facadeChatSDK$getCha3.omnichannelConfig) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : _facadeChatSDK$getCha3.widgetId, ((_props$controlProps1 = props.controlProps) === null || _props$controlProps1 === void 0 ? void 0 : _props$controlProps1.widgetInstanceId) ?? "");
617
616
  _omnichannelChatComponents.BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
618
- var _msg$payload13;
619
- if ((msg === null || msg === void 0 ? void 0 : (_msg$payload13 = msg.payload) === null || _msg$payload13 === void 0 ? void 0 : _msg$payload13.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
617
+ var _msg$payload11;
618
+ if ((msg === null || msg === void 0 || (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
620
619
  _TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
621
620
  Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
622
621
  Description: "Received EndChat BroadcastEvent from other tabs. Closing this chat."
@@ -658,8 +657,8 @@ const LiveChatWidgetStateful = props => {
658
657
 
659
658
  // Retrieve convId
660
659
  _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.UpdateConversationDataForTelemetry).subscribe(msg => {
661
- var _msg$payload14, _msg$payload14$liveWo;
662
- if ((_msg$payload14 = msg.payload) !== null && _msg$payload14 !== void 0 && (_msg$payload14$liveWo = _msg$payload14.liveWorkItem) !== null && _msg$payload14$liveWo !== void 0 && _msg$payload14$liveWo.conversationId) {
660
+ var _msg$payload12;
661
+ if ((_msg$payload12 = msg.payload) !== null && _msg$payload12 !== void 0 && (_msg$payload12 = _msg$payload12.liveWorkItem) !== null && _msg$payload12 !== void 0 && _msg$payload12.conversationId) {
663
662
  setConversationId(msg.payload.liveWorkItem.conversationId);
664
663
  }
665
664
  });
@@ -676,7 +675,7 @@ const LiveChatWidgetStateful = props => {
676
675
  (0, _react2.useEffect)(() => {
677
676
  // On new message
678
677
  if (state.appStates.conversationState === _ConversationState.ConversationState.Active) {
679
- facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.onNewMessage(() => {
678
+ facadeChatSDK === null || facadeChatSDK === void 0 || facadeChatSDK.onNewMessage(() => {
680
679
  // Track the message count
681
680
  currentMessageCountRef.current++;
682
681
  dispatch({
@@ -691,15 +690,15 @@ const LiveChatWidgetStateful = props => {
691
690
  }, {
692
691
  disablePolling: true
693
692
  });
694
- facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.onAgentEndSession(event => {
693
+ facadeChatSDK === null || facadeChatSDK === void 0 || facadeChatSDK.onAgentEndSession(event => {
695
694
  var _inMemoryState$appSta5;
696
695
  const inMemoryState = (0, _createReducer.executeReducer)(state, {
697
696
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
698
697
  payload: null
699
698
  });
700
- if ("participantsRemoved" in event && (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta5 = inMemoryState.appStates) === null || _inMemoryState$appSta5 === void 0 ? void 0 : _inMemoryState$appSta5.conversationState) === _ConversationState.ConversationState.Active) {
699
+ if ("participantsRemoved" in event && (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta5 = inMemoryState.appStates) === null || _inMemoryState$appSta5 === void 0 ? void 0 : _inMemoryState$appSta5.conversationState) === _ConversationState.ConversationState.Active) {
701
700
  var _inMemoryState$appSta6;
702
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta6 = inMemoryState.appStates) === null || _inMemoryState$appSta6 === void 0 ? void 0 : _inMemoryState$appSta6.isConversationalSurveyEnabled) === false) {
701
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta6 = inMemoryState.appStates) === null || _inMemoryState$appSta6 === void 0 ? void 0 : _inMemoryState$appSta6.isConversationalSurveyEnabled) === false) {
703
702
  setWebChatStyles(styles => {
704
703
  return {
705
704
  ...styles,
@@ -716,8 +715,8 @@ const LiveChatWidgetStateful = props => {
716
715
  });
717
716
  }
718
717
  if (state.appStates.conversationState === _ConversationState.ConversationState.InActive) {
719
- var _props$webChatContain12, _props$webChatContain13;
720
- if ((props === null || props === void 0 ? void 0 : (_props$webChatContain12 = props.webChatContainerProps) === null || _props$webChatContain12 === void 0 ? void 0 : (_props$webChatContain13 = _props$webChatContain12.renderingMiddlewareProps) === null || _props$webChatContain13 === void 0 ? void 0 : _props$webChatContain13.hideSendboxOnConversationEnd) !== false) {
718
+ var _props$webChatContain7;
719
+ if ((props === null || props === void 0 || (_props$webChatContain7 = props.webChatContainerProps) === null || _props$webChatContain7 === void 0 || (_props$webChatContain7 = _props$webChatContain7.renderingMiddlewareProps) === null || _props$webChatContain7 === void 0 ? void 0 : _props$webChatContain7.hideSendboxOnConversationEnd) !== false) {
721
720
  setWebChatStyles(styles => {
722
721
  return {
723
722
  ...styles,
@@ -761,12 +760,12 @@ const LiveChatWidgetStateful = props => {
761
760
  }
762
761
  }, [state.appStates.unreadMessageCount]);
763
762
  (0, _react2.useEffect)(() => {
764
- var _props$webChatContain14;
763
+ var _props$webChatContain8;
765
764
  setWebChatStyles({
766
765
  ...webChatStyles,
767
- ...((_props$webChatContain14 = props.webChatContainerProps) === null || _props$webChatContain14 === void 0 ? void 0 : _props$webChatContain14.webChatStyles)
766
+ ...((_props$webChatContain8 = props.webChatContainerProps) === null || _props$webChatContain8 === void 0 ? void 0 : _props$webChatContain8.webChatStyles)
768
767
  });
769
- }, [(_props$webChatContain15 = props.webChatContainerProps) === null || _props$webChatContain15 === void 0 ? void 0 : _props$webChatContain15.webChatStyles]);
768
+ }, [(_props$webChatContain9 = props.webChatContainerProps) === null || _props$webChatContain9 === void 0 ? void 0 : _props$webChatContain9.webChatStyles]);
770
769
  (0, _react2.useEffect)(() => {
771
770
  //Confirmation pane dismissing through OK option, so proceed with end chat
772
771
  if (state.domainStates.confirmationState === _Constants.ConfirmationState.Ok) {
@@ -777,13 +776,13 @@ const LiveChatWidgetStateful = props => {
777
776
  }
778
777
  }, [state.domainStates.confirmationState]);
779
778
  (0, _react2.useEffect)(() => {
780
- var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta10, _inMemoryState$appSta11, _inMemoryState$appSta12, _inMemoryState$appSta13;
779
+ var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta0, _inMemoryState$appSta1, _inMemoryState$appSta10, _inMemoryState$appSta11;
781
780
  const inMemoryState = (0, _createReducer.executeReducer)(state, {
782
781
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
783
782
  payload: null
784
783
  });
785
784
  // Do not process anything during initialization
786
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === _Constants.ConversationEndEntity.NotSet) {
785
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === _Constants.ConversationEndEntity.NotSet) {
787
786
  _TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
788
787
  Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
789
788
  Description: "conversationEndedBy is not set"
@@ -792,7 +791,7 @@ const LiveChatWidgetStateful = props => {
792
791
  }
793
792
 
794
793
  // If start chat failed, and C2 is trying to close chat widget
795
- if (inMemoryState !== null && inMemoryState !== void 0 && (_inMemoryState$appSta8 = inMemoryState.appStates) !== null && _inMemoryState$appSta8 !== void 0 && _inMemoryState$appSta8.startChatFailed || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta9 = inMemoryState.appStates) === null || _inMemoryState$appSta9 === void 0 ? void 0 : _inMemoryState$appSta9.conversationState) === _ConversationState.ConversationState.Postchat) {
794
+ if (inMemoryState !== null && inMemoryState !== void 0 && (_inMemoryState$appSta8 = inMemoryState.appStates) !== null && _inMemoryState$appSta8 !== void 0 && _inMemoryState$appSta8.startChatFailed || (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta9 = inMemoryState.appStates) === null || _inMemoryState$appSta9 === void 0 ? void 0 : _inMemoryState$appSta9.conversationState) === _ConversationState.ConversationState.Postchat) {
796
795
  _TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
797
796
  Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
798
797
  Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseChatOnFailureOrPostChat
@@ -802,7 +801,7 @@ const LiveChatWidgetStateful = props => {
802
801
  }
803
802
 
804
803
  // Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
805
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationState) === _ConversationState.ConversationState.InActive) {
804
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta0 = inMemoryState.appStates) === null || _inMemoryState$appSta0 === void 0 ? void 0 : _inMemoryState$appSta0.conversationState) === _ConversationState.ConversationState.InActive) {
806
805
  _TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
807
806
  Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
808
807
  Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseInactiveChat
@@ -810,11 +809,11 @@ const LiveChatWidgetStateful = props => {
810
809
  (0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
811
810
  return;
812
811
  }
813
- const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.isConversationalSurveyEnabled;
812
+ const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta1 = inMemoryState.appStates) === null || _inMemoryState$appSta1 === void 0 ? void 0 : _inMemoryState$appSta1.isConversationalSurveyEnabled;
814
813
 
815
814
  // In conversational survey, we need to check post chat survey logics before we set ConversationState to InActive
816
815
  // Hence setting ConversationState to InActive will be done later in the post chat flows
817
- if (!isConversationalSurveyEnabled && ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.conversationEndedBy) === _Constants.ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta13 = inMemoryState.appStates) === null || _inMemoryState$appSta13 === void 0 ? void 0 : _inMemoryState$appSta13.conversationEndedBy) === _Constants.ConversationEndEntity.Bot)) {
816
+ if (!isConversationalSurveyEnabled && ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationEndedBy) === _Constants.ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.conversationEndedBy) === _Constants.ConversationEndEntity.Bot)) {
818
817
  dispatch({
819
818
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
820
819
  payload: _ConversationState.ConversationState.InActive
@@ -823,7 +822,7 @@ const LiveChatWidgetStateful = props => {
823
822
 
824
823
  // All other cases
825
824
  (0, _endChat.prepareEndChat)(props, facadeChatSDK, inMemoryState, dispatch, setAdapter, setWebChatStyles, adapter);
826
- }, [state === null || state === void 0 ? void 0 : (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
825
+ }, [state === null || state === void 0 || (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
827
826
 
828
827
  // Publish chat widget state
829
828
  (0, _react2.useEffect)(() => {
@@ -855,13 +854,13 @@ const LiveChatWidgetStateful = props => {
855
854
 
856
855
  // Handle Chat disconnect cases
857
856
  (0, _react2.useEffect)(() => {
858
- var _inMemoryState$appSta14;
857
+ var _inMemoryState$appSta12;
859
858
  const inMemoryState = (0, _createReducer.executeReducer)(state, {
860
859
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
861
860
  payload: null
862
861
  });
863
862
  (0, _chatDisconnectHelper.handleChatDisconnect)(props, inMemoryState, setWebChatStyles);
864
- const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta14 = inMemoryState.appStates) === null || _inMemoryState$appSta14 === void 0 ? void 0 : _inMemoryState$appSta14.chatDisconnectEventReceived;
863
+ const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.chatDisconnectEventReceived;
865
864
  if (chatDisconnectState && adapter) {
866
865
  try {
867
866
  adapter.end();
@@ -877,12 +876,12 @@ const LiveChatWidgetStateful = props => {
877
876
 
878
877
  // if props state gets updates we need to update the renderingMiddlewareProps in the state
879
878
  (0, _react2.useEffect)(() => {
880
- var _props$webChatContain16;
879
+ var _props$webChatContain0;
881
880
  dispatch({
882
881
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_RENDERING_MIDDLEWARE_PROPS,
883
- payload: (_props$webChatContain16 = props.webChatContainerProps) === null || _props$webChatContain16 === void 0 ? void 0 : _props$webChatContain16.renderingMiddlewareProps
882
+ payload: (_props$webChatContain0 = props.webChatContainerProps) === null || _props$webChatContain0 === void 0 ? void 0 : _props$webChatContain0.renderingMiddlewareProps
884
883
  });
885
- }, [(_props$webChatContain17 = props.webChatContainerProps) === null || _props$webChatContain17 === void 0 ? void 0 : _props$webChatContain17.renderingMiddlewareProps]);
884
+ }, [(_props$webChatContain1 = props.webChatContainerProps) === null || _props$webChatContain1 === void 0 ? void 0 : _props$webChatContain1.renderingMiddlewareProps]);
886
885
  (0, _react2.useEffect)(() => {
887
886
  _TelemetryHelper.TelemetryHelper.logLoadingEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
888
887
  Event: _TelemetryConstants.TelemetryEvent.UXLiveChatWidgetCompleted,
@@ -905,11 +904,11 @@ const LiveChatWidgetStateful = props => {
905
904
  });
906
905
  (0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, false);
907
906
  // Clean local storage
908
- (_DataStoreManager$cli = _DataStoreManager.DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 ? void 0 : _DataStoreManager$cli.removeData(widgetStateEventId);
907
+ (_DataStoreManager$cli = _DataStoreManager.DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 || _DataStoreManager$cli.removeData(widgetStateEventId);
909
908
 
910
909
  //Dispose calling instance
911
910
  if (voiceVideoCallingSDK) {
912
- voiceVideoCallingSDK === null || voiceVideoCallingSDK === void 0 ? void 0 : voiceVideoCallingSDK.close();
911
+ voiceVideoCallingSDK === null || voiceVideoCallingSDK === void 0 || voiceVideoCallingSDK.close();
913
912
  }
914
913
  //Message for clearing window[popouTab]
915
914
  _omnichannelChatComponents.BroadcastService.postMessage({
@@ -928,7 +927,7 @@ const LiveChatWidgetStateful = props => {
928
927
  const webChatProps = (0, _initWebChatComposer.initWebChatComposer)(props, state, dispatch, facadeChatSDK, endChatRelay);
929
928
  const downloadTranscriptProps = (0, _createDownloadTranscriptProps.default)(props.downloadTranscriptProps, {
930
929
  ...(_defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps === null || _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps === void 0 ? void 0 : _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.webChatStyles),
931
- ...((_props$webChatContain18 = props.webChatContainerProps) === null || _props$webChatContain18 === void 0 ? void 0 : _props$webChatContain18.webChatStyles)
930
+ ...((_props$webChatContain10 = props.webChatContainerProps) === null || _props$webChatContain10 === void 0 ? void 0 : _props$webChatContain10.webChatStyles)
932
931
  }, props.webChatContainerProps);
933
932
  const livechatProps = {
934
933
  ...props,
@@ -936,7 +935,7 @@ const LiveChatWidgetStateful = props => {
936
935
  };
937
936
  const chatWidgetDraggableConfig = {
938
937
  elementId: widgetElementId,
939
- channel: ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.widgetInstanceId) ?? "lcw",
938
+ channel: ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.widgetInstanceId) ?? "lcw",
940
939
  disabled: ((_props$draggableChatW = props.draggableChatWidgetProps) === null || _props$draggableChatW === void 0 ? void 0 : _props$draggableChatW.disabled) !== true // Draggable by default, unless explicitly disabled
941
940
  };
942
941
 
@@ -1067,15 +1066,14 @@ const LiveChatWidgetStateful = props => {
1067
1066
  })), !((_livechatProps$contro9 = livechatProps.controlProps) !== null && _livechatProps$contro9 !== void 0 && _livechatProps$contro9.hidePreChatSurveyPane) && (0, _componentController.shouldShowPreChatSurveyPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon8 = livechatProps.componentOverrides) === null || _livechatProps$compon8 === void 0 ? void 0 : _livechatProps$compon8.preChatSurveyPane) || /*#__PURE__*/_react2.default.createElement(_PreChatSurveyPaneStateful.default, {
1068
1067
  surveyProps: livechatProps.preChatSurveyPaneProps,
1069
1068
  initStartChat: initStartChatRelay
1070
- })), !((_livechatProps$contro10 = livechatProps.controlProps) !== null && _livechatProps$contro10 !== void 0 && _livechatProps$contro10.hideCallingContainer) && (0, _componentController.shouldShowCallingContainer)(state) && /*#__PURE__*/_react2.default.createElement(_CallingContainerStateful.default, _extends({
1069
+ })), !((_livechatProps$contro0 = livechatProps.controlProps) !== null && _livechatProps$contro0 !== void 0 && _livechatProps$contro0.hideCallingContainer) && (0, _componentController.shouldShowCallingContainer)(state) && /*#__PURE__*/_react2.default.createElement(_CallingContainerStateful.default, _extends({
1071
1070
  voiceVideoCallingSdk: voiceVideoCallingSDK
1072
- }, livechatProps.callingContainerProps)), !((_livechatProps$contro11 = livechatProps.controlProps) !== null && _livechatProps$contro11 !== void 0 && _livechatProps$contro11.hideWebChatContainer) && (0, _componentController.shouldShowWebChatContainer)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon9 = livechatProps.componentOverrides) === null || _livechatProps$compon9 === void 0 ? void 0 : _livechatProps$compon9.webChatContainer) || /*#__PURE__*/_react2.default.createElement(_WebChatContainerStateful.default, livechatProps)), !((_livechatProps$contro12 = livechatProps.controlProps) !== null && _livechatProps$contro12 !== void 0 && _livechatProps$contro12.hideConfirmationPane) && (0, _componentController.shouldShowConfirmationPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon10 = livechatProps.componentOverrides) === null || _livechatProps$compon10 === void 0 ? void 0 : _livechatProps$compon10.confirmationPane) || /*#__PURE__*/_react2.default.createElement(_ConfirmationPaneStateful.default, _extends({}, confirmationPaneProps, {
1071
+ }, livechatProps.callingContainerProps)), !((_livechatProps$contro1 = livechatProps.controlProps) !== null && _livechatProps$contro1 !== void 0 && _livechatProps$contro1.hideWebChatContainer) && (0, _componentController.shouldShowWebChatContainer)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon9 = livechatProps.componentOverrides) === null || _livechatProps$compon9 === void 0 ? void 0 : _livechatProps$compon9.webChatContainer) || /*#__PURE__*/_react2.default.createElement(_WebChatContainerStateful.default, livechatProps)), !((_livechatProps$contro10 = livechatProps.controlProps) !== null && _livechatProps$contro10 !== void 0 && _livechatProps$contro10.hideConfirmationPane) && (0, _componentController.shouldShowConfirmationPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon0 = livechatProps.componentOverrides) === null || _livechatProps$compon0 === void 0 ? void 0 : _livechatProps$compon0.confirmationPane) || /*#__PURE__*/_react2.default.createElement(_ConfirmationPaneStateful.default, _extends({}, confirmationPaneProps, {
1073
1072
  setPostChatContext: setPostChatContextRelay,
1074
1073
  prepareEndChat: prepareEndChatRelay
1075
- }))), !((_livechatProps$contro13 = livechatProps.controlProps) !== null && _livechatProps$contro13 !== void 0 && _livechatProps$contro13.hidePostChatLoadingPane) && (0, _componentController.shouldShowPostChatLoadingPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon11 = livechatProps.componentOverrides) === null || _livechatProps$compon11 === void 0 ? void 0 : _livechatProps$compon11.postChatLoadingPane) || /*#__PURE__*/_react2.default.createElement(_PostChatLoadingPaneStateful.default, livechatProps.postChatLoadingPaneProps)), (0, _componentController.shouldShowPostChatSurveyPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon12 = livechatProps.componentOverrides) === null || _livechatProps$compon12 === void 0 ? void 0 : _livechatProps$compon12.postChatSurveyPane) || /*#__PURE__*/_react2.default.createElement(_PostChatSurveyPaneStateful.default, _extends({}, livechatProps.postChatSurveyPaneProps, livechatProps.chatSDK, {
1074
+ }))), !((_livechatProps$contro11 = livechatProps.controlProps) !== null && _livechatProps$contro11 !== void 0 && _livechatProps$contro11.hidePostChatLoadingPane) && (0, _componentController.shouldShowPostChatLoadingPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon1 = livechatProps.componentOverrides) === null || _livechatProps$compon1 === void 0 ? void 0 : _livechatProps$compon1.postChatLoadingPane) || /*#__PURE__*/_react2.default.createElement(_PostChatLoadingPaneStateful.default, livechatProps.postChatLoadingPaneProps)), (0, _componentController.shouldShowPostChatSurveyPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon10 = livechatProps.componentOverrides) === null || _livechatProps$compon10 === void 0 ? void 0 : _livechatProps$compon10.postChatSurveyPane) || /*#__PURE__*/_react2.default.createElement(_PostChatSurveyPaneStateful.default, _extends({}, livechatProps.postChatSurveyPaneProps, livechatProps.chatSDK, {
1076
1075
  customerVoiceSurveyCorrelationId: conversationId
1077
- }))), (0, _createFooter.createFooter)(livechatProps, state), (0, _componentController.shouldShowEmailTranscriptPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon13 = livechatProps.componentOverrides) === null || _livechatProps$compon13 === void 0 ? void 0 : _livechatProps$compon13.emailTranscriptPane) || /*#__PURE__*/_react2.default.createElement(_EmailTranscriptPaneStateful.default, livechatProps.emailTranscriptPane))))));
1076
+ }))), (0, _createFooter.createFooter)(livechatProps, state), (0, _componentController.shouldShowEmailTranscriptPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon11 = livechatProps.componentOverrides) === null || _livechatProps$compon11 === void 0 ? void 0 : _livechatProps$compon11.emailTranscriptPane) || /*#__PURE__*/_react2.default.createElement(_EmailTranscriptPaneStateful.default, livechatProps.emailTranscriptPane))))));
1078
1077
  };
1079
1078
  exports.LiveChatWidgetStateful = LiveChatWidgetStateful;
1080
- var _default = LiveChatWidgetStateful;
1081
- exports.default = _default;
1079
+ var _default = exports.default = LiveChatWidgetStateful;
@@ -13,9 +13,8 @@ var _defaultgeneralLoadingPaneStyleProps = require("./common/defaultStyleProps/d
13
13
  var _errorUILoadingPaneStyleProps = require("./common/errorUIStyleProps/errorUILoadingPaneStyleProps");
14
14
  var _useChatContextStore = _interopRequireDefault(require("../../hooks/useChatContextStore"));
15
15
  var _useWindowDimensions = _interopRequireDefault(require("../../hooks/useWindowDimensions"));
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
18
  let uiTimer;
20
19
 
21
20
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -32,7 +31,7 @@ const LoadingPaneStateful = props => {
32
31
  loadingPaneProps,
33
32
  startChatErrorPaneProps
34
33
  } = props;
35
- const generalLoadingPaneStyleProps = Object.assign({}, _defaultgeneralLoadingPaneStyleProps.defaultGeneralLoadingPaneStyleProps, loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : (_loadingPaneProps$sty = loadingPaneProps.styleProps) === null || _loadingPaneProps$sty === void 0 ? void 0 : _loadingPaneProps$sty.generalStyleProps);
34
+ const generalLoadingPaneStyleProps = Object.assign({}, _defaultgeneralLoadingPaneStyleProps.defaultGeneralLoadingPaneStyleProps, loadingPaneProps === null || loadingPaneProps === void 0 || (_loadingPaneProps$sty = loadingPaneProps.styleProps) === null || _loadingPaneProps$sty === void 0 ? void 0 : _loadingPaneProps$sty.generalStyleProps);
36
35
  const loadingPaneStyleProps = {
37
36
  ...(loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : loadingPaneProps.styleProps),
38
37
  generalStyleProps: generalLoadingPaneStyleProps
@@ -49,8 +48,8 @@ const LoadingPaneStateful = props => {
49
48
  ...(loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : loadingPaneProps.controlProps),
50
49
  id: "oc-lcw-alert-pane",
51
50
  dir: state.domainStates.globalDir,
52
- titleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.titleText) ?? "We are unable to load chat at this time.",
53
- subtitleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.subtitleText) ?? "Please try again later.",
51
+ titleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.titleText) ?? "We are unable to load chat at this time.",
52
+ subtitleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr2 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.subtitleText) ?? "Please try again later.",
54
53
  hideSpinner: true,
55
54
  hideSpinnerText: true
56
55
  };
@@ -89,5 +88,4 @@ const LoadingPaneStateful = props => {
89
88
  });
90
89
  };
91
90
  exports.LoadingPaneStateful = LoadingPaneStateful;
92
- var _default = LoadingPaneStateful;
93
- exports.default = _default;
91
+ var _default = exports.default = LoadingPaneStateful;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultGeneralLoadingPaneStyleProps = void 0;
7
- const defaultGeneralLoadingPaneStyleProps = {
7
+ const defaultGeneralLoadingPaneStyleProps = exports.defaultGeneralLoadingPaneStyleProps = {
8
8
  position: "initial",
9
9
  width: "100%",
10
10
  height: "100%",
@@ -13,5 +13,4 @@ const defaultGeneralLoadingPaneStyleProps = {
13
13
  borderRadius: "0 0 4px 4px",
14
14
  borderWidth: "0px",
15
15
  backgroundColor: "#315FA2"
16
- };
17
- exports.defaultGeneralLoadingPaneStyleProps = defaultGeneralLoadingPaneStyleProps;
16
+ };