@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.
- 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
package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
9
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
@@ -82,11 +82,11 @@ export let BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
|
82
82
|
this.fetchBotAuthConfigRetryInterval = optionalParams.fetchBotAuthConfigRetryInterval;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
_createClass(BotAuthActivitySubscriber, [{
|
|
85
|
+
return _createClass(BotAuthActivitySubscriber, [{
|
|
86
86
|
key: "applicable",
|
|
87
87
|
value: function applicable(activity) {
|
|
88
88
|
var _activity$attachments;
|
|
89
|
-
return (activity === null || activity === void 0
|
|
89
|
+
return (activity === null || activity === void 0 || (_activity$attachments = activity.attachments) === null || _activity$attachments === void 0 ? void 0 : _activity$attachments.length) > 0 && activity.attachments[0] && supportedSignInCardContentTypes.indexOf(activity.attachments[0].contentType) >= 0;
|
|
90
90
|
}
|
|
91
91
|
}, {
|
|
92
92
|
key: "apply",
|
|
@@ -156,5 +156,4 @@ export let BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
|
156
156
|
return activity;
|
|
157
157
|
}
|
|
158
158
|
}]);
|
|
159
|
-
return BotAuthActivitySubscriber;
|
|
160
159
|
}();
|
package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
export let DefaultActivitySubscriber = /*#__PURE__*/function () {
|
|
8
8
|
function DefaultActivitySubscriber() {
|
|
9
9
|
_classCallCheck(this, DefaultActivitySubscriber);
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
11
|
_defineProperty(this, "observer", void 0);
|
|
12
12
|
}
|
|
13
|
-
_createClass(DefaultActivitySubscriber, [{
|
|
13
|
+
return _createClass(DefaultActivitySubscriber, [{
|
|
14
14
|
key: "next",
|
|
15
15
|
value:
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -19,5 +19,4 @@ export let DefaultActivitySubscriber = /*#__PURE__*/function () {
|
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
}]);
|
|
22
|
-
return DefaultActivitySubscriber;
|
|
23
22
|
}();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { Constants } from "../../../../common/Constants";
|
|
8
8
|
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../../common/telemetry/TelemetryConstants";
|
|
9
9
|
import { TelemetryHelper } from "../../../../common/telemetry/TelemetryHelper";
|
|
@@ -14,7 +14,7 @@ export let HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
|
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
_defineProperty(this, "observer", void 0);
|
|
16
16
|
}
|
|
17
|
-
_createClass(HiddenAdaptiveCardActivitySubscriber, [{
|
|
17
|
+
return _createClass(HiddenAdaptiveCardActivitySubscriber, [{
|
|
18
18
|
key: "apply",
|
|
19
19
|
value:
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -79,5 +79,4 @@ export let HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
|
|
|
79
79
|
return activity;
|
|
80
80
|
}
|
|
81
81
|
}]);
|
|
82
|
-
return HiddenAdaptiveCardActivitySubscriber;
|
|
83
82
|
}();
|
package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { ActivityStreamHandler } from "../ActivityStreamHandler";
|
|
8
8
|
export let PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
9
9
|
function PauseActivitySubscriber() {
|
|
@@ -11,7 +11,7 @@ export let PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
_defineProperty(this, "observer", void 0);
|
|
13
13
|
}
|
|
14
|
-
_createClass(PauseActivitySubscriber, [{
|
|
14
|
+
return _createClass(PauseActivitySubscriber, [{
|
|
15
15
|
key: "apply",
|
|
16
16
|
value:
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -37,5 +37,4 @@ export let PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
|
37
37
|
return activity;
|
|
38
38
|
}
|
|
39
39
|
}]);
|
|
40
|
-
return PauseActivitySubscriber;
|
|
41
40
|
}();
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { DefaultActivitySubscriber } from "./ActivitySubscriber/DefaultActivitySubscriber";
|
|
8
8
|
import { shareObservable } from "./shareObservable";
|
|
9
9
|
export let ChatAdapterShim = /*#__PURE__*/function () {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
-
|
|
16
10
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
11
|
function ChatAdapterShim(chatAdapter) {
|
|
18
12
|
_classCallCheck(this, ChatAdapterShim);
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
14
|
_defineProperty(this, "chatAdapter", void 0);
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
16
|
_defineProperty(this, "activityObserver", void 0);
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
18
|
_defineProperty(this, "subscribers", void 0);
|
|
22
19
|
this.subscribers = [];
|
|
23
20
|
this.chatAdapter = {
|
|
@@ -55,11 +52,10 @@ export let ChatAdapterShim = /*#__PURE__*/function () {
|
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
-
_createClass(ChatAdapterShim, [{
|
|
55
|
+
return _createClass(ChatAdapterShim, [{
|
|
59
56
|
key: "addSubscriber",
|
|
60
57
|
value: function addSubscriber(subscriber) {
|
|
61
58
|
this.subscribers.push(subscriber);
|
|
62
59
|
}
|
|
63
60
|
}]);
|
|
64
|
-
return ChatAdapterShim;
|
|
65
61
|
}();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var ChatWidgetEvents
|
|
2
|
-
(function (ChatWidgetEvents) {
|
|
1
|
+
var ChatWidgetEvents = /*#__PURE__*/function (ChatWidgetEvents) {
|
|
3
2
|
ChatWidgetEvents["ADD_ACTIVITY"] = "CHAT_WIDGET/ADD_ACTIVITY";
|
|
4
3
|
ChatWidgetEvents["FETCH_PERSISTENT_CHAT_HISTORY"] = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY";
|
|
5
4
|
ChatWidgetEvents["NO_MORE_HISTORY_AVAILABLE"] = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE";
|
|
6
5
|
ChatWidgetEvents["HISTORY_LOAD_ERROR"] = "CHAT_WIDGET/HISTORY_LOAD_ERROR";
|
|
7
|
-
|
|
6
|
+
return ChatWidgetEvents;
|
|
7
|
+
}(ChatWidgetEvents || {});
|
|
8
8
|
export default ChatWidgetEvents;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
export let Deferred = /*#__PURE__*/function () {
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
-
|
|
10
8
|
function Deferred() {
|
|
11
9
|
_classCallCheck(this, Deferred);
|
|
12
10
|
_defineProperty(this, "_promise", void 0);
|
|
13
11
|
_defineProperty(this, "_resolve", void 0);
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
13
|
_defineProperty(this, "_reject", () => {
|
|
15
14
|
return;
|
|
16
15
|
});
|
|
@@ -27,11 +26,10 @@ export let Deferred = /*#__PURE__*/function () {
|
|
|
27
26
|
this._reject = reject;
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
|
-
_createClass(Deferred, [{
|
|
29
|
+
return _createClass(Deferred, [{
|
|
31
30
|
key: "promise",
|
|
32
31
|
get: function () {
|
|
33
32
|
return this._promise;
|
|
34
33
|
}
|
|
35
34
|
}]);
|
|
36
|
-
return Deferred;
|
|
37
35
|
}();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
8
8
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
9
9
|
import ChatWidgetEvents from "./ChatWidgetEvents";
|
|
@@ -18,8 +18,6 @@ import dispatchCustomEvent from "../../../common/utils/dispatchCustomEvent";
|
|
|
18
18
|
* Class responsible for handling persistent conversation history
|
|
19
19
|
*/
|
|
20
20
|
let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
|
|
23
21
|
function PersistentConversationHandler(facadeChatSDK, props) {
|
|
24
22
|
_classCallCheck(this, PersistentConversationHandler);
|
|
25
23
|
_defineProperty(this, "appliedProps", {
|
|
@@ -28,6 +26,7 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
28
26
|
_defineProperty(this, "isLastPull", false);
|
|
29
27
|
_defineProperty(this, "pageToken", null);
|
|
30
28
|
_defineProperty(this, "facadeChatSDK", void 0);
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
30
|
_defineProperty(this, "lastMessage", null);
|
|
32
31
|
_defineProperty(this, "count", 0);
|
|
33
32
|
_defineProperty(this, "pageSize", defaultPersistentChatHistoryProps.pageSize);
|
|
@@ -46,7 +45,7 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
46
45
|
}
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
|
-
_createClass(PersistentConversationHandler, [{
|
|
48
|
+
return _createClass(PersistentConversationHandler, [{
|
|
50
49
|
key: "appliedPropsHandler",
|
|
51
50
|
value: function appliedPropsHandler(props) {
|
|
52
51
|
var _this$appliedProps;
|
|
@@ -259,8 +258,8 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
259
258
|
}, {
|
|
260
259
|
key: "createDividerActivity",
|
|
261
260
|
value: function createDividerActivity(activity) {
|
|
262
|
-
var _this$lastMessage
|
|
263
|
-
if (((_this$lastMessage = this.lastMessage) === null || _this$lastMessage === void 0
|
|
261
|
+
var _this$lastMessage;
|
|
262
|
+
if (((_this$lastMessage = this.lastMessage) === null || _this$lastMessage === void 0 || (_this$lastMessage = _this$lastMessage.channelData) === null || _this$lastMessage === void 0 ? void 0 : _this$lastMessage.conversationId) !== activity.channelData.conversationId) {
|
|
264
263
|
const rawSequenceId = activity.channelData["webchat:sequence-id"];
|
|
265
264
|
const sequenceId = typeof rawSequenceId === "number" && !isNaN(rawSequenceId) ? rawSequenceId + 1 : 1;
|
|
266
265
|
const timestamp = new Date(activity.timestamp).getTime() + 1;
|
|
@@ -278,6 +277,5 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
278
277
|
return null;
|
|
279
278
|
}
|
|
280
279
|
}]);
|
|
281
|
-
return PersistentConversationHandler;
|
|
282
280
|
}();
|
|
283
281
|
export default PersistentConversationHandler;
|
|
@@ -6,7 +6,7 @@ const getAuthClientFunction = chatConfig => {
|
|
|
6
6
|
let authClientFunction = undefined;
|
|
7
7
|
if (chatConfig !== null && chatConfig !== void 0 && chatConfig.LiveChatConfigAuthSettings) {
|
|
8
8
|
var _chatConfig$LiveChatC;
|
|
9
|
-
authClientFunction = (chatConfig === null || chatConfig === void 0
|
|
9
|
+
authClientFunction = (chatConfig === null || chatConfig === void 0 || (_chatConfig$LiveChatC = chatConfig.LiveChatConfigAuthSettings) === null || _chatConfig$LiveChatC === void 0 ? void 0 : _chatConfig$LiveChatC.msdyn_javascriptclientfunction) ?? undefined;
|
|
10
10
|
}
|
|
11
11
|
return authClientFunction;
|
|
12
12
|
};
|
|
@@ -6,10 +6,10 @@ import { defaultMiddlewareLocalizedTexts } from "../../webchatcontainerstateful/
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
8
|
const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
9
|
-
var _state$appStates, _state$domainStates,
|
|
10
|
-
const chatDisconnectState = state === null || state === void 0
|
|
11
|
-
const chatDisconnectMessage = (state === null || state === void 0
|
|
12
|
-
const hideSendBoxOnConversationEnd = props === null || props === void 0
|
|
9
|
+
var _state$appStates, _state$domainStates, _props$webChatContain, _props$webChatContain2;
|
|
10
|
+
const chatDisconnectState = state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.chatDisconnectEventReceived;
|
|
11
|
+
const chatDisconnectMessage = (state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 || (_state$domainStates = _state$domainStates.middlewareLocalizedTexts) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.MIDDLEWARE_BANNER_CHAT_DISCONNECT) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_CHAT_DISCONNECT;
|
|
12
|
+
const hideSendBoxOnConversationEnd = props === null || props === void 0 || (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 || (_props$webChatContain = _props$webChatContain.renderingMiddlewareProps) === null || _props$webChatContain === void 0 ? void 0 : _props$webChatContain.hideSendboxOnConversationEnd;
|
|
13
13
|
switch (chatDisconnectState) {
|
|
14
14
|
case true:
|
|
15
15
|
if (hideSendBoxOnConversationEnd !== false) {
|
|
@@ -28,7 +28,7 @@ const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
|
28
28
|
break;
|
|
29
29
|
case false:
|
|
30
30
|
// this means customer on purpose wants to hide the send box, we should not override it
|
|
31
|
-
if ((props === null || props === void 0
|
|
31
|
+
if ((props === null || props === void 0 || (_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 || (_props$webChatContain2 = _props$webChatContain2.webChatStyles) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendBox) === true) return;
|
|
32
32
|
if (hideSendBoxOnConversationEnd !== false) {
|
|
33
33
|
setWebChatStyles(styles => {
|
|
34
34
|
return {
|
|
@@ -39,10 +39,10 @@ export const createAdapter = async (facadeChatSDK, props) => {
|
|
|
39
39
|
//so far, there is no need to convert to the shim adapter when using visual tests
|
|
40
40
|
const isMocked = facadeChatSDK.getChatSDK() instanceof MockChatSDK;
|
|
41
41
|
if (isMocked !== true) {
|
|
42
|
-
var _props$webChatContain, _props$webChatContain2
|
|
42
|
+
var _props$webChatContain, _props$webChatContain2;
|
|
43
43
|
const botAuthActivitySubscriberOptionalParams = {
|
|
44
|
-
fetchBotAuthConfigRetries: (props === null || props === void 0
|
|
45
|
-
fetchBotAuthConfigRetryInterval: (props === null || props === void 0
|
|
44
|
+
fetchBotAuthConfigRetries: (props === null || props === void 0 || (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 || (_props$webChatContain = _props$webChatContain.botAuthConfig) === null || _props$webChatContain === void 0 ? void 0 : _props$webChatContain.fetchBotAuthConfigRetries) || defaultBotAuthConfig.fetchBotAuthConfigRetries,
|
|
45
|
+
fetchBotAuthConfigRetryInterval: (props === null || props === void 0 || (_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 || (_props$webChatContain2 = _props$webChatContain2.botAuthConfig) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.fetchBotAuthConfigRetryInterval) || defaultBotAuthConfig.fetchBotAuthConfigRetryInterval
|
|
46
46
|
};
|
|
47
47
|
adapter = new ChatAdapterShim(adapter);
|
|
48
48
|
adapter.addSubscriber(new AddActivitySubscriber());
|
|
@@ -29,25 +29,25 @@ const isInternetConnected = async testUrl => {
|
|
|
29
29
|
};
|
|
30
30
|
export const createInternetConnectionChangeHandler = async state => {
|
|
31
31
|
const handler = async () => {
|
|
32
|
-
var _inMemoryState$domain
|
|
32
|
+
var _inMemoryState$domain;
|
|
33
33
|
const inMemoryState = executeReducer(state, {
|
|
34
34
|
type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
35
35
|
payload: null
|
|
36
36
|
});
|
|
37
|
-
const testUrl = getRegionBasedInternetTestUrl((_inMemoryState$domain = inMemoryState.domainStates.liveChatConfig) === null || _inMemoryState$domain === void 0
|
|
37
|
+
const testUrl = getRegionBasedInternetTestUrl((_inMemoryState$domain = inMemoryState.domainStates.liveChatConfig) === null || _inMemoryState$domain === void 0 || (_inMemoryState$domain = _inMemoryState$domain.LiveWSAndLiveChatEngJoin) === null || _inMemoryState$domain === void 0 ? void 0 : _inMemoryState$domain.msdyn_widgetsnippet);
|
|
38
38
|
const connected = testUrl ? await isInternetConnected(testUrl) : false;
|
|
39
39
|
if (!connected) {
|
|
40
|
-
var _inMemoryState$
|
|
40
|
+
var _inMemoryState$domain2;
|
|
41
41
|
TelemetryHelper.logActionEvent(LogLevel.WARN, {
|
|
42
42
|
Event: TelemetryEvent.NetworkDisconnected
|
|
43
43
|
});
|
|
44
|
-
NotificationHandler.notifyError(NotificationScenarios.InternetConnection, (inMemoryState === null || inMemoryState === void 0
|
|
44
|
+
NotificationHandler.notifyError(NotificationScenarios.InternetConnection, (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$domain2 = inMemoryState.domainStates) === null || _inMemoryState$domain2 === void 0 || (_inMemoryState$domain2 = _inMemoryState$domain2.middlewareLocalizedTexts) === null || _inMemoryState$domain2 === void 0 ? void 0 : _inMemoryState$domain2.MIDDLEWARE_BANNER_NO_INTERNET_CONNECTION) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_NO_INTERNET_CONNECTION);
|
|
45
45
|
} else {
|
|
46
|
-
var _inMemoryState$
|
|
46
|
+
var _inMemoryState$domain3;
|
|
47
47
|
TelemetryHelper.logActionEvent(LogLevel.WARN, {
|
|
48
48
|
Event: TelemetryEvent.NetworkReconnected
|
|
49
49
|
});
|
|
50
|
-
NotificationHandler.notifySuccess(NotificationScenarios.InternetConnection, (inMemoryState === null || inMemoryState === void 0
|
|
50
|
+
NotificationHandler.notifySuccess(NotificationScenarios.InternetConnection, (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$domain3 = inMemoryState.domainStates) === null || _inMemoryState$domain3 === void 0 || (_inMemoryState$domain3 = _inMemoryState$domain3.middlewareLocalizedTexts) === null || _inMemoryState$domain3 === void 0 ? void 0 : _inMemoryState$domain3.MIDDLEWARE_BANNER_INTERNET_BACK_ONLINE) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_INTERNET_BACK_ONLINE);
|
|
51
51
|
BroadcastService.postMessage({
|
|
52
52
|
eventName: BroadcastEvent.NetworkReconnected
|
|
53
53
|
});
|
|
@@ -29,10 +29,10 @@ const prepareEndChat = async (props, facadeChatSDK, state, dispatch, setAdapter,
|
|
|
29
29
|
const conversationDetails = await getConversationDetailsCall(facadeChatSDK);
|
|
30
30
|
|
|
31
31
|
// Use Case: When post chat is not configured
|
|
32
|
-
if ((conversationDetails === null || conversationDetails === void 0
|
|
32
|
+
if ((conversationDetails === null || conversationDetails === void 0 || (_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === Constants.false) {
|
|
33
33
|
var _state$appStates, _state$appStates2, _state$appStates3;
|
|
34
34
|
// If ended by customer, just close chat
|
|
35
|
-
if ((state === null || state === void 0
|
|
35
|
+
if ((state === null || state === void 0 || (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.conversationEndedBy) === ConversationEndEntity.Customer) {
|
|
36
36
|
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
37
37
|
Event: TelemetryEvent.PrepareEndChat,
|
|
38
38
|
Description: PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithoutPostChat
|
|
@@ -43,7 +43,7 @@ const prepareEndChat = async (props, facadeChatSDK, state, dispatch, setAdapter,
|
|
|
43
43
|
|
|
44
44
|
// Use Case: If ended by Agent, stay chat in InActive state
|
|
45
45
|
const isConversationalSurveyEnabled = state.appStates.isConversationalSurveyEnabled;
|
|
46
|
-
if (isConversationalSurveyEnabled && ((state === null || state === void 0
|
|
46
|
+
if (isConversationalSurveyEnabled && ((state === null || state === void 0 || (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.conversationEndedBy) === ConversationEndEntity.Agent || (state === null || state === void 0 || (_state$appStates3 = state.appStates) === null || _state$appStates3 === void 0 ? void 0 : _state$appStates3.conversationEndedBy) === ConversationEndEntity.Bot)) {
|
|
47
47
|
dispatch({
|
|
48
48
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
49
49
|
payload: ConversationState.InActive
|
|
@@ -62,7 +62,7 @@ const prepareEndChat = async (props, facadeChatSDK, state, dispatch, setAdapter,
|
|
|
62
62
|
|
|
63
63
|
// Use Case: Can render post chat scenarios
|
|
64
64
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
-
const postchatContext = (await getPostChatContext(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0
|
|
65
|
+
const postchatContext = (await getPostChatContext(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.postChatContext);
|
|
66
66
|
if (postchatContext === undefined) {
|
|
67
67
|
var _state$appStates4;
|
|
68
68
|
BroadcastService.postMessage({
|
|
@@ -73,7 +73,7 @@ const prepareEndChat = async (props, facadeChatSDK, state, dispatch, setAdapter,
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
// For Customer intiated conversations, just close chat widget
|
|
76
|
-
if ((state === null || state === void 0
|
|
76
|
+
if ((state === null || state === void 0 || (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.conversationEndedBy) === ConversationEndEntity.Customer) {
|
|
77
77
|
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
78
78
|
Event: TelemetryEvent.PrepareEndChat,
|
|
79
79
|
Description: PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithInvalidPostChat
|
|
@@ -95,7 +95,7 @@ const prepareEndChat = async (props, facadeChatSDK, state, dispatch, setAdapter,
|
|
|
95
95
|
var _state$appStates6;
|
|
96
96
|
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
97
97
|
Event: TelemetryEvent.PrepareEndChat,
|
|
98
|
-
Description: `${PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithInvalidPostChat} ${state === null || state === void 0
|
|
98
|
+
Description: `${PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithInvalidPostChat} ${state === null || state === void 0 || (_state$appStates6 = state.appStates) === null || _state$appStates6 === void 0 ? void 0 : _state$appStates6.conversationEndedBy}.`
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
const persistentEnabled = isPersistentEnabled(chatConfig);
|
|
@@ -150,7 +150,7 @@ const endChat = async (props, facadeChatSDK, state, dispatch, setAdapter, setWeb
|
|
|
150
150
|
type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
151
151
|
payload: null
|
|
152
152
|
});
|
|
153
|
-
let isSessionEnded = inMemoryState === null || inMemoryState === void 0
|
|
153
|
+
let isSessionEnded = inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta = inMemoryState.appStates) === null || _inMemoryState$appSta === void 0 ? void 0 : _inMemoryState$appSta.chatDisconnectEventReceived;
|
|
154
154
|
if (!isSessionEnded) {
|
|
155
155
|
// double check by fetching the latest conversation details
|
|
156
156
|
const conversationDetails = await getConversationDetailsCall(facadeChatSDK);
|
|
@@ -212,7 +212,7 @@ const endChat = async (props, facadeChatSDK, state, dispatch, setAdapter, setWeb
|
|
|
212
212
|
if (!skipCloseChat) {
|
|
213
213
|
try {
|
|
214
214
|
var _props$webChatContain;
|
|
215
|
-
adapter === null || adapter === void 0
|
|
215
|
+
adapter === null || adapter === void 0 || adapter.end();
|
|
216
216
|
setAdapter(undefined);
|
|
217
217
|
setWebChatStyles({
|
|
218
218
|
...defaultWebChatContainerStatefulProps.webChatStyles,
|
|
@@ -384,7 +384,7 @@ export const endVoiceVideoCallIfOngoing = async (facadeChatSDK, dispatch) => {
|
|
|
384
384
|
|
|
385
385
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
386
386
|
const closeChatWidget = (dispatch, setWebChatStyles, props) => {
|
|
387
|
-
var _props$webChatContain2
|
|
387
|
+
var _props$webChatContain2;
|
|
388
388
|
// Embedded chat
|
|
389
389
|
dispatch({
|
|
390
390
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
@@ -392,7 +392,7 @@ const closeChatWidget = (dispatch, setWebChatStyles, props) => {
|
|
|
392
392
|
});
|
|
393
393
|
|
|
394
394
|
// if customer is setting the hideSendbox, we should not alter its value
|
|
395
|
-
if ((props === null || props === void 0
|
|
395
|
+
if ((props === null || props === void 0 || (_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 || (_props$webChatContain2 = _props$webChatContain2.webChatStyles) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendBox) === true) return;
|
|
396
396
|
setWebChatStyles(styles => ({
|
|
397
397
|
...styles,
|
|
398
398
|
hideSendBox: false
|
|
@@ -409,9 +409,8 @@ const chatTokenCleanUp = async dispatch => {
|
|
|
409
409
|
|
|
410
410
|
// Need to keep liveChatContext until chat is fully closed to for transcript download/email
|
|
411
411
|
};
|
|
412
|
-
|
|
413
412
|
const getEndChatEventName = async (facadeChatSDK, props) => {
|
|
414
|
-
var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3,
|
|
415
|
-
return getWidgetEndChatEventName((_facadeChatSDK$getCha2 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha2 === void 0
|
|
413
|
+
var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3, _props$controlProps2;
|
|
414
|
+
return getWidgetEndChatEventName((_facadeChatSDK$getCha2 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha2 === void 0 || (_facadeChatSDK$getCha2 = _facadeChatSDK$getCha2.omnichannelConfig) === null || _facadeChatSDK$getCha2 === void 0 ? void 0 : _facadeChatSDK$getCha2.orgId, (_facadeChatSDK$getCha3 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha3 === void 0 || (_facadeChatSDK$getCha3 = _facadeChatSDK$getCha3.omnichannelConfig) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : _facadeChatSDK$getCha3.widgetId, (props === null || props === void 0 || (_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.widgetInstanceId) ?? "");
|
|
416
415
|
};
|
|
417
416
|
export { prepareEndChat, endChat };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defaultConfirmationPaneLocalizedTexts } from "../../confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts";
|
|
2
2
|
export const initConfirmationPropsComposer = props => {
|
|
3
|
-
var _props$confirmationPa, _props$footerProps, _props$
|
|
3
|
+
var _props$confirmationPa, _props$footerProps, _props$footerProps2, _props$confirmationPa2;
|
|
4
4
|
const confirmationPanelocalizedTexts = {
|
|
5
5
|
...defaultConfirmationPaneLocalizedTexts,
|
|
6
|
-
...(props === null || props === void 0
|
|
6
|
+
...(props === null || props === void 0 || (_props$confirmationPa = props.confirmationPaneProps) === null || _props$confirmationPa === void 0 ? void 0 : _props$confirmationPa.confirmationPaneLocalizedTexts)
|
|
7
7
|
};
|
|
8
8
|
let confirmationPaneInputs;
|
|
9
|
-
const emailTranscriptDisabled = ((_props$footerProps = props.footerProps) === null || _props$footerProps === void 0
|
|
10
|
-
const downloadTranscriptDisabled = ((_props$footerProps2 = props.footerProps) === null || _props$footerProps2 === void 0
|
|
9
|
+
const emailTranscriptDisabled = ((_props$footerProps = props.footerProps) === null || _props$footerProps === void 0 || (_props$footerProps = _props$footerProps.controlProps) === null || _props$footerProps === void 0 ? void 0 : _props$footerProps.hideEmailTranscriptButton) ?? false;
|
|
10
|
+
const downloadTranscriptDisabled = ((_props$footerProps2 = props.footerProps) === null || _props$footerProps2 === void 0 || (_props$footerProps2 = _props$footerProps2.controlProps) === null || _props$footerProps2 === void 0 ? void 0 : _props$footerProps2.hideDownloadTranscriptButton) ?? false;
|
|
11
11
|
if (!emailTranscriptDisabled && !downloadTranscriptDisabled) {
|
|
12
12
|
confirmationPaneInputs = {
|
|
13
13
|
title: confirmationPanelocalizedTexts.CLOSE_CONFIRMATION_DIALOG_TITLE_FOR_EMAIL_AND_DOWNLOAD_TRANSCRIPT_ENABLED,
|