@microsoft/omnichannel-chat-widget 1.8.5 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/lib/cjs/assets/Audios.js +1 -2
  2. package/lib/cjs/assets/Icons.js +16 -32
  3. package/lib/cjs/common/Constants.js +58 -86
  4. package/lib/cjs/common/KeyCodes.js +9 -10
  5. package/lib/cjs/common/contextDataStore/DataStoreManager.js +7 -8
  6. package/lib/cjs/common/facades/FacadeChatSDK.js +11 -13
  7. package/lib/cjs/common/storage/default/defaultCacheManager.js +7 -8
  8. package/lib/cjs/common/telemetry/AppInsightsEvents.js +2 -3
  9. package/lib/cjs/common/telemetry/ScenarioMarker.js +10 -12
  10. package/lib/cjs/common/telemetry/TelemetryConstants.js +31 -29
  11. package/lib/cjs/common/telemetry/TelemetryHelper.js +39 -39
  12. package/lib/cjs/common/telemetry/TelemetryManager.js +21 -24
  13. package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +2 -3
  14. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +2 -3
  15. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +2 -3
  16. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryInternalData.js +2 -3
  17. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -8
  18. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
  19. package/lib/cjs/common/utils/SecureEventBus.js +36 -10
  20. package/lib/cjs/common/utils/dispatchCustomEvent.js +2 -3
  21. package/lib/cjs/common/utils/xssUtils.js +1 -1
  22. package/lib/cjs/common/utils.js +10 -11
  23. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +15 -17
  24. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +10 -12
  25. package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +2 -3
  26. package/lib/cjs/components/citationpanestateful/CitationDim.js +3 -4
  27. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +3 -6
  28. package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +3 -5
  29. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +3 -5
  30. package/lib/cjs/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.js +2 -3
  31. package/lib/cjs/components/dimlayer/DimLayer.js +1 -1
  32. package/lib/cjs/components/draggable/DraggableChatWidget.js +3 -5
  33. package/lib/cjs/components/draggable/DraggableEventEmitter.js +4 -6
  34. package/lib/cjs/components/draggable/DraggableEventNames.js +4 -5
  35. package/lib/cjs/components/draggable/DraggableEventReceiver.js +2 -4
  36. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -10
  37. package/lib/cjs/components/errorboundary/ErrorBoundary.js +17 -21
  38. package/lib/cjs/components/footerstateful/FooterStateful.js +9 -11
  39. package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +2 -4
  40. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +4 -4
  41. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.js +1 -2
  42. package/lib/cjs/components/headerstateful/HeaderStateful.js +13 -15
  43. package/lib/cjs/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.js +2 -3
  44. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -8
  45. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +10 -14
  46. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +26 -32
  47. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +10 -12
  48. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +9 -11
  49. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +9 -11
  50. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +9 -11
  51. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +12 -17
  52. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +4 -5
  53. package/lib/cjs/components/livechatwidget/common/Deferred.js +10 -13
  54. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +12 -15
  55. package/lib/cjs/components/livechatwidget/common/authHelper.js +1 -1
  56. package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
  57. package/lib/cjs/components/livechatwidget/common/createAdapter.js +3 -3
  58. package/lib/cjs/components/livechatwidget/common/createDownloadTranscriptProps.js +1 -2
  59. package/lib/cjs/components/livechatwidget/common/createFooter.js +1 -1
  60. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
  61. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +1 -2
  62. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +2 -3
  63. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +2 -3
  64. package/lib/cjs/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.js +2 -3
  65. package/lib/cjs/components/livechatwidget/common/endChat.js +12 -13
  66. package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +1 -1
  67. package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
  68. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +17 -17
  69. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
  70. package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +4 -5
  71. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +6 -6
  72. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
  73. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
  74. package/lib/cjs/components/livechatwidget/common/startChat.js +37 -37
  75. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -7
  76. package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +3 -4
  77. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +76 -78
  78. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +6 -8
  79. package/lib/cjs/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.js +2 -3
  80. package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +2 -3
  81. package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +37 -40
  82. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +2 -3
  83. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +2 -3
  84. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +3 -5
  85. package/lib/cjs/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.js +2 -3
  86. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +3 -5
  87. package/lib/cjs/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.js +2 -3
  88. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +4 -6
  89. package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +2 -3
  90. package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +1 -2
  91. package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -4
  92. package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -4
  93. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +10 -12
  94. package/lib/cjs/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.js +2 -3
  95. package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +2 -3
  96. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -10
  97. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +4 -6
  98. package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +15 -17
  99. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +2 -3
  100. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +2 -3
  101. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +2 -3
  102. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +2 -3
  103. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +2 -3
  104. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +34 -37
  105. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +18 -21
  106. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -20
  107. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +21 -24
  108. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +20 -23
  109. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +4 -5
  110. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +4 -5
  111. package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +1 -2
  112. package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +2 -3
  113. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +3 -4
  114. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.js +2 -3
  115. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.js +2 -3
  116. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -3
  117. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -4
  118. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -3
  119. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +2 -3
  120. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.js +2 -3
  121. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -3
  122. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -15
  123. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +10 -12
  124. package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
  125. package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +10 -13
  126. package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
  127. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +3 -4
  128. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +7 -8
  129. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +2 -3
  130. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +7 -8
  131. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -4
  132. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -4
  133. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -4
  134. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -4
  135. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -4
  136. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -4
  137. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -4
  138. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -4
  139. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +9 -11
  140. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +1 -2
  141. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +1 -2
  142. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +2 -3
  143. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +2 -3
  144. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +60 -42
  145. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +2 -4
  146. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +8 -9
  147. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -1
  148. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +4 -4
  149. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +11 -12
  150. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +2 -3
  151. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +2 -3
  152. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +3 -4
  153. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +4 -5
  154. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +3 -4
  155. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +3 -4
  156. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +2 -3
  157. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +1 -1
  158. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
  159. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.js +2 -3
  160. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.js +2 -3
  161. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.js +2 -3
  162. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.js +2 -3
  163. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.js +2 -3
  164. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.js +2 -3
  165. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.js +2 -3
  166. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.js +2 -3
  167. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.js +2 -3
  168. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +2 -3
  169. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +2 -3
  170. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +2 -3
  171. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +2 -3
  172. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +2 -3
  173. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +2 -3
  174. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.js +2 -3
  175. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
  176. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
  177. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.js +2 -3
  178. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.js +2 -3
  179. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.js +2 -3
  180. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +2 -3
  181. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.js +2 -3
  182. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
  183. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
  184. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
  185. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +1 -1
  186. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -4
  187. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
  188. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +1 -2
  189. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +2 -3
  190. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -4
  191. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -8
  192. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/callActionMiddleware.js +1 -2
  193. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -4
  194. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
  195. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +9 -10
  196. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +3 -4
  197. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +1 -2
  198. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +4 -5
  199. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -4
  200. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +4 -5
  201. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
  202. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -4
  203. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +1 -2
  204. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +2 -3
  205. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +8 -10
  206. package/lib/cjs/contexts/ChatAdapterStore.js +1 -2
  207. package/lib/cjs/contexts/ChatContextStore.js +1 -2
  208. package/lib/cjs/contexts/ChatSDKStore.js +1 -2
  209. package/lib/cjs/contexts/FacadeChatSDKStore.js +1 -2
  210. package/lib/cjs/contexts/common/ConversationState.js +3 -4
  211. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +211 -4
  212. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
  213. package/lib/cjs/contexts/common/StartChatFailureType.js +3 -4
  214. package/lib/cjs/controller/componentController.js +1 -1
  215. package/lib/cjs/firstresponselatency/Constants.js +3 -4
  216. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +9 -11
  217. package/lib/cjs/firstresponselatency/util.js +8 -8
  218. package/lib/cjs/hooks/useChatAdapterStore.js +1 -2
  219. package/lib/cjs/hooks/useChatContextStore.js +1 -2
  220. package/lib/cjs/hooks/useChatSDKStore.js +1 -2
  221. package/lib/cjs/hooks/useFacadeChatSDKStore.js +1 -2
  222. package/lib/cjs/hooks/useWindowDimensions.js +1 -1
  223. package/lib/cjs/index.js +1 -1
  224. package/lib/cjs/plugins/createChatTranscript.js +25 -28
  225. package/lib/cjs/plugins/newMessageEventHandler.js +2 -2
  226. package/lib/esm/common/Constants.js +40 -39
  227. package/lib/esm/common/KeyCodes.js +9 -9
  228. package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -6
  229. package/lib/esm/common/facades/FacadeChatSDK.js +9 -10
  230. package/lib/esm/common/storage/default/defaultCacheManager.js +6 -6
  231. package/lib/esm/common/telemetry/ScenarioMarker.js +9 -10
  232. package/lib/esm/common/telemetry/TelemetryConstants.js +33 -25
  233. package/lib/esm/common/telemetry/TelemetryHelper.js +38 -37
  234. package/lib/esm/common/telemetry/TelemetryManager.js +19 -20
  235. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +5 -5
  236. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
  237. package/lib/esm/common/utils/SecureEventBus.js +9 -8
  238. package/lib/esm/common/utils.js +10 -11
  239. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +12 -12
  240. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +7 -7
  241. package/lib/esm/components/citationpanestateful/CitationDim.js +1 -1
  242. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +0 -1
  243. package/lib/esm/components/draggable/DraggableEventEmitter.js +1 -1
  244. package/lib/esm/components/draggable/DraggableEventNames.js +3 -3
  245. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -5
  246. package/lib/esm/components/errorboundary/ErrorBoundary.js +15 -17
  247. package/lib/esm/components/footerstateful/FooterStateful.js +6 -6
  248. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +3 -3
  249. package/lib/esm/components/headerstateful/HeaderStateful.js +10 -10
  250. package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -3
  251. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +9 -12
  252. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +23 -28
  253. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +8 -9
  254. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +7 -8
  255. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +7 -8
  256. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -8
  257. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +10 -14
  258. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +3 -3
  259. package/lib/esm/components/livechatwidget/common/Deferred.js +8 -10
  260. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +10 -12
  261. package/lib/esm/components/livechatwidget/common/authHelper.js +1 -1
  262. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
  263. package/lib/esm/components/livechatwidget/common/createAdapter.js +3 -3
  264. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
  265. package/lib/esm/components/livechatwidget/common/createMarkdown.js +0 -1
  266. package/lib/esm/components/livechatwidget/common/endChat.js +12 -13
  267. package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
  268. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -16
  269. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
  270. package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +3 -3
  271. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +6 -6
  272. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
  273. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
  274. package/lib/esm/components/livechatwidget/common/startChat.js +37 -37
  275. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +6 -7
  276. package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
  277. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +73 -73
  278. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +3 -3
  279. package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +34 -35
  280. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +1 -1
  281. package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -3
  282. package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -3
  283. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -7
  284. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +5 -5
  285. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +1 -1
  286. package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +12 -12
  287. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +31 -32
  288. package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +15 -17
  289. package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +15 -17
  290. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +18 -20
  291. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +18 -20
  292. package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +3 -3
  293. package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +3 -3
  294. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +1 -1
  295. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +10 -12
  296. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +7 -8
  297. package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
  298. package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +7 -7
  299. package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
  300. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -1
  301. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -6
  302. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -6
  303. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -3
  304. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -3
  305. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -3
  306. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -3
  307. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -3
  308. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -3
  309. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -3
  310. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -3
  311. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +7 -8
  312. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +28 -35
  313. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +6 -6
  314. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -3
  315. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +9 -9
  316. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +1 -1
  317. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +3 -3
  318. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +1 -1
  319. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +1 -1
  320. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
  321. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
  322. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
  323. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -1
  324. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +0 -1
  325. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +2 -2
  326. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -6
  327. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +2 -2
  328. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
  329. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +8 -8
  330. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +2 -2
  331. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -3
  332. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +2 -2
  333. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +2 -2
  334. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
  335. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +2 -2
  336. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +6 -7
  337. package/lib/esm/contexts/common/ConversationState.js +3 -3
  338. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +211 -3
  339. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
  340. package/lib/esm/contexts/common/StartChatFailureType.js +3 -3
  341. package/lib/esm/controller/componentController.js +1 -2
  342. package/lib/esm/firstresponselatency/Constants.js +3 -3
  343. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +7 -8
  344. package/lib/esm/firstresponselatency/util.js +8 -8
  345. package/lib/esm/plugins/createChatTranscript.js +23 -25
  346. package/lib/esm/plugins/newMessageEventHandler.js +2 -2
  347. package/package.json +28 -22
