@microsoft/omnichannel-chat-components 0.1.0-main.fb5f930 → 1.0.0

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.
Files changed (33) hide show
  1. package/lib/cjs/common/utils.js +21 -2
  2. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
  3. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  4. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
  5. package/lib/cjs/components/loadingpane/LoadingPane.js +2 -1
  6. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +2 -1
  7. package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
  8. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -1
  9. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
  10. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
  11. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +7 -6
  12. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
  13. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
  14. package/lib/esm/common/utils.js +16 -0
  15. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
  16. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  17. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
  18. package/lib/esm/components/loadingpane/LoadingPane.js +2 -1
  19. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +2 -1
  20. package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
  21. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -1
  22. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
  23. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
  24. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +7 -6
  25. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
  26. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
  27. package/lib/types/common/utils.d.ts +1 -0
  28. package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
  29. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
  30. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
  31. package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
  32. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +1 -0
  33. package/package.json +1 -1
@@ -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;
@@ -14,7 +14,9 @@ const defaultChatButtonSubTitleStyles = {
14
14
  fontWeight: "200",
15
15
  margin: "0px 14px 0px 14px",
16
16
  overflow: "hidden",
17
+ padding: "0px",
17
18
  textOverflow: "ellipsis !important",
18
- width: "max-content"
19
+ whiteSpace: "nowrap",
20
+ width: "90px"
19
21
  };
20
22
  exports.defaultChatButtonSubTitleStyles = defaultChatButtonSubTitleStyles;
@@ -15,6 +15,7 @@ const defaultChatButtonTitleStyles = {
15
15
  height: "22px",
16
16
  margin: "0px 14px 0px 14px",
17
17
  overflow: "hidden",
18
+ padding: "0px",
18
19
  textOverflow: "ellipsis !important",
19
20
  whiteSpace: "nowrap",
20
21
  width: "90px"
@@ -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,
@@ -13,6 +13,7 @@ const defaultLoadingPaneIconStyles = {
13
13
  margin: "0px 0px 20px 0px",
14
14
  display: "flex",
15
15
  order: 1,
16
- alignSelf: "auto"
16
+ alignSelf: "auto",
17
+ overflow: "visible"
17
18
  };
18
19
  exports.defaultLoadingPaneIconStyles = defaultLoadingPaneIconStyles;
@@ -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$controlProps4, _props$controlProps5, _props$componentOverr, _props$styleProps4, _props$styleProps4$cl, _props$controlProps6;
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
- return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.hideOOOHPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
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$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.role,
39
+ role: ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.role) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.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$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.dir
39
- }, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
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
- }, ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.titleText) ?? _defaultOOOHPaneControlProps.defaultOOOHPaneControlProps.titleText))));
47
+ }, /*#__PURE__*/_react2.default.createElement("div", {
48
+ dangerouslySetInnerHTML: {
49
+ __html: displayText
50
+ }
51
+ })))));
45
52
  }
46
53
 
47
54
  var _default = OOOHPane;
@@ -9,6 +9,8 @@ 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
+ role: "alert",
13
+ titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.",
14
+ openLinkInNewTab: false
13
15
  };
14
16
  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;
