@microsoft/omnichannel-chat-widget 0.1.0-main.a2e5071 → 0.1.0-main.a3902df
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/assets/Icons.js +4 -2
- package/lib/cjs/common/Constants.js +7 -3
- package/lib/cjs/common/KeyCodes.js +3 -1
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +3 -1
- package/lib/cjs/common/storage/default/defaultCacheManager.js +5 -3
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/cjs/common/telemetry/TelemetryConstants.js +4 -0
- package/lib/cjs/common/telemetry/TelemetryHelper.js +5 -2
- package/lib/cjs/common/telemetry/TelemetryManager.js +3 -1
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +1 -1
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +1 -1
- package/lib/cjs/components/headerstateful/HeaderStateful.js +6 -4
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +3 -1
- package/lib/cjs/components/livechatwidget/common/Deferred.js +3 -1
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +64 -13
- package/lib/cjs/components/livechatwidget/common/endChat.js +20 -2
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +13 -19
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +4 -7
- package/lib/cjs/components/livechatwidget/common/startChat.js +79 -19
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +38 -37
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +15 -2
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +57 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +5 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -14
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +29 -28
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +5 -2
- package/lib/cjs/contexts/createReducer.js +8 -0
- package/lib/cjs/plugins/newMessageEventHandler.js +4 -0
- package/lib/esm/assets/Icons.js +2 -1
- package/lib/esm/common/Constants.js +7 -3
- package/lib/esm/common/KeyCodes.js +3 -1
- package/lib/esm/common/contextDataStore/DataStoreManager.js +3 -1
- package/lib/esm/common/storage/default/defaultCacheManager.js +5 -3
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/esm/common/telemetry/TelemetryConstants.js +4 -0
- package/lib/esm/common/telemetry/TelemetryHelper.js +5 -2
- package/lib/esm/common/telemetry/TelemetryManager.js +3 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +1 -1
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +1 -1
- package/lib/esm/components/headerstateful/HeaderStateful.js +6 -4
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +3 -1
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -1
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +3 -1
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +3 -1
- package/lib/esm/components/livechatwidget/common/Deferred.js +3 -1
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +64 -13
- package/lib/esm/components/livechatwidget/common/endChat.js +20 -2
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +13 -19
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +5 -7
- package/lib/esm/components/livechatwidget/common/startChat.js +79 -19
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +39 -38
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +15 -2
- package/lib/esm/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +50 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
- package/lib/esm/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +5 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +29 -28
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +5 -2
- package/lib/esm/contexts/createReducer.js +8 -0
- package/lib/esm/plugins/newMessageEventHandler.js +4 -0
- package/lib/types/assets/Icons.d.ts +1 -0
- package/lib/types/common/Constants.d.ts +2 -0
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +1 -1
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +1 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +5 -1
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +2 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +4 -0
- package/lib/types/components/livechatwidget/common/startChat.d.ts +3 -3
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +2 -0
- package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +29 -28
- package/package.json +3 -3
package/lib/cjs/assets/Icons.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WordIcon = exports.VisioIcon = exports.VideoIcon = exports.PowerpointIcon = exports.PDFIcon = exports.OneNoteIcon = exports.ImageIcon = exports.ExcelIcon = exports.BlankIcon = exports.AudioIcon = exports.ArchiveIcon = void 0;
|
|
6
|
+
exports.WordIcon = exports.VisioIcon = exports.VideoIcon = exports.PowerpointIcon = exports.PDFIcon = exports.OneNoteIcon = exports.ImageIcon = exports.ExcelIcon = exports.BlankIcon = exports.AudioIcon = exports.ArchiveIcon = exports.AlertIcon = void 0;
|
|
7
7
|
const ArchiveIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDQ4IDIwNDgiIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiPg0KPHBhdGggZD0iTTE3OTIgMHEyNyAwIDUwIDEwdDQwIDI3IDI4IDQxIDEwIDUwdjQ4MHEwIDQ1LTkgNzd0LTI0IDU4LTMxIDQ2LTMxIDQwLTIzIDQ0LTEwIDU1djk5MnEwIDI3LTEwIDUwdC0yNyA0MC00MSAyOC01MCAxMEgyNTZWMGgxNTM2ek02NDAgMTI4djM4NGgyNTZWMTI4SDY0MHptMTAyNCA4MDBxMC0zMS05LTU0dC0yNC00NC0zMS00MS0zMS00NS0yMy01OC0xMC03OFYxMjhoLTUxMnY1MTJINzY4djEyOEg2NDBWNjQwSDUxMlYxMjhIMzg0djE3OTJoMzg0di0xMjhoMTI4djEyOGg3NjhWOTI4em0xMjgtODAwaC0xMjh2NDgwcTAgMjQgNCA0MnQxMyAzMyAyMCAyOSAyNyAzMnExNS0xNyAyNi0zMXQyMC0zMCAxMy0zMyA1LTQyVjEyOHpNNjQwIDg5NmgxMjh2MTI4SDY0MFY4OTZ6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTEyOCAyNTZ2MTI4SDY0MHYtMTI4aDEyOHptMC03NjhWNzY4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4eiIgLz4NCjwvc3ZnPg==";
|
|
8
8
|
exports.ArchiveIcon = ArchiveIcon;
|
|
9
9
|
const AudioIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0xNzkyIDE0MDhxMCA2Mi0yOSAxMDl0LTc2IDgwLTEwNCA1MC0xMTEgMTdxLTU0IDAtMTExLTE3dC0xMDMtNDktNzYtODAtMzAtMTEwcTAtNjEgMjktMTA5dDc2LTgwIDEwNC01MCAxMTEtMTdxNTEgMCAxMDAgMTJ0OTIgMzlWMjI2TDc2OCA0NTB2MTIxNHEwIDYyLTI5IDEwOXQtNzYgODAtMTA0IDUwLTExMSAxN3EtNTQgMC0xMTEtMTd0LTEwMy00OS03Ni04MC0zMC0xMTBxMC02MSAyOS0xMDl0NzYtODAgMTA0LTUwIDExMS0xN3E1MSAwIDEwMCAxMnQ5MiAzOVYzNTBMMTc5MiA2MnYxMzQ2eiIgLz4NCjwvc3ZnPg==";
|
|
@@ -25,4 +25,6 @@ exports.VideoIcon = VideoIcon;
|
|
|
25
25
|
const VisioIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0yMDQ4IDQ3NXYxNDQ1cTAgMjctMTAgNTB0LTI3IDQwLTQxIDI4LTUwIDEwSDY0MHEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTB2LTI1NkgxMTVxLTI0IDAtNDQtOXQtMzctMjUtMjUtMzYtOS00NVY2MjdxMC0yNCA5LTQ0dDI1LTM3IDM2LTI1IDQ1LTloMzk3VjEyOHEwLTI3IDEwLTUwdDI3LTQwIDQxLTI4IDUwLTEwaDkzM3EyNiAwIDQ5IDl0NDIgMjhsMzQ3IDM0N3ExOCAxOCAyNyA0MXQxMCA1MHptLTM4NC0yNTZ2MTY1aDE2NWwtMTY1LTE2NXpNNDkzIDE0MjRoMTYzbDI1NS02NzJINzQ1bC0xNDcgNDI3cS01IDE2LTEwIDMxdC0xMSAzMXEtNDEtMTIzLTgyLTI0NHQtODQtMjQ1SDI0MWwyNDggNjYyIDQgMTB6bTE0NyA0OTZoMTI4MFY1MTJoLTI1NnEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTBWMTI4SDY0MHYzODRoMzk3cTI0IDAgNDQgOXQzNyAyNSAyNSAzNiA5IDQ1djkyMnEwIDI0LTkgNDR0LTI1IDM3LTM2IDI1LTQ1IDlINjQwdjI1NnptOTYwLTEyODBsMTkyIDE5Mi0xMjggMTI4djQ0OGgtMjU2djEyOGgtMTI4di0zODRoMTI4djEyOGgxMjhWOTYwbC0xMjgtMTI4IDE5Mi0xOTJ6IiAvPg0KPC9zdmc+";
|
|
26
26
|
exports.VisioIcon = VisioIcon;
|
|
27
27
|
const WordIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0yMDQ4IDQ3NXYxNDQ1cTAgMjctMTAgNTB0LTI3IDQwLTQxIDI4LTUwIDEwSDY0MHEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTB2LTI1NkgxMTVxLTI0IDAtNDQtOXQtMzctMjUtMjUtMzYtOS00NVY2MjdxMC0yNCA5LTQ0dDI1LTM3IDM2LTI1IDQ1LTloMzk3VjEyOHEwLTI3IDEwLTUwdDI3LTQwIDQxLTI4IDUwLTEwaDkzM3EyNiAwIDQ5IDl0NDIgMjhsMzQ3IDM0N3ExOCAxOCAyNyA0MXQxMCA1MHptLTM4NC0yNTZ2MTY1aDE2NWwtMTY1LTE2NXpNMzIwIDE0MjRoMTYxcTItOCA5LTQzdDE4LTgzIDIxLTEwMyAyMi0xMDEgMTYtNzYgOC0zMWw3IDMwcTcgMzAgMTcgNzd0MjMgMTAwIDIzIDEwMyAxOSA4NCAxMCA0M2gxNjBsMTQ4LTY3Mkg4MzRsLTgwIDQzOC0xMDAtNDM4SDUwMmwtOTYgNDQwLTg2LTQ0MEgxNzBsMTUwIDY3MnptMzIwIDQ5NmgxMjgwVjUxMmgtMjU2cS0yNyAwLTUwLTEwdC00MC0yNy0yOC00MS0xMC01MFYxMjhINjQwdjM4NGgzOTdxMjQgMCA0NCA5dDM3IDI1IDI1IDM2IDkgNDV2OTIycTAgMjQtOSA0NHQtMjUgMzctMzYgMjUtNDUgOUg2NDB2MjU2em02NDAtMTAyNFY3NjhoNTEydjEyOGgtNTEyem0wIDI1NnYtMTI4aDUxMnYxMjhoLTUxMnptMCAyNTZ2LTEyOGg1MTJ2MTI4aC01MTJ6IiAvPg0KPC9zdmc+";
|
|
28
|
-
exports.WordIcon = WordIcon;
|
|
28
|
+
exports.WordIcon = WordIcon;
|
|
29
|
+
const AlertIcon = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMC8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMtU1ZHLTIwMDEwOTA0L0RURC9zdmcxMC5kdGQnPjxzdmcgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHBhdGggZD0iTTEzLDE3aC0ydi0yaDJWMTd6IE0xMywxM2gtMlY3aDJWMTN6Ii8+PGc+PHBhdGggZD0iTTEyLDRjNC40LDAsOCwzLjYsOCw4cy0zLjYsOC04LDhzLTgtMy42LTgtOFM3LjYsNCwxMiw0IE0xMiwyQzYuNSwyLDIsNi41LDIsMTJjMCw1LjUsNC41LDEwLDEwLDEwczEwLTQuNSwxMC0xMCAgIEMyMiw2LjUsMTcuNSwyLDEyLDJMMTIsMnoiLz48L2c+PC9zdmc+";
|
|
30
|
+
exports.AlertIcon = AlertIcon;
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.Regex = exports.MimeTypes = exports.LocaleConstants = exports.LiveWorkItemState = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.E2VVOptions = exports.Constants = exports.ChatSDKError = exports.AriaTelemetryConstants = void 0;
|
|
7
7
|
var _class;
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
11
|
class Constants {}
|
|
10
12
|
exports.Constants = Constants;
|
|
11
13
|
_defineProperty(Constants, "magicCodeBroadcastChannel", "MagicCodeChannel");
|
|
@@ -49,8 +51,8 @@ _defineProperty(Constants, "acsChannel", "ACS_CHANNEL");
|
|
|
49
51
|
_defineProperty(Constants, "publicMessageTag", "public");
|
|
50
52
|
_defineProperty(Constants, "supportedAdaptiveCardContentTypes", ["application/vnd.microsoft.card.adaptive", "application/vnd.microsoft.card.audio", "application/vnd.microsoft.card.hero", "application/vnd.microsoft.card.receipt", "application/vnd.microsoft.card.thumbnail", "application/vnd.microsoft.card.signin", "application/vnd.microsoft.card.oauth"]);
|
|
51
53
|
_defineProperty(Constants, "maxUploadFileSize", "500000");
|
|
52
|
-
_defineProperty(Constants, "imageRegex", /(\.)(jpeg|jpg|jiff|png|gif|bmp)$/i);
|
|
53
|
-
_defineProperty(Constants, "audioMediaRegex", /(\.)(aac|aiff|alac|flac|mp2|mp3|pcm|wav|wma)$/i);
|
|
54
|
+
_defineProperty(Constants, "imageRegex", /(\.)(jpeg|jpg|jiff|png|gif|bmp|webp)$/i);
|
|
55
|
+
_defineProperty(Constants, "audioMediaRegex", /(\.)(aac|aiff|alac|amr|flac|mp2|mp3|pcm|wav|wma)$/i);
|
|
54
56
|
_defineProperty(Constants, "videoMediaRegex", /(\.)(avchd|avi|flv|mpe|mpeg|mpg|mpv|mp4|m4p|m4v|mov|qt|swf|webm|wmv)$/i);
|
|
55
57
|
_defineProperty(Constants, "chromeSupportedInlineMediaRegex", /(\.)(aac|mp3|wav|mp4)$/i);
|
|
56
58
|
_defineProperty(Constants, "firefoxSupportedInlineMediaRegex", /(\.)(aac|flac|mp3|wav|mp4|mov)$/i);
|
|
@@ -87,6 +89,7 @@ _defineProperty(Constants, "internetConnectionTestUrlText", "Omnichannel Connect
|
|
|
87
89
|
_defineProperty(Constants, "ChatWidgetStateChangedPrefix", "ChatWidgetStateChanged");
|
|
88
90
|
_defineProperty(Constants, "PostChatLoadingDurationInMs", 2000);
|
|
89
91
|
_defineProperty(Constants, "BrowserUnloadConfirmationMessage", "Do you want to leave chat?");
|
|
92
|
+
_defineProperty(Constants, "CacheTtlInMinutes", 15);
|
|
90
93
|
const Regex = (_class = class Regex {}, _defineProperty(_class, "EmailRegex", "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"), _class);
|
|
91
94
|
exports.Regex = Regex;
|
|
92
95
|
class HtmlIdNames {}
|
|
@@ -132,6 +135,7 @@ _defineProperty(HtmlAttributeNames, "noreferrerTag", "noreferrer");
|
|
|
132
135
|
_defineProperty(HtmlAttributeNames, "adaptiveCardClassName", "ac-adaptiveCard");
|
|
133
136
|
_defineProperty(HtmlAttributeNames, "adaptiveCardTextBlockClassName", "ac-textBlock");
|
|
134
137
|
_defineProperty(HtmlAttributeNames, "adaptiveCardToggleInputClassName", "ac-toggleInput");
|
|
138
|
+
_defineProperty(HtmlAttributeNames, "adaptiveCardActionSetClassName", "ac-actionSet");
|
|
135
139
|
class WebChatMiddlewareConstants {}
|
|
136
140
|
exports.WebChatMiddlewareConstants = WebChatMiddlewareConstants;
|
|
137
141
|
_defineProperty(WebChatMiddlewareConstants, "nextVisibleActivity", "nextVisibleActivity");
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.KeyCodes = void 0;
|
|
7
7
|
var _class;
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
11
|
const KeyCodes = (_class = class KeyCodes {}, _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "TAB", "Tab"), _class);
|
|
10
12
|
exports.KeyCodes = KeyCodes;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DataStoreManager = void 0;
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
10
|
class DataStoreManager {}
|
|
9
11
|
exports.DataStoreManager = DataStoreManager;
|
|
10
12
|
_defineProperty(DataStoreManager, "clientDataStore", void 0);
|
|
@@ -7,15 +7,17 @@ exports.registerBroadcastServiceForLocalStorage = exports.defaultCacheManager =
|
|
|
7
7
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
8
8
|
var _utils = require("../../utils");
|
|
9
9
|
var _defaultClientDataStoreProvider = require("./defaultClientDataStoreProvider");
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
13
|
class defaultCacheManager {}
|
|
12
14
|
exports.defaultCacheManager = defaultCacheManager;
|
|
13
15
|
_defineProperty(defaultCacheManager, "InternalCache", {});
|
|
14
|
-
const registerBroadcastServiceForLocalStorage = (orgid, widgetId, widgetInstanceId) => {
|
|
16
|
+
const registerBroadcastServiceForLocalStorage = (orgid, widgetId, widgetInstanceId, ttlInMins) => {
|
|
15
17
|
const widgetCacheId = (0, _utils.getWidgetCacheId)(orgid, widgetId, widgetInstanceId);
|
|
16
18
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(widgetCacheId).subscribe(msg => {
|
|
17
19
|
try {
|
|
18
|
-
(0, _defaultClientDataStoreProvider.defaultClientDataStoreProvider)().setData(widgetCacheId, JSON.stringify(msg.payload), "localStorage");
|
|
20
|
+
(0, _defaultClientDataStoreProvider.defaultClientDataStoreProvider)(ttlInMins).setData(widgetCacheId, JSON.stringify(msg.payload), "localStorage");
|
|
19
21
|
} catch (error) {
|
|
20
22
|
console.error("Error in setting data to localstorage", error);
|
|
21
23
|
}
|
|
@@ -4,21 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultClientDataStoreProvider = void 0;
|
|
7
|
-
var _defaultInMemoryDataStore = require("./defaultInMemoryDataStore");
|
|
8
|
-
var _TelemetryHelper = require("../../telemetry/TelemetryHelper");
|
|
9
7
|
var _TelemetryConstants = require("../../telemetry/TelemetryConstants");
|
|
10
|
-
|
|
8
|
+
var _TelemetryHelper = require("../../telemetry/TelemetryHelper");
|
|
9
|
+
var _defaultInMemoryDataStore = require("./defaultInMemoryDataStore");
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11
|
+
|
|
12
|
+
const defaultClientDataStoreProvider = function () {
|
|
13
|
+
let cacheTtlinMins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
14
|
+
let ttlInMs = 0;
|
|
11
15
|
const isCookieAllowed = () => {
|
|
12
16
|
try {
|
|
13
17
|
localStorage;
|
|
14
18
|
sessionStorage;
|
|
15
19
|
return true;
|
|
16
20
|
} catch (error) {
|
|
17
|
-
|
|
21
|
+
if (!window.TPCWarningShown) {
|
|
22
|
+
console.warn("Third party cookies blocked.");
|
|
23
|
+
window.TPCWarningShown = true;
|
|
24
|
+
}
|
|
18
25
|
return false;
|
|
19
26
|
}
|
|
20
27
|
};
|
|
21
|
-
|
|
28
|
+
if (ttlInMs == 0) {
|
|
29
|
+
ttlInMs = cacheTtlinMins * 60 * 1000;
|
|
30
|
+
}
|
|
22
31
|
const dataStoreProvider = {
|
|
23
32
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
33
|
setData: (key, data, type) => {
|
|
@@ -28,7 +37,7 @@ const defaultClientDataStoreProvider = () => {
|
|
|
28
37
|
const now = new Date();
|
|
29
38
|
const item = {
|
|
30
39
|
data: data,
|
|
31
|
-
expiry: now.getTime() +
|
|
40
|
+
expiry: now.getTime() + ttlInMs
|
|
32
41
|
};
|
|
33
42
|
const strItem = JSON.stringify(item);
|
|
34
43
|
if (type === "localStorage") {
|
|
@@ -54,6 +54,8 @@ exports.BroadcastEvent = BroadcastEvent;
|
|
|
54
54
|
BroadcastEvent["InitiateEndChatOnBrowserUnload"] = "InitiateEndChatOnBrowserUnload";
|
|
55
55
|
BroadcastEvent["ClosePopoutWindow"] = "ClosePopoutWindow";
|
|
56
56
|
BroadcastEvent["RaiseErrorEvent"] = "RaiseErrorEvent";
|
|
57
|
+
BroadcastEvent["NetworkDisconnected"] = "NetworkDisconnected";
|
|
58
|
+
BroadcastEvent["NetworkReconnected"] = "NetworkReconnected";
|
|
57
59
|
})(BroadcastEvent || (exports.BroadcastEvent = BroadcastEvent = {}));
|
|
58
60
|
let TelemetryEvent;
|
|
59
61
|
exports.TelemetryEvent = TelemetryEvent;
|
|
@@ -115,6 +117,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
115
117
|
TelemetryEvent["DownloadTranscriptResponseNullOrUndefined"] = "DownloadTranscriptResponseNullOrUndefined";
|
|
116
118
|
TelemetryEvent["EmailTranscriptSent"] = "EmailTranscriptSent";
|
|
117
119
|
TelemetryEvent["EmailTranscriptFailed"] = "EmailTranscriptFailed";
|
|
120
|
+
TelemetryEvent["ErrorUIPaneLoaded"] = "ErrorUIPaneLoaded";
|
|
118
121
|
TelemetryEvent["DownloadTranscriptFailed"] = "DownloadTranscriptFailed";
|
|
119
122
|
TelemetryEvent["StartChatFailed"] = "StartChatFailed";
|
|
120
123
|
TelemetryEvent["IC3ThreadUpdateEventReceived"] = "IC3ThreadUpdateEventReceived";
|
|
@@ -170,6 +173,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
170
173
|
TelemetryEvent["ReconnectChatMinimize"] = "ReconnectChatMinimize";
|
|
171
174
|
TelemetryEvent["MessageSent"] = "MessageSent";
|
|
172
175
|
TelemetryEvent["MessageReceived"] = "MessageReceived";
|
|
176
|
+
TelemetryEvent["SystemMessageReceived"] = "SystemMessageReceived";
|
|
173
177
|
TelemetryEvent["CustomContextReceived"] = "CustomContextReceived";
|
|
174
178
|
TelemetryEvent["NetworkDisconnected"] = "NetworkDisconnected";
|
|
175
179
|
TelemetryEvent["NetworkReconnected"] = "NetworkReconnected";
|
|
@@ -8,7 +8,9 @@ var _TelemetryConstants = require("./TelemetryConstants");
|
|
|
8
8
|
var _utils = require("../utils");
|
|
9
9
|
var _TelemetryManager = require("./TelemetryManager");
|
|
10
10
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
11
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
14
|
class TelemetryHelper {
|
|
13
15
|
static buildTelemetryEvent(level, input) {
|
|
14
16
|
switch (input.scenarioType) {
|
|
@@ -60,6 +62,7 @@ class TelemetryHelper {
|
|
|
60
62
|
event.ElapsedTimeInMilliseconds = payload.ElapsedTimeInMilliseconds;
|
|
61
63
|
event.ExceptionDetails = JSON.stringify(payload.ExceptionDetails);
|
|
62
64
|
event.Description = payload.Description;
|
|
65
|
+
event.CustomProperties = JSON.stringify(payload.CustomProperties);
|
|
63
66
|
});
|
|
64
67
|
}
|
|
65
68
|
static conformToWebChatContract(level, input) {
|
|
@@ -165,7 +168,7 @@ class TelemetryHelper {
|
|
|
165
168
|
telemetryDataLocal.widgetId = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.appId;
|
|
166
169
|
telemetryDataLocal.orgId = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.orgId;
|
|
167
170
|
telemetryDataLocal.orgUrl = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.orgUrl;
|
|
168
|
-
telemetryDataLocal.lcwRuntimeId = (0, _utils.newGuid)();
|
|
171
|
+
telemetryDataLocal.lcwRuntimeId = telemetryConfig.LCWRuntimeId ?? (0, _utils.newGuid)();
|
|
169
172
|
return telemetryDataLocal;
|
|
170
173
|
}
|
|
171
174
|
static addSessionDataToTelemetry(chatSession, telemetryInternalData) {
|
|
@@ -10,7 +10,9 @@ var _ariaTelemetryLogger = require("./loggers/ariaTelemetryLogger");
|
|
|
10
10
|
var _consoleLogger = require("./loggers/consoleLogger");
|
|
11
11
|
var _defaultAriaConfig = require("./defaultConfigs/defaultAriaConfig");
|
|
12
12
|
var _TelemetryHelper = require("./TelemetryHelper");
|
|
13
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
16
|
class TelemetryTimers {}
|
|
15
17
|
exports.TelemetryTimers = TelemetryTimers;
|
|
16
18
|
_defineProperty(TelemetryTimers, "LcwLoadToChatButtonTimer", void 0);
|
|
@@ -90,7 +90,7 @@ const ConfirmationPaneStateful = props => {
|
|
|
90
90
|
Event: _TelemetryConstants.TelemetryEvent.ConfirmationPaneLoaded
|
|
91
91
|
});
|
|
92
92
|
}, []);
|
|
93
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_DimLayer.DimLayer, {
|
|
94
94
|
brightness: (controlProps === null || controlProps === void 0 ? void 0 : controlProps.brightnessValueOnDim) ?? "0.2"
|
|
95
95
|
}), /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.ConfirmationPane, {
|
|
96
96
|
componentOverrides: props === null || props === void 0 ? void 0 : props.componentOverrides,
|
|
@@ -97,7 +97,7 @@ const EmailTranscriptPaneStateful = props => {
|
|
|
97
97
|
Event: _TelemetryConstants.TelemetryEvent.EmailTranscriptLoaded
|
|
98
98
|
});
|
|
99
99
|
}, [initialEmail]);
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_DimLayer.DimLayer, {
|
|
101
101
|
brightness: (controlProps === null || controlProps === void 0 ? void 0 : controlProps.brightnessValueOnDim) ?? "0.2"
|
|
102
102
|
}), /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.InputValidationPane, {
|
|
103
103
|
componentOverrides: props.componentOverrides,
|
|
@@ -30,6 +30,7 @@ const HeaderStateful = props => {
|
|
|
30
30
|
const [outOfOperatingHours, setOutOfOperatingHours] = (0, _react.useState)(((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.OutOfOperatingHours) === "True");
|
|
31
31
|
const outOfOfficeStyleProps = Object.assign({}, _defaultOutOfOfficeHeaderStyleProps.defaultOutOfOfficeHeaderStyleProps, outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.styleProps);
|
|
32
32
|
const conversationState = (0, _react.useRef)(state.appStates.conversationState);
|
|
33
|
+
const conversationEndedByAgent = (0, _react.useRef)(state.appStates.conversationEndedByAgent);
|
|
33
34
|
const controlProps = {
|
|
34
35
|
id: "oc-lcw-header",
|
|
35
36
|
dir: state.domainStates.globalDir,
|
|
@@ -49,7 +50,7 @@ const HeaderStateful = props => {
|
|
|
49
50
|
Event: _TelemetryConstants.TelemetryEvent.HeaderCloseButtonClicked,
|
|
50
51
|
Description: "Header Close button clicked."
|
|
51
52
|
});
|
|
52
|
-
if (conversationState.current === _ConversationState.ConversationState.Active) {
|
|
53
|
+
if (conversationState.current === _ConversationState.ConversationState.Active || conversationEndedByAgent.current) {
|
|
53
54
|
dispatch({
|
|
54
55
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
|
|
55
56
|
payload: true
|
|
@@ -69,9 +70,9 @@ const HeaderStateful = props => {
|
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
...(headerProps === null || headerProps === void 0 ? void 0 : headerProps.controlProps),
|
|
72
|
-
hideTitle: state.appStates.conversationState === _ConversationState.ConversationState.Loading || state.appStates.conversationState === _ConversationState.ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP = headerProps.controlProps) === null || _headerProps$controlP === void 0 ? void 0 : _headerProps$controlP.hideTitle),
|
|
73
|
-
hideIcon: state.appStates.conversationState === _ConversationState.ConversationState.Loading || state.appStates.conversationState === _ConversationState.ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP2 = headerProps.controlProps) === null || _headerProps$controlP2 === void 0 ? void 0 : _headerProps$controlP2.hideIcon),
|
|
74
|
-
hideCloseButton: state.appStates.conversationState === _ConversationState.ConversationState.Loading || state.appStates.conversationState === _ConversationState.ConversationState.Prechat || state.appStates.conversationState === _ConversationState.ConversationState.ReconnectChat || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP3 = headerProps.controlProps) === null || _headerProps$controlP3 === void 0 ? void 0 : _headerProps$controlP3.hideCloseButton)
|
|
73
|
+
hideTitle: state.appStates.conversationState === _ConversationState.ConversationState.Loading && !state.appStates.isStartChatFailing || state.appStates.conversationState === _ConversationState.ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP = headerProps.controlProps) === null || _headerProps$controlP === void 0 ? void 0 : _headerProps$controlP.hideTitle),
|
|
74
|
+
hideIcon: state.appStates.conversationState === _ConversationState.ConversationState.Loading && !state.appStates.isStartChatFailing || state.appStates.conversationState === _ConversationState.ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP2 = headerProps.controlProps) === null || _headerProps$controlP2 === void 0 ? void 0 : _headerProps$controlP2.hideIcon),
|
|
75
|
+
hideCloseButton: state.appStates.conversationState === _ConversationState.ConversationState.Loading && !state.appStates.isStartChatFailing || state.appStates.conversationState === _ConversationState.ConversationState.Prechat || state.appStates.conversationState === _ConversationState.ConversationState.ReconnectChat || (headerProps === null || headerProps === void 0 ? void 0 : (_headerProps$controlP3 = headerProps.controlProps) === null || _headerProps$controlP3 === void 0 ? void 0 : _headerProps$controlP3.hideCloseButton)
|
|
75
76
|
};
|
|
76
77
|
const outOfOfficeControlProps = {
|
|
77
78
|
id: "oc-lcw-header",
|
|
@@ -95,6 +96,7 @@ const HeaderStateful = props => {
|
|
|
95
96
|
if (state.appStates.conversationState) {
|
|
96
97
|
conversationState.current = state.appStates.conversationState;
|
|
97
98
|
}
|
|
99
|
+
conversationEndedByAgent.current = state.appStates.conversationEndedByAgent;
|
|
98
100
|
}, [state.appStates]);
|
|
99
101
|
return /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.Header, {
|
|
100
102
|
componentOverrides: headerProps === null || headerProps === void 0 ? void 0 : headerProps.componentOverrides,
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ActivityStreamHandler = void 0;
|
|
7
7
|
var _Deferred = require("./Deferred");
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
11
|
class ActivityStreamHandler {
|
|
10
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
13
|
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DefaultActivitySubscriber = void 0;
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
10
|
class DefaultActivitySubscriber {
|
|
9
11
|
constructor() {
|
|
10
12
|
_defineProperty(this, "observer", void 0);
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js
CHANGED
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PauseActivitySubscriber = void 0;
|
|
7
7
|
var _ActivityStreamHandler = require("../ActivityStreamHandler");
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
11
|
class PauseActivitySubscriber {
|
|
10
12
|
constructor() {
|
|
11
13
|
_defineProperty(this, "observer", void 0);
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ChatAdapterShim = void 0;
|
|
7
7
|
var _DefaultActivitySubscriber = require("./ActivitySubscriber/DefaultActivitySubscriber");
|
|
8
8
|
var _shareObservable = require("./shareObservable");
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
12
|
class ChatAdapterShim {
|
|
11
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
14
|
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Deferred = void 0;
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
10
|
class Deferred {
|
|
9
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
12
|
|
|
@@ -13,9 +13,9 @@ var _activityMiddleware = require("../../../webchatcontainerstateful/webchatcont
|
|
|
13
13
|
var _attachmentMiddleware = _interopRequireDefault(require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware"));
|
|
14
14
|
var _avatarMiddleware = require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware");
|
|
15
15
|
var _createMarkdown = require("../createMarkdown");
|
|
16
|
+
var _WebChatLogger = require("../../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger");
|
|
16
17
|
var _groupActivitiesMiddleware = require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware");
|
|
17
18
|
var _typingIndicatorMiddleware = require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware");
|
|
18
|
-
var _WebChatLogger = require("../../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger");
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
/* eslint-disable @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any */
|
|
21
21
|
|
|
@@ -413,6 +413,7 @@ const dummyDefaultProps = {
|
|
|
413
413
|
width: "90px",
|
|
414
414
|
cursor: "pointer",
|
|
415
415
|
overflow: "hidden",
|
|
416
|
+
padding: "0px",
|
|
416
417
|
whiteSpace: "nowrap"
|
|
417
418
|
},
|
|
418
419
|
subtitleStyleProps: {
|
|
@@ -420,12 +421,14 @@ const dummyDefaultProps = {
|
|
|
420
421
|
fontWeight: "200",
|
|
421
422
|
color: "#666",
|
|
422
423
|
overflow: "hidden",
|
|
424
|
+
padding: "0px",
|
|
423
425
|
fontFamily: "'Segoe UI',Arial,sans-serif",
|
|
424
426
|
display: "block",
|
|
425
427
|
alignItems: "center",
|
|
426
428
|
margin: "0px 14px 0px 14px",
|
|
427
429
|
textOverflow: "ellipsis !important",
|
|
428
|
-
width: "
|
|
430
|
+
width: "90px",
|
|
431
|
+
whiteSpace: "nowrap",
|
|
429
432
|
cursor: "pointer"
|
|
430
433
|
},
|
|
431
434
|
classNames: {
|
|
@@ -475,7 +478,6 @@ const dummyDefaultProps = {
|
|
|
475
478
|
cancelButtonText: "Cancel",
|
|
476
479
|
cancelButtonAriaLabel: "Cancel. Return to Chat",
|
|
477
480
|
brightnessValueOnDim: "0.2",
|
|
478
|
-
disableDimLayer: false,
|
|
479
481
|
onConfirm: () => {},
|
|
480
482
|
// Detailed implementation omitted
|
|
481
483
|
onCancel: () => {} // Detailed implementation omitted
|
|
@@ -483,20 +485,23 @@ const dummyDefaultProps = {
|
|
|
483
485
|
|
|
484
486
|
styleProps: {
|
|
485
487
|
generalStyleProps: {
|
|
488
|
+
display: "flex",
|
|
489
|
+
minHeight: "160px",
|
|
490
|
+
maxHeight: "300px",
|
|
491
|
+
boxSizing: "border-box",
|
|
486
492
|
backgroundColor: "#FFFFFF",
|
|
487
493
|
borderRadius: "2px",
|
|
488
494
|
color: "black",
|
|
489
495
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
490
496
|
fontSize: "14px",
|
|
491
|
-
height: "160px",
|
|
492
497
|
padding: "10px 20px",
|
|
493
|
-
width: "262px",
|
|
494
498
|
position: "absolute",
|
|
495
499
|
justifyContent: "center",
|
|
496
500
|
alignItems: "center",
|
|
497
|
-
display: "flex",
|
|
498
501
|
flexFlow: "column",
|
|
499
|
-
zIndex: "9999"
|
|
502
|
+
zIndex: "9999",
|
|
503
|
+
left: "26px",
|
|
504
|
+
right: "26px"
|
|
500
505
|
},
|
|
501
506
|
titleStyleProps: {
|
|
502
507
|
color: "#323130",
|
|
@@ -518,10 +523,14 @@ const dummyDefaultProps = {
|
|
|
518
523
|
},
|
|
519
524
|
buttonGroupStyleProps: {
|
|
520
525
|
display: "flex",
|
|
526
|
+
width: "auto",
|
|
527
|
+
height: "auto",
|
|
528
|
+
boxSizing: "border-box",
|
|
521
529
|
flexFlow: "row",
|
|
522
530
|
justifyContent: "center",
|
|
523
531
|
alignItems: "center",
|
|
524
|
-
gap: "10px"
|
|
532
|
+
gap: "10px",
|
|
533
|
+
marginBottom: "10px"
|
|
525
534
|
},
|
|
526
535
|
confirmButtonStyleProps: {
|
|
527
536
|
backgroundColor: "rgba(9,72,159,1)",
|
|
@@ -576,6 +585,7 @@ const dummyDefaultProps = {
|
|
|
576
585
|
hideCallingContainer: false,
|
|
577
586
|
hideChatButton: false,
|
|
578
587
|
hideConfirmationPane: false,
|
|
588
|
+
hideErrorUIPane: false,
|
|
579
589
|
hideFooter: false,
|
|
580
590
|
hideHeader: false,
|
|
581
591
|
hideLoadingPane: false,
|
|
@@ -626,7 +636,6 @@ const dummyDefaultProps = {
|
|
|
626
636
|
cancelButtonText: "Cancel",
|
|
627
637
|
cancelButtonAriaLabel: "Cancel",
|
|
628
638
|
brightnessValueOnDim: "0.2",
|
|
629
|
-
disableDimLayer: false,
|
|
630
639
|
onSend: undefined,
|
|
631
640
|
onCancel: undefined,
|
|
632
641
|
checkInput: undefined
|
|
@@ -1116,7 +1125,8 @@ const dummyDefaultProps = {
|
|
|
1116
1125
|
dir: "auto",
|
|
1117
1126
|
hideOOOHPane: false,
|
|
1118
1127
|
hideTitle: false,
|
|
1119
|
-
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."
|
|
1128
|
+
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open. Please see link https://microsoft.com",
|
|
1129
|
+
openLinkInNewTab: true
|
|
1120
1130
|
},
|
|
1121
1131
|
styleProps: {
|
|
1122
1132
|
generalStyleProps: {
|
|
@@ -1159,7 +1169,7 @@ const dummyDefaultProps = {
|
|
|
1159
1169
|
subtitleText: "Please take a moment to give us feedback about your chat experience. We are loading the survey for you now."
|
|
1160
1170
|
},
|
|
1161
1171
|
styleProps: {
|
|
1162
|
-
// ...[Existing
|
|
1172
|
+
// ...[Existing loading pane style props]
|
|
1163
1173
|
generalStyleProps: {
|
|
1164
1174
|
position: "initial",
|
|
1165
1175
|
width: "100%",
|
|
@@ -1190,6 +1200,47 @@ const dummyDefaultProps = {
|
|
|
1190
1200
|
},
|
|
1191
1201
|
isCustomerVoiceSurveyCompact: undefined
|
|
1192
1202
|
},
|
|
1203
|
+
preChatSurveyPaneProps: {
|
|
1204
|
+
controlProps: {
|
|
1205
|
+
id: "oc-lcw-prechatsurveypane-default",
|
|
1206
|
+
dir: "auto",
|
|
1207
|
+
hidePreChatSurveyPane: false,
|
|
1208
|
+
adaptiveCardHostConfig: "{\"fontFamily\":\"Segoe UI, Helvetica Neue, sans-serif\",\"containerStyles\":{\"default\":{\"foregroundColors\":{\"default\":{\"default\":\"#000000\"}},\"backgroundColor\":\"#FFFFFF\"}},\"actions\":{\"actionsOrientation\":\"Vertical\",\"actionAlignment\":\"stretch\"}}",
|
|
1209
|
+
payload: "{\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"type\":\"AdaptiveCard\",\"version\":\"1.1\",\"body\":[{\"type\":\"TextBlock\",\"weight\":\"bolder\",\"text\":\"Please answer below questions.\"},{\"type\":\"Input.Text\",\"id\":\"1e5e4e7a-8f0b-ec11-b6e6-000d3a305d38\",\"label\":\"name pls?\",\"maxLength\":100,\"isRequired\":true,\"errorMessage\":\"Name is required\"},{\"type\":\"Input.Text\",\"id\":\"7f8f5d6d-995e-ec11-8f8f-000d3a31376e\",\"label\":\"multi\\nmulti\\nmulti\",\"style\":\"text\",\"isMultiline\":true,\"maxLength\":250},{\"type\":\"Input.ChoiceSet\",\"id\":\"e4bdf7cb-995e-ec11-8f8f-000d3a31376e\",\"label\":\"options\",\"isMultiSelect\":false,\"value\":\"1\",\"style\":\"compact\",\"choices\":[{\"title\":\"one\",\"value\":\"1\"},{\"title\":\"two\",\"value\":\"2\"},{\"title\":\"three\",\"value\":\"3\"}]},{\"type\":\"Input.Toggle\",\"id\":\"b26011d2-995e-ec11-8f8f-000d3a31376e\",\"title\":\"consent\",\"valueOn\":\"True\",\"valueOff\":\"False\",\"value\":\"false\"},{\"type\":\"TextBlock\",\"isSubtle\":true,\"text\":\"Fields marked with * are mandatory.\",\"wrap\":true}],\"actions\":[{\"type\":\"Action.Submit\",\"title\":\"Submit\",\"data\":{\"Type\":\"InputSubmit\"}}]}",
|
|
1210
|
+
onSubmit: function () {} // Detailed implementation omitted
|
|
1211
|
+
},
|
|
1212
|
+
|
|
1213
|
+
styleProps: {
|
|
1214
|
+
generalStyleProps: {
|
|
1215
|
+
borderStyle: "solid",
|
|
1216
|
+
borderRadius: "4px",
|
|
1217
|
+
borderWidth: "0px",
|
|
1218
|
+
backgroundColor: "#FFFFFF",
|
|
1219
|
+
borderColor: "#F1F1F1",
|
|
1220
|
+
overflowY: "auto",
|
|
1221
|
+
height: "inherit",
|
|
1222
|
+
width: "inherit"
|
|
1223
|
+
},
|
|
1224
|
+
customButtonStyleProps: {
|
|
1225
|
+
backgroundColor: "rgb(49, 95, 162)",
|
|
1226
|
+
color: "#FFFFFF",
|
|
1227
|
+
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
1228
|
+
fontSize: "15px",
|
|
1229
|
+
height: "48px"
|
|
1230
|
+
},
|
|
1231
|
+
adaptiveCardContainerStyleProps: {
|
|
1232
|
+
border: "1px solid #ECECEC",
|
|
1233
|
+
borderRadius: "4px",
|
|
1234
|
+
margin: "3%"
|
|
1235
|
+
},
|
|
1236
|
+
customTextInputStyleProps: {
|
|
1237
|
+
height: "20px"
|
|
1238
|
+
},
|
|
1239
|
+
customMultilineTextInputStyleProps: {
|
|
1240
|
+
height: "52px"
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1193
1244
|
proactiveChatPaneProps: {
|
|
1194
1245
|
componentOverrides: {
|
|
1195
1246
|
title: undefined,
|
|
@@ -1568,10 +1619,10 @@ const dummyDefaultProps = {
|
|
|
1568
1619
|
padding: "0px 10px 0 10px"
|
|
1569
1620
|
},
|
|
1570
1621
|
userMessageBoxStyles: {
|
|
1571
|
-
maxWidth: "
|
|
1622
|
+
maxWidth: "90%"
|
|
1572
1623
|
},
|
|
1573
1624
|
systemMessageBoxStyles: {
|
|
1574
|
-
maxWidth: "
|
|
1625
|
+
maxWidth: "90%"
|
|
1575
1626
|
},
|
|
1576
1627
|
typingIndicatorStyleProps: {
|
|
1577
1628
|
marginLeft: "10px",
|
|
@@ -53,7 +53,13 @@ const prepareEndChat = async (props, chatSDK, setAdapter, setWebChatStyles, disp
|
|
|
53
53
|
if (isPostChatEnabled === "true" && ((_conversationDetails = conversationDetails) === null || _conversationDetails === void 0 ? void 0 : _conversationDetails.canRenderPostChat) === _Constants.Constants.truePascal) {
|
|
54
54
|
const skipEndChatSDK = false;
|
|
55
55
|
const skipCloseChat = true;
|
|
56
|
+
const chatSession = await (chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.getCurrentLiveChatContext());
|
|
56
57
|
await endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat, false);
|
|
58
|
+
if (chatSession) {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
chatSDK.chatToken = chatSession.chatToken ?? {};
|
|
61
|
+
chatSDK.requestId = chatSession.requestId;
|
|
62
|
+
}
|
|
57
63
|
if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Embed) {
|
|
58
64
|
dispatch({
|
|
59
65
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
@@ -65,10 +71,22 @@ const prepareEndChat = async (props, chatSDK, setAdapter, setWebChatStyles, disp
|
|
|
65
71
|
};
|
|
66
72
|
_omnichannelChatComponents.BroadcastService.postMessage(loadPostChatEvent);
|
|
67
73
|
} else if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Link) {
|
|
74
|
+
var _props$webChatContain, _props$webChatContain2;
|
|
68
75
|
dispatch({
|
|
69
76
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
70
77
|
payload: _ConversationState.ConversationState.InActive
|
|
71
78
|
});
|
|
79
|
+
|
|
80
|
+
// Disable SendBox
|
|
81
|
+
if ((props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.renderingMiddlewareProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendboxOnConversationEnd) !== false) {
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
|
+
setWebChatStyles(styles => {
|
|
84
|
+
return {
|
|
85
|
+
...styles,
|
|
86
|
+
hideSendBox: true
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
72
90
|
}
|
|
73
91
|
return;
|
|
74
92
|
}
|
|
@@ -114,12 +132,12 @@ const endChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, a
|
|
|
114
132
|
});
|
|
115
133
|
if (!skipCloseChat) {
|
|
116
134
|
try {
|
|
117
|
-
var _props$
|
|
135
|
+
var _props$webChatContain3;
|
|
118
136
|
adapter === null || adapter === void 0 ? void 0 : adapter.end();
|
|
119
137
|
setAdapter(undefined);
|
|
120
138
|
setWebChatStyles({
|
|
121
139
|
..._defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.webChatStyles,
|
|
122
|
-
...((_props$
|
|
140
|
+
...((_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : _props$webChatContain3.webChatStyles)
|
|
123
141
|
});
|
|
124
142
|
_WebChatStoreLoader.WebChatStoreLoader.store = null;
|
|
125
143
|
dispatch({
|