@microsoft/omnichannel-chat-components 0.1.0-main.099196c → 0.1.0-main.0d5dd32

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 (89) hide show
  1. package/lib/cjs/common/Constants.js +12 -7
  2. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +31 -1
  3. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
  4. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
  5. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +45 -2
  6. package/lib/cjs/components/chatbutton/ChatButton.js +37 -26
  7. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
  8. package/lib/cjs/components/common/commandbutton/CommandButton.js +36 -10
  9. package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +4 -3
  10. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +19 -10
  11. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  12. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  13. package/lib/cjs/components/footer/Footer.js +2 -2
  14. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  15. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  16. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +30 -11
  17. package/lib/cjs/components/header/Header.js +2 -2
  18. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +43 -41
  19. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  20. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  21. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  22. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  23. package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  24. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +22 -8
  25. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -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/components/proactivechatpane/ProactiveChatPane.js +33 -30
  31. package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
  32. package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
  33. package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
  34. package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
  35. package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +14 -12
  36. package/lib/cjs/index.js +6 -0
  37. package/lib/cjs/services/BroadcastService.js +36 -8
  38. package/lib/esm/common/Constants.js +10 -5
  39. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +33 -3
  40. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
  41. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
  42. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +47 -4
  43. package/lib/esm/components/chatbutton/ChatButton.js +37 -26
  44. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
  45. package/lib/esm/components/common/commandbutton/CommandButton.js +36 -10
  46. package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +4 -3
  47. package/lib/esm/components/confirmationpane/ConfirmationPane.js +20 -11
  48. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  49. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  50. package/lib/esm/components/footer/Footer.js +2 -2
  51. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  52. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  53. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +30 -11
  54. package/lib/esm/components/header/Header.js +2 -2
  55. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +44 -42
  56. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  57. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  58. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  59. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  60. package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  61. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +22 -8
  62. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
  63. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
  64. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
  65. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
  66. package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  67. package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +30 -29
  68. package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
  69. package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
  70. package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
  71. package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
  72. package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +14 -12
  73. package/lib/esm/index.js +1 -0
  74. package/lib/esm/services/BroadcastService.js +34 -8
  75. package/lib/types/common/Constants.d.ts +8 -2
  76. package/lib/types/components/callingcontainer/subcomponents/CurrentCall/interfaces/ICurrentCallStyleProps.d.ts +0 -4
  77. package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
  78. package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
  79. package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
  80. package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
  81. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
  82. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
  83. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +3 -0
  84. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
  85. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
  86. package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
  87. package/lib/types/index.d.ts +1 -0
  88. package/lib/types/services/BroadcastService.d.ts +1 -0
  89. package/package.json +2 -2
@@ -17,7 +17,7 @@ import { defaultReconnectChatPaneTitleStyles } from "./common/default/defaultSty
17
17
  import { defaultReconnectChatPaneWrapperStyles } from "./common/default/defaultStyles/defaultReconnectChatPaneWrapperStyles";
18
18
 
19
19
  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$controlProps8, _props$styleProps11, _props$styleProps11$c, _props$controlProps9, _props$controlProps10, _props$styleProps12, _props$styleProps12$c, _props$controlProps11, _props$componentOverr, _props$styleProps13, _props$styleProps13$c, _props$controlProps12, _props$controlProps13, _props$componentOverr2, _props$styleProps14, _props$styleProps14$c, _props$controlProps14, _props$controlProps15, _props$componentOverr3, _props$styleProps15, _props$styleProps15$c, _props$controlProps16, _props$controlProps17, _props$styleProps16, _props$styleProps16$c, _props$controlProps18, _props$componentOverr4, _props$styleProps17, _props$styleProps17$c, _props$controlProps19, _props$controlProps20, _props$controlProps21, _props$componentOverr5, _props$styleProps18, _props$styleProps18$c, _props$controlProps22, _props$controlProps23;
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$styleProps13, _props$styleProps13$c, _props$controlProps9, _props$controlProps10, _props$styleProps14, _props$styleProps14$c, _props$controlProps11, _props$componentOverr, _props$styleProps15, _props$styleProps15$c, _props$controlProps12, _props$controlProps13, _props$componentOverr2, _props$styleProps16, _props$styleProps16$c, _props$controlProps14, _props$controlProps15, _props$componentOverr3, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17, _props$styleProps18, _props$styleProps18$c, _props$controlProps18, _props$componentOverr4, _props$styleProps19, _props$styleProps19$c, _props$controlProps19, _props$controlProps20, _props$controlProps21, _props$componentOverr5, _props$styleProps20, _props$styleProps20$c, _props$controlProps22, _props$controlProps23;
21
21
 