@@ -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, _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;
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$styleProps18, _props$styleProps18$c, _defaultPreChatSurvey8, _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;
@@ -123,17 +123,18 @@ function PreChatSurveyPane(props) {
123
123
  border: 1px solid #00000000;
124
124
  margin: 2px;
125
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)};
126
+ width: ${((_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.width) ?? ((_defaultPreChatSurvey4 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.width)};
126
127
  border-radius: 5px;
127
128
  cursor: pointer;
128
129
  font-weight: bold;
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)};
130
+ font-size: ${((_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.fontSize) ?? ((_defaultPreChatSurvey5 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontSize)};
131
+ font-family: ${((_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.fontFamily) ?? ((_defaultPreChatSurvey6 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.fontFamily)};
132
+ 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.color) ?? ((_defaultPreChatSurvey7 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.color)};
133
+ background-color: ${((_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.customButtonStyleProps) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.backgroundColor) ?? ((_defaultPreChatSurvey8 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey8 === void 0 ? void 0 : _defaultPreChatSurvey8.backgroundColor)};
133
134
  }`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
134
135
  id: elementId,
135
136
  tabIndex: -1,
136
- role: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role,
137
+ role: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role) ?? _defaultPreChatSurveyPaneControlProps.defaultPreChatSurveyPaneControlProps.role,
137
138
  dir: ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? _defaultPreChatSurveyPaneControlProps.defaultPreChatSurveyPaneControlProps.dir,
138
139
  styles: containerStyles
139
140
  }, /*#__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\"}}]}",
@@ -9,6 +9,7 @@ const defaultPreChatSurveyPaneButtonStyles = {
9
9
  color: "#FFFFFF",
10
10
  fontFamily: "Segoe UI, Arial, sans-serif",
11
11
  fontSize: "15px",
12
- height: "48px"
12
+ height: "48px",
13
+ width: "auto"
13
14
  };
14
15
  exports.defaultPreChatSurveyPaneButtonStyles = defaultPreChatSurveyPaneButtonStyles;
@@ -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
  };
@@ -8,6 +8,8 @@ export const defaultChatButtonSubTitleStyles = {
8
8
  fontWeight: "200",
9
9
  margin: "0px 14px 0px 14px",
10
10
  overflow: "hidden",
11
+ padding: "0px",
11
12
  textOverflow: "ellipsis !important",
12
- width: "max-content"
13
+ whiteSpace: "nowrap",
14
+ width: "90px"
13
15
  };
@@ -9,6 +9,7 @@ export const defaultChatButtonTitleStyles = {
9
9
  height: "22px",
10
10
  margin: "0px 14px 0px 14px",
11
11
  overflow: "hidden",
12
+ padding: "0px",
12
13
  textOverflow: "ellipsis !important",
13
14
  whiteSpace: "nowrap",
14
15
  width: "90px"
@@ -7,9 +7,9 @@ export const defaultInputValidationPaneGeneralStyles = {
7
7
  borderTopWidth: "1px",
8
8
  bottom: "0",
9
9
  left: "0",
10
- minHeight: "180px",
11
10
  padding: "10px",
12
11
  position: "absolute",
13
12
  width: "100%",
13
+ maxHeight: "100%",
14
14
  zIndex: "9999"
15
15
  };
@@ -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,
@@ -7,5 +7,6 @@ export const defaultLoadingPaneIconStyles = {
7
7
  margin: "0px 0px 20px 0px",
8
8
  display: "flex",
9
9
  order: 1,
10
- alignSelf: "auto"
10
+ alignSelf: "auto",
11
+ overflow: "visible"
11
12
  };
@@ -1,12 +1,13 @@
1
- import { Label, Stack } from "@fluentui/react";
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$controlProps4, _props$controlProps5, _props$componentOverr, _props$styleProps4, _props$styleProps4$cl, _props$controlProps6;
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
- return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.hideOOOHPane) && /*#__PURE__*/React.createElement(Stack, {
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$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.role,
24
+ role: ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.role) ?? defaultOOOHPaneControlProps.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$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? defaultOOOHPaneControlProps.dir
25
- }, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
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
- }, ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.titleText) ?? defaultOOOHPaneControlProps.titleText))));
32
+ }, /*#__PURE__*/React.createElement("div", {
33
+ dangerouslySetInnerHTML: {
34
+ __html: displayText
35
+ }
36
+ })))));
31
37
  }
32
38
 
33
39
  export default OOOHPane;
@@ -3,5 +3,7 @@ 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
+ role: "alert",
7
+ titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.",
8
+ openLinkInNewTab: false
7
9
  };
@@ -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
+ };
@@ -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, _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;
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$styleProps18, _props$styleProps18$c, _defaultPreChatSurvey8, _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;
@@ -101,17 +101,18 @@ function PreChatSurveyPane(props) {
101
101
  border: 1px solid #00000000;
102
102
  margin: 2px;
103
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)};
104
+ width: ${((_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.width) ?? ((_defaultPreChatSurvey4 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.width)};
104
105
  border-radius: 5px;
105
106
  cursor: pointer;
106
107
  font-weight: bold;
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)};
108
+ font-size: ${((_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.fontSize) ?? ((_defaultPreChatSurvey5 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontSize)};
109
+ font-family: ${((_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.fontFamily) ?? ((_defaultPreChatSurvey6 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.fontFamily)};
110
+ 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.color) ?? ((_defaultPreChatSurvey7 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.color)};
111
+ background-color: ${((_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.customButtonStyleProps) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.backgroundColor) ?? ((_defaultPreChatSurvey8 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey8 === void 0 ? void 0 : _defaultPreChatSurvey8.backgroundColor)};
111
112
  }`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/React.createElement(Stack, {
112
113
  id: elementId,
113
114
  tabIndex: -1,
114
- role: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role,
115
+ role: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.role) ?? defaultPreChatSurveyPaneControlProps.role,
115
116
  dir: ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? defaultPreChatSurveyPaneControlProps.dir,
116
117
  styles: containerStyles
117
118
  }, /*#__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\"}}]}",
@@ -3,5 +3,6 @@ export const defaultPreChatSurveyPaneButtonStyles = {
3
3
  color: "#FFFFFF",
4
4
  fontFamily: "Segoe UI, Arial, sans-serif",
5
5
  fontSize: "15px",
6
- height: "48px"
6
+ height: "48px",
7
+ width: "auto"
7
8
  };
@@ -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;
@@ -5,4 +5,6 @@ export interface ILoadingPaneProps {
5
5
  componentOverrides?: ILoadingPaneComponentOverrides;
6
6
  controlProps?: ILoadingPaneControlProps;
7
7
  styleProps?: ILoadingPaneStyleProps;
8
+ windowWidth?: number;
9
+ windowHeight?: number;
8
10
  }
@@ -0,0 +1,2 @@
1
+ import { IOOOHPaneControlProps } from "../../interfaces/IOOOHPaneControlProps";
2
+ export declare const presetFourOOOHPaneControlProps: IOOOHPaneControlProps;
@@ -0,0 +1,2 @@
1
+ import { IOOOHPaneProps } from "../../interfaces/IOOOHPaneProps";
2
+ export declare const presetFourOOOHPaneProps: IOOOHPaneProps;
@@ -5,4 +5,5 @@ export interface IOOOHPaneControlProps {
5
5
  hideOOOHPane?: boolean;
6
6
  hideTitle?: boolean;
7
7
  titleText?: string;
8
+ openLinkInNewTab?: boolean;
8
9
  }
@@ -4,4 +4,5 @@ export interface IPreChatSurveyPaneButtonStyles {
4
4
  fontFamily?: string;
5
5
  fontSize?: string;
6
6
  height?: string;
7
+ width?: string;
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-components",
3
- "version": "0.1.0-main.fb5f930",
3
+ "version": "1.0.0",
4
4
  "description": "Microsoft Omnichannel Chat Components",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",