@@ -29,7 +29,7 @@ export const NotificationPaneStateful = props => {
29
29
  const [state, dispatch] = useChatContextStore();
30
30
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
31
  const [adapter] = useChatAdapterStore();
32
- const localConfirmationPaneState = useRef(state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.confirmationState);
32
+ const localConfirmationPaneState = useRef(state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.confirmationState);
33
33
  const onCloseChatClick = async () => {
34
34
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
35
35
  Event: TelemetryEvent.NotificationCloseChatButtonClicked,
@@ -49,8 +49,8 @@ export const NotificationPaneStateful = props => {
49
49
  };
50
50
  useEffect(() => {
51
51
  var _state$domainStates2;
52
- localConfirmationPaneState.current = state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.confirmationState;
53
- }, [state === null || state === void 0 ? void 0 : (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.confirmationState]);
52
+ localConfirmationPaneState.current = state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.confirmationState;
53
+ }, [state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.confirmationState]);
54
54
  const {
55
55
  useDismissNotification
56
56
  } = hooks;
@@ -65,77 +65,77 @@ export const NotificationPaneStateful = props => {
65
65
 
66
66
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
67
  const populateTitleInternalProps = notificationProps => {
68
- var _notificationProps$co, _notificationProps$co2, _notificationProps$st, _notificationProps$st2, _notificationProps$st3, _defaultChatDisconnec;
68
+ var _notificationProps$co, _notificationProps$co2, _notificationProps$st, _notificationProps$st2, _defaultChatDisconnec;
69
69
  return {
70
70
  hideTitle: ((_notificationProps$co = notificationProps.controlProps) === null || _notificationProps$co === void 0 ? void 0 : _notificationProps$co.hideTitle) ?? defaultChatDisconnectControlProps.hideTitle,
71
71
  titleText: ((_notificationProps$co2 = notificationProps.controlProps) === null || _notificationProps$co2 === void 0 ? void 0 : _notificationProps$co2.titleText) ?? defaultChatDisconnectControlProps.titleText,
72
72
  titleStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.titleStyleProps, (_notificationProps$st = notificationProps.styleProps) === null || _notificationProps$st === void 0 ? void 0 : _notificationProps$st.titleStyleProps),
73
- titleClassName: ((_notificationProps$st2 = notificationProps.styleProps) === null || _notificationProps$st2 === void 0 ? void 0 : (_notificationProps$st3 = _notificationProps$st2.classNames) === null || _notificationProps$st3 === void 0 ? void 0 : _notificationProps$st3.titleClassName) ?? ((_defaultChatDisconnec = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec === void 0 ? void 0 : _defaultChatDisconnec.titleClassName)
73
+ titleClassName: ((_notificationProps$st2 = notificationProps.styleProps) === null || _notificationProps$st2 === void 0 || (_notificationProps$st2 = _notificationProps$st2.classNames) === null || _notificationProps$st2 === void 0 ? void 0 : _notificationProps$st2.titleClassName) ?? ((_defaultChatDisconnec = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec === void 0 ? void 0 : _defaultChatDisconnec.titleClassName)
74
74
  };
75
75
  };
76
76
 
77
77
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
78
  const populateSubtitleInternalProps = notificationProps => {
79
- var _notificationProps$co3, _notificationProps$co4, _notificationProps$st4, _notificationProps$st5, _notificationProps$st6, _defaultChatDisconnec2;
79
+ var _notificationProps$co3, _notificationProps$co4, _notificationProps$st3, _notificationProps$st4, _defaultChatDisconnec2;
80
80
  return {
81
81
  hideSubtitle: ((_notificationProps$co3 = notificationProps.controlProps) === null || _notificationProps$co3 === void 0 ? void 0 : _notificationProps$co3.hideSubtitle) ?? defaultChatDisconnectControlProps.hideSubtitle,
82
82
  subtitleText: ((_notificationProps$co4 = notificationProps.controlProps) === null || _notificationProps$co4 === void 0 ? void 0 : _notificationProps$co4.subtitleText) ?? defaultChatDisconnectControlProps.subtitleText,
83
- subtitleStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.subtitleStyleProps, (_notificationProps$st4 = notificationProps.styleProps) === null || _notificationProps$st4 === void 0 ? void 0 : _notificationProps$st4.subtitleStyleProps),
84
- subtitleClassName: ((_notificationProps$st5 = notificationProps.styleProps) === null || _notificationProps$st5 === void 0 ? void 0 : (_notificationProps$st6 = _notificationProps$st5.classNames) === null || _notificationProps$st6 === void 0 ? void 0 : _notificationProps$st6.subtitleClassName) ?? ((_defaultChatDisconnec2 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec2 === void 0 ? void 0 : _defaultChatDisconnec2.subtitleClassName)
83
+ subtitleStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.subtitleStyleProps, (_notificationProps$st3 = notificationProps.styleProps) === null || _notificationProps$st3 === void 0 ? void 0 : _notificationProps$st3.subtitleStyleProps),
84
+ subtitleClassName: ((_notificationProps$st4 = notificationProps.styleProps) === null || _notificationProps$st4 === void 0 || (_notificationProps$st4 = _notificationProps$st4.classNames) === null || _notificationProps$st4 === void 0 ? void 0 : _notificationProps$st4.subtitleClassName) ?? ((_defaultChatDisconnec2 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec2 === void 0 ? void 0 : _defaultChatDisconnec2.subtitleClassName)
85
85
  };
86
86
  };
87
87
 
88
88
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
89
89
  const populateHyperlinkInternalProps = notificationProps => {
90
- var _notificationProps$co5, _notificationProps$co6, _notificationProps$co7, _notificationProps$co8, _notificationProps$st7, _notificationProps$st8, _notificationProps$st9, _notificationProps$st10, _defaultChatDisconnec3;
90
+ var _notificationProps$co5, _notificationProps$co6, _notificationProps$co7, _notificationProps$co8, _notificationProps$st5, _notificationProps$st6, _notificationProps$st7, _defaultChatDisconnec3;
91
91
  return {
92
92
  hideHyperlink: ((_notificationProps$co5 = notificationProps.controlProps) === null || _notificationProps$co5 === void 0 ? void 0 : _notificationProps$co5.hideHyperlink) ?? defaultChatDisconnectControlProps.hideHyperlink,
93
93
  hyperlinkText: ((_notificationProps$co6 = notificationProps.controlProps) === null || _notificationProps$co6 === void 0 ? void 0 : _notificationProps$co6.hyperlinkText) ?? defaultChatDisconnectControlProps.hyperlinkText,
94
94
  hyperlinkAriaLabel: ((_notificationProps$co7 = notificationProps.controlProps) === null || _notificationProps$co7 === void 0 ? void 0 : _notificationProps$co7.hyperlinkAriaLabel) ?? defaultChatDisconnectControlProps.hyperlinkAriaLabel,
95
95
  hyperlinkHref: ((_notificationProps$co8 = notificationProps.controlProps) === null || _notificationProps$co8 === void 0 ? void 0 : _notificationProps$co8.hyperlinkHref) ?? defaultChatDisconnectControlProps.hyperlinkHref,
96
- hyperlinkStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkStyleProps, (_notificationProps$st7 = notificationProps.styleProps) === null || _notificationProps$st7 === void 0 ? void 0 : _notificationProps$st7.hyperlinkStyleProps),
97
- hyperlinkHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkHoverStyleProps, (_notificationProps$st8 = notificationProps.styleProps) === null || _notificationProps$st8 === void 0 ? void 0 : _notificationProps$st8.hyperlinkHoverStyleProps),
98
- hyperlinkClassName: ((_notificationProps$st9 = notificationProps.styleProps) === null || _notificationProps$st9 === void 0 ? void 0 : (_notificationProps$st10 = _notificationProps$st9.classNames) === null || _notificationProps$st10 === void 0 ? void 0 : _notificationProps$st10.hyperlinkClassName) ?? ((_defaultChatDisconnec3 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec3 === void 0 ? void 0 : _defaultChatDisconnec3.hyperlinkClassName)
96
+ hyperlinkStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkStyleProps, (_notificationProps$st5 = notificationProps.styleProps) === null || _notificationProps$st5 === void 0 ? void 0 : _notificationProps$st5.hyperlinkStyleProps),
97
+ hyperlinkHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkHoverStyleProps, (_notificationProps$st6 = notificationProps.styleProps) === null || _notificationProps$st6 === void 0 ? void 0 : _notificationProps$st6.hyperlinkHoverStyleProps),
98
+ hyperlinkClassName: ((_notificationProps$st7 = notificationProps.styleProps) === null || _notificationProps$st7 === void 0 || (_notificationProps$st7 = _notificationProps$st7.classNames) === null || _notificationProps$st7 === void 0 ? void 0 : _notificationProps$st7.hyperlinkClassName) ?? ((_defaultChatDisconnec3 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec3 === void 0 ? void 0 : _defaultChatDisconnec3.hyperlinkClassName)
99
99
  };
100
100
  };
101
101
 
102
102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
103
  const populateNotificationIconInternalProps = notificationProps => {
104
- var _notificationProps$co9, _notificationProps$co10, _notificationProps$st11, _notificationProps$st12, _notificationProps$st13, _defaultChatDisconnec4, _notificationProps$st14;
104
+ var _notificationProps$co9, _notificationProps$co0, _notificationProps$st8, _notificationProps$st9, _defaultChatDisconnec4, _notificationProps$st0;
105
105
  return {
106
106
  hideNotificationIcon: ((_notificationProps$co9 = notificationProps.controlProps) === null || _notificationProps$co9 === void 0 ? void 0 : _notificationProps$co9.hideIcon) ?? defaultChatDisconnectControlProps.hideIcon,
107
- notificationIconProps: Object.assign({}, defaultChatDisconnectControlProps.notificationIconProps, (_notificationProps$co10 = notificationProps.controlProps) === null || _notificationProps$co10 === void 0 ? void 0 : _notificationProps$co10.notificationIconProps),
108
- notificationIconStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconStyleProps, (_notificationProps$st11 = notificationProps.styleProps) === null || _notificationProps$st11 === void 0 ? void 0 : _notificationProps$st11.notificationIconStyleProps),
109
- notificationIconClassName: ((_notificationProps$st12 = notificationProps.styleProps) === null || _notificationProps$st12 === void 0 ? void 0 : (_notificationProps$st13 = _notificationProps$st12.classNames) === null || _notificationProps$st13 === void 0 ? void 0 : _notificationProps$st13.notificationIconClassName) ?? ((_defaultChatDisconnec4 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec4 === void 0 ? void 0 : _defaultChatDisconnec4.notificationIconClassName),
110
- notificationIconContainerStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconContainerStyleProps, (_notificationProps$st14 = notificationProps.styleProps) === null || _notificationProps$st14 === void 0 ? void 0 : _notificationProps$st14.notificationIconContainerStyleProps)
107
+ notificationIconProps: Object.assign({}, defaultChatDisconnectControlProps.notificationIconProps, (_notificationProps$co0 = notificationProps.controlProps) === null || _notificationProps$co0 === void 0 ? void 0 : _notificationProps$co0.notificationIconProps),
108
+ notificationIconStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconStyleProps, (_notificationProps$st8 = notificationProps.styleProps) === null || _notificationProps$st8 === void 0 ? void 0 : _notificationProps$st8.notificationIconStyleProps),
109
+ notificationIconClassName: ((_notificationProps$st9 = notificationProps.styleProps) === null || _notificationProps$st9 === void 0 || (_notificationProps$st9 = _notificationProps$st9.classNames) === null || _notificationProps$st9 === void 0 ? void 0 : _notificationProps$st9.notificationIconClassName) ?? ((_defaultChatDisconnec4 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec4 === void 0 ? void 0 : _defaultChatDisconnec4.notificationIconClassName),
110
+ notificationIconContainerStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconContainerStyleProps, (_notificationProps$st0 = notificationProps.styleProps) === null || _notificationProps$st0 === void 0 ? void 0 : _notificationProps$st0.notificationIconContainerStyleProps)
111
111
  };
