@microsoft/omnichannel-chat-components 0.1.0-main.a306d8c → 0.1.0-main.a7ac5de
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/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +1 -1
- package/lib/cjs/components/chatbutton/ChatButton.js +23 -22
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +2 -1
- package/lib/cjs/components/common/commandbutton/CommandButton.js +31 -6
- package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +4 -3
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +7 -0
- package/lib/cjs/components/footer/Footer.js +2 -2
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +28 -4
- package/lib/cjs/components/header/Header.js +2 -2
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +1 -0
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
- package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/services/BroadcastService.js +5 -1
- package/lib/esm/common/Constants.js +1 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +1 -1
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +1 -1
- package/lib/esm/components/chatbutton/ChatButton.js +22 -21
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +2 -1
- package/lib/esm/components/common/commandbutton/CommandButton.js +31 -6
- package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +4 -3
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +8 -1
- package/lib/esm/components/footer/Footer.js +2 -2
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +28 -4
- package/lib/esm/components/header/Header.js +2 -2
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +1 -0
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
- package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/services/BroadcastService.js +5 -1
- package/lib/types/common/Constants.d.ts +1 -1
- package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +1 -0
- package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
- package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
- package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
- package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
- package/package.json +2 -2
|
@@ -30,7 +30,7 @@ exports.ElementType = ElementType;
|
|
|
30
30
|
|
|
31
31
|
(function (ElementType) {
|
|
32
32
|
ElementType["ChatButton"] = "ChatButton";
|
|
33
|
-
ElementType["
|
|
33
|
+
ElementType["CloseButton"] = "CloseButton";
|
|
34
34
|
ElementType["HeaderMinimizeButton"] = "HeaderMinimizeButton";
|
|
35
35
|
ElementType["FooterDownloadTranscriptButton"] = "FooterDownloadTranscriptButton";
|
|
36
36
|
ElementType["FooterEmailTranscriptButton"] = "FooterEmailTranscriptButton";
|
|
@@ -29,7 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
function _extends() { _extends = Object.assign
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
33
|
|
|
34
34
|
function CurrentCall(props) {
|
|
35
35
|
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;
|
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
30
|
function IncomingCall(props) {
|
|
31
31
|
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;
|
|
@@ -42,16 +42,17 @@ function NotificationBubble(props, parentId) {
|
|
|
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
43
|
|
|
44
44
|
if (unreadMessageCount !== "0") {
|
|
45
|
-
var _props$componentOverr, _props$styleProps2, _props$styleProps2$cl, _props$
|
|
45
|
+
var _props$componentOverr, _props$controlProps2, _props$controlProps3, _props$styleProps2, _props$styleProps2$cl, _props$controlProps4, _props$controlProps5;
|
|
46
46
|
|
|
47
47
|
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
48
|
-
|
|
48
|
+
"aria-live": "polite",
|
|
49
49
|
styles: notificationBubbleStyles,
|
|
50
|
+
"aria-label": (_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.ariaLabelUnreadMessageString ? (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.ariaLabelUnreadMessageString : _defaultChatButtonControlProps.defaultChatButtonControlProps.ariaLabelUnreadMessageString,
|
|
50
51
|
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,
|
|
51
52
|
id: parentId + "-notification-bubble"
|
|
52
53
|
}, unreadMessageCount, /*#__PURE__*/_react2.default.createElement("span", {
|
|
53
54
|
style: _Constants.HiddenTextStyles
|
|
54
|
-
}, (_props$
|
|
55
|
+
}, (_props$controlProps4 = props.controlProps) !== null && _props$controlProps4 !== void 0 && _props$controlProps4.unreadMessageString ? (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.unreadMessageString : _defaultChatButtonControlProps.defaultChatButtonControlProps.unreadMessageString));
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
return null;
|
|
@@ -71,7 +72,7 @@ function IconContainer(props, parentId) {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
function TextContainer(props, parentId) {
|
|
74
|
-
var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$
|
|
75
|
+
var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$controlProps9, _props$controlProps10, _props$controlProps11, _props$componentOverr3, _props$styleProps8, _props$styleProps8$cl, _props$componentOverr4, _props$styleProps9, _props$styleProps9$cl, _props$componentOverr5, _props$styleProps10, _props$styleProps10$c;
|
|
75
76
|
|
|
76
77
|
const textContainerStyles = {
|
|
77
78
|
root: Object.assign({}, _defaultChatButtonTextContainerStyles.defaultChatButtonTextContainerStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.textContainerStyleProps)
|
|
@@ -82,12 +83,12 @@ function TextContainer(props, parentId) {
|
|
|
82
83
|
const subtitleStyles = {
|
|
83
84
|
root: Object.assign({}, _defaultChatButtonSubTitleStyles.defaultChatButtonSubTitleStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.subtitleStyleProps)
|
|
84
85
|
};
|
|
85
|
-
const hideChatTitle = ((_props$
|
|
86
|
-
const hideChatSubtitle = ((_props$
|
|
87
|
-
const titleDir = ((_props$
|
|
88
|
-
const titleText = ((_props$
|
|
89
|
-
const subtitleDir = ((_props$
|
|
90
|
-
const subtitleText = ((_props$
|
|
86
|
+
const hideChatTitle = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.hideChatTitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTitle);
|
|
87
|
+
const hideChatSubtitle = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.hideChatSubtitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatSubtitle);
|
|
88
|
+
const titleDir = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
89
|
+
const titleText = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.titleText);
|
|
90
|
+
const subtitleDir = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
91
|
+
const subtitleText = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.subtitleText);
|
|
91
92
|
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.textContainer) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
92
93
|
styles: textContainerStyles,
|
|
93
94
|
className: (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cl = _props$styleProps8.classNames) === null || _props$styleProps8$cl === void 0 ? void 0 : _props$styleProps8$cl.textContainerClassName,
|
|
@@ -108,23 +109,23 @@ function TextContainer(props, parentId) {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
function ChatButton(props) {
|
|
111
|
-
var _props$
|
|
112
|
-
|
|
113
|
-
const elementId = ((_props$
|
|
114
|
-
const defaultAriaLabel = ((_props$
|
|
115
|
-
const defaultRole = ((_props$
|
|
116
|
-
const containersDir = ((_props$
|
|
117
|
-
const hideChatButton = ((_props$
|
|
118
|
-
const hideChatIcon = ((_props$
|
|
119
|
-
const hideChatTextContainer = ((_props$
|
|
120
|
-
const hideNotificationBubble = ((_props$
|
|
112
|
+
var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
|
|
113
|
+
|
|
114
|
+
const elementId = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.id) ?? "lcw-components-chat-button";
|
|
115
|
+
const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? "live chat button";
|
|
116
|
+
const defaultRole = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.role) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.role);
|
|
117
|
+
const containersDir = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
118
|
+
const hideChatButton = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideChatButton) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatButton);
|
|
119
|
+
const hideChatIcon = ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.hideChatIcon) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatIcon);
|
|
120
|
+
const hideChatTextContainer = ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.hideChatTextContainer) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTextContainer);
|
|
121
|
+
const hideNotificationBubble = ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.hideNotificationBubble) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideNotificationBubble);
|
|
121
122
|
const chatButtonGroupStyles = {
|
|
122
123
|
root: Object.assign({}, _defaultChatButtonGeneralStyles.defaultChatButtonGeneralStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.generalStyleProps)
|
|
123
124
|
};
|
|
124
125
|
const handleInitiateChatClick = (0, _react2.useCallback)(() => {
|
|
125
|
-
var _props$
|
|
126
|
+
var _props$controlProps20;
|
|
126
127
|
|
|
127
|
-
if ((_props$
|
|
128
|
+
if ((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.onClick) {
|
|
128
129
|
const customEvent = {
|
|
129
130
|
elementType: _Constants.ElementType.ChatButton,
|
|
130
131
|
elementId: elementId,
|
|
@@ -22,6 +22,7 @@ const defaultChatButtonControlProps = {
|
|
|
22
22
|
hideChatTitle: false,
|
|
23
23
|
hideNotificationBubble: true,
|
|
24
24
|
unreadMessageString: "new messages",
|
|
25
|
-
largeUnreadMessageString: "99+"
|
|
25
|
+
largeUnreadMessageString: "99+",
|
|
26
|
+
ariaLabelUnreadMessageString: "you have new messages"
|
|
26
27
|
};
|
|
27
28
|
exports.defaultChatButtonControlProps = defaultChatButtonControlProps;
|
|
@@ -18,17 +18,42 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
20
|
function CommandButton(props) {
|
|
21
|
+
var _props$hoverStyles, _props$hoverStyles2, _props$focusStyles;
|
|
22
|
+
|
|
21
23
|
//imageIconProps > iconName
|
|
22
24
|
const iconProp = props.imageIconProps ? {
|
|
23
25
|
imageProps: props.imageIconProps
|
|
24
26
|
} : {
|
|
25
|
-
iconName: props.iconName
|
|
26
|
-
styles: {
|
|
27
|
-
root: props.styles
|
|
28
|
-
}
|
|
27
|
+
iconName: props.iconName
|
|
29
28
|
};
|
|
29
|
+
let iconStyles = {};
|
|
30
|
+
|
|
31
|
+
if (props.type === "icon") {
|
|
32
|
+
var _props$styles;
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.icon)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
30
39
|
const buttonStyles = {
|
|
31
|
-
|
|
40
|
+
icon: { ...iconStyles
|
|
41
|
+
},
|
|
42
|
+
root: {
|
|
43
|
+
selectors: {
|
|
44
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles = props.hoverStyles) === null || _props$hoverStyles === void 0 ? void 0 : _props$hoverStyles.icon)
|
|
46
|
+
},
|
|
47
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles2 = props.hoverStyles) === null || _props$hoverStyles2 === void 0 ? void 0 : _props$hoverStyles2.icon)
|
|
49
|
+
},
|
|
50
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
+
...(props === null || props === void 0 ? void 0 : (_props$focusStyles = props.focusStyles) === null || _props$focusStyles === void 0 ? void 0 : _props$focusStyles.icon)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
56
|
+
},
|
|
32
57
|
rootHovered: props.hoverStyles,
|
|
33
58
|
rootFocused: props.focusStyles,
|
|
34
59
|
rootPressed: props.hoverStyles
|
|
@@ -57,7 +82,7 @@ function CommandButton(props) {
|
|
|
57
82
|
}), props.type === "icon" && /*#__PURE__*/_react2.default.createElement(_react.IconButton, {
|
|
58
83
|
id: props.id,
|
|
59
84
|
iconProps: iconProp,
|
|
60
|
-
title: props.ariaLabel,
|
|
85
|
+
title: props.hideButtonTitle ? undefined : props.ariaLabel,
|
|
61
86
|
ariaLabel: props.ariaLabel,
|
|
62
87
|
disabled: props.disabled,
|
|
63
88
|
styles: buttonStyles,
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _Constants = require("../../../common/Constants");
|
|
11
11
|
|
|
12
|
-
var _CommandButton = _interopRequireDefault(require("
|
|
12
|
+
var _CommandButton = _interopRequireDefault(require("../commandbutton/CommandButton"));
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ function CloseButton(props) {
|
|
|
18
18
|
type
|
|
19
19
|
} = props;
|
|
20
20
|
const customEvent = {
|
|
21
|
-
elementType: _Constants.ElementType.
|
|
21
|
+
elementType: _Constants.ElementType.CloseButton,
|
|
22
22
|
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
23
23
|
eventName: "OnClick"
|
|
24
24
|
};
|
|
@@ -34,7 +34,8 @@ function CloseButton(props) {
|
|
|
34
34
|
onClick: props.onClick,
|
|
35
35
|
ariaLabel: props.ariaLabel ?? "Close",
|
|
36
36
|
className: props.className,
|
|
37
|
-
customEvent: customEvent
|
|
37
|
+
customEvent: customEvent,
|
|
38
|
+
hideButtonTitle: props.hideButtonTitle
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -80,6 +80,12 @@ function ConfirmationPane(props) {
|
|
|
80
80
|
|
|
81
81
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onCancel();
|
|
82
82
|
}
|
|
83
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
+
|
|
85
|
+
const handleEscKeyDown = (0, _react2.useCallback)(e => {
|
|
86
|
+
if (e.code === _Constants.KeyCodes.ESCAPE) {
|
|
87
|
+
handleCancelClick();
|
|
88
|
+
}
|
|
83
89
|
}, []);
|
|
84
90
|
const containerStyles = {
|
|
85
91
|
root: Object.assign({}, _defaultConfirmationPaneGeneralStyles.defaultConfirmationPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
|
|
@@ -107,6 +113,7 @@ function ConfirmationPane(props) {
|
|
|
107
113
|
};
|
|
108
114
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
109
115
|
id: elementId,
|
|
116
|
+
onKeyDown: handleEscKeyDown,
|
|
110
117
|
tabIndex: -1,
|
|
111
118
|
dir: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.dir) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.dir,
|
|
112
119
|
styles: containerStyles,
|
|
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
|
-
function _extends() { _extends = Object.assign
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
31
|
|
|
32
32
|
(0, _react2.initializeIcons)();
|
|
33
33
|
|
|
@@ -87,7 +87,7 @@ function Footer(props) {
|
|
|
87
87
|
verticalAlign: "start"
|
|
88
88
|
}, /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
89
89
|
horizontal: true,
|
|
90
|
-
verticalAlign: "
|
|
90
|
+
verticalAlign: "center"
|
|
91
91
|
}, (0, _utils.processCustomComponents)((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : (_props$controlProps15 = _props$controlProps14.rightGroup) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.children), !((_props$controlProps16 = props.controlProps) !== null && _props$controlProps16 !== void 0 && _props$controlProps16.hideAudioNotificationButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.AudioNotificationButton) || /*#__PURE__*/React.createElement(_AudioNotificationButton.default, _extends({}, audioNotificationButtonProps, {
|
|
92
92
|
onClick: (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioNotificationClick,
|
|
93
93
|
styles: audioNotificationButtonStyles,
|
|
@@ -14,8 +14,10 @@ const defaultFooterStyleProps = {
|
|
|
14
14
|
padding: "0 10px 5px 10px"
|
|
15
15
|
},
|
|
16
16
|
downloadTranscriptButtonStyleProps: {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
icon: {
|
|
18
|
+
color: "blue",
|
|
19
|
+
fontSize: 16
|
|
20
|
+
},
|
|
19
21
|
height: "25px",
|
|
20
22
|
lineHeight: "25px",
|
|
21
23
|
width: "25px"
|
|
@@ -25,8 +27,10 @@ const defaultFooterStyleProps = {
|
|
|
25
27
|
backgroundColor: "#C8C8C8"
|
|
26
28
|
},
|
|
27
29
|
emailTranscriptButtonStyleProps: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
icon: {
|
|
31
|
+
color: "blue",
|
|
32
|
+
fontSize: 16
|
|
33
|
+
},
|
|
30
34
|
height: "25px",
|
|
31
35
|
lineHeight: "25px",
|
|
32
36
|
width: "25px"
|
|
@@ -36,8 +40,10 @@ const defaultFooterStyleProps = {
|
|
|
36
40
|
backgroundColor: "#C8C8C8"
|
|
37
41
|
},
|
|
38
42
|
audioNotificationButtonStyleProps: {
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
icon: {
|
|
44
|
+
color: "blue",
|
|
45
|
+
fontSize: 16
|
|
46
|
+
},
|
|
41
47
|
height: "25px",
|
|
42
48
|
lineHeight: "25px",
|
|
43
49
|
width: "25px"
|
|
@@ -22,11 +22,34 @@ function AudioNotificationButton(props) {
|
|
|
22
22
|
disabled
|
|
23
23
|
} = props;
|
|
24
24
|
const [muted, setMuted] = (0, _react2.useState)(props.isAudioMuted);
|
|
25
|
+
let iconStyles = {};
|
|
26
|
+
|
|
27
|
+
if (props.type === "icon") {
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : props.styles).icon
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
const iconButtonStyles = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
icon: iconStyles,
|
|
35
|
+
root: {
|
|
36
|
+
selectors: {
|
|
37
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
39
|
+
},
|
|
40
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
42
|
+
},
|
|
43
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
...(props === null || props === void 0 ? void 0 : props.focusStyles).icon
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
49
|
+
},
|
|
50
|
+
rootHovered: props.hoverStyles,
|
|
51
|
+
rootFocused: props.focusStyles,
|
|
52
|
+
rootPressed: props.hoverStyles
|
|
30
53
|
}; //imageIconProps > iconName
|
|
31
54
|
|
|
32
55
|
const volume0Icon = props.imageToggleIconProps ? {
|
|
@@ -65,6 +88,7 @@ function AudioNotificationButton(props) {
|
|
|
65
88
|
disabled: disabled,
|
|
66
89
|
styles: iconButtonStyles,
|
|
67
90
|
className: props.className,
|
|
91
|
+
"aria-label": muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off",
|
|
68
92
|
title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
|
|
69
93
|
});
|
|
70
94
|
}
|
|
@@ -9,7 +9,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@fluentui/react");
|
|
11
11
|
|
|
12
|
-
var _CloseButton = _interopRequireDefault(require("
|
|
12
|
+
var _CloseButton = _interopRequireDefault(require("../common/subcomponents/CloseButton"));
|
|
13
13
|
|
|
14
14
|
var _MinimizeButton = _interopRequireDefault(require("./subcomponents/MinimizeButton"));
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
30
|
(0, _react2.initializeIcons)();
|
|
31
31
|
|
|
@@ -55,23 +55,28 @@ function InputValidationPane(props) {
|
|
|
55
55
|
const [isInitialRendering, setIsInitialRendering] = (0, _react2.useState)(true);
|
|
56
56
|
const [isInvalidInput, setIsInvalidInput] = (0, _react2.useState)(false);
|
|
57
57
|
const [isSendButtonEnabled, setIsSendButtonEnabled] = (0, _react2.useState)(false);
|
|
58
|
-
|
|
59
|
-
const isValidInput = () => {
|
|
58
|
+
const isValidInput = (0, _react2.useCallback)(() => {
|
|
60
59
|
var _props$controlProps2, _props$controlProps3;
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
if (!((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.checkInput)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!inputValue) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
64
68
|
|
|
69
|
+
return (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.checkInput(inputValue);
|
|
70
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
71
|
|
|
66
|
-
const handleInputChange = e => {
|
|
72
|
+
const handleInputChange = (0, _react2.useCallback)(e => {
|
|
67
73
|
var _props$controlProps4, _props$controlProps5;
|
|
68
74
|
|
|
69
75
|
setInputValue(e.target.value);
|
|
70
76
|
e.target.value ? setIsSendButtonEnabled(((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.enableSendButton) || e.target.value !== "") : setIsSendButtonEnabled(((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.enableSendButton) ?? false);
|
|
71
77
|
setIsInvalidInput(false);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const send = (controlId, suffix) => {
|
|
78
|
+
}, []);
|
|
79
|
+
const send = (0, _react2.useCallback)((controlId, suffix) => {
|
|
75
80
|
var _props$controlProps6;
|
|
76
81
|
|
|
77
82
|
if ((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.onSend) {
|
|
@@ -90,20 +95,17 @@ function InputValidationPane(props) {
|
|
|
90
95
|
setIsInvalidInput(true);
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
const handleInputKeyDown = e => {
|
|
100
|
+
const handleInputKeyUp = (0, _react2.useCallback)(e => {
|
|
97
101
|
if (e.code === _Constants.KeyCodes.ENTER) {
|
|
98
|
-
send(elementId + "-textField", "
|
|
102
|
+
send(elementId + "-textField", "KeyUp");
|
|
99
103
|
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const handleSendClick = () => {
|
|
104
|
+
}, [inputValue]);
|
|
105
|
+
const handleSendClick = (0, _react2.useCallback)(() => {
|
|
103
106
|
send(elementId + "-sendbutton", "Click");
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const cancel = (controlId, suffix) => {
|
|
107
|
+
}, [inputValue]);
|
|
108
|
+
const cancel = (0, _react2.useCallback)((controlId, suffix) => {
|
|
107
109
|
var _props$controlProps8;
|
|
108
110
|
|
|
109
111
|
if ((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.onCancel) {
|
|
@@ -121,19 +123,16 @@ function InputValidationPane(props) {
|
|
|
121
123
|
|
|
122
124
|
(_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.onCancel();
|
|
123
125
|
}
|
|
124
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
125
|
-
|
|
126
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
127
|
|
|
127
|
-
const handleEscKeyDown = e => {
|
|
128
|
+
const handleEscKeyDown = (0, _react2.useCallback)(e => {
|
|
128
129
|
if (e.code === _Constants.KeyCodes.ESCAPE) {
|
|
129
130
|
cancel(elementId, "KeyDown");
|
|
130
131
|
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const handleCancelClick = () => {
|
|
132
|
+
}, []);
|
|
133
|
+
const handleCancelClick = (0, _react2.useCallback)(() => {
|
|
134
134
|
cancel(elementId + "-cancelbutton", "Click");
|
|
135
|
-
};
|
|
136
|
-
|
|
135
|
+
}, []);
|
|
137
136
|
(0, _react2.useEffect)(() => {
|
|
138
137
|
var _props$controlProps11, _props$controlProps12, _props$controlProps13;
|
|
139
138
|
|
|
@@ -160,7 +159,8 @@ function InputValidationPane(props) {
|
|
|
160
159
|
const redBorderStyles = {
|
|
161
160
|
borderColor: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.inputWithErrorMessageBorderColor) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputWithErrorMessageBorderColor,
|
|
162
161
|
borderRadius: "1px",
|
|
163
|
-
borderStyle: "solid"
|
|
162
|
+
borderStyle: "solid",
|
|
163
|
+
borderWidth: "1px"
|
|
164
164
|
};
|
|
165
165
|
const inputStyles = {
|
|
166
166
|
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
@@ -244,7 +244,7 @@ function InputValidationPane(props) {
|
|
|
244
244
|
ariaLabel: ((_props$controlProps24 = props.controlProps) === null || _props$controlProps24 === void 0 ? void 0 : _props$controlProps24.inputAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputAriaLabel,
|
|
245
245
|
borderless: isInvalidInput,
|
|
246
246
|
onChange: handleInputChange,
|
|
247
|
-
|
|
247
|
+
onKeyUp: handleInputKeyUp
|
|
248
248
|
})), isInvalidInput && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
249
249
|
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,
|
|
250
250
|
styles: invalidInputErrorMessageStyles,
|
|
@@ -16,6 +16,7 @@ const defaultInputValidationPaneCancelButtonStyles = {
|
|
|
16
16
|
fontWeight: "500",
|
|
17
17
|
lineHeight: "19px",
|
|
18
18
|
textOverflow: "ellipsis",
|
|
19
|
-
whiteSpace: "nowrap"
|
|
19
|
+
whiteSpace: "nowrap",
|
|
20
|
+
width: "80px"
|
|
20
21
|
};
|
|
21
22
|
exports.defaultInputValidationPaneCancelButtonStyles = defaultInputValidationPaneCancelButtonStyles;
|
|
@@ -12,6 +12,7 @@ const defaultInputValidationPaneSendButtonStyles = {
|
|
|
12
12
|
fontWeight: "500",
|
|
13
13
|
lineHeight: "19px",
|
|
14
14
|
textOverflow: "ellipsis",
|
|
15
|
-
whiteSpace: "nowrap"
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
width: "80px"
|
|
16
17
|
};
|
|
17
18
|
exports.defaultInputValidationPaneSendButtonStyles = defaultInputValidationPaneSendButtonStyles;
|
|
@@ -28,7 +28,8 @@ function PostChatSurveyPane(props) {
|
|
|
28
28
|
const iframeStyles = {
|
|
29
29
|
height: "100vh",
|
|
30
30
|
width: "100%",
|
|
31
|
-
display: "block"
|
|
31
|
+
display: "block",
|
|
32
|
+
maxHeight: "100%"
|
|
32
33
|
};
|
|
33
34
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
34
35
|
id: elementId,
|
|
@@ -82,6 +82,7 @@ function PreChatSurveyPane(props) {
|
|
|
82
82
|
}
|
|
83
83
|
}, []); //Adaptive Card Initilializations
|
|
84
84
|
|
|
85
|
+
AdaptiveCards.GlobalSettings.setTabIndexAtCardRoot = false;
|
|
85
86
|
const adaptiveCard = new AdaptiveCards.AdaptiveCard();
|
|
86
87
|
adaptiveCard.hostConfig = new AdaptiveCards.HostConfig(adaptiveCardHostConfig);
|
|
87
88
|
adaptiveCard.parse(adpativeCardPayload);
|