@microsoft/omnichannel-chat-components 0.1.0-main.d22acb1 → 0.1.0-main.d5e0dfe
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/utils.js +21 -2
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +14 -1
- package/lib/cjs/components/chatbutton/ChatButton.js +1 -1
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +1 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +7 -0
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +0 -1
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +2 -1
- 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/outofofficehourspane/OOOHPane.js +13 -6
- package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +2 -1
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +20 -8
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/esm/common/utils.js +16 -0
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +14 -1
- package/lib/esm/components/chatbutton/ChatButton.js +1 -1
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +1 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +8 -1
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +0 -1
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +2 -1
- 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/outofofficehourspane/OOOHPane.js +13 -7
- package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +2 -1
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +20 -8
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
- package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
- package/package.json +1 -1
package/lib/cjs/common/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.uuidv4 = exports.processCustomComponents = exports.getValidatedURL = exports.getSeconds = exports.getMinutes = exports.getInputValuesFromAdaptiveCard = exports.getHours = exports.generateEventName = exports.broadcastError = exports.addNoreferrerNoopenerTag = void 0;
|
|
6
|
+
exports.uuidv4 = exports.replaceURLWithAnchor = exports.processCustomComponents = exports.getValidatedURL = exports.getSeconds = exports.getMinutes = exports.getInputValuesFromAdaptiveCard = exports.getHours = exports.generateEventName = exports.broadcastError = exports.addNoreferrerNoopenerTag = void 0;
|
|
7
7
|
|
|
8
8
|
var _Constants = require("./Constants");
|
|
9
9
|
|
|
@@ -133,4 +133,23 @@ const addNoreferrerNoopenerTag = htmlNode => {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
exports.addNoreferrerNoopenerTag = addNoreferrerNoopenerTag;
|
|
136
|
+
exports.addNoreferrerNoopenerTag = addNoreferrerNoopenerTag;
|
|
137
|
+
|
|
138
|
+
const replaceURLWithAnchor = (text, openInNewTab) => {
|
|
139
|
+
if (text) {
|
|
140
|
+
const modifiedText = text.replace(_Constants.Regex.URLRegex, function (url) {
|
|
141
|
+
if (openInNewTab) {
|
|
142
|
+
// eslint-disable-next-line quotes
|
|
143
|
+
return '<a href="' + url + '" rel="noreferrer noopener" target="_blank">' + url + '</a>';
|
|
144
|
+
} // eslint-disable-next-line quotes
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
return '<a href="' + url + '">' + url + '</a>';
|
|
148
|
+
});
|
|
149
|
+
return modifiedText;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return text;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
exports.replaceURLWithAnchor = replaceURLWithAnchor;
|
|
@@ -132,12 +132,25 @@ function IncomingCall(props) {
|
|
|
132
132
|
window.removeEventListener("keydown", ignoreDefault);
|
|
133
133
|
};
|
|
134
134
|
}, []);
|
|
135
|
+
(0, React.useEffect)(() => {
|
|
136
|
+
// Setting focus to decline call button when incoming call alert appears
|
|
137
|
+
if (declineCallButtonId) {
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
|
+
const declineCallButton = document.getElementById(declineCallButtonId);
|
|
140
|
+
|
|
141
|
+
if (declineCallButton) {
|
|
142
|
+
declineCallButton.focus();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}, []);
|
|
135
146
|
return /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
136
147
|
horizontal: true,
|
|
137
148
|
className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
|
|
138
149
|
horizontalAlign: "space-between",
|
|
139
150
|
styles: stackStyles,
|
|
140
|
-
dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = _defaultIncomingCallProps.defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir)
|
|
151
|
+
dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = _defaultIncomingCallProps.defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir),
|
|
152
|
+
role: "alert",
|
|
153
|
+
"aria-label": incomingCallTitleProps === null || incomingCallTitleProps === void 0 ? void 0 : incomingCallTitleProps.text
|
|
141
154
|
}, /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
142
155
|
horizontal: true,
|
|
143
156
|
id: "incomingCallLeftGroup",
|
|
@@ -112,7 +112,7 @@ function ChatButton(props) {
|
|
|
112
112
|
var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
|
|
113
113
|
|
|
114
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) ??
|
|
115
|
+
const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? _defaultChatButtonControlProps.defaultChatButtonControlProps.ariaLabel;
|
|
116
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
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
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);
|
|
@@ -8,7 +8,7 @@ const defaultChatButtonControlProps = {
|
|
|
8
8
|
id: "lcw-components-chat-button",
|
|
9
9
|
dir: "ltr",
|
|
10
10
|
role: "button",
|
|
11
|
-
ariaLabel: "
|
|
11
|
+
ariaLabel: "Let's chat We are online",
|
|
12
12
|
unreadMessageCount: "0",
|
|
13
13
|
titleText: "Let's Chat!",
|
|
14
14
|
subtitleText: "We're online.",
|
|
@@ -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,
|
|
@@ -6,9 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.defaultConfirmationPaneButtonGroupStyles = void 0;
|
|
7
7
|
const defaultConfirmationPaneButtonGroupStyles = {
|
|
8
8
|
display: "flex",
|
|
9
|
+
width: "auto",
|
|
10
|
+
height: "auto",
|
|
11
|
+
boxSizing: "border-box",
|
|
9
12
|
flexFlow: "row",
|
|
10
13
|
justifyContent: "center",
|
|
11
14
|
alignItems: "center",
|
|
12
|
-
gap: "10px"
|
|
15
|
+
gap: "10px",
|
|
16
|
+
marginBottom: "10px"
|
|
13
17
|
};
|
|
14
18
|
exports.defaultConfirmationPaneButtonGroupStyles = defaultConfirmationPaneButtonGroupStyles;
|
|
@@ -5,19 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultConfirmationPaneGeneralStyles = void 0;
|
|
7
7
|
const defaultConfirmationPaneGeneralStyles = {
|
|
8
|
+
display: "flex",
|
|
9
|
+
minHeight: "160px",
|
|
10
|
+
maxHeight: "300px",
|
|
11
|
+
boxSizing: "border-box",
|
|
8
12
|
backgroundColor: "white",
|
|
9
13
|
borderRadius: "2px",
|
|
10
14
|
color: "black",
|
|
11
15
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
12
16
|
fontSize: "14px",
|
|
13
|
-
height: "160px",
|
|
14
17
|
padding: "10px 20px",
|
|
15
|
-
width: "262px",
|
|
16
18
|
position: "absolute",
|
|
17
19
|
justifyContent: "center",
|
|
18
20
|
alignItems: "center",
|
|
19
|
-
display: "flex",
|
|
20
21
|
flexFlow: "column",
|
|
21
|
-
zIndex: "9999"
|
|
22
|
+
zIndex: "9999",
|
|
23
|
+
left: "26px",
|
|
24
|
+
right: "26px"
|
|
22
25
|
};
|
|
23
26
|
exports.defaultConfirmationPaneGeneralStyles = defaultConfirmationPaneGeneralStyles;
|
|
@@ -88,7 +88,6 @@ function AudioNotificationButton(props) {
|
|
|
88
88
|
disabled: disabled,
|
|
89
89
|
styles: iconButtonStyles,
|
|
90
90
|
className: props.className,
|
|
91
|
-
"aria-label": muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off",
|
|
92
91
|
title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
|
|
93
92
|
});
|
|
94
93
|
}
|
|
@@ -159,7 +159,8 @@ function InputValidationPane(props) {
|
|
|
159
159
|
const redBorderStyles = {
|
|
160
160
|
borderColor: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.inputWithErrorMessageBorderColor) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputWithErrorMessageBorderColor,
|
|
161
161
|
borderRadius: "1px",
|
|
162
|
-
borderStyle: "solid"
|
|
162
|
+
borderStyle: "solid",
|
|
163
|
+
borderWidth: "1px"
|
|
163
164
|
};
|
|
164
165
|
const inputStyles = {
|
|
165
166
|
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
@@ -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;
|
|
@@ -17,10 +17,12 @@ var _defaultOOOHPaneGeneralStyles = require("./common/defaultProps/defaultStyles
|
|
|
17
17
|
|
|
18
18
|
var _defaultOOOHPaneTitleStyles = require("./common/defaultProps/defaultStyles/defaultOOOHPaneTitleStyles");
|
|
19
19
|
|
|
20
|
+
var _utils = require("../../common/utils");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
function OOOHPane(props) {
|
|
23
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$controlProps2, _props$controlProps3, _props$styleProps3, _props$styleProps3$cl, _props$
|
|
25
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$styleProps3, _props$styleProps3$cl, _props$controlProps6, _props$controlProps7, _props$componentOverr, _props$styleProps4, _props$styleProps4$cl;
|
|
24
26
|
|
|
25
27
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.id;
|
|
26
28
|
const containerStyles = {
|
|
@@ -29,19 +31,24 @@ function OOOHPane(props) {
|
|
|
29
31
|
const titleStyles = {
|
|
30
32
|
root: Object.assign({}, _defaultOOOHPaneTitleStyles.defaultOOOHPaneTitleStyles, (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : _props$styleProps2.titleStyleProps)
|
|
31
33
|
};
|
|
32
|
-
|
|
34
|
+
const displayText = (0, _utils.replaceURLWithAnchor)(((_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.titleText) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.titleText, ((_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.openLinkInNewTab) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.openLinkInNewTab) ?? "";
|
|
35
|
+
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps4 = props.controlProps) !== null && _props$controlProps4 !== void 0 && _props$controlProps4.hideOOOHPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
33
36
|
id: elementId,
|
|
34
37
|
tabIndex: -1,
|
|
35
38
|
styles: containerStyles,
|
|
36
|
-
role: (_props$
|
|
39
|
+
role: (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.role,
|
|
37
40
|
className: (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cl = _props$styleProps3.classNames) === null || _props$styleProps3$cl === void 0 ? void 0 : _props$styleProps3$cl.containerClassName,
|
|
38
|
-
dir: ((_props$
|
|
39
|
-
}, !((_props$
|
|
41
|
+
dir: ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.dir) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.dir
|
|
42
|
+
}, !((_props$controlProps7 = props.controlProps) !== null && _props$controlProps7 !== void 0 && _props$controlProps7.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Text, {
|
|
40
43
|
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.titleClassName,
|
|
41
44
|
styles: titleStyles,
|
|
42
45
|
tabIndex: -1,
|
|
43
46
|
id: elementId + "-title"
|
|
44
|
-
},
|
|
47
|
+
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
48
|
+
dangerouslySetInnerHTML: {
|
|
49
|
+
__html: displayText
|
|
50
|
+
}
|
|
51
|
+
})))));
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
var _default = OOOHPane;
|
package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js
CHANGED
|
@@ -9,6 +9,7 @@ const defaultOOOHPaneControlProps = {
|
|
|
9
9
|
dir: "auto",
|
|
10
10
|
hideOOOHPane: false,
|
|
11
11
|
hideTitle: false,
|
|
12
|
-
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."
|
|
12
|
+
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.",
|
|
13
|
+
openLinkInNewTab: false
|
|
13
14
|
};
|
|
14
15
|
exports.defaultOOOHPaneControlProps = defaultOOOHPaneControlProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.presetFourOOOHPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _defaultOOOHPaneControlProps = require("../defaultProps/defaultOOOHPaneControlProps");
|
|
9
|
+
|
|
10
|
+
const presetFourOOOHPaneControlProps = { ..._defaultOOOHPaneControlProps.defaultOOOHPaneControlProps,
|
|
11
|
+
id: "oc-lcw-outofofficehourspane-preset1",
|
|
12
|
+
titleText: "We are out of office. Please contact us here https://www.microsoft.com for further assisstance",
|
|
13
|
+
openLinkInNewTab: true
|
|
14
|
+
};
|
|
15
|
+
exports.presetFourOOOHPaneControlProps = presetFourOOOHPaneControlProps;
|
package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.presetFourOOOHPaneProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _defaultOOOHPaneStyles = require("../defaultProps/defaultStyles/defaultOOOHPaneStyles");
|
|
9
|
+
|
|
10
|
+
var _presetFourOOOHPaneControlProps = require("./presetFourOOOHPaneControlProps");
|
|
11
|
+
|
|
12
|
+
const presetFourOOOHPaneProps = {
|
|
13
|
+
controlProps: _presetFourOOOHPaneControlProps.presetFourOOOHPaneControlProps,
|
|
14
|
+
styleProps: _defaultOOOHPaneStyles.defaultOOOHPaneStyles
|
|
15
|
+
};
|
|
16
|
+
exports.presetFourOOOHPaneProps = presetFourOOOHPaneProps;
|
|
@@ -30,7 +30,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
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
32
|
function PreChatSurveyPane(props) {
|
|
33
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps3$cu,
|
|
33
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps3$cu, _props$styleProps4, _props$styleProps4$cu, _props$styleProps5, _props$styleProps5$cu, _props$styleProps6, _props$styleProps6$cu, _props$styleProps7, _props$styleProps7$cu, _props$styleProps8, _props$styleProps8$cu, _props$styleProps9, _props$styleProps9$cu, _defaultPreChatSurvey, _props$styleProps10, _props$styleProps10$c, _props$styleProps11, _props$styleProps11$c, _defaultPreChatSurvey2, _props$styleProps12, _props$styleProps12$c, _props$styleProps13, _props$styleProps13$c, _defaultPreChatSurvey3, _props$styleProps14, _props$styleProps14$c, _defaultPreChatSurvey4, _props$styleProps15, _props$styleProps15$c, _defaultPreChatSurvey5, _props$styleProps16, _props$styleProps16$c, _defaultPreChatSurvey6, _props$styleProps17, _props$styleProps17$c, _defaultPreChatSurvey7, _props$controlProps6, _props$controlProps7, _props$controlProps8;
|
|
34
34
|
|
|
35
35
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? "lcw-components-prechatsurvey-pane";
|
|
36
36
|
let adpativeCardPayload;
|
|
@@ -91,18 +91,30 @@ function PreChatSurveyPane(props) {
|
|
|
91
91
|
const renderedCard = adaptiveCard.render();
|
|
92
92
|
(0, _utils.addNoreferrerNoopenerTag)(renderedCard);
|
|
93
93
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement("style", null, `
|
|
94
|
+
.ac-textBlock {
|
|
95
|
+
font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontSize} !important;
|
|
96
|
+
height: ${(_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customTextStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.height};
|
|
97
|
+
padding-top: ${(_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customTextStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.paddingTop};
|
|
98
|
+
}
|
|
99
|
+
.ac-textRun {
|
|
100
|
+
font-size: ${(_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : (_props$styleProps6$cu = _props$styleProps6.customTextStyleProps) === null || _props$styleProps6$cu === void 0 ? void 0 : _props$styleProps6$cu.fontSize} !important;
|
|
101
|
+
padding-top: ${(_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : (_props$styleProps7$cu = _props$styleProps7.customTextStyleProps) === null || _props$styleProps7$cu === void 0 ? void 0 : _props$styleProps7$cu.paddingTop};
|
|
102
|
+
}
|
|
94
103
|
.ac-input {
|
|
95
104
|
margin-bottom: 6px;
|
|
96
105
|
}
|
|
97
106
|
.ac-input.ac-textInput {
|
|
98
|
-
|
|
107
|
+
font-size: ${(_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cu = _props$styleProps8.customTextInputStyleProps) === null || _props$styleProps8$cu === void 0 ? void 0 : _props$styleProps8$cu.fontSize};
|
|
108
|
+
height: ${((_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : (_props$styleProps9$cu = _props$styleProps9.customTextInputStyleProps) === null || _props$styleProps9$cu === void 0 ? void 0 : _props$styleProps9$cu.height) ?? ((_defaultPreChatSurvey = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.height)};
|
|
99
109
|
padding: 8px;
|
|
100
110
|
}
|
|
101
111
|
.ac-input.ac-textInput.ac-multiline {
|
|
102
|
-
|
|
112
|
+
font-size: ${(_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : (_props$styleProps10$c = _props$styleProps10.customMultilineTextInputStyleProps) === null || _props$styleProps10$c === void 0 ? void 0 : _props$styleProps10$c.fontSize};
|
|
113
|
+
height: ${((_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : (_props$styleProps11$c = _props$styleProps11.customMultilineTextInputStyleProps) === null || _props$styleProps11$c === void 0 ? void 0 : _props$styleProps11$c.height) ?? ((_defaultPreChatSurvey2 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.height)};
|
|
103
114
|
resize: none;
|
|
104
115
|
}
|
|
105
116
|
.ac-input.ac-multichoiceInput {
|
|
117
|
+
font-size: ${(_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : (_props$styleProps12$c = _props$styleProps12.customMultichoiceInputStyleProps) === null || _props$styleProps12$c === void 0 ? void 0 : _props$styleProps12$c.fontSize};
|
|
106
118
|
padding: 3px;
|
|
107
119
|
padding-top: 7px;
|
|
108
120
|
padding-bottom: 7px;
|
|
@@ -110,14 +122,14 @@ function PreChatSurveyPane(props) {
|
|
|
110
122
|
.ac-pushButton {
|
|
111
123
|
border: 1px solid #00000000;
|
|
112
124
|
margin: 2px;
|
|
113
|
-
height:
|
|
125
|
+
height: ${((_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.customButtonStyleProps) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.height) ?? ((_defaultPreChatSurvey3 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey3 === void 0 ? void 0 : _defaultPreChatSurvey3.height)};
|
|
114
126
|
border-radius: 5px;
|
|
115
127
|
cursor: pointer;
|
|
116
128
|
font-weight: bold;
|
|
117
|
-
font-size:
|
|
118
|
-
font-family: ${((_props$
|
|
119
|
-
color: ${((_props$
|
|
120
|
-
background-color: ${((_props$
|
|
129
|
+
font-size: ${((_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.customButtonStyleProps) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.fontSize) ?? ((_defaultPreChatSurvey4 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.fontSize)};
|
|
130
|
+
font-family: ${((_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.customButtonStyleProps) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.fontFamily) ?? ((_defaultPreChatSurvey5 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontFamily)};
|
|
131
|
+
color: ${((_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : (_props$styleProps16$c = _props$styleProps16.customButtonStyleProps) === null || _props$styleProps16$c === void 0 ? void 0 : _props$styleProps16$c.color) ?? ((_defaultPreChatSurvey6 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.color)};
|
|
132
|
+
background-color: ${((_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.customButtonStyleProps) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.backgroundColor) ?? ((_defaultPreChatSurvey7 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.backgroundColor)};
|
|
121
133
|
}`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
122
134
|
id: elementId,
|
|
123
135
|
tabIndex: -1,
|
|
@@ -7,6 +7,8 @@ exports.defaultPreChatSurveyPaneButtonStyles = void 0;
|
|
|
7
7
|
const defaultPreChatSurveyPaneButtonStyles = {
|
|
8
8
|
backgroundColor: "rgb(49, 95, 162)",
|
|
9
9
|
color: "#FFFFFF",
|
|
10
|
-
fontFamily: "Segoe UI, Arial, sans-serif"
|
|
10
|
+
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
11
|
+
fontSize: "15px",
|
|
12
|
+
height: "48px"
|
|
11
13
|
};
|
|
12
14
|
exports.defaultPreChatSurveyPaneButtonStyles = defaultPreChatSurveyPaneButtonStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultPreChatSurveyPaneMultilineTextInputStyles = void 0;
|
|
7
|
+
const defaultPreChatSurveyPaneMultilineTextInputStyles = {
|
|
8
|
+
height: "52px"
|
|
9
|
+
};
|
|
10
|
+
exports.defaultPreChatSurveyPaneMultilineTextInputStyles = defaultPreChatSurveyPaneMultilineTextInputStyles;
|
|
@@ -11,9 +11,15 @@ var _defaultPreChatSurveyPaneButtonStyles = require("./defaultPreChatSurveyPaneB
|
|
|
11
11
|
|
|
12
12
|
var _defaultPreChatSurveyPaneGeneralStyles = require("./defaultPreChatSurveyPaneGeneralStyles");
|
|
13
13
|
|
|
14
|
+
var _defaultPreChatSurveyPaneMultilineTextInputStyles = require("./defaultPreChatSurveyPaneMultilineTextInputStyles");
|
|
15
|
+
|
|
16
|
+
var _defaultPreChatSurveyPaneTextInputStyles = require("./defaultPreChatSurveyPaneTextInputStyles");
|
|
17
|
+
|
|
14
18
|
const defaultPreChatSurveyPaneStyles = {
|
|
15
19
|
generalStyleProps: _defaultPreChatSurveyPaneGeneralStyles.defaultPreChatSurveyPaneGeneralStyles,
|
|
16
20
|
customButtonStyleProps: _defaultPreChatSurveyPaneButtonStyles.defaultPreChatSurveyPaneButtonStyles,
|
|
17
|
-
adaptiveCardContainerStyleProps: _defaultPreChatSurveyPaneACContainerStyles.defaultPreChatSurveyPaneACContainerStyles
|
|
21
|
+
adaptiveCardContainerStyleProps: _defaultPreChatSurveyPaneACContainerStyles.defaultPreChatSurveyPaneACContainerStyles,
|
|
22
|
+
customTextInputStyleProps: _defaultPreChatSurveyPaneTextInputStyles.defaultPreChatSurveyPaneTextInputStyles,
|
|
23
|
+
customMultilineTextInputStyleProps: _defaultPreChatSurveyPaneMultilineTextInputStyles.defaultPreChatSurveyPaneMultilineTextInputStyles
|
|
18
24
|
};
|
|
19
25
|
exports.defaultPreChatSurveyPaneStyles = defaultPreChatSurveyPaneStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultPreChatSurveyPaneTextInputStyles = void 0;
|
|
7
|
+
const defaultPreChatSurveyPaneTextInputStyles = {
|
|
8
|
+
height: "20px"
|
|
9
|
+
};
|
|
10
|
+
exports.defaultPreChatSurveyPaneTextInputStyles = defaultPreChatSurveyPaneTextInputStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/esm/common/utils.js
CHANGED
|
@@ -93,4 +93,20 @@ export const addNoreferrerNoopenerTag = htmlNode => {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
};
|
|
97
|
+
export const replaceURLWithAnchor = (text, openInNewTab) => {
|
|
98
|
+
if (text) {
|
|
99
|
+
const modifiedText = text.replace(Regex.URLRegex, function (url) {
|
|
100
|
+
if (openInNewTab) {
|
|
101
|
+
// eslint-disable-next-line quotes
|
|
102
|
+
return '<a href="' + url + '" rel="noreferrer noopener" target="_blank">' + url + '</a>';
|
|
103
|
+
} // eslint-disable-next-line quotes
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
return '<a href="' + url + '">' + url + '</a>';
|
|
107
|
+
});
|
|
108
|
+
return modifiedText;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return text;
|
|
96
112
|
};
|
|
@@ -114,12 +114,25 @@ function IncomingCall(props) {
|
|
|
114
114
|
window.removeEventListener("keydown", ignoreDefault);
|
|
115
115
|
};
|
|
116
116
|
}, []);
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
// Setting focus to decline call button when incoming call alert appears
|
|
119
|
+
if (declineCallButtonId) {
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
121
|
+
const declineCallButton = document.getElementById(declineCallButtonId);
|
|
122
|
+
|
|
123
|
+
if (declineCallButton) {
|
|
124
|
+
declineCallButton.focus();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, []);
|
|
117
128
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
118
129
|
horizontal: true,
|
|
119
130
|
className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
|
|
120
131
|
horizontalAlign: "space-between",
|
|
121
132
|
styles: stackStyles,
|
|
122
|
-
dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir)
|
|
133
|
+
dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir),
|
|
134
|
+
role: "alert",
|
|
135
|
+
"aria-label": incomingCallTitleProps === null || incomingCallTitleProps === void 0 ? void 0 : incomingCallTitleProps.text
|
|
123
136
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
124
137
|
horizontal: true,
|
|
125
138
|
id: "incomingCallLeftGroup",
|
|
@@ -90,7 +90,7 @@ function ChatButton(props) {
|
|
|
90
90
|
var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
|
|
91
91
|
|
|
92
92
|
const elementId = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.id) ?? "lcw-components-chat-button";
|
|
93
|
-
const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ??
|
|
93
|
+
const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? defaultChatButtonControlProps.ariaLabel;
|
|
94
94
|
const defaultRole = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.role) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.role);
|
|
95
95
|
const containersDir = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
|
|
96
96
|
const hideChatButton = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideChatButton) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatButton);
|
|
@@ -2,7 +2,7 @@ export const defaultChatButtonControlProps = {
|
|
|
2
2
|
id: "lcw-components-chat-button",
|
|
3
3
|
dir: "ltr",
|
|
4
4
|
role: "button",
|
|
5
|
-
ariaLabel: "
|
|
5
|
+
ariaLabel: "Let's chat We are online",
|
|
6
6
|
unreadMessageCount: "0",
|
|
7
7
|
titleText: "Let's Chat!",
|
|
8
8
|
subtitleText: "We're online.",
|
|
@@ -2,7 +2,7 @@ import { DefaultButton, PrimaryButton } from "@fluentui/react/lib/Button";
|
|
|
2
2
|
import { Label, Stack } from "@fluentui/react";
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
5
|
-
import { ElementType } from "../../common/Constants";
|
|
5
|
+
import { ElementType, KeyCodes } from "../../common/Constants";
|
|
6
6
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
7
7
|
import { defaultConfirmationPaneButtonGroupStyles } from "./common/defaultStyles/defaultConfirmationPaneButtonGroupStyles";
|
|
8
8
|
import { defaultConfirmationPaneCancelButtonHoveredStyles } from "./common/defaultStyles/defaultConfirmationPaneCancelButtonHoveredStyles";
|
|
@@ -49,6 +49,12 @@ function ConfirmationPane(props) {
|
|
|
49
49
|
BroadcastService.postMessage(customEvent);
|
|
50
50
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onCancel();
|
|
51
51
|
}
|
|
52
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
|
|
54
|
+
const handleEscKeyDown = useCallback(e => {
|
|
55
|
+
if (e.code === KeyCodes.ESCAPE) {
|
|
56
|
+
handleCancelClick();
|
|
57
|
+
}
|
|
52
58
|
}, []);
|
|
53
59
|
const containerStyles = {
|
|
54
60
|
root: Object.assign({}, defaultConfirmationPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
|
|
@@ -76,6 +82,7 @@ function ConfirmationPane(props) {
|
|
|
76
82
|
};
|
|
77
83
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
78
84
|
id: elementId,
|
|
85
|
+
onKeyDown: handleEscKeyDown,
|
|
79
86
|
tabIndex: -1,
|
|
80
87
|
dir: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.dir) || defaultConfirmationPaneControlProps.dir,
|
|
81
88
|
styles: containerStyles,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export const defaultConfirmationPaneButtonGroupStyles = {
|
|
2
2
|
display: "flex",
|
|
3
|
+
width: "auto",
|
|
4
|
+
height: "auto",
|
|
5
|
+
boxSizing: "border-box",
|
|
3
6
|
flexFlow: "row",
|
|
4
7
|
justifyContent: "center",
|
|
5
8
|
alignItems: "center",
|
|
6
|
-
gap: "10px"
|
|
9
|
+
gap: "10px",
|
|
10
|
+
marginBottom: "10px"
|
|
7
11
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
export const defaultConfirmationPaneGeneralStyles = {
|
|
2
|
+
display: "flex",
|
|
3
|
+
minHeight: "160px",
|
|
4
|
+
maxHeight: "300px",
|
|
5
|
+
boxSizing: "border-box",
|
|
2
6
|
backgroundColor: "white",
|
|
3
7
|
borderRadius: "2px",
|
|
4
8
|
color: "black",
|
|
5
9
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
6
10
|
fontSize: "14px",
|
|
7
|
-
height: "160px",
|
|
8
11
|
padding: "10px 20px",
|
|
9
|
-
width: "262px",
|
|
10
12
|
position: "absolute",
|
|
11
13
|
justifyContent: "center",
|
|
12
14
|
alignItems: "center",
|
|
13
|
-
display: "flex",
|
|
14
15
|
flexFlow: "column",
|
|
15
|
-
zIndex: "9999"
|
|
16
|
+
zIndex: "9999",
|
|
17
|
+
left: "26px",
|
|
18
|
+
right: "26px"
|
|
16
19
|
};
|
|
@@ -72,7 +72,6 @@ function AudioNotificationButton(props) {
|
|
|
72
72
|
disabled: disabled,
|
|
73
73
|
styles: iconButtonStyles,
|
|
74
74
|
className: props.className,
|
|
75
|
-
"aria-label": muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off",
|
|
76
75
|
title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
|
|
77
76
|
});
|
|
78
77
|
}
|
|
@@ -126,7 +126,8 @@ function InputValidationPane(props) {
|
|
|
126
126
|
const redBorderStyles = {
|
|
127
127
|
borderColor: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.inputWithErrorMessageBorderColor) ?? defaultInputValidationPaneControlProps.inputWithErrorMessageBorderColor,
|
|
128
128
|
borderRadius: "1px",
|
|
129
|
-
borderStyle: "solid"
|
|
129
|
+
borderStyle: "solid",
|
|
130
|
+
borderWidth: "1px"
|
|
130
131
|
};
|
|
131
132
|
const inputStyles = {
|
|
132
133
|
root: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Stack, Text } from "@fluentui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
4
4
|
import { defaultOOOHPaneControlProps } from "./common/defaultProps/defaultOOOHPaneControlProps";
|
|
5
5
|
import { defaultOOOHPaneGeneralStyles } from "./common/defaultProps/defaultStyles/defaultOOOHPaneGeneralStyles";
|
|
6
6
|
import { defaultOOOHPaneTitleStyles } from "./common/defaultProps/defaultStyles/defaultOOOHPaneTitleStyles";
|
|
7
|
+
import { replaceURLWithAnchor } from "../../common/utils";
|
|
7
8
|
|
|
8
9
|
function OOOHPane(props) {
|
|
9
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$controlProps2, _props$controlProps3, _props$styleProps3, _props$styleProps3$cl, _props$
|
|
10
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$styleProps3, _props$styleProps3$cl, _props$controlProps6, _props$controlProps7, _props$componentOverr, _props$styleProps4, _props$styleProps4$cl;
|
|
10
11
|
|
|
11
12
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultOOOHPaneControlProps.id;
|
|
12
13
|
const containerStyles = {
|
|
@@ -15,19 +16,24 @@ function OOOHPane(props) {
|
|
|
15
16
|
const titleStyles = {
|
|
16
17
|
root: Object.assign({}, defaultOOOHPaneTitleStyles, (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : _props$styleProps2.titleStyleProps)
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
const displayText = replaceURLWithAnchor(((_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.titleText) ?? defaultOOOHPaneControlProps.titleText, ((_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.openLinkInNewTab) ?? defaultOOOHPaneControlProps.openLinkInNewTab) ?? "";
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps4 = props.controlProps) !== null && _props$controlProps4 !== void 0 && _props$controlProps4.hideOOOHPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
19
21
|
id: elementId,
|
|
20
22
|
tabIndex: -1,
|
|
21
23
|
styles: containerStyles,
|
|
22
|
-
role: (_props$
|
|
24
|
+
role: (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.role,
|
|
23
25
|
className: (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cl = _props$styleProps3.classNames) === null || _props$styleProps3$cl === void 0 ? void 0 : _props$styleProps3$cl.containerClassName,
|
|
24
|
-
dir: ((_props$
|
|
25
|
-
}, !((_props$
|
|
26
|
+
dir: ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.dir) ?? defaultOOOHPaneControlProps.dir
|
|
27
|
+
}, !((_props$controlProps7 = props.controlProps) !== null && _props$controlProps7 !== void 0 && _props$controlProps7.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Text, {
|
|
26
28
|
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.titleClassName,
|
|
27
29
|
styles: titleStyles,
|
|
28
30
|
tabIndex: -1,
|
|
29
31
|
id: elementId + "-title"
|
|
30
|
-
}, (
|
|
32
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
dangerouslySetInnerHTML: {
|
|
34
|
+
__html: displayText
|
|
35
|
+
}
|
|
36
|
+
})))));
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
export default OOOHPane;
|
package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js
CHANGED
|
@@ -3,5 +3,6 @@ export const defaultOOOHPaneControlProps = {
|
|
|
3
3
|
dir: "auto",
|
|
4
4
|
hideOOOHPane: false,
|
|
5
5
|
hideTitle: false,
|
|
6
|
-
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."
|
|
6
|
+
titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.",
|
|
7
|
+
openLinkInNewTab: false
|
|
7
8
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { defaultOOOHPaneControlProps } from "../defaultProps/defaultOOOHPaneControlProps";
|
|
2
|
+
export const presetFourOOOHPaneControlProps = { ...defaultOOOHPaneControlProps,
|
|
3
|
+
id: "oc-lcw-outofofficehourspane-preset1",
|
|
4
|
+
titleText: "We are out of office. Please contact us here https://www.microsoft.com for further assisstance",
|
|
5
|
+
openLinkInNewTab: true
|
|
6
|
+
};
|
package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { defaultOOOHPaneStyles } from "../defaultProps/defaultStyles/defaultOOOHPaneStyles";
|
|
2
|
+
import { presetFourOOOHPaneControlProps } from "./presetFourOOOHPaneControlProps";
|
|
3
|
+
export const presetFourOOOHPaneProps = {
|
|
4
|
+
controlProps: presetFourOOOHPaneControlProps,
|
|
5
|
+
styleProps: defaultOOOHPaneStyles
|
|
6
|
+
};
|
|
@@ -10,7 +10,7 @@ import { defaultPreChatSurveyPaneGeneralStyles } from "./common/defaultProps/def
|
|
|
10
10
|
import { defaultPreChatSurveyPaneStyles } from "./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles";
|
|
11
11
|
|
|
12
12
|
function PreChatSurveyPane(props) {
|
|
13
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps3$cu,
|
|
13
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps3$cu, _props$styleProps4, _props$styleProps4$cu, _props$styleProps5, _props$styleProps5$cu, _props$styleProps6, _props$styleProps6$cu, _props$styleProps7, _props$styleProps7$cu, _props$styleProps8, _props$styleProps8$cu, _props$styleProps9, _props$styleProps9$cu, _defaultPreChatSurvey, _props$styleProps10, _props$styleProps10$c, _props$styleProps11, _props$styleProps11$c, _defaultPreChatSurvey2, _props$styleProps12, _props$styleProps12$c, _props$styleProps13, _props$styleProps13$c, _defaultPreChatSurvey3, _props$styleProps14, _props$styleProps14$c, _defaultPreChatSurvey4, _props$styleProps15, _props$styleProps15$c, _defaultPreChatSurvey5, _props$styleProps16, _props$styleProps16$c, _defaultPreChatSurvey6, _props$styleProps17, _props$styleProps17$c, _defaultPreChatSurvey7, _props$controlProps6, _props$controlProps7, _props$controlProps8;
|
|
14
14
|
|
|
15
15
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? "lcw-components-prechatsurvey-pane";
|
|
16
16
|
let adpativeCardPayload;
|
|
@@ -69,18 +69,30 @@ function PreChatSurveyPane(props) {
|
|
|
69
69
|
const renderedCard = adaptiveCard.render();
|
|
70
70
|
addNoreferrerNoopenerTag(renderedCard);
|
|
71
71
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, `
|
|
72
|
+
.ac-textBlock {
|
|
73
|
+
font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontSize} !important;
|
|
74
|
+
height: ${(_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customTextStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.height};
|
|
75
|
+
padding-top: ${(_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customTextStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.paddingTop};
|
|
76
|
+
}
|
|
77
|
+
.ac-textRun {
|
|
78
|
+
font-size: ${(_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : (_props$styleProps6$cu = _props$styleProps6.customTextStyleProps) === null || _props$styleProps6$cu === void 0 ? void 0 : _props$styleProps6$cu.fontSize} !important;
|
|
79
|
+
padding-top: ${(_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : (_props$styleProps7$cu = _props$styleProps7.customTextStyleProps) === null || _props$styleProps7$cu === void 0 ? void 0 : _props$styleProps7$cu.paddingTop};
|
|
80
|
+
}
|
|
72
81
|
.ac-input {
|
|
73
82
|
margin-bottom: 6px;
|
|
74
83
|
}
|
|
75
84
|
.ac-input.ac-textInput {
|
|
76
|
-
|
|
85
|
+
font-size: ${(_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cu = _props$styleProps8.customTextInputStyleProps) === null || _props$styleProps8$cu === void 0 ? void 0 : _props$styleProps8$cu.fontSize};
|
|
86
|
+
height: ${((_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : (_props$styleProps9$cu = _props$styleProps9.customTextInputStyleProps) === null || _props$styleProps9$cu === void 0 ? void 0 : _props$styleProps9$cu.height) ?? ((_defaultPreChatSurvey = defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.height)};
|
|
77
87
|
padding: 8px;
|
|
78
88
|
}
|
|
79
89
|
.ac-input.ac-textInput.ac-multiline {
|
|
80
|
-
|
|
90
|
+
font-size: ${(_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : (_props$styleProps10$c = _props$styleProps10.customMultilineTextInputStyleProps) === null || _props$styleProps10$c === void 0 ? void 0 : _props$styleProps10$c.fontSize};
|
|
91
|
+
height: ${((_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : (_props$styleProps11$c = _props$styleProps11.customMultilineTextInputStyleProps) === null || _props$styleProps11$c === void 0 ? void 0 : _props$styleProps11$c.height) ?? ((_defaultPreChatSurvey2 = defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.height)};
|
|
81
92
|
resize: none;
|
|
82
93
|
}
|
|
83
94
|
.ac-input.ac-multichoiceInput {
|
|
95
|
+
font-size: ${(_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : (_props$styleProps12$c = _props$styleProps12.customMultichoiceInputStyleProps) === null || _props$styleProps12$c === void 0 ? void 0 : _props$styleProps12$c.fontSize};
|
|
84
96
|
padding: 3px;
|
|
85
97
|
padding-top: 7px;
|
|
86
98
|
padding-bottom: 7px;
|
|
@@ -88,14 +100,14 @@ function PreChatSurveyPane(props) {
|
|
|
88
100
|
.ac-pushButton {
|
|
89
101
|
border: 1px solid #00000000;
|
|
90
102
|
margin: 2px;
|
|
91
|
-
height:
|
|
103
|
+
height: ${((_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.customButtonStyleProps) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.height) ?? ((_defaultPreChatSurvey3 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey3 === void 0 ? void 0 : _defaultPreChatSurvey3.height)};
|
|
92
104
|
border-radius: 5px;
|
|
93
105
|
cursor: pointer;
|
|
94
106
|
font-weight: bold;
|
|
95
|
-
font-size:
|
|
96
|
-
font-family: ${((_props$
|
|
97
|
-
color: ${((_props$
|
|
98
|
-
background-color: ${((_props$
|
|
107
|
+
font-size: ${((_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.customButtonStyleProps) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.fontSize) ?? ((_defaultPreChatSurvey4 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.fontSize)};
|
|
108
|
+
font-family: ${((_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.customButtonStyleProps) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.fontFamily) ?? ((_defaultPreChatSurvey5 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontFamily)};
|
|
109
|
+
color: ${((_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : (_props$styleProps16$c = _props$styleProps16.customButtonStyleProps) === null || _props$styleProps16$c === void 0 ? void 0 : _props$styleProps16$c.color) ?? ((_defaultPreChatSurvey6 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.color)};
|
|
110
|
+
background-color: ${((_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.customButtonStyleProps) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.backgroundColor) ?? ((_defaultPreChatSurvey7 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.backgroundColor)};
|
|
99
111
|
}`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
100
112
|
id: elementId,
|
|
101
113
|
tabIndex: -1,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { defaultPreChatSurveyPaneACContainerStyles } from "./defaultPreChatSurveyPaneACContainerStyles";
|
|
2
2
|
import { defaultPreChatSurveyPaneButtonStyles } from "./defaultPreChatSurveyPaneButtonStyles";
|
|
3
3
|
import { defaultPreChatSurveyPaneGeneralStyles } from "./defaultPreChatSurveyPaneGeneralStyles";
|
|
4
|
+
import { defaultPreChatSurveyPaneMultilineTextInputStyles } from "./defaultPreChatSurveyPaneMultilineTextInputStyles";
|
|
5
|
+
import { defaultPreChatSurveyPaneTextInputStyles } from "./defaultPreChatSurveyPaneTextInputStyles";
|
|
4
6
|
export const defaultPreChatSurveyPaneStyles = {
|
|
5
7
|
generalStyleProps: defaultPreChatSurveyPaneGeneralStyles,
|
|
6
8
|
customButtonStyleProps: defaultPreChatSurveyPaneButtonStyles,
|
|
7
|
-
adaptiveCardContainerStyleProps: defaultPreChatSurveyPaneACContainerStyles
|
|
9
|
+
adaptiveCardContainerStyleProps: defaultPreChatSurveyPaneACContainerStyles,
|
|
10
|
+
customTextInputStyleProps: defaultPreChatSurveyPaneTextInputStyles,
|
|
11
|
+
customMultilineTextInputStyleProps: defaultPreChatSurveyPaneMultilineTextInputStyles
|
|
8
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,3 +16,4 @@ export declare const getHours: (time: number) => string;
|
|
|
16
16
|
export declare const getMinutes: (time: number) => string;
|
|
17
17
|
export declare const getSeconds: (time: number) => string;
|
|
18
18
|
export declare const addNoreferrerNoopenerTag: (htmlNode: any) => void;
|
|
19
|
+
export declare const replaceURLWithAnchor: (text: string | undefined, openInNewTab: boolean | undefined) => string | undefined;
|
package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export interface IInputValidationPaneControlProps {
|
|
|
22
22
|
cancelButtonText?: string;
|
|
23
23
|
cancelButtonAriaLabel?: string;
|
|
24
24
|
brightnessValueOnDim?: string;
|
|
25
|
-
disableDimLayer?: boolean;
|
|
26
25
|
onSend?: (input: string) => void;
|
|
27
26
|
onCancel?: () => void;
|
|
28
27
|
checkInput?: (input: string) => boolean;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { IPreChatSurveyPaneButtonStyles } from "./IPreChatSurveyPaneButtonStyles";
|
|
2
2
|
import { IStyle } from "@fluentui/react";
|
|
3
|
+
import { IPreChatSurveyPaneElementStyles } from "./IPreChatSurveyPaneElementStyles";
|
|
3
4
|
export interface IPreChatSurveyPaneStyleProps {
|
|
4
5
|
generalStyleProps?: IStyle;
|
|
5
6
|
adaptiveCardContainerStyleProps?: IStyle;
|
|
6
7
|
customButtonStyleProps?: IPreChatSurveyPaneButtonStyles;
|
|
8
|
+
customTextStyleProps?: IPreChatSurveyPaneElementStyles;
|
|
9
|
+
customTextInputStyleProps?: IPreChatSurveyPaneElementStyles;
|
|
10
|
+
customMultilineTextInputStyleProps?: IPreChatSurveyPaneElementStyles;
|
|
11
|
+
customMultichoiceInputStyleProps?: IPreChatSurveyPaneElementStyles;
|
|
7
12
|
}
|
package/package.json
CHANGED