112
112
  };
113
113
 
114
114
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
115
115
  const populateDismissButtonInternalProps = notificationProps => {
116
- var _notificationProps$co11, _notificationProps$co12, _notificationProps$st15, _notificationProps$st16, _notificationProps$st17, _notificationProps$st18, _defaultChatDisconnec5;
116
+ var _notificationProps$co1, _notificationProps$co10, _notificationProps$st1, _notificationProps$st10, _notificationProps$st11, _defaultChatDisconnec5;
117
117
  return {
118
- hideDismissButton: ((_notificationProps$co11 = notificationProps.controlProps) === null || _notificationProps$co11 === void 0 ? void 0 : _notificationProps$co11.hideDismissButton) ?? defaultChatDisconnectControlProps.hideDismissButton,
118
+ hideDismissButton: ((_notificationProps$co1 = notificationProps.controlProps) === null || _notificationProps$co1 === void 0 ? void 0 : _notificationProps$co1.hideDismissButton) ?? defaultChatDisconnectControlProps.hideDismissButton,
119
119
  dismissButtonProps: Object.assign({
120
120
  onClick: handleDismissNotification
121
- }, defaultChatDisconnectControlProps.dismissButtonProps, (_notificationProps$co12 = notificationProps.controlProps) === null || _notificationProps$co12 === void 0 ? void 0 : _notificationProps$co12.dismissButtonProps),
122
- dismissButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonStyleProps, (_notificationProps$st15 = notificationProps.styleProps) === null || _notificationProps$st15 === void 0 ? void 0 : _notificationProps$st15.dismissButtonStyleProps),
123
- dismissButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonHoverStyleProps, (_notificationProps$st16 = notificationProps.styleProps) === null || _notificationProps$st16 === void 0 ? void 0 : _notificationProps$st16.dismissButtonHoverStyleProps),
124
- dismissButtonClassName: ((_notificationProps$st17 = notificationProps.styleProps) === null || _notificationProps$st17 === void 0 ? void 0 : (_notificationProps$st18 = _notificationProps$st17.classNames) === null || _notificationProps$st18 === void 0 ? void 0 : _notificationProps$st18.dismissButtonClassName) ?? ((_defaultChatDisconnec5 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec5 === void 0 ? void 0 : _defaultChatDisconnec5.dismissButtonClassName)
121
+ }, defaultChatDisconnectControlProps.dismissButtonProps, (_notificationProps$co10 = notificationProps.controlProps) === null || _notificationProps$co10 === void 0 ? void 0 : _notificationProps$co10.dismissButtonProps),
122
+ dismissButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonStyleProps, (_notificationProps$st1 = notificationProps.styleProps) === null || _notificationProps$st1 === void 0 ? void 0 : _notificationProps$st1.dismissButtonStyleProps),
123
+ dismissButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonHoverStyleProps, (_notificationProps$st10 = notificationProps.styleProps) === null || _notificationProps$st10 === void 0 ? void 0 : _notificationProps$st10.dismissButtonHoverStyleProps),
124
+ dismissButtonClassName: ((_notificationProps$st11 = notificationProps.styleProps) === null || _notificationProps$st11 === void 0 || (_notificationProps$st11 = _notificationProps$st11.classNames) === null || _notificationProps$st11 === void 0 ? void 0 : _notificationProps$st11.dismissButtonClassName) ?? ((_defaultChatDisconnec5 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec5 === void 0 ? void 0 : _defaultChatDisconnec5.dismissButtonClassName)
125
125
  };
