@microsoft/omnichannel-chat-widget 0.1.0-main.84a7035 → 0.1.0-main.886e5cf

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.
Files changed (98) hide show
  1. package/README.md +32 -0
  2. package/lib/cjs/common/Constants.js +16 -2
  3. package/lib/cjs/common/telemetry/TelemetryConstants.js +24 -3
  4. package/lib/cjs/common/telemetry/TelemetryManager.js +7 -1
  5. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +16 -13
  6. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -5
  7. package/lib/cjs/common/utils.js +63 -2
  8. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  9. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -4
  10. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +0 -1
  11. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
  12. package/lib/cjs/components/headerstateful/HeaderStateful.js +2 -2
  13. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +11 -14
  14. package/lib/cjs/components/livechatwidget/common/endChat.js +63 -16
  15. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +20 -3
  16. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +15 -15
  17. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +0 -4
  18. package/lib/cjs/components/livechatwidget/common/startChat.js +149 -70
  19. package/lib/cjs/components/livechatwidget/interfaces/IAuthProps.js +1 -0
  20. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +198 -85
  21. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +5 -10
  22. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +17 -1
  23. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +80 -0
  24. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  25. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +14 -0
  26. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
  27. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
  28. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
  29. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +117 -0
  30. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +1 -0
  31. package/lib/cjs/contexts/common/ConversationState.js +3 -2
  32. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +24 -21
  33. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -2
  34. package/lib/cjs/contexts/createReducer.js +16 -0
  35. package/lib/cjs/controller/componentController.js +3 -3
  36. package/lib/cjs/plugins/newMessageEventHandler.js +10 -13
  37. package/lib/esm/common/Constants.js +16 -2
  38. package/lib/esm/common/telemetry/TelemetryConstants.js +24 -3
  39. package/lib/esm/common/telemetry/TelemetryManager.js +6 -1
  40. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +17 -11
  41. package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -5
  42. package/lib/esm/common/utils.js +44 -0
  43. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  44. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -7
  45. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +0 -1
  46. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
  47. package/lib/esm/components/headerstateful/HeaderStateful.js +2 -2
  48. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +11 -14
  49. package/lib/esm/components/livechatwidget/common/endChat.js +61 -17
  50. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +19 -5
  51. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +17 -16
  52. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +0 -4
  53. package/lib/esm/components/livechatwidget/common/startChat.js +149 -73
  54. package/lib/esm/components/livechatwidget/interfaces/IAuthProps.js +1 -0
  55. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +190 -87
  56. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -11
  57. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +17 -1
  58. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +72 -0
  59. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  60. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
  61. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
  62. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
  63. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
  64. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +107 -0
  65. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +1 -0
  66. package/lib/esm/contexts/common/ConversationState.js +3 -2
  67. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +24 -21
  68. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -2
  69. package/lib/esm/contexts/createReducer.js +16 -0
  70. package/lib/esm/controller/componentController.js +3 -3
  71. package/lib/esm/plugins/newMessageEventHandler.js +10 -12
  72. package/lib/types/common/Constants.d.ts +8 -1
  73. package/lib/types/common/interfaces/IContextDataStore.d.ts +1 -1
  74. package/lib/types/common/telemetry/TelemetryConstants.d.ts +23 -5
  75. package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -1
  76. package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
  77. package/lib/types/common/utils.d.ts +5 -0
  78. package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +1 -1
  79. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -1
  80. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -4
  81. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
  82. package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
  83. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +1 -1
  84. package/lib/types/components/livechatwidget/interfaces/IAuthProps.d.ts +4 -0
  85. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
  86. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +0 -1
  87. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
  88. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +2 -0
  89. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
  90. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +1 -1
  91. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +1 -1
  92. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
  93. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
  94. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
  95. package/lib/types/contexts/common/ConversationState.d.ts +3 -2
  96. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -1
  97. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +24 -21
  98. package/package.json +2 -2
