@microsoft/omnichannel-chat-components 0.1.0-main.d40108a → 0.1.0-main.d5e0dfe

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/lib/cjs/common/utils.js +21 -2
  2. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +14 -1
  3. package/lib/cjs/components/chatbutton/ChatButton.js +1 -1
  4. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +1 -1
  5. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
  6. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  7. package/lib/cjs/components/common/commandbutton/CommandButton.js +23 -15
  8. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +7 -0
  9. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  10. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  11. package/lib/cjs/components/footer/Footer.js +1 -1
  12. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  13. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  14. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +19 -16
  15. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
  16. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  17. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  18. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  19. package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
  20. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +2 -1
  21. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
  22. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
  23. package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  24. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +21 -8
  25. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
  26. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
  27. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
  28. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
  29. package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  30. package/lib/cjs/services/BroadcastService.js +5 -1
  31. package/lib/esm/common/utils.js +16 -0
  32. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +14 -1
  33. package/lib/esm/components/chatbutton/ChatButton.js +1 -1
  34. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +1 -1
  35. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
  36. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  37. package/lib/esm/components/common/commandbutton/CommandButton.js +23 -15
  38. package/lib/esm/components/confirmationpane/ConfirmationPane.js +8 -1
  39. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  40. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  41. package/lib/esm/components/footer/Footer.js +1 -1
  42. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  43. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  44. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +19 -16
  45. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
  46. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  47. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  48. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  49. package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
  50. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +2 -1
  51. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
  52. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
  53. package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  54. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +21 -8
  55. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
  56. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
  57. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
  58. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
  59. package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  60. package/lib/esm/services/BroadcastService.js +5 -1
  61. package/lib/types/common/utils.d.ts +1 -0
  62. package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
  63. package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
  64. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
  65. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
  66. package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
  67. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
  68. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
  69. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +2 -0
  70. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
  71. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
  72. package/package.json +1 -1
@@ -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,
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,6 @@ export const defaultOOOHPaneControlProps = {
3
3
  dir: "auto",
4
4
  hideOOOHPane: false,
5
5
  hideTitle: false,
6
- titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."
6
+ titleText: "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open.",
7
+ openLinkInNewTab: false
7
8
  };
@@ -0,0 +1,6 @@
1
+ import { defaultOOOHPaneControlProps } from "../defaultProps/defaultOOOHPaneControlProps";
2
+ export const presetFourOOOHPaneControlProps = { ...defaultOOOHPaneControlProps,
3
+ id: "oc-lcw-outofofficehourspane-preset1",
4
+ titleText: "We are out of office. Please contact us here https://www.microsoft.com for further assisstance",
5
+ openLinkInNewTab: true
6
+ };
@@ -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
+ };
@@ -15,7 +15,8 @@ function PostChatSurveyPane(props) {
15
15
  const iframeStyles = {
16
16
  height: "100vh",
17
17
  width: "100%",
18
- display: "block"
18
+ display: "block",
19
+ maxHeight: "100%"
19
20
  };
20
21
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
21
22
  id: elementId,
@@ -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, _defaultPreChatSurvey, _props$styleProps4, _props$styleProps4$cu, _defaultPreChatSurvey2, _props$styleProps5, _props$styleProps5$cu, _defaultPreChatSurvey3, _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$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;
@@ -60,6 +60,7 @@ function PreChatSurveyPane(props) {
60
60
  }
61
61
  }, []); //Adaptive Card Initilializations
62
62
 
63
+ AdaptiveCards.GlobalSettings.setTabIndexAtCardRoot = false;
63
64
  const adaptiveCard = new AdaptiveCards.AdaptiveCard();
64
65
  adaptiveCard.hostConfig = new AdaptiveCards.HostConfig(adaptiveCardHostConfig);
65
66
  adaptiveCard.parse(adpativeCardPayload);