126
126
  };
127
127
 
128
128
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
129
129
  const populateCloseChatButtonInternalProps = notificationProps => {
130
- var _notificationProps$co13, _notificationProps$co14, _notificationProps$st19, _notificationProps$st20, _notificationProps$st21, _notificationProps$st22, _defaultChatDisconnec6;
130
+ var _notificationProps$co11, _notificationProps$co12, _notificationProps$st12, _notificationProps$st13, _notificationProps$st14, _defaultChatDisconnec6;
131
131
  return {
132
- hideCloseChatButton: ((_notificationProps$co13 = notificationProps.controlProps) === null || _notificationProps$co13 === void 0 ? void 0 : _notificationProps$co13.hideCloseChatButton) ?? defaultChatDisconnectControlProps.hideCloseChatButton,
132
+ hideCloseChatButton: ((_notificationProps$co11 = notificationProps.controlProps) === null || _notificationProps$co11 === void 0 ? void 0 : _notificationProps$co11.hideCloseChatButton) ?? defaultChatDisconnectControlProps.hideCloseChatButton,
133
133
  closeChatButtonProps: Object.assign({
134
134
  onClick: onCloseChatClick
135
- }, defaultChatDisconnectControlProps.closeChatButtonProps, (_notificationProps$co14 = notificationProps.controlProps) === null || _notificationProps$co14 === void 0 ? void 0 : _notificationProps$co14.closeChatButtonProps),
136
- closeChatButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonStyleProps, (_notificationProps$st19 = notificationProps.styleProps) === null || _notificationProps$st19 === void 0 ? void 0 : _notificationProps$st19.closeChatButtonStyleProps),
137
- closeChatButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonHoverStyleProps, (_notificationProps$st20 = notificationProps.styleProps) === null || _notificationProps$st20 === void 0 ? void 0 : _notificationProps$st20.closeChatButtonHoverStyleProps),
138
- closeChatButtonClassName: ((_notificationProps$st21 = notificationProps.styleProps) === null || _notificationProps$st21 === void 0 ? void 0 : (_notificationProps$st22 = _notificationProps$st21.classNames) === null || _notificationProps$st22 === void 0 ? void 0 : _notificationProps$st22.closeChatButtonClassName) ?? ((_defaultChatDisconnec6 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec6 === void 0 ? void 0 : _defaultChatDisconnec6.closeChatButtonClassName)
135
+ }, defaultChatDisconnectControlProps.closeChatButtonProps, (_notificationProps$co12 = notificationProps.controlProps) === null || _notificationProps$co12 === void 0 ? void 0 : _notificationProps$co12.closeChatButtonProps),
136
+ closeChatButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonStyleProps, (_notificationProps$st12 = notificationProps.styleProps) === null || _notificationProps$st12 === void 0 ? void 0 : _notificationProps$st12.closeChatButtonStyleProps),
137
+ closeChatButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonHoverStyleProps, (_notificationProps$st13 = notificationProps.styleProps) === null || _notificationProps$st13 === void 0 ? void 0 : _notificationProps$st13.closeChatButtonHoverStyleProps),
138
+ closeChatButtonClassName: ((_notificationProps$st14 = notificationProps.styleProps) === null || _notificationProps$st14 === void 0 || (_notificationProps$st14 = _notificationProps$st14.classNames) === null || _notificationProps$st14 === void 0 ? void 0 : _notificationProps$st14.closeChatButtonClassName) ?? ((_defaultChatDisconnec6 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec6 === void 0 ? void 0 : _defaultChatDisconnec6.closeChatButtonClassName)
139
139
  };
