@microsoft/omnichannel-chat-widget 1.8.3-main.3445895 → 1.8.3-main.4743fdc

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 (51) hide show
  1. package/lib/cjs/common/Constants.js +2 -0
  2. package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -0
  3. package/lib/cjs/components/citationpanestateful/CitationDim.js +29 -0
  4. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +158 -0
  5. package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +70 -0
  6. package/lib/cjs/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
  7. package/lib/cjs/components/livechatwidget/common/endChat.js +5 -1
  8. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +5 -3
  9. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +86 -3
  10. package/lib/cjs/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
  11. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +97 -30
  12. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +54 -0
  13. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
  14. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +46 -45
  15. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -0
  16. package/lib/cjs/contexts/createReducer.js +15 -0
  17. package/lib/esm/common/Constants.js +2 -0
  18. package/lib/esm/common/telemetry/TelemetryConstants.js +3 -0
  19. package/lib/esm/components/citationpanestateful/CitationDim.js +20 -0
  20. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +147 -0
  21. package/lib/esm/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +61 -0
  22. package/lib/esm/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
  23. package/lib/esm/components/livechatwidget/common/endChat.js +5 -1
  24. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +5 -3
  25. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +86 -4
  26. package/lib/esm/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
  27. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +98 -30
  28. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +46 -0
  29. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
  30. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +46 -45
  31. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -0
  32. package/lib/esm/contexts/createReducer.js +15 -0
  33. package/lib/types/common/Constants.d.ts +2 -0
  34. package/lib/types/common/telemetry/TelemetryConstants.d.ts +3 -0
  35. package/lib/types/components/citationpanestateful/CitationDim.d.ts +5 -0
  36. package/lib/types/components/citationpanestateful/CitationPaneStateful.d.ts +4 -0
  37. package/lib/types/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.d.ts +11 -0
  38. package/lib/types/components/citationpanestateful/interfaces/ICitationPaneStatefulProps.d.ts +10 -0
  39. package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +1 -1
  40. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +1 -1
  41. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +3 -1
  42. package/lib/types/components/webchatcontainerstateful/interfaces/ICitation.d.ts +12 -0
  43. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.d.ts +3 -4
  44. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +5 -0
  45. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.d.ts +2 -2
  46. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
  47. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +46 -45
  48. package/package.json +2 -2
  49. /package/lib/cjs/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
  50. /package/lib/esm/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
  51. /package/lib/types/components/confirmationpanestateful/interfaces/{IConfirmationPaneLocalizedText.d.ts → IConfirmationPaneLocalizedTexts.d.ts} +0 -0
@@ -0,0 +1,10 @@
1
+ import { ICitationPaneControlProps } from "@microsoft/omnichannel-chat-components/lib/types/components/citationpane/interfaces/ICitationPaneControlProps";
2
+ import { ICitationPaneStyleProps } from "@microsoft/omnichannel-chat-components/lib/types/components/citationpane/interfaces/ICitationPaneStyleProps";
3
+ export interface ICitationPaneStatefulProps {
4
+ id?: string;
5
+ title?: string;
6
+ onClose?: () => void;
7
+ contentHtml?: string;
8
+ controlProps?: ICitationPaneControlProps;
9
+ styleProps?: ICitationPaneStyleProps;
10
+ }
@@ -1,2 +1,2 @@
1
- import { IConfirmationPaneLocalizedTexts } from "../../interfaces/IConfirmationPaneLocalizedText";
1
+ import { IConfirmationPaneLocalizedTexts } from "../../interfaces/IConfirmationPaneLocalizedTexts";
2
2
  export declare const defaultConfirmationPaneLocalizedTexts: IConfirmationPaneLocalizedTexts;
