@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
|
@@ -18,11 +18,10 @@ var _utils = require("../../common/utils");
|
|
|
18
18
|
var _liveChatConfigUtils = require("./common/liveChatConfigUtils");
|
|
19
19
|
var _overridePropsOnMockIfApplicable = _interopRequireDefault(require("./common/overridePropsOnMockIfApplicable"));
|
|
20
20
|
var _registerTelemetryLoggers = require("./common/registerTelemetryLoggers");
|
|
21
|
-
function _interopRequireDefault(
|
|
22
|
-
function
|
|
23
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
24
23
|
const LiveChatWidget = props => {
|
|
25
|
-
var _props$featureConfigP, _props$chatConfig, _props$
|
|
24
|
+
var _props$featureConfigP, _props$chatConfig, _props$chatConfig2;
|
|
26
25
|
const reducer = (0, _createReducer.createReducer)();
|
|
27
26
|
const [state, dispatch] = (0, _react.useReducer)(reducer, (0, _LiveChatWidgetContextInitialState.getLiveChatWidgetContextInitialState)(props));
|
|
28
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -36,7 +35,7 @@ const LiveChatWidget = props => {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
-
const isAuthenticatedChat = !!((_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig
|
|
38
|
+
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) || (0, _liveChatConfigUtils.isPersistentChatEnabled)((_props$chatConfig2 = props.chatConfig) === null || _props$chatConfig2 === void 0 || (_props$chatConfig2 = _props$chatConfig2.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig2 === void 0 ? void 0 : _props$chatConfig2.msdyn_conversationmode);
|
|
40
39
|
if (!facadeChatSDK) {
|
|
41
40
|
var _props$mock;
|
|
42
41
|
setFacadeChatSDK(new _FacadeChatSDK.FacadeChatSDK({
|
|
@@ -45,7 +44,7 @@ const LiveChatWidget = props => {
|
|
|
45
44
|
"isAuthenticated": isAuthenticatedChat,
|
|
46
45
|
"getAuthToken": props === null || props === void 0 ? void 0 : props.getAuthToken,
|
|
47
46
|
//when type is not undefined, it means the SDK is mocked
|
|
48
|
-
"isSDKMocked": !(0, _utils.isNullOrUndefined)(props === null || props === void 0
|
|
47
|
+
"isSDKMocked": !(0, _utils.isNullOrUndefined)(props === null || props === void 0 || (_props$mock = props.mock) === null || _props$mock === void 0 ? void 0 : _props$mock.type)
|
|
49
48
|
}, disableReauthentication));
|
|
50
49
|
}
|
|
51
50
|
(0, _react.useEffect)(() => {
|
|
@@ -62,5 +61,4 @@ const LiveChatWidget = props => {
|
|
|
62
61
|
}, /*#__PURE__*/_react.default.createElement(_LiveChatWidgetStateful.default, props)))));
|
|
63
62
|
};
|
|
64
63
|
exports.LiveChatWidget = LiveChatWidget;
|
|
65
|
-
var _default = LiveChatWidget;
|
|
66
|
-
exports.default = _default;
|
|
64
|
+
var _default = exports.default = LiveChatWidget;
|
|
@@ -5,23 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ActivityStreamHandler = void 0;
|
|
7
7
|
var _Deferred = require("./Deferred");
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
function _defineProperties(
|
|
10
|
-
function _createClass(
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
14
|
-
let ActivityStreamHandler = /*#__PURE__*/function () {
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
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); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
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); }
|
|
14
|
+
let ActivityStreamHandler = exports.ActivityStreamHandler = /*#__PURE__*/function () {
|
|
15
15
|
function ActivityStreamHandler() {
|
|
16
16
|
_classCallCheck(this, ActivityStreamHandler);
|
|
17
17
|
}
|
|
18
|
-
_createClass(ActivityStreamHandler, null, [{
|
|
18
|
+
return _createClass(ActivityStreamHandler, null, [{
|
|
19
19
|
key: "cork",
|
|
20
20
|
value:
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
|
|
25
21
|
/**
|
|
26
22
|
* Use of a deferred pattern, to hold the execution of the activity.
|
|
27
23
|
*
|
|
@@ -41,12 +37,12 @@ let ActivityStreamHandler = /*#__PURE__*/function () {
|
|
|
41
37
|
ActivityStreamHandler.restoreDeferred.resolve();
|
|
42
38
|
}
|
|
43
39
|
}]);
|
|
44
|
-
return ActivityStreamHandler;
|
|
45
40
|
}();
|
|
46
|
-
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
42
|
_defineProperty(ActivityStreamHandler, "restoreDeferred", {
|
|
48
43
|
resolve: () => {
|
|
49
44
|
return "initialState";
|
|
50
45
|
}
|
|
51
46
|
});
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
48
|
_defineProperty(ActivityStreamHandler, "restorePromise", void 0);
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js
CHANGED
|
@@ -8,13 +8,13 @@ var _TelemetryConstants = require("../../../../common/telemetry/TelemetryConstan
|
|
|
8
8
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
9
9
|
var _ChatWidgetEvents = _interopRequireDefault(require("../ChatWidgetEvents"));
|
|
10
10
|
var _SecureEventBus = _interopRequireDefault(require("../../../../common/utils/SecureEventBus"));
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function _classCallCheck(
|
|
13
|
-
function _defineProperties(
|
|
14
|
-
function _createClass(
|
|
15
|
-
function _defineProperty(
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
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; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
+
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); }
|
|
18
18
|
/**
|
|
19
19
|
* The `AddActivitySubscriber` class is responsible for subscribing to the `ADD_ACTIVITY` event
|
|
20
20
|
* from the `ChatWidgetEvents` and notifying an observer when a new activity is added.
|
|
@@ -22,26 +22,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
22
22
|
* This class implements the `IActivitySubscriber` interface and acts as a bridge between
|
|
23
23
|
* the event system and the observer pattern.
|
|
24
24
|
*/
|
|
25
|
-
let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
26
|
-
/**
|
|
27
|
-
* The observer that will be notified when a new activity is added.
|
|
28
|
-
* This is expected to be an object with a `next` method, such as an RxJS `Observer`.
|
|
29
|
-
*/
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Set to track processed activity IDs to prevent duplicate processing.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Unsubscribe function for the secure event listener
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Subscription for PersistentConversationReset event
|
|
42
|
-
*/
|
|
43
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
-
|
|
25
|
+
let AddActivitySubscriber = exports.AddActivitySubscriber = /*#__PURE__*/function () {
|
|
45
26
|
/**
|
|
46
27
|
* Constructor initializes the `AddActivitySubscriber` and sets up a secure event listener
|
|
47
28
|
* for the `ChatWidgetEvents.ADD_ACTIVITY` event. When the event is triggered, it checks
|
|
@@ -49,9 +30,24 @@ let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
49
30
|
*/
|
|
50
31
|
function AddActivitySubscriber() {
|
|
51
32
|
_classCallCheck(this, AddActivitySubscriber);
|
|
33
|
+
/**
|
|
34
|
+
* The observer that will be notified when a new activity is added.
|
|
35
|
+
* This is expected to be an object with a `next` method, such as an RxJS `Observer`.
|
|
36
|
+
*/
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
38
|
_defineProperty(this, "observer", void 0);
|
|
39
|
+
/**
|
|
40
|
+
* Set to track processed activity IDs to prevent duplicate processing.
|
|
41
|
+
*/
|
|
53
42
|
_defineProperty(this, "processedActivityIds", new Set());
|
|
43
|
+
/**
|
|
44
|
+
* Unsubscribe function for the secure event listener
|
|
45
|
+
*/
|
|
54
46
|
_defineProperty(this, "unsubscribeFromSecureEvent", null);
|
|
47
|
+
/**
|
|
48
|
+
* Subscription for PersistentConversationReset event
|
|
49
|
+
*/
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
51
|
_defineProperty(this, "resetEventListener", void 0);
|
|
56
52
|
const eventBus = _SecureEventBus.default.getInstance();
|
|
57
53
|
|
|
@@ -80,7 +76,7 @@ let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
// Notify the observer with the new activity
|
|
83
|
-
(_this$observer = this.observer) === null || _this$observer === void 0
|
|
79
|
+
(_this$observer = this.observer) === null || _this$observer === void 0 || _this$observer.next(activity);
|
|
84
80
|
}
|
|
85
81
|
});
|
|
86
82
|
|
|
@@ -107,7 +103,7 @@ let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
107
103
|
* @returns The activity object (asynchronously).
|
|
108
104
|
*/
|
|
109
105
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
-
_createClass(AddActivitySubscriber, [{
|
|
106
|
+
return _createClass(AddActivitySubscriber, [{
|
|
111
107
|
key: "next",
|
|
112
108
|
value: async function next(activity) {
|
|
113
109
|
return activity;
|
|
@@ -122,6 +118,4 @@ let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
122
118
|
this.processedActivityIds.clear();
|
|
123
119
|
}
|
|
124
120
|
}]);
|
|
125
|
-
|
|
126
|
-
}();
|
|
127
|
-
exports.AddActivitySubscriber = AddActivitySubscriber;
|
|
121
|
+
}();
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js
CHANGED
|
@@ -8,12 +8,12 @@ var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components
|
|
|
8
8
|
var _TelemetryConstants = require("../../../../common/telemetry/TelemetryConstants");
|
|
9
9
|
var _TelemetryHelper = require("../../../../common/telemetry/TelemetryHelper");
|
|
10
10
|
var _TelemetryManager = require("../../../../common/telemetry/TelemetryManager");
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
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); } /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
17
|
const supportedSignInCardContentTypes = ["application/vnd.microsoft.card.signin", "application/vnd.microsoft.card.oauth"];
|
|
18
18
|
const botOauthUrlRegex = /[\S]+.botframework.com\/api\/oauth\/signin\?signin=([\S]+)/;
|
|
19
19
|
const delay = t => new Promise(resolve => setTimeout(resolve, t));
|
|
@@ -68,7 +68,7 @@ const fetchBotAuthConfig = async (retries, interval) => {
|
|
|
68
68
|
}
|
|
69
69
|
return await fetchBotAuthConfig(--retries, interval);
|
|
70
70
|
};
|
|
71
|
-
let BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
71
|
+
let BotAuthActivitySubscriber = exports.BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
72
72
|
function BotAuthActivitySubscriber() {
|
|
73
73
|
let optionalParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
74
74
|
_classCallCheck(this, BotAuthActivitySubscriber);
|
|
@@ -86,11 +86,11 @@ let BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
|
86
86
|
this.fetchBotAuthConfigRetryInterval = optionalParams.fetchBotAuthConfigRetryInterval;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
_createClass(BotAuthActivitySubscriber, [{
|
|
89
|
+
return _createClass(BotAuthActivitySubscriber, [{
|
|
90
90
|
key: "applicable",
|
|
91
91
|
value: function applicable(activity) {
|
|
92
92
|
var _activity$attachments;
|
|
93
|
-
return (activity === null || activity === void 0
|
|
93
|
+
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;
|
|
94
94
|
}
|
|
95
95
|
}, {
|
|
96
96
|
key: "apply",
|
|
@@ -160,6 +160,4 @@ let BotAuthActivitySubscriber = /*#__PURE__*/function () {
|
|
|
160
160
|
return activity;
|
|
161
161
|
}
|
|
162
162
|
}]);
|
|
163
|
-
|
|
164
|
-
}();
|
|
165
|
-
exports.BotAuthActivitySubscriber = BotAuthActivitySubscriber;
|
|
163
|
+
}();
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js
CHANGED
|
@@ -4,19 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DefaultActivitySubscriber = void 0;
|
|
7
|
-
function _classCallCheck(
|
|
8
|
-
function _defineProperties(
|
|
9
|
-
function _createClass(
|
|
10
|
-
function _defineProperty(
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
13
|
-
let DefaultActivitySubscriber = /*#__PURE__*/function () {
|
|
7
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
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); }
|
|
13
|
+
let DefaultActivitySubscriber = exports.DefaultActivitySubscriber = /*#__PURE__*/function () {
|
|
14
14
|
function DefaultActivitySubscriber() {
|
|
15
15
|
_classCallCheck(this, DefaultActivitySubscriber);
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
17
|
_defineProperty(this, "observer", void 0);
|
|
18
18
|
}
|
|
19
|
-
_createClass(DefaultActivitySubscriber, [{
|
|
19
|
+
return _createClass(DefaultActivitySubscriber, [{
|
|
20
20
|
key: "next",
|
|
21
21
|
value:
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -25,6 +25,4 @@ let DefaultActivitySubscriber = /*#__PURE__*/function () {
|
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
27
|
}]);
|
|
28
|
-
|
|
29
|
-
}();
|
|
30
|
-
exports.DefaultActivitySubscriber = DefaultActivitySubscriber;
|
|
28
|
+
}();
|
|
@@ -8,19 +8,19 @@ var _Constants = require("../../../../common/Constants");
|
|
|
8
8
|
var _TelemetryConstants = require("../../../../common/telemetry/TelemetryConstants");
|
|
9
9
|
var _TelemetryHelper = require("../../../../common/telemetry/TelemetryHelper");
|
|
10
10
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
17
|
-
let HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
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); }
|
|
17
|
+
let HiddenAdaptiveCardActivitySubscriber = exports.HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
|
|
18
18
|
function HiddenAdaptiveCardActivitySubscriber() {
|
|
19
19
|
_classCallCheck(this, HiddenAdaptiveCardActivitySubscriber);
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
_defineProperty(this, "observer", void 0);
|
|
22
22
|
}
|
|
23
|
-
_createClass(HiddenAdaptiveCardActivitySubscriber, [{
|
|
23
|
+
return _createClass(HiddenAdaptiveCardActivitySubscriber, [{
|
|
24
24
|
key: "apply",
|
|
25
25
|
value:
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -85,6 +85,4 @@ let HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
|
|
|
85
85
|
return activity;
|
|
86
86
|
}
|
|
87
87
|
}]);
|
|
88
|
-
|
|
89
|
-
}();
|
|
90
|
-
exports.HiddenAdaptiveCardActivitySubscriber = HiddenAdaptiveCardActivitySubscriber;
|
|
88
|
+
}();
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js
CHANGED
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PauseActivitySubscriber = void 0;
|
|
7
7
|
var _ActivityStreamHandler = require("../ActivityStreamHandler");
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
function _defineProperties(
|
|
10
|
-
function _createClass(
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
14
|
-
let PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
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); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
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); }
|
|
14
|
+
let PauseActivitySubscriber = exports.PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
15
15
|
function PauseActivitySubscriber() {
|
|
16
16
|
_classCallCheck(this, PauseActivitySubscriber);
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
18
|
_defineProperty(this, "observer", void 0);
|
|
19
19
|
}
|
|
20
|
-
_createClass(PauseActivitySubscriber, [{
|
|
20
|
+
return _createClass(PauseActivitySubscriber, [{
|
|
21
21
|
key: "apply",
|
|
22
22
|
value:
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -43,6 +43,4 @@ let PauseActivitySubscriber = /*#__PURE__*/function () {
|
|
|
43
43
|
return activity;
|
|
44
44
|
}
|
|
45
45
|
}]);
|
|
46
|
-
|
|
47
|
-
}();
|
|
48
|
-
exports.PauseActivitySubscriber = PauseActivitySubscriber;
|
|
46
|
+
}();
|
|
@@ -6,24 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ChatAdapterShim = void 0;
|
|
7
7
|
var _DefaultActivitySubscriber = require("./ActivitySubscriber/DefaultActivitySubscriber");
|
|
8
8
|
var _shareObservable = require("./shareObservable");
|
|
9
|
-
function _classCallCheck(
|
|
10
|
-
function _defineProperties(
|
|
11
|
-
function _createClass(
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
15
|
-
let ChatAdapterShim = /*#__PURE__*/function () {
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
|
|
9
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
10
|
+
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); } }
|
|
11
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
let ChatAdapterShim = exports.ChatAdapterShim = /*#__PURE__*/function () {
|
|
22
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
17
|
function ChatAdapterShim(chatAdapter) {
|
|
24
18
|
_classCallCheck(this, ChatAdapterShim);
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
20
|
_defineProperty(this, "chatAdapter", void 0);
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
22
|
_defineProperty(this, "activityObserver", void 0);
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
24
|
_defineProperty(this, "subscribers", void 0);
|
|
28
25
|
this.subscribers = [];
|
|
29
26
|
this.chatAdapter = {
|
|
@@ -61,12 +58,10 @@ let ChatAdapterShim = /*#__PURE__*/function () {
|
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
-
_createClass(ChatAdapterShim, [{
|
|
61
|
+
return _createClass(ChatAdapterShim, [{
|
|
65
62
|
key: "addSubscriber",
|
|
66
63
|
value: function addSubscriber(subscriber) {
|
|
67
64
|
this.subscribers.push(subscriber);
|
|
68
65
|
}
|
|
69
66
|
}]);
|
|
70
|
-
|
|
71
|
-
}();
|
|
72
|
-
exports.ChatAdapterShim = ChatAdapterShim;
|
|
67
|
+
}();
|
|
@@ -4,12 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var ChatWidgetEvents
|
|
8
|
-
(function (ChatWidgetEvents) {
|
|
7
|
+
var ChatWidgetEvents = /*#__PURE__*/function (ChatWidgetEvents) {
|
|
9
8
|
ChatWidgetEvents["ADD_ACTIVITY"] = "CHAT_WIDGET/ADD_ACTIVITY";
|
|
10
9
|
ChatWidgetEvents["FETCH_PERSISTENT_CHAT_HISTORY"] = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY";
|
|
11
10
|
ChatWidgetEvents["NO_MORE_HISTORY_AVAILABLE"] = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE";
|
|
12
11
|
ChatWidgetEvents["HISTORY_LOAD_ERROR"] = "CHAT_WIDGET/HISTORY_LOAD_ERROR";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.default =
|
|
12
|
+
return ChatWidgetEvents;
|
|
13
|
+
}(ChatWidgetEvents || {});
|
|
14
|
+
var _default = exports.default = ChatWidgetEvents;
|
|
@@ -4,19 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Deferred = void 0;
|
|
7
|
-
function _classCallCheck(
|
|
8
|
-
function _defineProperties(
|
|
9
|
-
function _createClass(
|
|
10
|
-
function _defineProperty(
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
13
|
-
let Deferred = /*#__PURE__*/function () {
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
-
|
|
7
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
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); }
|
|
13
|
+
let Deferred = exports.Deferred = /*#__PURE__*/function () {
|
|
16
14
|
function Deferred() {
|
|
17
15
|
_classCallCheck(this, Deferred);
|
|
18
16
|
_defineProperty(this, "_promise", void 0);
|
|
19
17
|
_defineProperty(this, "_resolve", void 0);
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
19
|
_defineProperty(this, "_reject", () => {
|
|
21
20
|
return;
|
|
22
21
|
});
|
|
@@ -33,12 +32,10 @@ let Deferred = /*#__PURE__*/function () {
|
|
|
33
32
|
this._reject = reject;
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
|
-
_createClass(Deferred, [{
|
|
35
|
+
return _createClass(Deferred, [{
|
|
37
36
|
key: "promise",
|
|
38
37
|
get: function () {
|
|
39
38
|
return this._promise;
|
|
40
39
|
}
|
|
41
40
|
}]);
|
|
42
|
-
|
|
43
|
-
}();
|
|
44
|
-
exports.Deferred = Deferred;
|
|
41
|
+
}();
|
|
@@ -13,19 +13,17 @@ var _convertPersistentChatHistoryMessageToActivity = _interopRequireDefault(requ
|
|
|
13
13
|
var _utils = require("../../../common/utils");
|
|
14
14
|
var _defaultPersistentChatHistoryProps = require("./defaultProps/defaultPersistentChatHistoryProps");
|
|
15
15
|
var _dispatchCustomEvent = _interopRequireDefault(require("../../../common/utils/dispatchCustomEvent"));
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _defineProperty(
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
22
|
+
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); }
|
|
23
23
|
/**
|
|
24
24
|
* Class responsible for handling persistent conversation history
|
|
25
25
|
*/
|
|
26
26
|
let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
|
|
29
27
|
function PersistentConversationHandler(facadeChatSDK, props) {
|
|
30
28
|
_classCallCheck(this, PersistentConversationHandler);
|
|
31
29
|
_defineProperty(this, "appliedProps", {
|
|
@@ -34,6 +32,7 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
34
32
|
_defineProperty(this, "isLastPull", false);
|
|
35
33
|
_defineProperty(this, "pageToken", null);
|
|
36
34
|
_defineProperty(this, "facadeChatSDK", void 0);
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
36
|
_defineProperty(this, "lastMessage", null);
|
|
38
37
|
_defineProperty(this, "count", 0);
|
|
39
38
|
_defineProperty(this, "pageSize", _defaultPersistentChatHistoryProps.defaultPersistentChatHistoryProps.pageSize);
|
|
@@ -52,7 +51,7 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
52
51
|
}
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
|
-
_createClass(PersistentConversationHandler, [{
|
|
54
|
+
return _createClass(PersistentConversationHandler, [{
|
|
56
55
|
key: "appliedPropsHandler",
|
|
57
56
|
value: function appliedPropsHandler(props) {
|
|
58
57
|
var _this$appliedProps;
|
|
@@ -265,8 +264,8 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
265
264
|
}, {
|
|
266
265
|
key: "createDividerActivity",
|
|
267
266
|
value: function createDividerActivity(activity) {
|
|
268
|
-
var _this$lastMessage
|
|
269
|
-
if (((_this$lastMessage = this.lastMessage) === null || _this$lastMessage === void 0
|
|
267
|
+
var _this$lastMessage;
|
|
268
|
+
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) {
|
|
270
269
|
const rawSequenceId = activity.channelData["webchat:sequence-id"];
|
|
271
270
|
const sequenceId = typeof rawSequenceId === "number" && !isNaN(rawSequenceId) ? rawSequenceId + 1 : 1;
|
|
272
271
|
const timestamp = new Date(activity.timestamp).getTime() + 1;
|
|
@@ -284,7 +283,5 @@ let PersistentConversationHandler = /*#__PURE__*/function () {
|
|
|
284
283
|
return null;
|
|
285
284
|
}
|
|
286
285
|
}]);
|
|
287
|
-
return PersistentConversationHandler;
|
|
288
286
|
}();
|
|
289
|
-
var _default = PersistentConversationHandler;
|
|
290
|
-
exports.default = _default;
|
|
287
|
+
var _default = exports.default = PersistentConversationHandler;
|
|
@@ -12,7 +12,7 @@ const getAuthClientFunction = chatConfig => {
|
|
|
12
12
|
let authClientFunction = undefined;
|
|
13
13
|
if (chatConfig !== null && chatConfig !== void 0 && chatConfig.LiveChatConfigAuthSettings) {
|
|
14
14
|
var _chatConfig$LiveChatC;
|
|
15
|
-
authClientFunction = (chatConfig === null || chatConfig === void 0
|
|
15
|
+
authClientFunction = (chatConfig === null || chatConfig === void 0 || (_chatConfig$LiveChatC = chatConfig.LiveChatConfigAuthSettings) === null || _chatConfig$LiveChatC === void 0 ? void 0 : _chatConfig$LiveChatC.msdyn_javascriptclientfunction) ?? undefined;
|
|
16
16
|
}
|
|
17
17
|
return authClientFunction;
|
|
18
18
|
};
|