@microsoft/omnichannel-chat-widget 1.8.3-main.ec1328d → 1.8.4-main.424a580
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/common/Constants.js +7 -0
- package/lib/cjs/common/facades/FacadeChatSDK.js +6 -0
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +4 -5
- package/lib/cjs/common/telemetry/TelemetryConstants.js +47 -2
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +26 -10
- package/lib/cjs/common/utils/SecureEventBus.js +307 -0
- package/lib/cjs/common/utils/dispatchCustomEvent.js +25 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
- package/lib/cjs/components/citationpanestateful/CitationDim.js +29 -0
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +218 -0
- package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +70 -0
- package/lib/cjs/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
- package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -2
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +4 -4
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +127 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -5
- package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +15 -0
- package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +287 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +2 -0
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +18 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +28 -3
- package/lib/cjs/components/livechatwidget/common/getMockChatSDKIfApplicable.js +4 -3
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +16 -7
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
- package/lib/cjs/components/livechatwidget/common/startChat.js +10 -5
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +24 -4
- package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +8 -2
- package/lib/cjs/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +51 -8
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +29 -2
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -3
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +127 -11
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +43 -14
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +6 -1
- package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +97 -0
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +36 -2
- package/lib/cjs/components/webchatcontainerstateful/common/utils/fontUtils.js +28 -0
- package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +59 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +122 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +47 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1038 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +34 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +50 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +16 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +20 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +2 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +59 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +5 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +97 -30
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +47 -45
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +9 -1
- package/lib/cjs/contexts/createReducer.js +30 -0
- package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
- package/lib/cjs/index.js +9 -1
- package/lib/cjs/plugins/newMessageEventHandler.js +4 -1
- package/lib/esm/common/Constants.js +7 -0
- package/lib/esm/common/facades/FacadeChatSDK.js +6 -0
- package/lib/esm/common/telemetry/AppInsightsEvents.js +4 -5
- package/lib/esm/common/telemetry/TelemetryConstants.js +45 -1
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +27 -11
- package/lib/esm/common/utils/SecureEventBus.js +328 -0
- package/lib/esm/common/utils/dispatchCustomEvent.js +18 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -5
- package/lib/esm/components/citationpanestateful/CitationDim.js +20 -0
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +207 -0
- package/lib/esm/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +61 -0
- package/lib/esm/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
- package/lib/esm/components/headerstateful/HeaderStateful.js +9 -3
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +4 -4
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +120 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -5
- package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +8 -0
- package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +280 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +2 -0
- package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +11 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +29 -4
- package/lib/esm/components/livechatwidget/common/getMockChatSDKIfApplicable.js +4 -3
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -7
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
- package/lib/esm/components/livechatwidget/common/startChat.js +12 -7
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +23 -4
- package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
- package/lib/esm/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +52 -9
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -4
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -4
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +130 -12
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +43 -14
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +6 -1
- package/lib/esm/components/webchatcontainerstateful/common/activities/botActivity.js +7 -0
- package/lib/esm/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +9 -0
- package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +90 -0
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +32 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/fontUtils.js +21 -0
- package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +51 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +115 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +39 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1060 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +25 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +48 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +13 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +13 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +52 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +98 -30
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +47 -45
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +9 -1
- package/lib/esm/contexts/createReducer.js +30 -0
- package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
- package/lib/esm/index.js +1 -0
- package/lib/esm/plugins/newMessageEventHandler.js +4 -1
- package/lib/types/common/Constants.d.ts +6 -0
- package/lib/types/common/facades/FacadeChatSDK.d.ts +3 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +42 -2
- package/lib/types/common/utils/SecureEventBus.d.ts +159 -0
- package/lib/types/common/utils/dispatchCustomEvent.d.ts +2 -0
- package/lib/types/components/citationpanestateful/CitationDim.d.ts +5 -0
- package/lib/types/components/citationpanestateful/CitationPaneStateful.d.ts +4 -0
- package/lib/types/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.d.ts +11 -0
- package/lib/types/components/citationpanestateful/interfaces/ICitationPaneStatefulProps.d.ts +19 -0
- package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +1 -1
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.d.ts +45 -0
- package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/PersistentConversationHandler.d.ts +28 -0
- package/lib/types/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.d.ts +2 -0
- package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +5 -1
- package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +5 -3
- package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +12 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +4 -2
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/common/activities/botActivity.d.ts +7 -0
- package/lib/types/components/webchatcontainerstateful/common/activities/conversationDividerActivity.d.ts +10 -0
- package/lib/types/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +6 -1
- package/lib/types/components/webchatcontainerstateful/common/utils/fontUtils.d.ts +10 -0
- package/lib/types/components/webchatcontainerstateful/hooks/usePersistentChatHistory.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/ICitation.d.ts +12 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +7 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +326 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.d.ts +8 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.d.ts +3 -4
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.d.ts +2 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -0
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +6 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +47 -45
- package/lib/types/index.d.ts +1 -0
- package/package.json +3 -3
- /package/lib/cjs/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
- /package/lib/esm/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
- /package/lib/types/components/confirmationpanestateful/interfaces/{IConfirmationPaneLocalizedText.d.ts → IConfirmationPaneLocalizedTexts.d.ts} +0 -0
|
@@ -3,49 +3,51 @@ export let LiveChatWidgetActionType;
|
|
|
3
3
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_ELEMENT_ID"] = 0] = "SET_WIDGET_ELEMENT_ID";
|
|
4
4
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RENDERING_MIDDLEWARE_PROPS"] = 1] = "SET_RENDERING_MIDDLEWARE_PROPS";
|
|
5
5
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_MIDDLEWARE_LOCALIZED_TEXTS"] = 2] = "SET_MIDDLEWARE_LOCALIZED_TEXTS";
|
|
6
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
7
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
8
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
9
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
10
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
11
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
12
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
13
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
14
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
15
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
16
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
17
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
18
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
19
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
20
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
21
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
22
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
23
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
24
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
25
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
26
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
27
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
28
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
29
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
30
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
31
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
32
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
33
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
34
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
35
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
36
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
37
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
38
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
39
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
40
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
41
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
42
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
43
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
44
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
45
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
46
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
47
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
48
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
49
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
50
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
6
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CITATIONS"] = 3] = "SET_CITATIONS";
|
|
7
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_GLOBAL_DIR"] = 4] = "SET_GLOBAL_DIR";
|
|
8
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_MINIMIZED"] = 5] = "SET_MINIMIZED";
|
|
9
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_STATE"] = 6] = "SET_CONVERSATION_STATE";
|
|
10
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PREVIOUS_FOCUSED_ELEMENT_ID"] = 7] = "SET_PREVIOUS_FOCUSED_ELEMENT_ID";
|
|
11
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILING"] = 8] = "SET_START_CHAT_FAILING";
|
|
12
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILURE_TYPE"] = 9] = "SET_START_CHAT_FAILURE_TYPE";
|
|
13
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_OUTSIDE_OPERATING_HOURS"] = 10] = "SET_OUTSIDE_OPERATING_HOURS";
|
|
14
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRE_CHAT_SURVEY_RESPONSE"] = 11] = "SET_PRE_CHAT_SURVEY_RESPONSE";
|
|
15
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CUSTOM_CONTEXT"] = 12] = "SET_CUSTOM_CONTEXT";
|
|
16
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 13] = "SET_SHOW_CONFIRMATION";
|
|
17
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 14] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
|
|
18
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 15] = "SET_PRECHAT_RESPONSE_EMAIL";
|
|
19
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 16] = "SET_AUDIO_NOTIFICATION";
|
|
20
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 17] = "SET_E2VV_ENABLED";
|
|
21
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 18] = "SET_POST_CHAT_CONTEXT";
|
|
22
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 19] = "SHOW_CALLING_CONTAINER";
|
|
23
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 20] = "SET_INCOMING_CALL";
|
|
24
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 21] = "DISABLE_VIDEO_CALL";
|
|
25
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_LOCAL_VIDEO"] = 22] = "DISABLE_LOCAL_VIDEO";
|
|
26
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_REMOTE_VIDEO"] = 23] = "DISABLE_REMOTE_VIDEO";
|
|
27
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_TOKEN"] = 24] = "SET_CHAT_TOKEN";
|
|
28
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_BUTTON_DISPLAY"] = 25] = "SET_START_CHAT_BUTTON_DISPLAY";
|
|
29
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PROACTIVE_CHAT_PARAMS"] = 26] = "SET_PROACTIVE_CHAT_PARAMS";
|
|
30
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 27] = "SET_TELEMETRY_DATA";
|
|
31
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 28] = "SET_RECONNECT_ID";
|
|
32
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 29] = "SET_UNREAD_MESSAGE_COUNT";
|
|
33
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 30] = "SET_FOCUS_CHAT_BUTTON";
|
|
34
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED"] = 31] = "SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED";
|
|
35
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY"] = 32] = "SET_CONVERSATION_ENDED_BY";
|
|
36
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 33] = "SET_WIDGET_STATE";
|
|
37
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 34] = "SET_LIVE_CHAT_CONTEXT";
|
|
38
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_OAUTH_SIGNIN_ID"] = 35] = "SET_BOT_OAUTH_SIGNIN_ID";
|
|
39
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_SIZE"] = 36] = "SET_WIDGET_SIZE";
|
|
40
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_INSTANCE_ID"] = 37] = "SET_WIDGET_INSTANCE_ID";
|
|
41
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONFIG"] = 38] = "SET_LIVE_CHAT_CONFIG";
|
|
42
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_WORKFLOW_IN_PROGRESS"] = 39] = "SET_POST_CHAT_WORKFLOW_IN_PROGRESS";
|
|
43
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INITIAL_CHAT_SDK_REQUEST_ID"] = 40] = "SET_INITIAL_CHAT_SDK_REQUEST_ID";
|
|
44
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOULD_USE_BOT_SURVEY"] = 41] = "SET_SHOULD_USE_BOT_SURVEY";
|
|
45
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_DISCONNECT_EVENT_RECEIVED"] = 42] = "SET_CHAT_DISCONNECT_EVENT_RECEIVED";
|
|
46
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SURVEY_MODE"] = 43] = "SET_SURVEY_MODE";
|
|
47
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONFIRMATION_STATE"] = 44] = "SET_CONFIRMATION_STATE";
|
|
48
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_PARTICIPANT_TYPE"] = 45] = "SET_POST_CHAT_PARTICIPANT_TYPE";
|
|
49
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_ENABLED"] = 46] = "SET_CONVERSATIONAL_SURVEY_ENABLED";
|
|
50
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_DISPLAY"] = 47] = "SET_CONVERSATIONAL_SURVEY_DISPLAY";
|
|
51
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["GET_IN_MEMORY_STATE"] = 48] = "GET_IN_MEMORY_STATE";
|
|
52
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_AVATAR_INITIALS"] = 49] = "SET_BOT_AVATAR_INITIALS";
|
|
51
53
|
})(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
|
|
@@ -4,6 +4,7 @@ import { ConversationState } from "./ConversationState";
|
|
|
4
4
|
import { StartChatFailureType } from "./StartChatFailureType";
|
|
5
5
|
import { defaultClientDataStoreProvider } from "../../common/storage/default/defaultClientDataStoreProvider";
|
|
6
6
|
import { defaultMiddlewareLocalizedTexts } from "../../components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts";
|
|
7
|
+
import { defaultWebChatStyles } from "../../components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles";
|
|
7
8
|
export const getLiveChatWidgetContextInitialState = props => {
|
|
8
9
|
var _props$controlProps, _props$webChatContain;
|
|
9
10
|
const isOutsideOperatingHours = () => {
|
|
@@ -33,12 +34,18 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
33
34
|
initialStateFromCache.domainStates.liveChatConfig = props.chatConfig;
|
|
34
35
|
// Cache the result of isOutsideOperatingHours() to ensure consistency
|
|
35
36
|
initialStateFromCache.appStates.outsideOperatingHours = outsideOperatingHours;
|
|
37
|
+
// Backward compatibility: if botAvatarInitials not cached (older sessions), seed with default
|
|
38
|
+
if (!initialStateFromCache.domainStates.botAvatarInitials) {
|
|
39
|
+
initialStateFromCache.domainStates.botAvatarInitials = defaultWebChatStyles.botAvatarInitials;
|
|
40
|
+
}
|
|
36
41
|
return initialStateFromCache;
|
|
37
42
|
}
|
|
38
43
|
const LiveChatWidgetContextInitialState = {
|
|
39
44
|
domainStates: {
|
|
40
45
|
liveChatConfig: props.chatConfig,
|
|
41
46
|
widgetElementId: "",
|
|
47
|
+
// Map of citation id => content injected by citations middleware
|
|
48
|
+
citations: {},
|
|
42
49
|
renderingMiddlewareProps: (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : _props$webChatContain.renderingMiddlewareProps,
|
|
43
50
|
middlewareLocalizedTexts: defaultMiddlewareLocalizedTexts,
|
|
44
51
|
preChatSurveyResponse: "{}",
|
|
@@ -54,7 +61,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
54
61
|
transcriptRequestId: "",
|
|
55
62
|
confirmationPaneConfirmedOptionClicked: false,
|
|
56
63
|
confirmationState: ConfirmationState.NotSet,
|
|
57
|
-
startChatFailureType: StartChatFailureType.Generic
|
|
64
|
+
startChatFailureType: StartChatFailureType.Generic,
|
|
65
|
+
botAvatarInitials: defaultWebChatStyles.botAvatarInitials
|
|
58
66
|
},
|
|
59
67
|
appStates: {
|
|
60
68
|
conversationState: ConversationState.Closed,
|
|
@@ -62,6 +62,21 @@ const reducer = (state, action) => {
|
|
|
62
62
|
middlewareLocalizedTexts: action.payload
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
+
case LiveChatWidgetActionType.SET_CITATIONS:
|
|
66
|
+
inMemory = {
|
|
67
|
+
...inMemory,
|
|
68
|
+
domainStates: {
|
|
69
|
+
...inMemory.domainStates,
|
|
70
|
+
citations: action.payload
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
return {
|
|
74
|
+
...state,
|
|
75
|
+
domainStates: {
|
|
76
|
+
...state.domainStates,
|
|
77
|
+
citations: action.payload
|
|
78
|
+
}
|
|
79
|
+
};
|
|
65
80
|
case LiveChatWidgetActionType.SET_GLOBAL_DIR:
|
|
66
81
|
inMemory = {
|
|
67
82
|
...inMemory,
|
|
@@ -539,6 +554,21 @@ const reducer = (state, action) => {
|
|
|
539
554
|
widgetSize: action.payload
|
|
540
555
|
}
|
|
541
556
|
};
|
|
557
|
+
case LiveChatWidgetActionType.SET_BOT_AVATAR_INITIALS:
|
|
558
|
+
inMemory = {
|
|
559
|
+
...inMemory,
|
|
560
|
+
domainStates: {
|
|
561
|
+
...inMemory.domainStates,
|
|
562
|
+
botAvatarInitials: action.payload
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
return {
|
|
566
|
+
...state,
|
|
567
|
+
domainStates: {
|
|
568
|
+
...state.domainStates,
|
|
569
|
+
botAvatarInitials: action.payload
|
|
570
|
+
}
|
|
571
|
+
};
|
|
542
572
|
case LiveChatWidgetActionType.SET_WIDGET_INSTANCE_ID:
|
|
543
573
|
inMemory = {
|
|
544
574
|
...inMemory,
|
|
@@ -31,7 +31,7 @@ export const createTrackingForFirstMessage = () => {
|
|
|
31
31
|
* Starts tracking the time for the first bot message after widget loads.
|
|
32
32
|
* Sets a 5-second timeout to auto-reset if no bot message is received.
|
|
33
33
|
*/
|
|
34
|
-
const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.
|
|
34
|
+
const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.StartChatComplete).subscribe(() => {
|
|
35
35
|
if (isTracking) return;
|
|
36
36
|
isTracking = true;
|
|
37
37
|
startTime = new Date().getTime();
|
|
@@ -86,7 +86,8 @@ export const createTrackingForFirstMessage = () => {
|
|
|
86
86
|
CustomProperties: {
|
|
87
87
|
elapsedTime,
|
|
88
88
|
widgetLoadedAt: startTime,
|
|
89
|
-
botMessage: stopTrackingMessage
|
|
89
|
+
botMessage: stopTrackingMessage,
|
|
90
|
+
type: payload === null || payload === void 0 ? void 0 : payload.type
|
|
90
91
|
}
|
|
91
92
|
});
|
|
92
93
|
disconnectListener();
|
|
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
7
7
|
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/TelemetryConstants";
|
|
8
8
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
9
9
|
import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
|
|
10
|
+
import { Constants } from "../common/Constants";
|
|
10
11
|
export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
11
12
|
function FirstResponseLatencyTracker() {
|
|
12
13
|
_classCallCheck(this, FirstResponseLatencyTracker);
|
|
@@ -127,7 +128,8 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
|
127
128
|
CustomProperties: {
|
|
128
129
|
elapsedTime,
|
|
129
130
|
userMessage: this.startTrackingMessage,
|
|
130
|
-
botMessage: this.stopTrackingMessage
|
|
131
|
+
botMessage: this.stopTrackingMessage,
|
|
132
|
+
type: payload === null || payload === void 0 ? void 0 : payload.type
|
|
131
133
|
}
|
|
132
134
|
});
|
|
133
135
|
}
|
|
@@ -168,7 +170,9 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
|
168
170
|
value: function stopClock(payload) {
|
|
169
171
|
try {
|
|
170
172
|
if (!payload || !payload.Id) {
|
|
171
|
-
|
|
173
|
+
if ((payload === null || payload === void 0 ? void 0 : payload.type) !== Constants.typing) {
|
|
174
|
+
throw new Error("Invalid payload");
|
|
175
|
+
}
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
// Only allow stopTracking if sender is valid and tracking is active
|
package/lib/esm/index.js
CHANGED
|
@@ -7,5 +7,6 @@ import useFacadeChatSDKStore from "./hooks/useFacadeChatSDKStore";
|
|
|
7
7
|
export { default as LiveChatWidget } from "./components/livechatwidget/LiveChatWidget";
|
|
8
8
|
export { getMockChatSDKIfApplicable } from "./components/livechatwidget/common/getMockChatSDKIfApplicable";
|
|
9
9
|
export { getWidgetCacheId, getWidgetEndChatEventName, ConversationState };
|
|
10
|
+
export { LiveChatWidgetMockType } from "./components/livechatwidget/interfaces/IMockProps";
|
|
10
11
|
export { encodeComponentString, decodeComponentString, BroadcastService, useChatSDKStore, useChatContextStore, useFacadeChatSDKStore };
|
|
11
12
|
export * from "./components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares";
|
|
@@ -78,6 +78,9 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
|
|
|
78
78
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
79
|
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
80
80
|
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
81
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
81
84
|
return false;
|
|
82
85
|
}
|
|
83
86
|
return true;
|
|
@@ -106,7 +109,7 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
|
|
|
106
109
|
});
|
|
107
110
|
};
|
|
108
111
|
const raiseMessageEvent = activity => {
|
|
109
|
-
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
|
|
112
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message || (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
|
|
110
113
|
const scenarioType = getScenarioType(activity);
|
|
111
114
|
switch (scenarioType) {
|
|
112
115
|
case ScenarioType.UserSendMessageStrategy:
|
|
@@ -28,6 +28,9 @@ export declare class Constants {
|
|
|
28
28
|
static readonly channelIdKey = "ChannelId-";
|
|
29
29
|
static readonly ChannelId = "lcw";
|
|
30
30
|
static readonly CustomerTag = "FromCustomer";
|
|
31
|
+
static persistentChatHistoryMessageTag: string;
|
|
32
|
+
static persistentChatHistoryMessagePullTriggerTag: string;
|
|
33
|
+
static conversationDividerTag: string;
|
|
31
34
|
static readonly GifContentType = "image/gif";
|
|
32
35
|
static readonly video = "video";
|
|
33
36
|
static readonly audio = "audio";
|
|
@@ -43,6 +46,7 @@ export declare class Constants {
|
|
|
43
46
|
static readonly averageWaitTimeMessageTag = "averagewaittime";
|
|
44
47
|
static readonly message = "message";
|
|
45
48
|
static readonly hiddenTag = "Hidden";
|
|
49
|
+
static readonly typing = "typing";
|
|
46
50
|
static readonly prefixTimestampTag = "ServerMessageTimestamp_";
|
|
47
51
|
static readonly acsChannel = "ACS_CHANNEL";
|
|
48
52
|
static readonly publicMessageTag = "public";
|
|
@@ -153,6 +157,8 @@ export declare class HtmlAttributeNames {
|
|
|
153
157
|
static readonly adaptiveCardTextBlockClassName = "ac-textBlock";
|
|
154
158
|
static readonly adaptiveCardToggleInputClassName = "ac-toggleInput";
|
|
155
159
|
static readonly adaptiveCardActionSetClassName = "ac-actionSet";
|
|
160
|
+
static readonly ocwCitationPaneClassName = "ocw-citation-pane";
|
|
161
|
+
static readonly ocwCitationPaneTitle = "Citation";
|
|
156
162
|
}
|
|
157
163
|
export declare class WebChatMiddlewareConstants {
|
|
158
164
|
static readonly nextVisibleActivity = "nextVisibleActivity";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatAdapter, ChatSDKMessage, GetAgentAvailabilityResponse, GetLiveChatTranscriptResponse, GetVoiceVideoCallingResponse, IFileInfo, IRawMessage, MaskingRules, OmnichannelChatSDK, VoiceVideoCallingOptionalParams } from "@microsoft/omnichannel-chat-sdk";
|
|
1
|
+
import { ChatAdapter, ChatSDKMessage, GetAgentAvailabilityResponse, GetLiveChatTranscriptResponse, GetPersistentChatHistoryResponse, GetVoiceVideoCallingResponse, IFileInfo, IRawMessage, MaskingRules, OmnichannelChatSDK, VoiceVideoCallingOptionalParams } from "@microsoft/omnichannel-chat-sdk";
|
|
2
2
|
import { IFacadeChatSDKInput } from "./types/IFacadeChatSDKInput";
|
|
3
3
|
import ChatAdapterOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/messaging/ChatAdapterOptionalParams";
|
|
4
4
|
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
@@ -13,6 +13,7 @@ import GetChatTokenOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core
|
|
|
13
13
|
import GetConversationDetailsOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetConversationDetailsOptionalParams";
|
|
14
14
|
import GetLiveChatConfigOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetLiveChatConfigOptionalParams";
|
|
15
15
|
import GetLiveChatTranscriptOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetLiveChatTranscriptOptionalParams";
|
|
16
|
+
import GetPersistentChatHistoryOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetPersistentChatHistoryOptionalParams";
|
|
16
17
|
import IChatToken from "@microsoft/omnichannel-chat-sdk/lib/external/IC3Adapter/IChatToken";
|
|
17
18
|
import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
|
|
18
19
|
import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
|
|
@@ -73,4 +74,5 @@ export declare class FacadeChatSDK {
|
|
|
73
74
|
getPostChatSurveyContext(): Promise<PostChatContext>;
|
|
74
75
|
getAgentAvailability(optionalParams?: GetAgentAvailabilityOptionalParams): Promise<GetAgentAvailabilityResponse>;
|
|
75
76
|
getReconnectableChats(reconnectableChatsParams?: any): Promise<any>;
|
|
77
|
+
fetchPersistentConversationHistory(getPersistentChatHistoryOptionalParams?: GetPersistentChatHistoryOptionalParams): Promise<GetPersistentChatHistoryResponse>;
|
|
76
78
|
}
|
|
@@ -56,9 +56,11 @@ export declare enum BroadcastEvent {
|
|
|
56
56
|
SyncMinimize = "SyncMinimize",
|
|
57
57
|
OnWidgetError = "OnWidgetError",
|
|
58
58
|
FMLTrackingCompletedAck = "FMLTrackingCompletedAck",
|
|
59
|
-
FMLTrackingCompleted = "FMLTrackingCompleted"
|
|
59
|
+
FMLTrackingCompleted = "FMLTrackingCompleted",
|
|
60
|
+
PersistentConversationReset = "PersistentConversationReset"
|
|
60
61
|
}
|
|
61
62
|
export declare enum TelemetryEvent {
|
|
63
|
+
FetchPersistentChatHistoryFailed = "FetchPersistentChatHistoryFailed",
|
|
62
64
|
CallAdded = "CallAdded",
|
|
63
65
|
LocalVideoStreamAdded = "LocalVideoStreamAdded",
|
|
64
66
|
LocalVideoStreamRemoved = "LocalVideoStreamRemoved",
|
|
@@ -104,6 +106,7 @@ export declare enum TelemetryEvent {
|
|
|
104
106
|
EndChatFailed = "EndChatFailed",
|
|
105
107
|
SettingCustomContext = "SettingCustomContext",
|
|
106
108
|
WebChatLoaded = "WebChatLoaded",
|
|
109
|
+
PersistentChatHistoryEnabled = "PersistentChatHistoryEnabled",
|
|
107
110
|
LCWChatButtonActionCompleted = "LCWChatButtonActionCompleted",
|
|
108
111
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
109
112
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
@@ -136,6 +139,7 @@ export declare enum TelemetryEvent {
|
|
|
136
139
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
137
140
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
138
141
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
142
|
+
CitationPaneLoaded = "CitationPaneLoaded",
|
|
139
143
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
140
144
|
ReconnectChatPaneLoaded = "ReconnectChatPaneLoaded",
|
|
141
145
|
HeaderCloseButtonClicked = "HeaderCloseButtonClicked",
|
|
@@ -262,11 +266,42 @@ export declare enum TelemetryEvent {
|
|
|
262
266
|
UXLCWChatButtonLoadingStart = "UXLCWChatButtonLoadingStart",
|
|
263
267
|
UXLCWChatButtonLoadingCompleted = "UXLCWChatButtonLoadingCompleted",
|
|
264
268
|
UXConfirmationPaneStart = "UXConfirmationPaneStart",
|
|
269
|
+
UXCitationPaneStart = "UXCitationPaneStart",
|
|
265
270
|
UXConfirmationPaneCompleted = "UXConfirmationPaneCompleted",
|
|
271
|
+
UXCitationPaneCompleted = "UXCitationPaneCompleted",
|
|
266
272
|
UXLiveChatWidgetStart = "UXLiveChatWidgetStart",
|
|
267
273
|
UXLiveChatWidgetCompleted = "UXLiveChatWidgetCompleted",
|
|
274
|
+
UXPostChatPaneStarted = "UXPostChatPaneStarted",
|
|
275
|
+
UXPostChatPaneCompleted = "UXPostChatPaneCompleted",
|
|
268
276
|
AppInsightsInitialized = "AppInsightsInitialized",
|
|
269
|
-
AppInsightsInitFailed = "AppInsightsInitFailed"
|
|
277
|
+
AppInsightsInitFailed = "AppInsightsInitFailed",
|
|
278
|
+
ConvertPersistentChatHistoryMessageToActivityFailed = "ConvertPersistentChatHistoryMessageToActivityFailed",
|
|
279
|
+
UXLCWPersistentChatHistoryInitialized = "UXLCWPersistentChatHistoryInitialized",
|
|
280
|
+
LCWPersistentChatHistoryFetchStarted = "LCWPersistentChatHistoryFetchStarted",
|
|
281
|
+
LCWPersistentChatHistoryFetchCompleted = "LCWPersistentChatHistoryFetchCompleted",
|
|
282
|
+
LCWPersistentChatHistoryFetchFailed = "LCWPersistentChatHistoryFetchFailed",
|
|
283
|
+
LCWWebChatStorePollingStarted = "LCWWebChatStorePollingStarted",
|
|
284
|
+
LCWWebChatStoreReady = "LCWWebChatStoreReady",
|
|
285
|
+
LCWWebChatConnected = "LCWWebChatConnected",
|
|
286
|
+
LCWWebChatDisconnected = "LCWWebChatDisconnected",
|
|
287
|
+
LCWWebChatConnectionCheckFailed = "LCWWebChatConnectionCheckFailed",
|
|
288
|
+
LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
|
|
289
|
+
LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
|
|
290
|
+
LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
|
|
291
|
+
LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
|
|
292
|
+
LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
|
|
293
|
+
LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
|
|
294
|
+
LCWLazyLoadSessionMetrics = "LCWLazyLoadSessionMetrics",
|
|
295
|
+
LCWLazyLoadTargetElementNotFound = "LCWLazyLoadTargetElementNotFound",
|
|
296
|
+
LCWLazyLoadScrollFailed = "LCWLazyLoadScrollFailed",
|
|
297
|
+
LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
|
|
298
|
+
LCWLazyLoadReset = "LCWLazyLoadReset",
|
|
299
|
+
LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
|
|
300
|
+
LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
|
|
301
|
+
SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
|
|
302
|
+
SecureEventBusListenerError = "SecureEventBusListenerError",
|
|
303
|
+
SecureEventBusDispatchError = "SecureEventBusDispatchError",
|
|
304
|
+
StartChatComplete = "StartChatComplete"
|
|
270
305
|
}
|
|
271
306
|
export interface TelemetryInput {
|
|
272
307
|
scenarioType: ScenarioType;
|
|
@@ -277,3 +312,8 @@ export declare class TelemetryConstants {
|
|
|
277
312
|
private static map;
|
|
278
313
|
static mapEventToScenario(eventTypeOrScenarioType: TelemetryEvent): ScenarioType;
|
|
279
314
|
}
|
|
315
|
+
export declare enum ConversationStage {
|
|
316
|
+
Initialization = "Initialization",
|
|
317
|
+
CSREngagement = "CSR Engagement",
|
|
318
|
+
ConversationEnd = "Conversation End"
|
|
319
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SecureEventBus class implementing the singleton pattern for secure event communication.
|
|
3
|
+
* Provides authentication-based event dispatching to prevent unauthorized external access.
|
|
4
|
+
*/
|
|
5
|
+
declare class SecureEventBus {
|
|
6
|
+
private static instance;
|
|
7
|
+
private listeners;
|
|
8
|
+
private readonly authToken;
|
|
9
|
+
private eventCounter;
|
|
10
|
+
/**
|
|
11
|
+
* Private constructor to enforce singleton pattern.
|
|
12
|
+
* Generates a unique authentication token for this session.
|
|
13
|
+
*/
|
|
14
|
+
private constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Get the singleton instance of SecureEventBus.
|
|
17
|
+
* Creates a new instance if one doesn't exist.
|
|
18
|
+
*
|
|
19
|
+
* @returns The singleton instance of SecureEventBus
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
static getInstance(): SecureEventBus;
|
|
27
|
+
/**
|
|
28
|
+
* Generate a cryptographically secure authentication token.
|
|
29
|
+
* Uses crypto.getRandomValues when available, falls back to Math.random.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
* @returns A 64-character hexadecimal string representing the authentication token
|
|
33
|
+
*/
|
|
34
|
+
private generateAuthToken;
|
|
35
|
+
/**
|
|
36
|
+
* Get the authentication token for this SecureEventBus instance.
|
|
37
|
+
* This token is required for dispatching events and should only be used internally.
|
|
38
|
+
*
|
|
39
|
+
* @returns The authentication token string
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
44
|
+
* const token = eventBus.getAuthToken();
|
|
45
|
+
* eventBus.dispatch('myEvent', { data: 'value' }, token);
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
getAuthToken(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Dispatch an event with authentication to all registered listeners.
|
|
51
|
+
* Verifies the authentication token before dispatching to prevent unauthorized access.
|
|
52
|
+
*
|
|
53
|
+
* @param eventName - The name of the event to dispatch
|
|
54
|
+
* @param payload - The data to send with the event (optional)
|
|
55
|
+
* @param token - Authentication token (must match the internal token)
|
|
56
|
+
* @returns true if event was successfully dispatched, false if unauthorized or error occurred
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
61
|
+
* const token = eventBus.getAuthToken();
|
|
62
|
+
*
|
|
63
|
+
* // Dispatch with payload
|
|
64
|
+
* const success = eventBus.dispatch('userAction', { action: 'click', target: 'button' }, token);
|
|
65
|
+
*
|
|
66
|
+
* // Dispatch without payload
|
|
67
|
+
* eventBus.dispatch('windowClosed', undefined, token);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
dispatch(eventName: string, payload?: any, token?: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Subscribe to an event with a callback function.
|
|
73
|
+
* The callback will be executed whenever the specified event is dispatched.
|
|
74
|
+
*
|
|
75
|
+
* @param eventName - The name of the event to listen for
|
|
76
|
+
* @param callback - The function to execute when the event is fired
|
|
77
|
+
* @returns A function that can be called to unsubscribe from the event
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
82
|
+
*
|
|
83
|
+
* // Subscribe to an event
|
|
84
|
+
* const unsubscribe = eventBus.subscribe('chatMessage', (message) => {
|
|
85
|
+
* console.log('New message:', message.text);
|
|
86
|
+
* console.log('From user:', message.userId);
|
|
87
|
+
* });
|
|
88
|
+
*
|
|
89
|
+
* // Later, unsubscribe
|
|
90
|
+
* unsubscribe();
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
subscribe(eventName: string, callback: (payload: any) => void): () => void;
|
|
94
|
+
/**
|
|
95
|
+
* Remove all listeners for a specific event.
|
|
96
|
+
* This completely removes the event from the internal listeners map.
|
|
97
|
+
*
|
|
98
|
+
* @param eventName - The name of the event to remove all listeners for
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
103
|
+
*
|
|
104
|
+
* // Remove all listeners for 'chatClosed' event
|
|
105
|
+
* eventBus.removeAllListeners('chatClosed');
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
removeAllListeners(eventName: string): void;
|
|
109
|
+
/**
|
|
110
|
+
* Clear all listeners for all events.
|
|
111
|
+
* This resets the entire event bus to its initial state.
|
|
112
|
+
* Useful for cleanup during application shutdown or testing.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
117
|
+
*
|
|
118
|
+
* // Clear all event listeners
|
|
119
|
+
* eventBus.clear();
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
clear(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Get the number of listeners for a specific event.
|
|
125
|
+
* Useful for debugging and monitoring purposes.
|
|
126
|
+
*
|
|
127
|
+
* @param eventName - The name of the event to count listeners for
|
|
128
|
+
* @returns The number of listeners registered for the event
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
133
|
+
*
|
|
134
|
+
* // Check how many listeners are registered for 'userAction'
|
|
135
|
+
* const count = eventBus.getListenerCount('userAction');
|
|
136
|
+
* console.log(`${count} listeners registered for userAction`);
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
getListenerCount(eventName: string): number;
|
|
140
|
+
/**
|
|
141
|
+
* Get all registered event names.
|
|
142
|
+
* Returns an array of event names that currently have listeners.
|
|
143
|
+
* Useful for debugging and monitoring purposes.
|
|
144
|
+
*
|
|
145
|
+
* @returns An array of event names that have registered listeners
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* const eventBus = SecureEventBus.getInstance();
|
|
150
|
+
*
|
|
151
|
+
* // Get all registered events
|
|
152
|
+
* const events = eventBus.getRegisteredEvents();
|
|
153
|
+
* console.log('Active events:', events);
|
|
154
|
+
* // Output: ['userAction', 'chatMessage', 'windowResize']
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
getRegisteredEvents(): string[];
|
|
158
|
+
}
|
|
159
|
+
export default SecureEventBus;
|
package/lib/types/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const defaultCitationPaneStyles: {
|
|
2
|
+
pane: React.CSSProperties;
|
|
3
|
+
};
|
|
4
|
+
export declare const defaultCitationContentCSS: (controlId: string) => string;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
defaultCitationPaneStyles: {
|
|
7
|
+
pane: React.CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
defaultCitationContentCSS: (controlId: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ICitationPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/citationpane/interfaces/ICitationPaneProps";
|
|
2
|
+
export interface ICitationPaneStatefulProps extends ICitationPaneProps {
|
|
3
|
+
/**
|
|
4
|
+
* id: Optional custom ID for the citation pane container
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* title: Optional title for the citation pane
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* onClose: Optional callback function called when the citation pane is closed
|
|
13
|
+
*/
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* contentHtml: Optional HTML content to display in the citation pane
|
|
17
|
+
*/
|
|
18
|
+
contentHtml?: string;
|
|
19
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IConfirmationPaneLocalizedTexts } from "../../interfaces/
|
|
1
|
+
import { IConfirmationPaneLocalizedTexts } from "../../interfaces/IConfirmationPaneLocalizedTexts";
|
|
2
2
|
export declare const defaultConfirmationPaneLocalizedTexts: IConfirmationPaneLocalizedTexts;
|
package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IConfirmationPaneLocalizedTexts } from "./
|
|
1
|
+
import { IConfirmationPaneLocalizedTexts } from "./IConfirmationPaneLocalizedTexts";
|
|
2
2
|
import { IConfirmationPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/confirmationpane/interfaces/IConfirmationPaneProps";
|
|
3
3
|
export interface IConfirmationPaneStatefulProps extends IConfirmationPaneProps {
|
|
4
4
|
/**
|