@@ -68,18 +69,30 @@ function PreChatSurveyPane(props) {
68
69
  const renderedCard = adaptiveCard.render();
69
70
  addNoreferrerNoopenerTag(renderedCard);
70
71
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, `
72
+ .ac-textBlock {
73
+ font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontSize} !important;
74
+ height: ${(_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customTextStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.height};
75
+ padding-top: ${(_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customTextStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.paddingTop};
76
+ }
77
+ .ac-textRun {
78
+ font-size: ${(_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : (_props$styleProps6$cu = _props$styleProps6.customTextStyleProps) === null || _props$styleProps6$cu === void 0 ? void 0 : _props$styleProps6$cu.fontSize} !important;
79
+ padding-top: ${(_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : (_props$styleProps7$cu = _props$styleProps7.customTextStyleProps) === null || _props$styleProps7$cu === void 0 ? void 0 : _props$styleProps7$cu.paddingTop};
80
+ }
71
81
  .ac-input {
72
82
  margin-bottom: 6px;
73
83
  }
74
84
  .ac-input.ac-textInput {
75
- height: 20px;
85
+ font-size: ${(_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cu = _props$styleProps8.customTextInputStyleProps) === null || _props$styleProps8$cu === void 0 ? void 0 : _props$styleProps8$cu.fontSize};
86
+ height: ${((_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : (_props$styleProps9$cu = _props$styleProps9.customTextInputStyleProps) === null || _props$styleProps9$cu === void 0 ? void 0 : _props$styleProps9$cu.height) ?? ((_defaultPreChatSurvey = defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.height)};
76
87
  padding: 8px;
77
88
  }
78
89
  .ac-input.ac-textInput.ac-multiline {
79
- height: 52px;
90
+ font-size: ${(_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : (_props$styleProps10$c = _props$styleProps10.customMultilineTextInputStyleProps) === null || _props$styleProps10$c === void 0 ? void 0 : _props$styleProps10$c.fontSize};
91
+ height: ${((_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : (_props$styleProps11$c = _props$styleProps11.customMultilineTextInputStyleProps) === null || _props$styleProps11$c === void 0 ? void 0 : _props$styleProps11$c.height) ?? ((_defaultPreChatSurvey2 = defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.height)};
80
92
  resize: none;
81
93
  }
82
94
  .ac-input.ac-multichoiceInput {
95
+ font-size: ${(_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : (_props$styleProps12$c = _props$styleProps12.customMultichoiceInputStyleProps) === null || _props$styleProps12$c === void 0 ? void 0 : _props$styleProps12$c.fontSize};
83
96
  padding: 3px;
84
97
  padding-top: 7px;
85
98
  padding-bottom: 7px;
@@ -87,14 +100,14 @@ function PreChatSurveyPane(props) {
87
100
  .ac-pushButton {
88
101
  border: 1px solid #00000000;
89
102
  margin: 2px;
90
- height: 48px;
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)};
91
104
  border-radius: 5px;
92
105
  cursor: pointer;
93
106
  font-weight: bold;
94
- font-size: 15px;
95
- font-family: ${((_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customButtonStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontFamily) ?? ((_defaultPreChatSurvey = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.fontFamily)};
96
- color: ${((_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customButtonStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.color) ?? ((_defaultPreChatSurvey2 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.color)};
97
- background-color: ${((_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customButtonStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.backgroundColor) ?? ((_defaultPreChatSurvey3 = defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey3 === void 0 ? void 0 : _defaultPreChatSurvey3.backgroundColor)};
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)};
98
111
  }`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/React.createElement(Stack, {
99
112
  id: elementId,
100
113
  tabIndex: -1,
@@ -1,5 +1,7 @@
1
1
  export const defaultPreChatSurveyPaneButtonStyles = {
2
2
  backgroundColor: "rgb(49, 95, 162)",
3
3
  color: "#FFFFFF",
4
- fontFamily: "Segoe UI, Arial, sans-serif"
4
+ fontFamily: "Segoe UI, Arial, sans-serif",
5
+ fontSize: "15px",
6
+ height: "48px"
5
7
  };
@@ -0,0 +1,3 @@
1
+ export const defaultPreChatSurveyPaneMultilineTextInputStyles = {
2
+ height: "52px"
3
+ };
@@ -1,8 +1,12 @@
1
1
  import { defaultPreChatSurveyPaneACContainerStyles } from "./defaultPreChatSurveyPaneACContainerStyles";
2
2
  import { defaultPreChatSurveyPaneButtonStyles } from "./defaultPreChatSurveyPaneButtonStyles";
3
3
  import { defaultPreChatSurveyPaneGeneralStyles } from "./defaultPreChatSurveyPaneGeneralStyles";
4
+ import { defaultPreChatSurveyPaneMultilineTextInputStyles } from "./defaultPreChatSurveyPaneMultilineTextInputStyles";
5
+ import { defaultPreChatSurveyPaneTextInputStyles } from "./defaultPreChatSurveyPaneTextInputStyles";
4
6
  export const defaultPreChatSurveyPaneStyles = {
5
7
  generalStyleProps: defaultPreChatSurveyPaneGeneralStyles,
6
8
  customButtonStyleProps: defaultPreChatSurveyPaneButtonStyles,
7
- adaptiveCardContainerStyleProps: defaultPreChatSurveyPaneACContainerStyles
9
+ adaptiveCardContainerStyleProps: defaultPreChatSurveyPaneACContainerStyles,
10
+ customTextInputStyleProps: defaultPreChatSurveyPaneTextInputStyles,
11
+ customMultilineTextInputStyleProps: defaultPreChatSurveyPaneMultilineTextInputStyles
8
12
  };
@@ -0,0 +1,3 @@
1
+ export const defaultPreChatSurveyPaneTextInputStyles = {
2
+ height: "20px"
3
+ };
@@ -35,7 +35,11 @@ export const BroadcastServiceInitialize = channelName => {
35
35
  export const BroadcastService = {
36
36
  //broadcast a message
37
37
  postMessage: message => {
38
- pubChannel.postMessage(message);
38
+ /**
39
+ * Omit copying methods to prevent 'DataCloneError' in older browsers when passing an object with functions
40
+ * This exception occurs when an object can't be clone with the 'structured clone algorithm' (used by postMessage)
41
+ */
42
+ pubChannel.postMessage(JSON.parse(JSON.stringify(message)));
39
43
  },
40
44
  getMessage: message => {
41
45
  return newMessage.pipe(filter(msg => msg.elementId == message.elementId && msg.elementType == message.elementType && msg.eventName == message.eventName));
@@ -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;
@@ -13,7 +13,6 @@ export interface IConfirmationPaneControlProps {
13
13
  cancelButtonText?: string;
14
14
  cancelButtonAriaLabel?: string;
15
15
  brightnessValueOnDim?: string;
16
- disableDimLayer?: boolean;
17
16
  onConfirm?: () => void;
18
17
  onCancel?: () => void;
19
18
  }
@@ -22,7 +22,6 @@ export interface IInputValidationPaneControlProps {
22
22
  cancelButtonText?: string;
23
23
  cancelButtonAriaLabel?: string;
24
24
  brightnessValueOnDim?: string;
25
- disableDimLayer?: boolean;
26
25
  onSend?: (input: string) => void;
27
26
  onCancel?: () => void;
28
27
  checkInput?: (input: string) => boolean;
@@ -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
  }
@@ -0,0 +1,2 @@
1
+ import { IPreChatSurveyPaneElementStyles } from "../../../interfaces/IPreChatSurveyPaneElementStyles";
2
+ export declare const defaultPreChatSurveyPaneMultilineTextInputStyles: IPreChatSurveyPaneElementStyles;
@@ -0,0 +1,2 @@
1
+ import { IPreChatSurveyPaneElementStyles } from "../../../interfaces/IPreChatSurveyPaneElementStyles";
2
+ export declare const defaultPreChatSurveyPaneTextInputStyles: IPreChatSurveyPaneElementStyles;
@@ -2,4 +2,6 @@ export interface IPreChatSurveyPaneButtonStyles {
2
2
  backgroundColor?: string;
3
3
  color?: string;
4
4
  fontFamily?: string;
5
+ fontSize?: string;
6
+ height?: string;
5
7
  }
@@ -0,0 +1,5 @@
1
+ export interface IPreChatSurveyPaneElementStyles {
2
+ fontSize?: string;
3
+ height?: string;
4
+ paddingTop?: string;
5
+ }
@@ -1,7 +1,12 @@
1
1
  import { IPreChatSurveyPaneButtonStyles } from "./IPreChatSurveyPaneButtonStyles";
2
2
  import { IStyle } from "@fluentui/react";
3
+ import { IPreChatSurveyPaneElementStyles } from "./IPreChatSurveyPaneElementStyles";
3
4
  export interface IPreChatSurveyPaneStyleProps {
4
5
  generalStyleProps?: IStyle;
5
6
  adaptiveCardContainerStyleProps?: IStyle;
6
7
  customButtonStyleProps?: IPreChatSurveyPaneButtonStyles;
8
+ customTextStyleProps?: IPreChatSurveyPaneElementStyles;
9
+ customTextInputStyleProps?: IPreChatSurveyPaneElementStyles;
10
+ customMultilineTextInputStyleProps?: IPreChatSurveyPaneElementStyles;
11
+ customMultichoiceInputStyleProps?: IPreChatSurveyPaneElementStyles;
7
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-components",
3
- "version": "0.1.0-main.d40108a",
3
+ "version": "0.1.0-main.d5e0dfe",
4
4
  "description": "Microsoft Omnichannel Chat Components",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",