@microsoft/omnichannel-chat-widget 0.1.0-main.d48dae2 → 0.1.0-main.d4c1f9e

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 (67) hide show
  1. package/lib/cjs/common/Constants.js +2 -0
  2. package/lib/cjs/common/utils.js +20 -7
  3. package/lib/cjs/components/headerstateful/HeaderStateful.js +2 -1
  4. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +44 -0
  5. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +39 -0
  6. package/lib/cjs/components/livechatwidget/common/Deferred.js +42 -0
  7. package/lib/cjs/components/livechatwidget/common/authHelper.js +52 -0
  8. package/lib/cjs/components/livechatwidget/common/createAdapter.js +3 -0
  9. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +6 -1
  10. package/lib/cjs/components/livechatwidget/common/endChat.js +3 -3
  11. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +4 -0
  12. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +35 -23
  13. package/lib/cjs/components/livechatwidget/common/startChat.js +39 -47
  14. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +87 -42
  15. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
  16. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -0
  17. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +4 -1
  18. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
  19. package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  20. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
  21. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  22. package/lib/cjs/contexts/createReducer.js +8 -0
  23. package/lib/esm/common/Constants.js +2 -0
  24. package/lib/esm/common/utils.js +14 -5
  25. package/lib/esm/components/headerstateful/HeaderStateful.js +2 -1
  26. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +34 -0
  27. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +29 -0
  28. package/lib/esm/components/livechatwidget/common/Deferred.js +33 -0
  29. package/lib/esm/components/livechatwidget/common/authHelper.js +39 -0
  30. package/lib/esm/components/livechatwidget/common/createAdapter.js +3 -1
  31. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +6 -1
  32. package/lib/esm/components/livechatwidget/common/endChat.js +3 -3
  33. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +4 -0
  34. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +36 -25
  35. package/lib/esm/components/livechatwidget/common/startChat.js +35 -47
  36. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +86 -44
  37. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
  38. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +10 -0
  39. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
  40. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
  41. package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  42. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
  43. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  44. package/lib/esm/contexts/createReducer.js +8 -0
  45. package/lib/types/common/Constants.d.ts +1 -0
  46. package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -1
  47. package/lib/types/common/utils.d.ts +4 -3
  48. package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +1 -1
  49. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +2 -1
  50. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
  51. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
  52. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
  53. package/lib/types/components/livechatwidget/common/authHelper.d.ts +4 -0
  54. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -1
  55. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +4 -4
  56. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
  57. package/lib/types/components/livechatwidget/common/startChat.d.ts +2 -2
  58. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +1 -1
  59. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
  60. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
  61. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
  62. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +2 -0
  63. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +1 -1
  64. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +1 -1
  65. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
  66. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
  67. package/package.json +4 -3
@@ -0,0 +1,4 @@
1
+ export interface IAdaptiveCardStyles {
2
+ background?: string;
3
+ color?: string;
4
+ }
@@ -4,6 +4,7 @@ import { IRenderingMiddlewareProps } from "./IRenderingMiddlewareProps";
4
4
  import { IStyle } from "@fluentui/react";
5
5
  import { IWebChatProps } from "./IWebChatProps";
6
6
  import { StyleOptions } from "botframework-webchat-api";
7
+ import { IAdaptiveCardStyles } from "./IAdaptiveCardStyles";
7
8
  export interface IWebChatContainerStatefulProps {
8
9
  containerStyles?: IStyle;
9
10
  disableNewLineMarkdownSupport?: boolean;
@@ -15,4 +16,5 @@ export interface IWebChatContainerStatefulProps {
15
16
  renderingMiddlewareProps?: IRenderingMiddlewareProps;
16
17
  localizedTexts?: ILiveChatWidgetLocalizedTexts;
17
18
  botMagicCode?: IBotMagicCodeConfig;
19
+ adaptiveCardStyles?: IAdaptiveCardStyles;
18
20
  }
@@ -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, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
10
+ export declare const createActivityMiddleware: (systemMessageStyleProps?: React.CSSProperties | undefined, userMessageStyleProps?: React.CSSProperties | undefined) => () => (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, avatarTextStyleProps?: React.CSSProperties) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
8
+ export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties | undefined, avatarTextStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
@@ -17,6 +17,7 @@ export interface ILiveChatWidgetContext {
17
17
  liveChatContext: any;
18
18
  customContext: any;
19
19
  widgetSize: any;
20
+ widgetInstanceId: string;
20
21
  };
21
22
  appStates: {
22
23
  conversationState: ConversationState;
@@ -31,5 +31,6 @@ export declare enum LiveChatWidgetActionType {
31
31
  SET_WIDGET_STATE = 29,
32
32
  SET_LIVE_CHAT_CONTEXT = 30,
33
33
  SET_BOT_OAUTH_SIGNIN_ID = 31,
34
- SET_WIDGET_SIZE = 32
34
+ SET_WIDGET_SIZE = 32,
35
+ SET_WIDGET_INSTANCE_ID = 33
35
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "0.1.0-main.d48dae2",
3
+ "version": "0.1.0-main.d4c1f9e",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -68,18 +68,19 @@
68
68
  "storybook-addon-playwright": "^4.9.2",
69
69
  "terser-webpack-plugin": "^4.2.3",
70
70
  "ts-loader": "^9.2.6",
71
- "typescript": "^4.4.4",
71
+ "typescript": "4.6.4",
72
72
  "webpack": "^4.44.2",
73
73
  "webpack-cli": "^4.9.2"
74
74
  },
75
75
  "dependencies": {
76
76
  "@fluentui/react": "^8.49.1",
77
- "@microsoft/omnichannel-chat-components": "0.1.0-main.7a911ca",
77
+ "@microsoft/omnichannel-chat-components": "0.1.0-main.5063558",
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",
81
81
  "markdown-it": "^12.3.2",
82
82
  "markdown-it-for-inline": "^0.1.1",
83
+ "md5-typescript": "^1.0.5",
83
84
  "p-defer-es5": "^2.0.1",
84
85
  "slack-markdown-it": "^1.0.5"
85
86
  },