@microsoft/omnichannel-chat-widget 1.8.3-main.ec1328d → 1.8.4-main.1bfa518

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 (204) hide show
  1. package/README.md +27 -0
  2. package/lib/cjs/common/Constants.js +9 -0
  3. package/lib/cjs/common/facades/FacadeChatSDK.js +6 -0
  4. package/lib/cjs/common/telemetry/AppInsightsEvents.js +14 -9
  5. package/lib/cjs/common/telemetry/TelemetryConstants.js +49 -2
  6. package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
  7. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +29 -13
  8. package/lib/cjs/common/utils/SecureEventBus.js +307 -0
  9. package/lib/cjs/common/utils/dispatchCustomEvent.js +25 -0
  10. package/lib/cjs/common/utils.js +14 -1
  11. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
  12. package/lib/cjs/components/citationpanestateful/CitationDim.js +29 -0
  13. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +218 -0
  14. package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +70 -0
  15. package/lib/cjs/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
  16. package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -2
  17. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +4 -4
  18. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +127 -0
  19. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -5
  20. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +15 -0
  21. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +290 -0
  22. package/lib/cjs/components/livechatwidget/common/createAdapter.js +2 -0
  23. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +17 -0
  24. package/lib/cjs/components/livechatwidget/common/endChat.js +54 -12
  25. package/lib/cjs/components/livechatwidget/common/getMockChatSDKIfApplicable.js +4 -3
  26. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +16 -7
  27. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +36 -4
  28. package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
  29. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  30. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  31. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  32. package/lib/cjs/components/livechatwidget/common/startChat.js +10 -5
  33. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +24 -4
  34. package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +8 -2
  35. package/lib/cjs/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
  36. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +152 -33
  37. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +37 -8
  38. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -3
  39. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +135 -26
  40. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +43 -14
  41. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +6 -1
  42. package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +14 -0
  43. package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +17 -0
  44. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +103 -0
  45. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +3 -1
  46. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +1 -1
  47. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +1 -1
  48. package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +36 -2
  49. package/lib/cjs/components/webchatcontainerstateful/common/utils/fontUtils.js +28 -0
  50. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +57 -0
  51. package/lib/cjs/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
  52. package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  53. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +121 -0
  54. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +10 -0
  55. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +47 -0
  56. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1058 -0
  57. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +34 -0
  58. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +50 -1
  59. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +16 -2
  60. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +1 -1
  61. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +20 -0
  62. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +1 -1
  63. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +2 -2
  64. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +59 -0
  65. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +5 -3
  66. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -2
  67. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +102 -30
  68. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  69. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
  70. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +47 -45
  71. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +9 -1
  72. package/lib/cjs/contexts/createReducer.js +30 -0
  73. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  74. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  75. package/lib/cjs/index.js +9 -1
  76. package/lib/cjs/plugins/newMessageEventHandler.js +4 -1
  77. package/lib/esm/common/Constants.js +9 -0
  78. package/lib/esm/common/facades/FacadeChatSDK.js +6 -0
  79. package/lib/esm/common/telemetry/AppInsightsEvents.js +14 -9
  80. package/lib/esm/common/telemetry/TelemetryConstants.js +47 -1
  81. package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
  82. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +30 -14
  83. package/lib/esm/common/utils/SecureEventBus.js +328 -0
  84. package/lib/esm/common/utils/dispatchCustomEvent.js +18 -0
  85. package/lib/esm/common/utils.js +11 -0
  86. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -5
  87. package/lib/esm/components/citationpanestateful/CitationDim.js +20 -0
  88. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +207 -0
  89. package/lib/esm/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +61 -0
  90. package/lib/esm/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedTexts.js +1 -0
  91. package/lib/esm/components/headerstateful/HeaderStateful.js +9 -3
  92. package/lib/esm/components/livechatwidget/LiveChatWidget.js +4 -4
  93. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +120 -0
  94. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -5
  95. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +8 -0
  96. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +283 -0
  97. package/lib/esm/components/livechatwidget/common/createAdapter.js +2 -0
  98. package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +10 -0
  99. package/lib/esm/components/livechatwidget/common/endChat.js +55 -13
  100. package/lib/esm/components/livechatwidget/common/getMockChatSDKIfApplicable.js +4 -3
  101. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -7
  102. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +33 -2
  103. package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +2 -1
  104. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  105. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  106. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  107. package/lib/esm/components/livechatwidget/common/startChat.js +12 -7
  108. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +23 -4
  109. package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
  110. package/lib/esm/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
  111. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +153 -34
  112. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +39 -10
  113. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -4
  114. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +135 -27
  115. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +43 -14
  116. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +6 -1
  117. package/lib/esm/components/webchatcontainerstateful/common/activities/botActivity.js +7 -0
  118. package/lib/esm/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +9 -0
  119. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +96 -0
  120. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +3 -1
  121. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
  122. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +1 -1
  123. package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +32 -0
  124. package/lib/esm/components/webchatcontainerstateful/common/utils/fontUtils.js +21 -0
  125. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +49 -0
  126. package/lib/esm/components/webchatcontainerstateful/interfaces/ICitation.js +1 -0
  127. package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  128. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +114 -0
  129. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +3 -0
  130. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +39 -0
  131. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1080 -0
  132. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +25 -0
  133. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +48 -1
  134. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +13 -0
  135. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +1 -1
  136. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +13 -0
  137. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +1 -1
  138. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
  139. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +52 -0
  140. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -2
  141. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
  142. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +103 -30
  143. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  144. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +2 -2
  145. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +47 -45
  146. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +9 -1
  147. package/lib/esm/contexts/createReducer.js +30 -0
  148. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  149. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  150. package/lib/esm/index.js +1 -0
  151. package/lib/esm/plugins/newMessageEventHandler.js +4 -1
  152. package/lib/types/common/Constants.d.ts +8 -0
  153. package/lib/types/common/facades/FacadeChatSDK.d.ts +3 -1
  154. package/lib/types/common/telemetry/TelemetryConstants.d.ts +44 -2
  155. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
  156. package/lib/types/common/utils/SecureEventBus.d.ts +159 -0
  157. package/lib/types/common/utils/dispatchCustomEvent.d.ts +2 -0
  158. package/lib/types/common/utils.d.ts +9 -1
  159. package/lib/types/components/citationpanestateful/CitationDim.d.ts +5 -0
  160. package/lib/types/components/citationpanestateful/CitationPaneStateful.d.ts +4 -0
  161. package/lib/types/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.d.ts +11 -0
  162. package/lib/types/components/citationpanestateful/interfaces/ICitationPaneStatefulProps.d.ts +19 -0
  163. package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +1 -1
  164. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +1 -1
  165. package/lib/types/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.d.ts +45 -0
  166. package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +7 -0
  167. package/lib/types/components/livechatwidget/common/PersistentConversationHandler.d.ts +28 -0
  168. package/lib/types/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.d.ts +2 -0
  169. package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +2 -1
  170. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +11 -0
  171. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -0
  172. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +5 -1
  173. package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +5 -3
  174. package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +11 -0
  175. package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +4 -2
  176. package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +5 -0
  177. package/lib/types/components/webchatcontainerstateful/common/activities/botActivity.d.ts +7 -0
  178. package/lib/types/components/webchatcontainerstateful/common/activities/conversationDividerActivity.d.ts +10 -0
  179. package/lib/types/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.d.ts +2 -0
  180. package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +6 -1
  181. package/lib/types/components/webchatcontainerstateful/common/utils/fontUtils.d.ts +10 -0
  182. package/lib/types/components/webchatcontainerstateful/hooks/usePersistentChatHistory.d.ts +4 -0
  183. package/lib/types/components/webchatcontainerstateful/interfaces/ICitation.d.ts +12 -0
  184. package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
  185. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +6 -0
  186. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.d.ts +3 -0
  187. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.d.ts +4 -0
  188. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +326 -0
  189. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.d.ts +8 -0
  190. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
  191. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -0
  192. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.d.ts +2 -0
  193. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.d.ts +2 -0
  194. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.d.ts +3 -4
  195. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
  196. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.d.ts +2 -2
  197. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -0
  198. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +6 -0
  199. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +47 -45
  200. package/lib/types/index.d.ts +1 -0
  201. package/package.json +3 -3
  202. /package/lib/cjs/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
  203. /package/lib/esm/components/{confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.js → citationpanestateful/interfaces/ICitationPaneStatefulProps.js} +0 -0
  204. /package/lib/types/components/confirmationpanestateful/interfaces/{IConfirmationPaneLocalizedText.d.ts → IConfirmationPaneLocalizedTexts.d.ts} +0 -0