22
22
  const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultReconnectChatPaneControlProps.id;
23
23
  const handleContinueChatClick = useCallback(() => {
@@ -86,14 +86,16 @@ function ReconnectChatPane(props) {
86
86
  };
87
87
  const continueChatButtonStyles = {
88
88
  root: Object.assign({}, defaultReconnectChatPaneContinueChatButtonStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.continueChatButtonStyleProps),
89
- rootHovered: Object.assign({}, defaultReconnectChatPaneContinueChatButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.continueChatButtonHoveredStyleProps)
89
+ 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)
90
91
  };
91
92
  const startNewChatButtonStyles = {
92
- root: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.startNewChatButtonStyleProps),
93
- rootHovered: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.startNewChatButtonHoveredStyleProps)
93
+ root: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.startNewChatButtonStyleProps),
94
+ rootHovered: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.startNewChatButtonHoveredStyleProps),
95
+ rootPressed: Object.assign({}, defaultReconnectChatPaneStartNewChatButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.startNewChatButtonHoveredStyleProps)
94
96
  };
95
97
  return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideReconnectChatPane) && /*#__PURE__*/React.createElement(Stack, {
96
- className: (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : (_props$styleProps11$c = _props$styleProps11.classNames) === null || _props$styleProps11$c === void 0 ? void 0 : _props$styleProps11$c.containerClassName,
98
+ className: (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.classNames) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.containerClassName,
97
99
  id: elementId,
98
100
  tabIndex: -1,
99
101
  onKeyDown: handleEscKeyDown,
@@ -101,22 +103,22 @@ function ReconnectChatPane(props) {
101
103
  "aria-label": ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.reconnectChatPaneAriaLabel) || defaultReconnectChatPaneControlProps.reconnectChatPaneAriaLabel,
102
104
  styles: containerStyles
103
105
  }, /*#__PURE__*/React.createElement(Stack, {
104
- className: (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : (_props$styleProps12$c = _props$styleProps12.classNames) === null || _props$styleProps12$c === void 0 ? void 0 : _props$styleProps12$c.wrapperClassName,
106
+ className: (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.classNames) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.wrapperClassName,
105
107
  styles: wrapperStyles,
106
108
  tabIndex: -1,
107
109
  id: elementId + "-wrapper"
108
110
  }, !((_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, {
109
- className: (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.classNames) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.titleClassName,
111
+ 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.titleClassName,
110
112
  styles: titleStyles,
111
113
  tabIndex: -1,
112
114
  id: elementId + "-title"
113
115
  }, ((_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, {
114
- className: (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.classNames) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.subtitleClassName,
116
+ 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.subtitleClassName,
115
117
  styles: subtitleStyles,
116
118
  tabIndex: -1,
117
119
  id: elementId + "-subtitle"
118
120
  }, ((_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, {
119
- 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.iconClassName,
121
+ 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.iconClassName,
120
122
  styles: iconStyles,
121
123
  tabIndex: -1,
122
124
  role: "img",
@@ -124,12 +126,12 @@ function ReconnectChatPane(props) {
124
126
  "aria-label": ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.iconAriaLabel) || defaultReconnectChatPaneControlProps.iconAriaLabel
125
127
  })), /*#__PURE__*/React.createElement(Stack, {
126
128
  horizontal: ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.isButtonGroupHorizontal) || defaultReconnectChatPaneControlProps.isButtonGroupHorizontal,
127
- 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.buttonGroupClassName,
129
+ 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.buttonGroupClassName,
128
130
  styles: buttonGroupStyles,
129
131
  tabIndex: -1,
130
132
  id: elementId + "-buttongroup"
131
133
  }, !((_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, {
132
- 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.continueChatButtonClassName,
134
+ 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.continueChatButtonClassName,
133
135
  styles: continueChatButtonStyles,
134
136
  tabIndex: 0,
135
137
  text: ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.continueChatButtonText) || defaultReconnectChatPaneControlProps.continueChatButtonText,
@@ -137,7 +139,7 @@ function ReconnectChatPane(props) {
137
139
  id: elementId + "-continueconversationbutton",
138
140
  "aria-label": ((_props$controlProps20 = props.controlProps) === null || _props$controlProps20 === void 0 ? void 0 : _props$controlProps20.continueChatButtonAriaLabel) || defaultReconnectChatPaneControlProps.continueChatButtonAriaLabel
139
141
  })), !((_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, {
140
- 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.startNewChatButtonClassName,
142
+ 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.startNewChatButtonClassName,
141
143
  styles: startNewChatButtonStyles,
142
144
  tabIndex: 0,
143
145
  text: ((_props$controlProps22 = props.controlProps) === null || _props$controlProps22 === void 0 ? void 0 : _props$controlProps22.startNewChatButtonText) || defaultReconnectChatPaneControlProps.startNewChatButtonText,
package/lib/esm/index.js CHANGED
@@ -12,6 +12,7 @@ export { default as PostChatSurveyPane } from "./components/postchatsurveypane/P
12
12
  export { encodeComponentString } from "./common/encodeComponentString";
13
13
  export { decodeComponentString } from "./common/decodeComponentString";
14
14
  export { BroadcastService } from "./services/BroadcastService";
15
+ export { BroadcastServiceInitialize } from "./services/BroadcastService";
15
16
  export { ElementType } from "./common/Constants";
16
17
  export { default as CallingContainer } from "./components/callingcontainer/CallingContainer";
17
18
  export { default as CurrentCall } from "./components/callingcontainer/subcomponents/CurrentCall/CurrentCall";
@@ -1,19 +1,45 @@
1
1
  import { Subject } from "rxjs";
2
2
  import { filter } from "rxjs/operators";
3
3
  import { BroadcastChannel } from "broadcast-channel";
4
- import { BROADCAST_CHANNEL_NAME } from "../common/Constants";
5
- const newMessage = new Subject();
6
- const pubChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME);
7
- const subChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME); // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+ const newMessage = new Subject(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
5
 
9
- subChannel.onmessage = message => {
10
- newMessage.next(message);
11
- };
6
+ const broadcastServicePubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+
8
+ const broadcastServiceSubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+
10
+ let pubChannel; // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+
12
+ let subChannel;
13
+ export const BroadcastServiceInitialize = channelName => {
14
+ if (broadcastServicePubList[channelName]) {
15
+ pubChannel = broadcastServicePubList[channelName];
16
+ } else {
17
+ const newPubChannel = new BroadcastChannel(channelName);
18
+ broadcastServicePubList[channelName] = newPubChannel;
19
+ pubChannel = newPubChannel;
20
+ }
21
+
22
+ if (broadcastServiceSubList[channelName]) {
23
+ subChannel = broadcastServiceSubList[channelName];
24
+ } else {
25
+ const newSubChannel = new BroadcastChannel(channelName);
26
+ broadcastServiceSubList[channelName] = newSubChannel;
27
+ subChannel = newSubChannel;
28
+ } // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
29
 
30
+
31
+ subChannel.onmessage = message => {
32
+ newMessage.next(message);
33
+ };
34
+ };
13
35
  export const BroadcastService = {
14
36
  //broadcast a message
15
37
  postMessage: message => {
16
- 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)));
17
43
  },
18
44
  getMessage: message => {
19
45
  return newMessage.pipe(filter(msg => msg.elementId == message.elementId && msg.elementType == message.elementType && msg.eventName == message.eventName));
@@ -1,10 +1,16 @@
1
+ /// <reference types="react" />
1
2
  export declare const AccessibilityBrightnessRatio = 1.2;
2
- export declare const BROADCAST_CHANNEL_NAME = "omnichannel_broadcast_channel";
3
+ export declare const HiddenTextStyles: React.CSSProperties;
3
4
  export declare const KeyCodes: {
4
5
  new (): {};
5
6
  readonly ENTER: "Enter";
6
7
  readonly ESCAPE: "Escape";
7
8
  readonly SPACE: "Space";
9
+ readonly DeclineCallHotKey: "D";
10
+ readonly AcceptAudioCallHotKey: "S";
11
+ readonly AcceptVideoCallHotKey: "A";
12
+ readonly ToggleMicHotKey: "M";
13
+ readonly ToggleCameraHotKey: "O";
8
14
  };
9
15
  export declare const Regex: {
10
16
  new (): {};
@@ -13,7 +19,7 @@ export declare const Regex: {
13
19
  };
14
20
  export declare enum ElementType {
15
21
  ChatButton = "ChatButton",
16
- HeaderCloseButton = "HeaderCloseButton",
22
+ CloseButton = "CloseButton",
17
23
  HeaderMinimizeButton = "HeaderMinimizeButton",
18
24
  FooterDownloadTranscriptButton = "FooterDownloadTranscriptButton",
19
25
  FooterEmailTranscriptButton = "FooterEmailTranscriptButton",
@@ -30,10 +30,6 @@ export interface ICurrentCallStyleProps {
30
30
  */
31
31
  endCallButtonHoverStyleProps?: IStyle;
32
32
  /**
33
- * Call Timer style props
34
- */
35
- currentCallTimerStyleProps?: IStyle;
36
- /**
37
33
  * Video tile style props
38
34
  */
39
35
  videoTileStyleProps?: IStyle;
@@ -13,4 +13,7 @@ export interface IChatButtonControlProps {
13
13
  hideChatSubtitle?: boolean;
14
14
  hideChatTitle?: boolean;
15
15
  hideNotificationBubble?: boolean;
16
+ unreadMessageString?: string;
17
+ largeUnreadMessageString?: string;
18
+ ariaLabelUnreadMessageString?: string;
16
19
  }
@@ -14,4 +14,5 @@ export interface ICommandButtonControlProps {
14
14
  onClick?: () => void;
15
15
  className?: string;
16
16
  disabled?: boolean;
17
+ hideButtonTitle?: boolean;
17
18
  }
@@ -18,4 +18,5 @@ export interface ICommandButtonProps {
18
18
  className?: string;
19
19
  disabled?: boolean;
20
20
  customEvent?: ICustomEvent;
21
+ hideButtonTitle?: boolean;
21
22
  }
@@ -1,3 +1,3 @@
1
- import { ICommandButtonProps } from "../../common/interfaces/ICommandButtonProps";
1
+ import { ICommandButtonProps } from "../interfaces/ICommandButtonProps";
2
2
  declare function CloseButton(props: ICommandButtonProps): JSX.Element;
3
3
  export default CloseButton;
@@ -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;
@@ -1,4 +1,7 @@
1
1
  export interface IPreChatSurveyPaneButtonStyles {
2
2
  backgroundColor?: string;
3
3
  color?: string;
4
+ fontFamily?: string;
5
+ fontSize?: string;
6
+ height?: string;
4
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
  }
@@ -1,3 +1,4 @@
1
+ import { ICommandButtonControlProps } from "../../common/interfaces/ICommandButtonControlProps";
1
2
  export interface IProactiveChatPaneControlProps {
2
3
  id?: string;
3
4
  dir?: "ltr" | "rtl" | "auto";
@@ -8,7 +9,7 @@ export interface IProactiveChatPaneControlProps {
8
9
  hideSubtitle?: boolean;
9
10
  subtitleText?: string;
10
11
  hideCloseButton?: boolean;
11
- closeButtonAriaLabel?: string;
12
+ closeButtonProps?: ICommandButtonControlProps;
12
13
  isBodyContainerHorizantal?: boolean;
13
14
  hideBodyTitle?: boolean;
14
15
  bodyTitleText?: string;
@@ -12,6 +12,7 @@ export { default as PostChatSurveyPane } from "./components/postchatsurveypane/P
12
12
  export { encodeComponentString } from "./common/encodeComponentString";
13
13
  export { decodeComponentString } from "./common/decodeComponentString";
14
14
  export { BroadcastService } from "./services/BroadcastService";
15
+ export { BroadcastServiceInitialize } from "./services/BroadcastService";
15
16
  export { ElementType } from "./common/Constants";
16
17
  export { default as CallingContainer } from "./components/callingcontainer/CallingContainer";
17
18
  export { default as CurrentCall } from "./components/callingcontainer/subcomponents/CurrentCall/CurrentCall";
@@ -1,5 +1,6 @@
1
1
  import { Subject } from "rxjs";
2
2
  import { ICustomEvent } from "../interfaces/ICustomEvent";
3
+ export declare const BroadcastServiceInitialize: (channelName: string) => void;
3
4
  export declare const BroadcastService: {
4
5
  postMessage: (message: ICustomEvent) => void;
5
6
  getMessage: (message: ICustomEvent) => import("rxjs").Observable<ICustomEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-components",
3
- "version": "0.1.0-main.099196c",
3
+ "version": "0.1.0-main.0d5dd32",
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.14.1",
71
+ "botframework-webchat": "4.15.4",
72
72
  "broadcast-channel": "^4.5.0",
73
73
  "jest-transform-stub": "^2.0.0",
74
74
  "rxjs": "^5.0.3",