@microsoft/omnichannel-chat-components 0.1.0-main.ae27766 → 0.1.0-main.e170704
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/inputvalidationpane/InputValidationPane.js +46 -18
- 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/inputvalidationpane/InputValidationPane.js +46 -18
- 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
|
@@ -16,7 +16,7 @@ const AccessibilityBrightnessRatio = 1.2;
|
|
|
16
16
|
exports.AccessibilityBrightnessRatio = AccessibilityBrightnessRatio;
|
|
17
17
|
const BROADCAST_CHANNEL_NAME = "omnichannel_broadcast_channel";
|
|
18
18
|
exports.BROADCAST_CHANNEL_NAME = BROADCAST_CHANNEL_NAME;
|
|
19
|
-
const KeyCodes = (_class = class KeyCodes {}, _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "ESCAPE", "Escape"), _defineProperty(_class, "SPACE", "Space"), _class);
|
|
19
|
+
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);
|
|
20
20
|
exports.KeyCodes = KeyCodes;
|
|
21
21
|
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);
|
|
22
22
|
exports.Regex = Regex;
|
|
@@ -213,6 +213,36 @@ function CurrentCall(props) {
|
|
|
213
213
|
}
|
|
214
214
|
}, []);
|
|
215
215
|
const hideCallTimer = ((_props$controlProps68 = props.controlProps) === null || _props$controlProps68 === void 0 ? void 0 : _props$controlProps68.hideCallTimer) ?? ((_defaultCurrentCallPr72 = _defaultCurrentCallProps.defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr72 === void 0 ? void 0 : _defaultCurrentCallPr72.hideCallTimer);
|
|
216
|
+
(0, React.useEffect)(() => {
|
|
217
|
+
const endCallShortcut = e => e.key === _Constants.KeyCodes.ENTER;
|
|
218
|
+
|
|
219
|
+
const toggleMicShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.ToggleMicHotKey;
|
|
220
|
+
|
|
221
|
+
const toggleVideoShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.ToggleCameraHotKey;
|
|
222
|
+
|
|
223
|
+
const shortcutKeysHandler = e => {
|
|
224
|
+
if (endCallShortcut(e)) {
|
|
225
|
+
handleEndCallClick();
|
|
226
|
+
} else if (toggleMicShortcut(e)) {
|
|
227
|
+
handleMicClick();
|
|
228
|
+
} else if (toggleVideoShortcut(e)) {
|
|
229
|
+
handleVideoOffClick();
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const ignoreDefault = e => {
|
|
234
|
+
if (endCallShortcut(e) || toggleMicShortcut(e) || toggleVideoShortcut(e)) {
|
|
235
|
+
e.preventDefault();
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
window.addEventListener("keyup", shortcutKeysHandler);
|
|
240
|
+
window.addEventListener("keydown", ignoreDefault);
|
|
241
|
+
return () => {
|
|
242
|
+
window.removeEventListener("keyup", shortcutKeysHandler);
|
|
243
|
+
window.removeEventListener("keydown", ignoreDefault);
|
|
244
|
+
};
|
|
245
|
+
}, []);
|
|
216
246
|
return /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
217
247
|
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,
|
|
218
248
|
horizontalAlign: "space-between",
|
|
@@ -53,18 +53,6 @@ const customizedCurrentCallStyleProps = {
|
|
|
53
53
|
width: "50px",
|
|
54
54
|
margin: "1px"
|
|
55
55
|
},
|
|
56
|
-
currentCallTimerStyleProps: {
|
|
57
|
-
borderRadius: "2px",
|
|
58
|
-
margin: "1px",
|
|
59
|
-
color: "white",
|
|
60
|
-
paddingTop: "18px",
|
|
61
|
-
fontSize: 12,
|
|
62
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
63
|
-
backgroundColor: "transparent",
|
|
64
|
-
height: "50px",
|
|
65
|
-
width: "55px",
|
|
66
|
-
textAlign: "center"
|
|
67
|
-
},
|
|
68
56
|
videoTileStyleProps: {
|
|
69
57
|
minHeight: "180px",
|
|
70
58
|
height: "300px",
|
|
@@ -45,18 +45,6 @@ const defaultCurrentCallStyleProps = {
|
|
|
45
45
|
width: "50px",
|
|
46
46
|
fontSize: "18px"
|
|
47
47
|
},
|
|
48
|
-
currentCallTimerStyleProps: {
|
|
49
|
-
borderRadius: "2px",
|
|
50
|
-
margin: "1px",
|
|
51
|
-
color: "#FFFFFF",
|
|
52
|
-
paddingTop: "18px",
|
|
53
|
-
fontSize: 12,
|
|
54
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
55
|
-
backgroundColor: "darkgrey",
|
|
56
|
-
height: "45px",
|
|
57
|
-
width: "50px",
|
|
58
|
-
textAlign: "center"
|
|
59
|
-
},
|
|
60
48
|
videoTileStyleProps: {
|
|
61
49
|
width: "100%",
|
|
62
50
|
marginLeft: "auto",
|
|
@@ -102,6 +102,36 @@ function IncomingCall(props) {
|
|
|
102
102
|
(_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioCallClick();
|
|
103
103
|
}
|
|
104
104
|
}, []);
|
|
105
|
+
(0, React.useEffect)(() => {
|
|
106
|
+
const declineCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.DeclineCallHotKey;
|
|
107
|
+
|
|
108
|
+
const acceptAudioCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.AcceptAudioCallHotKey;
|
|
109
|
+
|
|
110
|
+
const acceptVideoCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.AcceptVideoCallHotKey;
|
|
111
|
+
|
|
112
|
+
const shortcutKeysHandler = e => {
|
|
113
|
+
if (declineCallShortcut(e)) {
|
|
114
|
+
handleDeclineCallClick();
|
|
115
|
+
} else if (acceptAudioCallShortcut(e)) {
|
|
116
|
+
handleAudioCallClick();
|
|
117
|
+
} else if (acceptVideoCallShortcut(e)) {
|
|
118
|
+
handleVideoCallClick();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const ignoreDefault = e => {
|
|
123
|
+
if (declineCallShortcut(e) || acceptAudioCallShortcut(e) || acceptVideoCallShortcut(e)) {
|
|
124
|
+
e.preventDefault();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
window.addEventListener("keyup", shortcutKeysHandler);
|
|
129
|
+
window.addEventListener("keydown", ignoreDefault);
|
|
130
|
+
return () => {
|
|
131
|
+
window.removeEventListener("keyup", shortcutKeysHandler);
|
|
132
|
+
window.removeEventListener("keydown", ignoreDefault);
|
|
133
|
+
};
|
|
134
|
+
}, []);
|
|
105
135
|
return /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
106
136
|
horizontal: true,
|
|
107
137
|
className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
|
|
@@ -34,17 +34,24 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
36
|
function NotificationBubble(props, parentId) {
|
|
37
|
-
var _props$styleProps, _props$controlProps
|
|
37
|
+
var _props$styleProps, _props$controlProps;
|
|
38
38
|
|
|
39
39
|
const notificationBubbleStyles = {
|
|
40
40
|
root: Object.assign({}, _defaultChatButtonNotificationBubbleStyles.defaultChatButtonNotificationBubbleStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.notificationBubbleStyleProps)
|
|
41
41
|
};
|
|
42
42
|
const unreadMessageCount = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.unreadMessageCount) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.unreadMessageCount);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
|
|
44
|
+
if (unreadMessageCount !== "0") {
|
|
45
|
+
var _props$componentOverr, _props$styleProps2, _props$styleProps2$cl;
|
|
46
|
+
|
|
47
|
+
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
48
|
+
styles: notificationBubbleStyles,
|
|
49
|
+
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,
|
|
50
|
+
id: parentId + "-notification-bubble"
|
|
51
|
+
}, unreadMessageCount);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
function IconContainer(props, parentId) {
|
|
@@ -48,7 +48,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
48
48
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
49
49
|
|
|
50
50
|
function InputValidationPane(props) {
|
|
51
|
-
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$controlProps15, _props$
|
|
51
|
+
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$styleProps15, _props$styleProps15$c, _props$controlProps16, _props$controlProps17, _props$styleProps16, _props$styleProps16$c, _props$controlProps18, _props$componentOverr, _props$styleProps17, _props$styleProps17$c, _props$controlProps19, _props$controlProps20, _props$componentOverr2, _props$styleProps18, _props$styleProps18$c, _props$controlProps21, _props$controlProps22, _props$componentOverr3, _props$styleProps19, _props$styleProps19$c, _props$controlProps23, _props$controlProps24, _props$componentOverr4, _props$styleProps20, _props$styleProps20$c, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$styleProps21, _props$styleProps21$c, _props$controlProps28, _props$componentOverr5, _props$styleProps22, _props$styleProps22$c, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$controlProps32, _props$componentOverr6, _props$styleProps23, _props$styleProps23$c, _props$controlProps33, _props$controlProps34, _props$controlProps35;
|
|
52
52
|
|
|
53
53
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.id;
|
|
54
54
|
const [inputValue, setInputValue] = (0, _react2.useState)("");
|
|
@@ -163,27 +163,55 @@ function InputValidationPane(props) {
|
|
|
163
163
|
borderStyle: "solid"
|
|
164
164
|
};
|
|
165
165
|
const inputStyles = {
|
|
166
|
-
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps)
|
|
166
|
+
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
167
|
+
field: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.inputStyleProps),
|
|
168
|
+
fieldGroup: undefined,
|
|
169
|
+
prefix: undefined,
|
|
170
|
+
suffix: undefined,
|
|
171
|
+
icon: undefined,
|
|
172
|
+
description: undefined,
|
|
173
|
+
wrapper: undefined,
|
|
174
|
+
errorMessage: undefined,
|
|
175
|
+
subComponentStyles: {
|
|
176
|
+
label: {}
|
|
177
|
+
},
|
|
178
|
+
revealButton: undefined,
|
|
179
|
+
revealSpan: undefined,
|
|
180
|
+
revealIcon: undefined
|
|
167
181
|
};
|
|
168
182
|
const inputWithErrorMessageStyles = {
|
|
169
|
-
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, redBorderStyles, (_props$
|
|
183
|
+
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.inputStyleProps),
|
|
184
|
+
field: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.inputStyleProps),
|
|
185
|
+
fieldGroup: undefined,
|
|
186
|
+
prefix: undefined,
|
|
187
|
+
suffix: undefined,
|
|
188
|
+
icon: undefined,
|
|
189
|
+
description: undefined,
|
|
190
|
+
wrapper: undefined,
|
|
191
|
+
errorMessage: undefined,
|
|
192
|
+
subComponentStyles: {
|
|
193
|
+
label: {}
|
|
194
|
+
},
|
|
195
|
+
revealButton: undefined,
|
|
196
|
+
revealSpan: undefined,
|
|
197
|
+
revealIcon: undefined
|
|
170
198
|
};
|
|
171
199
|
const invalidInputErrorMessageStyles = {
|
|
172
|
-
root: Object.assign({}, _defaultInputValidationPaneInvalidInputErrorMessageStyles.defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$
|
|
200
|
+
root: Object.assign({}, _defaultInputValidationPaneInvalidInputErrorMessageStyles.defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.invalidInputErrorMessageStyleProps)
|
|
173
201
|
};
|
|
174
202
|
const buttonGroupStyles = {
|
|
175
|
-
root: Object.assign({}, _defaultInputValidationPaneButtonGroupStyles.defaultInputValidationPaneButtonGroupStyles, (_props$
|
|
203
|
+
root: Object.assign({}, _defaultInputValidationPaneButtonGroupStyles.defaultInputValidationPaneButtonGroupStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.buttonGroupStyleProps)
|
|
176
204
|
};
|
|
177
205
|
const sendButtonStyles = {
|
|
178
|
-
root: Object.assign({}, _defaultInputValidationPaneSendButtonStyles.defaultInputValidationPaneSendButtonStyles, (_props$
|
|
179
|
-
rootHovered: Object.assign({}, _defaultInputValidationPaneSendButtonHoveredStyles.defaultInputValidationPaneSendButtonHoveredStyles, (_props$
|
|
206
|
+
root: Object.assign({}, _defaultInputValidationPaneSendButtonStyles.defaultInputValidationPaneSendButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.sendButtonStyleProps),
|
|
207
|
+
rootHovered: Object.assign({}, _defaultInputValidationPaneSendButtonHoveredStyles.defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.sendButtonHoveredStyleProps)
|
|
180
208
|
};
|
|
181
209
|
const cancelButtonStyles = {
|
|
182
|
-
root: Object.assign({}, _defaultInputValidationPaneCancelButtonStyles.defaultInputValidationPaneCancelButtonStyles, (_props$
|
|
183
|
-
rootHovered: Object.assign({}, _defaultInputValidationPaneCancelButtonHoveredStyles.defaultInputValidationPaneCancelButtonHoveredStyles, (_props$
|
|
210
|
+
root: Object.assign({}, _defaultInputValidationPaneCancelButtonStyles.defaultInputValidationPaneCancelButtonStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.cancelButtonStyleProps),
|
|
211
|
+
rootHovered: Object.assign({}, _defaultInputValidationPaneCancelButtonHoveredStyles.defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.cancelButtonHoveredStyleProps)
|
|
184
212
|
};
|
|
185
213
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideInputValidationPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
186
|
-
className: (_props$
|
|
214
|
+
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.containerClassName,
|
|
187
215
|
id: elementId,
|
|
188
216
|
tabIndex: -1,
|
|
189
217
|
onKeyDown: handleEscKeyDown,
|
|
@@ -191,22 +219,22 @@ function InputValidationPane(props) {
|
|
|
191
219
|
"aria-label": ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.inputValidationPaneAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputValidationPaneAriaLabel,
|
|
192
220
|
styles: containerStyles
|
|
193
221
|
}, /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
194
|
-
className: (_props$
|
|
222
|
+
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.headerGroupClassName,
|
|
195
223
|
styles: headerGroupStyles,
|
|
196
224
|
tabIndex: -1,
|
|
197
225
|
id: elementId + "-headergroup"
|
|
198
226
|
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
199
|
-
className: (_props$
|
|
227
|
+
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,
|
|
200
228
|
styles: titleStyles,
|
|
201
229
|
tabIndex: -1,
|
|
202
230
|
id: elementId + "-title"
|
|
203
231
|
}, ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.titleText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.titleText)), !((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.hideSubtitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
204
|
-
className: (_props$
|
|
232
|
+
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,
|
|
205
233
|
styles: subtitleStyles,
|
|
206
234
|
tabIndex: -1,
|
|
207
235
|
id: elementId + "-subtitle"
|
|
208
236
|
}, ((_props$controlProps21 = props.controlProps) === null || _props$controlProps21 === void 0 ? void 0 : _props$controlProps21.subtitleText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.subtitleText)), !((_props$controlProps22 = props.controlProps) !== null && _props$controlProps22 !== void 0 && _props$controlProps22.hideInput) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.input) || /*#__PURE__*/_react2.default.createElement(_react.TextField, {
|
|
209
|
-
className: (_props$
|
|
237
|
+
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.inputClassName,
|
|
210
238
|
styles: isInvalidInput ? inputWithErrorMessageStyles : inputStyles,
|
|
211
239
|
tabIndex: 0,
|
|
212
240
|
value: inputValue ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputInitialText,
|
|
@@ -216,7 +244,7 @@ function InputValidationPane(props) {
|
|
|
216
244
|
onChange: handleInputChange,
|
|
217
245
|
onKeyDown: handleInputKeyDown
|
|
218
246
|
})), isInvalidInput && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
219
|
-
className: (_props$
|
|
247
|
+
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.invalidInputErrorMessageClassName,
|
|
220
248
|
styles: invalidInputErrorMessageStyles,
|
|
221
249
|
"aria-label": ((_props$controlProps25 = props.controlProps) === null || _props$controlProps25 === void 0 ? void 0 : _props$controlProps25.invalidInputErrorMessageText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.invalidInputErrorMessageText,
|
|
222
250
|
tabIndex: -1,
|
|
@@ -224,12 +252,12 @@ function InputValidationPane(props) {
|
|
|
224
252
|
id: elementId + "-invalidinputerrormessage"
|
|
225
253
|
}, ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.invalidInputErrorMessageText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.invalidInputErrorMessageText))), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
226
254
|
horizontal: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.isButtonGroupHorizontal) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.isButtonGroupHorizontal,
|
|
227
|
-
className: (_props$
|
|
255
|
+
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.buttonGroupClassName,
|
|
228
256
|
styles: buttonGroupStyles,
|
|
229
257
|
tabIndex: -1,
|
|
230
258
|
id: elementId + "-buttongroup"
|
|
231
259
|
}, !((_props$controlProps28 = props.controlProps) !== null && _props$controlProps28 !== void 0 && _props$controlProps28.hideSendButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.sendButton) || /*#__PURE__*/_react2.default.createElement(_Button.PrimaryButton, {
|
|
232
|
-
className: (_props$
|
|
260
|
+
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.sendButtonClassName,
|
|
233
261
|
styles: sendButtonStyles,
|
|
234
262
|
title: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
|
|
235
263
|
tabIndex: 0,
|
|
@@ -239,7 +267,7 @@ function InputValidationPane(props) {
|
|
|
239
267
|
id: elementId + "-sendbutton",
|
|
240
268
|
ariaLabel: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.sendButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonAriaLabel
|
|
241
269
|
})), !((_props$controlProps32 = props.controlProps) !== null && _props$controlProps32 !== void 0 && _props$controlProps32.hideCancelButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.cancelButton) || /*#__PURE__*/_react2.default.createElement(_Button.DefaultButton, {
|
|
242
|
-
className: (_props$
|
|
270
|
+
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.cancelButtonClassName,
|
|
243
271
|
styles: cancelButtonStyles,
|
|
244
272
|
title: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
|
|
245
273
|
tabIndex: 0,
|
|
@@ -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) {
|
|
@@ -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$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$controlProps15, _props$styleProps15, _props$styleProps15$c, _props$controlProps16, _props$controlProps17, _props$styleProps16, _props$styleProps16$c, _props$controlProps18, _props$componentOverr, _props$styleProps17, _props$styleProps17$c, _props$controlProps19, _props$controlProps20, _props$componentOverr2, _props$styleProps18, _props$styleProps18$c, _props$controlProps21, _props$controlProps22, _props$componentOverr3, _props$styleProps19, _props$styleProps19$c, _props$controlProps23, _props$controlProps24, _props$componentOverr4, _props$styleProps20, _props$styleProps20$c, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$styleProps21, _props$styleProps21$c, _props$controlProps28, _props$componentOverr5, _props$styleProps22, _props$styleProps22$c, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$controlProps32, _props$componentOverr6, _props$styleProps23, _props$styleProps23$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("");
|
|
@@ -130,27 +130,55 @@ function InputValidationPane(props) {
|
|
|
130
130
|
borderStyle: "solid"
|
|
131
131
|
};
|
|
132
132
|
const inputStyles = {
|
|
133
|
-
root: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps)
|
|
133
|
+
root: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
134
|
+
field: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.inputStyleProps),
|
|
135
|
+
fieldGroup: undefined,
|
|
136
|
+
prefix: undefined,
|
|
137
|
+
suffix: undefined,
|
|
138
|
+
icon: undefined,
|
|
139
|
+
description: undefined,
|
|
140
|
+
wrapper: undefined,
|
|
141
|
+
errorMessage: undefined,
|
|
142
|
+
subComponentStyles: {
|
|
143
|
+
label: {}
|
|
144
|
+
},
|
|
145
|
+
revealButton: undefined,
|
|
146
|
+
revealSpan: undefined,
|
|
147
|
+
revealIcon: undefined
|
|
134
148
|
};
|
|
135
149
|
const inputWithErrorMessageStyles = {
|
|
136
|
-
root: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$
|
|
150
|
+
root: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.inputStyleProps),
|
|
151
|
+
field: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.inputStyleProps),
|
|
152
|
+
fieldGroup: undefined,
|
|
153
|
+
prefix: undefined,
|
|
154
|
+
suffix: undefined,
|
|
155
|
+
icon: undefined,
|
|
156
|
+
description: undefined,
|
|
157
|
+
wrapper: undefined,
|
|
158
|
+
errorMessage: undefined,
|
|
159
|
+
subComponentStyles: {
|
|
160
|
+
label: {}
|
|
161
|
+
},
|
|
162
|
+
revealButton: undefined,
|
|
163
|
+
revealSpan: undefined,
|
|
164
|
+
revealIcon: undefined
|
|
137
165
|
};
|
|
138
166
|
const invalidInputErrorMessageStyles = {
|
|
139
|
-
root: Object.assign({}, defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$
|
|
167
|
+
root: Object.assign({}, defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.invalidInputErrorMessageStyleProps)
|
|
140
168
|
};
|
|
141
169
|
const buttonGroupStyles = {
|
|
142
|
-
root: Object.assign({}, defaultInputValidationPaneButtonGroupStyles, (_props$
|
|
170
|
+
root: Object.assign({}, defaultInputValidationPaneButtonGroupStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.buttonGroupStyleProps)
|
|
143
171
|
};
|
|
144
172
|
const sendButtonStyles = {
|
|
145
|
-
root: Object.assign({}, defaultInputValidationPaneSendButtonStyles, (_props$
|
|
146
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$
|
|
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)
|
|
147
175
|
};
|
|
148
176
|
const cancelButtonStyles = {
|
|
149
|
-
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$
|
|
150
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$
|
|
177
|
+
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.cancelButtonStyleProps),
|
|
178
|
+
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.cancelButtonHoveredStyleProps)
|
|
151
179
|
};
|
|
152
180
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideInputValidationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
153
|
-
className: (_props$
|
|
181
|
+
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.containerClassName,
|
|
154
182
|
id: elementId,
|
|
155
183
|
tabIndex: -1,
|
|
156
184
|
onKeyDown: handleEscKeyDown,
|
|
@@ -158,22 +186,22 @@ function InputValidationPane(props) {
|
|
|
158
186
|
"aria-label": ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.inputValidationPaneAriaLabel) || defaultInputValidationPaneControlProps.inputValidationPaneAriaLabel,
|
|
159
187
|
styles: containerStyles
|
|
160
188
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
161
|
-
className: (_props$
|
|
189
|
+
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.headerGroupClassName,
|
|
162
190
|
styles: headerGroupStyles,
|
|
163
191
|
tabIndex: -1,
|
|
164
192
|
id: elementId + "-headergroup"
|
|
165
193
|
}, !((_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, {
|
|
166
|
-
className: (_props$
|
|
194
|
+
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,
|
|
167
195
|
styles: titleStyles,
|
|
168
196
|
tabIndex: -1,
|
|
169
197
|
id: elementId + "-title"
|
|
170
198
|
}, ((_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, {
|
|
171
|
-
className: (_props$
|
|
199
|
+
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,
|
|
172
200
|
styles: subtitleStyles,
|
|
173
201
|
tabIndex: -1,
|
|
174
202
|
id: elementId + "-subtitle"
|
|
175
203
|
}, ((_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, {
|
|
176
|
-
className: (_props$
|
|
204
|
+
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.inputClassName,
|
|
177
205
|
styles: isInvalidInput ? inputWithErrorMessageStyles : inputStyles,
|
|
178
206
|
tabIndex: 0,
|
|
179
207
|
value: inputValue ?? defaultInputValidationPaneControlProps.inputInitialText,
|
|
@@ -183,7 +211,7 @@ function InputValidationPane(props) {
|
|
|
183
211
|
onChange: handleInputChange,
|
|
184
212
|
onKeyDown: handleInputKeyDown
|
|
185
213
|
})), isInvalidInput && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/React.createElement(Stack, {
|
|
186
|
-
className: (_props$
|
|
214
|
+
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.invalidInputErrorMessageClassName,
|
|
187
215
|
styles: invalidInputErrorMessageStyles,
|
|
188
216
|
"aria-label": ((_props$controlProps25 = props.controlProps) === null || _props$controlProps25 === void 0 ? void 0 : _props$controlProps25.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText,
|
|
189
217
|
tabIndex: -1,
|
|
@@ -191,12 +219,12 @@ function InputValidationPane(props) {
|
|
|
191
219
|
id: elementId + "-invalidinputerrormessage"
|
|
192
220
|
}, ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText))), /*#__PURE__*/React.createElement(Stack, {
|
|
193
221
|
horizontal: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.isButtonGroupHorizontal) ?? defaultInputValidationPaneControlProps.isButtonGroupHorizontal,
|
|
194
|
-
className: (_props$
|
|
222
|
+
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.buttonGroupClassName,
|
|
195
223
|
styles: buttonGroupStyles,
|
|
196
224
|
tabIndex: -1,
|
|
197
225
|
id: elementId + "-buttongroup"
|
|
198
226
|
}, !((_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, {
|
|
199
|
-
className: (_props$
|
|
227
|
+
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.sendButtonClassName,
|
|
200
228
|
styles: sendButtonStyles,
|
|
201
229
|
title: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || defaultInputValidationPaneControlProps.sendButtonText,
|
|
202
230
|
tabIndex: 0,
|
|
@@ -206,7 +234,7 @@ function InputValidationPane(props) {
|
|
|
206
234
|
id: elementId + "-sendbutton",
|
|
207
235
|
ariaLabel: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.sendButtonAriaLabel) || defaultInputValidationPaneControlProps.sendButtonAriaLabel
|
|
208
236
|
})), !((_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, {
|
|
209
|
-
className: (_props$
|
|
237
|
+
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.cancelButtonClassName,
|
|
210
238
|
styles: cancelButtonStyles,
|
|
211
239
|
title: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || defaultInputValidationPaneControlProps.cancelButtonText,
|
|
212
240
|
tabIndex: 0,
|
|
@@ -5,6 +5,11 @@ export declare const KeyCodes: {
|
|
|
5
5
|
readonly ENTER: "Enter";
|
|
6
6
|
readonly ESCAPE: "Escape";
|
|
7
7
|
readonly SPACE: "Space";
|
|
8
|
+
readonly DeclineCallHotKey: "D";
|
|
9
|
+
readonly AcceptAudioCallHotKey: "S";
|
|
10
|
+
readonly AcceptVideoCallHotKey: "A";
|
|
11
|
+
readonly ToggleMicHotKey: "M";
|
|
12
|
+
readonly ToggleCameraHotKey: "O";
|
|
8
13
|
};
|
|
9
14
|
export declare const Regex: {
|
|
10
15
|
new (): {};
|
package/package.json
CHANGED