140
140
  };
141
141
  let genericPropsObj = {};
@@ -143,18 +143,18 @@ export const NotificationPaneStateful = props => {
143
143
  // Populate INotificationPaneInternal after merging customized props with default props
144
144
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
145
  const populateInternalProps = notificationProps => {
146
- var _notificationProps$st23, _notificationProps$st24, _notificationProps$st25, _defaultChatDisconnec7, _notificationProps$st26, _notificationProps$st27;
146
+ var _notificationProps$st15, _notificationProps$st16, _defaultChatDisconnec7, _notificationProps$st17, _notificationProps$st18;
147
147
  if (!notificationProps) {
148
148
  notificationProps = {};
149
149
  }
150
150
  genericPropsObj = {
151
151
  id: notificationProps.id ?? NotificationPaneConstants.DefaultNotificationPaneId,
152
152
  dir: notificationProps.dir,
153
- generalStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.generalStyleProps, (_notificationProps$st23 = notificationProps.styleProps) === null || _notificationProps$st23 === void 0 ? void 0 : _notificationProps$st23.generalStyleProps),
154
- containerClassName: ((_notificationProps$st24 = notificationProps.styleProps) === null || _notificationProps$st24 === void 0 ? void 0 : (_notificationProps$st25 = _notificationProps$st24.classNames) === null || _notificationProps$st25 === void 0 ? void 0 : _notificationProps$st25.containerClassName) ?? ((_defaultChatDisconnec7 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec7 === void 0 ? void 0 : _defaultChatDisconnec7.containerClassName),
153
+ generalStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.generalStyleProps, (_notificationProps$st15 = notificationProps.styleProps) === null || _notificationProps$st15 === void 0 ? void 0 : _notificationProps$st15.generalStyleProps),
154
+ containerClassName: ((_notificationProps$st16 = notificationProps.styleProps) === null || _notificationProps$st16 === void 0 || (_notificationProps$st16 = _notificationProps$st16.classNames) === null || _notificationProps$st16 === void 0 ? void 0 : _notificationProps$st16.containerClassName) ?? ((_defaultChatDisconnec7 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec7 === void 0 ? void 0 : _defaultChatDisconnec7.containerClassName),
155
155
  componentOverrides: notificationProps.componentOverrides,
156
- infoGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.infoGroupStyleProps, (_notificationProps$st26 = notificationProps.styleProps) === null || _notificationProps$st26 === void 0 ? void 0 : _notificationProps$st26.infoGroupStyleProps),
157
- buttonGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.buttonGroupStyleProps, (_notificationProps$st27 = notificationProps.styleProps) === null || _notificationProps$st27 === void 0 ? void 0 : _notificationProps$st27.buttonGroupStyleProps),
156
+ infoGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.infoGroupStyleProps, (_notificationProps$st17 = notificationProps.styleProps) === null || _notificationProps$st17 === void 0 ? void 0 : _notificationProps$st17.infoGroupStyleProps),
157
+ buttonGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.buttonGroupStyleProps, (_notificationProps$st18 = notificationProps.styleProps) === null || _notificationProps$st18 === void 0 ? void 0 : _notificationProps$st18.buttonGroupStyleProps),
158
158
  ...populateTitleInternalProps(notificationProps),
