@microsoft/omnichannel-chat-components 0.1.0-main.f0b0a93 → 0.1.0-main.fc27009
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/README.md +1 -0
- package/lib/cjs/assets/Icons.js +48 -0
- 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/defaultProps/defaultCurrentCallControlPropsRtl.js +6 -16
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +4 -16
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +30 -0
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/componentOverrideProps.js +2 -4
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +4 -10
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultStyles/defaultIncomingCallStyleProps.js +8 -8
- package/lib/cjs/components/chatbutton/ChatButton.js +23 -13
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonIconContainerStyles.js +2 -4
- package/lib/cjs/components/common/commandbutton/CommandButton.js +2 -1
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +5 -13
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +2 -1
- package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +2 -4
- package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +4 -10
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +2 -4
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +48 -18
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconImageProps.js +2 -4
- package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeStyles/presetThreeLoadingPaneIconImageProps.js +2 -4
- package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoStyles/presetTwoLoadingPaneGeneralStyles.js +2 -4
- package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoStyles/presetTwoOOOHPaneGeneralStyles.js +2 -4
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -2
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +5 -4
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +17 -15
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -4
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneHeaderContainerStyles.js +2 -4
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/cjs/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneIconStyles.js +2 -4
- package/lib/cjs/index.js +128 -0
- package/lib/esm/assets/Icons.js +21 -0
- 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/defaultProps/defaultCurrentCallControlPropsRtl.js +6 -10
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +4 -16
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +32 -2
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/componentOverrideProps.js +2 -2
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +4 -6
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultStyles/defaultIncomingCallStyleProps.js +8 -8
- package/lib/esm/components/chatbutton/ChatButton.js +24 -14
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonIconContainerStyles.js +2 -2
- package/lib/esm/components/common/commandbutton/CommandButton.js +2 -1
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +5 -8
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +2 -1
- package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +2 -2
- package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +4 -6
- package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +2 -2
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +48 -18
- package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconImageProps.js +2 -2
- package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeStyles/presetThreeLoadingPaneIconImageProps.js +2 -2
- package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoStyles/presetTwoLoadingPaneGeneralStyles.js +2 -2
- package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoStyles/presetTwoOOOHPaneGeneralStyles.js +2 -2
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -2
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +5 -4
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +17 -15
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -2
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneHeaderContainerStyles.js +2 -2
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/esm/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneIconStyles.js +2 -2
- package/lib/esm/index.js +2 -1
- package/lib/types/assets/Icons.d.ts +21 -0
- package/lib/types/common/Constants.d.ts +6 -0
- package/lib/types/components/callingcontainer/subcomponents/CurrentCall/interfaces/ICurrentCallStyleProps.d.ts +0 -4
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +5 -10
- package/lib/cjs/assets/assets.d.js +0 -1
- package/lib/cjs/assets/imgs/ChatBubble.svg +0 -28
- package/lib/cjs/assets/imgs/ChatReconnectPopupIcon.png +0 -0
- package/lib/cjs/assets/imgs/Proactive_banner.png +0 -0
- package/lib/cjs/assets/imgs/agent.png +0 -0
- package/lib/cjs/assets/imgs/callacceptbutton.svg +0 -3
- package/lib/cjs/assets/imgs/callrejectbutton.svg +0 -3
- package/lib/cjs/assets/imgs/chat.svg +0 -47
- package/lib/cjs/assets/imgs/chatIcon.svg +0 -16
- package/lib/cjs/assets/imgs/closeButton.svg +0 -3
- package/lib/cjs/assets/imgs/closeChatButton.svg +0 -3
- package/lib/cjs/assets/imgs/error.svg +0 -3
- package/lib/cjs/assets/imgs/lcwAudioOff.svg +0 -3
- package/lib/cjs/assets/imgs/lcwAudioOn.svg +0 -3
- package/lib/cjs/assets/imgs/loading.gif +0 -0
- package/lib/cjs/assets/imgs/minimizeChatButton.svg +0 -3
- package/lib/cjs/assets/imgs/transcriptDownloadIcon.svg +0 -4
- package/lib/cjs/assets/imgs/transcriptEmailIcon.svg +0 -5
- package/lib/cjs/assets/imgs/videocallacceptbutton.svg +0 -3
- package/lib/cjs/assets/imgs/videooff.svg +0 -3
- package/lib/cjs/assets/imgs/videoon.svg +0 -3
- package/lib/cjs/assets/imgs/voiceoff.svg +0 -3
- package/lib/cjs/assets/imgs/voiceon.svg +0 -3
- package/lib/esm/assets/assets.d.js +0 -0
- package/lib/esm/assets/imgs/ChatBubble.svg +0 -28
- package/lib/esm/assets/imgs/ChatReconnectPopupIcon.png +0 -0
- package/lib/esm/assets/imgs/Proactive_banner.png +0 -0
- package/lib/esm/assets/imgs/agent.png +0 -0
- package/lib/esm/assets/imgs/callacceptbutton.svg +0 -3
- package/lib/esm/assets/imgs/callrejectbutton.svg +0 -3
- package/lib/esm/assets/imgs/chat.svg +0 -47
- package/lib/esm/assets/imgs/chatIcon.svg +0 -16
- package/lib/esm/assets/imgs/closeButton.svg +0 -3
- package/lib/esm/assets/imgs/closeChatButton.svg +0 -3
- package/lib/esm/assets/imgs/error.svg +0 -3
- package/lib/esm/assets/imgs/lcwAudioOff.svg +0 -3
- package/lib/esm/assets/imgs/lcwAudioOn.svg +0 -3
- package/lib/esm/assets/imgs/loading.gif +0 -0
- package/lib/esm/assets/imgs/minimizeChatButton.svg +0 -3
- package/lib/esm/assets/imgs/transcriptDownloadIcon.svg +0 -4
- package/lib/esm/assets/imgs/transcriptEmailIcon.svg +0 -5
- package/lib/esm/assets/imgs/videocallacceptbutton.svg +0 -3
- package/lib/esm/assets/imgs/videooff.svg +0 -3
- package/lib/esm/assets/imgs/videoon.svg +0 -3
- package/lib/esm/assets/imgs/voiceoff.svg +0 -3
- package/lib/esm/assets/imgs/voiceon.svg +0 -3
|
@@ -9,9 +9,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@fluentui/react");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _Icons = require("../../../../../../assets/Icons");
|
|
15
13
|
|
|
16
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
15
|
|
|
@@ -51,7 +49,7 @@ const componentOverrideProps = {
|
|
|
51
49
|
incomingCallTitle: /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
52
50
|
horizontal: true
|
|
53
51
|
}, /*#__PURE__*/React.createElement(_react2.Image, {
|
|
54
|
-
src:
|
|
52
|
+
src: _Icons.AgentIconBase64,
|
|
55
53
|
styles: agentImageStyles
|
|
56
54
|
}), /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
57
55
|
verticalAlign: "center",
|
|
@@ -5,13 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultIncomingCallControlPropsRtl = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _callacceptbutton = _interopRequireDefault(require("../../../../../../assets/imgs/callacceptbutton.svg"));
|
|
11
|
-
|
|
12
|
-
var _videocallacceptbutton = _interopRequireDefault(require("../../../../../../assets/imgs/videocallacceptbutton.svg"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../../../assets/Icons");
|
|
15
9
|
|
|
16
10
|
const defaultIncomingCallControlPropsRtl = {
|
|
17
11
|
id: "incomingCallPopup",
|
|
@@ -47,7 +41,7 @@ const defaultIncomingCallControlPropsRtl = {
|
|
|
47
41
|
type: "icon",
|
|
48
42
|
ariaLabel: "Decline Call",
|
|
49
43
|
imageIconProps: {
|
|
50
|
-
src:
|
|
44
|
+
src: _Icons.CallRejectButtonBase64,
|
|
51
45
|
styles: {
|
|
52
46
|
image: {
|
|
53
47
|
height: "18px",
|
|
@@ -62,7 +56,7 @@ const defaultIncomingCallControlPropsRtl = {
|
|
|
62
56
|
type: "icon",
|
|
63
57
|
ariaLabel: "Audio Call",
|
|
64
58
|
imageIconProps: {
|
|
65
|
-
src:
|
|
59
|
+
src: _Icons.CallAcceptButtonBase64,
|
|
66
60
|
styles: {
|
|
67
61
|
image: {
|
|
68
62
|
height: "18px",
|
|
@@ -77,7 +71,7 @@ const defaultIncomingCallControlPropsRtl = {
|
|
|
77
71
|
type: "icon",
|
|
78
72
|
ariaLabel: "Video Call",
|
|
79
73
|
imageIconProps: {
|
|
80
|
-
src:
|
|
74
|
+
src: _Icons.VideoCallAcceptButtonIconBase64,
|
|
81
75
|
styles: {
|
|
82
76
|
image: {
|
|
83
77
|
height: "18px",
|
|
@@ -12,8 +12,8 @@ const defaultIncomingCallStyleProps = {
|
|
|
12
12
|
},
|
|
13
13
|
audioCallButtonStyleProps: {
|
|
14
14
|
borderRadius: "50%",
|
|
15
|
-
color: "
|
|
16
|
-
backgroundColor: "
|
|
15
|
+
color: "#FFFFFF",
|
|
16
|
+
backgroundColor: "#008000",
|
|
17
17
|
lineHeight: "40px",
|
|
18
18
|
height: "40px",
|
|
19
19
|
width: "40px",
|
|
@@ -24,8 +24,8 @@ const defaultIncomingCallStyleProps = {
|
|
|
24
24
|
},
|
|
25
25
|
videoCallButtonStyleProps: {
|
|
26
26
|
borderRadius: "50%",
|
|
27
|
-
color: "
|
|
28
|
-
backgroundColor: "
|
|
27
|
+
color: "#FFFFFF",
|
|
28
|
+
backgroundColor: "#008000",
|
|
29
29
|
lineHeight: "40px",
|
|
30
30
|
height: "40px",
|
|
31
31
|
width: "40px",
|
|
@@ -40,8 +40,8 @@ const defaultIncomingCallStyleProps = {
|
|
|
40
40
|
},
|
|
41
41
|
declineCallButtonStyleProps: {
|
|
42
42
|
borderRadius: "50%",
|
|
43
|
-
color: "
|
|
44
|
-
backgroundColor: "
|
|
43
|
+
color: "#FFFFFF",
|
|
44
|
+
backgroundColor: "#DC0000",
|
|
45
45
|
lineHeight: "40px",
|
|
46
46
|
height: "40px",
|
|
47
47
|
width: "40px",
|
|
@@ -50,12 +50,12 @@ const defaultIncomingCallStyleProps = {
|
|
|
50
50
|
},
|
|
51
51
|
incomingCallTitleStyleProps: {
|
|
52
52
|
margin: "0 5px",
|
|
53
|
-
color: "
|
|
53
|
+
color: "#FFFFFF",
|
|
54
54
|
fontSize: 12,
|
|
55
55
|
fontFamily: "Segoe UI, Arial, sans-serif"
|
|
56
56
|
},
|
|
57
57
|
itemFocusStyleProps: {
|
|
58
|
-
outline: "2px solid
|
|
58
|
+
outline: "2px solid #FFFFFF"
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
exports.defaultIncomingCallStyleProps = defaultIncomingCallStyleProps;
|
|
@@ -34,18 +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
|
-
|
|
48
|
-
|
|
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;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
function IconContainer(props, parentId) {
|
|
@@ -57,7 +63,6 @@ function IconContainer(props, parentId) {
|
|
|
57
63
|
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.iconContainer) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
58
64
|
className: (_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cl = _props$styleProps4.classNames) === null || _props$styleProps4$cl === void 0 ? void 0 : _props$styleProps4$cl.iconContainerClassName,
|
|
59
65
|
styles: iconContainerStyles,
|
|
60
|
-
tabIndex: -1,
|
|
61
66
|
id: parentId + "-icon-container"
|
|
62
67
|
});
|
|
63
68
|
}
|
|
@@ -83,18 +88,15 @@ function TextContainer(props, parentId) {
|
|
|
83
88
|
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.textContainer) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
84
89
|
styles: textContainerStyles,
|
|
85
90
|
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,
|
|
86
|
-
id: parentId + "-text-container"
|
|
87
|
-
tabIndex: -1
|
|
91
|
+
id: parentId + "-text-container"
|
|
88
92
|
}, !hideChatTitle && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
89
93
|
styles: titleStyles,
|
|
90
|
-
tabIndex: -1,
|
|
91
94
|
dir: titleDir,
|
|
92
95
|
className: (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : (_props$styleProps9$cl = _props$styleProps9.classNames) === null || _props$styleProps9$cl === void 0 ? void 0 : _props$styleProps9$cl.titleClassName,
|
|
93
96
|
id: parentId + "-title",
|
|
94
97
|
title: titleText
|
|
95
98
|
}, titleText)), !hideChatSubtitle && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
96
99
|
styles: subtitleStyles,
|
|
97
|
-
tabIndex: -1,
|
|
98
100
|
dir: subtitleDir,
|
|
99
101
|
className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : (_props$styleProps10$c = _props$styleProps10.classNames) === null || _props$styleProps10$c === void 0 ? void 0 : _props$styleProps10$c.subtitleClassName,
|
|
100
102
|
id: parentId + "-subtitle",
|
|
@@ -130,7 +132,14 @@ function ChatButton(props) {
|
|
|
130
132
|
|
|
131
133
|
props.controlProps.onClick();
|
|
132
134
|
}
|
|
133
|
-
}, []);
|
|
135
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
+
|
|
137
|
+
const handleInputKeyDown = e => {
|
|
138
|
+
if (e.code === _Constants.KeyCodes.ENTER || e.code === _Constants.KeyCodes.SPACE) {
|
|
139
|
+
handleInitiateChatClick();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
134
143
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !hideChatButton && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
135
144
|
horizontal: true,
|
|
136
145
|
id: elementId,
|
|
@@ -139,6 +148,7 @@ function ChatButton(props) {
|
|
|
139
148
|
tabIndex: 0,
|
|
140
149
|
role: defaultRole,
|
|
141
150
|
onClick: handleInitiateChatClick,
|
|
151
|
+
onKeyDown: handleInputKeyDown,
|
|
142
152
|
"aria-label": defaultAriaLabel
|
|
143
153
|
}, !hideChatIcon && IconContainer(props, elementId), !hideChatTextContainer && TextContainer(props, elementId), !hideNotificationBubble && NotificationBubble(props, elementId)));
|
|
144
154
|
}
|
package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonIconContainerStyles.js
CHANGED
|
@@ -5,14 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultChatButtonIconContainerStyles = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../assets/Icons");
|
|
11
9
|
|
|
12
10
|
const defaultChatButtonIconContainerStyles = {
|
|
13
11
|
align: "center",
|
|
14
12
|
backgroundColor: "#315FA2",
|
|
15
|
-
backgroundImage: `url(${
|
|
13
|
+
backgroundImage: `url(${_Icons.ModernChatIconBase64})`,
|
|
16
14
|
backgroundPosition: "center",
|
|
17
15
|
backgroundRepeat: "no-repeat",
|
|
18
16
|
backgroundSize: "65% 65%",
|
|
@@ -30,7 +30,8 @@ function CommandButton(props) {
|
|
|
30
30
|
const iconButtonStyles = {
|
|
31
31
|
root: props.styles,
|
|
32
32
|
rootHovered: props.hoverStyles,
|
|
33
|
-
rootFocused: props.focusStyles
|
|
33
|
+
rootFocused: props.focusStyles,
|
|
34
|
+
rootPressed: props.hoverStyles
|
|
34
35
|
};
|
|
35
36
|
const handleOnClick = (0, _react2.useCallback)(() => {
|
|
36
37
|
if (props !== null && props !== void 0 && props.onClick) {
|
|
@@ -44,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
44
44
|
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; }
|
|
45
45
|
|
|
46
46
|
function ConfirmationPane(props) {
|
|
47
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$
|
|
47
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$styleProps13, _props$styleProps13$c, _props$controlProps9, _props$controlProps10, _props$componentOverr2, _props$styleProps14, _props$styleProps14$c, _props$controlProps11, _props$styleProps15, _props$styleProps15$c, _props$controlProps12, _props$componentOverr3, _props$styleProps16, _props$styleProps16$c, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$componentOverr4, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17;
|
|
48
48
|
|
|
49
49
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.id;
|
|
50
50
|
const handleConfirmClick = (0, _react2.useCallback)(() => {
|
|
@@ -96,12 +96,14 @@ function ConfirmationPane(props) {
|
|
|
96
96
|
const confirmButtonStyles = {
|
|
97
97
|
root: Object.assign({}, _defaultConfirmationPaneConfirmButtonStyles.defaultConfirmationPaneConfirmButtonStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.confirmButtonStyleProps),
|
|
98
98
|
rootHovered: Object.assign({}, _defaultConfirmationPaneConfirmButtonHoveredStyles.defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.confirmButtonHoveredStyleProps),
|
|
99
|
-
rootFocused: Object.assign({}, _defaultConfirmationPaneConfirmButtonFocusedStyles.defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps)
|
|
99
|
+
rootFocused: Object.assign({}, _defaultConfirmationPaneConfirmButtonFocusedStyles.defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps),
|
|
100
|
+
rootPressed: Object.assign({}, _defaultConfirmationPaneConfirmButtonHoveredStyles.defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.confirmButtonHoveredStyleProps)
|
|
100
101
|
};
|
|
101
102
|
const cancelButtonStyles = {
|
|
102
|
-
root: Object.assign({}, _defaultConfirmationPaneCancelButtonStyles.defaultConfirmationPaneCancelButtonStyles, (_props$
|
|
103
|
-
rootHovered: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$
|
|
104
|
-
rootFocused: Object.assign({}, _defaultConfirmationPaneCancelButtonFocusedStyles.defaultConfirmationPaneCancelButtonFocusedStyles, (_props$
|
|
103
|
+
root: Object.assign({}, _defaultConfirmationPaneCancelButtonStyles.defaultConfirmationPaneCancelButtonStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.cancelButtonStyleProps),
|
|
104
|
+
rootHovered: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.cancelButtonHoveredStyleProps),
|
|
105
|
+
rootFocused: Object.assign({}, _defaultConfirmationPaneCancelButtonFocusedStyles.defaultConfirmationPaneCancelButtonFocusedStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.cancelButtonFocusedStyleProps),
|
|
106
|
+
rootPressed: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.cancelButtonHoveredStyleProps)
|
|
105
107
|
};
|
|
106
108
|
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, {
|
|
107
109
|
id: elementId,
|
|
@@ -112,29 +114,29 @@ function ConfirmationPane(props) {
|
|
|
112
114
|
"aria-labelledby": elementId + "-title",
|
|
113
115
|
"aria-describedby": elementId + "-subtitle"
|
|
114
116
|
}, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
115
|
-
className: (_props$
|
|
117
|
+
className: (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.classNames) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.titleClassName,
|
|
116
118
|
styles: titleStyles,
|
|
117
119
|
tabIndex: -1,
|
|
118
120
|
id: elementId + "-title"
|
|
119
121
|
}, ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.titleText)), !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideSubtitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
120
|
-
className: (_props$
|
|
122
|
+
className: (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.classNames) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.subtitleClassName,
|
|
121
123
|
styles: subtitleStyles,
|
|
122
124
|
tabIndex: -1,
|
|
123
125
|
id: elementId + "-subtitle"
|
|
124
126
|
}, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.subtitleText)), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
125
127
|
horizontal: true,
|
|
126
|
-
className: (_props$
|
|
128
|
+
className: (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.classNames) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.buttonGroupClassName,
|
|
127
129
|
styles: buttonGroupStyles,
|
|
128
130
|
id: elementId + "-buttongroup"
|
|
129
131
|
}, !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideConfirmButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.confirmButton) || /*#__PURE__*/_react2.default.createElement(_Button.PrimaryButton, {
|
|
130
|
-
className: (_props$
|
|
132
|
+
className: (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : (_props$styleProps16$c = _props$styleProps16.classNames) === null || _props$styleProps16$c === void 0 ? void 0 : _props$styleProps16$c.confirmButtonClassName,
|
|
131
133
|
styles: confirmButtonStyles,
|
|
132
134
|
text: ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.confirmButtonText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.confirmButtonText,
|
|
133
135
|
onClick: handleConfirmClick,
|
|
134
136
|
id: elementId + "-confirmbutton",
|
|
135
137
|
ariaLabel: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.confirmButtonAriaLabel) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.confirmButtonAriaLabel
|
|
136
138
|
})), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideCancelButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.cancelButton) || /*#__PURE__*/_react2.default.createElement(_Button.DefaultButton, {
|
|
137
|
-
className: (_props$
|
|
139
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.cancelButtonClassName,
|
|
138
140
|
styles: cancelButtonStyles,
|
|
139
141
|
text: ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.cancelButtonText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.cancelButtonText,
|
|
140
142
|
onClick: handleCancelClick,
|
|
@@ -5,15 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.customFooterControlProps = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _lcwAudioOn = _interopRequireDefault(require("../../../../assets/imgs/lcwAudioOn.svg"));
|
|
11
|
-
|
|
12
|
-
var _transcriptDownloadIcon = _interopRequireDefault(require("../../../../assets/imgs/transcriptDownloadIcon.svg"));
|
|
13
|
-
|
|
14
|
-
var _transcriptEmailIcon = _interopRequireDefault(require("../../../../assets/imgs/transcriptEmailIcon.svg"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../assets/Icons");
|
|
17
9
|
|
|
18
10
|
const customFooterControlProps = {
|
|
19
11
|
id: "oc-lcw-footer",
|
|
@@ -42,7 +34,7 @@ const customFooterControlProps = {
|
|
|
42
34
|
id: "oc-lcw-footer-downloadtranscript-button",
|
|
43
35
|
type: "icon",
|
|
44
36
|
imageIconProps: {
|
|
45
|
-
src:
|
|
37
|
+
src: _Icons.TranscriptDownloadIconBase64
|
|
46
38
|
},
|
|
47
39
|
ariaLabel: "Download chat transcript"
|
|
48
40
|
},
|
|
@@ -50,7 +42,7 @@ const customFooterControlProps = {
|
|
|
50
42
|
id: "oc-lcw-footer-emailtranscript-button",
|
|
51
43
|
type: "icon",
|
|
52
44
|
imageIconProps: {
|
|
53
|
-
src:
|
|
45
|
+
src: _Icons.TranscriptEmailIconBase64
|
|
54
46
|
},
|
|
55
47
|
ariaLabel: "Email Transcript"
|
|
56
48
|
},
|
|
@@ -59,10 +51,10 @@ const customFooterControlProps = {
|
|
|
59
51
|
ariaLabel: "Turn sound off",
|
|
60
52
|
toggleAriaLabel: "Turn sound on",
|
|
61
53
|
imageIconProps: {
|
|
62
|
-
src:
|
|
54
|
+
src: _Icons.AudioNotificationOnIconBase64
|
|
63
55
|
},
|
|
64
56
|
imageToggleIconProps: {
|
|
65
|
-
src:
|
|
57
|
+
src: _Icons.AudioNotificationOffIconBase64
|
|
66
58
|
}
|
|
67
59
|
}
|
|
68
60
|
};
|
|
@@ -25,7 +25,8 @@ function AudioNotificationButton(props) {
|
|
|
25
25
|
const iconButtonStyles = {
|
|
26
26
|
root: props === null || props === void 0 ? void 0 : props.styles,
|
|
27
27
|
rootHovered: props === null || props === void 0 ? void 0 : props.hoverStyles,
|
|
28
|
-
rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles
|
|
28
|
+
rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles,
|
|
29
|
+
rootPressed: props === null || props === void 0 ? void 0 : props.hoverStyles
|
|
29
30
|
}; //imageIconProps > iconName
|
|
30
31
|
|
|
31
32
|
const volume0Icon = props.imageToggleIconProps ? {
|
|
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.azureHeaderControlProps = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../assets/Icons");
|
|
11
9
|
|
|
12
10
|
const azureHeaderControlProps = {
|
|
13
11
|
id: "oc-lcw-header",
|
|
@@ -41,7 +39,7 @@ const azureHeaderControlProps = {
|
|
|
41
39
|
},
|
|
42
40
|
headerIconProps: {
|
|
43
41
|
id: "oc-lcw-header-icon",
|
|
44
|
-
src:
|
|
42
|
+
src: _Icons.LegacyChatIconBase64,
|
|
45
43
|
alt: "Chat Icon"
|
|
46
44
|
},
|
|
47
45
|
headerTitleProps: {
|
|
@@ -5,13 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.customHeaderControlProps = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _closeChatButton = _interopRequireDefault(require("../../../../assets/imgs/closeChatButton.svg"));
|
|
11
|
-
|
|
12
|
-
var _minimizeChatButton = _interopRequireDefault(require("../../../../assets/imgs/minimizeChatButton.svg"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../assets/Icons");
|
|
15
9
|
|
|
16
10
|
const customHeaderControlProps = {
|
|
17
11
|
id: "oc-lcw-header",
|
|
@@ -38,7 +32,7 @@ const customHeaderControlProps = {
|
|
|
38
32
|
id: "oc-lcw-header-minimizebutton",
|
|
39
33
|
type: "icon",
|
|
40
34
|
imageIconProps: {
|
|
41
|
-
src:
|
|
35
|
+
src: _Icons.MinimizeChatButtonIconBase64,
|
|
42
36
|
styles: {
|
|
43
37
|
image: {
|
|
44
38
|
height: "16px",
|
|
@@ -51,7 +45,7 @@ const customHeaderControlProps = {
|
|
|
51
45
|
id: "oc-lcw-header-closebutton",
|
|
52
46
|
type: "icon",
|
|
53
47
|
imageIconProps: {
|
|
54
|
-
src:
|
|
48
|
+
src: _Icons.CloseChatButtonIconBase64,
|
|
55
49
|
styles: {
|
|
56
50
|
image: {
|
|
57
51
|
height: "16px",
|
|
@@ -62,7 +56,7 @@ const customHeaderControlProps = {
|
|
|
62
56
|
},
|
|
63
57
|
headerIconProps: {
|
|
64
58
|
id: "oc-lcw-header-icon",
|
|
65
|
-
src:
|
|
59
|
+
src: _Icons.LegacyChatIconBase64,
|
|
66
60
|
alt: "Chat Icon"
|
|
67
61
|
},
|
|
68
62
|
headerTitleProps: {
|
|
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultHeaderControlProps = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _Icons = require("../../../../assets/Icons");
|
|
11
9
|
|
|
12
10
|
const defaultHeaderControlProps = {
|
|
13
11
|
id: "oc-lcw-header",
|
|
@@ -42,7 +40,7 @@ const defaultHeaderControlProps = {
|
|
|
42
40
|
},
|
|
43
41
|
headerIconProps: {
|
|
44
42
|
id: "oc-lcw-header-icon",
|
|
45
|
-
src:
|
|
43
|
+
src: _Icons.ModernChatIconBase64,
|
|
46
44
|
alt: "Chat Icon"
|
|
47
45
|
},
|
|
48
46
|
headerTitleProps: {
|
|
@@ -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$styleProps15, _props$styleProps16, _props$controlProps15, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17, _props$styleProps18, _props$styleProps18$c, _props$controlProps18, _props$componentOverr, _props$styleProps19, _props$styleProps19$c, _props$controlProps19, _props$controlProps20, _props$componentOverr2, _props$styleProps20, _props$styleProps20$c, _props$controlProps21, _props$controlProps22, _props$componentOverr3, _props$styleProps21, _props$styleProps21$c, _props$controlProps23, _props$controlProps24, _props$componentOverr4, _props$styleProps22, _props$styleProps22$c, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$styleProps23, _props$styleProps23$c, _props$controlProps28, _props$componentOverr5, _props$styleProps24, _props$styleProps24$c, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$controlProps32, _props$componentOverr6, _props$styleProps25, _props$styleProps25$c, _props$controlProps33, _props$controlProps34, _props$controlProps35;
|
|
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,57 @@ 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),
|
|
208
|
+
rootPressed: Object.assign({}, _defaultInputValidationPaneSendButtonHoveredStyles.defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.sendButtonHoveredStyleProps)
|
|
180
209
|
};
|
|
181
210
|
const cancelButtonStyles = {
|
|
182
|
-
root: Object.assign({}, _defaultInputValidationPaneCancelButtonStyles.defaultInputValidationPaneCancelButtonStyles, (_props$
|
|
183
|
-
rootHovered: Object.assign({}, _defaultInputValidationPaneCancelButtonHoveredStyles.defaultInputValidationPaneCancelButtonHoveredStyles, (_props$
|
|
211
|
+
root: Object.assign({}, _defaultInputValidationPaneCancelButtonStyles.defaultInputValidationPaneCancelButtonStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.cancelButtonStyleProps),
|
|
212
|
+
rootHovered: Object.assign({}, _defaultInputValidationPaneCancelButtonHoveredStyles.defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : _props$styleProps15.cancelButtonHoveredStyleProps),
|
|
213
|
+
rootPressed: Object.assign({}, _defaultInputValidationPaneCancelButtonHoveredStyles.defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : _props$styleProps16.cancelButtonHoveredStyleProps)
|
|
184
214
|
};
|
|
185
215
|
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$
|
|
216
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.containerClassName,
|
|
187
217
|
id: elementId,
|
|
188
218
|
tabIndex: -1,
|
|
189
219
|
onKeyDown: handleEscKeyDown,
|
|
@@ -191,22 +221,22 @@ function InputValidationPane(props) {
|
|
|
191
221
|
"aria-label": ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.inputValidationPaneAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputValidationPaneAriaLabel,
|
|
192
222
|
styles: containerStyles
|
|
193
223
|
}, /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
194
|
-
className: (_props$
|
|
224
|
+
className: (_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.classNames) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.headerGroupClassName,
|
|
195
225
|
styles: headerGroupStyles,
|
|
196
226
|
tabIndex: -1,
|
|
197
227
|
id: elementId + "-headergroup"
|
|
198
228
|
}, !((_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$
|
|
229
|
+
className: (_props$styleProps19 = props.styleProps) === null || _props$styleProps19 === void 0 ? void 0 : (_props$styleProps19$c = _props$styleProps19.classNames) === null || _props$styleProps19$c === void 0 ? void 0 : _props$styleProps19$c.titleClassName,
|
|
200
230
|
styles: titleStyles,
|
|
201
231
|
tabIndex: -1,
|
|
202
232
|
id: elementId + "-title"
|
|
203
233
|
}, ((_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$
|
|
234
|
+
className: (_props$styleProps20 = props.styleProps) === null || _props$styleProps20 === void 0 ? void 0 : (_props$styleProps20$c = _props$styleProps20.classNames) === null || _props$styleProps20$c === void 0 ? void 0 : _props$styleProps20$c.subtitleClassName,
|
|
205
235
|
styles: subtitleStyles,
|
|
206
236
|
tabIndex: -1,
|
|
207
237
|
id: elementId + "-subtitle"
|
|
208
238
|
}, ((_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$
|
|
239
|
+
className: (_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 ? void 0 : (_props$styleProps21$c = _props$styleProps21.classNames) === null || _props$styleProps21$c === void 0 ? void 0 : _props$styleProps21$c.inputClassName,
|
|
210
240
|
styles: isInvalidInput ? inputWithErrorMessageStyles : inputStyles,
|
|
211
241
|
tabIndex: 0,
|
|
212
242
|
value: inputValue ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputInitialText,
|
|
@@ -216,7 +246,7 @@ function InputValidationPane(props) {
|
|
|
216
246
|
onChange: handleInputChange,
|
|
217
247
|
onKeyDown: handleInputKeyDown
|
|
218
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, {
|
|
219
|
-
className: (_props$
|
|
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,
|
|
220
250
|
styles: invalidInputErrorMessageStyles,
|
|
221
251
|
"aria-label": ((_props$controlProps25 = props.controlProps) === null || _props$controlProps25 === void 0 ? void 0 : _props$controlProps25.invalidInputErrorMessageText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.invalidInputErrorMessageText,
|
|
222
252
|
tabIndex: -1,
|
|
@@ -224,12 +254,12 @@ function InputValidationPane(props) {
|
|
|
224
254
|
id: elementId + "-invalidinputerrormessage"
|
|
225
255
|
}, ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.invalidInputErrorMessageText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.invalidInputErrorMessageText))), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
226
256
|
horizontal: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.isButtonGroupHorizontal) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.isButtonGroupHorizontal,
|
|
227
|
-
className: (_props$
|
|
257
|
+
className: (_props$styleProps23 = props.styleProps) === null || _props$styleProps23 === void 0 ? void 0 : (_props$styleProps23$c = _props$styleProps23.classNames) === null || _props$styleProps23$c === void 0 ? void 0 : _props$styleProps23$c.buttonGroupClassName,
|
|
228
258
|
styles: buttonGroupStyles,
|
|
229
259
|
tabIndex: -1,
|
|
230
260
|
id: elementId + "-buttongroup"
|
|
231
261
|
}, !((_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$
|
|
262
|
+
className: (_props$styleProps24 = props.styleProps) === null || _props$styleProps24 === void 0 ? void 0 : (_props$styleProps24$c = _props$styleProps24.classNames) === null || _props$styleProps24$c === void 0 ? void 0 : _props$styleProps24$c.sendButtonClassName,
|
|
233
263
|
styles: sendButtonStyles,
|
|
234
264
|
title: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
|
|
235
265
|
tabIndex: 0,
|
|
@@ -239,7 +269,7 @@ function InputValidationPane(props) {
|
|
|
239
269
|
id: elementId + "-sendbutton",
|
|
240
270
|
ariaLabel: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.sendButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonAriaLabel
|
|
241
271
|
})), !((_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$
|
|
272
|
+
className: (_props$styleProps25 = props.styleProps) === null || _props$styleProps25 === void 0 ? void 0 : (_props$styleProps25$c = _props$styleProps25.classNames) === null || _props$styleProps25$c === void 0 ? void 0 : _props$styleProps25$c.cancelButtonClassName,
|
|
243
273
|
styles: cancelButtonStyles,
|
|
244
274
|
title: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
|
|
245
275
|
tabIndex: 0,
|
|
@@ -7,12 +7,10 @@ exports.defaultLoadingPaneIconImageProps = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("@fluentui/react");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _Icons = require("../../../../../assets/Icons");
|
|
13
11
|
|
|
14
12
|
const defaultLoadingPaneIconImageProps = {
|
|
15
|
-
src:
|
|
13
|
+
src: _Icons.ModernChatIconBase64,
|
|
16
14
|
imageFit: _react.ImageFit.center,
|
|
17
15
|
width: "86px",
|
|
18
16
|
height: "86px",
|