@@ -1,4 +1,4 @@
1
- import { IConfirmationPaneLocalizedTexts } from "./IConfirmationPaneLocalizedText";
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
  /**
@@ -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";
@@ -27,7 +29,6 @@ import { IStartChatErrorPaneProps } from "../../startchaterrorpanestateful/inter
27
29
  import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetryConfig";
28
30
  import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
29
31
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
30
- import { IAppInsightsConfig } from "../../../common/telemetry/interfaces/IAppInsightsConfig";
31
32
  export interface ILiveChatWidgetProps {
32
33
  audioNotificationProps?: IAudioNotificationProps;
33
34
  callingContainerProps?: ICallingContainerProps;
@@ -51,6 +52,7 @@ export interface ILiveChatWidgetProps {
51
52
  preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
52
53
  proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
53
54
  reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
55
+ citationPaneProps?: ICitationPaneStatefulProps;
54
56
  startChatErrorPaneProps?: IStartChatErrorPaneProps;
55
57
  styleProps?: ILiveChatWidgetStyleProps;
56
58
  telemetryConfig: ITelemetryConfig;
@@ -0,0 +1,12 @@
1
+ export interface ICitation {
2
+ id: string;
3
+ text?: string;
4
+ title?: string;
5
+ type?: string;
6
+ position?: number;
7
+ entityType?: string;
8
+ entityContext?: string;
9
+ url?: string;
10
+ searchSourceId?: string;
11
+ chunkId?: string;
12
+ }
@@ -1,5 +1,4 @@
1
- import { Dispatch } from "redux";
1
+ import { ILiveChatWidgetAction } from "../../../../../contexts/common/ILiveChatWidgetAction";
2
+ import { ILiveChatWidgetContext } from "../../../../../contexts/common/ILiveChatWidgetContext";
2
3
  import { IWebChatAction } from "../../../interfaces/IWebChatAction";
3
- export declare const createCitationsMiddleware: ({ dispatch }: {
4
- dispatch: Dispatch<IWebChatAction>;
5
- }) => (next: Dispatch<IWebChatAction>) => (action: IWebChatAction) => IWebChatAction;
4
+ export declare const createCitationsMiddleware: (state: ILiveChatWidgetContext, dispatch: (action: ILiveChatWidgetAction) => void) => () => (next: (action: IWebChatAction) => void) => (action: IWebChatAction) => void;
@@ -0,0 +1,5 @@
1
+ import { IWebChatAction } from "../../../interfaces/IWebChatAction";
2
+ export declare const localizedStringsBotInitialsMiddleware: () => ({ dispatch }: {
3
+ dispatch: any;
4
+ }) => (next: any) => (action: IWebChatAction) => any;
5
+ export declare const getOverriddenLocalizedStrings: (existingOverrides?: any) => (strings: any) => any;
@@ -1,5 +1,5 @@
1
- import { IWebChatAction } from "../../../interfaces/IWebChatAction";
2
- import { ILiveChatWidgetContext } from "../../../../../contexts/common/ILiveChatWidgetContext";
3
1
  import { Dispatch } from "react";
4
2
  import { ILiveChatWidgetAction } from "../../../../../contexts/common/ILiveChatWidgetAction";
3
+ import { ILiveChatWidgetContext } from "../../../../../contexts/common/ILiveChatWidgetContext";
4
+ import { IWebChatAction } from "../../../interfaces/IWebChatAction";
5
5
  export declare const createQueueOverflowMiddleware: (state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>) => () => (next: (action: IWebChatAction) => void) => (action: IWebChatAction) => void;
@@ -12,6 +12,7 @@ export interface ILiveChatWidgetContext {
12
12
  preChatSurveyResponse: string;
13
13
  chatToken: any;
14
14
  renderingMiddlewareProps: IRenderingMiddlewareProps | undefined;
15
+ citations?: Record<string, string>;
15
16
  postChatContext: any;
16
17
  middlewareLocalizedTexts: ILiveChatWidgetLocalizedTexts | undefined;
17
18
  telemetryInternalData: IInternalTelemetryData;
@@ -2,49 +2,50 @@ export declare enum LiveChatWidgetActionType {
2
2
  SET_WIDGET_ELEMENT_ID = 0,
3
3
  SET_RENDERING_MIDDLEWARE_PROPS = 1,
4
4
  SET_MIDDLEWARE_LOCALIZED_TEXTS = 2,
5
- SET_GLOBAL_DIR = 3,
6
- SET_MINIMIZED = 4,
7
- SET_CONVERSATION_STATE = 5,
8
- SET_PREVIOUS_FOCUSED_ELEMENT_ID = 6,
9
- SET_START_CHAT_FAILING = 7,
10
- SET_START_CHAT_FAILURE_TYPE = 8,
11
- SET_OUTSIDE_OPERATING_HOURS = 9,
12
- SET_PRE_CHAT_SURVEY_RESPONSE = 10,
13
- SET_CUSTOM_CONTEXT = 11,
14
- SET_SHOW_CONFIRMATION = 12,
15
- SET_SHOW_EMAIL_TRANSCRIPT_PANE = 13,
16
- SET_PRECHAT_RESPONSE_EMAIL = 14,
17
- SET_AUDIO_NOTIFICATION = 15,
18
- SET_E2VV_ENABLED = 16,
19
- SET_POST_CHAT_CONTEXT = 17,
20
- SHOW_CALLING_CONTAINER = 18,
21
- SET_INCOMING_CALL = 19,
22
- DISABLE_VIDEO_CALL = 20,
23
- DISABLE_LOCAL_VIDEO = 21,
24
- DISABLE_REMOTE_VIDEO = 22,
25
- SET_CHAT_TOKEN = 23,
26
- SET_START_CHAT_BUTTON_DISPLAY = 24,
27
- SET_PROACTIVE_CHAT_PARAMS = 25,
28
- SET_TELEMETRY_DATA = 26,
29
- SET_RECONNECT_ID = 27,
30
- SET_UNREAD_MESSAGE_COUNT = 28,
31
- SET_FOCUS_CHAT_BUTTON = 29,
32
- SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED = 30,
33
- SET_CONVERSATION_ENDED_BY = 31,
34
- SET_WIDGET_STATE = 32,
35
- SET_LIVE_CHAT_CONTEXT = 33,
36
- SET_BOT_OAUTH_SIGNIN_ID = 34,
37
- SET_WIDGET_SIZE = 35,
38
- SET_WIDGET_INSTANCE_ID = 36,
39
- SET_LIVE_CHAT_CONFIG = 37,
40
- SET_POST_CHAT_WORKFLOW_IN_PROGRESS = 38,
41
- SET_INITIAL_CHAT_SDK_REQUEST_ID = 39,
42
- SET_SHOULD_USE_BOT_SURVEY = 40,
43
- SET_CHAT_DISCONNECT_EVENT_RECEIVED = 41,
44
- SET_SURVEY_MODE = 42,
45
- SET_CONFIRMATION_STATE = 43,
46
- SET_POST_CHAT_PARTICIPANT_TYPE = 44,
47
- SET_CONVERSATIONAL_SURVEY_ENABLED = 45,
48
- SET_CONVERSATIONAL_SURVEY_DISPLAY = 46,
49
- GET_IN_MEMORY_STATE = 47
5
+ SET_CITATIONS = 3,
6
+ SET_GLOBAL_DIR = 4,
7
+ SET_MINIMIZED = 5,
8
+ SET_CONVERSATION_STATE = 6,
9
+ SET_PREVIOUS_FOCUSED_ELEMENT_ID = 7,
10
+ SET_START_CHAT_FAILING = 8,
11
+ SET_START_CHAT_FAILURE_TYPE = 9,
12
+ SET_OUTSIDE_OPERATING_HOURS = 10,
13
+ SET_PRE_CHAT_SURVEY_RESPONSE = 11,
14
+ SET_CUSTOM_CONTEXT = 12,
15
+ SET_SHOW_CONFIRMATION = 13,
16
+ SET_SHOW_EMAIL_TRANSCRIPT_PANE = 14,
17
+ SET_PRECHAT_RESPONSE_EMAIL = 15,
18
+ SET_AUDIO_NOTIFICATION = 16,
19
+ SET_E2VV_ENABLED = 17,
20
+ SET_POST_CHAT_CONTEXT = 18,
21
+ SHOW_CALLING_CONTAINER = 19,
22
+ SET_INCOMING_CALL = 20,
23
+ DISABLE_VIDEO_CALL = 21,
24
+ DISABLE_LOCAL_VIDEO = 22,
25
+ DISABLE_REMOTE_VIDEO = 23,
26
+ SET_CHAT_TOKEN = 24,
27
+ SET_START_CHAT_BUTTON_DISPLAY = 25,
28
+ SET_PROACTIVE_CHAT_PARAMS = 26,
29
+ SET_TELEMETRY_DATA = 27,
30
+ SET_RECONNECT_ID = 28,
31
+ SET_UNREAD_MESSAGE_COUNT = 29,
32
+ SET_FOCUS_CHAT_BUTTON = 30,
33
+ SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED = 31,
34
+ SET_CONVERSATION_ENDED_BY = 32,
35
+ SET_WIDGET_STATE = 33,
36
+ SET_LIVE_CHAT_CONTEXT = 34,
37
+ SET_BOT_OAUTH_SIGNIN_ID = 35,
38
+ SET_WIDGET_SIZE = 36,
39
+ SET_WIDGET_INSTANCE_ID = 37,
40
+ SET_LIVE_CHAT_CONFIG = 38,
41
+ SET_POST_CHAT_WORKFLOW_IN_PROGRESS = 39,
42
+ SET_INITIAL_CHAT_SDK_REQUEST_ID = 40,
43
+ SET_SHOULD_USE_BOT_SURVEY = 41,
44
+ SET_CHAT_DISCONNECT_EVENT_RECEIVED = 42,
45
+ SET_SURVEY_MODE = 43,
46
+ SET_CONFIRMATION_STATE = 44,
47
+ SET_POST_CHAT_PARTICIPANT_TYPE = 45,
48
+ SET_CONVERSATIONAL_SURVEY_ENABLED = 46,
49
+ SET_CONVERSATIONAL_SURVEY_DISPLAY = 47,
50
+ GET_IN_MEMORY_STATE = 48
50
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.8.3-main.3445895",
3
+ "version": "1.8.3-main.4743fdc",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -86,7 +86,7 @@
86
86
  "dependencies": {
87
87
  "@azure/core-tracing": "^1.2.0",
88
88
  "@microsoft/applicationinsights-web": "^3.3.6",
89
- "@microsoft/omnichannel-chat-components": "1.1.13",
89
+ "@microsoft/omnichannel-chat-components": "1.1.14",
90
90
  "@microsoft/omnichannel-chat-sdk": "^1.11.6",
91
91
  "@opentelemetry/api": "^1.9.0",
92
92
  "abort-controller": "^3",