@microsoft/omnichannel-chat-components 0.1.0-main.fc27009 → 1.0.1-main.118265f
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/common/Constants.js +26 -8
- package/lib/cjs/common/utils.js +21 -2
- package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +26 -23
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +20 -18
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +21 -8
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +22 -19
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +18 -16
- package/lib/cjs/components/chatbutton/ChatButton.js +28 -24
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +11 -5
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/cjs/components/common/commandbutton/CommandButton.js +37 -12
- package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +8 -7
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +9 -2
- package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/cjs/components/footer/Footer.js +12 -19
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -14
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +31 -14
- package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +4 -4
- package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +4 -4
- package/lib/cjs/components/header/Header.js +7 -5
- package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
- package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +9 -7
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +13 -11
- package/lib/cjs/components/header/subcomponents/MinimizeButton.js +4 -4
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
- package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/loadingpane/LoadingPane.js +3 -2
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
- package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +7 -2
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
- package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
- package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +25 -11
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +5 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
- package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
- package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
- package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/services/BroadcastService.js +36 -8
- package/lib/esm/common/Constants.js +18 -6
- package/lib/esm/common/utils.js +16 -0
- package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +8 -8
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +22 -9
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
- package/lib/esm/components/chatbutton/ChatButton.js +28 -24
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -5
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/esm/components/common/commandbutton/CommandButton.js +38 -13
- package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +9 -8
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +10 -3
- package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/esm/components/footer/Footer.js +11 -19
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -14
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +32 -15
- package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
- package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
- package/lib/esm/components/header/Header.js +6 -5
- package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
- package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +8 -7
- package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
- package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +12 -11
- package/lib/esm/components/header/subcomponents/MinimizeButton.js +5 -5
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
- package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/loadingpane/LoadingPane.js +3 -2
- package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
- package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
- package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
- package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +26 -12
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +3 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
- package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
- package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
- package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
- package/lib/esm/index.js +1 -0
- package/lib/esm/services/BroadcastService.js +34 -8
- package/lib/types/common/Constants.d.ts +151 -2
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
- package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
- package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
- package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
- package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
- package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
- package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +3 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
- package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/BroadcastService.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const presetThreePreChatSurveyPaneControlProps = {
|
|
2
|
-
id: "
|
|
2
|
+
id: "lcw-prechat-survey-pane-preset3",
|
|
3
3
|
dir: "auto",
|
|
4
4
|
hidePreChatSurveyPane: false,
|
|
5
5
|
adaptiveCardHostConfig: "{\"fontFamily\":\"Segoe UI, Helvetica Neue, sans-serif\",\"containerStyles\":{\"default\":{\"foregroundColors\":{\"default\":{\"default\":\"#C3F60F\"}},\"backgroundColor\":\"#6A1E7A\"}},\"actions\":{\"actionsOrientation\":\"Vertical\",\"actionAlignment\":\"stretch\"}}",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const presetTwoPreChatSurveyPaneControlProps = {
|
|
2
|
-
id: "
|
|
2
|
+
id: "lcw-prechat-survey-pane-preset2",
|
|
3
3
|
dir: "auto",
|
|
4
4
|
hidePreChatSurveyPane: false,
|
|
5
5
|
adaptiveCardHostConfig: "{\"fontFamily\":\"Segoe UI, Helvetica Neue, sans-serif\",\"containerStyles\":{\"default\":{\"foregroundColors\":{\"default\":{\"default\":\"#000000\"}},\"backgroundColor\":\"#FFFFFF\"}},\"actions\":{\"actionsOrientation\":\"Vertical\",\"actionAlignment\":\"stretch\"}}",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import { Label, Stack } from "@fluentui/react";
|
|
2
4
|
import React, { useCallback } from "react";
|
|
3
5
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
4
6
|
import { DefaultButton } from "@fluentui/react/lib/Button";
|
|
7
|
+
import CloseButton from "../common/subcomponents/CloseButton";
|
|
5
8
|
import { KeyCodes } from "../../common/Constants";
|
|
6
9
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
7
10
|
import { defaultProactiveChatPaneBodyContainerStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneBodyContainerStyles";
|
|
8
11
|
import { defaultProactiveChatPaneBodyTitleStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneBodyTitleStyles";
|
|
9
|
-
import { defaultProactiveChatPaneCloseButtonHoveredStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneCloseButtonHoveredStyles";
|
|
10
|
-
import { defaultProactiveChatPaneCloseButtonStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles";
|
|
11
12
|
import { defaultProactiveChatPaneControlProps } from "./common/default/defaultProps/defaultProactiveChatPaneControlProps";
|
|
12
13
|
import { defaultProactiveChatPaneGeneralStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneGeneralStyles";
|
|
13
14
|
import { defaultProactiveChatPaneHeaderContainerStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneHeaderContainerStyles";
|
|
@@ -17,9 +18,10 @@ import { defaultProactiveChatPaneSubtitleStyles } from "./common/default/default
|
|
|
17
18
|
import { defaultProactiveChatPaneTextContainerStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneTextContainerStyles";
|
|
18
19
|
import { defaultProactiveChatPaneTitleStyles } from "./common/default/defaultStyles/defaultProactiveChatPaneTitleStyles";
|
|
19
20
|
import { generateEventName } from "../../common/utils";
|
|
21
|
+
import { defaultProactiveChatPaneProps } from "./common/default/defaultProps/defaultProactiveChatPaneProps";
|
|
20
22
|
|
|
21
23
|
function ProactiveChatPane(props) {
|
|
22
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$
|
|
24
|
+
var _props$controlProps, _defaultProactiveChat, _props$controlProps6, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _defaultProactiveChat2, _props$styleProps6, _defaultProactiveChat3, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$controlProps7, _props$styleProps13, _props$styleProps13$c, _props$controlProps8, _props$controlProps9, _props$styleProps14, _props$styleProps14$c, _props$styleProps15, _props$styleProps15$c, _props$controlProps10, _props$componentOverr, _props$styleProps16, _props$styleProps16$c, _props$controlProps11, _props$controlProps12, _props$componentOverr2, _props$styleProps17, _props$styleProps17$c, _props$controlProps13, _props$controlProps14, _props$componentOverr3, _props$styleProps18, _props$styleProps18$c, _props$controlProps15, _props$styleProps19, _props$styleProps19$c, _props$controlProps16, _props$componentOverr4, _props$styleProps20, _props$styleProps20$c, _props$controlProps17, _props$controlProps18, _props$componentOverr5, _props$styleProps21, _props$styleProps21$c, _props$controlProps19, _props$controlProps20;
|
|
23
25
|
|
|
24
26
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultProactiveChatPaneControlProps.id;
|
|
25
27
|
|
|
@@ -68,6 +70,7 @@ function ProactiveChatPane(props) {
|
|
|
68
70
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onStart();
|
|
69
71
|
}
|
|
70
72
|
}, []);
|
|
73
|
+
const closeButtonProps = Object.assign({}, (_defaultProactiveChat = defaultProactiveChatPaneProps.controlProps) === null || _defaultProactiveChat === void 0 ? void 0 : _defaultProactiveChat.closeButtonProps, (_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.closeButtonProps);
|
|
71
74
|
const containerStyles = {
|
|
72
75
|
root: Object.assign({}, defaultProactiveChatPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
|
|
73
76
|
};
|
|
@@ -83,71 +86,67 @@ function ProactiveChatPane(props) {
|
|
|
83
86
|
const subtitleStyles = {
|
|
84
87
|
root: Object.assign({}, defaultProactiveChatPaneSubtitleStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.subtitleStyleProps)
|
|
85
88
|
};
|
|
86
|
-
const closeButtonStyles = {
|
|
87
|
-
|
|
88
|
-
rootHovered: Object.assign({}, defaultProactiveChatPaneCloseButtonHoveredStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.closeButtonHoveredStyleProps),
|
|
89
|
-
rootPressed: Object.assign({}, defaultProactiveChatPaneCloseButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.closeButtonHoveredStyleProps)
|
|
90
|
-
};
|
|
89
|
+
const closeButtonStyles = Object.assign({}, (_defaultProactiveChat2 = defaultProactiveChatPaneProps.styleProps) === null || _defaultProactiveChat2 === void 0 ? void 0 : _defaultProactiveChat2.closeButtonStyleProps, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.closeButtonStyleProps);
|
|
90
|
+
const closeButtonHoverStyles = Object.assign({}, (_defaultProactiveChat3 = defaultProactiveChatPaneProps.styleProps) === null || _defaultProactiveChat3 === void 0 ? void 0 : _defaultProactiveChat3.closeButtonHoveredStyleProps, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.closeButtonHoveredStyleProps);
|
|
91
91
|
const bodyContainerStyles = {
|
|
92
|
-
root: Object.assign({}, defaultProactiveChatPaneBodyContainerStyles, (_props$
|
|
92
|
+
root: Object.assign({}, defaultProactiveChatPaneBodyContainerStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.bodyContainerStyleProps)
|
|
93
93
|
};
|
|
94
94
|
const bodyTitleStyles = {
|
|
95
|
-
root: Object.assign({}, defaultProactiveChatPaneBodyTitleStyles, (_props$
|
|
95
|
+
root: Object.assign({}, defaultProactiveChatPaneBodyTitleStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.bodyTitleStyleProps)
|
|
96
96
|
};
|
|
97
97
|
const startButtonStyles = {
|
|
98
|
-
root: Object.assign({}, defaultProactiveChatPaneStartButtonStyles, (_props$
|
|
99
|
-
rootHovered: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$
|
|
100
|
-
rootPressed: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$
|
|
98
|
+
root: Object.assign({}, defaultProactiveChatPaneStartButtonStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.startButtonStyleProps),
|
|
99
|
+
rootHovered: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.startButtonHoveredStyleProps),
|
|
100
|
+
rootPressed: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.startButtonHoveredStyleProps)
|
|
101
101
|
};
|
|
102
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$
|
|
103
|
-
className: (_props$
|
|
102
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps7 = props.controlProps) !== null && _props$controlProps7 !== void 0 && _props$controlProps7.hideProactiveChatPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
103
|
+
className: (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.classNames) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.containerClassName,
|
|
104
104
|
id: elementId,
|
|
105
105
|
tabIndex: -1,
|
|
106
106
|
onKeyDown: handleEscKeyDown,
|
|
107
|
-
dir: ((_props$
|
|
108
|
-
"aria-label": ((_props$
|
|
107
|
+
dir: ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) || defaultProactiveChatPaneControlProps.dir,
|
|
108
|
+
"aria-label": ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.proactiveChatPaneAriaLabel) || defaultProactiveChatPaneControlProps.proactiveChatPaneAriaLabel,
|
|
109
109
|
styles: containerStyles
|
|
110
110
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
111
111
|
horizontal: true,
|
|
112
|
-
className: (_props$
|
|
112
|
+
className: (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.classNames) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.headerContainerClassName,
|
|
113
113
|
styles: headerContainerStyles,
|
|
114
114
|
tabIndex: -1,
|
|
115
115
|
id: elementId + "-headercontainer"
|
|
116
116
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
117
|
-
className: (_props$
|
|
117
|
+
className: (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.classNames) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.textContainerClassName,
|
|
118
118
|
styles: textContainerStyles,
|
|
119
119
|
tabIndex: -1,
|
|
120
120
|
id: elementId + "-textcontainer"
|
|
121
|
-
}, !((_props$
|
|
122
|
-
className: (_props$
|
|
121
|
+
}, !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
122
|
+
className: (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : (_props$styleProps16$c = _props$styleProps16.classNames) === null || _props$styleProps16$c === void 0 ? void 0 : _props$styleProps16$c.titleClassName,
|
|
123
123
|
styles: titleStyles,
|
|
124
124
|
tabIndex: -1,
|
|
125
125
|
id: elementId + "-title"
|
|
126
|
-
}, ((_props$
|
|
127
|
-
className: (_props$
|
|
126
|
+
}, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.titleText) || defaultProactiveChatPaneControlProps.titleText)), !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
127
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.subtitleClassName,
|
|
128
128
|
styles: subtitleStyles,
|
|
129
129
|
tabIndex: -1,
|
|
130
130
|
id: elementId + "-subtitle"
|
|
131
|
-
}, ((_props$
|
|
132
|
-
className: (_props$
|
|
133
|
-
styles: closeButtonStyles,
|
|
134
|
-
tabIndex: 0,
|
|
131
|
+
}, ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.subtitleText) || defaultProactiveChatPaneControlProps.subtitleText))), !((_props$controlProps14 = props.controlProps) !== null && _props$controlProps14 !== void 0 && _props$controlProps14.hideCloseButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.closeButton) || /*#__PURE__*/React.createElement(CloseButton, _extends({}, closeButtonProps, {
|
|
132
|
+
className: (_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.classNames) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.closeButtonClassName,
|
|
135
133
|
onClick: handleCloseClick,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
styles: closeButtonStyles,
|
|
135
|
+
hoverStyles: closeButtonHoverStyles,
|
|
136
|
+
id: elementId + "-closebutton"
|
|
137
|
+
})))), /*#__PURE__*/React.createElement(Stack, {
|
|
139
138
|
horizontal: ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.isBodyContainerHorizantal) || defaultProactiveChatPaneControlProps.isBodyContainerHorizantal,
|
|
140
|
-
className: (_props$
|
|
139
|
+
className: (_props$styleProps19 = props.styleProps) === null || _props$styleProps19 === void 0 ? void 0 : (_props$styleProps19$c = _props$styleProps19.classNames) === null || _props$styleProps19$c === void 0 ? void 0 : _props$styleProps19$c.bodyContainerClassName,
|
|
141
140
|
styles: bodyContainerStyles,
|
|
142
141
|
tabIndex: -1,
|
|
143
142
|
id: elementId + "-bodycontainer"
|
|
144
143
|
}, !((_props$controlProps16 = props.controlProps) !== null && _props$controlProps16 !== void 0 && _props$controlProps16.hideBodyTitle) && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.bodyTitle) || /*#__PURE__*/React.createElement(Label, {
|
|
145
|
-
className: (_props$
|
|
144
|
+
className: (_props$styleProps20 = props.styleProps) === null || _props$styleProps20 === void 0 ? void 0 : (_props$styleProps20$c = _props$styleProps20.classNames) === null || _props$styleProps20$c === void 0 ? void 0 : _props$styleProps20$c.bodyTitleClassName,
|
|
146
145
|
styles: bodyTitleStyles,
|
|
147
146
|
tabIndex: -1,
|
|
148
147
|
id: elementId + "-bodytitle"
|
|
149
148
|
}, ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.bodyTitleText) || defaultProactiveChatPaneControlProps.bodyTitleText)), !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideStartButton) && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.startButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
150
|
-
className: (_props$
|
|
149
|
+
className: (_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 ? void 0 : (_props$styleProps21$c = _props$styleProps21.classNames) === null || _props$styleProps21$c === void 0 ? void 0 : _props$styleProps21$c.startButtonClassName,
|
|
151
150
|
styles: startButtonStyles,
|
|
152
151
|
tabIndex: 0,
|
|
153
152
|
text: ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.startButtonText) || defaultProactiveChatPaneControlProps.startButtonText,
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { AriaLabels, ButtonTypes, IconNames, Ids, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const defaultProactiveChatPaneControlProps = {
|
|
2
|
-
id:
|
|
3
|
+
id: Ids.DefaultProactiveChatPaneId,
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideProactiveChatPane: false,
|
|
5
|
-
proactiveChatPaneAriaLabel:
|
|
6
|
+
proactiveChatPaneAriaLabel: AriaLabels.ProactiveChatPane,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ProactiveChatPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ProactiveChatPaneSubtitleText,
|
|
10
11
|
hideCloseButton: false,
|
|
11
|
-
|
|
12
|
+
closeButtonProps: {
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
15
|
+
hideButtonTitle: true
|
|
16
|
+
},
|
|
12
17
|
isBodyContainerHorizantal: false,
|
|
13
18
|
hideBodyTitle: false,
|
|
14
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
15
20
|
hideStartButton: false,
|
|
16
|
-
startButtonText:
|
|
17
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
18
23
|
onClose: function () {
|
|
19
24
|
console.log("on close");
|
|
20
25
|
},
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import { CloseChatButtonIconBase64 } from "../../../../../assets/Icons";
|
|
2
1
|
export const defaultProactiveChatPaneCloseButtonStyles = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
backgroundRepeat: "no-repeat",
|
|
6
|
-
color: "#605e5c",
|
|
7
|
-
cursor: "pointer",
|
|
8
|
-
height: "14px",
|
|
9
|
-
lineHeight: "14px",
|
|
10
|
-
textAlign: "center",
|
|
11
|
-
width: "14px",
|
|
12
|
-
zIndex: "inherit"
|
|
2
|
+
color: "white",
|
|
3
|
+
fontSize: "12px"
|
|
13
4
|
};
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { AriaLabels, ButtonTypes, IconNames, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const presetOneProactiveChatPaneControlProps = {
|
|
2
|
-
id: "
|
|
3
|
+
id: "lcw-incoming-proactive-chat",
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideProactiveChatPane: false,
|
|
5
|
-
proactiveChatPaneAriaLabel:
|
|
6
|
+
proactiveChatPaneAriaLabel: AriaLabels.ProactiveChatPane,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ProactiveChatPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ProactiveChatPaneSubtitleText,
|
|
10
11
|
hideCloseButton: false,
|
|
11
|
-
|
|
12
|
+
closeButtonProps: {
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
15
|
+
hideButtonTitle: true
|
|
16
|
+
},
|
|
12
17
|
isBodyContainerHorizantal: true,
|
|
13
18
|
hideBodyTitle: false,
|
|
14
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
15
20
|
hideStartButton: false,
|
|
16
|
-
startButtonText:
|
|
17
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
18
23
|
onClose: function () {
|
|
19
24
|
console.log("on close");
|
|
20
25
|
},
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { AriaLabels, ButtonTypes, IconNames, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const presetThreeProactiveChatPaneControlProps = {
|
|
2
|
-
id: "
|
|
3
|
+
id: "lcw-incoming-proactive-chat",
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideProactiveChatPane: false,
|
|
5
|
-
proactiveChatPaneAriaLabel:
|
|
6
|
+
proactiveChatPaneAriaLabel: AriaLabels.ProactiveChatPane,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ProactiveChatPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ProactiveChatPaneSubtitleText,
|
|
10
11
|
hideCloseButton: false,
|
|
11
|
-
|
|
12
|
+
closeButtonProps: {
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
15
|
+
hideButtonTitle: true
|
|
16
|
+
},
|
|
12
17
|
isBodyContainerHorizantal: false,
|
|
13
18
|
hideBodyTitle: false,
|
|
14
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
15
20
|
hideStartButton: false,
|
|
16
|
-
startButtonText:
|
|
17
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
18
23
|
onClose: function () {
|
|
19
24
|
console.log("on close");
|
|
20
25
|
},
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { AriaLabels, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const presetTwoProactiveChatPaneControlProps = {
|
|
2
|
-
id: "
|
|
3
|
+
id: "lcw-incoming-proactive-chat",
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideProactiveChatPane: false,
|
|
5
|
-
proactiveChatPaneAriaLabel:
|
|
6
|
+
proactiveChatPaneAriaLabel: AriaLabels.ProactiveChatPane,
|
|
6
7
|
hideTitle: true,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ProactiveChatPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ProactiveChatPaneSubtitleText,
|
|
10
11
|
hideCloseButton: false,
|
|
11
12
|
isBodyContainerHorizantal: true,
|
|
12
13
|
hideBodyTitle: false,
|
|
13
14
|
hideStartButton: false,
|
|
14
|
-
startButtonText:
|
|
15
|
-
startButtonAriaLabel:
|
|
15
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
16
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
16
17
|
onStart: function () {
|
|
17
18
|
console.log("on start");
|
|
18
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultButton, Icon, Label, Stack } from "@fluentui/react";
|
|
2
2
|
import React, { useCallback } from "react";
|
|
3
3
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
4
|
-
import { ElementType } from "../../common/Constants";
|
|
4
|
+
import { ElementType, EventNames } from "../../common/Constants";
|
|
5
5
|
import { KeyCodes } from "../../common/Constants";
|
|
6
6
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
7
7
|
import { defaultReconnectChatPaneButtonGroupStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneButtonGroupStyles";
|
|
@@ -29,7 +29,7 @@ function ReconnectChatPane(props) {
|
|
|
29
29
|
const customEvent = {
|
|
30
30
|
elementType: ElementType.ReconnectChatContinueChatButton,
|
|
31
31
|
elementId: elementId + "-continueconversationbutton",
|
|
32
|
-
eventName:
|
|
32
|
+
eventName: EventNames.OnClick
|
|
33
33
|
};
|
|
34
34
|
BroadcastService.postMessage(customEvent);
|
|
35
35
|
(_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.onContinueChat();
|
|
@@ -44,7 +44,7 @@ function ReconnectChatPane(props) {
|
|
|
44
44
|
const customEvent = {
|
|
45
45
|
elementType: ElementType.ReconnectChatStartNewChatButton,
|
|
46
46
|
elementId: elementId + "-startnewconversationbutton",
|
|
47
|
-
eventName:
|
|
47
|
+
eventName: EventNames.OnClick
|
|
48
48
|
};
|
|
49
49
|
BroadcastService.postMessage(customEvent);
|
|
50
50
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onStartNewChat();
|
|
@@ -60,7 +60,7 @@ function ReconnectChatPane(props) {
|
|
|
60
60
|
const customEvent = {
|
|
61
61
|
elementType: ElementType.ReconnectChatPane,
|
|
62
62
|
elementId: elementId,
|
|
63
|
-
eventName:
|
|
63
|
+
eventName: EventNames.OnEscapeKeyDown
|
|
64
64
|
};
|
|
65
65
|
BroadcastService.postMessage(customEvent);
|
|
66
66
|
(_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.onMinimize();
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { AriaLabels, Ids, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const defaultReconnectChatPaneControlProps = {
|
|
2
|
-
id:
|
|
3
|
+
id: Ids.DefaultReconnectChatPaneId,
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideReconnectChatPane: false,
|
|
5
|
-
reconnectChatPaneAriaLabel:
|
|
6
|
+
reconnectChatPaneAriaLabel: AriaLabels.ReconnectChatPane,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ReconnectChatPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ReconnectChatPaneSubtitleText,
|
|
10
11
|
hideIcon: false,
|
|
11
|
-
iconAriaLabel:
|
|
12
|
+
iconAriaLabel: AriaLabels.ReconnectChatPaneIcon,
|
|
12
13
|
isButtonGroupHorizontal: false,
|
|
13
14
|
hideContinueChatButton: false,
|
|
14
|
-
continueChatButtonText:
|
|
15
|
-
continueChatButtonAriaLabel:
|
|
15
|
+
continueChatButtonText: Texts.ReconnectChatPaneContinueChatButtonText,
|
|
16
|
+
continueChatButtonAriaLabel: AriaLabels.ContinueConversation,
|
|
16
17
|
hideStartNewChatButton: false,
|
|
17
|
-
startNewChatButtonText:
|
|
18
|
-
startNewChatButtonAriaLabel:
|
|
18
|
+
startNewChatButtonText: Texts.ReconnectChatPaneStartNewChatButtonText,
|
|
19
|
+
startNewChatButtonAriaLabel: AriaLabels.StartNewConversation,
|
|
19
20
|
onContinueChat: function () {
|
|
20
21
|
console.log("on continue conversation");
|
|
21
22
|
},
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { AriaLabels, Texts } from "../../../../../common/Constants";
|
|
1
2
|
export const presetThreeReconnectChatPaneControlProps = {
|
|
2
3
|
id: "lcw-components-reconnect-chat-pane",
|
|
3
4
|
dir: "ltr",
|
|
4
5
|
hideReconnectChatPane: false,
|
|
5
|
-
reconnectChatPaneAriaLabel:
|
|
6
|
+
reconnectChatPaneAriaLabel: AriaLabels.ReconnectChatPane,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.ReconnectChatPaneTitleText,
|
|
8
9
|
hideSubtitle: true,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.ReconnectChatPaneSubtitleText,
|
|
10
11
|
hideIcon: false,
|
|
11
|
-
iconAriaLabel:
|
|
12
|
+
iconAriaLabel: AriaLabels.ReconnectChatPaneIcon,
|
|
12
13
|
isButtonGroupHorizontal: false,
|
|
13
14
|
hideContinueChatButton: false,
|
|
14
|
-
continueChatButtonText:
|
|
15
|
-
continueChatButtonAriaLabel:
|
|
15
|
+
continueChatButtonText: Texts.ReconnectChatPaneContinueChatButtonText,
|
|
16
|
+
continueChatButtonAriaLabel: AriaLabels.ContinueConversation,
|
|
16
17
|
hideStartNewChatButton: true,
|
|
17
|
-
startNewChatButtonText:
|
|
18
|
-
startNewChatButtonAriaLabel:
|
|
18
|
+
startNewChatButtonText: Texts.ReconnectChatPaneStartNewChatButtonText,
|
|
19
|
+
startNewChatButtonAriaLabel: AriaLabels.StartNewConversation,
|
|
19
20
|
onContinueChat: function () {
|
|
20
21
|
console.log("on continue conversation");
|
|
21
22
|
},
|
package/lib/esm/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as PostChatSurveyPane } from "./components/postchatsurveypane/P
|
|
|
12
12
|
export { encodeComponentString } from "./common/encodeComponentString";
|
|
13
13
|
export { decodeComponentString } from "./common/decodeComponentString";
|
|
14
14
|
export { BroadcastService } from "./services/BroadcastService";
|
|
15
|
+
export { BroadcastServiceInitialize } from "./services/BroadcastService";
|
|
15
16
|
export { ElementType } from "./common/Constants";
|
|
16
17
|
export { default as CallingContainer } from "./components/callingcontainer/CallingContainer";
|
|
17
18
|
export { default as CurrentCall } from "./components/callingcontainer/subcomponents/CurrentCall/CurrentCall";
|
|
@@ -1,19 +1,45 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
2
|
import { filter } from "rxjs/operators";
|
|
3
3
|
import { BroadcastChannel } from "broadcast-channel";
|
|
4
|
-
|
|
5
|
-
const newMessage = new Subject();
|
|
6
|
-
const pubChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME);
|
|
7
|
-
const subChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
const newMessage = new Subject(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
6
|
+
const broadcastServicePubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
|
|
8
|
+
const broadcastServiceSubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
|
|
10
|
+
let pubChannel; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
|
|
12
|
+
let subChannel;
|
|
13
|
+
export const BroadcastServiceInitialize = channelName => {
|
|
14
|
+
if (broadcastServicePubList[channelName]) {
|
|
15
|
+
pubChannel = broadcastServicePubList[channelName];
|
|
16
|
+
} else {
|
|
17
|
+
const newPubChannel = new BroadcastChannel(channelName);
|
|
18
|
+
broadcastServicePubList[channelName] = newPubChannel;
|
|
19
|
+
pubChannel = newPubChannel;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (broadcastServiceSubList[channelName]) {
|
|
23
|
+
subChannel = broadcastServiceSubList[channelName];
|
|
24
|
+
} else {
|
|
25
|
+
const newSubChannel = new BroadcastChannel(channelName);
|
|
26
|
+
broadcastServiceSubList[channelName] = newSubChannel;
|
|
27
|
+
subChannel = newSubChannel;
|
|
28
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
29
|
|
|
30
|
+
|
|
31
|
+
subChannel.onmessage = message => {
|
|
32
|
+
newMessage.next(message);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
13
35
|
export const BroadcastService = {
|
|
14
36
|
//broadcast a message
|
|
15
37
|
postMessage: message => {
|
|
16
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Omit copying methods to prevent 'DataCloneError' in older browsers when passing an object with functions
|
|
40
|
+
* This exception occurs when an object can't be clone with the 'structured clone algorithm' (used by postMessage)
|
|
41
|
+
*/
|
|
42
|
+
pubChannel.postMessage(JSON.parse(JSON.stringify(message)));
|
|
17
43
|
},
|
|
18
44
|
getMessage: message => {
|
|
19
45
|
return newMessage.pipe(filter(msg => msg.elementId == message.elementId && msg.elementType == message.elementType && msg.eventName == message.eventName));
|