@@ -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/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
  /**
@@ -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
+ HISTORY_LOAD_ERROR = "CHAT_WIDGET/HISTORY_LOAD_ERROR"
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;
@@ -0,0 +1,2 @@
1
+ import { IPersistentChatHistoryProps } from "../../interfaces/IPersistentChatHistoryProps";
2
+ export declare const defaultPersistentChatHistoryProps: IPersistentChatHistoryProps;
@@ -1 +1,2 @@
1
- export declare const getMockChatSDKIfApplicable: (chatSDK: any, type?: string) => any;
1
+ import { IMockProps } from "../interfaces/IMockProps";
2
+ export declare const getMockChatSDKIfApplicable: (chatSDK: any, mockProps?: IMockProps) => any;
@@ -1,4 +1,15 @@
1
+ import { ExtendedChatConfig } from "../../webchatcontainerstateful/interfaces/IExtendedChatConffig";
1
2
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
3
  export declare const isPostChatSurveyEnabled: (facadeChatSDK: FacadeChatSDK) => Promise<boolean>;
3
4
  export declare const getPostChatSurveyConfig: (facadeChatSDK: FacadeChatSDK) => Promise<any>;
4
5
  export declare const isPersistentChatEnabled: (conversationMode: string | undefined) => boolean;
6
+ /**
7
+ * Determines if persistent chat history should be loaded based on all required conditions.
8
+ *
9
+ * @param extendedChatConfig - The extended chat configuration object
10
+ * @returns true if ALL conditions are met:
11
+ * 1. Conversation mode must be Persistent ("192350001")
12
+ * 2. History is enabled in admin config (msdyn_enablepersistentchatpreviousconversations)
13
+ * 3. History is enabled via feature flag (lcwPersistentChatHistoryEnabled)
14
+ */
15
+ export declare const shouldLoadPersistentChatHistory: (extendedChatConfig: ExtendedChatConfig | undefined) => boolean;
@@ -4,4 +4,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
5
  export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
