@microsoft/omnichannel-chat-components 1.1.2 → 1.1.4
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 +1 -1
- package/lib/cjs/components/header/Header.js +2 -2
- package/lib/esm/common/Constants.js +1 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +1 -1
- package/lib/esm/components/header/Header.js +2 -2
- package/lib/types/common/Constants.d.ts +1 -0
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ const HiddenTextStyles = {
|
|
|
21
21
|
whiteSpace: "nowrap"
|
|
22
22
|
};
|
|
23
23
|
exports.HiddenTextStyles = HiddenTextStyles;
|
|
24
|
-
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);
|
|
24
|
+
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"), _defineProperty(_class, "EndCallHotKey", "H"), _class);
|
|
25
25
|
exports.KeyCodes = KeyCodes;
|
|
26
26
|
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);
|
|
27
27
|
exports.Regex = Regex;
|
|
@@ -217,7 +217,7 @@ function CurrentCall(props) {
|
|
|
217
217
|
}, []);
|
|
218
218
|
const hideCallTimer = ((_props$controlProps68 = props.controlProps) === null || _props$controlProps68 === void 0 ? void 0 : _props$controlProps68.hideCallTimer) ?? ((_defaultCurrentCallPr73 = _defaultCurrentCallProps.defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr73 === void 0 ? void 0 : _defaultCurrentCallPr73.hideCallTimer);
|
|
219
219
|
(0, React.useEffect)(() => {
|
|
220
|
-
const endCallShortcut = e => e.key === _Constants.KeyCodes.
|
|
220
|
+
const endCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.EndCallHotKey;
|
|
221
221
|
|
|
222
222
|
const toggleMicShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.ToggleMicHotKey;
|
|
223
223
|
|
|
@@ -76,11 +76,11 @@ function Header(props) {
|
|
|
76
76
|
alt: chatIconProps.alt,
|
|
77
77
|
tabIndex: -1,
|
|
78
78
|
styles: iconImageStyles
|
|
79
|
-
})), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement(_react2.Label, {
|
|
79
|
+
})), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(_react2.Label, {
|
|
80
80
|
id: titleProps.id,
|
|
81
81
|
tabIndex: -1,
|
|
82
82
|
styles: titleStyles
|
|
83
|
-
}, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text)))), /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
83
|
+
}, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text))))), /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
84
84
|
horizontal: true,
|
|
85
85
|
id: _Constants.Ids.HeaderMiddleGroupId
|
|
86
86
|
}, /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
@@ -12,7 +12,7 @@ export const HiddenTextStyles = {
|
|
|
12
12
|
clip: "rect(1px, 1px, 1px, 1px)",
|
|
13
13
|
whiteSpace: "nowrap"
|
|
14
14
|
};
|
|
15
|
-
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);
|
|
15
|
+
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"), _defineProperty(_class, "EndCallHotKey", "H"), _class);
|
|
16
16
|
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);
|
|
17
17
|
export let ElementType;
|
|
18
18
|
|
|
@@ -193,7 +193,7 @@ function CurrentCall(props) {
|
|
|
193
193
|
}, []);
|
|
194
194
|
const hideCallTimer = ((_props$controlProps68 = props.controlProps) === null || _props$controlProps68 === void 0 ? void 0 : _props$controlProps68.hideCallTimer) ?? ((_defaultCurrentCallPr73 = defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr73 === void 0 ? void 0 : _defaultCurrentCallPr73.hideCallTimer);
|
|
195
195
|
useEffect(() => {
|
|
196
|
-
const endCallShortcut = e => e.key === KeyCodes.
|
|
196
|
+
const endCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.EndCallHotKey;
|
|
197
197
|
|
|
198
198
|
const toggleMicShortcut = e => e.ctrlKey && e.shiftKey && e.key === KeyCodes.ToggleMicHotKey;
|
|
199
199
|
|
|
@@ -55,11 +55,11 @@ function Header(props) {
|
|
|
55
55
|
alt: chatIconProps.alt,
|
|
56
56
|
tabIndex: -1,
|
|
57
57
|
styles: iconImageStyles
|
|
58
|
-
})), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement(Label, {
|
|
58
|
+
})), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(Label, {
|
|
59
59
|
id: titleProps.id,
|
|
60
60
|
tabIndex: -1,
|
|
61
61
|
styles: titleStyles
|
|
62
|
-
}, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text)))), /*#__PURE__*/React.createElement(Stack, {
|
|
62
|
+
}, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text))))), /*#__PURE__*/React.createElement(Stack, {
|
|
63
63
|
horizontal: true,
|
|
64
64
|
id: Ids.HeaderMiddleGroupId
|
|
65
65
|
}, /*#__PURE__*/React.createElement(Stack, {
|