@@ -1,4 +1,7 @@
1
- export interface ConfigValidationTelemetryData {
1
+ export interface BaseTelemetryData {
2
+ Data?: any;
3
+ }
4
+ export interface ConfigValidationTelemetryData extends BaseTelemetryData {
2
5
  Event?: string;
3
6
  RequestId?: string;
4
7
  LCWVersion?: string;
@@ -8,7 +11,7 @@ export interface ConfigValidationTelemetryData {
8
11
  ExceptionDetails?: object;
9
12
  Domain?: string;
10
13
  }
11
- export interface LoadTelemetryData {
14
+ export interface LoadTelemetryData extends BaseTelemetryData {
12
15
  Event?: string;
13
16
  ResourcePath?: string;
14
17
  ElapsedTimeInMilliseconds?: number;
@@ -20,18 +23,18 @@ export interface LoadTelemetryData {
20
23
  OCChatWidgetVersion?: string;
21
24
  OCChatComponentsVersion?: string;
22
25
  }
23
- export interface MessageProcessingErrorData {
26
+ export interface MessageProcessingErrorData extends BaseTelemetryData {
24
27
  Event: string;
25
28
  ExceptionDetails: object;
26
29
  }
27
- export interface OCChatSDKTelemetryData {
30
+ export interface OCChatSDKTelemetryData extends BaseTelemetryData {
28
31
  RequestId: string;
29
32
  Event?: string;
30
33
  ElapsedTimeInMilliseconds?: number;
31
34
  TransactionId: string;
32
35
  ExceptionDetails?: object;
33
36
  }
34
- export interface IC3ClientTelemetryData {
37
+ export interface IC3ClientTelemetryData extends BaseTelemetryData {
35
38
  SubscriptionId?: string;
36
39
  EndpointUrl?: string;
37
40
  EndpointId?: string;
@@ -42,7 +45,7 @@ export interface IC3ClientTelemetryData {
42
45
  ShouldBubbleToHost?: boolean;
43
46
  Description?: string;
44
47
  }
45
- export interface WebChatTelemetryData {
48
+ export interface WebChatTelemetryData extends BaseTelemetryData {
46
49
  data?: any;
47
50
  dimensions?: any;
48
51
  duration?: number;
@@ -53,7 +56,7 @@ export interface WebChatTelemetryData {
53
56
  name?: string;
54
57
  type?: string;
55
58
  }
56
- export interface ACSAdapterTelemetryData {
59
+ export interface ACSAdapterTelemetryData extends BaseTelemetryData {
57
60
  Description?: string;
58
61
  ACSUserId?: string;
59
62
  ChatThreadId?: string;
@@ -63,14 +66,14 @@ export interface ACSAdapterTelemetryData {
63
66
  ErrorCode?: string;
64
67
  ExceptionDetails?: any;
65
68
  }
66
- export interface ActionTelemetryData {
69
+ export interface ActionTelemetryData extends BaseTelemetryData {
67
70
  Event?: string;
68
71
  ElapsedTimeInMilliseconds?: number;
69
72
  ActionType?: string;
70
73
  ExceptionDetails?: object;
71
74
  Description?: string;
72
75
  }
73
- export interface CallingTelemetryData {
76
+ export interface CallingTelemetryData extends BaseTelemetryData {
74
77
  CallId?: string;
75
78
  Event?: string;
76
79
  ElapsedTimeInMilliseconds?: number;
@@ -22,3 +22,8 @@ export declare const isNullOrEmptyString: (s: string) => boolean;
22
22
  export declare const newGuid: () => string;
23
23
  export declare const createTimer: () => ITimer;
24
24
  export declare const getDomain: (hostValue: any) => string;
25
+ export declare const getWidgetCacheId: (orgId: string, widgetId: string) => string;
26
+ export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string) => string;
27
+ export declare const getStateFromCache: (orgId: string, widgetId: string) => any;
28
+ export declare const isUndefinedOrEmpty: (object: any) => boolean;
29
+ export declare const addDelayInMs: (ms: number) => Promise<void>;
@@ -1 +1 @@
1
- export declare const downloadTranscript: (chatSDK: any, renderMarkDown?: ((transcriptContent: string) => string) | undefined, bannerMessageOnError?: string | undefined, attachmentMessage?: string | undefined) => Promise<void>;
1
+ export declare const downloadTranscript: (chatSDK: any, renderMarkDown?: ((transcriptContent: string) => string) | undefined, bannerMessageOnError?: string, attachmentMessage?: string) => Promise<void>;
@@ -3,5 +3,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
3
3
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
4
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
5
  declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
6
- declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined) => Promise<void>;
6
+ declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
7
7
  export { prepareEndChat, endChat };
@@ -2,9 +2,10 @@ import "regenerator-runtime/runtime";
2
2
  import { Dispatch } from "react";
3
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
- declare const getChatReconnectContext: (chatSDK: any, reconnectId?: string | undefined) => Promise<any>;
5
+ import { IAuthProps } from "../interfaces/IAuthProps";
6
+ declare const getChatReconnectContext: (chatSDK: any, reconnectId?: string) => Promise<any>;
6
7
  declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
7
- declare const handleUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
8
- declare const startUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any) => Promise<void>;
9
- declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
8
+ declare const handleUnauthenticatedReconnectChat: (chatSDK: any, authProps: IAuthProps | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
9
+ declare const startUnauthenticatedReconnectChat: (chatSDK: any, authProps: IAuthProps | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any) => Promise<void>;
10
+ declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, authProps: IAuthProps | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
10
11
  export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
@@ -1,3 +1,3 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
- export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
3
+ export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean) => Promise<void>;
@@ -2,6 +2,8 @@ import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
3
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
+ import { IAuthProps } from "../interfaces/IAuthProps";
5
6
  declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
6
- declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
7
- export { prepareStartChat, initStartChat };
7
+ declare const setPreChatAndInitiateChat: (chatSDK: any, authProps: IAuthProps | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | false, proactiveChatEnablePrechatState?: boolean | false) => Promise<void>;
8
+ declare const initStartChat: (chatSDK: any, authProps: IAuthProps | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
9
+ export { prepareStartChat, initStartChat, setPreChatAndInitiateChat };
@@ -1,4 +1,4 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
3
  import { IProactiveChatNotificationConfig } from "../../proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig";
4
- export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig | undefined, enablePreChat?: boolean | undefined, inNewWindow?: boolean | undefined) => void;
4
+ export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig, enablePreChat?: boolean, inNewWindow?: boolean) => void;
@@ -0,0 +1,4 @@
1
+ export interface IAuthProps {
2
+ authClientFunction?: string;
3
+ setAuthTokenProviderToChatSdk?: (chatSDK: any, authClientFunction?: string) => Promise<void>;
4
+ }
@@ -21,6 +21,7 @@ import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/i
21
21
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
22
22
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
23
23
  import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
24
+ import { IAuthProps } from "./IAuthProps";
24
25
  export interface ILiveChatWidgetProps {
25
26
  audioNotificationProps?: IAudioNotificationProps;
26
27
  callingContainerProps?: ICallingContainerProps;
@@ -49,4 +50,5 @@ export interface ILiveChatWidgetProps {
49
50
  webChatContainerProps?: IWebChatContainerStatefulProps;
50
51
  liveChatContextFromCache?: ILiveChatWidgetContext;
51
52
  contextDataStore?: IContextDataStore;
53
+ authProps?: IAuthProps;
52
54
  }
@@ -1,6 +1,5 @@
1
1
  import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
2
2
  export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
3
- authClientFunction?: string;
4
3
  isReconnectEnabled?: boolean;
5
4
  reconnectId?: string;
6
5
  redirectInSameWindow?: boolean;
@@ -0,0 +1,4 @@
1
+ export interface IBotMagicCodeConfig {
2
+ disabled?: boolean;
3
+ fwdUrl?: string;
4
+ }
@@ -1,3 +1,4 @@
1
+ import { IBotMagicCodeConfig } from "./IBotMagicCodeConfig";
1
2
  import { ILiveChatWidgetLocalizedTexts } from "../../../contexts/common/ILiveChatWidgetLocalizedTexts";
2
3
  import { IRenderingMiddlewareProps } from "./IRenderingMiddlewareProps";
3
4
  import { IStyle } from "@fluentui/react";
@@ -13,4 +14,5 @@ export interface IWebChatContainerStatefulProps {
13
14
  storeMiddlewares?: any[];
14
15
  renderingMiddlewareProps?: IRenderingMiddlewareProps;
15
16
  localizedTexts?: ILiveChatWidgetLocalizedTexts;
17
+ botMagicCode?: IBotMagicCodeConfig;
16
18
  }
@@ -0,0 +1,3 @@
1
+ export declare class BotMagicCodeStore {
2
+ static botOAuthSignInId: string;
3
+ }
@@ -7,4 +7,4 @@
7
7
  * 3. Decodes certain html characters that came through from chat services
8
8
  ******/
9
9
  import React from "react";
10
- export declare const createActivityMiddleware: (systemMessageStyleProps?: React.CSSProperties | undefined, userMessageStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (...args: any) => any;
10
+ export declare const createActivityMiddleware: (systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
@@ -5,4 +5,4 @@
5
5
  * 1. Renders the first two letters of the sender as the profile pic
6
6
  ******/
7
7
  import React from "react";
8
- export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties | undefined, avatarTextStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
8
+ export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties, avatarTextStyleProps?: React.CSSProperties) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
@@ -0,0 +1,2 @@
1
+ import { IBotMagicCodeConfig } from "../../../interfaces/IBotMagicCodeConfig";
2
+ export declare const createCardActionMiddleware: (botMagicCodeConfig: IBotMagicCodeConfig | undefined) => () => (next: any) => (...args: any) => any;
@@ -0,0 +1,5 @@
1
+ import { IWebChatAction } from "../../../interfaces/IWebChatAction";
2
+ declare const createMessageTimeStampMiddleware: ({ dispatch }: {
3
+ dispatch: any;
4
+ }) => (next: any) => (action: IWebChatAction) => any;
5
+ export default createMessageTimeStampMiddleware;
@@ -6,6 +6,7 @@ export declare enum ConversationState {
6
6
  ProactiveChat = 4,
7
7
  Active = 5,
8
8
  InActive = 6,
9
- Postchat = 7,
10
- Closed = 8
9
+ PostchatLoading = 7,
10
+ Postchat = 8,
11
+ Closed = 9
11
12
  }
@@ -15,13 +15,14 @@ export interface ILiveChatWidgetContext {
15
15
  telemetryInternalData: IInternalTelemetryData;
16
16
  globalDir: "rtl" | "ltr";
17
17
  liveChatContext: any;
18
+ customContext: any;
19
+ widgetSize: any;
18
20
  };
19
21
  appStates: {
20
22
  conversationState: ConversationState;
21
23
  isMinimized: boolean;
22
24
  previousElementOnFocusBeforeModalOpen: HTMLElement | null;
23
25
  outsideOperatingHours: boolean;
24
- shouldShowPostChat: boolean;
25
26
  preChatResponseEmail: string;
26
27
  isAudioMuted: boolean | null;
27
28
  newMessage: boolean;
@@ -8,25 +8,28 @@ export declare enum LiveChatWidgetActionType {
8
8
  SET_PREVIOUS_FOCUSED_ELEMENT = 6,
9
9
  SET_OUTSIDE_OPERATING_HOURS = 7,
10
10
  SET_PRE_CHAT_SURVEY_RESPONSE = 8,
11
- SET_SHOW_CONFIRMATION = 9,
12
- SET_SHOW_EMAIL_TRANSCRIPT_PANE = 10,
13
- SET_PRECHAT_RESPONSE_EMAIL = 11,
14
- SET_AUDIO_NOTIFICATION = 12,
15
- SET_E2VV_ENABLED = 13,
16
- SET_POST_CHAT_CONTEXT = 14,
17
- SHOW_CALLING_CONTAINER = 15,
18
- SET_INCOMING_CALL = 16,
19
- DISABLE_VIDEO_CALL = 17,
20
- DISABLE_LOCAL_VIDEO = 18,
21
- DISABLE_REMOTE_VIDEO = 19,
22
- SET_CHAT_TOKEN = 20,
23
- SET_SKIP_CHAT_BUTTON_RENDERING = 21,
24
- SET_PROACTIVE_CHAT_PARAMS = 22,
25
- SET_TELEMETRY_DATA = 23,
26
- SET_RECONNECT_ID = 24,
27
- SET_UNREAD_MESSAGE_COUNT = 25,
28
- SET_FOCUS_CHAT_BUTTON = 26,
29
- SET_CONVERSATION_ENDED_BY_AGENT = 27,
30
- SET_WIDGET_STATE = 28,
31
- SET_LIVE_CHAT_CONTEXT = 29
11
+ SET_CUSTOM_CONTEXT = 9,
12
+ SET_SHOW_CONFIRMATION = 10,
13
+ SET_SHOW_EMAIL_TRANSCRIPT_PANE = 11,
14
+ SET_PRECHAT_RESPONSE_EMAIL = 12,
15
+ SET_AUDIO_NOTIFICATION = 13,
16
+ SET_E2VV_ENABLED = 14,
17
+ SET_POST_CHAT_CONTEXT = 15,
18
+ SHOW_CALLING_CONTAINER = 16,
19
+ SET_INCOMING_CALL = 17,
20
+ DISABLE_VIDEO_CALL = 18,
21
+ DISABLE_LOCAL_VIDEO = 19,
22
+ DISABLE_REMOTE_VIDEO = 20,
23
+ SET_CHAT_TOKEN = 21,
24
+ SET_SKIP_CHAT_BUTTON_RENDERING = 22,
25
+ SET_PROACTIVE_CHAT_PARAMS = 23,
26
+ SET_TELEMETRY_DATA = 24,
27
+ SET_RECONNECT_ID = 25,
28
+ SET_UNREAD_MESSAGE_COUNT = 26,
29
+ SET_FOCUS_CHAT_BUTTON = 27,
30
+ SET_CONVERSATION_ENDED_BY_AGENT = 28,
31
+ SET_WIDGET_STATE = 29,
32
+ SET_LIVE_CHAT_CONTEXT = 30,
33
+ SET_BOT_OAUTH_SIGNIN_ID = 31,
34
+ SET_WIDGET_SIZE = 32
32
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "0.1.0-main.84a7035",
3
+ "version": "0.1.0-main.886e5cf",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@fluentui/react": "^8.49.1",
77
- "@microsoft/omnichannel-chat-components": "0.1.0-main.2eda736",
77
+ "@microsoft/omnichannel-chat-components": "0.1.0-main.b59a07c",
78
78
  "@microsoft/omnichannel-chat-sdk": "1.0.1-main.077d17c",
79
79
  "abort-controller-es5": "^2.0.1",
80
80
  "dompurify": "^2.3.4",