@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
@@ -1,4 +1,4 @@
1
- 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); }
1
+ 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); }
2
2
  import { BroadcastEvent, ConversationStage, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
3
3
  import { BroadcastService, BroadcastServiceInitialize, decodeComponentString } from "@microsoft/omnichannel-chat-components";
4
4
  import { Components } from "botframework-webchat";
@@ -57,7 +57,7 @@ import useFacadeSDKStore from "../../../hooks/useFacadeChatSDKStore";
57
57
  import { getPostChatContext, initiatePostChat } from "../common/renderSurveyHelpers";
58
58
  let uiTimer;
59
59
  export const LiveChatWidgetStateful = props => {
60
- 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;
60
+ 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;
61
61
  useEffect(() => {
62
62
  uiTimer = createTimer();
63
63
  TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
@@ -84,8 +84,8 @@ export const LiveChatWidgetStateful = props => {
84
84
  Composer
85
85
  } = Components;
86
86
  const canStartProactiveChat = useRef(true);
87
- 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.background;
88
- 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.color;
87
+ 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.background;
88
+ 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.color;
89
89
 
90
90
  // Process general styles
91
91
  const generalStyles = {
@@ -94,12 +94,12 @@ export const LiveChatWidgetStateful = props => {
94
94
 
95
95
  //Scrollbar styles
96
96
  const scrollbarProps = Object.assign({}, defaultScrollBarProps, props === null || props === void 0 ? void 0 : props.scrollBarProps);
97
- 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;
97
+ 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;
98
98
 
99
99
  // In case the broadcast channel is already initialized elsewhere; One tab can only hold 1 instance
100
- if ((props === null || props === void 0 ? void 0 : (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.skipBroadcastChannelInit) !== true) {
101
- var _facadeChatSDK$getCha, _facadeChatSDK$getCha2, _props$controlProps2;
102
- const broadcastServiceChannelName = 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) ?? "");
100
+ if ((props === null || props === void 0 || (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.skipBroadcastChannelInit) !== true) {
101
+ var _facadeChatSDK$getCha, _props$controlProps2;
102
+ const broadcastServiceChannelName = 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) ?? "");
103
103
  BroadcastServiceInitialize(broadcastServiceChannelName);
104
104
  }
105
105
  TelemetryTimers.LcwLoadToChatButtonTimer = createTimer();
@@ -116,13 +116,13 @@ export const LiveChatWidgetStateful = props => {
116
116
  var _state$appStates2;
117
117
  activeCachedChatExist = true;
118
118
  optionalParams = {
119
- reconnectId: state === null || state === void 0 ? void 0 : (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.reconnectId
119
+ reconnectId: state === null || state === void 0 || (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.reconnectId
120
120
  };
121
- } else if (!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.Active) {
121
+ } else if (!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.Active) {
122
122
  var _state$domainStates2;
123
123
  activeCachedChatExist = true;
124
124
  optionalParams = {
125
- liveChatContext: state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
125
+ liveChatContext: state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
126
126
  };
127
127
  } else {
128
128
  activeCachedChatExist = false;
@@ -185,7 +185,7 @@ export const LiveChatWidgetStateful = props => {
185
185
  } else {
186
186
  var _state$appStates4;
187
187
  // To avoid showing blank screen in popout
188
- if ((state === null || state === void 0 ? void 0 : (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.hideStartChatButton) === false) {
188
+ if ((state === null || state === void 0 || (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.hideStartChatButton) === false) {
189
189
  dispatch({
190
190
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
191
191
  payload: ConversationState.Closed
@@ -206,7 +206,7 @@ export const LiveChatWidgetStateful = props => {
206
206
  const widgetCacheId = getWidgetCacheIdfromProps(props);
207
207
  if (props.contextDataStore === undefined) {
208
208
  var _props$controlProps4;
209
- const cacheTtlInMins = (props === null || props === void 0 ? void 0 : (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.cacheTtlInMins) ?? Constants.CacheTtlInMinutes;
209
+ const cacheTtlInMins = (props === null || props === void 0 || (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.cacheTtlInMins) ?? Constants.CacheTtlInMinutes;
210
210
  const storageType = (props === null || props === void 0 ? void 0 : props.useSessionStorage) === true ? StorageType.sessionStorage : StorageType.localStorage;
211
211
  DataStoreManager.clientDataStore = defaultClientDataStoreProvider(cacheTtlInMins, storageType);
212
212
  registerBroadcastServiceForStorage(widgetCacheId, cacheTtlInMins, storageType);
@@ -215,7 +215,7 @@ export const LiveChatWidgetStateful = props => {
215
215
  }
216
216
  };
217
217
  useEffect(() => {
218
- var _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$chatConfig, _props$chatConfig$Liv, _props$controlProps9, _props$chatConfig2, _props$chatConfig2$Ch, _state$appStates5;
218
+ var _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$chatConfig, _props$controlProps9, _props$chatConfig2, _state$appStates5;
219
219
  dispatch({
220
220
  type: LiveChatWidgetActionType.SET_START_CHAT_FAILING,
221
221
  payload: false
@@ -247,7 +247,7 @@ export const LiveChatWidgetStateful = props => {
247
247
  payload: (_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.widgetInstanceId
248
248
  });
249
249
  }
250
- 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) !== E2VVOptions.NoCalling) {
250
+ 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) !== E2VVOptions.NoCalling) {
251
251
  initCallingSdk(facadeChatSDK, setVoiceVideoCallingSDK).then(sdkCreated => {
252
252
  sdkCreated && dispatch({
253
253
  type: LiveChatWidgetActionType.SET_E2VV_ENABLED,
@@ -263,7 +263,7 @@ export const LiveChatWidgetStateful = props => {
263
263
  }
264
264
 
265
265
  // Initialize global dir
266
- const globalDir = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.dir) ?? 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);
266
+ const globalDir = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.dir) ?? 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);
267
267
  dispatch({
268
268
  type: LiveChatWidgetActionType.SET_GLOBAL_DIR,
269
269
  payload: globalDir
@@ -271,7 +271,7 @@ export const LiveChatWidgetStateful = props => {
271
271
  setOptionalParams();
272
272
 
273
273
  // Unauth chat
274
- if ((state === null || state === void 0 ? void 0 : (_state$appStates5 = state.appStates) === null || _state$appStates5 === void 0 ? void 0 : _state$appStates5.hideStartChatButton) === false) {
274
+ if ((state === null || state === void 0 || (_state$appStates5 = state.appStates) === null || _state$appStates5 === void 0 ? void 0 : _state$appStates5.hideStartChatButton) === false) {
275
275
  startChat(props);
276
276
  }
277
277
  }, []);
@@ -279,7 +279,7 @@ export const LiveChatWidgetStateful = props => {
279
279
  // useEffect for when skip chat button rendering
280
280
  useEffect(() => {
281
281
  var _state$appStates6;
282
- if ((state === null || state === void 0 ? void 0 : (_state$appStates6 = state.appStates) === null || _state$appStates6 === void 0 ? void 0 : _state$appStates6.hideStartChatButton) === true) {
282
+ if ((state === null || state === void 0 || (_state$appStates6 = state.appStates) === null || _state$appStates6 === void 0 ? void 0 : _state$appStates6.hideStartChatButton) === true) {
283
283
  //handle OOH pane
284
284
  // Only set OutOfOffice state for new conversations, allow existing Active/InActive conversations to continue
285
285
  if (state.appStates.outsideOperatingHours === true && state.appStates.conversationState !== ConversationState.Active) {
@@ -301,11 +301,11 @@ export const LiveChatWidgetStateful = props => {
301
301
  //Pass the state to avoid getting stale state
302
302
  startChat(props, state);
303
303
  }
304
- }, [state === null || state === void 0 ? void 0 : (_state$appStates7 = state.appStates) === null || _state$appStates7 === void 0 ? void 0 : _state$appStates7.hideStartChatButton]);
304
+ }, [state === null || state === void 0 || (_state$appStates7 = state.appStates) === null || _state$appStates7 === void 0 ? void 0 : _state$appStates7.hideStartChatButton]);
305
305
 
306
306
  // useEffect for custom context
307
307
  useEffect(() => {
308
- var _facadeChatSDK$getCha3, _facadeChatSDK$getCha4, _facadeChatSDK$getCha5, _facadeChatSDK$getCha6, _props$controlProps11;
308
+ var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3, _props$controlProps1;
309
309
  // Add the custom context on receiving the SetCustomContext event
310
310
  BroadcastService.getMessageByEventName(BroadcastEvent.SetCustomContext).subscribe(msg => {
311
311
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
@@ -324,7 +324,7 @@ export const LiveChatWidgetStateful = props => {
324
324
  });
325
325
  if (canStartProactiveChat.current === true) {
326
326
  var _msg$payload, _msg$payload2, _msg$payload3;
327
- 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);
327
+ 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);
328
328
  } else {
329
329
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
330
330
  Event: TelemetryEvent.ChatAlreadyTriggered,
@@ -337,17 +337,17 @@ export const LiveChatWidgetStateful = props => {
337
337
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
338
338
  BroadcastService.getMessageByEventName(BroadcastEvent.HideChatVisibilityChangeEvent).subscribe(async event => {
339
339
  var _event$payload;
340
- if ((event === null || event === void 0 ? void 0 : (_event$payload = event.payload) === null || _event$payload === void 0 ? void 0 : _event$payload.isChatHidden) !== undefined) {
341
- var _props$controlProps10, _window, _window$location;
342
- if ((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideStartChatButton) {
340
+ if ((event === null || event === void 0 || (_event$payload = event.payload) === null || _event$payload === void 0 ? void 0 : _event$payload.isChatHidden) !== undefined) {
341
+ var _props$controlProps0, _window;
342
+ if ((_props$controlProps0 = props.controlProps) !== null && _props$controlProps0 !== void 0 && _props$controlProps0.hideStartChatButton) {
343
343
  var _event$payload2;
344
344
  dispatch({
345
345
  type: LiveChatWidgetActionType.SET_MINIMIZED,
346
- payload: event === null || event === void 0 ? void 0 : (_event$payload2 = event.payload) === null || _event$payload2 === void 0 ? void 0 : _event$payload2.isChatHidden
346
+ payload: event === null || event === void 0 || (_event$payload2 = event.payload) === null || _event$payload2 === void 0 ? void 0 : _event$payload2.isChatHidden
347
347
  });
348
348
  }
349
349
  const dateNow = Date.now();
350
- if (isThisSessionPopout((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.href)) {
350
+ if (isThisSessionPopout((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.href)) {
351
351
  return;
352
352
  }
353
353
 
@@ -374,12 +374,12 @@ export const LiveChatWidgetStateful = props => {
374
374
  }
375
375
  });
376
376
  BroadcastService.getMessageByEventName(BroadcastEvent.NetworkReconnected).subscribe(async () => {
377
- var _window2, _window2$location, _inMemoryState$appSta;
377
+ var _window2, _inMemoryState$appSta;
378
378
  const inMemoryState = executeReducer(state, {
379
379
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
380
380
  payload: null
381
381
  });
382
- if (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.Active) {
382
+ if (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.Active) {
383
383
  return;
384
384
  }
385
385
  const conversationDetails = await getConversationDetailsCall(facadeChatSDK);
@@ -410,7 +410,7 @@ export const LiveChatWidgetStateful = props => {
410
410
  var _msg$payload4;
411
411
  dispatch({
412
412
  type: LiveChatWidgetActionType.SET_MINIMIZED,
413
- payload: msg === null || msg === void 0 ? void 0 : (_msg$payload4 = msg.payload) === null || _msg$payload4 === void 0 ? void 0 : _msg$payload4.minimized
413
+ payload: msg === null || msg === void 0 || (_msg$payload4 = msg.payload) === null || _msg$payload4 === void 0 ? void 0 : _msg$payload4.minimized
414
414
  });
415
415
  });
416
416
 
@@ -430,7 +430,7 @@ export const LiveChatWidgetStateful = props => {
430
430
  return;
431
431
  }
432
432
  // If the startChat event is not initiated by the same tab. Ignore the call
433
- if (!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.InternalTelemetryData.lcwRuntimeId) {
433
+ if (!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.InternalTelemetryData.lcwRuntimeId) {
434
434
  return;
435
435
  }
436
436
  if (msg !== null && msg !== void 0 && (_msg$payload7 = msg.payload) !== null && _msg$payload7 !== void 0 && _msg$payload7.customContext) {
@@ -441,7 +441,7 @@ export const LiveChatWidgetStateful = props => {
441
441
  });
442
442
  dispatch({
443
443
  type: LiveChatWidgetActionType.SET_CUSTOM_CONTEXT,
444
- payload: msg === null || msg === void 0 ? void 0 : (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
444
+ payload: msg === null || msg === void 0 || (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
445
445
  });
446
446
  }
447
447
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
@@ -452,7 +452,7 @@ export const LiveChatWidgetStateful = props => {
452
452
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
453
453
  payload: null
454
454
  });
455
- inMemoryState.domainStates.customContext = msg === null || msg === void 0 ? void 0 : (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.customContext;
455
+ inMemoryState.domainStates.customContext = msg === null || msg === void 0 || (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.customContext;
456
456
  /*
457
457
  * If the conversation is in closed state then we start a new chat,
458
458
  * else if the conversation is in active state then we maximize the chat
@@ -474,8 +474,8 @@ export const LiveChatWidgetStateful = props => {
474
474
  }
475
475
 
476
476
  // If minimized, maximize the chat
477
- 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) {
478
- var _inMemoryState$domain, _inMemoryState$domain2, _inMemoryState$domain3, _inMemoryState$domain4;
477
+ 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) {
478
+ var _inMemoryState$domain, _inMemoryState$domain2;
479
479
  dispatch({
480
480
  type: LiveChatWidgetActionType.SET_MINIMIZED,
481
481
  payload: false
@@ -483,8 +483,8 @@ export const LiveChatWidgetStateful = props => {
483
483
  BroadcastService.postMessage({
484
484
  eventName: BroadcastEvent.MaximizeChat,
485
485
  payload: {
486
- 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,
487
- 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,
486
+ 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,
487
+ 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,
488
488
  lcwRuntimeId: TelemetryManager.InternalTelemetryData.lcwRuntimeId
489
489
  }
490
490
  });
@@ -492,9 +492,9 @@ export const LiveChatWidgetStateful = props => {
492
492
  }
493
493
  });
494
494
  const handleInitiateEndChatForPersistentChat = async (msg, conversationDetails) => {
495
- var _msg$payload10, _msg$payload11, _msg$payload12;
495
+ var _msg$payload0, _msg$payload1, _msg$payload10;
496
496
  //If the payload does NOT include the skipSessionCloseForPersistentChat flag, default is false. Upon receiving the customer event, always ending session from C2.
497
- const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 ? void 0 : (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[Constants.SkipSessionCloseForPersistentChatFlag]) === Constants.String && (msg === null || msg === void 0 ? void 0 : (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11[Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === Constants.true || (msg === null || msg === void 0 ? void 0 : (_msg$payload12 = msg.payload) === null || _msg$payload12 === void 0 ? void 0 : _msg$payload12[Constants.SkipSessionCloseForPersistentChatFlag]) === true;
497
+ const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 || (_msg$payload0 = msg.payload) === null || _msg$payload0 === void 0 ? void 0 : _msg$payload0[Constants.SkipSessionCloseForPersistentChatFlag]) === Constants.String && (msg === null || msg === void 0 || (_msg$payload1 = msg.payload) === null || _msg$payload1 === void 0 ? void 0 : _msg$payload1[Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === Constants.true || (msg === null || msg === void 0 || (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[Constants.SkipSessionCloseForPersistentChatFlag]) === true;
498
498
  TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
499
499
  Event: TelemetryEvent.EndChatEventReceived,
500
500
  Description: "Processing initiateEndChat for persistent chat",
@@ -512,7 +512,7 @@ export const LiveChatWidgetStateful = props => {
512
512
  Event: TelemetryEvent.EndChatEventReceived,
513
513
  Description: "Processing initiateEndChat, fetching postChatContext"
514
514
  });
515
- const postchatContext = (await 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);
515
+ const postchatContext = (await getPostChatContext(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.postChatContext);
516
516
  if (postchatContext) {
517
517
  TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
518
518
  Event: TelemetryEvent.EndChatEventReceived,
@@ -605,10 +605,10 @@ export const LiveChatWidgetStateful = props => {
605
605
  });
606
606
 
607
607
  // Listen to end chat event from other tabs
608
- const endChatEventName = 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) ?? "");
608
+ const endChatEventName = 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) ?? "");
609
609
  BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
610
- var _msg$payload13;
611
- if ((msg === null || msg === void 0 ? void 0 : (_msg$payload13 = msg.payload) === null || _msg$payload13 === void 0 ? void 0 : _msg$payload13.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
610
+ var _msg$payload11;
611
+ if ((msg === null || msg === void 0 || (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
612
612
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
613
613
  Event: TelemetryEvent.PrepareEndChat,
614
614
  Description: "Received EndChat BroadcastEvent from other tabs. Closing this chat."
@@ -650,8 +650,8 @@ export const LiveChatWidgetStateful = props => {
650
650
 
651
651
  // Retrieve convId
652
652
  BroadcastService.getMessageByEventName(BroadcastEvent.UpdateConversationDataForTelemetry).subscribe(msg => {
653
- var _msg$payload14, _msg$payload14$liveWo;
654
- 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) {
653
+ var _msg$payload12;
654
+ if ((_msg$payload12 = msg.payload) !== null && _msg$payload12 !== void 0 && (_msg$payload12 = _msg$payload12.liveWorkItem) !== null && _msg$payload12 !== void 0 && _msg$payload12.conversationId) {
655
655
  setConversationId(msg.payload.liveWorkItem.conversationId);
656
656
  }
657
657
  });
@@ -668,7 +668,7 @@ export const LiveChatWidgetStateful = props => {
668
668
  useEffect(() => {
669
669
  // On new message
670
670
  if (state.appStates.conversationState === ConversationState.Active) {
671
- facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.onNewMessage(() => {
671
+ facadeChatSDK === null || facadeChatSDK === void 0 || facadeChatSDK.onNewMessage(() => {
672
672
  // Track the message count
673
673
  currentMessageCountRef.current++;
674
674
  dispatch({
@@ -683,15 +683,15 @@ export const LiveChatWidgetStateful = props => {
683
683
  }, {
684
684
  disablePolling: true
685
685
  });
686
- facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.onAgentEndSession(event => {
686
+ facadeChatSDK === null || facadeChatSDK === void 0 || facadeChatSDK.onAgentEndSession(event => {
687
687
  var _inMemoryState$appSta5;
688
688
  const inMemoryState = executeReducer(state, {
689
689
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
690
690
  payload: null
691
691
  });
692
- 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.Active) {
692
+ if ("participantsRemoved" in event && (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta5 = inMemoryState.appStates) === null || _inMemoryState$appSta5 === void 0 ? void 0 : _inMemoryState$appSta5.conversationState) === ConversationState.Active) {
693
693
  var _inMemoryState$appSta6;
694
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta6 = inMemoryState.appStates) === null || _inMemoryState$appSta6 === void 0 ? void 0 : _inMemoryState$appSta6.isConversationalSurveyEnabled) === false) {
694
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta6 = inMemoryState.appStates) === null || _inMemoryState$appSta6 === void 0 ? void 0 : _inMemoryState$appSta6.isConversationalSurveyEnabled) === false) {
695
695
  setWebChatStyles(styles => {
696
696
  return {
697
697
  ...styles,
@@ -708,8 +708,8 @@ export const LiveChatWidgetStateful = props => {
708
708
  });
709
709
  }
710
710
  if (state.appStates.conversationState === ConversationState.InActive) {
711
- var _props$webChatContain12, _props$webChatContain13;
712
- 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) {
711
+ var _props$webChatContain7;
712
+ 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) {
713
713
  setWebChatStyles(styles => {
714
714
  return {
715
715
  ...styles,
@@ -753,12 +753,12 @@ export const LiveChatWidgetStateful = props => {
753
753
  }
754
754
  }, [state.appStates.unreadMessageCount]);
755
755
  useEffect(() => {
756
- var _props$webChatContain14;
756
+ var _props$webChatContain8;
757
757
  setWebChatStyles({
758
758
  ...webChatStyles,
759
- ...((_props$webChatContain14 = props.webChatContainerProps) === null || _props$webChatContain14 === void 0 ? void 0 : _props$webChatContain14.webChatStyles)
759
+ ...((_props$webChatContain8 = props.webChatContainerProps) === null || _props$webChatContain8 === void 0 ? void 0 : _props$webChatContain8.webChatStyles)
760
760
  });
761
- }, [(_props$webChatContain15 = props.webChatContainerProps) === null || _props$webChatContain15 === void 0 ? void 0 : _props$webChatContain15.webChatStyles]);
761
+ }, [(_props$webChatContain9 = props.webChatContainerProps) === null || _props$webChatContain9 === void 0 ? void 0 : _props$webChatContain9.webChatStyles]);
762
762
  useEffect(() => {
763
763
  //Confirmation pane dismissing through OK option, so proceed with end chat
764
764
  if (state.domainStates.confirmationState === ConfirmationState.Ok) {
@@ -769,13 +769,13 @@ export const LiveChatWidgetStateful = props => {
769
769
  }
770
770
  }, [state.domainStates.confirmationState]);
771
771
  useEffect(() => {
772
- var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta10, _inMemoryState$appSta11, _inMemoryState$appSta12, _inMemoryState$appSta13;
772
+ var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta0, _inMemoryState$appSta1, _inMemoryState$appSta10, _inMemoryState$appSta11;
773
773
  const inMemoryState = executeReducer(state, {
774
774
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
775
775
  payload: null
776
776
  });
777
777
  // Do not process anything during initialization
778
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === ConversationEndEntity.NotSet) {
778
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === ConversationEndEntity.NotSet) {
779
779
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
780
780
  Event: TelemetryEvent.PrepareEndChat,
781
781
  Description: "conversationEndedBy is not set"
@@ -784,7 +784,7 @@ export const LiveChatWidgetStateful = props => {
784
784
  }
785
785
 
786
786
  // If start chat failed, and C2 is trying to close chat widget
787
- 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.Postchat) {
787
+ 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.Postchat) {
788
788
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
789
789
  Event: TelemetryEvent.PrepareEndChat,
790
790
  Description: PrepareEndChatDescriptionConstants.CustomerCloseChatOnFailureOrPostChat
@@ -794,7 +794,7 @@ export const LiveChatWidgetStateful = props => {
794
794
  }
795
795
 
796
796
  // Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
797
- if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationState) === ConversationState.InActive) {
797
+ if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta0 = inMemoryState.appStates) === null || _inMemoryState$appSta0 === void 0 ? void 0 : _inMemoryState$appSta0.conversationState) === ConversationState.InActive) {
798
798
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
799
799
  Event: TelemetryEvent.PrepareEndChat,
800
800
  Description: PrepareEndChatDescriptionConstants.CustomerCloseInactiveChat
@@ -802,11 +802,11 @@ export const LiveChatWidgetStateful = props => {
802
802
  endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
803
803
  return;
804
804
  }
805
- const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.isConversationalSurveyEnabled;
805
+ const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta1 = inMemoryState.appStates) === null || _inMemoryState$appSta1 === void 0 ? void 0 : _inMemoryState$appSta1.isConversationalSurveyEnabled;
806
806
 
807
807
  // In conversational survey, we need to check post chat survey logics before we set ConversationState to InActive
808
808
  // Hence setting ConversationState to InActive will be done later in the post chat flows
809
- if (!isConversationalSurveyEnabled && ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.conversationEndedBy) === ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta13 = inMemoryState.appStates) === null || _inMemoryState$appSta13 === void 0 ? void 0 : _inMemoryState$appSta13.conversationEndedBy) === ConversationEndEntity.Bot)) {
809
+ if (!isConversationalSurveyEnabled && ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationEndedBy) === ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.conversationEndedBy) === ConversationEndEntity.Bot)) {
810
810
  dispatch({
811
811
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
812
812
  payload: ConversationState.InActive
@@ -815,7 +815,7 @@ export const LiveChatWidgetStateful = props => {
815
815
 
816
816
  // All other cases
817
817
  prepareEndChat(props, facadeChatSDK, inMemoryState, dispatch, setAdapter, setWebChatStyles, adapter);
818
- }, [state === null || state === void 0 ? void 0 : (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
818
+ }, [state === null || state === void 0 || (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
819
819
 
820
820
  // Publish chat widget state
821
821
  useEffect(() => {
@@ -847,13 +847,13 @@ export const LiveChatWidgetStateful = props => {
847
847
 
848
848
  // Handle Chat disconnect cases
849
849
  useEffect(() => {
850
- var _inMemoryState$appSta14;
850
+ var _inMemoryState$appSta12;
851
851
  const inMemoryState = executeReducer(state, {
852
852
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
853
853
  payload: null
854
854
  });
855
855
  handleChatDisconnect(props, inMemoryState, setWebChatStyles);
856
- const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta14 = inMemoryState.appStates) === null || _inMemoryState$appSta14 === void 0 ? void 0 : _inMemoryState$appSta14.chatDisconnectEventReceived;
856
+ const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.chatDisconnectEventReceived;
857
857
  if (chatDisconnectState && adapter) {
858
858
  try {
859
859
  adapter.end();
@@ -869,12 +869,12 @@ export const LiveChatWidgetStateful = props => {
869
869
 
870
870
  // if props state gets updates we need to update the renderingMiddlewareProps in the state
871
871
  useEffect(() => {
872
- var _props$webChatContain16;
872
+ var _props$webChatContain0;
873
873
  dispatch({
874
874
  type: LiveChatWidgetActionType.SET_RENDERING_MIDDLEWARE_PROPS,
875
- payload: (_props$webChatContain16 = props.webChatContainerProps) === null || _props$webChatContain16 === void 0 ? void 0 : _props$webChatContain16.renderingMiddlewareProps
875
+ payload: (_props$webChatContain0 = props.webChatContainerProps) === null || _props$webChatContain0 === void 0 ? void 0 : _props$webChatContain0.renderingMiddlewareProps
876
876
  });
877
- }, [(_props$webChatContain17 = props.webChatContainerProps) === null || _props$webChatContain17 === void 0 ? void 0 : _props$webChatContain17.renderingMiddlewareProps]);
877
+ }, [(_props$webChatContain1 = props.webChatContainerProps) === null || _props$webChatContain1 === void 0 ? void 0 : _props$webChatContain1.renderingMiddlewareProps]);
878
878
  useEffect(() => {
879
879
  TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
880
880
  Event: TelemetryEvent.UXLiveChatWidgetCompleted,
@@ -897,11 +897,11 @@ export const LiveChatWidgetStateful = props => {
897
897
  });
898
898
  endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, false);
899
899
  // Clean local storage
900
- (_DataStoreManager$cli = DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 ? void 0 : _DataStoreManager$cli.removeData(widgetStateEventId);
900
+ (_DataStoreManager$cli = DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 || _DataStoreManager$cli.removeData(widgetStateEventId);
901
901
 
902
902
  //Dispose calling instance
903
903
  if (voiceVideoCallingSDK) {
904
- voiceVideoCallingSDK === null || voiceVideoCallingSDK === void 0 ? void 0 : voiceVideoCallingSDK.close();
904
+ voiceVideoCallingSDK === null || voiceVideoCallingSDK === void 0 || voiceVideoCallingSDK.close();
905
905
  }
906
906
  //Message for clearing window[popouTab]
907
907
  BroadcastService.postMessage({
@@ -920,7 +920,7 @@ export const LiveChatWidgetStateful = props => {
920
920
  const webChatProps = initWebChatComposer(props, state, dispatch, facadeChatSDK, endChatRelay);
921
921
  const downloadTranscriptProps = createDownloadTranscriptProps(props.downloadTranscriptProps, {
922
922
  ...(defaultWebChatContainerStatefulProps === null || defaultWebChatContainerStatefulProps === void 0 ? void 0 : defaultWebChatContainerStatefulProps.webChatStyles),
923
- ...((_props$webChatContain18 = props.webChatContainerProps) === null || _props$webChatContain18 === void 0 ? void 0 : _props$webChatContain18.webChatStyles)
923
+ ...((_props$webChatContain10 = props.webChatContainerProps) === null || _props$webChatContain10 === void 0 ? void 0 : _props$webChatContain10.webChatStyles)
924
924
  }, props.webChatContainerProps);
925
925
  const livechatProps = {
926
926
  ...props,
@@ -928,7 +928,7 @@ export const LiveChatWidgetStateful = props => {
928
928
  };
929
929
  const chatWidgetDraggableConfig = {
930
930
  elementId: widgetElementId,
931
- channel: ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.widgetInstanceId) ?? "lcw",
931
+ channel: ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.widgetInstanceId) ?? "lcw",
932
932
  disabled: ((_props$draggableChatW = props.draggableChatWidgetProps) === null || _props$draggableChatW === void 0 ? void 0 : _props$draggableChatW.disabled) !== true // Draggable by default, unless explicitly disabled
933
933
  };
934
934
 
@@ -1059,13 +1059,13 @@ export const LiveChatWidgetStateful = props => {
1059
1059
  })), !((_livechatProps$contro9 = livechatProps.controlProps) !== null && _livechatProps$contro9 !== void 0 && _livechatProps$contro9.hidePreChatSurveyPane) && shouldShowPreChatSurveyPane(state) && (decodeComponentString((_livechatProps$compon8 = livechatProps.componentOverrides) === null || _livechatProps$compon8 === void 0 ? void 0 : _livechatProps$compon8.preChatSurveyPane) || /*#__PURE__*/React.createElement(PreChatSurveyPaneStateful, {
1060
1060
  surveyProps: livechatProps.preChatSurveyPaneProps,
1061
1061
  initStartChat: initStartChatRelay
1062
- })), !((_livechatProps$contro10 = livechatProps.controlProps) !== null && _livechatProps$contro10 !== void 0 && _livechatProps$contro10.hideCallingContainer) && shouldShowCallingContainer(state) && /*#__PURE__*/React.createElement(CallingContainerStateful, _extends({
1062
+ })), !((_livechatProps$contro0 = livechatProps.controlProps) !== null && _livechatProps$contro0 !== void 0 && _livechatProps$contro0.hideCallingContainer) && shouldShowCallingContainer(state) && /*#__PURE__*/React.createElement(CallingContainerStateful, _extends({
1063
1063
  voiceVideoCallingSdk: voiceVideoCallingSDK
1064
- }, livechatProps.callingContainerProps)), !((_livechatProps$contro11 = livechatProps.controlProps) !== null && _livechatProps$contro11 !== void 0 && _livechatProps$contro11.hideWebChatContainer) && shouldShowWebChatContainer(state) && (decodeComponentString((_livechatProps$compon9 = livechatProps.componentOverrides) === null || _livechatProps$compon9 === void 0 ? void 0 : _livechatProps$compon9.webChatContainer) || /*#__PURE__*/React.createElement(WebChatContainerStateful, livechatProps)), !((_livechatProps$contro12 = livechatProps.controlProps) !== null && _livechatProps$contro12 !== void 0 && _livechatProps$contro12.hideConfirmationPane) && shouldShowConfirmationPane(state) && (decodeComponentString((_livechatProps$compon10 = livechatProps.componentOverrides) === null || _livechatProps$compon10 === void 0 ? void 0 : _livechatProps$compon10.confirmationPane) || /*#__PURE__*/React.createElement(ConfirmationPaneStateful, _extends({}, confirmationPaneProps, {
1064
+ }, livechatProps.callingContainerProps)), !((_livechatProps$contro1 = livechatProps.controlProps) !== null && _livechatProps$contro1 !== void 0 && _livechatProps$contro1.hideWebChatContainer) && shouldShowWebChatContainer(state) && (decodeComponentString((_livechatProps$compon9 = livechatProps.componentOverrides) === null || _livechatProps$compon9 === void 0 ? void 0 : _livechatProps$compon9.webChatContainer) || /*#__PURE__*/React.createElement(WebChatContainerStateful, livechatProps)), !((_livechatProps$contro10 = livechatProps.controlProps) !== null && _livechatProps$contro10 !== void 0 && _livechatProps$contro10.hideConfirmationPane) && shouldShowConfirmationPane(state) && (decodeComponentString((_livechatProps$compon0 = livechatProps.componentOverrides) === null || _livechatProps$compon0 === void 0 ? void 0 : _livechatProps$compon0.confirmationPane) || /*#__PURE__*/React.createElement(ConfirmationPaneStateful, _extends({}, confirmationPaneProps, {
1065
1065
  setPostChatContext: setPostChatContextRelay,
1066
1066
  prepareEndChat: prepareEndChatRelay
1067
- }))), !((_livechatProps$contro13 = livechatProps.controlProps) !== null && _livechatProps$contro13 !== void 0 && _livechatProps$contro13.hidePostChatLoadingPane) && shouldShowPostChatLoadingPane(state) && (decodeComponentString((_livechatProps$compon11 = livechatProps.componentOverrides) === null || _livechatProps$compon11 === void 0 ? void 0 : _livechatProps$compon11.postChatLoadingPane) || /*#__PURE__*/React.createElement(PostChatLoadingPaneStateful, livechatProps.postChatLoadingPaneProps)), shouldShowPostChatSurveyPane(state) && (decodeComponentString((_livechatProps$compon12 = livechatProps.componentOverrides) === null || _livechatProps$compon12 === void 0 ? void 0 : _livechatProps$compon12.postChatSurveyPane) || /*#__PURE__*/React.createElement(PostChatSurveyPaneStateful, _extends({}, livechatProps.postChatSurveyPaneProps, livechatProps.chatSDK, {
1067
+ }))), !((_livechatProps$contro11 = livechatProps.controlProps) !== null && _livechatProps$contro11 !== void 0 && _livechatProps$contro11.hidePostChatLoadingPane) && shouldShowPostChatLoadingPane(state) && (decodeComponentString((_livechatProps$compon1 = livechatProps.componentOverrides) === null || _livechatProps$compon1 === void 0 ? void 0 : _livechatProps$compon1.postChatLoadingPane) || /*#__PURE__*/React.createElement(PostChatLoadingPaneStateful, livechatProps.postChatLoadingPaneProps)), shouldShowPostChatSurveyPane(state) && (decodeComponentString((_livechatProps$compon10 = livechatProps.componentOverrides) === null || _livechatProps$compon10 === void 0 ? void 0 : _livechatProps$compon10.postChatSurveyPane) || /*#__PURE__*/React.createElement(PostChatSurveyPaneStateful, _extends({}, livechatProps.postChatSurveyPaneProps, livechatProps.chatSDK, {
1068
1068
  customerVoiceSurveyCorrelationId: conversationId
1069
- }))), createFooter(livechatProps, state), shouldShowEmailTranscriptPane(state) && (decodeComponentString((_livechatProps$compon13 = livechatProps.componentOverrides) === null || _livechatProps$compon13 === void 0 ? void 0 : _livechatProps$compon13.emailTranscriptPane) || /*#__PURE__*/React.createElement(EmailTranscriptPaneStateful, livechatProps.emailTranscriptPane))))));
1069
+ }))), createFooter(livechatProps, state), shouldShowEmailTranscriptPane(state) && (decodeComponentString((_livechatProps$compon11 = livechatProps.componentOverrides) === null || _livechatProps$compon11 === void 0 ? void 0 : _livechatProps$compon11.emailTranscriptPane) || /*#__PURE__*/React.createElement(EmailTranscriptPaneStateful, livechatProps.emailTranscriptPane))))));
1070
1070
  };
1071
1071
  export default LiveChatWidgetStateful;
@@ -23,7 +23,7 @@ export const LoadingPaneStateful = props => {
23
23
  loadingPaneProps,
24
24
  startChatErrorPaneProps
25
25
  } = props;
26
- const generalLoadingPaneStyleProps = Object.assign({}, defaultGeneralLoadingPaneStyleProps, loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : (_loadingPaneProps$sty = loadingPaneProps.styleProps) === null || _loadingPaneProps$sty === void 0 ? void 0 : _loadingPaneProps$sty.generalStyleProps);
26
+ const generalLoadingPaneStyleProps = Object.assign({}, defaultGeneralLoadingPaneStyleProps, loadingPaneProps === null || loadingPaneProps === void 0 || (_loadingPaneProps$sty = loadingPaneProps.styleProps) === null || _loadingPaneProps$sty === void 0 ? void 0 : _loadingPaneProps$sty.generalStyleProps);
27
27
  const loadingPaneStyleProps = {
28
28
  ...(loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : loadingPaneProps.styleProps),
29
29
  generalStyleProps: generalLoadingPaneStyleProps
@@ -40,8 +40,8 @@ export const LoadingPaneStateful = props => {
40
40
  ...(loadingPaneProps === null || loadingPaneProps === void 0 ? void 0 : loadingPaneProps.controlProps),
41
41
  id: "oc-lcw-alert-pane",
42
42
  dir: state.domainStates.globalDir,
43
- 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.",
44
- subtitleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.subtitleText) ?? "Please try again later.",
43
+ 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.",
44
+ subtitleText: (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr2 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.subtitleText) ?? "Please try again later.",
45
45
  hideSpinner: true,
46
46
  hideSpinnerText: true
47
47
  };