@microsoft/omnichannel-chat-components 1.1.1-main.65b7e84 → 1.1.2
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/components/inputvalidationpane/InputValidationPane.js +3 -5
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +19 -13
- package/lib/cjs/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneContinueChatButtonFocusedStyles.js +15 -0
- package/lib/cjs/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneGeneralStyles.js +3 -2
- package/lib/cjs/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneStartChatButtonFocusedStyles.js +15 -0
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +3 -5
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +17 -13
- package/lib/esm/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneContinueChatButtonFocusedStyles.js +8 -0
- package/lib/esm/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneGeneralStyles.js +3 -2
- package/lib/esm/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneStartChatButtonFocusedStyles.js +8 -0
- package/lib/types/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneContinueChatButtonFocusedStyles.d.ts +2 -0
- package/lib/types/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneStartChatButtonFocusedStyles.d.ts +2 -0
- package/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneStyleProps.d.ts +2 -0
- package/package.json +2 -2
|
@@ -150,9 +150,7 @@ function InputValidationPane(props) {
|
|
|
150
150
|
const headerGroupStyles = {
|
|
151
151
|
root: Object.assign({}, _defaultInputValidationPaneHeaderGroupStyles.defaultInputValidationPaneHeaderGroupStyles, (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : _props$styleProps2.headerGroupStyleProps)
|
|
152
152
|
};
|
|
153
|
-
const titleStyles = {
|
|
154
|
-
root: Object.assign({}, _defaultInputValidationPaneTitleStyles.defaultInputValidationPaneTitleStyles, (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : _props$styleProps3.titleStyleProps)
|
|
155
|
-
};
|
|
153
|
+
const titleStyles = Object.assign({}, _defaultInputValidationPaneTitleStyles.defaultInputValidationPaneTitleStyles, (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : _props$styleProps3.titleStyleProps);
|
|
156
154
|
const subtitleStyles = {
|
|
157
155
|
root: Object.assign({}, _defaultInputValidationPaneSubtitleStyles.defaultInputValidationPaneSubtitleStyles, (_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : _props$styleProps4.subtitleStyleProps)
|
|
158
156
|
};
|
|
@@ -225,9 +223,9 @@ function InputValidationPane(props) {
|
|
|
225
223
|
styles: headerGroupStyles,
|
|
226
224
|
tabIndex: -1,
|
|
227
225
|
id: elementId + "-headergroup"
|
|
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(
|
|
226
|
+
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement("h1", {
|
|
229
227
|
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,
|
|
230
|
-
|
|
228
|
+
style: titleStyles,
|
|
231
229
|
tabIndex: -1,
|
|
232
230
|
id: elementId + "-title"
|
|
233
231
|
}, ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.titleText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.titleText)), !((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.hideSubtitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
@@ -37,12 +37,16 @@ var _defaultReconnectChatPaneTitleStyles = require("./common/default/defaultStyl
|
|
|
37
37
|
|
|
38
38
|
var _defaultReconnectChatPaneWrapperStyles = require("./common/default/defaultStyles/defaultReconnectChatPaneWrapperStyles");
|
|
39
39
|
|
|
40
|
+
var _defaultReconnectChatPaneContinueChatButtonFocusedStyles = require("./common/default/defaultStyles/defaultReconnectChatPaneContinueChatButtonFocusedStyles");
|
|
41
|
+
|
|
42
|
+
var _defaultReconnectChatPaneStartChatButtonFocusedStyles = require("./common/default/defaultStyles/defaultReconnectChatPaneStartChatButtonFocusedStyles");
|
|
43
|
+
|
|
40
44
|
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); }
|
|
41
45
|
|
|
42
46
|
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; }
|
|
43
47
|
|
|
44
48
|
function ReconnectChatPane(props) {
|
|
45
|
-
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$controlProps8, _props$
|
|
49
|
+
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$styleProps13, _props$styleProps14, _props$controlProps8, _props$styleProps15, _props$styleProps15$c, _props$controlProps9, _props$controlProps10, _props$styleProps16, _props$styleProps16$c, _props$controlProps11, _props$componentOverr, _props$styleProps17, _props$styleProps17$c, _props$controlProps12, _props$controlProps13, _props$componentOverr2, _props$styleProps18, _props$styleProps18$c, _props$controlProps14, _props$controlProps15, _props$componentOverr3, _props$styleProps19, _props$styleProps19$c, _props$controlProps16, _props$controlProps17, _props$styleProps20, _props$styleProps20$c, _props$controlProps18, _props$componentOverr4, _props$styleProps21, _props$styleProps21$c, _props$controlProps19, _props$controlProps20, _props$controlProps21, _props$componentOverr5, _props$styleProps22, _props$styleProps22$c, _props$controlProps22, _props$controlProps23;
|
|
46
50
|
|
|
47
51
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.id;
|
|
48
52
|
const handleContinueChatClick = (0, _react2.useCallback)(() => {
|
|
@@ -118,15 +122,17 @@ function ReconnectChatPane(props) {
|
|
|
118
122
|
const continueChatButtonStyles = {
|
|
119
123
|
root: Object.assign({}, _defaultReconnectChatPaneContinueChatButtonStyles.defaultReconnectChatPaneContinueChatButtonStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.continueChatButtonStyleProps),
|
|
120
124
|
rootHovered: Object.assign({}, _defaultReconnectChatPaneContinueChatButtonHoveredStyles.defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.continueChatButtonHoveredStyleProps),
|
|
121
|
-
rootPressed: Object.assign({}, _defaultReconnectChatPaneContinueChatButtonHoveredStyles.defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.continueChatButtonHoveredStyleProps)
|
|
125
|
+
rootPressed: Object.assign({}, _defaultReconnectChatPaneContinueChatButtonHoveredStyles.defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.continueChatButtonHoveredStyleProps),
|
|
126
|
+
rootFocused: Object.assign({}, _defaultReconnectChatPaneContinueChatButtonFocusedStyles.defaultReconnectChatPaneContinueChatFocusedStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.continueChatButtonFocusedStyleProps)
|
|
122
127
|
};
|
|
123
128
|
const startNewChatButtonStyles = {
|
|
124
|
-
root: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonStyles.defaultReconnectChatPaneStartNewChatButtonStyles, (_props$
|
|
125
|
-
rootHovered: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonHoveredStyles.defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$
|
|
126
|
-
rootPressed: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonHoveredStyles.defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$
|
|
129
|
+
root: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonStyles.defaultReconnectChatPaneStartNewChatButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.startNewChatButtonStyleProps),
|
|
130
|
+
rootHovered: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonHoveredStyles.defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.startNewChatButtonHoveredStyleProps),
|
|
131
|
+
rootPressed: Object.assign({}, _defaultReconnectChatPaneStartNewChatButtonHoveredStyles.defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.startNewChatButtonHoveredStyleProps),
|
|
132
|
+
rootFocused: Object.assign({}, _defaultReconnectChatPaneStartChatButtonFocusedStyles.defaultReconnectChatPaneStartChatFocusedStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.startNewChatButtonFocusedStyleProps)
|
|
127
133
|
};
|
|
128
134
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideReconnectChatPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
129
|
-
className: (_props$
|
|
135
|
+
className: (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.classNames) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.containerClassName,
|
|
130
136
|
id: elementId,
|
|
131
137
|
tabIndex: -1,
|
|
132
138
|
onKeyDown: handleEscKeyDown,
|
|
@@ -134,22 +140,22 @@ function ReconnectChatPane(props) {
|
|
|
134
140
|
"aria-label": ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.reconnectChatPaneAriaLabel) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.reconnectChatPaneAriaLabel,
|
|
135
141
|
styles: containerStyles
|
|
136
142
|
}, /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
137
|
-
className: (_props$
|
|
143
|
+
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.wrapperClassName,
|
|
138
144
|
styles: wrapperStyles,
|
|
139
145
|
tabIndex: -1,
|
|
140
146
|
id: elementId + "-wrapper"
|
|
141
147
|
}, !((_props$controlProps11 = props.controlProps) !== null && _props$controlProps11 !== void 0 && _props$controlProps11.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
142
|
-
className: (_props$
|
|
148
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.titleClassName,
|
|
143
149
|
styles: titleStyles,
|
|
144
150
|
tabIndex: -1,
|
|
145
151
|
id: elementId + "-title"
|
|
146
152
|
}, ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.titleText) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.titleText)), !((_props$controlProps13 = props.controlProps) !== null && _props$controlProps13 !== void 0 && _props$controlProps13.hideSubtitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
|
|
147
|
-
className: (_props$
|
|
153
|
+
className: (_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.classNames) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.subtitleClassName,
|
|
148
154
|
styles: subtitleStyles,
|
|
149
155
|
tabIndex: -1,
|
|
150
156
|
id: elementId + "-subtitle"
|
|
151
157
|
}, ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.subtitleText) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.subtitleText)), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideIcon) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.icon) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
152
|
-
className: (_props$
|
|
158
|
+
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.iconClassName,
|
|
153
159
|
styles: iconStyles,
|
|
154
160
|
tabIndex: -1,
|
|
155
161
|
role: "img",
|
|
@@ -157,12 +163,12 @@ function ReconnectChatPane(props) {
|
|
|
157
163
|
"aria-label": ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.iconAriaLabel) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.iconAriaLabel
|
|
158
164
|
})), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
159
165
|
horizontal: ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.isButtonGroupHorizontal) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.isButtonGroupHorizontal,
|
|
160
|
-
className: (_props$
|
|
166
|
+
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.buttonGroupClassName,
|
|
161
167
|
styles: buttonGroupStyles,
|
|
162
168
|
tabIndex: -1,
|
|
163
169
|
id: elementId + "-buttongroup"
|
|
164
170
|
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideContinueChatButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.continueChatButton) || /*#__PURE__*/_react2.default.createElement(_react.DefaultButton, {
|
|
165
|
-
className: (_props$
|
|
171
|
+
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.continueChatButtonClassName,
|
|
166
172
|
styles: continueChatButtonStyles,
|
|
167
173
|
tabIndex: 0,
|
|
168
174
|
text: ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.continueChatButtonText) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.continueChatButtonText,
|
|
@@ -170,7 +176,7 @@ function ReconnectChatPane(props) {
|
|
|
170
176
|
id: elementId + "-continueconversationbutton",
|
|
171
177
|
"aria-label": ((_props$controlProps20 = props.controlProps) === null || _props$controlProps20 === void 0 ? void 0 : _props$controlProps20.continueChatButtonAriaLabel) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.continueChatButtonAriaLabel
|
|
172
178
|
})), !((_props$controlProps21 = props.controlProps) !== null && _props$controlProps21 !== void 0 && _props$controlProps21.hideStartNewChatButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.startNewChatButton) || /*#__PURE__*/_react2.default.createElement(_react.DefaultButton, {
|
|
173
|
-
className: (_props$
|
|
179
|
+
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.startNewChatButtonClassName,
|
|
174
180
|
styles: startNewChatButtonStyles,
|
|
175
181
|
tabIndex: 0,
|
|
176
182
|
text: ((_props$controlProps22 = props.controlProps) === null || _props$controlProps22 === void 0 ? void 0 : _props$controlProps22.startNewChatButtonText) || _defaultReconnectChatPaneControlProps.defaultReconnectChatPaneControlProps.startNewChatButtonText,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultReconnectChatPaneContinueChatFocusedStyles = void 0;
|
|
7
|
+
const defaultReconnectChatPaneContinueChatFocusedStyles = {
|
|
8
|
+
content: "",
|
|
9
|
+
inset: "0px",
|
|
10
|
+
border: "1px solid transparent",
|
|
11
|
+
outline: "rgb(96,94,92) solid 1px",
|
|
12
|
+
zIndex: 1,
|
|
13
|
+
boxShadow: "inset 0px 0px 0px 2px #fff"
|
|
14
|
+
};
|
|
15
|
+
exports.defaultReconnectChatPaneContinueChatFocusedStyles = defaultReconnectChatPaneContinueChatFocusedStyles;
|
|
@@ -11,7 +11,8 @@ const defaultReconnectChatPaneGeneralStyles = {
|
|
|
11
11
|
borderStyle: "solid",
|
|
12
12
|
borderWidth: "3px",
|
|
13
13
|
padding: "15px",
|
|
14
|
-
height: "
|
|
15
|
-
width: "
|
|
14
|
+
height: "inherit",
|
|
15
|
+
width: "inherit",
|
|
16
|
+
overflowY: "auto"
|
|
16
17
|
};
|
|
17
18
|
exports.defaultReconnectChatPaneGeneralStyles = defaultReconnectChatPaneGeneralStyles;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultReconnectChatPaneStartChatFocusedStyles = void 0;
|
|
7
|
+
const defaultReconnectChatPaneStartChatFocusedStyles = {
|
|
8
|
+
content: "",
|
|
9
|
+
inset: "0px",
|
|
10
|
+
border: "1px solid transparent",
|
|
11
|
+
outline: "rgb(96,94,92) solid 1px",
|
|
12
|
+
zIndex: 1,
|
|
13
|
+
boxShadow: "inset 0px 0px 0px 2px #fff"
|
|
14
|
+
};
|
|
15
|
+
exports.defaultReconnectChatPaneStartChatFocusedStyles = defaultReconnectChatPaneStartChatFocusedStyles;
|
|
@@ -117,9 +117,7 @@ function InputValidationPane(props) {
|
|
|
117
117
|
const headerGroupStyles = {
|
|
118
118
|
root: Object.assign({}, defaultInputValidationPaneHeaderGroupStyles, (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : _props$styleProps2.headerGroupStyleProps)
|
|
119
119
|
};
|
|
120
|
-
const titleStyles = {
|
|
121
|
-
root: Object.assign({}, defaultInputValidationPaneTitleStyles, (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : _props$styleProps3.titleStyleProps)
|
|
122
|
-
};
|
|
120
|
+
const titleStyles = Object.assign({}, defaultInputValidationPaneTitleStyles, (_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : _props$styleProps3.titleStyleProps);
|
|
123
121
|
const subtitleStyles = {
|
|
124
122
|
root: Object.assign({}, defaultInputValidationPaneSubtitleStyles, (_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : _props$styleProps4.subtitleStyleProps)
|
|
125
123
|
};
|
|
@@ -192,9 +190,9 @@ function InputValidationPane(props) {
|
|
|
192
190
|
styles: headerGroupStyles,
|
|
193
191
|
tabIndex: -1,
|
|
194
192
|
id: elementId + "-headergroup"
|
|
195
|
-
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(
|
|
193
|
+
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement("h1", {
|
|
196
194
|
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,
|
|
197
|
-
|
|
195
|
+
style: titleStyles,
|
|
198
196
|
tabIndex: -1,
|
|
199
197
|
id: elementId + "-title"
|
|
200
198
|
}, ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.titleText) || defaultInputValidationPaneControlProps.titleText)), !((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
@@ -15,9 +15,11 @@ import { defaultReconnectChatPaneStartNewChatButtonStyles } from "./common/defau
|
|
|
15
15
|
import { defaultReconnectChatPaneSubtitleStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneSubtitleStyles";
|
|
16
16
|
import { defaultReconnectChatPaneTitleStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneTitleStyles";
|
|
17
17
|
import { defaultReconnectChatPaneWrapperStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneWrapperStyles";
|
|
18
|
+
import { defaultReconnectChatPaneContinueChatFocusedStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneContinueChatButtonFocusedStyles";
|
|
19
|
+
import { defaultReconnectChatPaneStartChatFocusedStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneStartChatButtonFocusedStyles";
|
|
18
20
|
|
|
19
21
|
function ReconnectChatPane(props) {
|
|
20
|
-
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$controlProps8, _props$
|
|
22
|
+
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$styleProps13, _props$styleProps14, _props$controlProps8, _props$styleProps15, _props$styleProps15$c, _props$controlProps9, _props$controlProps10, _props$styleProps16, _props$styleProps16$c, _props$controlProps11, _props$componentOverr, _props$styleProps17, _props$styleProps17$c, _props$controlProps12, _props$controlProps13, _props$componentOverr2, _props$styleProps18, _props$styleProps18$c, _props$controlProps14, _props$controlProps15, _props$componentOverr3, _props$styleProps19, _props$styleProps19$c, _props$controlProps16, _props$controlProps17, _props$styleProps20, _props$styleProps20$c, _props$controlProps18, _props$componentOverr4, _props$styleProps21, _props$styleProps21$c, _props$controlProps19, _props$controlProps20, _props$controlProps21, _props$componentOverr5, _props$styleProps22, _props$styleProps22$c, _props$controlProps22, _props$controlProps23;
|
|
21
23
|
|
|
22
24
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultReconnectChatPaneControlProps.id;
|
|
23
25
|
const handleContinueChatClick = useCallback(() => {
|
|
@@ -87,15 +89,17 @@ function ReconnectChatPane(props) {
|
|
|
87
89
|
const continueChatButtonStyles = {
|
|
88
90
|
root: Object.assign({}, defaultReconnectChatPaneContinueChatButtonStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.continueChatButtonStyleProps),
|
|
89
91
|
rootHovered: Object.assign({}, defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.continueChatButtonHoveredStyleProps),
|
|
90
|
-
rootPressed: Object.assign({}, defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.continueChatButtonHoveredStyleProps)
|
|
92
|
+
rootPressed: Object.assign({}, defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.continueChatButtonHoveredStyleProps),
|
|
93
|
+
rootFocused: Object.assign({}, defaultReconnectChatPaneContinueChatFocusedStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.continueChatButtonFocusedStyleProps)
|
|
91
94
|
};
|
|
92
95
|
const startNewChatButtonStyles = {
|
|
93
|
-
root: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonStyles, (_props$
|
|
94
|
-
rootHovered: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$
|
|
95
|
-
rootPressed: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$
|
|
96
|
+
root: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.startNewChatButtonStyleProps),
|
|
97
|
+
rootHovered: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.startNewChatButtonHoveredStyleProps),
|
|
98
|
+
rootPressed: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.startNewChatButtonHoveredStyleProps),
|
|
99
|
+
rootFocused: Object.assign({}, defaultReconnectChatPaneStartChatFocusedStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.startNewChatButtonFocusedStyleProps)
|
|
96
100
|
};
|
|
97
101
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideReconnectChatPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
98
|
-
className: (_props$
|
|
102
|
+
className: (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.classNames) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.containerClassName,
|
|
99
103
|
id: elementId,
|
|
100
104
|
tabIndex: -1,
|
|
101
105
|
onKeyDown: handleEscKeyDown,
|
|
@@ -103,22 +107,22 @@ function ReconnectChatPane(props) {
|
|
|
103
107
|
"aria-label": ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.reconnectChatPaneAriaLabel) || defaultReconnectChatPaneControlProps.reconnectChatPaneAriaLabel,
|
|
104
108
|
styles: containerStyles
|
|
105
109
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
106
|
-
className: (_props$
|
|
110
|
+
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.wrapperClassName,
|
|
107
111
|
styles: wrapperStyles,
|
|
108
112
|
tabIndex: -1,
|
|
109
113
|
id: elementId + "-wrapper"
|
|
110
114
|
}, !((_props$controlProps11 = props.controlProps) !== null && _props$controlProps11 !== void 0 && _props$controlProps11.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
111
|
-
className: (_props$
|
|
115
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.titleClassName,
|
|
112
116
|
styles: titleStyles,
|
|
113
117
|
tabIndex: -1,
|
|
114
118
|
id: elementId + "-title"
|
|
115
119
|
}, ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.titleText) || defaultReconnectChatPaneControlProps.titleText)), !((_props$controlProps13 = props.controlProps) !== null && _props$controlProps13 !== void 0 && _props$controlProps13.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
116
|
-
className: (_props$
|
|
120
|
+
className: (_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.classNames) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.subtitleClassName,
|
|
117
121
|
styles: subtitleStyles,
|
|
118
122
|
tabIndex: -1,
|
|
119
123
|
id: elementId + "-subtitle"
|
|
120
124
|
}, ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.subtitleText) || defaultReconnectChatPaneControlProps.subtitleText)), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideIcon) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.icon) || /*#__PURE__*/React.createElement(Icon, {
|
|
121
|
-
className: (_props$
|
|
125
|
+
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.iconClassName,
|
|
122
126
|
styles: iconStyles,
|
|
123
127
|
tabIndex: -1,
|
|
124
128
|
role: "img",
|
|
@@ -126,12 +130,12 @@ function ReconnectChatPane(props) {
|
|
|
126
130
|
"aria-label": ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.iconAriaLabel) || defaultReconnectChatPaneControlProps.iconAriaLabel
|
|
127
131
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
128
132
|
horizontal: ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.isButtonGroupHorizontal) || defaultReconnectChatPaneControlProps.isButtonGroupHorizontal,
|
|
129
|
-
className: (_props$
|
|
133
|
+
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.buttonGroupClassName,
|
|
130
134
|
styles: buttonGroupStyles,
|
|
131
135
|
tabIndex: -1,
|
|
132
136
|
id: elementId + "-buttongroup"
|
|
133
137
|
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideContinueChatButton) && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.continueChatButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
134
|
-
className: (_props$
|
|
138
|
+
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.continueChatButtonClassName,
|
|
135
139
|
styles: continueChatButtonStyles,
|
|
136
140
|
tabIndex: 0,
|
|
137
141
|
text: ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.continueChatButtonText) || defaultReconnectChatPaneControlProps.continueChatButtonText,
|
|
@@ -139,7 +143,7 @@ function ReconnectChatPane(props) {
|
|
|
139
143
|
id: elementId + "-continueconversationbutton",
|
|
140
144
|
"aria-label": ((_props$controlProps20 = props.controlProps) === null || _props$controlProps20 === void 0 ? void 0 : _props$controlProps20.continueChatButtonAriaLabel) || defaultReconnectChatPaneControlProps.continueChatButtonAriaLabel
|
|
141
145
|
})), !((_props$controlProps21 = props.controlProps) !== null && _props$controlProps21 !== void 0 && _props$controlProps21.hideStartNewChatButton) && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.startNewChatButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
142
|
-
className: (_props$
|
|
146
|
+
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.startNewChatButtonClassName,
|
|
143
147
|
styles: startNewChatButtonStyles,
|
|
144
148
|
tabIndex: 0,
|
|
145
149
|
text: ((_props$controlProps22 = props.controlProps) === null || _props$controlProps22 === void 0 ? void 0 : _props$controlProps22.startNewChatButtonText) || defaultReconnectChatPaneControlProps.startNewChatButtonText,
|
|
@@ -9,7 +9,9 @@ export interface IReconnectChatPaneStyleProps {
|
|
|
9
9
|
buttonGroupStyleProps?: IStyle;
|
|
10
10
|
continueChatButtonStyleProps?: IStyle;
|
|
11
11
|
continueChatButtonHoveredStyleProps?: IStyle;
|
|
12
|
+
continueChatButtonFocusedStyleProps?: IStyle;
|
|
12
13
|
startNewChatButtonStyleProps?: IStyle;
|
|
13
14
|
startNewChatButtonHoveredStyleProps?: IStyle;
|
|
15
|
+
startNewChatButtonFocusedStyleProps?: IStyle;
|
|
14
16
|
classNames?: IReconnectChatPaneClassNames;
|
|
15
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Components",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@fluentui/react": "^8.46.0",
|
|
70
70
|
"adaptivecards": "^2.10.0",
|
|
71
|
-
"botframework-webchat": "4.
|
|
71
|
+
"botframework-webchat": "4.16.0",
|
|
72
72
|
"broadcast-channel": "^4.5.0",
|
|
73
73
|
"jest-transform-stub": "^2.0.0",
|
|
74
74
|
"rxjs": "^5.0.3",
|