159
159
  ...populateSubtitleInternalProps(notificationProps),
160
160
  ...populateHyperlinkInternalProps(notificationProps),
@@ -169,7 +169,6 @@ export const NotificationPaneStateful = props => {
169
169
  break;
170
170
  // TODO additional scenarios to be added...
171
171
  }
172
-
173
172
  useEffect(() => {
174
173
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
175
174
  Event: TelemetryEvent.UXNotificationPaneCompleted,
@@ -38,7 +38,7 @@ export const PostChatSurveyPaneStateful = props => {
38
38
  display: state.appStates.isMinimized ? "none" : "contents"
39
39
  });
40
40
  let surveyInviteLink = "";
41
- const surveyMode = (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.selectedSurveyMode) === PostChatSurveyMode.Embed;
41
+ const surveyMode = (state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.selectedSurveyMode) === PostChatSurveyMode.Embed;
42
42
  if ((_state$domainStates$p = state.domainStates.postChatContext) !== null && _state$domainStates$p !== void 0 && _state$domainStates$p.botSurveyInviteLink &&
43
43
  // Bot survey enabled
44
44
  state.appStates.postChatParticipantType === ParticipantType.Bot) {
@@ -1,7 +1,7 @@
1
- export let CustomerVoiceEvents;
2
- (function (CustomerVoiceEvents) {
1
+ export let CustomerVoiceEvents = /*#__PURE__*/function (CustomerVoiceEvents) {
3
2
  CustomerVoiceEvents["ResponsePageLoaded"] = "ResponsePageLoaded";
4
3
  CustomerVoiceEvents["FormResponseSubmitted"] = "FormResponseSubmitted";
5
4
  CustomerVoiceEvents["FormResponseError"] = "FormResponseError";
6
5
  CustomerVoiceEvents["FormsError"] = "FormsError";
7
- })(CustomerVoiceEvents || (CustomerVoiceEvents = {}));
6
+ return CustomerVoiceEvents;
7
+ }({});
@@ -1,5 +1,5 @@
1
- export let PostChatSurveyMode;
2
- (function (PostChatSurveyMode) {
1
+ export let PostChatSurveyMode = /*#__PURE__*/function (PostChatSurveyMode) {
3
2
  PostChatSurveyMode["Embed"] = "192350000";
4
3
  PostChatSurveyMode["Link"] = "192350001";
5
- })(PostChatSurveyMode || (PostChatSurveyMode = {}));
4
+ return PostChatSurveyMode;
5
+ }({});
@@ -14,7 +14,7 @@ let uiTimer;
14
14
 
15
15
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
16
  export const PreChatSurveyPaneStateful = props => {
17
- var _surveyProps$stylePro, _props$surveyProps, _props$surveyProps$co;
17
+ var _surveyProps$stylePro, _props$surveyProps;
18
18
  useEffect(() => {
19
19
  uiTimer = createTimer();
20
20
  TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
@@ -33,7 +33,7 @@ export const PreChatSurveyPaneStateful = props => {
33
33
  surveyProps,
34
34
  initStartChat
35
35
  } = props;
36
- const generalStyleProps = Object.assign({}, defaultGeneralPreChatSurveyPaneStyleProps, surveyProps === null || surveyProps === void 0 ? void 0 : (_surveyProps$stylePro = surveyProps.styleProps) === null || _surveyProps$stylePro === void 0 ? void 0 : _surveyProps$stylePro.generalStyleProps, {
36
+ const generalStyleProps = Object.assign({}, defaultGeneralPreChatSurveyPaneStyleProps, surveyProps === null || surveyProps === void 0 || (_surveyProps$stylePro = surveyProps.styleProps) === null || _surveyProps$stylePro === void 0 ? void 0 : _surveyProps$stylePro.generalStyleProps, {
37
37
  display: state.appStates.isMinimized ? "none" : ""
38
38
  });
39
39
 
@@ -63,7 +63,7 @@ export const PreChatSurveyPaneStateful = props => {
63
63
  });
64
64
  }
65
65
  };
66
- const requiredFieldMissingMessage = ((_props$surveyProps = props.surveyProps) === null || _props$surveyProps === void 0 ? void 0 : (_props$surveyProps$co = _props$surveyProps.controlProps) === null || _props$surveyProps$co === void 0 ? void 0 : _props$surveyProps$co.requiredFieldMissingMessage) ?? defaultPreChatSurveyLocalizedTexts.PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE;
66
+ const requiredFieldMissingMessage = ((_props$surveyProps = props.surveyProps) === null || _props$surveyProps === void 0 || (_props$surveyProps = _props$surveyProps.controlProps) === null || _props$surveyProps === void 0 ? void 0 : _props$surveyProps.requiredFieldMissingMessage) ?? defaultPreChatSurveyLocalizedTexts.PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE;
67
67
  const controlProps = {
68
68
  id: "oc-lcw-prechatsurvey-pane",
69
69
  dir: state.domainStates.globalDir,
@@ -83,16 +83,16 @@ export const PreChatSurveyPaneStateful = props => {
83
83
  payload: ConversationState.Loading
84
84
  });
85
85
  try {
86
- var _state$domainStates, _state$domainStates$t, _state$domainStates$t2, _persistedState$domai, _persistedState$appSt, _state$appStates;
87
- const widgetInstanceId = getWidgetCacheId(((_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : (_state$domainStates$t = _state$domainStates.telemetryInternalData) === null || _state$domainStates$t === void 0 ? void 0 : _state$domainStates$t.orgId) ?? "", ((_state$domainStates$t2 = state.domainStates.telemetryInternalData) === null || _state$domainStates$t2 === void 0 ? void 0 : _state$domainStates$t2.widgetId) ?? "", state.domainStates.widgetInstanceId ?? "");
86
+ var _state$domainStates, _state$domainStates$t, _persistedState$domai, _persistedState$appSt, _state$appStates;
87
+ const widgetInstanceId = getWidgetCacheId(((_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.telemetryInternalData) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.orgId) ?? "", ((_state$domainStates$t = state.domainStates.telemetryInternalData) === null || _state$domainStates$t === void 0 ? void 0 : _state$domainStates$t.widgetId) ?? "", state.domainStates.widgetInstanceId ?? "");
88
88
  const persistedState = getStateFromCache(widgetInstanceId);
89
89
  let optionalParams = {};
90
90
 
91
91
  //Connect to Active chats and chat is not popout
92
- if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai = persistedState.domainStates) === null || _persistedState$domai === void 0 ? void 0 : _persistedState$domai.liveChatContext) && (persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$appSt = persistedState.appStates) === null || _persistedState$appSt === void 0 ? void 0 : _persistedState$appSt.conversationState) === ConversationState.Active && (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.hideStartChatButton) === false) {
92
+ if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0 || (_persistedState$domai = persistedState.domainStates) === null || _persistedState$domai === void 0 ? void 0 : _persistedState$domai.liveChatContext) && (persistedState === null || persistedState === void 0 || (_persistedState$appSt = persistedState.appStates) === null || _persistedState$appSt === void 0 ? void 0 : _persistedState$appSt.conversationState) === ConversationState.Active && (state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.hideStartChatButton) === false) {
93
93
  var _persistedState$domai2;
94
94
  optionalParams = {
95
- liveChatContext: persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.liveChatContext
95
+ liveChatContext: persistedState === null || persistedState === void 0 || (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.liveChatContext
96
96
  };
97
97
  await initStartChat(optionalParams, persistedState);
98
98
  } else {
@@ -54,19 +54,19 @@ export const ProactiveChatPaneStateful = props => {
54
54
  id: "oc-lcw-proactivechat",
55
55
  dir: state.domainStates.globalDir,
56
56
  onStart: async () => {
57
- var _state$domainStates$l, _state$domainStates$l2;
57
+ var _state$domainStates$l;
58
58
  setTimeoutRemoved(true);
59
59
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
60
60
  Event: TelemetryEvent.ProactiveChatAccepted,
61
61
  Description: "Proactive chat accepted."
62
62
  });
63
63
  if (state.appStates.proactiveChatStates.proactiveChatInNewWindow) {
64
- var _state$appStates, _state$appStates$proa;
64
+ var _state$appStates;
65
65
  // TODO: BroadcastService: replace with the sdk broadcast service, when in place
66
66
  const startPopoutChatEvent = {
67
67
  eventName: BroadcastEvent.ProactiveChatStartPopoutChat,
68
68
  payload: {
69
- enablePrechat: (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : (_state$appStates$proa = _state$appStates.proactiveChatStates) === null || _state$appStates$proa === void 0 ? void 0 : _state$appStates$proa.proactiveChatEnablePrechat) === true
69
+ enablePrechat: (state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 || (_state$appStates = _state$appStates.proactiveChatStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.proactiveChatEnablePrechat) === true
70
70
  }
71
71
  };
72
72
  BroadcastService.postMessage(startPopoutChatEvent);
@@ -74,7 +74,7 @@ export const ProactiveChatPaneStateful = props => {
74
74
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
75
75
  payload: ConversationState.Closed
76
76
  });
77
- } else if (((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.OutOfOperatingHours) === "True") {
77
+ } else if (((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 || (_state$domainStates$l = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l === void 0 ? void 0 : _state$domainStates$l.OutOfOperatingHours) === "True") {
78
78
  dispatch({
79
79
  type: LiveChatWidgetActionType.SET_OUTSIDE_OPERATING_HOURS,
80
80
  payload: true
@@ -111,7 +111,7 @@ export const ProactiveChatPaneStateful = props => {
111
111
  });
112
112
  },
113
113
  ...(proactiveChatProps === null || proactiveChatProps === void 0 ? void 0 : proactiveChatProps.controlProps),
114
- bodyTitleText: state.appStates.proactiveChatStates.proactiveChatBodyTitle ? state.appStates.proactiveChatStates.proactiveChatBodyTitle : proactiveChatProps === null || proactiveChatProps === void 0 ? void 0 : (_proactiveChatProps$c = proactiveChatProps.controlProps) === null || _proactiveChatProps$c === void 0 ? void 0 : _proactiveChatProps$c.bodyTitleText
114
+ bodyTitleText: state.appStates.proactiveChatStates.proactiveChatBodyTitle ? state.appStates.proactiveChatStates.proactiveChatBodyTitle : proactiveChatProps === null || proactiveChatProps === void 0 || (_proactiveChatProps$c = proactiveChatProps.controlProps) === null || _proactiveChatProps$c === void 0 ? void 0 : _proactiveChatProps$c.bodyTitleText
115
115
  };
116
116
  useEffect(() => {
117
117
  TelemetryTimers.ProactiveChatScreenTimer = createTimer();
@@ -43,7 +43,7 @@ export const ReconnectChatPaneStateful = props => {
43
43
  });
44
44
  if (state !== null && state !== void 0 && (_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.initialChatSdkRequestId) {
45
45
  var _state$domainStates2;
46
- chatSDK.requestId = state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.initialChatSdkRequestId;
46
+ chatSDK.requestId = state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.initialChatSdkRequestId;
47
47
  }
48
48
  const parseToJson = false;
49
49
  const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
@@ -13,7 +13,7 @@ import { defaultStartChatErrorPaneTitleStyleProps } from "./common/defaultStartC
13
13
  import useChatContextStore from "../../hooks/useChatContextStore";
14
14
  let uiTimer;
15
15
  export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
16
- var _startChatErrorPanePr, _startChatErrorPanePr2, _startChatErrorPanePr3, _startChatErrorPanePr4, _startChatErrorPanePr5, _startChatErrorPanePr6, _startChatErrorPanePr7, _startChatErrorPanePr8, _startChatErrorPanePr9, _startChatErrorPanePr10, _startChatErrorPanePr11;
16
+ var _startChatErrorPanePr, _startChatErrorPanePr2, _startChatErrorPanePr3, _startChatErrorPanePr4, _startChatErrorPanePr5, _startChatErrorPanePr6, _startChatErrorPanePr7, _startChatErrorPanePr8, _startChatErrorPanePr9, _startChatErrorPanePr0, _startChatErrorPanePr1;
17
17
  useEffect(() => {
18
18
  uiTimer = createTimer();
19
19
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
@@ -21,11 +21,11 @@ export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
21
21
  });
22
22
  }, []);
23
23
  const [state] = useChatContextStore();
24
- const generalStyleProps = Object.assign({}, defaultStartChatErrorPaneGeneralStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.generalStyleProps);
25
- const titleStyleProps = Object.assign({}, defaultStartChatErrorPaneTitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.titleStyleProps);
26
- const subtitleStyleProps = Object.assign({}, defaultStartChatErrorPaneSubtitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr3 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr3 === void 0 ? void 0 : _startChatErrorPanePr3.subtitleStyleProps);
27
- const iconStyleProps = Object.assign({}, defaultStartChatErrorPaneIconStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr4 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr4 === void 0 ? void 0 : _startChatErrorPanePr4.iconStyleProps);
28
- const iconImageProps = Object.assign({}, defaultStartChatErrorPaneIconImageStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr5 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr5 === void 0 ? void 0 : _startChatErrorPanePr5.iconImageProps);
24
+ const generalStyleProps = Object.assign({}, defaultStartChatErrorPaneGeneralStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.generalStyleProps);
25
+ const titleStyleProps = Object.assign({}, defaultStartChatErrorPaneTitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr2 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.titleStyleProps);
26
+ const subtitleStyleProps = Object.assign({}, defaultStartChatErrorPaneSubtitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr3 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr3 === void 0 ? void 0 : _startChatErrorPanePr3.subtitleStyleProps);
27
+ const iconStyleProps = Object.assign({}, defaultStartChatErrorPaneIconStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr4 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr4 === void 0 ? void 0 : _startChatErrorPanePr4.iconStyleProps);
28
+ const iconImageProps = Object.assign({}, defaultStartChatErrorPaneIconImageStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr5 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr5 === void 0 ? void 0 : _startChatErrorPanePr5.iconImageProps);
29
29
  const errorUIStyleProps = {
30
30
  generalStyleProps: generalStyleProps,
31
31
  titleStyleProps: titleStyleProps,
@@ -37,16 +37,16 @@ export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
37
37
  let errorPaneSubtitleText;
38
38
  switch (state.domainStates.startChatFailureType) {
39
39
  case StartChatFailureType.Unauthorized:
40
- errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr6 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr6 === void 0 ? void 0 : _startChatErrorPanePr6.unauthorizedTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedTitleText;
41
- errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr7 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr7 === void 0 ? void 0 : _startChatErrorPanePr7.unauthorizedSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedSubtitleText;
40
+ errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr6 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr6 === void 0 ? void 0 : _startChatErrorPanePr6.unauthorizedTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedTitleText;
41
+ errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr7 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr7 === void 0 ? void 0 : _startChatErrorPanePr7.unauthorizedSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedSubtitleText;
42
42
  break;
43
43
  case StartChatFailureType.AuthSetupError:
44
- errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr8 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr8 === void 0 ? void 0 : _startChatErrorPanePr8.authSetupErrorTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorTitleText;
45
- errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr9 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr9 === void 0 ? void 0 : _startChatErrorPanePr9.authSetupErrorSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorSubtitleText;
44
+ errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr8 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr8 === void 0 ? void 0 : _startChatErrorPanePr8.authSetupErrorTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorTitleText;
45
+ errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr9 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr9 === void 0 ? void 0 : _startChatErrorPanePr9.authSetupErrorSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorSubtitleText;
46
46
  break;
47
47
  default:
48
- errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr10 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr10 === void 0 ? void 0 : _startChatErrorPanePr10.titleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorTitleText;
49
- errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr11 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr11 === void 0 ? void 0 : _startChatErrorPanePr11.subtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorSubtitleText;
48
+ errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr0 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr0 === void 0 ? void 0 : _startChatErrorPanePr0.titleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorTitleText;
49
+ errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 || (_startChatErrorPanePr1 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr1 === void 0 ? void 0 : _startChatErrorPanePr1.subtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorSubtitleText;
50
50
  }
51
51
  const errorUIControlProps = {
52
52
  id: StartChatErrorPaneConstants.DefaultStartChatErrorPaneId,