@microsoft/omnichannel-chat-widget 1.8.3-main.ec1328d → 1.8.4-main.7bdb634
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 +6 -0
- package/lib/cjs/common/facades/FacadeChatSDK.js +6 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +34 -0
- package/lib/cjs/common/utils/SecureEventBus.js +307 -0
- package/lib/cjs/common/utils/dispatchCustomEvent.js +25 -0
- package/lib/cjs/components/citationpanestateful/CitationDim.js +29 -0
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +199 -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/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 +284 -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 +8 -6
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
- package/lib/cjs/components/livechatwidget/common/startChat.js +5 -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 +29 -5
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +122 -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 +2 -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 +18 -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 +44 -0
- 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 +4 -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/queueOverflowHandlerMiddleware.js +2 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +46 -45
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -0
- package/lib/cjs/contexts/createReducer.js +15 -0
- package/lib/cjs/index.js +9 -1
- package/lib/esm/common/Constants.js +6 -0
- package/lib/esm/common/facades/FacadeChatSDK.js +6 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +34 -0
- package/lib/esm/common/utils/SecureEventBus.js +328 -0
- package/lib/esm/common/utils/dispatchCustomEvent.js +18 -0
- package/lib/esm/components/citationpanestateful/CitationDim.js +20 -0
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +188 -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/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 +277 -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 +8 -6
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
- package/lib/esm/components/livechatwidget/common/startChat.js +5 -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 +29 -5
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +125 -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 +2 -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 +10 -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 +42 -0
- 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 +2 -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/queueOverflowHandlerMiddleware.js +2 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +46 -45
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -0
- package/lib/esm/contexts/createReducer.js +15 -0
- package/lib/esm/index.js +1 -0
- package/lib/types/common/Constants.d.ts +5 -0
- package/lib/types/common/facades/FacadeChatSDK.d.ts +3 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +33 -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/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 +7 -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/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/queueOverflowHandlerMiddleware.d.ts +2 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +1 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +46 -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
|
@@ -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",
|
|
@@ -136,6 +138,7 @@ export declare enum TelemetryEvent {
|
|
|
136
138
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
137
139
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
138
140
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
141
|
+
CitationPaneLoaded = "CitationPaneLoaded",
|
|
139
142
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
140
143
|
ReconnectChatPaneLoaded = "ReconnectChatPaneLoaded",
|
|
141
144
|
HeaderCloseButtonClicked = "HeaderCloseButtonClicked",
|
|
@@ -262,11 +265,39 @@ export declare enum TelemetryEvent {
|
|
|
262
265
|
UXLCWChatButtonLoadingStart = "UXLCWChatButtonLoadingStart",
|
|
263
266
|
UXLCWChatButtonLoadingCompleted = "UXLCWChatButtonLoadingCompleted",
|
|
264
267
|
UXConfirmationPaneStart = "UXConfirmationPaneStart",
|
|
268
|
+
UXCitationPaneStart = "UXCitationPaneStart",
|
|
265
269
|
UXConfirmationPaneCompleted = "UXConfirmationPaneCompleted",
|
|
270
|
+
UXCitationPaneCompleted = "UXCitationPaneCompleted",
|
|
266
271
|
UXLiveChatWidgetStart = "UXLiveChatWidgetStart",
|
|
267
272
|
UXLiveChatWidgetCompleted = "UXLiveChatWidgetCompleted",
|
|
268
273
|
AppInsightsInitialized = "AppInsightsInitialized",
|
|
269
|
-
AppInsightsInitFailed = "AppInsightsInitFailed"
|
|
274
|
+
AppInsightsInitFailed = "AppInsightsInitFailed",
|
|
275
|
+
ConvertPersistentChatHistoryMessageToActivityFailed = "ConvertPersistentChatHistoryMessageToActivityFailed",
|
|
276
|
+
UXLCWPersistentChatHistoryInitialized = "UXLCWPersistentChatHistoryInitialized",
|
|
277
|
+
LCWPersistentChatHistoryFetchStarted = "LCWPersistentChatHistoryFetchStarted",
|
|
278
|
+
LCWPersistentChatHistoryFetchCompleted = "LCWPersistentChatHistoryFetchCompleted",
|
|
279
|
+
LCWPersistentChatHistoryFetchFailed = "LCWPersistentChatHistoryFetchFailed",
|
|
280
|
+
LCWWebChatStorePollingStarted = "LCWWebChatStorePollingStarted",
|
|
281
|
+
LCWWebChatStoreReady = "LCWWebChatStoreReady",
|
|
282
|
+
LCWWebChatConnected = "LCWWebChatConnected",
|
|
283
|
+
LCWWebChatDisconnected = "LCWWebChatDisconnected",
|
|
284
|
+
LCWWebChatConnectionCheckFailed = "LCWWebChatConnectionCheckFailed",
|
|
285
|
+
LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
|
|
286
|
+
LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
|
|
287
|
+
LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
|
|
288
|
+
LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
|
|
289
|
+
LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
|
|
290
|
+
LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
|
|
291
|
+
LCWLazyLoadSessionMetrics = "LCWLazyLoadSessionMetrics",
|
|
292
|
+
LCWLazyLoadTargetElementNotFound = "LCWLazyLoadTargetElementNotFound",
|
|
293
|
+
LCWLazyLoadScrollFailed = "LCWLazyLoadScrollFailed",
|
|
294
|
+
LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
|
|
295
|
+
LCWLazyLoadReset = "LCWLazyLoadReset",
|
|
296
|
+
LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
|
|
297
|
+
LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
|
|
298
|
+
SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
|
|
299
|
+
SecureEventBusListenerError = "SecureEventBusListenerError",
|
|
300
|
+
SecureEventBusDispatchError = "SecureEventBusDispatchError"
|
|
270
301
|
}
|
|
271
302
|
export interface TelemetryInput {
|
|
272
303
|
scenarioType: ScenarioType;
|
|
@@ -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
|
/**
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IActivitySubscriber } from "./IActivitySubscriber";
|
|
2
|
+
/**
|
|
3
|
+
* The `AddActivitySubscriber` class is responsible for subscribing to the `ADD_ACTIVITY` event
|
|
4
|
+
* from the `ChatWidgetEvents` and notifying an observer when a new activity is added.
|
|
5
|
+
*
|
|
6
|
+
* This class implements the `IActivitySubscriber` interface and acts as a bridge between
|
|
7
|
+
* the event system and the observer pattern.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AddActivitySubscriber implements IActivitySubscriber {
|
|
10
|
+
/**
|
|
11
|
+
* The observer that will be notified when a new activity is added.
|
|
12
|
+
* This is expected to be an object with a `next` method, such as an RxJS `Observer`.
|
|
13
|
+
*/
|
|
14
|
+
observer: any;
|
|
15
|
+
/**
|
|
16
|
+
* Set to track processed activity IDs to prevent duplicate processing.
|
|
17
|
+
*/
|
|
18
|
+
private processedActivityIds;
|
|
19
|
+
/**
|
|
20
|
+
* Unsubscribe function for the secure event listener
|
|
21
|
+
*/
|
|
22
|
+
private unsubscribeFromSecureEvent;
|
|
23
|
+
/**
|
|
24
|
+
* Subscription for PersistentConversationReset event
|
|
25
|
+
*/
|
|
26
|
+
private resetEventListener;
|
|
27
|
+
/**
|
|
28
|
+
* Constructor initializes the `AddActivitySubscriber` and sets up a secure event listener
|
|
29
|
+
* for the `ChatWidgetEvents.ADD_ACTIVITY` event. When the event is triggered, it checks
|
|
30
|
+
* if the event payload contains an `activity` and notifies the observer.
|
|
31
|
+
*/
|
|
32
|
+
constructor();
|
|
33
|
+
/**
|
|
34
|
+
* The `next` method is a placeholder for processing the activity.
|
|
35
|
+
* This method can be overridden or extended as needed.
|
|
36
|
+
*
|
|
37
|
+
* @param activity - The activity object to process.
|
|
38
|
+
* @returns The activity object (asynchronously).
|
|
39
|
+
*/
|
|
40
|
+
next(activity: any): Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Reset the processed activity IDs when a conversation resets
|
|
43
|
+
*/
|
|
44
|
+
reset(): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare enum ChatWidgetEvents {
|
|
2
|
+
ADD_ACTIVITY = "CHAT_WIDGET/ADD_ACTIVITY",
|
|
3
|
+
FETCH_PERSISTENT_CHAT_HISTORY = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY",
|
|
4
|
+
NO_MORE_HISTORY_AVAILABLE = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE",
|
|
5
|
+
HIDE_LOADING_BANNER = "CHAT_WIDGET/HIDE_LOADING_BANNER"
|
|
6
|
+
}
|
|
7
|
+
export default ChatWidgetEvents;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
2
|
+
import { IPersistentChatHistoryProps } from "../interfaces/IPersistentChatHistoryProps";
|
|
3
|
+
/**
|
|
4
|
+
* Class responsible for handling persistent conversation history
|
|
5
|
+
*/
|
|
6
|
+
declare class PersistentConversationHandler {
|
|
7
|
+
private appliedProps;
|
|
8
|
+
private isLastPull;
|
|
9
|
+
private pageToken;
|
|
10
|
+
private facadeChatSDK;
|
|
11
|
+
private lastMessage;
|
|
12
|
+
private count;
|
|
13
|
+
private pageSize;
|
|
14
|
+
private isCurrentlyPulling;
|
|
15
|
+
private pageTokenInTransitSet;
|
|
16
|
+
constructor(facadeChatSDK: FacadeChatSDK, props: IPersistentChatHistoryProps);
|
|
17
|
+
private appliedPropsHandler;
|
|
18
|
+
private resetEventListener;
|
|
19
|
+
reset(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
pullHistory(): Promise<void>;
|
|
22
|
+
private processHistoryMessages;
|
|
23
|
+
private fetchHistoryMessages;
|
|
24
|
+
private shouldPull;
|
|
25
|
+
private processMessageToActivity;
|
|
26
|
+
private createDividerActivity;
|
|
27
|
+
}
|
|
28
|
+
export default PersistentConversationHandler;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IMockProps } from "../interfaces/IMockProps";
|
|
2
|
+
export declare const getMockChatSDKIfApplicable: (chatSDK: any, mockProps?: IMockProps) => any;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
|
+
import { IAppInsightsConfig } from "../../../common/telemetry/interfaces/IAppInsightsConfig";
|
|
2
3
|
import { IAudioNotificationProps } from "../../footerstateful/audionotificationstateful/interfaces/IAudioNotificationProps";
|
|
3
4
|
import { ICallingContainerProps } from "@microsoft/omnichannel-chat-components/lib/types/components/callingcontainer/interfaces/ICallingContainerProps";
|
|
4
5
|
import { IChatButtonProps } from "@microsoft/omnichannel-chat-components/lib/types/components/chatbutton/interfaces/IChatButtonProps";
|
|
6
|
+
import { ICitationPaneStatefulProps } from "../../citationpanestateful/interfaces/ICitationPaneStatefulProps";
|
|
5
7
|
import { IConfirmationPaneStatefulProps } from "../../confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps";
|
|
6
8
|
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
7
9
|
import { IDownloadTranscriptProps } from "../../footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps";
|
|
@@ -18,6 +20,7 @@ import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/ty
|
|
|
18
20
|
import { IMockProps } from "./IMockProps";
|
|
19
21
|
import { INotificationPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/notificationpane/interfaces/INotificationPaneProps";
|
|
20
22
|
import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
|
|
23
|
+
import { IPersistentChatHistoryProps } from "./IPersistentChatHistoryProps";
|
|
21
24
|
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
22
25
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
23
26
|
import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
|
|
@@ -27,7 +30,6 @@ import { IStartChatErrorPaneProps } from "../../startchaterrorpanestateful/inter
|
|
|
27
30
|
import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetryConfig";
|
|
28
31
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
29
32
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
30
|
-
import { IAppInsightsConfig } from "../../../common/telemetry/interfaces/IAppInsightsConfig";
|
|
31
33
|
export interface ILiveChatWidgetProps {
|
|
32
34
|
audioNotificationProps?: IAudioNotificationProps;
|
|
33
35
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -51,6 +53,7 @@ export interface ILiveChatWidgetProps {
|
|
|
51
53
|
preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
|
|
52
54
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
53
55
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
56
|
+
citationPaneProps?: ICitationPaneStatefulProps;
|
|
54
57
|
startChatErrorPaneProps?: IStartChatErrorPaneProps;
|
|
55
58
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
56
59
|
telemetryConfig: ITelemetryConfig;
|
|
@@ -67,4 +70,5 @@ export interface ILiveChatWidgetProps {
|
|
|
67
70
|
mock?: IMockProps;
|
|
68
71
|
featureConfigProps?: IFeatureConfigProps;
|
|
69
72
|
appInsightsConfig?: IAppInsightsConfig;
|
|
73
|
+
persistentChatHistoryProps?: IPersistentChatHistoryProps;
|
|
70
74
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { Message } from "botframework-directlinejs";
|
|
2
|
+
export declare enum LiveChatWidgetMockType {
|
|
2
3
|
Test = "Test",
|
|
3
|
-
Demo = "Demo"
|
|
4
|
+
Demo = "Demo",
|
|
5
|
+
Designer = "Designer"
|
|
4
6
|
}
|
|
5
7
|
export interface IMockProps {
|
|
6
8
|
type: LiveChatWidgetMockType;
|
|
9
|
+
mockMessages?: Message[];
|
|
7
10
|
}
|
|
8
|
-
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Message } from "botframework-directlinejs";
|
|
2
|
-
import { Observable } from "rxjs/Observable";
|
|
3
2
|
import MockAdapter from "./mockadapter";
|
|
3
|
+
import { Observable } from "rxjs/Observable";
|
|
4
4
|
export declare class DesignerChatAdapter extends MockAdapter {
|
|
5
|
-
|
|
5
|
+
messages?: Message[];
|
|
6
|
+
constructor(messages?: Message[]);
|
|
7
|
+
private processMessage;
|
|
6
8
|
private postUserActivity;
|
|
7
9
|
postActivity(activity: Message): Observable<string>;
|
|
8
10
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DesignerChatAdapter } from "./DesignerChatAdapter";
|
|
2
|
+
import { Message } from "botframework-directlinejs";
|
|
2
3
|
import { MockChatSDK } from "./mockchatsdk";
|
|
3
4
|
export declare class DesignerChatSDK extends MockChatSDK {
|
|
4
5
|
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Create a chat adapter for the designer. Uses this.mockMessages if set.
|
|
8
|
+
*/
|
|
9
|
+
mockMessages?: Message[];
|
|
5
10
|
createChatAdapter(): DesignerChatAdapter;
|
|
6
11
|
localeId: string;
|
|
7
12
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, Attachment, Message, User } from "botframework-directlinejs";
|
|
1
|
+
import { Activity, Attachment, AttachmentLayout, CardAction, Message, User } from "botframework-directlinejs";
|
|
2
2
|
import { Subscriber } from "rxjs/Subscriber";
|
|
3
3
|
export declare const customerUser: User;
|
|
4
4
|
export declare const botUser: User;
|
|
@@ -9,3 +9,8 @@ export declare const postAgentMessageActivity: (activityObserver: Subscriber<Act
|
|
|
9
9
|
export declare const postSystemMessageActivity: (activityObserver: Subscriber<Activity> | undefined, text: string, delay?: number) => void;
|
|
10
10
|
export declare const postBotTypingActivity: (activityObserver: Subscriber<Activity> | undefined, delay?: number) => void;
|
|
11
11
|
export declare const postBotAttachmentActivity: (activityObserver: Subscriber<Activity> | undefined, attachments?: Attachment[], delay?: number) => void;
|
|
12
|
+
export declare const postAgentAttachmentActivity: (activityObserver: Subscriber<Activity> | undefined, attachments?: Attachment[], delay?: number, attachmentLayout?: AttachmentLayout) => void;
|
|
13
|
+
export declare const postAgentSuggestedActionsActivity: (activityObserver: Subscriber<Activity> | undefined, text: string, suggestedActions: {
|
|
14
|
+
actions: CardAction[];
|
|
15
|
+
to?: string[];
|
|
16
|
+
}, delay?: number) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for font handling and emoji support
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Creates a font family optimized for iOS emoji support
|
|
6
|
+
* Uses system-ui as the primary font for better emoji rendering on iOS
|
|
7
|
+
* @param primaryFont - The base font family string (optional, used as fallback)
|
|
8
|
+
* @returns Font family string optimized for iOS emoji support
|
|
9
|
+
*/
|
|
10
|
+
export declare const createIOSOptimizedEmojiFont: (primaryFont?: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
2
|
+
import { IPersistentChatHistoryProps } from "../../livechatwidget/interfaces/IPersistentChatHistoryProps";
|
|
3
|
+
declare const usePersistentChatHistory: (facadeChatSDK: FacadeChatSDK | undefined, props: IPersistentChatHistoryProps) => void;
|
|
4
|
+
export default usePersistentChatHistory;
|
package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPersistentChatHistoryProps } from "../../livechatwidget/interfaces/IPersistentChatHistoryProps";
|
|
2
|
+
/**
|
|
3
|
+
* Component to handle persistent chat history events.
|
|
4
|
+
* Uses WebChatStoreLoader instead of hooks to avoid context issues.
|
|
5
|
+
*/
|
|
6
|
+
declare const WebChatEventSubscribers: (props: IPersistentChatHistoryProps) => null;
|
|
7
|
+
export default WebChatEventSubscribers;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IPersistentChatHistoryProps } from "../../../../../livechatwidget/interfaces/IPersistentChatHistoryProps";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare const ConversationDividerActivity: (props: IPersistentChatHistoryProps) => React.JSX.Element;
|
|
4
|
+
export default ConversationDividerActivity;
|