@microsoft/omnichannel-chat-components 0.1.0-main.099196c → 0.1.0-main.1756db4
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 +1 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +30 -0
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +30 -0
- package/lib/cjs/components/chatbutton/ChatButton.js +13 -6
- package/lib/cjs/components/common/commandbutton/CommandButton.js +2 -1
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +2 -1
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +15 -13
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +17 -15
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/esm/common/Constants.js +1 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +32 -2
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +32 -2
- package/lib/esm/components/chatbutton/ChatButton.js +13 -6
- package/lib/esm/components/common/commandbutton/CommandButton.js +2 -1
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +2 -1
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +15 -13
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +17 -15
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/types/common/Constants.d.ts +5 -0
- package/lib/types/components/callingcontainer/subcomponents/CurrentCall/interfaces/ICurrentCallStyleProps.d.ts +0 -4
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export const AccessibilityBrightnessRatio = 1.2;
|
|
|
7
7
|
/* App constants*/
|
|
8
8
|
|
|
9
9
|
export const BROADCAST_CHANNEL_NAME = "omnichannel_broadcast_channel";
|
|
10
|
-
export const KeyCodes = (_class = class KeyCodes {}, _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "ESCAPE", "Escape"), _defineProperty(_class, "SPACE", "Space"), _class);
|
|
10
|
+
export const KeyCodes = (_class = class KeyCodes {}, _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "ESCAPE", "Escape"), _defineProperty(_class, "SPACE", "Space"), _defineProperty(_class, "DeclineCallHotKey", "D"), _defineProperty(_class, "AcceptAudioCallHotKey", "S"), _defineProperty(_class, "AcceptVideoCallHotKey", "A"), _defineProperty(_class, "ToggleMicHotKey", "M"), _defineProperty(_class, "ToggleCameraHotKey", "O"), _class);
|
|
11
11
|
export const Regex = (_class2 = class Regex {}, _defineProperty(_class2, "EmailRegex", "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"), _defineProperty(_class2, "URLRegex", /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi), _class2);
|
|
12
12
|
export let ElementType;
|
|
13
13
|
|
|
@@ -4,12 +4,12 @@ import * as React from "react";
|
|
|
4
4
|
import { IconButton, Stack } from "@fluentui/react";
|
|
5
5
|
import { BroadcastService } from "../../../../services/BroadcastService";
|
|
6
6
|
import CommandButton from "../../../common/commandbutton/CommandButton";
|
|
7
|
-
import { ElementType } from "../../../../common/Constants";
|
|
7
|
+
import { ElementType, KeyCodes } from "../../../../common/Constants";
|
|
8
8
|
import Timer from "../Timer/Timer";
|
|
9
9
|
import { defaultCurrentCallProps } from "./common/defaultProps/defaultCurrentCallProps";
|
|
10
10
|
import { processCustomComponents } from "../../../../common/utils";
|
|
11
11
|
import { useBoolean } from "@fluentui/react-hooks";
|
|
12
|
-
import { useCallback } from "react";
|
|
12
|
+
import { useCallback, useEffect } from "react";
|
|
13
13
|
|
|
14
14
|
function CurrentCall(props) {
|
|
15
15
|
var _props$controlProps, _defaultCurrentCallPr, _props$controlProps2, _props$controlProps2$, _defaultCurrentCallPr2, _defaultCurrentCallPr3, _props$controlProps3, _props$controlProps3$, _defaultCurrentCallPr4, _defaultCurrentCallPr5, _props$controlProps4, _props$controlProps4$, _defaultCurrentCallPr6, _defaultCurrentCallPr7, _props$controlProps5, _props$controlProps5$, _defaultCurrentCallPr8, _defaultCurrentCallPr9, _props$controlProps6, _props$controlProps6$, _defaultCurrentCallPr10, _defaultCurrentCallPr11, _props$controlProps7, _props$controlProps7$, _defaultCurrentCallPr12, _defaultCurrentCallPr13, _props$controlProps8, _props$controlProps8$, _defaultCurrentCallPr14, _defaultCurrentCallPr15, _props$controlProps9, _props$controlProps10, _defaultCurrentCallPr16, _defaultCurrentCallPr17, _props$styleProps, _props$controlProps11, _props$controlProps12, _defaultCurrentCallPr18, _defaultCurrentCallPr19, _props$controlProps13, _props$controlProps14, _defaultCurrentCallPr20, _defaultCurrentCallPr21, _props$controlProps15, _props$controlProps16, _defaultCurrentCallPr22, _defaultCurrentCallPr23, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$controlProps20, _defaultCurrentCallPr24, _defaultCurrentCallPr25, _props$controlProps21, _props$controlProps22, _defaultCurrentCallPr26, _defaultCurrentCallPr27, _props$controlProps23, _props$controlProps24, _defaultCurrentCallPr28, _defaultCurrentCallPr29, _props$controlProps25, _props$controlProps26, _defaultCurrentCallPr30, _defaultCurrentCallPr31, _props$controlProps27, _props$controlProps28, _props$controlProps29, _props$controlProps30, _defaultCurrentCallPr32, _defaultCurrentCallPr33, _props$controlProps31, _props$controlProps32, _defaultCurrentCallPr34, _defaultCurrentCallPr35, _props$controlProps33, _props$controlProps34, _defaultCurrentCallPr36, _defaultCurrentCallPr37, _props$controlProps35, _props$controlProps36, _defaultCurrentCallPr38, _defaultCurrentCallPr39, _props$controlProps37, _defaultCurrentCallPr40, _props$controlProps38, _defaultCurrentCallPr41, _props$controlProps39, _defaultCurrentCallPr42, _props$controlProps40, _props$controlProps41, _props$controlProps42, _props$controlProps43, _defaultCurrentCallPr43, _defaultCurrentCallPr44, _props$controlProps44, _props$controlProps45, _defaultCurrentCallPr45, _defaultCurrentCallPr46, _props$controlProps46, _props$controlProps47, _defaultCurrentCallPr47, _defaultCurrentCallPr48, _props$controlProps48, _props$controlProps49, _defaultCurrentCallPr49, _defaultCurrentCallPr50, _props$controlProps50, _props$controlProps51, _props$controlProps52, _props$controlProps53, _defaultCurrentCallPr51, _defaultCurrentCallPr52, _props$controlProps54, _props$controlProps55, _defaultCurrentCallPr53, _defaultCurrentCallPr54, _props$controlProps56, _props$controlProps57, _defaultCurrentCallPr55, _defaultCurrentCallPr56, _props$controlProps58, _props$controlProps59, _defaultCurrentCallPr57, _defaultCurrentCallPr58, _defaultCurrentCallPr59, _props$controlProps60, _defaultCurrentCallPr60, _props$controlProps61, _defaultCurrentCallPr61, _props$styleProps2, _defaultCurrentCallPr62, _props$styleProps3, _defaultCurrentCallPr63, _props$styleProps4, _defaultCurrentCallPr67, _props$styleProps8, _defaultCurrentCallPr68, _props$styleProps9, _defaultCurrentCallPr69, _props$styleProps10, _defaultCurrentCallPr70, _props$styleProps11, _defaultCurrentCallPr71, _props$styleProps12, _props$controlProps68, _defaultCurrentCallPr72, _props$styleProps13, _props$styleProps13$c, _props$styleProps14, _props$styleProps14$c, _props$styleProps15, _props$styleProps15$c, _props$styleProps16, _props$styleProps16$c, _props$styleProps17, _props$styleProps17$c, _props$controlProps69, _props$controlProps70, _props$controlProps71, _props$controlProps72, _props$controlProps73, _props$controlProps74, _props$controlProps75, _props$controlProps76, _props$controlProps77, _defaultCurrentCallPr73, _defaultCurrentCallPr74, _props$controlProps78, _props$controlProps79, _defaultCurrentCallPr75, _defaultCurrentCallPr76, _props$controlProps80, _props$controlProps81, _props$controlProps82, _props$controlProps83, _defaultCurrentCallPr77, _defaultCurrentCallPr78, _props$controlProps84, _props$controlProps85, _defaultCurrentCallPr79, _defaultCurrentCallPr80, _props$controlProps86, _props$controlProps87, _props$controlProps88, _props$controlProps89, _props$controlProps90, _defaultCurrentCallPr81, _defaultCurrentCallPr82, _props$controlProps91, _props$controlProps92, _defaultCurrentCallPr83, _defaultCurrentCallPr84, _props$controlProps93, _props$controlProps94, _props$controlProps95, _props$controlProps96, _defaultCurrentCallPr85, _defaultCurrentCallPr86, _props$controlProps97, _props$controlProps98, _defaultCurrentCallPr87, _defaultCurrentCallPr88, _props$controlProps99, _props$controlProps100, _props$controlProps101;
|
|
@@ -189,6 +189,36 @@ function CurrentCall(props) {
|
|
|
189
189
|
}
|
|
190
190
|
}, []);
|
|
191
191
|
const hideCallTimer = ((_props$controlProps68 = props.controlProps) === null || _props$controlProps68 === void 0 ? void 0 : _props$controlProps68.hideCallTimer) ?? ((_defaultCurrentCallPr72 = defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr72 === void 0 ? void 0 : _defaultCurrentCallPr72.hideCallTimer);
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
const endCallShortcut = e => e.key === KeyCodes.ENTER;
|
|
194
|
+
|
|
195
|
+
const toggleMicShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.ToggleMicHotKey;
|
|
196
|
+
|
|
197
|
+
const toggleVideoShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.ToggleCameraHotKey;
|
|
198
|
+
|
|
199
|
+
const shortcutKeysHandler = e => {
|
|
200
|
+
if (endCallShortcut(e)) {
|
|
201
|
+
handleEndCallClick();
|
|
202
|
+
} else if (toggleMicShortcut(e)) {
|
|
203
|
+
handleMicClick();
|
|
204
|
+
} else if (toggleVideoShortcut(e)) {
|
|
205
|
+
handleVideoOffClick();
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const ignoreDefault = e => {
|
|
210
|
+
if (endCallShortcut(e) || toggleMicShortcut(e) || toggleVideoShortcut(e)) {
|
|
211
|
+
e.preventDefault();
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
window.addEventListener("keyup", shortcutKeysHandler);
|
|
216
|
+
window.addEventListener("keydown", ignoreDefault);
|
|
217
|
+
return () => {
|
|
218
|
+
window.removeEventListener("keyup", shortcutKeysHandler);
|
|
219
|
+
window.removeEventListener("keydown", ignoreDefault);
|
|
220
|
+
};
|
|
221
|
+
}, []);
|
|
192
222
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
193
223
|
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.currentCallComponentClassName,
|
|
194
224
|
horizontalAlign: "space-between",
|
|
@@ -47,18 +47,6 @@ export const customizedCurrentCallStyleProps = {
|
|
|
47
47
|
width: "50px",
|
|
48
48
|
margin: "1px"
|
|
49
49
|
},
|
|
50
|
-
currentCallTimerStyleProps: {
|
|
51
|
-
borderRadius: "2px",
|
|
52
|
-
margin: "1px",
|
|
53
|
-
color: "white",
|
|
54
|
-
paddingTop: "18px",
|
|
55
|
-
fontSize: 12,
|
|
56
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
57
|
-
backgroundColor: "transparent",
|
|
58
|
-
height: "50px",
|
|
59
|
-
width: "55px",
|
|
60
|
-
textAlign: "center"
|
|
61
|
-
},
|
|
62
50
|
videoTileStyleProps: {
|
|
63
51
|
minHeight: "180px",
|
|
64
52
|
height: "300px",
|
|
@@ -39,18 +39,6 @@ export const defaultCurrentCallStyleProps = {
|
|
|
39
39
|
width: "50px",
|
|
40
40
|
fontSize: "18px"
|
|
41
41
|
},
|
|
42
|
-
currentCallTimerStyleProps: {
|
|
43
|
-
borderRadius: "2px",
|
|
44
|
-
margin: "1px",
|
|
45
|
-
color: "#FFFFFF",
|
|
46
|
-
paddingTop: "18px",
|
|
47
|
-
fontSize: 12,
|
|
48
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
49
|
-
backgroundColor: "darkgrey",
|
|
50
|
-
height: "45px",
|
|
51
|
-
width: "50px",
|
|
52
|
-
textAlign: "center"
|
|
53
|
-
},
|
|
54
42
|
videoTileStyleProps: {
|
|
55
43
|
width: "100%",
|
|
56
44
|
marginLeft: "auto",
|
|
@@ -3,11 +3,11 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Label, Stack } from "@fluentui/react";
|
|
5
5
|
import CommandButton from "../../../common/commandbutton/CommandButton";
|
|
6
|
-
import { ElementType } from "../../../../common/Constants";
|
|
6
|
+
import { ElementType, KeyCodes } from "../../../../common/Constants";
|
|
7
7
|
import { decodeComponentString } from "../../../../common/decodeComponentString";
|
|
8
8
|
import { defaultIncomingCallProps } from "./common/defaultProps/defaultIncomingCallProps";
|
|
9
9
|
import { processCustomComponents } from "../../../../common/utils";
|
|
10
|
-
import { useCallback } from "react";
|
|
10
|
+
import { useCallback, useEffect } from "react";
|
|
11
11
|
|
|
12
12
|
function IncomingCall(props) {
|
|
13
13
|
var _props$controlProps, _defaultIncomingCallP, _props$controlProps2, _props$controlProps2$, _defaultIncomingCallP2, _defaultIncomingCallP3, _props$controlProps3, _props$controlProps3$, _defaultIncomingCallP4, _defaultIncomingCallP5, _props$controlProps4, _props$controlProps4$, _defaultIncomingCallP6, _defaultIncomingCallP7, _defaultIncomingCallP8, _props$styleProps, _props$controlProps5, _props$controlProps5$, _defaultIncomingCallP9, _defaultIncomingCallP10, _props$controlProps6, _props$controlProps6$, _defaultIncomingCallP11, _defaultIncomingCallP12, _props$controlProps7, _props$controlProps7$, _defaultIncomingCallP13, _defaultIncomingCallP14, _defaultIncomingCallP15, _props$controlProps8, _defaultIncomingCallP16, _props$controlProps9, _defaultIncomingCallP17, _props$controlProps10, _defaultIncomingCallP18, _props$controlProps11, _defaultIncomingCallP19, _props$styleProps2, _defaultIncomingCallP20, _props$styleProps3, _defaultIncomingCallP21, _props$styleProps4, _defaultIncomingCallP22, _props$styleProps5, _defaultIncomingCallP23, _props$styleProps6, _defaultIncomingCallP24, _props$styleProps7, _defaultIncomingCallP25, _props$styleProps8, _defaultIncomingCallP26, _props$styleProps9, _props$styleProps10, _props$controlProps18, _defaultIncomingCallP27, _props$controlProps19, _props$componentOverr, _props$controlProps20, _props$controlProps21, _props$controlProps22, _props$controlProps23, _props$controlProps24, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$controlProps28;
|
|
@@ -84,6 +84,36 @@ function IncomingCall(props) {
|
|
|
84
84
|
(_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioCallClick();
|
|
85
85
|
}
|
|
86
86
|
}, []);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const declineCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.DeclineCallHotKey;
|
|
89
|
+
|
|
90
|
+
const acceptAudioCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.AcceptAudioCallHotKey;
|
|
91
|
+
|
|
92
|
+
const acceptVideoCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.AcceptVideoCallHotKey;
|
|
93
|
+
|
|
94
|
+
const shortcutKeysHandler = e => {
|
|
95
|
+
if (declineCallShortcut(e)) {
|
|
96
|
+
handleDeclineCallClick();
|
|
97
|
+
} else if (acceptAudioCallShortcut(e)) {
|
|
98
|
+
handleAudioCallClick();
|
|
99
|
+
} else if (acceptVideoCallShortcut(e)) {
|
|
100
|
+
handleVideoCallClick();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const ignoreDefault = e => {
|
|
105
|
+
if (declineCallShortcut(e) || acceptAudioCallShortcut(e) || acceptVideoCallShortcut(e)) {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
window.addEventListener("keyup", shortcutKeysHandler);
|
|
111
|
+
window.addEventListener("keydown", ignoreDefault);
|
|
112
|
+
return () => {
|
|
113
|
+
window.removeEventListener("keyup", shortcutKeysHandler);
|
|
114
|
+
window.removeEventListener("keydown", ignoreDefault);
|
|
115
|
+
};
|
|
116
|
+
}, []);
|
|
87
117
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
88
118
|
horizontal: true,
|
|
89
119
|
className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
|
|
@@ -12,17 +12,24 @@ import { defaultChatButtonTextContainerStyles } from "./common/defaultStyles/def
|
|
|
12
12
|
import { defaultChatButtonTitleStyles } from "./common/defaultStyles/defaultChatButtonTitleStyles";
|
|
13
13
|
|
|
14
14
|
function NotificationBubble(props, parentId) {
|
|
15
|
-
var _props$styleProps, _props$controlProps
|
|
15
|
+
var _props$styleProps, _props$controlProps;
|
|
16
16
|
|
|
17
17
|
const notificationBubbleStyles = {
|
|
18
18
|
root: Object.assign({}, defaultChatButtonNotificationBubbleStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.notificationBubbleStyleProps)
|
|
19
19
|
};
|
|
20
20
|
const unreadMessageCount = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.unreadMessageCount) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.unreadMessageCount);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
if (unreadMessageCount !== "0") {
|
|
23
|
+
var _props$componentOverr, _props$styleProps2, _props$styleProps2$cl;
|
|
24
|
+
|
|
25
|
+
return decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/React.createElement(Label, {
|
|
26
|
+
styles: notificationBubbleStyles,
|
|
27
|
+
className: (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : (_props$styleProps2$cl = _props$styleProps2.classNames) === null || _props$styleProps2$cl === void 0 ? void 0 : _props$styleProps2$cl.notificationBubbleClassName,
|
|
28
|
+
id: parentId + "-notification-bubble"
|
|
29
|
+
}, unreadMessageCount);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return null;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
function IconContainer(props, parentId) {
|
|
@@ -16,7 +16,8 @@ function CommandButton(props) {
|
|
|
16
16
|
const iconButtonStyles = {
|
|
17
17
|
root: props.styles,
|
|
18
18
|
rootHovered: props.hoverStyles,
|
|
19
|
-
rootFocused: props.focusStyles
|
|
19
|
+
rootFocused: props.focusStyles,
|
|
20
|
+
rootPressed: props.hoverStyles
|
|
20
21
|
};
|
|
21
22
|
const handleOnClick = useCallback(() => {
|
|
22
23
|
if (props !== null && props !== void 0 && props.onClick) {
|
|
@@ -17,7 +17,7 @@ import { defaultConfirmationPaneConfirmButtonFocusedStyles } from "./common/defa
|
|
|
17
17
|
import { defaultConfirmationPaneCancelButtonFocusedStyles } from "./common/defaultStyles/defaultConfirmationPaneCancelButtonFocusedStyles";
|
|
18
18
|
|
|
19
19
|
function ConfirmationPane(props) {
|
|
20
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$
|
|
20
|
+
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$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$styleProps13, _props$styleProps13$c, _props$controlProps9, _props$controlProps10, _props$componentOverr2, _props$styleProps14, _props$styleProps14$c, _props$controlProps11, _props$styleProps15, _props$styleProps15$c, _props$controlProps12, _props$componentOverr3, _props$styleProps16, _props$styleProps16$c, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$componentOverr4, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17;
|
|
21
21
|
|
|
22
22
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultConfirmationPaneControlProps.id;
|
|
23
23
|
const handleConfirmClick = useCallback(() => {
|
|
@@ -65,12 +65,14 @@ function ConfirmationPane(props) {
|
|
|
65
65
|
const confirmButtonStyles = {
|
|
66
66
|
root: Object.assign({}, defaultConfirmationPaneConfirmButtonStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.confirmButtonStyleProps),
|
|
67
67
|
rootHovered: Object.assign({}, defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.confirmButtonHoveredStyleProps),
|
|
68
|
-
rootFocused: Object.assign({}, defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps)
|
|
68
|
+
rootFocused: Object.assign({}, defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps),
|
|
69
|
+
rootPressed: Object.assign({}, defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.confirmButtonHoveredStyleProps)
|
|
69
70
|
};
|
|
70
71
|
const cancelButtonStyles = {
|
|
71
|
-
root: Object.assign({}, defaultConfirmationPaneCancelButtonStyles, (_props$
|
|
72
|
-
rootHovered: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$
|
|
73
|
-
rootFocused: Object.assign({}, defaultConfirmationPaneCancelButtonFocusedStyles, (_props$
|
|
72
|
+
root: Object.assign({}, defaultConfirmationPaneCancelButtonStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.cancelButtonStyleProps),
|
|
73
|
+
rootHovered: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.cancelButtonHoveredStyleProps),
|
|
74
|
+
rootFocused: Object.assign({}, defaultConfirmationPaneCancelButtonFocusedStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.cancelButtonFocusedStyleProps),
|
|
75
|
+
rootPressed: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.cancelButtonHoveredStyleProps)
|
|
74
76
|
};
|
|
75
77
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
76
78
|
id: elementId,
|
|
@@ -81,29 +83,29 @@ function ConfirmationPane(props) {
|
|
|
81
83
|
"aria-labelledby": elementId + "-title",
|
|
82
84
|
"aria-describedby": elementId + "-subtitle"
|
|
83
85
|
}, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
84
|
-
className: (_props$
|
|
86
|
+
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.titleClassName,
|
|
85
87
|
styles: titleStyles,
|
|
86
88
|
tabIndex: -1,
|
|
87
89
|
id: elementId + "-title"
|
|
88
90
|
}, ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) || defaultConfirmationPaneControlProps.titleText)), !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
89
|
-
className: (_props$
|
|
91
|
+
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.subtitleClassName,
|
|
90
92
|
styles: subtitleStyles,
|
|
91
93
|
tabIndex: -1,
|
|
92
94
|
id: elementId + "-subtitle"
|
|
93
95
|
}, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) || defaultConfirmationPaneControlProps.subtitleText)), /*#__PURE__*/React.createElement(Stack, {
|
|
94
96
|
horizontal: true,
|
|
95
|
-
className: (_props$
|
|
97
|
+
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.buttonGroupClassName,
|
|
96
98
|
styles: buttonGroupStyles,
|
|
97
99
|
id: elementId + "-buttongroup"
|
|
98
100
|
}, !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideConfirmButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.confirmButton) || /*#__PURE__*/React.createElement(PrimaryButton, {
|
|
99
|
-
className: (_props$
|
|
101
|
+
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.confirmButtonClassName,
|
|
100
102
|
styles: confirmButtonStyles,
|
|
101
103
|
text: ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.confirmButtonText) || defaultConfirmationPaneControlProps.confirmButtonText,
|
|
102
104
|
onClick: handleConfirmClick,
|
|
103
105
|
id: elementId + "-confirmbutton",
|
|
104
106
|
ariaLabel: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.confirmButtonAriaLabel) || defaultConfirmationPaneControlProps.confirmButtonAriaLabel
|
|
105
107
|
})), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideCancelButton) && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.cancelButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
106
|
-
className: (_props$
|
|
108
|
+
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.cancelButtonClassName,
|
|
107
109
|
styles: cancelButtonStyles,
|
|
108
110
|
text: ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.cancelButtonText) || defaultConfirmationPaneControlProps.cancelButtonText,
|
|
109
111
|
onClick: handleCancelClick,
|
|
@@ -11,7 +11,8 @@ function AudioNotificationButton(props) {
|
|
|
11
11
|
const iconButtonStyles = {
|
|
12
12
|
root: props === null || props === void 0 ? void 0 : props.styles,
|
|
13
13
|
rootHovered: props === null || props === void 0 ? void 0 : props.hoverStyles,
|
|
14
|
-
rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles
|
|
14
|
+
rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles,
|
|
15
|
+
rootPressed: props === null || props === void 0 ? void 0 : props.hoverStyles
|
|
15
16
|
}; //imageIconProps > iconName
|
|
16
17
|
|
|
17
18
|
const volume0Icon = props.imageToggleIconProps ? {
|
|
@@ -19,7 +19,7 @@ import { defaultInputValidationPaneTitleStyles } from "./common/default/defaultS
|
|
|
19
19
|
import { generateEventName } from "../../common/utils";
|
|
20
20
|
|
|
21
21
|
function InputValidationPane(props) {
|
|
22
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps14, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$styleProps13, _props$styleProps14, _props$controlProps15, _props$
|
|
22
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps14, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$styleProps13, _props$styleProps14, _props$styleProps15, _props$styleProps16, _props$controlProps15, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17, _props$styleProps18, _props$styleProps18$c, _props$controlProps18, _props$componentOverr, _props$styleProps19, _props$styleProps19$c, _props$controlProps19, _props$controlProps20, _props$componentOverr2, _props$styleProps20, _props$styleProps20$c, _props$controlProps21, _props$controlProps22, _props$componentOverr3, _props$styleProps21, _props$styleProps21$c, _props$controlProps23, _props$controlProps24, _props$componentOverr4, _props$styleProps22, _props$styleProps22$c, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$styleProps23, _props$styleProps23$c, _props$controlProps28, _props$componentOverr5, _props$styleProps24, _props$styleProps24$c, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$controlProps32, _props$componentOverr6, _props$styleProps25, _props$styleProps25$c, _props$controlProps33, _props$controlProps34, _props$controlProps35;
|
|
23
23
|
|
|
24
24
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultInputValidationPaneControlProps.id;
|
|
25
25
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -171,14 +171,16 @@ function InputValidationPane(props) {
|
|
|
171
171
|
};
|
|
172
172
|
const sendButtonStyles = {
|
|
173
173
|
root: Object.assign({}, defaultInputValidationPaneSendButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.sendButtonStyleProps),
|
|
174
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.sendButtonHoveredStyleProps)
|
|
174
|
+
rootHovered: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.sendButtonHoveredStyleProps),
|
|
175
|
+
rootPressed: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.sendButtonHoveredStyleProps)
|
|
175
176
|
};
|
|
176
177
|
const cancelButtonStyles = {
|
|
177
|
-
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$
|
|
178
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$
|
|
178
|
+
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.cancelButtonStyleProps),
|
|
179
|
+
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : _props$styleProps15.cancelButtonHoveredStyleProps),
|
|
180
|
+
rootPressed: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : _props$styleProps16.cancelButtonHoveredStyleProps)
|
|
179
181
|
};
|
|
180
182
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideInputValidationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
181
|
-
className: (_props$
|
|
183
|
+
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.containerClassName,
|
|
182
184
|
id: elementId,
|
|
183
185
|
tabIndex: -1,
|
|
184
186
|
onKeyDown: handleEscKeyDown,
|
|
@@ -186,22 +188,22 @@ function InputValidationPane(props) {
|
|
|
186
188
|
"aria-label": ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.inputValidationPaneAriaLabel) || defaultInputValidationPaneControlProps.inputValidationPaneAriaLabel,
|
|
187
189
|
styles: containerStyles
|
|
188
190
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
189
|
-
className: (_props$
|
|
191
|
+
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.headerGroupClassName,
|
|
190
192
|
styles: headerGroupStyles,
|
|
191
193
|
tabIndex: -1,
|
|
192
194
|
id: elementId + "-headergroup"
|
|
193
195
|
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
194
|
-
className: (_props$
|
|
196
|
+
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.titleClassName,
|
|
195
197
|
styles: titleStyles,
|
|
196
198
|
tabIndex: -1,
|
|
197
199
|
id: elementId + "-title"
|
|
198
200
|
}, ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.titleText) || defaultInputValidationPaneControlProps.titleText)), !((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
199
|
-
className: (_props$
|
|
201
|
+
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.subtitleClassName,
|
|
200
202
|
styles: subtitleStyles,
|
|
201
203
|
tabIndex: -1,
|
|
202
204
|
id: elementId + "-subtitle"
|
|
203
205
|
}, ((_props$controlProps21 = props.controlProps) === null || _props$controlProps21 === void 0 ? void 0 : _props$controlProps21.subtitleText) || defaultInputValidationPaneControlProps.subtitleText)), !((_props$controlProps22 = props.controlProps) !== null && _props$controlProps22 !== void 0 && _props$controlProps22.hideInput) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.input) || /*#__PURE__*/React.createElement(TextField, {
|
|
204
|
-
className: (_props$
|
|
206
|
+
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.inputClassName,
|
|
205
207
|
styles: isInvalidInput ? inputWithErrorMessageStyles : inputStyles,
|
|
206
208
|
tabIndex: 0,
|
|
207
209
|
value: inputValue ?? defaultInputValidationPaneControlProps.inputInitialText,
|
|
@@ -211,7 +213,7 @@ function InputValidationPane(props) {
|
|
|
211
213
|
onChange: handleInputChange,
|
|
212
214
|
onKeyDown: handleInputKeyDown
|
|
213
215
|
})), isInvalidInput && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/React.createElement(Stack, {
|
|
214
|
-
className: (_props$
|
|
216
|
+
className: (_props$styleProps22 = props.styleProps) === null || _props$styleProps22 === void 0 ? void 0 : (_props$styleProps22$c = _props$styleProps22.classNames) === null || _props$styleProps22$c === void 0 ? void 0 : _props$styleProps22$c.invalidInputErrorMessageClassName,
|
|
215
217
|
styles: invalidInputErrorMessageStyles,
|
|
216
218
|
"aria-label": ((_props$controlProps25 = props.controlProps) === null || _props$controlProps25 === void 0 ? void 0 : _props$controlProps25.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText,
|
|
217
219
|
tabIndex: -1,
|
|
@@ -219,12 +221,12 @@ function InputValidationPane(props) {
|
|
|
219
221
|
id: elementId + "-invalidinputerrormessage"
|
|
220
222
|
}, ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText))), /*#__PURE__*/React.createElement(Stack, {
|
|
221
223
|
horizontal: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.isButtonGroupHorizontal) ?? defaultInputValidationPaneControlProps.isButtonGroupHorizontal,
|
|
222
|
-
className: (_props$
|
|
224
|
+
className: (_props$styleProps23 = props.styleProps) === null || _props$styleProps23 === void 0 ? void 0 : (_props$styleProps23$c = _props$styleProps23.classNames) === null || _props$styleProps23$c === void 0 ? void 0 : _props$styleProps23$c.buttonGroupClassName,
|
|
223
225
|
styles: buttonGroupStyles,
|
|
224
226
|
tabIndex: -1,
|
|
225
227
|
id: elementId + "-buttongroup"
|
|
226
228
|
}, !((_props$controlProps28 = props.controlProps) !== null && _props$controlProps28 !== void 0 && _props$controlProps28.hideSendButton) && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.sendButton) || /*#__PURE__*/React.createElement(PrimaryButton, {
|
|
227
|
-
className: (_props$
|
|
229
|
+
className: (_props$styleProps24 = props.styleProps) === null || _props$styleProps24 === void 0 ? void 0 : (_props$styleProps24$c = _props$styleProps24.classNames) === null || _props$styleProps24$c === void 0 ? void 0 : _props$styleProps24$c.sendButtonClassName,
|
|
228
230
|
styles: sendButtonStyles,
|
|
229
231
|
title: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || defaultInputValidationPaneControlProps.sendButtonText,
|
|
230
232
|
tabIndex: 0,
|
|
@@ -234,7 +236,7 @@ function InputValidationPane(props) {
|
|
|
234
236
|
id: elementId + "-sendbutton",
|
|
235
237
|
ariaLabel: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.sendButtonAriaLabel) || defaultInputValidationPaneControlProps.sendButtonAriaLabel
|
|
236
238
|
})), !((_props$controlProps32 = props.controlProps) !== null && _props$controlProps32 !== void 0 && _props$controlProps32.hideCancelButton) && (decodeComponentString((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.cancelButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
237
|
-
className: (_props$
|
|
239
|
+
className: (_props$styleProps25 = props.styleProps) === null || _props$styleProps25 === void 0 ? void 0 : (_props$styleProps25$c = _props$styleProps25.classNames) === null || _props$styleProps25$c === void 0 ? void 0 : _props$styleProps25$c.cancelButtonClassName,
|
|
238
240
|
styles: cancelButtonStyles,
|
|
239
241
|
title: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || defaultInputValidationPaneControlProps.cancelButtonText,
|
|
240
242
|
tabIndex: 0,
|
|
@@ -19,7 +19,7 @@ import { defaultProactiveChatPaneTitleStyles } from "./common/default/defaultSty
|
|
|
19
19
|
import { generateEventName } from "../../common/utils";
|
|
20
20
|
|
|
21
21
|
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$controlProps6, _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$styleProps13, _props$controlProps6, _props$styleProps14, _props$styleProps14$c, _props$controlProps7, _props$controlProps8, _props$styleProps15, _props$styleProps15$c, _props$styleProps16, _props$styleProps16$c, _props$controlProps9, _props$componentOverr, _props$styleProps17, _props$styleProps17$c, _props$controlProps10, _props$controlProps11, _props$componentOverr2, _props$styleProps18, _props$styleProps18$c, _props$controlProps12, _props$controlProps13, _props$componentOverr3, _props$styleProps19, _props$styleProps19$c, _props$controlProps14, _props$controlProps15, _props$styleProps20, _props$styleProps20$c, _props$controlProps16, _props$componentOverr4, _props$styleProps21, _props$styleProps21$c, _props$controlProps17, _props$controlProps18, _props$componentOverr5, _props$styleProps22, _props$styleProps22$c, _props$controlProps19, _props$controlProps20;
|
|
23
23
|
|
|
24
24
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultProactiveChatPaneControlProps.id;
|
|
25
25
|
|
|
@@ -85,20 +85,22 @@ function ProactiveChatPane(props) {
|
|
|
85
85
|
};
|
|
86
86
|
const closeButtonStyles = {
|
|
87
87
|
root: Object.assign({}, defaultProactiveChatPaneCloseButtonStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.closeButtonStyleProps),
|
|
88
|
-
rootHovered: Object.assign({}, defaultProactiveChatPaneCloseButtonHoveredStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.closeButtonHoveredStyleProps)
|
|
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)
|
|
89
90
|
};
|
|
90
91
|
const bodyContainerStyles = {
|
|
91
|
-
root: Object.assign({}, defaultProactiveChatPaneBodyContainerStyles, (_props$
|
|
92
|
+
root: Object.assign({}, defaultProactiveChatPaneBodyContainerStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.bodyContainerStyleProps)
|
|
92
93
|
};
|
|
93
94
|
const bodyTitleStyles = {
|
|
94
|
-
root: Object.assign({}, defaultProactiveChatPaneBodyTitleStyles, (_props$
|
|
95
|
+
root: Object.assign({}, defaultProactiveChatPaneBodyTitleStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.bodyTitleStyleProps)
|
|
95
96
|
};
|
|
96
97
|
const startButtonStyles = {
|
|
97
|
-
root: Object.assign({}, defaultProactiveChatPaneStartButtonStyles, (_props$
|
|
98
|
-
rootHovered: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$
|
|
98
|
+
root: Object.assign({}, defaultProactiveChatPaneStartButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.startButtonStyleProps),
|
|
99
|
+
rootHovered: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.startButtonHoveredStyleProps),
|
|
100
|
+
rootPressed: Object.assign({}, defaultProactiveChatPaneStartButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.startButtonHoveredStyleProps)
|
|
99
101
|
};
|
|
100
102
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideProactiveChatPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
101
|
-
className: (_props$
|
|
103
|
+
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.containerClassName,
|
|
102
104
|
id: elementId,
|
|
103
105
|
tabIndex: -1,
|
|
104
106
|
onKeyDown: handleEscKeyDown,
|
|
@@ -107,27 +109,27 @@ function ProactiveChatPane(props) {
|
|
|
107
109
|
styles: containerStyles
|
|
108
110
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
109
111
|
horizontal: true,
|
|
110
|
-
className: (_props$
|
|
112
|
+
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.headerContainerClassName,
|
|
111
113
|
styles: headerContainerStyles,
|
|
112
114
|
tabIndex: -1,
|
|
113
115
|
id: elementId + "-headercontainer"
|
|
114
116
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
115
|
-
className: (_props$
|
|
117
|
+
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.textContainerClassName,
|
|
116
118
|
styles: textContainerStyles,
|
|
117
119
|
tabIndex: -1,
|
|
118
120
|
id: elementId + "-textcontainer"
|
|
119
121
|
}, !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
120
|
-
className: (_props$
|
|
122
|
+
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.titleClassName,
|
|
121
123
|
styles: titleStyles,
|
|
122
124
|
tabIndex: -1,
|
|
123
125
|
id: elementId + "-title"
|
|
124
126
|
}, ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.titleText) || defaultProactiveChatPaneControlProps.titleText)), !((_props$controlProps11 = props.controlProps) !== null && _props$controlProps11 !== void 0 && _props$controlProps11.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
125
|
-
className: (_props$
|
|
127
|
+
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.subtitleClassName,
|
|
126
128
|
styles: subtitleStyles,
|
|
127
129
|
tabIndex: -1,
|
|
128
130
|
id: elementId + "-subtitle"
|
|
129
131
|
}, ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.subtitleText) || defaultProactiveChatPaneControlProps.subtitleText))), !((_props$controlProps13 = props.controlProps) !== null && _props$controlProps13 !== void 0 && _props$controlProps13.hideCloseButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.closeButton) || /*#__PURE__*/React.createElement(IconButton, {
|
|
130
|
-
className: (_props$
|
|
132
|
+
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.closeButtonClassName,
|
|
131
133
|
styles: closeButtonStyles,
|
|
132
134
|
tabIndex: 0,
|
|
133
135
|
onClick: handleCloseClick,
|
|
@@ -135,17 +137,17 @@ function ProactiveChatPane(props) {
|
|
|
135
137
|
"aria-label": ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.closeButtonAriaLabel) || defaultProactiveChatPaneControlProps.closeButtonAriaLabel
|
|
136
138
|
}))), /*#__PURE__*/React.createElement(Stack, {
|
|
137
139
|
horizontal: ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.isBodyContainerHorizantal) || defaultProactiveChatPaneControlProps.isBodyContainerHorizantal,
|
|
138
|
-
className: (_props$
|
|
140
|
+
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.bodyContainerClassName,
|
|
139
141
|
styles: bodyContainerStyles,
|
|
140
142
|
tabIndex: -1,
|
|
141
143
|
id: elementId + "-bodycontainer"
|
|
142
144
|
}, !((_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, {
|
|
143
|
-
className: (_props$
|
|
145
|
+
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.bodyTitleClassName,
|
|
144
146
|
styles: bodyTitleStyles,
|
|
145
147
|
tabIndex: -1,
|
|
146
148
|
id: elementId + "-bodytitle"
|
|
147
149
|
}, ((_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, {
|
|
148
|
-
className: (_props$
|
|
150
|
+
className: (_props$styleProps22 = props.styleProps) === null || _props$styleProps22 === void 0 ? void 0 : (_props$styleProps22$c = _props$styleProps22.classNames) === null || _props$styleProps22$c === void 0 ? void 0 : _props$styleProps22$c.startButtonClassName,
|
|
149
151
|
styles: startButtonStyles,
|
|
150
152
|
tabIndex: 0,
|
|
151
153
|
text: ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.startButtonText) || defaultProactiveChatPaneControlProps.startButtonText,
|