@microsoft/omnichannel-chat-components 1.0.1-main.9f52604 → 1.0.2-main.9430c05
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 +16 -3
- package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +6 -6
- 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 +6 -6
- 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 +4 -6
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -7
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonGeneralStyles.js +1 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +2 -1
- package/lib/cjs/components/common/commandbutton/CommandButton.js +6 -5
- package/lib/cjs/components/common/subcomponents/CloseButton.js +4 -4
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +2 -2
- package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
- package/lib/cjs/components/footer/Footer.js +10 -17
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +16 -11
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +21 -15
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +6 -5
- package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
- package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
- package/lib/cjs/components/header/Header.js +5 -3
- package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
- package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +13 -9
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +15 -11
- package/lib/cjs/components/header/subcomponents/MinimizeButton.js +6 -5
- package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/loadingpane/LoadingPane.js +1 -1
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
- 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/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
- 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/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
- package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +2 -2
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +4 -1
- 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/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +12 -9
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +12 -9
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +12 -9
- 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/esm/common/Constants.js +9 -2
- package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
- 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 +7 -7
- 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 +5 -7
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +7 -7
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonGeneralStyles.js +1 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +2 -1
- package/lib/esm/components/common/commandbutton/CommandButton.js +7 -6
- package/lib/esm/components/common/subcomponents/CloseButton.js +5 -5
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +3 -3
- package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
- package/lib/esm/components/footer/Footer.js +9 -17
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +15 -11
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +19 -15
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +7 -6
- package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +6 -6
- package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +6 -6
- package/lib/esm/components/header/Header.js +4 -3
- package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
- package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +12 -9
- package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
- package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +14 -11
- package/lib/esm/components/header/subcomponents/MinimizeButton.js +7 -6
- package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/loadingpane/LoadingPane.js +1 -1
- package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
- 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/common/defaultProps/defaultOOOHPaneControlProps.js +3 -2
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
- 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/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
- package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +3 -3
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +2 -1
- 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/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +10 -9
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +10 -9
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +10 -9
- 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/types/common/Constants.d.ts +148 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { defaultPostChatSurveyPaneControlProps } from "../defaultProps/defaultPostChatSurveyPaneControlProps";
|
|
2
2
|
export const presetOnePostChatSurveyPaneControlProps = { ...defaultPostChatSurveyPaneControlProps,
|
|
3
|
-
id: "
|
|
3
|
+
id: "lcw-postchat-survey-pane-preset1"
|
|
4
4
|
};
|
|
@@ -3,7 +3,7 @@ import { Stack } from "@fluentui/react";
|
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { addNoreferrerNoopenerTag, broadcastError, getInputValuesFromAdaptiveCard } from "../../common/utils";
|
|
5
5
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
6
|
-
import { ElementType } from "../../common/Constants";
|
|
6
|
+
import { ElementType, EventNames } from "../../common/Constants";
|
|
7
7
|
import { defaultPreChatSurveyPaneACContainerStyles } from "./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneACContainerStyles";
|
|
8
8
|
import { defaultPreChatSurveyPaneControlProps } from "./common/defaultProps/defaultPreChatSurveyPaneControlProps";
|
|
9
9
|
import { defaultPreChatSurveyPaneGeneralStyles } from "./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneGeneralStyles";
|
|
@@ -12,7 +12,7 @@ import { defaultPreChatSurveyPaneStyles } from "./common/defaultProps/defaultSty
|
|
|
12
12
|
function PreChatSurveyPane(props) {
|
|
13
13
|
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps3$cu, _props$styleProps4, _props$styleProps4$cu, _props$styleProps5, _props$styleProps5$cu, _props$styleProps6, _props$styleProps6$cu, _props$styleProps7, _props$styleProps7$cu, _props$styleProps8, _props$styleProps8$cu, _props$styleProps9, _props$styleProps9$cu, _defaultPreChatSurvey, _props$styleProps10, _props$styleProps10$c, _props$styleProps11, _props$styleProps11$c, _defaultPreChatSurvey2, _props$styleProps12, _props$styleProps12$c, _props$styleProps13, _props$styleProps13$c, _defaultPreChatSurvey3, _props$styleProps14, _props$styleProps14$c, _defaultPreChatSurvey4, _props$styleProps15, _props$styleProps15$c, _defaultPreChatSurvey5, _props$styleProps16, _props$styleProps16$c, _defaultPreChatSurvey6, _props$styleProps17, _props$styleProps17$c, _defaultPreChatSurvey7, _props$styleProps18, _props$styleProps18$c, _defaultPreChatSurvey8, _props$controlProps6, _props$controlProps7, _props$controlProps8;
|
|
14
14
|
|
|
15
|
-
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ??
|
|
15
|
+
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultPreChatSurveyPaneControlProps.id;
|
|
16
16
|
let adpativeCardPayload;
|
|
17
17
|
let adaptiveCardHostConfig;
|
|
18
18
|
const containerStyles = {
|
|
@@ -53,7 +53,7 @@ function PreChatSurveyPane(props) {
|
|
|
53
53
|
const customEvent = {
|
|
54
54
|
elementType: ElementType.PreChatSurveySubmitButton,
|
|
55
55
|
elementId: elementId,
|
|
56
|
-
eventName:
|
|
56
|
+
eventName: EventNames.OnClick
|
|
57
57
|
};
|
|
58
58
|
BroadcastService.postMessage(customEvent);
|
|
59
59
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onSubmit(values);
|
|
@@ -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\"}}",
|
|
@@ -1,24 +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: {
|
|
12
|
-
type:
|
|
13
|
-
iconName:
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
14
15
|
hideButtonTitle: true
|
|
15
16
|
},
|
|
16
17
|
isBodyContainerHorizantal: false,
|
|
17
18
|
hideBodyTitle: false,
|
|
18
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
19
20
|
hideStartButton: false,
|
|
20
|
-
startButtonText:
|
|
21
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
22
23
|
onClose: function () {
|
|
23
24
|
console.log("on close");
|
|
24
25
|
},
|
|
@@ -1,24 +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: {
|
|
12
|
-
type:
|
|
13
|
-
iconName:
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
14
15
|
hideButtonTitle: true
|
|
15
16
|
},
|
|
16
17
|
isBodyContainerHorizantal: true,
|
|
17
18
|
hideBodyTitle: false,
|
|
18
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
19
20
|
hideStartButton: false,
|
|
20
|
-
startButtonText:
|
|
21
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
22
23
|
onClose: function () {
|
|
23
24
|
console.log("on close");
|
|
24
25
|
},
|
|
@@ -1,24 +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: {
|
|
12
|
-
type:
|
|
13
|
-
iconName:
|
|
13
|
+
type: ButtonTypes.Icon,
|
|
14
|
+
iconName: IconNames.ChromeClose,
|
|
14
15
|
hideButtonTitle: true
|
|
15
16
|
},
|
|
16
17
|
isBodyContainerHorizantal: false,
|
|
17
18
|
hideBodyTitle: false,
|
|
18
|
-
bodyTitleText:
|
|
19
|
+
bodyTitleText: Texts.ProactiveChatPaneBodyTitleText,
|
|
19
20
|
hideStartButton: false,
|
|
20
|
-
startButtonText:
|
|
21
|
-
startButtonAriaLabel:
|
|
21
|
+
startButtonText: Texts.ProactiveChatPaneStartButtonText,
|
|
22
|
+
startButtonAriaLabel: AriaLabels.ChatNow,
|
|
22
23
|
onClose: function () {
|
|
23
24
|
console.log("on close");
|
|
24
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
|
},
|
|
@@ -40,3 +40,151 @@ export declare enum ElementType {
|
|
|
40
40
|
Utility = "Utility",
|
|
41
41
|
Custom = "Custom"
|
|
42
42
|
}
|
|
43
|
+
export declare const Ids: {
|
|
44
|
+
new (): {};
|
|
45
|
+
readonly DefaultCallingContainerId: "lcw-calling-container";
|
|
46
|
+
readonly DefaultCurrentCallId: "lcw-current-call-container";
|
|
47
|
+
readonly CurrentCallActionGroupId: "lcw-current-call-action-icons";
|
|
48
|
+
readonly CurrentCallFooterId: "lcw-current-call-footer";
|
|
49
|
+
readonly RemoteVideoTileId: "lcw-remote-video";
|
|
50
|
+
readonly SelfVideoTileId: "lcw-self-video";
|
|
51
|
+
readonly VideoTileGroupId: "lcw-current-call-body";
|
|
52
|
+
readonly EndCallButtonId: "lcw-call-reject-button";
|
|
53
|
+
readonly MicButtonId: "lcw-toggle-audio";
|
|
54
|
+
readonly VideoButtonId: "lcw-toggle-video";
|
|
55
|
+
readonly CallTimerId: "lcw-current-call-timer";
|
|
56
|
+
readonly CurrentCallLeftGroupId: "lcw-current-call-left-group";
|
|
57
|
+
readonly CurrentCallMiddleGroupId: "lcw-current-call-middle-group";
|
|
58
|
+
readonly CurrentCallRightGroupId: "lcw-current-call-right-group";
|
|
59
|
+
readonly DefaultIncomingCallId: "lcw-incoming-call";
|
|
60
|
+
readonly DeclineCallButtonId: "lcw-call-reject-button";
|
|
61
|
+
readonly AudioCallButtonId: "lcw-call-accept-button";
|
|
62
|
+
readonly VideoCallButtonId: "lcw-video-call-accept-button";
|
|
63
|
+
readonly IncomingCallTitleId: "lcw-incoming-call-message";
|
|
64
|
+
readonly DefaultIncomingCallPopupId: "lcw-incoming-call-popup";
|
|
65
|
+
readonly IncomingCallLeftGroupId: "lcw-incoming-call-left-group";
|
|
66
|
+
readonly IncomingCallMiddleGroupId: "lcw-incoming-call-middle-group";
|
|
67
|
+
readonly IncomingCallRightGroupId: "lcw-incoming-call-right-group";
|
|
68
|
+
readonly DefaultChatButtonId: "lcw-components-chat-button";
|
|
69
|
+
readonly DefaultConfirmationPaneId: "lcw-components-confirmation-pane";
|
|
70
|
+
readonly CustomFooterId: "lcw-footer";
|
|
71
|
+
readonly DownloadTranscriptButtonId: "lcw-footer-download-transcript-button";
|
|
72
|
+
readonly EmailTranscriptButtonId: "lcw-footer-email-transcript-button";
|
|
73
|
+
readonly AudioNotificationButtonId: "lcw-footer-audio-notification-button";
|
|
74
|
+
readonly DefaultFooterId: "lcw-components-footer";
|
|
75
|
+
readonly FooterLeftGroupId: "lcw-footer-left-group";
|
|
76
|
+
readonly FooterMiddleGroupId: "lcw-footer-middle-group";
|
|
77
|
+
readonly FooterRightGroupId: "lcw-footer-right-group";
|
|
78
|
+
readonly DefaultHeaderId: "lcw-header";
|
|
79
|
+
readonly MinimizeButtonId: "lcw-header-minimize-button";
|
|
80
|
+
readonly CloseButtonId: "lcw-header-close-button";
|
|
81
|
+
readonly HeaderIconId: "lcw-header-icon";
|
|
82
|
+
readonly HeaderTitleId: "lcw-header-title";
|
|
83
|
+
readonly HeaderLeftGroupId: "lcw-header-left-group";
|
|
84
|
+
readonly HeaderMiddleGroupId: "lcw-header-middle-group";
|
|
85
|
+
readonly HeaderRightGroupId: "lcw-header-right-group";
|
|
86
|
+
readonly DefaultInputValidationPaneId: "lcw-email-transcript-dialog-container";
|
|
87
|
+
readonly DefaultInputValidationPaneInputId: "lcw-email-transcript-dialog-text-field";
|
|
88
|
+
readonly DefaultLoadingPaneId: "lcw-loading-pane";
|
|
89
|
+
readonly DefaultOOOHPaneId: "lcw-out-of-office-hours-pane";
|
|
90
|
+
readonly DefaultPostChatSurveyPaneId: "lcw-postchat-survey-pane";
|
|
91
|
+
readonly DefaultPreChatSurveyPaneId: "lcw-prechat-survey-pane-default";
|
|
92
|
+
readonly DefaultProactiveChatPaneId: "lcw-proactive-chat";
|
|
93
|
+
readonly DefaultReconnectChatPaneId: "lcw-reconnect-chat-pane";
|
|
94
|
+
};
|
|
95
|
+
export declare const ButtonTypes: {
|
|
96
|
+
new (): {};
|
|
97
|
+
readonly Icon: "icon";
|
|
98
|
+
readonly Text: "text";
|
|
99
|
+
};
|
|
100
|
+
export declare const IconNames: {
|
|
101
|
+
new (): {};
|
|
102
|
+
readonly DeclineCall: "DeclineCall";
|
|
103
|
+
readonly Microphone: "Microphone";
|
|
104
|
+
readonly MicOff2: "MicOff2";
|
|
105
|
+
readonly Video: "Video";
|
|
106
|
+
readonly VideoOff: "VideoOff";
|
|
107
|
+
readonly IncomingCall: "IncomingCall";
|
|
108
|
+
readonly ChromeClose: "ChromeClose";
|
|
109
|
+
readonly Download: "Download";
|
|
110
|
+
readonly Mail: "Mail";
|
|
111
|
+
readonly Volume3: "Volume3";
|
|
112
|
+
readonly Volume0: "Volume0";
|
|
113
|
+
readonly ChromeMinimize: "ChromeMinimize";
|
|
114
|
+
};
|
|
115
|
+
export declare const AriaLabels: {
|
|
116
|
+
new (): {};
|
|
117
|
+
readonly EndCall: "End Call";
|
|
118
|
+
readonly MicMute: "Mute";
|
|
119
|
+
readonly MicUnmute: "Unmute";
|
|
120
|
+
readonly VideoTurnCameraOn: "Turn camera on";
|
|
121
|
+
readonly VideoTurnCameraOff: "Turn camera off";
|
|
122
|
+
readonly IncomingCallArea: "Incoming call area";
|
|
123
|
+
readonly RejectCall: "Reject call";
|
|
124
|
+
readonly AcceptVoiceCall: "Accept voice call";
|
|
125
|
+
readonly AcceptVideoCall: "Accept video Call";
|
|
126
|
+
readonly DeclineCall: "Decline Call";
|
|
127
|
+
readonly AudioCall: "Audio Call";
|
|
128
|
+
readonly VideoCall: "Video Call";
|
|
129
|
+
readonly LetsChatWeAreOnline: "Let's chat we are online";
|
|
130
|
+
readonly UnreadMessageString: "you have new messages";
|
|
131
|
+
readonly Close: "Close";
|
|
132
|
+
readonly ConfirmationPaneConfirm: "Close Chat";
|
|
133
|
+
readonly ConfirmationPaneCancel: "Cancel. Return to Chat";
|
|
134
|
+
readonly DownloadChatTranscript: "Download chat transcript";
|
|
135
|
+
readonly EmailTranscript: "Email Transcript";
|
|
136
|
+
readonly TurnSoundOff: "Turn sound off";
|
|
137
|
+
readonly TurnSoundOn: "Turn sound on";
|
|
138
|
+
readonly Minimize: "Minimize";
|
|
139
|
+
readonly EmailChatTranscriptPane: "Email Chat Transcript Pane";
|
|
140
|
+
readonly InputValidationPaneInput: "Email this chat transcript. This will be sent after your chat ends. Email address text area";
|
|
141
|
+
readonly Send: "Send";
|
|
142
|
+
readonly Cancel: "Cancel";
|
|
143
|
+
readonly ProactiveChatPane: "Proactive Chat Pane";
|
|
144
|
+
readonly ChatNow: "Chat Now";
|
|
145
|
+
readonly ReconnectChatPane: "Reconnect Chat Pane";
|
|
146
|
+
readonly ReconnectChatPaneIcon: "Reconnect Chat Pane Icon";
|
|
147
|
+
readonly ContinueConversation: "Continue conversation";
|
|
148
|
+
readonly StartNewConversation: "Start new conversation";
|
|
149
|
+
};
|
|
150
|
+
export declare const EventNames: {
|
|
151
|
+
new (): {};
|
|
152
|
+
readonly OnClick: "OnClick";
|
|
153
|
+
readonly OnEscapeKeyDown: "OnEscapeKeyDown";
|
|
154
|
+
readonly IncomingCallEnded: "IncomingCallEnded";
|
|
155
|
+
};
|
|
156
|
+
export declare const Texts: {
|
|
157
|
+
new (): {};
|
|
158
|
+
readonly IncomingCallTitle: "Incoming Call";
|
|
159
|
+
readonly ChatButtonTitle: "Let's Chat!";
|
|
160
|
+
readonly ChatButtonSubtitle: "We're online.";
|
|
161
|
+
readonly ChatButtonUnreadMessageString: "new messages";
|
|
162
|
+
readonly ChatButtonLargeUnreadMessageString: "99+";
|
|
163
|
+
readonly CloseButtonText: "Close";
|
|
164
|
+
readonly ConfirmationPaneTitle: "Close chat";
|
|
165
|
+
readonly ConfirmationPaneSubtitle: "Do you really want to close this chat?";
|
|
166
|
+
readonly ConfirmButtonText: "Close";
|
|
167
|
+
readonly CancelButtonText: "Cancel";
|
|
168
|
+
readonly DownloadChatTranscriptText: "Download chat transcript";
|
|
169
|
+
readonly EmailTranscriptText: "Email Transcript";
|
|
170
|
+
readonly HeaderIcon: "Chat Icon";
|
|
171
|
+
readonly HeaderTitle: "Let's Chat";
|
|
172
|
+
readonly MinimizeText: "Minimize";
|
|
173
|
+
readonly InputValidationPaneTitleText: "Email this chat transcript";
|
|
174
|
+
readonly InputValidationPaneSubtitleText: "This will be sent after your chat ends.";
|
|
175
|
+
readonly InvalidInputErrorMessageText: "Enter a valid email address.";
|
|
176
|
+
readonly SendButtonText: "Send";
|
|
177
|
+
readonly LoadingPaneTitleText: "Welcome to";
|
|
178
|
+
readonly LoadingPaneSubtitleText: "live chat support ...";
|
|
179
|
+
readonly LoadingPaneSpinnerText: "Loading ...";
|
|
180
|
+
readonly OOOHPaneTitleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.";
|
|
181
|
+
readonly PostChatSurveyPaneTitleText: "Post chat survey pane";
|
|
182
|
+
readonly ProactiveChatPaneTitleText: "Welcome to";
|
|
183
|
+
readonly ProactiveChatPaneSubtitleText: "Live chat support!";
|
|
184
|
+
readonly ProactiveChatPaneBodyTitleText: "Hi! Have any questions? I am here to help.";
|
|
185
|
+
readonly ProactiveChatPaneStartButtonText: "Chat Now";
|
|
186
|
+
readonly ReconnectChatPaneTitleText: "Previous session detected";
|
|
187
|
+
readonly ReconnectChatPaneSubtitleText: "We have detected a previous chat session. Would you like to continue with your previous session?";
|
|
188
|
+
readonly ReconnectChatPaneContinueChatButtonText: "Continue conversation";
|
|
189
|
+
readonly ReconnectChatPaneStartNewChatButtonText: "Start new conversation";
|
|
190
|
+
};
|
package/package.json
CHANGED