@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
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultTimestampRetryStyles = void 0;
|
|
7
7
|
var _defaultTimestampContentStyles = require("./defaultTimestampContentStyles");
|
|
8
|
-
const defaultTimestampRetryStyles = {
|
|
8
|
+
const defaultTimestampRetryStyles = exports.defaultTimestampRetryStyles = {
|
|
9
9
|
..._defaultTimestampContentStyles.defaultTimestampContentStyles,
|
|
10
10
|
color: "#0063B1",
|
|
11
11
|
cursor: "pointer"
|
|
12
|
-
};
|
|
13
|
-
exports.defaultTimestampRetryStyles = defaultTimestampRetryStyles;
|
|
12
|
+
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultTypingIndicatorBubbleStyles = void 0;
|
|
7
|
-
const defaultTypingIndicatorBubbleStyles = {
|
|
7
|
+
const defaultTypingIndicatorBubbleStyles = exports.defaultTypingIndicatorBubbleStyles = {
|
|
8
8
|
height: "6px",
|
|
9
9
|
width: "6px",
|
|
10
10
|
borderRadius: "6px",
|
|
@@ -14,5 +14,4 @@ const defaultTypingIndicatorBubbleStyles = {
|
|
|
14
14
|
animationTimingFunction: "ease",
|
|
15
15
|
animationIterationCount: "infinite",
|
|
16
16
|
marginRight: "2px"
|
|
17
|
-
};
|
|
18
|
-
exports.defaultTypingIndicatorBubbleStyles = defaultTypingIndicatorBubbleStyles;
|
|
17
|
+
};
|
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultTypingIndicatorContainerStyles = void 0;
|
|
7
|
-
const defaultTypingIndicatorContainerStyles = {
|
|
7
|
+
const defaultTypingIndicatorContainerStyles = exports.defaultTypingIndicatorContainerStyles = {
|
|
8
8
|
marginLeft: "10px",
|
|
9
9
|
marginBottom: "5px",
|
|
10
10
|
display: "flex",
|
|
11
11
|
transition: "all .5s ease",
|
|
12
12
|
alignItems: "center"
|
|
13
|
-
};
|
|
14
|
-
exports.defaultTypingIndicatorContainerStyles = defaultTypingIndicatorContainerStyles;
|
|
13
|
+
};
|
|
@@ -4,12 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultTypingIndicatorMessageStyles = void 0;
|
|
7
|
-
const defaultTypingIndicatorMessageStyles = {
|
|
7
|
+
const defaultTypingIndicatorMessageStyles = exports.defaultTypingIndicatorMessageStyles = {
|
|
8
8
|
fontFamily: "\"Segoe UI\", Arial, sans-serif",
|
|
9
9
|
background: "transparent",
|
|
10
10
|
fontSize: "12px",
|
|
11
11
|
lineHeight: "15px",
|
|
12
12
|
color: "#605e5c",
|
|
13
13
|
marginLeft: "6px"
|
|
14
|
-
};
|
|
15
|
-
exports.defaultTypingIndicatorMessageStyles = defaultTypingIndicatorMessageStyles;
|
|
14
|
+
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultUserMessageBoxStyles = void 0;
|
|
7
|
-
const defaultUserMessageBoxStyles = {
|
|
7
|
+
const defaultUserMessageBoxStyles = exports.defaultUserMessageBoxStyles = {
|
|
8
8
|
maxWidth: "90%"
|
|
9
|
-
};
|
|
10
|
-
exports.defaultUserMessageBoxStyles = defaultUserMessageBoxStyles;
|
|
9
|
+
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultUserMessageStyles = void 0;
|
|
7
|
-
const defaultUserMessageStyles = {
|
|
7
|
+
const defaultUserMessageStyles = exports.defaultUserMessageStyles = {
|
|
8
8
|
fontSize: "14px"
|
|
9
|
-
};
|
|
10
|
-
exports.defaultUserMessageStyles = defaultUserMessageStyles;
|
|
9
|
+
};
|
|
@@ -23,12 +23,12 @@ const isApplicable = action => {
|
|
|
23
23
|
return action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && isValidChannel(action) && isWebSequenceIdPresent(action) && lookupOriginalMessageId(action) !== undefined;
|
|
24
24
|
};
|
|
25
25
|
const isValidChannel = action => {
|
|
26
|
-
var _action$payload
|
|
27
|
-
return (action === null || action === void 0
|
|
26
|
+
var _action$payload;
|
|
27
|
+
return (action === null || action === void 0 || (_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.activity) === null || _action$payload === void 0 ? void 0 : _action$payload.channelId) === _Constants.Constants.acsChannel;
|
|
28
28
|
};
|
|
29
29
|
const isChannelDataPresent = action => {
|
|
30
|
-
var _action$payload2, _action$
|
|
31
|
-
return (action === null || action === void 0
|
|
30
|
+
var _action$payload2, _action$payload3;
|
|
31
|
+
return (action === null || action === void 0 || (_action$payload2 = action.payload) === null || _action$payload2 === void 0 || (_action$payload2 = _action$payload2.activity) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.channelData) !== undefined && (action === null || action === void 0 || (_action$payload3 = action.payload) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.activity) === null || _action$payload3 === void 0 ? void 0 : _action$payload3.channelData) !== null;
|
|
32
32
|
};
|
|
33
33
|
const isWebSequenceIdPresent = action => {
|
|
34
34
|
if (!isChannelDataPresent(action)) return false;
|
|
@@ -59,6 +59,6 @@ const extractOriginalMessageId = action => {
|
|
|
59
59
|
return isNaN(originalMessageIdResult) ? undefined : originalMessageIdResult;
|
|
60
60
|
};
|
|
61
61
|
const lookupOriginalMessageId = action => {
|
|
62
|
-
var _action$payload4
|
|
63
|
-
return action === null || action === void 0
|
|
62
|
+
var _action$payload4;
|
|
63
|
+
return action === null || action === void 0 || (_action$payload4 = action.payload) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.activity) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.channelData) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.metadata) === null || _action$payload4 === void 0 ? void 0 : _action$payload4.OriginalMessageId;
|
|
64
64
|
};
|
|
@@ -24,11 +24,11 @@ const isApplicable = action => {
|
|
|
24
24
|
};
|
|
25
25
|
const isPayloadValid = action => {
|
|
26
26
|
var _action$payload;
|
|
27
|
-
return action === null || action === void 0
|
|
27
|
+
return action === null || action === void 0 || (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.activity;
|
|
28
28
|
};
|
|
29
29
|
const isValidChannel = action => {
|
|
30
|
-
var _action$payload2
|
|
31
|
-
return (action === null || action === void 0
|
|
30
|
+
var _action$payload2;
|
|
31
|
+
return (action === null || action === void 0 || (_action$payload2 = action.payload) === null || _action$payload2 === void 0 || (_action$payload2 = _action$payload2.activity) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.channelId) === _Constants.Constants.acsChannel;
|
|
32
32
|
};
|
|
33
33
|
const isPVAConversation = action => {
|
|
34
34
|
return !isTagIncluded(action, _Constants.Constants.systemMessageTag) && !isTagIncluded(action, _Constants.Constants.publicMessageTag) && !isRoleUserOn(action);
|
|
@@ -39,8 +39,8 @@ const isTagIncluded = (action, tag) => {
|
|
|
39
39
|
return isDataTagsPresent(action) && action.payload.activity.channelData.tags.includes(tag);
|
|
40
40
|
};
|
|
41
41
|
const isRoleUserOn = action => {
|
|
42
|
-
var _action$payload3
|
|
43
|
-
return (action === null || action === void 0
|
|
42
|
+
var _action$payload3;
|
|
43
|
+
return (action === null || action === void 0 || (_action$payload3 = action.payload) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.activity) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.from) === null || _action$payload3 === void 0 ? void 0 : _action$payload3.role) === _Constants.Constants.userMessageTag;
|
|
44
44
|
};
|
|
45
45
|
const overrideTimeStamp = (timestampOriginal, timeStampNew) => {
|
|
46
46
|
return isTimestampValid(timeStampNew) ? timeStampNew : timestampOriginal;
|
|
@@ -50,8 +50,8 @@ const isTimestampValid = timeStamp => {
|
|
|
50
50
|
return regex.test(timeStamp);
|
|
51
51
|
};
|
|
52
52
|
const isDataTagsPresent = action => {
|
|
53
|
-
var _action$payload4
|
|
54
|
-
return (action === null || action === void 0
|
|
53
|
+
var _action$payload4;
|
|
54
|
+
return (action === null || action === void 0 || (_action$payload4 = action.payload) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.activity) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.channelData) === null || _action$payload4 === void 0 ? void 0 : _action$payload4.tags) && action.payload.activity.channelData.tags.length > 0;
|
|
55
55
|
};
|
|
56
56
|
const evaluateTagsAndOverrideTimeStamp = action => {
|
|
57
57
|
const tagValue = tagLookup(action, _Constants.Constants.prefixTimestampTag);
|
|
@@ -11,7 +11,7 @@ var _defaultMiddlewareLocalizedTexts = require("../../../../common/defaultProps/
|
|
|
11
11
|
var _defaultTimestampContentStyles = require("../defaultStyles/defaultTimestampContentStyles");
|
|
12
12
|
var _utils = require("../../../../../../common/utils");
|
|
13
13
|
var _useChatContextStore = _interopRequireDefault(require("../../../../../../hooks/useChatContextStore"));
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
/* eslint @typescript-eslint/no-explicit-any: "off" */
|
|
16
16
|
const DeliveredTimestamp = _ref => {
|
|
17
17
|
var _state$domainStates$r, _state$domainStates$r2, _state$domainStates$m;
|
|
@@ -10,7 +10,7 @@ var _defaultMiddlewareLocalizedTexts = require("../../../../common/defaultProps/
|
|
|
10
10
|
var _defaultTimestampContentStyles = require("../defaultStyles/defaultTimestampContentStyles");
|
|
11
11
|
var _utils = require("../../../../../../common/utils");
|
|
12
12
|
var _useChatContextStore = _interopRequireDefault(require("../../../../../../hooks/useChatContextStore"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
const HistoryMessageTimestamp = _ref => {
|
|
16
16
|
var _state$domainStates$r, _state$domainStates$r2, _state$domainStates$m;
|
|
@@ -14,9 +14,8 @@ var _defaultTimestampRetryStyles = require("../defaultStyles/defaultTimestampRet
|
|
|
14
14
|
var _utils = require("../../../../../../common/utils");
|
|
15
15
|
var _botframeworkWebchat = require("botframework-webchat");
|
|
16
16
|
var _useChatContextStore = _interopRequireDefault(require("../../../../../../hooks/useChatContextStore"));
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function
|
|
19
|
-
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; }
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
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); }
|
|
20
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -54,7 +53,7 @@ const NotDeliveredTimestamp = _ref => {
|
|
|
54
53
|
};
|
|
55
54
|
(0, _react.useEffect)(() => {
|
|
56
55
|
var _timestampRef$current;
|
|
57
|
-
const timestampWebChatNodes = timestampRef === null || timestampRef === void 0
|
|
56
|
+
const timestampWebChatNodes = timestampRef === null || timestampRef === void 0 || (_timestampRef$current = timestampRef.current) === null || _timestampRef$current === void 0 ? void 0 : _timestampRef$current.childNodes;
|
|
58
57
|
if ((timestampWebChatNodes === null || timestampWebChatNodes === void 0 ? void 0 : timestampWebChatNodes.length) > 1) {
|
|
59
58
|
timestampWebChatNodes[1].innerText = (0, _utils.getTimestampHourMinute)(timestamp);
|
|
60
59
|
}
|
|
@@ -9,7 +9,7 @@ var _react2 = require("@fluentui/react");
|
|
|
9
9
|
var _defaultMiddlewareLocalizedTexts = require("../../../../common/defaultProps/defaultMiddlewareLocalizedTexts");
|
|
10
10
|
var _defaultTimestampContentStyles = require("../defaultStyles/defaultTimestampContentStyles");
|
|
11
11
|
var _useChatContextStore = _interopRequireDefault(require("../../../../../../hooks/useChatContextStore"));
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
/* eslint @typescript-eslint/no-explicit-any: "off" */
|
|
14
14
|
const SendingTimestamp = () => {
|
|
15
15
|
var _state$domainStates$r, _state$domainStates$r2, _state$domainStates$m;
|
|
@@ -7,7 +7,7 @@ exports.createToastMiddleware = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _NotificationScenarios = require("../../enums/NotificationScenarios");
|
|
9
9
|
var _NotificationPaneStateful = _interopRequireDefault(require("../../../../notificationpanestateful/NotificationPaneStateful"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
12
|
const createToastMiddleware = (notificationPaneProps, endChat) => {
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/display-name
|
|
@@ -26,7 +26,6 @@ const createToastMiddleware = (notificationPaneProps, endChat) => {
|
|
|
26
26
|
|
|
27
27
|
// TODO: additional notification scenarios to be added...
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
return next(card);
|
|
31
30
|
};
|
|
32
31
|
return toastMiddleware;
|
|
@@ -13,9 +13,8 @@ var _defaultTypingIndicatorContainerStyles = require("./defaultStyles/defaultTyp
|
|
|
13
13
|
var _defaultTypingIndicatorMessageStyles = require("./defaultStyles/defaultTypingIndicatorMessageStyles");
|
|
14
14
|
var _ = require("../../../../..");
|
|
15
15
|
var _useFacadeChatSDKStore = _interopRequireDefault(require("../../../../../hooks/useFacadeChatSDKStore"));
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
function
|
|
18
|
-
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; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
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); }
|
|
19
18
|
/******
|
|
20
19
|
* TypingIndicatorMiddleware
|
|
21
20
|
*
|
|
@@ -27,8 +27,8 @@ const attachmentProcessingMiddleware = _ref => {
|
|
|
27
27
|
dispatch
|
|
28
28
|
} = _ref;
|
|
29
29
|
return next => async action => {
|
|
30
|
-
var _action$payload
|
|
31
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === _WebChatActionType.WebChatActionType.WEB_CHAT_SEND_MESSAGE && (action === null || action === void 0
|
|
30
|
+
var _action$payload;
|
|
31
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === _WebChatActionType.WebChatActionType.WEB_CHAT_SEND_MESSAGE && (action === null || action === void 0 || (_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.attachments) === null || _action$payload === void 0 ? void 0 : _action$payload.length) > 0) {
|
|
32
32
|
const files = action.payload.attachments;
|
|
33
33
|
if (files.length === 1) {
|
|
34
34
|
return next(action);
|
|
@@ -41,5 +41,4 @@ const attachmentProcessingMiddleware = _ref => {
|
|
|
41
41
|
return next(action);
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
var _default = attachmentProcessingMiddleware;
|
|
45
|
-
exports.default = _default;
|
|
44
|
+
var _default = exports.default = attachmentProcessingMiddleware;
|
|
@@ -23,9 +23,9 @@ const MBtoBRatio = 1000000;
|
|
|
23
23
|
* If the result attachment list is empty, return a dummy action
|
|
24
24
|
*/
|
|
25
25
|
const validateAttachment = (action, allowedFileExtensions, maxFileSizeSupportedByDynamics, localizedTexts) => {
|
|
26
|
-
var _action$payload, _action$
|
|
27
|
-
const attachments = action === null || action === void 0
|
|
28
|
-
const attachmentSizes = action === null || action === void 0
|
|
26
|
+
var _action$payload, _action$payload2, _action$payload3;
|
|
27
|
+
const attachments = action === null || action === void 0 || (_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.activity) === null || _action$payload === void 0 ? void 0 : _action$payload.attachments;
|
|
28
|
+
const attachmentSizes = action === null || action === void 0 || (_action$payload2 = action.payload) === null || _action$payload2 === void 0 || (_action$payload2 = _action$payload2.activity) === null || _action$payload2 === void 0 || (_action$payload2 = _action$payload2.channelData) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.attachmentSizes;
|
|
29
29
|
if (!attachments || attachments.length === 0) {
|
|
30
30
|
return action;
|
|
31
31
|
}
|
|
@@ -45,7 +45,7 @@ const validateAttachment = (action, allowedFileExtensions, maxFileSizeSupportedB
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
if ((action === null || action === void 0
|
|
48
|
+
if ((action === null || action === void 0 || (_action$payload3 = action.payload) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.activity) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.attachments) === null || _action$payload3 === void 0 ? void 0 : _action$payload3.length) > 0) {
|
|
49
49
|
return action;
|
|
50
50
|
} else {
|
|
51
51
|
return {
|
|
@@ -201,16 +201,15 @@ const createAttachmentUploadValidatorMiddleware = (allowedFileExtensions, maxFil
|
|
|
201
201
|
} = _ref;
|
|
202
202
|
return next => action => {
|
|
203
203
|
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_POST_ACTIVITY) {
|
|
204
|
-
var _payload$activity, _payload$
|
|
204
|
+
var _payload$activity, _payload$activity2;
|
|
205
205
|
const {
|
|
206
206
|
payload
|
|
207
207
|
} = action;
|
|
208
|
-
if (payload !== null && payload !== void 0 && payload.activity.attachments && payload.activity.attachments.length > 0 && (payload === null || payload === void 0
|
|
208
|
+
if (payload !== null && payload !== void 0 && payload.activity.attachments && payload.activity.attachments.length > 0 && (payload === null || payload === void 0 || (_payload$activity = payload.activity) === null || _payload$activity === void 0 || (_payload$activity = _payload$activity.attachments) === null || _payload$activity === void 0 ? void 0 : _payload$activity.length) === (payload === null || payload === void 0 || (_payload$activity2 = payload.activity) === null || _payload$activity2 === void 0 || (_payload$activity2 = _payload$activity2.channelData) === null || _payload$activity2 === void 0 || (_payload$activity2 = _payload$activity2.attachmentSizes) === null || _payload$activity2 === void 0 ? void 0 : _payload$activity2.length)) {
|
|
209
209
|
return next(validateAttachment(action, allowedFileExtensions, maxFileSizeSupportedByDynamics, localizedTexts));
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
return next(action);
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
-
var _default = createAttachmentUploadValidatorMiddleware;
|
|
216
|
-
exports.default = _default;
|
|
215
|
+
var _default = exports.default = createAttachmentUploadValidatorMiddleware;
|
|
@@ -19,8 +19,8 @@ const channelDataMiddleware = addConversationalSurveyTagsCallback => _ref => {
|
|
|
19
19
|
dispatch
|
|
20
20
|
} = _ref;
|
|
21
21
|
return next => action => {
|
|
22
|
-
var _action, _action2
|
|
23
|
-
if (((_action = action) === null || _action === void 0 ? void 0 : _action.type) === _WebChatActionType.WebChatActionType.DIRECT_LINE_POST_ACTIVITY_PENDING && (_action2 = action) !== null && _action2 !== void 0 && (_action2
|
|
22
|
+
var _action, _action2;
|
|
23
|
+
if (((_action = action) === null || _action === void 0 ? void 0 : _action.type) === _WebChatActionType.WebChatActionType.DIRECT_LINE_POST_ACTIVITY_PENDING && (_action2 = action) !== null && _action2 !== void 0 && (_action2 = _action2.payload) !== null && _action2 !== void 0 && (_action2 = _action2.activity) !== null && _action2 !== void 0 && _action2.channelData) {
|
|
24
24
|
const channelIdTag = `${_Constants.Constants.channelIdKey}${_Constants.Constants.ChannelId}`;
|
|
25
25
|
const customerMessageTag = `${_Constants.Constants.CustomerTag}`;
|
|
26
26
|
if (action.payload.activity.channelData.tags) {
|
|
@@ -42,5 +42,4 @@ const channelDataMiddleware = addConversationalSurveyTagsCallback => _ref => {
|
|
|
42
42
|
return next(action);
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
var _default = channelDataMiddleware;
|
|
46
|
-
exports.default = _default;
|
|
45
|
+
var _default = exports.default = channelDataMiddleware;
|
|
@@ -18,7 +18,7 @@ const createCitationsMiddleware = (state, dispatch) => () => next => action => {
|
|
|
18
18
|
if ((_action$payload = action.payload) !== null && _action$payload !== void 0 && _action$payload.activity) {
|
|
19
19
|
if (isApplicable(action)) {
|
|
20
20
|
try {
|
|
21
|
-
var _action$payload2,
|
|
21
|
+
var _action$payload2, _gptFeedback$summariz;
|
|
22
22
|
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
23
23
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
24
24
|
payload: null
|
|
@@ -26,10 +26,10 @@ const createCitationsMiddleware = (state, dispatch) => () => next => action => {
|
|
|
26
26
|
|
|
27
27
|
// Use the producer-supplied messageid as a stable per-message prefix
|
|
28
28
|
// when present. Do not derive a prefix from activity.id or timestamps.
|
|
29
|
-
const messagePrefix = ((_action$payload2 = action.payload) === null || _action$payload2 === void 0
|
|
29
|
+
const messagePrefix = ((_action$payload2 = action.payload) === null || _action$payload2 === void 0 || (_action$payload2 = _action$payload2.activity) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.messageid) ?? "";
|
|
30
30
|
const gptFeedback = JSON.parse(action.payload.activity.channelData.metadata["pva:gpt-feedback"]);
|
|
31
31
|
// Extract citation objects from the model response
|
|
32
|
-
const citations = (_gptFeedback$summariz = gptFeedback.summarizationOpenAIResponse) === null || _gptFeedback$summariz === void 0
|
|
32
|
+
const citations = (_gptFeedback$summariz = gptFeedback.summarizationOpenAIResponse) === null || _gptFeedback$summariz === void 0 || (_gptFeedback$summariz = _gptFeedback$summariz.result) === null || _gptFeedback$summariz === void 0 ? void 0 : _gptFeedback$summariz.textCitations;
|
|
33
33
|
// Rewrite inline citation labels in activity.text to match the global map keys
|
|
34
34
|
const updatedText = replaceCitations(action.payload.activity.text, citations, messagePrefix);
|
|
35
35
|
|
|
@@ -56,7 +56,7 @@ const createCitationsMiddleware = (state, dispatch) => () => next => action => {
|
|
|
56
56
|
|
|
57
57
|
// Read current in-memory state to merge with existing citations
|
|
58
58
|
//const inMemoryState = executeReducer(state, { type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE, payload: null });
|
|
59
|
-
const existingCitations = (inMemoryState === null || inMemoryState === void 0
|
|
59
|
+
const existingCitations = (inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$domain = inMemoryState.domainStates) === null || _inMemoryState$domain === void 0 ? void 0 : _inMemoryState$domain.citations) || {};
|
|
60
60
|
const updatedCitations = {
|
|
61
61
|
...existingCitations,
|
|
62
62
|
...citationMap
|
|
@@ -90,11 +90,11 @@ const createCitationsMiddleware = (state, dispatch) => () => next => action => {
|
|
|
90
90
|
};
|
|
91
91
|
exports.createCitationsMiddleware = createCitationsMiddleware;
|
|
92
92
|
const isApplicable = action => {
|
|
93
|
-
var _action$payload3, _action$
|
|
94
|
-
if ((action === null || action === void 0
|
|
95
|
-
var _action$payload5
|
|
93
|
+
var _action$payload3, _action$payload4;
|
|
94
|
+
if ((action === null || action === void 0 || (_action$payload3 = action.payload) === null || _action$payload3 === void 0 || (_action$payload3 = _action$payload3.activity) === null || _action$payload3 === void 0 ? void 0 : _action$payload3.actionType) === "DIRECT_LINE/INCOMING_ACTIVITY" && (action === null || action === void 0 || (_action$payload4 = action.payload) === null || _action$payload4 === void 0 || (_action$payload4 = _action$payload4.activity) === null || _action$payload4 === void 0 ? void 0 : _action$payload4.channelId) === "ACS_CHANNEL") {
|
|
95
|
+
var _action$payload5;
|
|
96
96
|
// Only applicable for ACS incoming activities that include pva:gpt-feedback
|
|
97
|
-
if (action !== null && action !== void 0 && (_action$payload5 = action.payload) !== null && _action$payload5 !== void 0 && (_action$payload5
|
|
97
|
+
if (action !== null && action !== void 0 && (_action$payload5 = action.payload) !== null && _action$payload5 !== void 0 && (_action$payload5 = _action$payload5.activity) !== null && _action$payload5 !== void 0 && (_action$payload5 = _action$payload5.channelData) !== null && _action$payload5 !== void 0 && (_action$payload5 = _action$payload5.metadata) !== null && _action$payload5 !== void 0 && _action$payload5["pva:gpt-feedback"]) {
|
|
98
98
|
return true;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -23,26 +23,26 @@ const createConversationEndMiddleware = (conversationEndCallback, startConversat
|
|
|
23
23
|
return next => action => {
|
|
24
24
|
var _action$payload;
|
|
25
25
|
if ((action === null || action === void 0 ? void 0 : action.type) == _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && (_action$payload = action.payload) !== null && _action$payload !== void 0 && _action$payload.activity) {
|
|
26
|
-
var _activity$from2, _activity$
|
|
26
|
+
var _activity$from2, _activity$channelData9, _activity$channelData0;
|
|
27
27
|
const activity = action.payload.activity;
|
|
28
28
|
if (activity.channelId === "ACS_CHANNEL") {
|
|
29
29
|
var _activity$from;
|
|
30
30
|
if (((_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === _DirectLineSenderRole.DirectLineSenderRole.Bot) {
|
|
31
|
-
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$channelData4, _activity$channelData5, _activity$channelData6, _activity$channelData7, _activity$channelData8
|
|
32
|
-
if ((_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$
|
|
31
|
+
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$channelData4, _activity$channelData5, _activity$channelData6, _activity$channelData7, _activity$channelData8;
|
|
32
|
+
if ((_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData = _activity$channelData.tags) !== null && _activity$channelData !== void 0 && _activity$channelData.includes(_Constants.Constants.systemMessageTag) && ((_activity$channelData2 = activity.channelData) !== null && _activity$channelData2 !== void 0 && (_activity$channelData2 = _activity$channelData2.tags) !== null && _activity$channelData2 !== void 0 && _activity$channelData2.includes(_Constants.Constants.agentEndConversationMessageTag) || (_activity$channelData3 = activity.channelData) !== null && _activity$channelData3 !== void 0 && (_activity$channelData3 = _activity$channelData3.tags) !== null && _activity$channelData3 !== void 0 && _activity$channelData3.includes(_Constants.Constants.supervisorForceCloseMessageTag))) {
|
|
33
33
|
conversationEndCallback();
|
|
34
34
|
}
|
|
35
|
-
if ((_activity$
|
|
35
|
+
if ((_activity$channelData4 = activity.channelData) !== null && _activity$channelData4 !== void 0 && (_activity$channelData4 = _activity$channelData4.tags) !== null && _activity$channelData4 !== void 0 && _activity$channelData4.includes(_Constants.Constants.systemMessageTag) && ((_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData5 = _activity$channelData5.tags) !== null && _activity$channelData5 !== void 0 && _activity$channelData5.includes(_Constants.Constants.startConversationalSurveyMessageTag) || (_activity$channelData6 = activity.channelData) !== null && _activity$channelData6 !== void 0 && (_activity$channelData6 = _activity$channelData6.tags) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.includes(_Constants.Constants.startConversationalSurveyMessageTag))) {
|
|
36
36
|
startConversationalSurveyCallback();
|
|
37
37
|
}
|
|
38
|
-
if ((_activity$
|
|
38
|
+
if ((_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && (_activity$channelData7 = _activity$channelData7.tags) !== null && _activity$channelData7 !== void 0 && _activity$channelData7.includes(_Constants.Constants.systemMessageTag) && (_activity$channelData8 = activity.channelData) !== null && _activity$channelData8 !== void 0 && (_activity$channelData8 = _activity$channelData8.tags) !== null && _activity$channelData8 !== void 0 && _activity$channelData8.includes(_Constants.Constants.endConversationalSurveyMessageTag)) {
|
|
39
39
|
endConversationalSurveyCallback();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
} else if (((_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role) === _DirectLineSenderRole.DirectLineSenderRole.Channel && ((_activity$
|
|
43
|
-
var _activity$
|
|
42
|
+
} else if (((_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role) === _DirectLineSenderRole.DirectLineSenderRole.Channel && ((_activity$channelData9 = activity.channelData) === null || _activity$channelData9 === void 0 ? void 0 : _activity$channelData9.type) === _MessageType.MessageTypes.Thread && (_activity$channelData0 = activity.channelData) !== null && _activity$channelData0 !== void 0 && _activity$channelData0.properties) {
|
|
43
|
+
var _activity$channelData1, _activity$channelData10;
|
|
44
44
|
// IC3
|
|
45
|
-
if (((_activity$
|
|
45
|
+
if (((_activity$channelData1 = activity.channelData) === null || _activity$channelData1 === void 0 || (_activity$channelData1 = _activity$channelData1.properties) === null || _activity$channelData1 === void 0 ? void 0 : _activity$channelData1.isdeleted) === _Constants.Constants.truePascal || !((_activity$channelData10 = activity.channelData) !== null && _activity$channelData10 !== void 0 && (_activity$channelData10 = _activity$channelData10.properties) !== null && _activity$channelData10 !== void 0 && _activity$channelData10.containsExternalEntitiesListeningAll)) {
|
|
46
46
|
conversationEndCallback();
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -50,5 +50,4 @@ const createConversationEndMiddleware = (conversationEndCallback, startConversat
|
|
|
50
50
|
return next(action);
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
var _default = createConversationEndMiddleware;
|
|
54
|
-
exports.default = _default;
|
|
53
|
+
var _default = exports.default = createConversationEndMiddleware;
|
|
@@ -14,8 +14,8 @@ var _WebChatActionType = require("../../enums/WebChatActionType");
|
|
|
14
14
|
******/
|
|
15
15
|
|
|
16
16
|
const isValidCustomEvent = activity => {
|
|
17
|
-
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$
|
|
18
|
-
return !!(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$
|
|
17
|
+
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$from, _activity$channelData4, _activity$channelData5;
|
|
18
|
+
return !!(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData = _activity$channelData.metadata) !== null && _activity$channelData !== void 0 && _activity$channelData.customEvent && typeof (activity === null || activity === void 0 || (_activity$channelData2 = activity.channelData) === null || _activity$channelData2 === void 0 || (_activity$channelData2 = _activity$channelData2.metadata) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.customEvent) === _Constants.Constants.String && (activity === null || activity === void 0 || (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 || (_activity$channelData3 = _activity$channelData3.metadata) === null || _activity$channelData3 === void 0 || (_activity$channelData3 = _activity$channelData3.customEvent) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.toLowerCase()) === _Constants.Constants.true && (activity === null || activity === void 0 || (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) !== _Constants.Constants.userMessageTag && typeof (activity === null || activity === void 0 || (_activity$channelData4 = activity.channelData) === null || _activity$channelData4 === void 0 || (_activity$channelData4 = _activity$channelData4.metadata) === null || _activity$channelData4 === void 0 ? void 0 : _activity$channelData4.customEventName) === _Constants.Constants.String && activity !== null && activity !== void 0 && (_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData5 = _activity$channelData5.metadata) !== null && _activity$channelData5 !== void 0 && _activity$channelData5.customEventValue);
|
|
19
19
|
};
|
|
20
20
|
exports.isValidCustomEvent = isValidCustomEvent;
|
|
21
21
|
const createCustomEventMiddleware = broadcastservice => () => next => action => {
|
|
@@ -37,5 +37,4 @@ const createCustomEventMiddleware = broadcastservice => () => next => action =>
|
|
|
37
37
|
}
|
|
38
38
|
return next(action);
|
|
39
39
|
};
|
|
40
|
-
var _default = createCustomEventMiddleware;
|
|
41
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = createCustomEventMiddleware;
|
|
@@ -19,16 +19,16 @@ const gifUploadMiddleware = _ref => {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
return next => action => {
|
|
21
21
|
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_POST_ACTIVITY) {
|
|
22
|
-
var _activity$attachments, _activity$channelData
|
|
22
|
+
var _activity$attachments, _activity$channelData;
|
|
23
23
|
const {
|
|
24
24
|
payload: {
|
|
25
25
|
activity
|
|
26
26
|
}
|
|
27
27
|
} = action;
|
|
28
|
-
if ((activity === null || activity === void 0
|
|
28
|
+
if ((activity === null || activity === void 0 || (_activity$attachments = activity.attachments) === null || _activity$attachments === void 0 ? void 0 : _activity$attachments.length) === (activity === null || activity === void 0 || (_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 || (_activity$channelData = _activity$channelData.attachmentSizes) === null || _activity$channelData === void 0 ? void 0 : _activity$channelData.length)) {
|
|
29
29
|
var _activity$attachments2;
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
activity === null || activity === void 0
|
|
31
|
+
activity === null || activity === void 0 || (_activity$attachments2 = activity.attachments) === null || _activity$attachments2 === void 0 || _activity$attachments2.forEach(attachment => {
|
|
32
32
|
const {
|
|
33
33
|
thumbnailUrl,
|
|
34
34
|
contentUrl,
|
|
@@ -43,5 +43,4 @@ const gifUploadMiddleware = _ref => {
|
|
|
43
43
|
return next(action);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
var _default = gifUploadMiddleware;
|
|
47
|
-
exports.default = _default;
|
|
46
|
+
var _default = exports.default = gifUploadMiddleware;
|
|
@@ -35,13 +35,12 @@ const htmlPlayerMiddleware = _ref => {
|
|
|
35
35
|
dispatch
|
|
36
36
|
} = _ref;
|
|
37
37
|
return next => action => {
|
|
38
|
-
var _action$payload
|
|
39
|
-
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && ((_action$payload = action.payload) === null || _action$payload === void 0
|
|
38
|
+
var _action$payload;
|
|
39
|
+
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && ((_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.activity) === null || _action$payload === void 0 || (_action$payload = _action$payload.attachments) === null || _action$payload === void 0 ? void 0 : _action$payload.length) > 0) {
|
|
40
40
|
disableHTMLPlayerDownloadButton(_Constants.Constants.video);
|
|
41
41
|
disableHTMLPlayerDownloadButton(_Constants.Constants.audio);
|
|
42
42
|
}
|
|
43
43
|
return next(action);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
var _default = htmlPlayerMiddleware;
|
|
47
|
-
exports.default = _default;
|
|
46
|
+
var _default = exports.default = htmlPlayerMiddleware;
|
|
@@ -10,7 +10,7 @@ var _WebChatActionType = require("../../enums/WebChatActionType");
|
|
|
10
10
|
var _TelemetryHelper = require("../../../../../common/telemetry/TelemetryHelper");
|
|
11
11
|
var _TelemetryConstants = require("../../../../../common/telemetry/TelemetryConstants");
|
|
12
12
|
var _simpleUpdateIn = _interopRequireDefault(require("simple-update-in"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
/******
|
|
15
15
|
* HTMLTextMiddleware
|
|
16
16
|
*
|
|
@@ -104,8 +104,8 @@ const htmlTextMiddleware = honorsTargetInHTMLLinks => _ref => {
|
|
|
104
104
|
return next => action => {
|
|
105
105
|
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY) {
|
|
106
106
|
try {
|
|
107
|
-
var _action$payload
|
|
108
|
-
const text = (_action$payload = action.payload) === null || _action$payload === void 0
|
|
107
|
+
var _action$payload;
|
|
108
|
+
const text = (_action$payload = action.payload) === null || _action$payload === void 0 || (_action$payload = _action$payload.activity) === null || _action$payload === void 0 ? void 0 : _action$payload.text;
|
|
109
109
|
if (text) {
|
|
110
110
|
action = processHTMLText(action, text, honorsTargetInHTMLLinks ?? false);
|
|
111
111
|
}
|
|
@@ -128,5 +128,4 @@ const htmlTextMiddleware = honorsTargetInHTMLLinks => _ref => {
|
|
|
128
128
|
return next(action);
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
-
var _default = htmlTextMiddleware;
|
|
132
|
-
exports.default = _default;
|
|
131
|
+
var _default = exports.default = htmlTextMiddleware;
|
|
@@ -23,21 +23,20 @@ const localizedStringsBotInitialsMiddleware = onInitialsChange => _ref => {
|
|
|
23
23
|
if (onInitialsChange && !externalInitialsUpdater) {
|
|
24
24
|
externalInitialsUpdater = onInitialsChange; // capture once
|
|
25
25
|
}
|
|
26
|
-
|
|
27
26
|
if (action.type === _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY) {
|
|
28
27
|
var _action$payload, _activity$from;
|
|
29
28
|
const activity = (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.activity;
|
|
30
29
|
if (activity !== null && activity !== void 0 && (_activity$from = activity.from) !== null && _activity$from !== void 0 && _activity$from.name && activity.from.role !== _Constants.Constants.userMessageTag && activity.from.name !== _Constants.Constants.userMessageTag) {
|
|
31
|
-
var _activity$channelData, _activity$
|
|
30
|
+
var _activity$channelData, _activity$tags;
|
|
32
31
|
const agentName = activity.from.name.trim();
|
|
33
|
-
const isSystemMessage = agentName === "__agent__" || agentName.startsWith("__") || ((_activity$channelData = activity.channelData) === null || _activity$channelData === void 0
|
|
32
|
+
const isSystemMessage = agentName === "__agent__" || agentName.startsWith("__") || ((_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 || (_activity$channelData = _activity$channelData.tags) === null || _activity$channelData === void 0 ? void 0 : _activity$channelData.includes(_Constants.Constants.systemMessageTag)) || ((_activity$tags = activity.tags) === null || _activity$tags === void 0 ? void 0 : _activity$tags.includes(_Constants.Constants.systemMessageTag));
|
|
34
33
|
if (!isSystemMessage && agentName) {
|
|
35
34
|
const newInitials = (0, _utils.getIconText)(agentName) || currentAgentInitials;
|
|
36
35
|
if (newInitials !== currentAgentInitials) {
|
|
37
36
|
var _externalInitialsUpda;
|
|
38
37
|
currentAgentInitials = newInitials;
|
|
39
38
|
// Notify external React context if provided
|
|
40
|
-
(_externalInitialsUpda = externalInitialsUpdater) === null || _externalInitialsUpda === void 0
|
|
39
|
+
(_externalInitialsUpda = externalInitialsUpdater) === null || _externalInitialsUpda === void 0 || _externalInitialsUpda(currentAgentInitials || "");
|
|
41
40
|
// Broadcast (optional) for multi-tab sync without forcing consumers
|
|
42
41
|
_omnichannelChatComponents.BroadcastService.postMessage({
|
|
43
42
|
eventName: "BotAvatarInitialsUpdated",
|