6
6
  export declare const logWidgetLoadComplete: (additionalMessage?: string) => void;
7
+ export declare const logStartChatComplete: (additionalMessage?: string) => void;
7
8
  export declare const logWidgetLoadWithUnexpectedError: (ex: any) => void;
@@ -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
- declare enum LiveChatWidgetMockType {
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 {};
@@ -0,0 +1,11 @@
1
+ import { IStyle } from "@fluentui/react";
2
+ export interface IPersistentChatHistoryProps {
3
+ pageSize?: number;
4
+ dividerActivityStyle?: IStyle;
5
+ /**
6
+ * Accessible label announced by screen readers for the conversation divider element.
7
+ * If not supplied, a default provided in defaultPersistentChatHistoryProps will be used.
8
+ */
9
+ dividerActivityAriaLabel?: string;
10
+ bannerStyle?: IStyle;
11
+ }
@@ -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
- constructor();
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
  /**
@@ -0,0 +1,7 @@
1
+ declare const botActivity: {
2
+ from: {
3
+ role: string;
4
+ };
5
+ type: string;
6
+ };
7
+ export default botActivity;
@@ -0,0 +1,10 @@
1
+ declare const conversationDividerActivity: {
2
+ channelData: {
3
+ tags: string[];
4
+ };
5
+ from: {
6
+ role: string;
7
+ };
8
+ type: string;
9
+ };
10
+ export default conversationDividerActivity;
@@ -0,0 +1,2 @@
1
+ declare const convertPersistentChatHistoryMessageToActivity: (message: any) => any;
2
+ export default convertPersistentChatHistoryMessageToActivity;
@@ -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;
@@ -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
+ }
@@ -0,0 +1,15 @@
1
+ export interface ExtendedChatConfig {
2
+ LcwFcbConfiguration?: LcwFcbConfiguration;
3
+ LiveChatConfigAuthSettings?: LiveChatConfigAuthSettings;
4
+ LiveWSAndLiveChatEngJoin?: {
5
+ msdyn_conversationmode?: string;
6
+ msdyn_enablepersistentchatpreviousconversations?: string;
7
+ };
8
+ }
9
+ interface LcwFcbConfiguration {
10
+ lcwPersistentChatHistoryEnabled?: boolean;
11
+ }
12
+ interface LiveChatConfigAuthSettings {
13
+ msdyn_javascriptclientfunction?: string;
14
+ }
15
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Component to handle persistent chat history events.
3
+ * Uses WebChatStoreLoader instead of hooks to avoid context issues.
4
+ */
5
+ declare const WebChatEventSubscribers: () => null;
6
+ export default WebChatEventSubscribers;
@@ -0,0 +1,3 @@
1
+ export declare const LazyLoadActivityConstants: {
2
+ SCROLL_ID: string;
3
+ };
@@ -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;