@microsoft/omnichannel-chat-components 1.0.0 → 1.0.1-main.57b83f8
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 +2 -2
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +10 -7
- package/lib/cjs/components/common/commandbutton/CommandButton.js +4 -4
- 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 +5 -3
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -15
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +5 -5
- 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 +5 -3
- 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/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 +3 -3
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +8 -7
- package/lib/esm/components/common/commandbutton/CommandButton.js +5 -5
- 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 +4 -3
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -15
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +6 -6
- 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 +4 -3
- 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/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
|
@@ -7,6 +7,7 @@ import MinimizeButton from "./subcomponents/MinimizeButton";
|
|
|
7
7
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
8
8
|
import { defaultHeaderProps } from "./common/defaultProps/defaultHeaderProps";
|
|
9
9
|
import { processCustomComponents } from "../../common/utils";
|
|
10
|
+
import { Ids } from "../../common/Constants";
|
|
10
11
|
initializeIcons();
|
|
11
12
|
|
|
12
13
|
function Header(props) {
|
|
@@ -43,7 +44,7 @@ function Header(props) {
|
|
|
43
44
|
role: "region"
|
|
44
45
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
45
46
|
horizontal: true,
|
|
46
|
-
id:
|
|
47
|
+
id: Ids.HeaderLeftGroupId,
|
|
47
48
|
verticalAlign: "center"
|
|
48
49
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
49
50
|
horizontal: true,
|
|
@@ -60,7 +61,7 @@ function Header(props) {
|
|
|
60
61
|
styles: titleStyles
|
|
61
62
|
}, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text)))), /*#__PURE__*/React.createElement(Stack, {
|
|
62
63
|
horizontal: true,
|
|
63
|
-
id:
|
|
64
|
+
id: Ids.HeaderMiddleGroupId
|
|
64
65
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
65
66
|
horizontal: true,
|
|
66
67
|
verticalAlign: "start"
|
|
@@ -68,7 +69,7 @@ function Header(props) {
|
|
|
68
69
|
align: "start"
|
|
69
70
|
}, processCustomComponents((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : (_props$controlProps11 = _props$controlProps10.middleGroup) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.children)))), /*#__PURE__*/React.createElement(Stack, {
|
|
70
71
|
horizontal: true,
|
|
71
|
-
id:
|
|
72
|
+
id: Ids.HeaderRightGroupId,
|
|
72
73
|
verticalAlign: "start"
|
|
73
74
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
74
75
|
horizontal: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LegacyChatIconBase64 } from "../../../../assets/Icons";
|
|
2
|
+
import { ButtonTypes, Ids, Texts } from "../../../../common/Constants";
|
|
2
3
|
export const azureHeaderControlProps = {
|
|
3
|
-
id:
|
|
4
|
+
id: Ids.DefaultHeaderId,
|
|
4
5
|
hideIcon: false,
|
|
5
6
|
hideTitle: true,
|
|
6
7
|
hideCloseButton: false,
|
|
@@ -22,20 +23,20 @@ export const azureHeaderControlProps = {
|
|
|
22
23
|
},
|
|
23
24
|
minimizeButtonProps: {
|
|
24
25
|
id: "oc-lcw-header-minimizebutton",
|
|
25
|
-
type:
|
|
26
|
+
type: ButtonTypes.Icon
|
|
26
27
|
},
|
|
27
28
|
closeButtonProps: {
|
|
28
29
|
id: "oc-lcw-header-closebutton",
|
|
29
|
-
type:
|
|
30
|
+
type: ButtonTypes.Text,
|
|
30
31
|
text: "End Chat"
|
|
31
32
|
},
|
|
32
33
|
headerIconProps: {
|
|
33
|
-
id:
|
|
34
|
+
id: Ids.HeaderIconId,
|
|
34
35
|
src: LegacyChatIconBase64,
|
|
35
|
-
alt:
|
|
36
|
+
alt: Texts.HeaderIcon
|
|
36
37
|
},
|
|
37
38
|
headerTitleProps: {
|
|
38
|
-
id:
|
|
39
|
+
id: Ids.HeaderTitleId,
|
|
39
40
|
text: "Azure Chat Support"
|
|
40
41
|
}
|
|
41
42
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CloseChatButtonIconBase64, LegacyChatIconBase64, MinimizeChatButtonIconBase64 } from "../../../../assets/Icons";
|
|
2
|
+
import { ButtonTypes, Ids, Texts } from "../../../../common/Constants";
|
|
2
3
|
export const customHeaderControlProps = {
|
|
3
|
-
id:
|
|
4
|
+
id: Ids.DefaultHeaderId,
|
|
4
5
|
hideIcon: false,
|
|
5
6
|
hideTitle: false,
|
|
6
7
|
hideCloseButton: false,
|
|
@@ -22,7 +23,7 @@ export const customHeaderControlProps = {
|
|
|
22
23
|
},
|
|
23
24
|
minimizeButtonProps: {
|
|
24
25
|
id: "oc-lcw-header-minimizebutton",
|
|
25
|
-
type:
|
|
26
|
+
type: ButtonTypes.Icon,
|
|
26
27
|
imageIconProps: {
|
|
27
28
|
src: MinimizeChatButtonIconBase64,
|
|
28
29
|
styles: {
|
|
@@ -35,7 +36,7 @@ export const customHeaderControlProps = {
|
|
|
35
36
|
},
|
|
36
37
|
closeButtonProps: {
|
|
37
38
|
id: "oc-lcw-header-closebutton",
|
|
38
|
-
type:
|
|
39
|
+
type: ButtonTypes.Icon,
|
|
39
40
|
imageIconProps: {
|
|
40
41
|
src: CloseChatButtonIconBase64,
|
|
41
42
|
styles: {
|
|
@@ -47,12 +48,12 @@ export const customHeaderControlProps = {
|
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
headerIconProps: {
|
|
50
|
-
id:
|
|
51
|
+
id: Ids.HeaderIconId,
|
|
51
52
|
src: LegacyChatIconBase64,
|
|
52
|
-
alt:
|
|
53
|
+
alt: Texts.HeaderIcon
|
|
53
54
|
},
|
|
54
55
|
headerTitleProps: {
|
|
55
|
-
id:
|
|
56
|
-
text:
|
|
56
|
+
id: Ids.HeaderTitleId,
|
|
57
|
+
text: Texts.HeaderTitle
|
|
57
58
|
}
|
|
58
59
|
};
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Label } from "@fluentui/react";
|
|
3
3
|
import { FontIcon } from "@fluentui/react/lib/Icon";
|
|
4
4
|
import { mergeStyles } from "@fluentui/style-utilities";
|
|
5
|
+
import { Ids } from "../../../../common/Constants";
|
|
5
6
|
const iconClass = mergeStyles({
|
|
6
7
|
fontSize: 40,
|
|
7
8
|
height: 40,
|
|
@@ -23,6 +24,6 @@ export const defaultHeaderComponentOverrides = {
|
|
|
23
24
|
}),
|
|
24
25
|
headerTitle: /*#__PURE__*/React.createElement(Label, {
|
|
25
26
|
styles: labelClass,
|
|
26
|
-
id:
|
|
27
|
+
id: Ids.HeaderTitleId
|
|
27
28
|
}, "Hi, there!")
|
|
28
29
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ModernChatIconBase64 } from "../../../../assets/Icons";
|
|
2
|
+
import { ButtonTypes, IconNames, Ids, Texts } from "../../../../common/Constants";
|
|
2
3
|
export const defaultHeaderControlProps = {
|
|
3
|
-
id:
|
|
4
|
+
id: Ids.DefaultHeaderId,
|
|
4
5
|
hideIcon: false,
|
|
5
6
|
hideTitle: false,
|
|
6
7
|
hideCloseButton: false,
|
|
@@ -21,22 +22,22 @@ export const defaultHeaderControlProps = {
|
|
|
21
22
|
children: []
|
|
22
23
|
},
|
|
23
24
|
minimizeButtonProps: {
|
|
24
|
-
id:
|
|
25
|
-
type:
|
|
26
|
-
iconName:
|
|
25
|
+
id: Ids.MinimizeButtonId,
|
|
26
|
+
type: ButtonTypes.Icon,
|
|
27
|
+
iconName: IconNames.ChromeMinimize
|
|
27
28
|
},
|
|
28
29
|
closeButtonProps: {
|
|
29
|
-
id:
|
|
30
|
-
type:
|
|
31
|
-
iconName:
|
|
30
|
+
id: Ids.CloseButtonId,
|
|
31
|
+
type: ButtonTypes.Icon,
|
|
32
|
+
iconName: IconNames.ChromeClose
|
|
32
33
|
},
|
|
33
34
|
headerIconProps: {
|
|
34
|
-
id:
|
|
35
|
+
id: Ids.HeaderIconId,
|
|
35
36
|
src: ModernChatIconBase64,
|
|
36
|
-
alt:
|
|
37
|
+
alt: Texts.HeaderIcon
|
|
37
38
|
},
|
|
38
39
|
headerTitleProps: {
|
|
39
|
-
id:
|
|
40
|
-
text:
|
|
40
|
+
id: Ids.HeaderTitleId,
|
|
41
|
+
text: Texts.HeaderTitle
|
|
41
42
|
}
|
|
42
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ElementType } from "../../../common/Constants";
|
|
2
|
+
import { AriaLabels, ElementType, EventNames, IconNames, Texts } from "../../../common/Constants";
|
|
3
3
|
import CommandButton from "../../common/commandbutton/CommandButton";
|
|
4
4
|
|
|
5
5
|
function MinimizeButton(props) {
|
|
@@ -9,19 +9,19 @@ function MinimizeButton(props) {
|
|
|
9
9
|
const customEvent = {
|
|
10
10
|
elementType: ElementType.HeaderMinimizeButton,
|
|
11
11
|
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
12
|
-
eventName:
|
|
12
|
+
eventName: EventNames.OnClick
|
|
13
13
|
};
|
|
14
14
|
return /*#__PURE__*/React.createElement(CommandButton, {
|
|
15
15
|
id: props === null || props === void 0 ? void 0 : props.id,
|
|
16
16
|
type: type,
|
|
17
|
-
text: props.text ??
|
|
17
|
+
text: props.text ?? Texts.MinimizeText,
|
|
18
18
|
styles: props.styles,
|
|
19
19
|
hoverStyles: props.hoverStyles,
|
|
20
20
|
focusStyles: props.focusStyles,
|
|
21
|
-
iconName: props.iconName ??
|
|
21
|
+
iconName: props.iconName ?? IconNames.ChromeMinimize,
|
|
22
22
|
imageIconProps: props.imageIconProps,
|
|
23
23
|
onClick: props.onClick,
|
|
24
|
-
ariaLabel: props.ariaLabel ??
|
|
24
|
+
ariaLabel: props.ariaLabel ?? AriaLabels.Minimize,
|
|
25
25
|
className: props.className,
|
|
26
26
|
customEvent: customEvent
|
|
27
27
|
});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Regex } from "../../../../../common/Constants";
|
|
1
|
+
import { AriaLabels, Ids, Regex, Texts } from "../../../../../common/Constants";
|
|
2
2
|
export const defaultInputValidationPaneControlProps = {
|
|
3
|
-
id:
|
|
3
|
+
id: Ids.DefaultInputValidationPaneId,
|
|
4
4
|
dir: "ltr",
|
|
5
5
|
hideInputValidationPane: false,
|
|
6
|
-
inputValidationPaneAriaLabel:
|
|
6
|
+
inputValidationPaneAriaLabel: AriaLabels.EmailChatTranscriptPane,
|
|
7
7
|
hideTitle: false,
|
|
8
|
-
titleText:
|
|
8
|
+
titleText: Texts.InputValidationPaneTitleText,
|
|
9
9
|
hideSubtitle: false,
|
|
10
|
-
subtitleText:
|
|
11
|
-
inputId:
|
|
10
|
+
subtitleText: Texts.InputValidationPaneSubtitleText,
|
|
11
|
+
inputId: Ids.DefaultInputValidationPaneInputId,
|
|
12
12
|
inputInitialText: "",
|
|
13
13
|
hideInput: false,
|
|
14
|
-
inputAriaLabel:
|
|
14
|
+
inputAriaLabel: AriaLabels.InputValidationPaneInput,
|
|
15
15
|
inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
|
|
16
|
-
invalidInputErrorMessageText:
|
|
16
|
+
invalidInputErrorMessageText: Texts.InvalidInputErrorMessageText,
|
|
17
17
|
isButtonGroupHorizontal: true,
|
|
18
18
|
hideSendButton: false,
|
|
19
19
|
enableSendButton: false,
|
|
20
|
-
sendButtonText:
|
|
21
|
-
sendButtonAriaLabel:
|
|
20
|
+
sendButtonText: Texts.SendButtonText,
|
|
21
|
+
sendButtonAriaLabel: AriaLabels.Send,
|
|
22
22
|
hideCancelButton: false,
|
|
23
|
-
cancelButtonText:
|
|
24
|
-
cancelButtonAriaLabel:
|
|
23
|
+
cancelButtonText: Texts.CancelButtonText,
|
|
24
|
+
cancelButtonAriaLabel: AriaLabels.Cancel,
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
26
|
onSend: function (input) {
|
|
27
27
|
console.log("on send");
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Regex } from "../../../../../common/Constants";
|
|
1
|
+
import { AriaLabels, Ids, Regex, Texts } from "../../../../../common/Constants";
|
|
2
2
|
export const presetTwoInputValidationPaneControlProps = {
|
|
3
|
-
id:
|
|
3
|
+
id: Ids.DefaultInputValidationPaneId,
|
|
4
4
|
dir: "ltr",
|
|
5
5
|
hideInputValidationPane: false,
|
|
6
|
-
inputValidationPaneAriaLabel:
|
|
6
|
+
inputValidationPaneAriaLabel: AriaLabels.EmailChatTranscriptPane,
|
|
7
7
|
hideTitle: false,
|
|
8
|
-
titleText:
|
|
8
|
+
titleText: Texts.InputValidationPaneTitleText,
|
|
9
9
|
hideSubtitle: false,
|
|
10
|
-
subtitleText:
|
|
11
|
-
inputId:
|
|
10
|
+
subtitleText: Texts.InputValidationPaneSubtitleText,
|
|
11
|
+
inputId: Ids.DefaultInputValidationPaneInputId,
|
|
12
12
|
hideInput: false,
|
|
13
|
-
inputAriaLabel:
|
|
13
|
+
inputAriaLabel: AriaLabels.InputValidationPaneInput,
|
|
14
14
|
inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
|
|
15
|
-
invalidInputErrorMessageText:
|
|
15
|
+
invalidInputErrorMessageText: Texts.InvalidInputErrorMessageText,
|
|
16
16
|
isButtonGroupHorizontal: false,
|
|
17
17
|
hideSendButton: false,
|
|
18
18
|
enableSendButton: true,
|
|
19
|
-
sendButtonText:
|
|
20
|
-
sendButtonAriaLabel:
|
|
19
|
+
sendButtonText: Texts.SendButtonText,
|
|
20
|
+
sendButtonAriaLabel: AriaLabels.Send,
|
|
21
21
|
hideCancelButton: false,
|
|
22
|
-
cancelButtonText:
|
|
23
|
-
cancelButtonAriaLabel:
|
|
22
|
+
cancelButtonText: Texts.CancelButtonText,
|
|
23
|
+
cancelButtonAriaLabel: AriaLabels.Cancel,
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
25
|
onSend: function (input) {
|
|
26
26
|
console.log("on send");
|
|
@@ -13,7 +13,7 @@ import { defaultLoadingPaneTitleStyles } from "./common/defaultProps/defaultStyl
|
|
|
13
13
|
function LoadingPane(props) {
|
|
14
14
|
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$componentOverr, _props$styleProps8, _props$styleProps8$cl, _props$controlProps6, _props$componentOverr2, _props$styleProps9, _props$styleProps9$cl, _props$controlProps7, _props$controlProps8, _props$componentOverr3, _props$styleProps10, _props$styleProps10$c, _props$controlProps9, _props$controlProps10, _props$componentOverr4, _props$styleProps11, _props$styleProps11$c, _props$controlProps11, _props$controlProps12, _props$componentOverr5, _props$styleProps12, _props$styleProps12$c, _props$controlProps13;
|
|
15
15
|
|
|
16
|
-
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ??
|
|
16
|
+
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultLoadingPaneControlProps.id;
|
|
17
17
|
const containerStyles = {
|
|
18
18
|
root: Object.assign({}, defaultLoadingPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
|
|
19
19
|
};
|
package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { Ids, Texts } from "../../../../common/Constants";
|
|
1
2
|
export const defaultLoadingPaneControlProps = {
|
|
2
|
-
id:
|
|
3
|
+
id: Ids.DefaultLoadingPaneId,
|
|
3
4
|
dir: "auto",
|
|
4
5
|
hideLoadingPane: false,
|
|
5
6
|
hideIcon: false,
|
|
6
7
|
hideTitle: false,
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.LoadingPaneTitleText,
|
|
8
9
|
hideSubtitle: false,
|
|
9
|
-
subtitleText:
|
|
10
|
+
subtitleText: Texts.LoadingPaneSubtitleText,
|
|
10
11
|
hideSpinner: false,
|
|
11
12
|
hideSpinnerText: false,
|
|
12
|
-
spinnerText:
|
|
13
|
+
spinnerText: Texts.LoadingPaneSpinnerText
|
|
13
14
|
};
|
package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultLoadingPaneControlProps } from "../defaultProps/defaultLoadingPaneControlProps";
|
|
2
2
|
export const presetOneLoadingPaneControlProps = { ...defaultLoadingPaneControlProps,
|
|
3
|
-
id: "
|
|
3
|
+
id: "lcw-loading-pane-preset1",
|
|
4
4
|
dir: "rtl"
|
|
5
5
|
};
|
package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SpinnerSize } from "@fluentui/react";
|
|
2
2
|
import { defaultLoadingPaneControlProps } from "../defaultProps/defaultLoadingPaneControlProps";
|
|
3
3
|
export const presetThreeLoadingPaneControlProps = { ...defaultLoadingPaneControlProps,
|
|
4
|
-
id: "
|
|
4
|
+
id: "lcw-loading-pane-preset3",
|
|
5
5
|
titleText: "Please Wait ...",
|
|
6
6
|
subtitleText: "Loading Content",
|
|
7
7
|
spinnerText: "Processing ...",
|
package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SpinnerSize } from "@fluentui/react";
|
|
2
2
|
import { defaultLoadingPaneControlProps } from "../defaultProps/defaultLoadingPaneControlProps";
|
|
3
3
|
export const presetTwoLoadingPaneControlProps = { ...defaultLoadingPaneControlProps,
|
|
4
|
-
id: "
|
|
4
|
+
id: "lcw-loading-pane-preset2",
|
|
5
5
|
hideIcon: true,
|
|
6
6
|
hideTitle: true,
|
|
7
7
|
hideSubtitle: true,
|
package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Ids, Texts } from "../../../../common/Constants";
|
|
1
2
|
export const defaultOOOHPaneControlProps = {
|
|
2
|
-
id:
|
|
3
|
+
id: Ids.DefaultOOOHPaneId,
|
|
3
4
|
dir: "auto",
|
|
4
5
|
hideOOOHPane: false,
|
|
5
6
|
hideTitle: false,
|
|
6
7
|
role: "alert",
|
|
7
|
-
titleText:
|
|
8
|
+
titleText: Texts.OOOHPaneTitleText,
|
|
8
9
|
openLinkInNewTab: false
|
|
9
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultOOOHPaneControlProps } from "../defaultProps/defaultOOOHPaneControlProps";
|
|
2
2
|
export const presetFourOOOHPaneControlProps = { ...defaultOOOHPaneControlProps,
|
|
3
|
-
id: "
|
|
3
|
+
id: "lcw-out-of-office-hours-pane-preset1",
|
|
4
4
|
titleText: "We are out of office. Please contact us here https://www.microsoft.com for further assisstance",
|
|
5
5
|
openLinkInNewTab: true
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultOOOHPaneControlProps } from "../defaultProps/defaultOOOHPaneControlProps";
|
|
2
2
|
export const presetOneOOOHPaneControlProps = { ...defaultOOOHPaneControlProps,
|
|
3
|
-
id: "
|
|
3
|
+
id: "lcw-out-of-office-hours-pane-preset1",
|
|
4
4
|
dir: "rtl"
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultOOOHPaneControlProps } from "../defaultProps/defaultOOOHPaneControlProps";
|
|
2
2
|
export const presetTwoOOOHPaneControlProps = { ...defaultOOOHPaneControlProps,
|
|
3
|
-
id: "
|
|
3
|
+
id: "lcw-out-of-office-hours-pane-preset2",
|
|
4
4
|
titleText: "Sorry but we are not operating during these hours!!"
|
|
5
5
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Ids, Texts } from "../../../../common/Constants";
|
|
1
2
|
export const defaultPostChatSurveyPaneControlProps = {
|
|
2
|
-
id:
|
|
3
|
-
title:
|
|
3
|
+
id: Ids.DefaultPostChatSurveyPaneId,
|
|
4
|
+
title: Texts.PostChatSurveyPaneTitleText,
|
|
4
5
|
surveyURL: ""
|
|
5
6
|
};
|
|
@@ -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();
|