@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.
- package/lib/cjs/assets/Audios.js +1 -2
- package/lib/cjs/assets/Icons.js +16 -32
- package/lib/cjs/common/Constants.js +58 -86
- package/lib/cjs/common/KeyCodes.js +9 -10
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +7 -8
- package/lib/cjs/common/facades/FacadeChatSDK.js +11 -13
- package/lib/cjs/common/storage/default/defaultCacheManager.js +7 -8
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +2 -3
- package/lib/cjs/common/telemetry/ScenarioMarker.js +10 -12
- package/lib/cjs/common/telemetry/TelemetryConstants.js +31 -29
- package/lib/cjs/common/telemetry/TelemetryHelper.js +39 -39
- package/lib/cjs/common/telemetry/TelemetryManager.js +21 -24
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryInternalData.js +2 -3
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -8
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
- package/lib/cjs/common/utils/SecureEventBus.js +36 -10
- package/lib/cjs/common/utils/dispatchCustomEvent.js +2 -3
- package/lib/cjs/common/utils/xssUtils.js +1 -1
- package/lib/cjs/common/utils.js +10 -11
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +15 -17
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +10 -12
- package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +2 -3
- package/lib/cjs/components/citationpanestateful/CitationDim.js +3 -4
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +3 -6
- package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +3 -5
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +3 -5
- package/lib/cjs/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.js +2 -3
- package/lib/cjs/components/dimlayer/DimLayer.js +1 -1
- package/lib/cjs/components/draggable/DraggableChatWidget.js +3 -5
- package/lib/cjs/components/draggable/DraggableEventEmitter.js +4 -6
- package/lib/cjs/components/draggable/DraggableEventNames.js +4 -5
- package/lib/cjs/components/draggable/DraggableEventReceiver.js +2 -4
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -10
- package/lib/cjs/components/errorboundary/ErrorBoundary.js +17 -21
- package/lib/cjs/components/footerstateful/FooterStateful.js +9 -11
- package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +2 -4
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +4 -4
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.js +1 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +13 -15
- package/lib/cjs/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.js +2 -3
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -8
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +10 -14
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +26 -32
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +10 -12
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +12 -17
- package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +4 -5
- package/lib/cjs/components/livechatwidget/common/Deferred.js +10 -13
- package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +12 -15
- package/lib/cjs/components/livechatwidget/common/authHelper.js +1 -1
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +3 -3
- package/lib/cjs/components/livechatwidget/common/createDownloadTranscriptProps.js +1 -2
- package/lib/cjs/components/livechatwidget/common/createFooter.js +1 -1
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +1 -2
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +2 -3
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +2 -3
- package/lib/cjs/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.js +2 -3
- package/lib/cjs/components/livechatwidget/common/endChat.js +12 -13
- package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +1 -1
- package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +17 -17
- package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +4 -5
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +6 -6
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
- package/lib/cjs/components/livechatwidget/common/startChat.js +37 -37
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -7
- package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +3 -4
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +76 -78
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +6 -8
- package/lib/cjs/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +37 -40
- package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +2 -3
- package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +2 -3
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +3 -5
- package/lib/cjs/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +3 -5
- package/lib/cjs/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +4 -6
- package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +1 -2
- package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -4
- package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -4
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +10 -12
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.js +2 -3
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +2 -3
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -10
- package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +4 -6
- package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +15 -17
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +34 -37
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +18 -21
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -20
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +21 -24
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +20 -23
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -15
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +10 -12
- package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +10 -13
- package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +9 -11
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +60 -42
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +2 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +8 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +4 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +11 -12
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/callActionMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +9 -10
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +8 -10
- package/lib/cjs/contexts/ChatAdapterStore.js +1 -2
- package/lib/cjs/contexts/ChatContextStore.js +1 -2
- package/lib/cjs/contexts/ChatSDKStore.js +1 -2
- package/lib/cjs/contexts/FacadeChatSDKStore.js +1 -2
- package/lib/cjs/contexts/common/ConversationState.js +3 -4
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +211 -4
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
- package/lib/cjs/contexts/common/StartChatFailureType.js +3 -4
- package/lib/cjs/controller/componentController.js +1 -1
- package/lib/cjs/firstresponselatency/Constants.js +3 -4
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +9 -11
- package/lib/cjs/firstresponselatency/util.js +8 -8
- package/lib/cjs/hooks/useChatAdapterStore.js +1 -2
- package/lib/cjs/hooks/useChatContextStore.js +1 -2
- package/lib/cjs/hooks/useChatSDKStore.js +1 -2
- package/lib/cjs/hooks/useFacadeChatSDKStore.js +1 -2
- package/lib/cjs/hooks/useWindowDimensions.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/plugins/createChatTranscript.js +25 -28
- package/lib/cjs/plugins/newMessageEventHandler.js +2 -2
- package/lib/esm/common/Constants.js +40 -39
- package/lib/esm/common/KeyCodes.js +9 -9
- package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -6
- package/lib/esm/common/facades/FacadeChatSDK.js +9 -10
- package/lib/esm/common/storage/default/defaultCacheManager.js +6 -6
- package/lib/esm/common/telemetry/ScenarioMarker.js +9 -10
- package/lib/esm/common/telemetry/TelemetryConstants.js +33 -25
- package/lib/esm/common/telemetry/TelemetryHelper.js +38 -37
- package/lib/esm/common/telemetry/TelemetryManager.js +19 -20
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +5 -5
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
- package/lib/esm/common/utils/SecureEventBus.js +9 -8
- package/lib/esm/common/utils.js +10 -11
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +12 -12
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +7 -7
- package/lib/esm/components/citationpanestateful/CitationDim.js +1 -1
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +0 -1
- package/lib/esm/components/draggable/DraggableEventEmitter.js +1 -1
- package/lib/esm/components/draggable/DraggableEventNames.js +3 -3
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -5
- package/lib/esm/components/errorboundary/ErrorBoundary.js +15 -17
- package/lib/esm/components/footerstateful/FooterStateful.js +6 -6
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +3 -3
- package/lib/esm/components/headerstateful/HeaderStateful.js +10 -10
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -3
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +9 -12
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +23 -28
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +8 -9
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +10 -14
- package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +3 -3
- package/lib/esm/components/livechatwidget/common/Deferred.js +8 -10
- package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +10 -12
- package/lib/esm/components/livechatwidget/common/authHelper.js +1 -1
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
- package/lib/esm/components/livechatwidget/common/createAdapter.js +3 -3
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +0 -1
- package/lib/esm/components/livechatwidget/common/endChat.js +12 -13
- package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -16
- package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +3 -3
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +6 -6
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
- package/lib/esm/components/livechatwidget/common/startChat.js +37 -37
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +6 -7
- package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +73 -73
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +3 -3
- package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +34 -35
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +1 -1
- package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -3
- package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -3
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -7
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +5 -5
- package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +1 -1
- package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +12 -12
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +31 -32
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +15 -17
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +15 -17
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +18 -20
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +18 -20
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +10 -12
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +7 -8
- package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +7 -7
- package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +7 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +28 -35
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +9 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +8 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +6 -7
- package/lib/esm/contexts/common/ConversationState.js +3 -3
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +211 -3
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
- package/lib/esm/contexts/common/StartChatFailureType.js +3 -3
- package/lib/esm/controller/componentController.js +1 -2
- package/lib/esm/firstresponselatency/Constants.js +3 -3
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +7 -8
- package/lib/esm/firstresponselatency/util.js +8 -8
- package/lib/esm/plugins/createChatTranscript.js +23 -25
- package/lib/esm/plugins/newMessageEventHandler.js +2 -2
- package/package.json +28 -22
|
@@ -44,7 +44,7 @@ import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontro
|
|
|
44
44
|
|
|
45
45
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
46
|
export const initWebChatComposer = (props, state, dispatch, facadeChatSDK, endChat) => {
|
|
47
|
-
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$webChatContain6, _state$domainStates$l4,
|
|
47
|
+
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$webChatContain6, _state$domainStates$l4, _props$webChatContain0, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain1, _state$domainStates$r3, _props$webChatContain10, _state$domainStates$l5, _props$webChatContain11, _props$webChatContain12, _state$domainStates$r4, _state$domainStates$r5, _props$webChatContain13, _defaultWebChatContai, _props$webChatContain14, _defaultWebChatContai2, _props$webChatContain15, _props$webChatContain16, _props$webChatContain17;
|
|
48
48
|
// Add a hook to make all links open a new window
|
|
49
49
|
postDomPurifyActivities();
|
|
50
50
|
const localizedTexts = {
|
|
@@ -135,10 +135,10 @@ export const initWebChatComposer = (props, state, dispatch, facadeChatSDK, endCh
|
|
|
135
135
|
const hyperlinkTextOverrideRenderer = new HyperlinkTextOverrideRenderer(hyperlinkTextOverride);
|
|
136
136
|
const markdownRenderers = [hyperlinkTextOverrideRenderer];
|
|
137
137
|
const renderMarkdown = text => {
|
|
138
|
-
var _props$webChatContain8
|
|
139
|
-
if ((_props$webChatContain8 = props.webChatContainerProps) !== null && _props$webChatContain8 !== void 0 && (_props$
|
|
140
|
-
var _props$
|
|
141
|
-
text = (_props$
|
|
138
|
+
var _props$webChatContain8;
|
|
139
|
+
if ((_props$webChatContain8 = props.webChatContainerProps) !== null && _props$webChatContain8 !== void 0 && (_props$webChatContain8 = _props$webChatContain8.webChatProps) !== null && _props$webChatContain8 !== void 0 && _props$webChatContain8.renderMarkdown) {
|
|
140
|
+
var _props$webChatContain9;
|
|
141
|
+
text = (_props$webChatContain9 = props.webChatContainerProps) === null || _props$webChatContain9 === void 0 ? void 0 : _props$webChatContain9.webChatProps.renderMarkdown(text);
|
|
142
142
|
} else {
|
|
143
143
|
const render = disableMarkdownMessageFormatting ? markdown.renderInline.bind(markdown) : markdown.render.bind(markdown);
|
|
144
144
|
text = render(text);
|
|
@@ -168,21 +168,21 @@ export const initWebChatComposer = (props, state, dispatch, facadeChatSDK, endCh
|
|
|
168
168
|
const webChatProps = {
|
|
169
169
|
...defaultWebChatContainerStatefulProps.webChatProps,
|
|
170
170
|
dir: state.domainStates.globalDir,
|
|
171
|
-
locale: changeLanguageCodeFormatForWebChat(getLocaleStringFromId((_state$domainStates$l4 = state.domainStates.liveChatConfig) === null || _state$domainStates$l4 === void 0
|
|
171
|
+
locale: changeLanguageCodeFormatForWebChat(getLocaleStringFromId((_state$domainStates$l4 = state.domainStates.liveChatConfig) === null || _state$domainStates$l4 === void 0 || (_state$domainStates$l4 = _state$domainStates$l4.ChatWidgetLanguage) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_localeid)),
|
|
172
172
|
store: webChatStore,
|
|
173
|
-
activityMiddleware: (_props$
|
|
174
|
-
attachmentMiddleware: (_props$
|
|
175
|
-
activityStatusMiddleware: (_props$
|
|
176
|
-
toastMiddleware: (_props$
|
|
173
|
+
activityMiddleware: (_props$webChatContain0 = props.webChatContainerProps) !== null && _props$webChatContain0 !== void 0 && (_props$webChatContain0 = _props$webChatContain0.renderingMiddlewareProps) !== null && _props$webChatContain0 !== void 0 && _props$webChatContain0.disableActivityMiddleware ? undefined : createActivityMiddleware(renderMarkdown, (_state$domainStates$r = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r === void 0 ? void 0 : _state$domainStates$r.systemMessageStyleProps, (_state$domainStates$r2 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r2 === void 0 ? void 0 : _state$domainStates$r2.userMessageStyleProps, localizedTexts),
|
|
174
|
+
attachmentMiddleware: (_props$webChatContain1 = props.webChatContainerProps) !== null && _props$webChatContain1 !== void 0 && (_props$webChatContain1 = _props$webChatContain1.renderingMiddlewareProps) !== null && _props$webChatContain1 !== void 0 && _props$webChatContain1.disableAttachmentMiddleware ? undefined : createAttachmentMiddleware(((_state$domainStates$r3 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r3 === void 0 || (_state$domainStates$r3 = _state$domainStates$r3.attachmentProps) === null || _state$domainStates$r3 === void 0 ? void 0 : _state$domainStates$r3.enableInlinePlaying) ?? defaultAttachmentProps.enableInlinePlaying),
|
|
175
|
+
activityStatusMiddleware: (_props$webChatContain10 = props.webChatContainerProps) !== null && _props$webChatContain10 !== void 0 && (_props$webChatContain10 = _props$webChatContain10.renderingMiddlewareProps) !== null && _props$webChatContain10 !== void 0 && _props$webChatContain10.disableActivityStatusMiddleware ? undefined : createActivityStatusMiddleware(getLocaleStringFromId((_state$domainStates$l5 = state.domainStates.liveChatConfig) === null || _state$domainStates$l5 === void 0 || (_state$domainStates$l5 = _state$domainStates$l5.ChatWidgetLanguage) === null || _state$domainStates$l5 === void 0 ? void 0 : _state$domainStates$l5.msdyn_localeid)),
|
|
176
|
+
toastMiddleware: (_props$webChatContain11 = props.webChatContainerProps) !== null && _props$webChatContain11 !== void 0 && (_props$webChatContain11 = _props$webChatContain11.renderingMiddlewareProps) !== null && _props$webChatContain11 !== void 0 && _props$webChatContain11.disableToastMiddleware ? undefined : createToastMiddleware(props.notificationPaneProps, endChat),
|
|
177
177
|
renderMarkdown,
|
|
178
|
-
avatarMiddleware: (_props$
|
|
179
|
-
groupActivitiesMiddleware: (_props$
|
|
180
|
-
typingIndicatorMiddleware: (_props$
|
|
178
|
+
avatarMiddleware: (_props$webChatContain12 = props.webChatContainerProps) !== null && _props$webChatContain12 !== void 0 && (_props$webChatContain12 = _props$webChatContain12.renderingMiddlewareProps) !== null && _props$webChatContain12 !== void 0 && _props$webChatContain12.disableAvatarMiddleware ? undefined : createAvatarMiddleware((_state$domainStates$r4 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r4 === void 0 ? void 0 : _state$domainStates$r4.avatarStyleProps, (_state$domainStates$r5 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r5 === void 0 ? void 0 : _state$domainStates$r5.avatarTextStyleProps),
|
|
179
|
+
groupActivitiesMiddleware: (_props$webChatContain13 = props.webChatContainerProps) !== null && _props$webChatContain13 !== void 0 && (_props$webChatContain13 = _props$webChatContain13.renderingMiddlewareProps) !== null && _props$webChatContain13 !== void 0 && _props$webChatContain13.disableGroupActivitiesMiddleware ? undefined : (_defaultWebChatContai = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.groupActivitiesMiddleware,
|
|
180
|
+
typingIndicatorMiddleware: (_props$webChatContain14 = props.webChatContainerProps) !== null && _props$webChatContain14 !== void 0 && (_props$webChatContain14 = _props$webChatContain14.renderingMiddlewareProps) !== null && _props$webChatContain14 !== void 0 && _props$webChatContain14.disableTypingIndicatorMiddleware ? undefined : (_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.typingIndicatorMiddleware,
|
|
181
181
|
onTelemetry: createWebChatTelemetry(),
|
|
182
|
-
cardActionMiddleware: createCardActionMiddleware(((_props$
|
|
182
|
+
cardActionMiddleware: createCardActionMiddleware(((_props$webChatContain15 = props.webChatContainerProps) === null || _props$webChatContain15 === void 0 ? void 0 : _props$webChatContain15.botMagicCode) || undefined),
|
|
183
183
|
sendTypingIndicator: true,
|
|
184
|
-
overrideLocalizedStrings: getOverriddenLocalizedStrings((_props$
|
|
185
|
-
...((_props$
|
|
184
|
+
overrideLocalizedStrings: getOverriddenLocalizedStrings((_props$webChatContain16 = props.webChatContainerProps) === null || _props$webChatContain16 === void 0 || (_props$webChatContain16 = _props$webChatContain16.webChatProps) === null || _props$webChatContain16 === void 0 ? void 0 : _props$webChatContain16.overrideLocalizedStrings),
|
|
185
|
+
...((_props$webChatContain17 = props.webChatContainerProps) === null || _props$webChatContain17 === void 0 ? void 0 : _props$webChatContain17.webChatProps)
|
|
186
186
|
};
|
|
187
187
|
return webChatProps;
|
|
188
188
|
};
|
|
@@ -9,13 +9,13 @@ export const isPostChatSurveyEnabled = async facadeChatSDK => {
|
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
11
|
export const getPostChatSurveyConfig = async facadeChatSDK => {
|
|
12
|
-
var _chatConfig$LiveWSAnd2, _chatConfig$LiveWSAnd3, _chatConfig$LiveWSAnd4, _chatConfig$LiveWSAnd5, _chatConfig$LiveWSAnd6
|
|
12
|
+
var _chatConfig$LiveWSAnd2, _chatConfig$LiveWSAnd3, _chatConfig$LiveWSAnd4, _chatConfig$LiveWSAnd5, _chatConfig$LiveWSAnd6;
|
|
13
13
|
const chatConfig = await facadeChatSDK.getLiveChatConfig();
|
|
14
14
|
const postChatEnabled = (_chatConfig$LiveWSAnd2 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd2 === void 0 ? void 0 : _chatConfig$LiveWSAnd2.msdyn_postconversationsurveyenable.toString().toLowerCase();
|
|
15
|
-
const agentSurveyMode = (_chatConfig$LiveWSAnd3 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd3 === void 0
|
|
16
|
-
const botSurveyMode = (_chatConfig$
|
|
17
|
-
const surveyProvider = (_chatConfig$
|
|
18
|
-
const isConversationalSurveyEnabled = (_chatConfig$
|
|
15
|
+
const agentSurveyMode = (_chatConfig$LiveWSAnd3 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd3 === void 0 || (_chatConfig$LiveWSAnd3 = _chatConfig$LiveWSAnd3.msdyn_postconversationsurveymode) === null || _chatConfig$LiveWSAnd3 === void 0 ? void 0 : _chatConfig$LiveWSAnd3.toString();
|
|
16
|
+
const botSurveyMode = (_chatConfig$LiveWSAnd4 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd4 === void 0 || (_chatConfig$LiveWSAnd4 = _chatConfig$LiveWSAnd4.msdyn_postconversationsurveybotsurveymode) === null || _chatConfig$LiveWSAnd4 === void 0 ? void 0 : _chatConfig$LiveWSAnd4.toString();
|
|
17
|
+
const surveyProvider = (_chatConfig$LiveWSAnd5 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd5 === void 0 || (_chatConfig$LiveWSAnd5 = _chatConfig$LiveWSAnd5.msdyn_surveyprovider) === null || _chatConfig$LiveWSAnd5 === void 0 ? void 0 : _chatConfig$LiveWSAnd5.toString();
|
|
18
|
+
const isConversationalSurveyEnabled = (_chatConfig$LiveWSAnd6 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd6 === void 0 || (_chatConfig$LiveWSAnd6 = _chatConfig$LiveWSAnd6.msdyn_isConversationalPostChatSurveyEnabled) === null || _chatConfig$LiveWSAnd6 === void 0 ? void 0 : _chatConfig$LiveWSAnd6.toString().toLowerCase();
|
|
19
19
|
return {
|
|
20
20
|
postChatEnabled: postChatEnabled === "true",
|
|
21
21
|
agentSurveyMode: agentSurveyMode,
|
|
@@ -44,18 +44,18 @@ export const shouldLoadPersistentChatHistory = extendedChatConfig => {
|
|
|
44
44
|
var _extendedChatConfig$L, _extendedChatConfig$L2, _extendedChatConfig$L3;
|
|
45
45
|
// CRITICAL: First check if conversation mode is persistent
|
|
46
46
|
// Only persistent mode ("192350001") should allow history loading
|
|
47
|
-
const isPersistentChatEnabledForWidget = isPersistentChatEnabled(extendedChatConfig === null || extendedChatConfig === void 0
|
|
47
|
+
const isPersistentChatEnabledForWidget = isPersistentChatEnabled(extendedChatConfig === null || extendedChatConfig === void 0 || (_extendedChatConfig$L = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L === void 0 ? void 0 : _extendedChatConfig$L.msdyn_conversationmode);
|
|
48
48
|
if (!isPersistentChatEnabledForWidget) {
|
|
49
49
|
return false;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Check if history is enabled in admin config (handles both boolean and string "true"/"false")
|
|
53
|
-
const isHistoryEnabledInConfig = parseBooleanFromConfig(extendedChatConfig === null || extendedChatConfig === void 0
|
|
53
|
+
const isHistoryEnabledInConfig = parseBooleanFromConfig(extendedChatConfig === null || extendedChatConfig === void 0 || (_extendedChatConfig$L2 = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L2 === void 0 ? void 0 : _extendedChatConfig$L2.msdyn_enablepersistentchatpreviousconversations);
|
|
54
54
|
if (!isHistoryEnabledInConfig) {
|
|
55
55
|
return false;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
// Check if history is enabled via feature flag (handles both boolean and string "true"/"false")
|
|
59
|
-
const isHistoryEnabledViaFCB = parseBooleanFromConfig(extendedChatConfig === null || extendedChatConfig === void 0
|
|
59
|
+
const isHistoryEnabledViaFCB = parseBooleanFromConfig(extendedChatConfig === null || extendedChatConfig === void 0 || (_extendedChatConfig$L3 = extendedChatConfig.LcwFcbConfiguration) === null || _extendedChatConfig$L3 === void 0 ? void 0 : _extendedChatConfig$L3.lcwPersistentChatHistoryEnabled);
|
|
60
60
|
return isHistoryEnabledViaFCB;
|
|
61
61
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const overridePropsOnMockIfApplicable = props => {
|
|
2
2
|
var _props$mock, _props$mock2;
|
|
3
|
-
if (props !== null && props !== void 0 && (_props$mock = props.mock) !== null && _props$mock !== void 0 && _props$mock.type && (props === null || props === void 0
|
|
4
|
-
var _props$mock3
|
|
3
|
+
if (props !== null && props !== void 0 && (_props$mock = props.mock) !== null && _props$mock !== void 0 && _props$mock.type && (props === null || props === void 0 || (_props$mock2 = props.mock) === null || _props$mock2 === void 0 ? void 0 : _props$mock2.type.toLowerCase()) === "designer") {
|
|
4
|
+
var _props$mock3;
|
|
5
5
|
if (!props.webChatContainerProps) {
|
|
6
6
|
props.webChatContainerProps = {};
|
|
7
7
|
}
|
|
@@ -17,7 +17,7 @@ const overridePropsOnMockIfApplicable = props => {
|
|
|
17
17
|
props.webChatContainerProps = {
|
|
18
18
|
...props.webChatContainerProps,
|
|
19
19
|
webChatProps: {
|
|
20
|
-
disabled: !(props !== null && props !== void 0 && (_props$mock3 = props.mock) !== null && _props$mock3 !== void 0 && (_props$mock3
|
|
20
|
+
disabled: !(props !== null && props !== void 0 && (_props$mock3 = props.mock) !== null && _props$mock3 !== void 0 && (_props$mock3 = _props$mock3.mockMessages) !== null && _props$mock3 !== void 0 && _props$mock3.length),
|
|
21
21
|
...props.webChatContainerProps.webChatProps,
|
|
22
22
|
overrideLocalizedStrings: {
|
|
23
23
|
TEXT_INPUT_PLACEHOLDER: "Send a message . . .",
|
|
@@ -12,9 +12,9 @@ import { handleStartChatError } from "./startChatErrorHandler";
|
|
|
12
12
|
// Return value: should start normal chat flow when reconnect is enabled
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
14
|
const handleChatReconnect = async (facadeChatSDK, props, dispatch, setAdapter, initStartChat, state) => {
|
|
15
|
-
var _props$chatConfig
|
|
15
|
+
var _props$chatConfig;
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
const isAuthenticatedChat = (_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig
|
|
17
|
+
const isAuthenticatedChat = (_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig = _props$chatConfig.LiveChatConfigAuthSettings) !== null && _props$chatConfig !== void 0 && _props$chatConfig.msdyn_javascriptclientfunction ? true : false;
|
|
18
18
|
// Get chat reconnect context
|
|
19
19
|
const reconnectChatContext = (await getChatReconnectContext(facadeChatSDK, props.chatConfig, props, isAuthenticatedChat, dispatch)) ?? {};
|
|
20
20
|
|
|
@@ -126,16 +126,16 @@ const redirectPage = (redirectURL, redirectInSameWindow) => {
|
|
|
126
126
|
};
|
|
127
127
|
const isReconnectEnabled = chatConfig => {
|
|
128
128
|
if (chatConfig) {
|
|
129
|
-
var _chatConfig$LiveWSAnd
|
|
130
|
-
const reconnectEnabled = ((_chatConfig$LiveWSAnd = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd === void 0
|
|
129
|
+
var _chatConfig$LiveWSAnd;
|
|
130
|
+
const reconnectEnabled = ((_chatConfig$LiveWSAnd = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd === void 0 || (_chatConfig$LiveWSAnd = _chatConfig$LiveWSAnd.msdyn_enablechatreconnect) === null || _chatConfig$LiveWSAnd === void 0 ? void 0 : _chatConfig$LiveWSAnd.toLowerCase()) === "true";
|
|
131
131
|
return reconnectEnabled;
|
|
132
132
|
}
|
|
133
133
|
return false;
|
|
134
134
|
};
|
|
135
135
|
const isPersistentEnabled = chatConfig => {
|
|
136
136
|
if (chatConfig) {
|
|
137
|
-
var _chatConfig$
|
|
138
|
-
const persistentEnabled = ((_chatConfig$
|
|
137
|
+
var _chatConfig$LiveWSAnd2;
|
|
138
|
+
const persistentEnabled = ((_chatConfig$LiveWSAnd2 = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd2 === void 0 || (_chatConfig$LiveWSAnd2 = _chatConfig$LiveWSAnd2.msdyn_conversationmode) === null || _chatConfig$LiveWSAnd2 === void 0 ? void 0 : _chatConfig$LiveWSAnd2.toLowerCase()) === ConversationMode.Persistent;
|
|
139
139
|
return persistentEnabled;
|
|
140
140
|
}
|
|
141
141
|
return false;
|
|
@@ -7,16 +7,16 @@ import { defaultTelemetryConfiguration } from "../../../common/telemetry/default
|
|
|
7
7
|
import { newGuid } from "../../../common/utils";
|
|
8
8
|
import { defaultAppInsightsConfig } from "../../../common/telemetry/defaultConfigs/defaultAppInsightsConfig";
|
|
9
9
|
export const registerTelemetryLoggers = (props, dispatch) => {
|
|
10
|
-
var _props$liveChatContex
|
|
10
|
+
var _props$liveChatContex;
|
|
11
11
|
const telemetryConfig = {
|
|
12
12
|
...defaultTelemetryConfiguration,
|
|
13
13
|
...props.telemetryConfig
|
|
14
14
|
};
|
|
15
|
-
if ((_props$liveChatContex = props.liveChatContextFromCache) !== null && _props$liveChatContex !== void 0 && (_props$
|
|
16
|
-
var _props$
|
|
17
|
-
TelemetryManager.InternalTelemetryData = (_props$
|
|
15
|
+
if ((_props$liveChatContex = props.liveChatContextFromCache) !== null && _props$liveChatContex !== void 0 && (_props$liveChatContex = _props$liveChatContex.domainStates) !== null && _props$liveChatContex !== void 0 && _props$liveChatContex.telemetryInternalData) {
|
|
16
|
+
var _props$liveChatContex2;
|
|
17
|
+
TelemetryManager.InternalTelemetryData = (_props$liveChatContex2 = props.liveChatContextFromCache) === null || _props$liveChatContex2 === void 0 || (_props$liveChatContex2 = _props$liveChatContex2.domainStates) === null || _props$liveChatContex2 === void 0 ? void 0 : _props$liveChatContex2.telemetryInternalData;
|
|
18
18
|
} else {
|
|
19
|
-
var _props$chatSDK, _props$
|
|
19
|
+
var _props$chatSDK, _props$chatSDK2, _props$chatSDK3, _props$chatSDK4, _props$chatSDK5, _props$chatSDK6, _props$chatSDK7, _props$chatSDK8, _props$chatSDK9;
|
|
20
20
|
let telemetryData = {
|
|
21
21
|
...defaultInternalTelemetryData,
|
|
22
22
|
telemetryConfig: Object.assign({}, defaultTelemetryConfiguration, telemetryConfig),
|
|
@@ -29,21 +29,21 @@ export const registerTelemetryLoggers = (props, dispatch) => {
|
|
|
29
29
|
//store AppInsights instrumentation key from chatConfig if present
|
|
30
30
|
telemetryData.chatConfigAppInsightsKey = (_props$chatConfig$Liv = props.chatConfig.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig$Liv === void 0 ? void 0 : _props$chatConfig$Liv.AppInsightsInstrumentationKey;
|
|
31
31
|
}
|
|
32
|
-
if (!((_props$chatSDK = props.chatSDK) !== null && _props$chatSDK !== void 0 && (_props$chatSDK
|
|
32
|
+
if (!((_props$chatSDK = props.chatSDK) !== null && _props$chatSDK !== void 0 && (_props$chatSDK = _props$chatSDK.omnichannelConfig) !== null && _props$chatSDK !== void 0 && _props$chatSDK.orgId) || ((_props$chatSDK2 = props.chatSDK) === null || _props$chatSDK2 === void 0 || (_props$chatSDK2 = _props$chatSDK2.omnichannelConfig) === null || _props$chatSDK2 === void 0 ? void 0 : _props$chatSDK2.orgId.trim().length) === 0) {
|
|
33
33
|
throw new Error("orgId is undefined in ChatSDK");
|
|
34
34
|
}
|
|
35
|
-
if (!((_props$chatSDK3 = props.chatSDK) !== null && _props$chatSDK3 !== void 0 && (_props$chatSDK3
|
|
35
|
+
if (!((_props$chatSDK3 = props.chatSDK) !== null && _props$chatSDK3 !== void 0 && (_props$chatSDK3 = _props$chatSDK3.omnichannelConfig) !== null && _props$chatSDK3 !== void 0 && _props$chatSDK3.widgetId) || ((_props$chatSDK4 = props.chatSDK) === null || _props$chatSDK4 === void 0 || (_props$chatSDK4 = _props$chatSDK4.omnichannelConfig) === null || _props$chatSDK4 === void 0 ? void 0 : _props$chatSDK4.widgetId.trim().length) === 0) {
|
|
36
36
|
throw new Error("widgetId is undefined in ChatSDK");
|
|
37
37
|
}
|
|
38
|
-
if (!((_props$chatSDK5 = props.chatSDK) !== null && _props$chatSDK5 !== void 0 && (_props$chatSDK5
|
|
38
|
+
if (!((_props$chatSDK5 = props.chatSDK) !== null && _props$chatSDK5 !== void 0 && (_props$chatSDK5 = _props$chatSDK5.omnichannelConfig) !== null && _props$chatSDK5 !== void 0 && _props$chatSDK5.orgUrl) || ((_props$chatSDK6 = props.chatSDK) === null || _props$chatSDK6 === void 0 || (_props$chatSDK6 = _props$chatSDK6.omnichannelConfig) === null || _props$chatSDK6 === void 0 ? void 0 : _props$chatSDK6.orgUrl.trim().length) === 0) {
|
|
39
39
|
throw new Error("orgUrl is undefined in ChatSDK");
|
|
40
40
|
}
|
|
41
41
|
telemetryData.OCChatSDKVersion = telemetryConfig.OCChatSDKVersion ?? "0.0.0-0";
|
|
42
42
|
telemetryData.chatComponentVersion = telemetryConfig.chatComponentVersion ?? "0.0.0-0";
|
|
43
43
|
telemetryData.chatWidgetVersion = telemetryConfig.chatWidgetVersion ?? "0.0.0-0";
|
|
44
|
-
telemetryData.orgId = (_props$chatSDK7 = props.chatSDK) === null || _props$chatSDK7 === void 0
|
|
45
|
-
telemetryData.widgetId = (_props$chatSDK8 = props.chatSDK) === null || _props$chatSDK8 === void 0
|
|
46
|
-
telemetryData.orgUrl = (_props$chatSDK9 = props.chatSDK) === null || _props$chatSDK9 === void 0
|
|
44
|
+
telemetryData.orgId = (_props$chatSDK7 = props.chatSDK) === null || _props$chatSDK7 === void 0 || (_props$chatSDK7 = _props$chatSDK7.omnichannelConfig) === null || _props$chatSDK7 === void 0 ? void 0 : _props$chatSDK7.orgId;
|
|
45
|
+
telemetryData.widgetId = (_props$chatSDK8 = props.chatSDK) === null || _props$chatSDK8 === void 0 || (_props$chatSDK8 = _props$chatSDK8.omnichannelConfig) === null || _props$chatSDK8 === void 0 ? void 0 : _props$chatSDK8.widgetId;
|
|
46
|
+
telemetryData.orgUrl = (_props$chatSDK9 = props.chatSDK) === null || _props$chatSDK9 === void 0 || (_props$chatSDK9 = _props$chatSDK9.omnichannelConfig) === null || _props$chatSDK9 === void 0 ? void 0 : _props$chatSDK9.orgUrl;
|
|
47
47
|
telemetryData.lcwRuntimeId = telemetryConfig.LCWRuntimeId ?? newGuid();
|
|
48
48
|
TelemetryManager.InternalTelemetryData = telemetryData;
|
|
49
49
|
dispatch({
|
|
@@ -13,16 +13,16 @@ let conversationDetails = undefined;
|
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
14
|
let postChatSurveyMode = undefined;
|
|
15
15
|
const getBotSurveyMode = (props, state) => {
|
|
16
|
-
var _props$chatConfig,
|
|
17
|
-
return ((_props$chatConfig = props.chatConfig) === null || _props$chatConfig === void 0
|
|
16
|
+
var _props$chatConfig, _state$domainStates$l;
|
|
17
|
+
return ((_props$chatConfig = props.chatConfig) === null || _props$chatConfig === void 0 || (_props$chatConfig = _props$chatConfig.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig === void 0 ? void 0 : _props$chatConfig.msdyn_postconversationsurveybotsurveymode) ?? ((_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.msdyn_postconversationsurveybotsurveymode);
|
|
18
18
|
};
|
|
19
19
|
const getUserSurveyMode = (props, state) => {
|
|
20
|
-
var _props$chatConfig2, _props$
|
|
21
|
-
if (!((_props$chatConfig2 = props.chatConfig) !== null && _props$chatConfig2 !== void 0 && (_props$chatConfig2
|
|
22
|
-
var _state$domainStates
|
|
23
|
-
return (state === null || state === void 0
|
|
20
|
+
var _props$chatConfig2, _props$chatConfig3;
|
|
21
|
+
if (!((_props$chatConfig2 = props.chatConfig) !== null && _props$chatConfig2 !== void 0 && (_props$chatConfig2 = _props$chatConfig2.LiveWSAndLiveChatEngJoin) !== null && _props$chatConfig2 !== void 0 && _props$chatConfig2.msdyn_postconversationsurveymode)) {
|
|
22
|
+
var _state$domainStates;
|
|
23
|
+
return (state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.liveChatConfig) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.LiveWSAndLiveChatEngJoin) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.msdyn_postconversationsurveymode) ?? PostChatSurveyMode.Embed;
|
|
24
24
|
}
|
|
25
|
-
return (_props$chatConfig3 = props.chatConfig) === null || _props$chatConfig3 === void 0
|
|
25
|
+
return (_props$chatConfig3 = props.chatConfig) === null || _props$chatConfig3 === void 0 || (_props$chatConfig3 = _props$chatConfig3.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig3 === void 0 ? void 0 : _props$chatConfig3.msdyn_postconversationsurveymode;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// Set Survey mode based on conversation ended by entity
|
|
@@ -128,8 +128,8 @@ const initiatePostChat = async (props, conversationDetailsParam, state, dispatch
|
|
|
128
128
|
|
|
129
129
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
130
130
|
const isPostChatEnabled = (props, state) => {
|
|
131
|
-
var _props$chatConfig4,
|
|
132
|
-
const isPostChatEnabled = ((_props$chatConfig4 = props.chatConfig) === null || _props$chatConfig4 === void 0
|
|
131
|
+
var _props$chatConfig4, _state$domainStates$l2;
|
|
132
|
+
const isPostChatEnabled = ((_props$chatConfig4 = props.chatConfig) === null || _props$chatConfig4 === void 0 || (_props$chatConfig4 = _props$chatConfig4.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig4 === void 0 ? void 0 : _props$chatConfig4.msdyn_postconversationsurveyenable) ?? ((_state$domainStates$l2 = state.domainStates.liveChatConfig) === null || _state$domainStates$l2 === void 0 || (_state$domainStates$l2 = _state$domainStates$l2.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable);
|
|
133
133
|
return isPostChatEnabled === Constants.true;
|
|
134
134
|
};
|
|
135
135
|
|
|
@@ -146,7 +146,7 @@ const getPostChatContext = async (facadeChatSDK, state, dispatch) => {
|
|
|
146
146
|
}
|
|
147
147
|
if (postChatEnabled) {
|
|
148
148
|
var _state$domainStates2;
|
|
149
|
-
if ((state === null || state === void 0
|
|
149
|
+
if ((state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.postChatContext) === undefined) {
|
|
150
150
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
151
151
|
const context = await facadeChatSDK.getPostChatSurveyContext();
|
|
152
152
|
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
@@ -58,7 +58,7 @@ const prepareStartChat = async (props, facadeChatSDK, state, dispatch, setAdapte
|
|
|
58
58
|
|
|
59
59
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
60
|
const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, isProactiveChat, proactiveChatEnablePrechatState, state, props) => {
|
|
61
|
-
var _props$preChatSurveyP, _props$
|
|
61
|
+
var _props$preChatSurveyP, _props$controlProps, _state$domainStates, _state$appStates2;
|
|
62
62
|
// This reset needs to be done before to load prechat, because the conversation state changes from close to prechat
|
|
63
63
|
if ((state === null || state === void 0 ? void 0 : state.appStates.conversationState) === ConversationState.Closed) {
|
|
64
64
|
// Preventive reset to avoid starting chat with previous requestId which could potentially cause problems
|
|
@@ -67,12 +67,12 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
67
67
|
|
|
68
68
|
// Getting prechat Survey Context
|
|
69
69
|
const parseToJson = false;
|
|
70
|
-
const preChatSurveyResponse = (props === null || props === void 0
|
|
70
|
+
const preChatSurveyResponse = (props === null || props === void 0 || (_props$preChatSurveyP = props.preChatSurveyPaneProps) === null || _props$preChatSurveyP === void 0 || (_props$preChatSurveyP = _props$preChatSurveyP.controlProps) === null || _props$preChatSurveyP === void 0 ? void 0 : _props$preChatSurveyP.payload) ?? (await facadeChatSDK.getPreChatSurvey(parseToJson));
|
|
71
71
|
let showPrechat = isProactiveChat ? preChatSurveyResponse && proactiveChatEnablePrechatState : preChatSurveyResponse && !(props !== null && props !== void 0 && (_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hidePreChatSurveyPane);
|
|
72
|
-
showPrechat = await shouldSetPreChatIfPersistentChat(facadeChatSDK, state === null || state === void 0
|
|
72
|
+
showPrechat = await shouldSetPreChatIfPersistentChat(facadeChatSDK, state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.liveChatConfig) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.LiveWSAndLiveChatEngJoin) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.msdyn_conversationmode, showPrechat);
|
|
73
73
|
if (showPrechat) {
|
|
74
|
-
var _state$domainStates2
|
|
75
|
-
const isOutOfOperatingHours = (state === null || state === void 0
|
|
74
|
+
var _state$domainStates2;
|
|
75
|
+
const isOutOfOperatingHours = (state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 || (_state$domainStates2 = _state$domainStates2.liveChatConfig) === null || _state$domainStates2 === void 0 || (_state$domainStates2 = _state$domainStates2.LiveWSAndLiveChatEngJoin) === null || _state$domainStates2 === void 0 || (_state$domainStates2 = _state$domainStates2.OutOfOperatingHours) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.toString().toLowerCase()) === "true";
|
|
76
76
|
if (isOutOfOperatingHours) {
|
|
77
77
|
(state === null || state === void 0 ? void 0 : state.appStates.isMinimized) && dispatch({
|
|
78
78
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
@@ -98,8 +98,8 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
// If minimized, maximize the chat, if the state is missing, consider it as minimized
|
|
101
|
-
if ((state === null || state === void 0 ? void 0 : state.appStates.isMinimized) === undefined || (state === null || state === void 0
|
|
102
|
-
var _state$domainStates3, _state$
|
|
101
|
+
if ((state === null || state === void 0 ? void 0 : state.appStates.isMinimized) === undefined || (state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.isMinimized) === true) {
|
|
102
|
+
var _state$domainStates3, _state$domainStates4, _TelemetryManager$Int;
|
|
103
103
|
dispatch({
|
|
104
104
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
105
105
|
payload: false
|
|
@@ -109,9 +109,9 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
109
109
|
BroadcastService.postMessage({
|
|
110
110
|
eventName: BroadcastEvent.MaximizeChat,
|
|
111
111
|
payload: {
|
|
112
|
-
height: state === null || state === void 0
|
|
113
|
-
width: state === null || state === void 0
|
|
114
|
-
runtimeId: TelemetryManager === null || TelemetryManager === void 0
|
|
112
|
+
height: state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 || (_state$domainStates3 = _state$domainStates3.widgetSize) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.height,
|
|
113
|
+
width: state === null || state === void 0 || (_state$domainStates4 = state.domainStates) === null || _state$domainStates4 === void 0 || (_state$domainStates4 = _state$domainStates4.widgetSize) === null || _state$domainStates4 === void 0 ? void 0 : _state$domainStates4.width,
|
|
114
|
+
runtimeId: TelemetryManager === null || TelemetryManager === void 0 || (_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.lcwRuntimeId
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -131,8 +131,8 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
131
131
|
*
|
|
132
132
|
* This is because a new change to control OOH as closed event when a widget is coming from chat.
|
|
133
133
|
*/
|
|
134
|
-
if ((state === null || state === void 0 ? void 0 : state.appStates.isMinimized) === undefined || (state === null || state === void 0
|
|
135
|
-
var _state$domainStates5, _state$
|
|
134
|
+
if ((state === null || state === void 0 ? void 0 : state.appStates.isMinimized) === undefined || (state === null || state === void 0 || (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.isMinimized) === true) {
|
|
135
|
+
var _state$domainStates5, _state$domainStates6, _TelemetryManager$Int2;
|
|
136
136
|
dispatch({
|
|
137
137
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
138
138
|
payload: false
|
|
@@ -141,9 +141,9 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
141
141
|
BroadcastService.postMessage({
|
|
142
142
|
eventName: BroadcastEvent.MaximizeChat,
|
|
143
143
|
payload: {
|
|
144
|
-
height: state === null || state === void 0
|
|
145
|
-
width: state === null || state === void 0
|
|
146
|
-
runtimeId: TelemetryManager === null || TelemetryManager === void 0
|
|
144
|
+
height: state === null || state === void 0 || (_state$domainStates5 = state.domainStates) === null || _state$domainStates5 === void 0 || (_state$domainStates5 = _state$domainStates5.widgetSize) === null || _state$domainStates5 === void 0 ? void 0 : _state$domainStates5.height,
|
|
145
|
+
width: state === null || state === void 0 || (_state$domainStates6 = state.domainStates) === null || _state$domainStates6 === void 0 || (_state$domainStates6 = _state$domainStates6.widgetSize) === null || _state$domainStates6 === void 0 ? void 0 : _state$domainStates6.width,
|
|
146
|
+
runtimeId: TelemetryManager === null || TelemetryManager === void 0 || (_TelemetryManager$Int2 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int2 === void 0 ? void 0 : _TelemetryManager$Int2.lcwRuntimeId
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
149
|
}
|
|
@@ -155,9 +155,9 @@ const setPreChatAndInitiateChat = async (facadeChatSDK, dispatch, setAdapter, is
|
|
|
155
155
|
|
|
156
156
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
157
157
|
const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props, params, persistedState) => {
|
|
158
|
-
var _state$domainStates7
|
|
158
|
+
var _state$domainStates7;
|
|
159
159
|
let isStartChatSuccessful = false;
|
|
160
|
-
const persistentChatEnabled = isPersistentChatEnabled(state === null || state === void 0
|
|
160
|
+
const persistentChatEnabled = isPersistentChatEnabled(state === null || state === void 0 || (_state$domainStates7 = state.domainStates) === null || _state$domainStates7 === void 0 || (_state$domainStates7 = _state$domainStates7.liveChatConfig) === null || _state$domainStates7 === void 0 || (_state$domainStates7 = _state$domainStates7.LiveWSAndLiveChatEngJoin) === null || _state$domainStates7 === void 0 ? void 0 : _state$domainStates7.msdyn_conversationmode);
|
|
161
161
|
if ((state === null || state === void 0 ? void 0 : state.appStates.conversationState) === ConversationState.Closed) {
|
|
162
162
|
// Preventive reset to avoid starting chat with previous requestId which could potentially cause problems
|
|
163
163
|
chatSDKStateCleanUp(facadeChatSDK.getChatSDK());
|
|
@@ -165,7 +165,7 @@ const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props,
|
|
|
165
165
|
try {
|
|
166
166
|
var _state$appStates3;
|
|
167
167
|
// Clear disconnect state on start chat
|
|
168
|
-
(state === null || state === void 0
|
|
168
|
+
(state === null || state === void 0 || (_state$appStates3 = state.appStates) === null || _state$appStates3 === void 0 ? void 0 : _state$appStates3.chatDisconnectEventReceived) && dispatch({
|
|
169
169
|
type: LiveChatWidgetActionType.SET_CHAT_DISCONNECT_EVENT_RECEIVED,
|
|
170
170
|
payload: false
|
|
171
171
|
});
|
|
@@ -182,23 +182,23 @@ const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props,
|
|
|
182
182
|
|
|
183
183
|
//Check if chat retrieved from cache
|
|
184
184
|
if (persistedState || params !== null && params !== void 0 && params.liveChatContext) {
|
|
185
|
-
var _persistedState$domai, _persistedState$domai2
|
|
185
|
+
var _persistedState$domai, _persistedState$domai2;
|
|
186
186
|
BroadcastService.postMessage({
|
|
187
187
|
eventName: BroadcastEvent.ChatRetrievedFromCache,
|
|
188
188
|
payload: {
|
|
189
|
-
chatId: persistedState === null || persistedState === void 0
|
|
190
|
-
requestId: persistedState === null || persistedState === void 0
|
|
189
|
+
chatId: persistedState === null || persistedState === void 0 || (_persistedState$domai = persistedState.domainStates) === null || _persistedState$domai === void 0 || (_persistedState$domai = _persistedState$domai.liveChatContext) === null || _persistedState$domai === void 0 || (_persistedState$domai = _persistedState$domai.chatToken) === null || _persistedState$domai === void 0 ? void 0 : _persistedState$domai.chatId,
|
|
190
|
+
requestId: persistedState === null || persistedState === void 0 || (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 || (_persistedState$domai2 = _persistedState$domai2.liveChatContext) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.requestId
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
try {
|
|
195
|
-
var _window$Microsoft
|
|
195
|
+
var _window$Microsoft;
|
|
196
196
|
// Set custom context params
|
|
197
197
|
await setCustomContextParams(state, props);
|
|
198
198
|
const defaultOptionalParams = {
|
|
199
199
|
sendDefaultInitContext: true,
|
|
200
200
|
isProactiveChat: !!(params !== null && params !== void 0 && params.isProactiveChat),
|
|
201
|
-
portalContactId: (_window$Microsoft = window.Microsoft) === null || _window$Microsoft === void 0
|
|
201
|
+
portalContactId: (_window$Microsoft = window.Microsoft) === null || _window$Microsoft === void 0 || (_window$Microsoft = _window$Microsoft.Dynamic365) === null || _window$Microsoft === void 0 || (_window$Microsoft = _window$Microsoft.Portal) === null || _window$Microsoft === void 0 || (_window$Microsoft = _window$Microsoft.User) === null || _window$Microsoft === void 0 ? void 0 : _window$Microsoft.contactId
|
|
202
202
|
};
|
|
203
203
|
const startChatOptionalParams = Object.assign({}, params, optionalParams, defaultOptionalParams);
|
|
204
204
|
// startTime is used to determine if a message is history or new, better to be set before creating the adapter to get bandwidth
|
|
@@ -285,27 +285,27 @@ const createAdapterAndSubscribe = async (facadeChatSDK, dispatch, setAdapter, st
|
|
|
285
285
|
});
|
|
286
286
|
if (chatToken !== null && chatToken !== void 0 && chatToken.chatId && chatToken !== null && chatToken !== void 0 && chatToken.visitorId) {
|
|
287
287
|
var _newAdapter$activity$;
|
|
288
|
-
newAdapter === null || newAdapter === void 0
|
|
288
|
+
newAdapter === null || newAdapter === void 0 || (_newAdapter$activity$ = newAdapter.activity$) === null || _newAdapter$activity$ === void 0 || _newAdapter$activity$.subscribe(createOnNewAdapterActivityHandler(chatToken.chatId, chatToken.visitorId, startTime));
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
292
292
|
const canConnectToExistingChat = async (props, facadeChatSDK, state, dispatch, setAdapter) => {
|
|
293
|
-
var _state$appStates4, _persistedState$
|
|
293
|
+
var _state$appStates4, _persistedState$domai3, _persistedState$appSt;
|
|
294
294
|
// By pass this function in case of popout chat
|
|
295
|
-
if ((state === null || state === void 0
|
|
295
|
+
if ((state === null || state === void 0 || (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.hideStartChatButton) === true) {
|
|
296
296
|
return false;
|
|
297
297
|
}
|
|
298
298
|
const persistedState = getStateFromCache(getWidgetCacheIdfromProps(props));
|
|
299
299
|
|
|
300
300
|
//Connect to only active chat session
|
|
301
|
-
if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0
|
|
302
|
-
var _persistedState$
|
|
301
|
+
if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0 || (_persistedState$domai3 = persistedState.domainStates) === null || _persistedState$domai3 === void 0 ? void 0 : _persistedState$domai3.liveChatContext) && (persistedState === null || persistedState === void 0 || (_persistedState$appSt = persistedState.appStates) === null || _persistedState$appSt === void 0 ? void 0 : _persistedState$appSt.conversationState) === ConversationState.Active) {
|
|
302
|
+
var _persistedState$domai4;
|
|
303
303
|
dispatch({
|
|
304
304
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
305
305
|
payload: ConversationState.Loading
|
|
306
306
|
});
|
|
307
307
|
const optionalParams = {
|
|
308
|
-
liveChatContext: persistedState === null || persistedState === void 0
|
|
308
|
+
liveChatContext: persistedState === null || persistedState === void 0 || (_persistedState$domai4 = persistedState.domainStates) === null || _persistedState$domai4 === void 0 ? void 0 : _persistedState$domai4.liveChatContext
|
|
309
309
|
};
|
|
310
310
|
await initStartChat(facadeChatSDK, dispatch, setAdapter, state, props, optionalParams, persistedState);
|
|
311
311
|
return true;
|
|
@@ -315,11 +315,11 @@ const canConnectToExistingChat = async (props, facadeChatSDK, state, dispatch, s
|
|
|
315
315
|
|
|
316
316
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
317
317
|
const setCustomContextParams = async (state, props) => {
|
|
318
|
-
var _state$domainStates8, _persistedState$
|
|
318
|
+
var _state$domainStates8, _persistedState$domai5;
|
|
319
319
|
if (state !== null && state !== void 0 && (_state$domainStates8 = state.domainStates) !== null && _state$domainStates8 !== void 0 && _state$domainStates8.customContext) {
|
|
320
320
|
var _state$domainStates9;
|
|
321
321
|
optionalParams = Object.assign({}, optionalParams, {
|
|
322
|
-
customContext: JSON.parse(JSON.stringify(state === null || state === void 0
|
|
322
|
+
customContext: JSON.parse(JSON.stringify(state === null || state === void 0 || (_state$domainStates9 = state.domainStates) === null || _state$domainStates9 === void 0 ? void 0 : _state$domainStates9.customContext))
|
|
323
323
|
});
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
@@ -328,7 +328,7 @@ const setCustomContextParams = async (state, props) => {
|
|
|
328
328
|
}
|
|
329
329
|
// Add custom context only for unauthenticated chat
|
|
330
330
|
const persistedState = getStateFromCache(widgetInstanceId);
|
|
331
|
-
const customContextLocal = (persistedState === null || persistedState === void 0
|
|
331
|
+
const customContextLocal = (persistedState === null || persistedState === void 0 || (_persistedState$domai5 = persistedState.domainStates) === null || _persistedState$domai5 === void 0 ? void 0 : _persistedState$domai5.customContext) ?? (props === null || props === void 0 ? void 0 : props.initialCustomContext);
|
|
332
332
|
if (customContextLocal) {
|
|
333
333
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
334
334
|
Event: TelemetryEvent.SettingCustomContext,
|
|
@@ -352,9 +352,9 @@ const canStartPopoutChat = async props => {
|
|
|
352
352
|
}
|
|
353
353
|
popoutWidgetInstanceId = getWidgetCacheIdfromProps(props, true);
|
|
354
354
|
if (!isNullOrEmptyString(popoutWidgetInstanceId)) {
|
|
355
|
-
var _persistedState$
|
|
355
|
+
var _persistedState$domai6, _persistedState$appSt2;
|
|
356
356
|
const persistedState = getStateFromCache(popoutWidgetInstanceId);
|
|
357
|
-
if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0
|
|
357
|
+
if (persistedState && !isUndefinedOrEmpty(persistedState === null || persistedState === void 0 || (_persistedState$domai6 = persistedState.domainStates) === null || _persistedState$domai6 === void 0 ? void 0 : _persistedState$domai6.liveChatContext) && (persistedState === null || persistedState === void 0 || (_persistedState$appSt2 = persistedState.appStates) === null || _persistedState$appSt2 === void 0 ? void 0 : _persistedState$appSt2.conversationState) === ConversationState.Active) {
|
|
358
358
|
// Initiate popout chat
|
|
359
359
|
BroadcastService.postMessage({
|
|
360
360
|
eventName: BroadcastEvent.InitiateStartChatInPopoutMode
|
|
@@ -367,9 +367,9 @@ const canStartPopoutChat = async props => {
|
|
|
367
367
|
|
|
368
368
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
369
369
|
const checkIfConversationStillValid = async (facadeChatSDK, dispatch, state) => {
|
|
370
|
-
var _state$
|
|
371
|
-
const requestIdFromCache = (_state$
|
|
372
|
-
const liveChatContext = state === null || state === void 0
|
|
370
|
+
var _state$domainStates0, _state$domainStates1;
|
|
371
|
+
const requestIdFromCache = (_state$domainStates0 = state.domainStates) === null || _state$domainStates0 === void 0 || (_state$domainStates0 = _state$domainStates0.liveChatContext) === null || _state$domainStates0 === void 0 ? void 0 : _state$domainStates0.requestId;
|
|
372
|
+
const liveChatContext = state === null || state === void 0 || (_state$domainStates1 = state.domainStates) === null || _state$domainStates1 === void 0 ? void 0 : _state$domainStates1.liveChatContext;
|
|
373
373
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
374
374
|
let conversationDetails = undefined;
|
|
375
375
|
// Preserve current requestId
|
|
@@ -32,7 +32,6 @@ export const handleStartChatError = (dispatch, facadeChatSDK, props, ex, isStart
|
|
|
32
32
|
logWidgetLoadCompleteWithError(ex);
|
|
33
33
|
// Don't return early - let the generic error handling logic handle hideErrorUIPane and telemetry
|
|
34
34
|
}
|
|
35
|
-
|
|
36
35
|
if (ex.message === WidgetLoadCustomErrorString.NetworkErrorString) {
|
|
37
36
|
logWidgetLoadCompleteWithError(ex);
|
|
38
37
|
}
|
|
@@ -118,7 +117,7 @@ const logWidgetLoadFailed = ex => {
|
|
|
118
117
|
Event: TelemetryEvent.WidgetLoadFailed,
|
|
119
118
|
Description: "Widget load complete with error",
|
|
120
119
|
ExceptionDetails: exDetails,
|
|
121
|
-
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0
|
|
120
|
+
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0 || (_TelemetryTimers$Widg = TelemetryTimers.WidgetLoadTimer) === null || _TelemetryTimers$Widg === void 0 ? void 0 : _TelemetryTimers$Widg.milliSecondsElapsed,
|
|
122
121
|
CustomProperties: {
|
|
123
122
|
ConversationStage: ConversationStage.Initialization
|
|
124
123
|
}
|
|
@@ -133,7 +132,7 @@ export const logWidgetLoadComplete = additionalMessage => {
|
|
|
133
132
|
TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
|
|
134
133
|
Event: TelemetryEvent.WidgetLoadComplete,
|
|
135
134
|
Description: descriptionString,
|
|
136
|
-
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0
|
|
135
|
+
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0 || (_TelemetryTimers$Widg2 = TelemetryTimers.WidgetLoadTimer) === null || _TelemetryTimers$Widg2 === void 0 ? void 0 : _TelemetryTimers$Widg2.milliSecondsElapsed
|
|
137
136
|
});
|
|
138
137
|
};
|
|
139
138
|
export const logStartChatComplete = additionalMessage => {
|
|
@@ -162,7 +161,7 @@ const logWidgetLoadCompleteWithError = ex => {
|
|
|
162
161
|
Event: TelemetryEvent.WidgetLoadFailed,
|
|
163
162
|
Description: "Widget load complete with error",
|
|
164
163
|
ExceptionDetails: exDetails,
|
|
165
|
-
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0
|
|
164
|
+
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0 || (_TelemetryTimers$Widg3 = TelemetryTimers.WidgetLoadTimer) === null || _TelemetryTimers$Widg3 === void 0 ? void 0 : _TelemetryTimers$Widg3.milliSecondsElapsed,
|
|
166
165
|
CustomProperties: {
|
|
167
166
|
ConversationStage: ConversationStage.Initialization
|
|
168
167
|
}
|
|
@@ -193,7 +192,7 @@ export const logWidgetLoadWithUnexpectedError = ex => {
|
|
|
193
192
|
Event: TelemetryEvent.WidgetLoadFailed,
|
|
194
193
|
Description: "Widget load with unexpected error",
|
|
195
194
|
ExceptionDetails: exDetails,
|
|
196
|
-
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0
|
|
195
|
+
ElapsedTimeInMilliseconds: TelemetryTimers === null || TelemetryTimers === void 0 || (_TelemetryTimers$Widg4 = TelemetryTimers.WidgetLoadTimer) === null || _TelemetryTimers$Widg4 === void 0 ? void 0 : _TelemetryTimers$Widg4.milliSecondsElapsed,
|
|
197
196
|
CustomProperties: {
|
|
198
197
|
ConversationStage: ConversationStage.Initialization
|
|
199
198
|
}
|
|
@@ -209,7 +208,7 @@ const forceEndChat = facadeChatSDK => {
|
|
|
209
208
|
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
210
209
|
Event: TelemetryEvent.EndChatSDKCall
|
|
211
210
|
});
|
|
212
|
-
facadeChatSDK === null || facadeChatSDK === void 0
|
|
211
|
+
facadeChatSDK === null || facadeChatSDK === void 0 || facadeChatSDK.getChatSDK().endChat();
|
|
213
212
|
};
|
|
214
213
|
const handleWidgetUseOutsideOperatingHour = dispatch => {
|
|
215
214
|
dispatch({
|
|
@@ -277,7 +276,7 @@ const handleInvalidOrClosedConversation = (dispatch, facadeChatSDK, props, ex) =
|
|
|
277
276
|
endChatStateCleanUp(dispatch);
|
|
278
277
|
closeChatStateCleanUp(dispatch);
|
|
279
278
|
chatSDKStateCleanUp(facadeChatSDK.getChatSDK());
|
|
280
|
-
(_DataStoreManager$cli = DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0
|
|
279
|
+
(_DataStoreManager$cli = DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 || _DataStoreManager$cli.removeData(getWidgetCacheIdfromProps(props));
|
|
281
280
|
|
|
282
281
|
// Starts new chat
|
|
283
282
|
dispatch({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export let LiveChatWidgetMockType
|
|
2
|
-
(function (LiveChatWidgetMockType) {
|
|
1
|
+
export let LiveChatWidgetMockType = /*#__PURE__*/function (LiveChatWidgetMockType) {
|
|
3
2
|
LiveChatWidgetMockType["Test"] = "Test";
|
|
4
3
|
LiveChatWidgetMockType["Demo"] = "Demo";
|
|
5
4
|
LiveChatWidgetMockType["Designer"] = "Designer";
|
|
6
|
-
|
|
5
|
+
return LiveChatWidgetMockType;
|
|
6
|
+
}({});
|