@microsoft/omnichannel-chat-components 0.1.0-main.f30619f → 0.1.0-main.f4c21f0
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/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/cjs/components/loadingpane/LoadingPane.js +2 -1
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +2 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +1 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/esm/components/loadingpane/LoadingPane.js +2 -1
- package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +2 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +1 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
- package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
- package/package.json +1 -1
package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js
CHANGED
|
@@ -16,6 +16,7 @@ const defaultChatButtonSubTitleStyles = {
|
|
|
16
16
|
overflow: "hidden",
|
|
17
17
|
padding: "0px",
|
|
18
18
|
textOverflow: "ellipsis !important",
|
|
19
|
-
|
|
19
|
+
whiteSpace: "nowrap",
|
|
20
|
+
width: "90px"
|
|
20
21
|
};
|
|
21
22
|
exports.defaultChatButtonSubTitleStyles = defaultChatButtonSubTitleStyles;
|
|
@@ -13,10 +13,10 @@ const defaultInputValidationPaneGeneralStyles = {
|
|
|
13
13
|
borderTopWidth: "1px",
|
|
14
14
|
bottom: "0",
|
|
15
15
|
left: "0",
|
|
16
|
-
minHeight: "180px",
|
|
17
16
|
padding: "10px",
|
|
18
17
|
position: "absolute",
|
|
19
18
|
width: "100%",
|
|
19
|
+
maxHeight: "100%",
|
|
20
20
|
zIndex: "9999"
|
|
21
21
|
};
|
|
22
22
|
exports.defaultInputValidationPaneGeneralStyles = defaultInputValidationPaneGeneralStyles;
|
|
@@ -52,13 +52,14 @@ function LoadingPane(props) {
|
|
|
52
52
|
const spinnerTextStyles = {
|
|
53
53
|
root: Object.assign({}, _defaultLoadingPaneSpinnerTextStyles.defaultLoadingPaneSpinnerTextStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.spinnerTextStyleProps)
|
|
54
54
|
};
|
|
55
|
+
const showInSmallWindow = props.windowHeight ? props.windowHeight > 375 : true;
|
|
55
56
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.hideLoadingPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
56
57
|
id: elementId,
|
|
57
58
|
tabIndex: -1,
|
|
58
59
|
styles: containerStyles,
|
|
59
60
|
role: (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.role,
|
|
60
61
|
dir: ((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? _defaultLoadingPaneControlProps.defaultLoadingPaneControlProps.dir
|
|
61
|
-
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
62
|
+
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && showInSmallWindow && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
62
63
|
className: (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cl = _props$styleProps8.classNames) === null || _props$styleProps8$cl === void 0 ? void 0 : _props$styleProps8$cl.iconClassName,
|
|
63
64
|
styles: iconStyles,
|
|
64
65
|
imageProps: iconImageProps,
|
|
@@ -133,7 +133,7 @@ function PreChatSurveyPane(props) {
|
|
|
133
133
|
}`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
134
134
|
id: elementId,
|
|
135
135
|
tabIndex: -1,
|
|
136
|
-
role: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role,
|
|
136
|
+
role: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role) ?? _defaultPreChatSurveyPaneControlProps.defaultPreChatSurveyPaneControlProps.role,
|
|
137
137
|
dir: ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? _defaultPreChatSurveyPaneControlProps.defaultPreChatSurveyPaneControlProps.dir,
|
|
138
138
|
styles: containerStyles
|
|
139
139
|
}, /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
@@ -7,6 +7,7 @@ exports.defaultPreChatSurveyPaneControlProps = void 0;
|
|
|
7
7
|
const defaultPreChatSurveyPaneControlProps = {
|
|
8
8
|
id: "oc-lcw-prechatsurveypane-default",
|
|
9
9
|
dir: "auto",
|
|
10
|
+
role: "alert",
|
|
10
11
|
hidePreChatSurveyPane: false,
|
|
11
12
|
adaptiveCardHostConfig: "{\"fontFamily\":\"Segoe UI, Helvetica Neue, sans-serif\",\"containerStyles\":{\"default\":{\"foregroundColors\":{\"default\":{\"default\":\"#000000\"}},\"backgroundColor\":\"#FFFFFF\"}},\"actions\":{\"actionsOrientation\":\"Vertical\",\"actionAlignment\":\"stretch\"}}",
|
|
12
13
|
payload: "{\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"type\":\"AdaptiveCard\",\"version\":\"1.1\",\"body\":[{\"type\":\"TextBlock\",\"weight\":\"bolder\",\"text\":\"Please answer below questions.\"},{\"type\":\"Input.Text\",\"id\":\"1e5e4e7a-8f0b-ec11-b6e6-000d3a305d38\",\"label\":\"name pls?\",\"maxLength\":100,\"isRequired\":true,\"errorMessage\":\"Name is required\"},{\"type\":\"Input.Text\",\"id\":\"7f8f5d6d-995e-ec11-8f8f-000d3a31376e\",\"label\":\"multi\\nmulti\\nmulti\",\"style\":\"text\",\"isMultiline\":true,\"maxLength\":250},{\"type\":\"Input.ChoiceSet\",\"id\":\"e4bdf7cb-995e-ec11-8f8f-000d3a31376e\",\"label\":\"options\",\"isMultiSelect\":false,\"value\":\"1\",\"style\":\"compact\",\"choices\":[{\"title\":\"one\",\"value\":\"1\"},{\"title\":\"two\",\"value\":\"2\"},{\"title\":\"three\",\"value\":\"3\"}]},{\"type\":\"Input.Toggle\",\"id\":\"b26011d2-995e-ec11-8f8f-000d3a31376e\",\"title\":\"consent\",\"valueOn\":\"True\",\"valueOff\":\"False\",\"value\":\"false\"},{\"type\":\"TextBlock\",\"isSubtle\":true,\"text\":\"Fields marked with * are mandatory.\",\"wrap\":true}],\"actions\":[{\"type\":\"Action.Submit\",\"title\":\"Submit\",\"data\":{\"Type\":\"InputSubmit\"}}]}",
|
|
@@ -33,13 +33,14 @@ function LoadingPane(props) {
|
|
|
33
33
|
const spinnerTextStyles = {
|
|
34
34
|
root: Object.assign({}, defaultLoadingPaneSpinnerTextStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.spinnerTextStyleProps)
|
|
35
35
|
};
|
|
36
|
+
const showInSmallWindow = props.windowHeight ? props.windowHeight > 375 : true;
|
|
36
37
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.hideLoadingPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
37
38
|
id: elementId,
|
|
38
39
|
tabIndex: -1,
|
|
39
40
|
styles: containerStyles,
|
|
40
41
|
role: (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.role,
|
|
41
42
|
dir: ((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? defaultLoadingPaneControlProps.dir
|
|
42
|
-
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
+
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && showInSmallWindow && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/React.createElement(Icon, {
|
|
43
44
|
className: (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cl = _props$styleProps8.classNames) === null || _props$styleProps8$cl === void 0 ? void 0 : _props$styleProps8$cl.iconClassName,
|
|
44
45
|
styles: iconStyles,
|
|
45
46
|
imageProps: iconImageProps,
|
|
@@ -111,7 +111,7 @@ function PreChatSurveyPane(props) {
|
|
|
111
111
|
}`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
112
112
|
id: elementId,
|
|
113
113
|
tabIndex: -1,
|
|
114
|
-
role: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role,
|
|
114
|
+
role: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role) ?? defaultPreChatSurveyPaneControlProps.role,
|
|
115
115
|
dir: ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? defaultPreChatSurveyPaneControlProps.dir,
|
|
116
116
|
styles: containerStyles
|
|
117
117
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const defaultPreChatSurveyPaneControlProps = {
|
|
2
2
|
id: "oc-lcw-prechatsurveypane-default",
|
|
3
3
|
dir: "auto",
|
|
4
|
+
role: "alert",
|
|
4
5
|
hidePreChatSurveyPane: false,
|
|
5
6
|
adaptiveCardHostConfig: "{\"fontFamily\":\"Segoe UI, Helvetica Neue, sans-serif\",\"containerStyles\":{\"default\":{\"foregroundColors\":{\"default\":{\"default\":\"#000000\"}},\"backgroundColor\":\"#FFFFFF\"}},\"actions\":{\"actionsOrientation\":\"Vertical\",\"actionAlignment\":\"stretch\"}}",
|
|
6
7
|
payload: "{\"$schema\":\"http://adaptivecards.io/schemas/adaptive-card.json\",\"type\":\"AdaptiveCard\",\"version\":\"1.1\",\"body\":[{\"type\":\"TextBlock\",\"weight\":\"bolder\",\"text\":\"Please answer below questions.\"},{\"type\":\"Input.Text\",\"id\":\"1e5e4e7a-8f0b-ec11-b6e6-000d3a305d38\",\"label\":\"name pls?\",\"maxLength\":100,\"isRequired\":true,\"errorMessage\":\"Name is required\"},{\"type\":\"Input.Text\",\"id\":\"7f8f5d6d-995e-ec11-8f8f-000d3a31376e\",\"label\":\"multi\\nmulti\\nmulti\",\"style\":\"text\",\"isMultiline\":true,\"maxLength\":250},{\"type\":\"Input.ChoiceSet\",\"id\":\"e4bdf7cb-995e-ec11-8f8f-000d3a31376e\",\"label\":\"options\",\"isMultiSelect\":false,\"value\":\"1\",\"style\":\"compact\",\"choices\":[{\"title\":\"one\",\"value\":\"1\"},{\"title\":\"two\",\"value\":\"2\"},{\"title\":\"three\",\"value\":\"3\"}]},{\"type\":\"Input.Toggle\",\"id\":\"b26011d2-995e-ec11-8f8f-000d3a31376e\",\"title\":\"consent\",\"valueOn\":\"True\",\"valueOff\":\"False\",\"value\":\"false\"},{\"type\":\"TextBlock\",\"isSubtle\":true,\"text\":\"Fields marked with * are mandatory.\",\"wrap\":true}],\"actions\":[{\"type\":\"Action.Submit\",\"title\":\"Submit\",\"data\":{\"Type\":\"InputSubmit\"}}]}",
|
package/package.json
CHANGED