@microsoft/omnichannel-chat-components 0.1.0-main.b59a07c → 0.1.0-main.bda05f5

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 (104) hide show
  1. package/lib/cjs/common/Constants.js +2 -6
  2. package/lib/cjs/common/utils.js +21 -2
  3. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +1 -1
  4. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +15 -2
  5. package/lib/cjs/components/chatbutton/ChatButton.js +23 -22
  6. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +3 -2
  7. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
  8. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  9. package/lib/cjs/components/common/commandbutton/CommandButton.js +30 -2
  10. package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +4 -3
  11. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +7 -0
  12. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  13. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  14. package/lib/cjs/components/footer/Footer.js +2 -2
  15. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  16. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  17. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +27 -4
  18. package/lib/cjs/components/header/Header.js +2 -2
  19. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
  20. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  21. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  22. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  23. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  24. package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
  25. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -1
  26. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
  27. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
  28. package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  29. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +22 -9
  30. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
  31. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
  32. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
  33. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
  34. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
  35. package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  36. package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
  37. package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
  38. package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
  39. package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
  40. package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
  41. package/lib/cjs/index.js +6 -0
  42. package/lib/cjs/services/BroadcastService.js +36 -8
  43. package/lib/esm/common/Constants.js +1 -4
  44. package/lib/esm/common/utils.js +16 -0
  45. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +1 -1
  46. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +15 -2
  47. package/lib/esm/components/chatbutton/ChatButton.js +22 -21
  48. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +3 -2
  49. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +1 -0
  50. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  51. package/lib/esm/components/common/commandbutton/CommandButton.js +30 -2
  52. package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +4 -3
  53. package/lib/esm/components/confirmationpane/ConfirmationPane.js +8 -1
  54. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  55. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  56. package/lib/esm/components/footer/Footer.js +2 -2
  57. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
  58. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
  59. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +27 -4
  60. package/lib/esm/components/header/Header.js +2 -2
  61. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
  62. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  63. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  64. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  65. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  66. package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
  67. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -1
  68. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
  69. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
  70. package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  71. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +22 -9
  72. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +1 -0
  73. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +3 -1
  74. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
  75. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
  76. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
  77. package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  78. package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
  79. package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
  80. package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
  81. package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
  82. package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
  83. package/lib/esm/index.js +1 -0
  84. package/lib/esm/services/BroadcastService.js +34 -8
  85. package/lib/types/common/Constants.d.ts +1 -2
  86. package/lib/types/common/utils.d.ts +1 -0
  87. package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +1 -0
  88. package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
  89. package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
  90. package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
  91. package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
  92. package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
  93. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
  94. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
  95. package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
  96. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
  97. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
  98. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +2 -0
  99. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
  100. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
  101. package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
  102. package/lib/types/index.d.ts +1 -0
  103. package/lib/types/services/BroadcastService.d.ts +1 -0
  104. package/package.json +2 -2
@@ -4,19 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultProactiveChatPaneCloseButtonStyles = void 0;
7
-
8
- var _Icons = require("../../../../../assets/Icons");
9
-
10
7
  const defaultProactiveChatPaneCloseButtonStyles = {
11
- backgroundImage: `url(${_Icons.CloseChatButtonIconBase64})`,
12
- backgroundPosition: "center",
13
- backgroundRepeat: "no-repeat",
14
- color: "#605e5c",
15
- cursor: "pointer",
16
- height: "14px",
17
- lineHeight: "14px",
18
- textAlign: "center",
19
- width: "14px",
20
- zIndex: "inherit"
8
+ color: "white",
9
+ fontSize: "12px"
21
10
  };
22
11
  exports.defaultProactiveChatPaneCloseButtonStyles = defaultProactiveChatPaneCloseButtonStyles;
@@ -14,7 +14,11 @@ const presetOneProactiveChatPaneControlProps = {
14
14
  hideSubtitle: false,
15
15
  subtitleText: "Live chat support!",
16
16
  hideCloseButton: false,
17
- closeButtonAriaLabel: "Close Button",
17
+ closeButtonProps: {
18
+ type: "icon",
19
+ iconName: "ChromeClose",
20
+ hideButtonTitle: true
21
+ },
18
22
  isBodyContainerHorizantal: true,
19
23
  hideBodyTitle: false,
20
24
  bodyTitleText: "Hi! Have any questions? I am here to help.",
@@ -14,7 +14,11 @@ const presetThreeProactiveChatPaneControlProps = {
14
14
  hideSubtitle: false,
15
15
  subtitleText: "Live chat support!",
16
16
  hideCloseButton: false,
17
- closeButtonAriaLabel: "Close Button",
17
+ closeButtonProps: {
18
+ type: "icon",
19
+ iconName: "ChromeClose",
20
+ hideButtonTitle: true
21
+ },
18
22
  isBodyContainerHorizantal: false,
19
23
  hideBodyTitle: false,
20
24
  bodyTitleText: "Hi! Have any questions? I am here to help.",
package/lib/cjs/index.js CHANGED
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "BroadcastService", {
27
27
  return _BroadcastService.BroadcastService;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "BroadcastServiceInitialize", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _BroadcastService.BroadcastServiceInitialize;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "CallAcceptButtonBase64", {
31
37
  enumerable: true,
32
38
  get: function () {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.BroadcastService = void 0;
6
+ exports.BroadcastServiceInitialize = exports.BroadcastService = void 0;
7
7
 
8
8
  var _rxjs = require("rxjs");
9
9
 
@@ -11,20 +11,48 @@ var _operators = require("rxjs/operators");
11
11
 
12
12
  var _broadcastChannel = require("broadcast-channel");
13
13
 
14
- var _Constants = require("../common/Constants");
14
+ const newMessage = new _rxjs.Subject(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
15
 
16
- const newMessage = new _rxjs.Subject();
17
- const pubChannel = new _broadcastChannel.BroadcastChannel(_Constants.BROADCAST_CHANNEL_NAME);
18
- const subChannel = new _broadcastChannel.BroadcastChannel(_Constants.BROADCAST_CHANNEL_NAME); // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
+ const broadcastServicePubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
17
 
20
- subChannel.onmessage = message => {
21
- newMessage.next(message);
18
+ const broadcastServiceSubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+
20
+ let pubChannel; // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+
22
+ let subChannel;
23
+
24
+ const BroadcastServiceInitialize = channelName => {
25
+ if (broadcastServicePubList[channelName]) {
26
+ pubChannel = broadcastServicePubList[channelName];
27
+ } else {
28
+ const newPubChannel = new _broadcastChannel.BroadcastChannel(channelName);
29
+ broadcastServicePubList[channelName] = newPubChannel;
30
+ pubChannel = newPubChannel;
31
+ }
32
+
33
+ if (broadcastServiceSubList[channelName]) {
34
+ subChannel = broadcastServiceSubList[channelName];
35
+ } else {
36
+ const newSubChannel = new _broadcastChannel.BroadcastChannel(channelName);
37
+ broadcastServiceSubList[channelName] = newSubChannel;
38
+ subChannel = newSubChannel;
39
+ } // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+
41
+
42
+ subChannel.onmessage = message => {
43
+ newMessage.next(message);
44
+ };
22
45
  };
23
46
 
47
+ exports.BroadcastServiceInitialize = BroadcastServiceInitialize;
24
48
  const BroadcastService = {
25
49
  //broadcast a message
26
50
  postMessage: message => {
27
- pubChannel.postMessage(message);
51
+ /**
52
+ * Omit copying methods to prevent 'DataCloneError' in older browsers when passing an object with functions
53
+ * This exception occurs when an object can't be clone with the 'structured clone algorithm' (used by postMessage)
54
+ */
55
+ pubChannel.postMessage(JSON.parse(JSON.stringify(message)));
28
56
  },
29
57
  getMessage: message => {
30
58
  return newMessage.pipe((0, _operators.filter)(msg => msg.elementId == message.elementId && msg.elementType == message.elementType && msg.eventName == message.eventName));
@@ -4,9 +4,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
4
4
 
5
5
  /* CSS Constants */
6
6
  export const AccessibilityBrightnessRatio = 1.2;
7
- /* App constants*/
8
-
9
- export const BROADCAST_CHANNEL_NAME = "omnichannel_broadcast_channel";
10
7
  export const HiddenTextStyles = {
11
8
  position: "absolute",
12
9
  height: "1px",
@@ -21,7 +18,7 @@ export let ElementType;
21
18
 
22
19
  (function (ElementType) {
23
20
  ElementType["ChatButton"] = "ChatButton";
24
- ElementType["HeaderCloseButton"] = "HeaderCloseButton";
21
+ ElementType["CloseButton"] = "CloseButton";
25
22
  ElementType["HeaderMinimizeButton"] = "HeaderMinimizeButton";
26
23
  ElementType["FooterDownloadTranscriptButton"] = "FooterDownloadTranscriptButton";
27
24
  ElementType["FooterEmailTranscriptButton"] = "FooterEmailTranscriptButton";
@@ -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
  };
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import * as React from "react";
4
4
  import { IconButton, Stack } from "@fluentui/react";
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import * as React from "react";
4
4
  import { Label, Stack } from "@fluentui/react";
@@ -114,12 +114,25 @@ function IncomingCall(props) {
114
114
  window.removeEventListener("keydown", ignoreDefault);
115
115
  };
116
116
  }, []);
117
+ useEffect(() => {
118
+ // Setting focus to decline call button when incoming call alert appears
119
+ if (declineCallButtonId) {
120
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
+ const declineCallButton = document.getElementById(declineCallButtonId);
122
+
123
+ if (declineCallButton) {
124
+ declineCallButton.focus();
125
+ }
126
+ }
127
+ }, []);
117
128
  return /*#__PURE__*/React.createElement(Stack, {
118
129
  horizontal: true,
119
130
  className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
120
131
  horizontalAlign: "space-between",
121
132
  styles: stackStyles,
122
- dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir)
133
+ dir: ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.dir) ?? ((_defaultIncomingCallP27 = defaultIncomingCallProps.controlProps) === null || _defaultIncomingCallP27 === void 0 ? void 0 : _defaultIncomingCallP27.dir),
134
+ role: "alert",
135
+ "aria-label": incomingCallTitleProps === null || incomingCallTitleProps === void 0 ? void 0 : incomingCallTitleProps.text
123
136
  }, /*#__PURE__*/React.createElement(Stack, {
124
137
  horizontal: true,
125
138
  id: "incomingCallLeftGroup",
@@ -20,16 +20,17 @@ function NotificationBubble(props, parentId) {
20
20
  const unreadMessageCount = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.unreadMessageCount) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.unreadMessageCount);
21
21
 
22
22
  if (unreadMessageCount !== "0") {
23
- var _props$componentOverr, _props$styleProps2, _props$styleProps2$cl, _props$controlProps2;
23
+ var _props$componentOverr, _props$controlProps2, _props$controlProps3, _props$styleProps2, _props$styleProps2$cl, _props$controlProps4, _props$controlProps5;
24
24
 
25
25
  return decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/React.createElement(Stack, {
26
- role: "alert",
26
+ "aria-live": "polite",
27
27
  styles: notificationBubbleStyles,
28
+ "aria-label": (_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.ariaLabelUnreadMessageString ? (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.ariaLabelUnreadMessageString : defaultChatButtonControlProps.ariaLabelUnreadMessageString,
28
29
  className: (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : (_props$styleProps2$cl = _props$styleProps2.classNames) === null || _props$styleProps2$cl === void 0 ? void 0 : _props$styleProps2$cl.notificationBubbleClassName,
29
30
  id: parentId + "-notification-bubble"
30
31
  }, unreadMessageCount, /*#__PURE__*/React.createElement("span", {
31
32
  style: HiddenTextStyles
32
- }, (_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.unreadMessageString));
33
+ }, (_props$controlProps4 = props.controlProps) !== null && _props$controlProps4 !== void 0 && _props$controlProps4.unreadMessageString ? (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.unreadMessageString : defaultChatButtonControlProps.unreadMessageString));
33
34
  }
34
35
 
35
36
  return null;
@@ -49,7 +50,7 @@ function IconContainer(props, parentId) {
49
50
  }
50
51
 
51
52
  function TextContainer(props, parentId) {
52
- var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr3, _props$styleProps8, _props$styleProps8$cl, _props$componentOverr4, _props$styleProps9, _props$styleProps9$cl, _props$componentOverr5, _props$styleProps10, _props$styleProps10$c;
53
+ var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$controlProps9, _props$controlProps10, _props$controlProps11, _props$componentOverr3, _props$styleProps8, _props$styleProps8$cl, _props$componentOverr4, _props$styleProps9, _props$styleProps9$cl, _props$componentOverr5, _props$styleProps10, _props$styleProps10$c;
53
54
 
54
55
  const textContainerStyles = {
55
56
  root: Object.assign({}, defaultChatButtonTextContainerStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.textContainerStyleProps)
@@ -60,12 +61,12 @@ function TextContainer(props, parentId) {
60
61
  const subtitleStyles = {
61
62
  root: Object.assign({}, defaultChatButtonSubTitleStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.subtitleStyleProps)
62
63
  };
63
- const hideChatTitle = ((_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.hideChatTitle) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatTitle);
64
- const hideChatSubtitle = ((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.hideChatSubtitle) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatSubtitle);
65
- const titleDir = ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
66
- const titleText = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.titleText) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.titleText);
67
- const subtitleDir = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
68
- const subtitleText = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.subtitleText) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.subtitleText);
64
+ const hideChatTitle = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.hideChatTitle) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatTitle);
65
+ const hideChatSubtitle = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.hideChatSubtitle) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatSubtitle);
66
+ const titleDir = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
67
+ const titleText = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.titleText);
68
+ const subtitleDir = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
69
+ const subtitleText = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.subtitleText);
69
70
  return decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.textContainer) || /*#__PURE__*/React.createElement(Stack, {
70
71
  styles: textContainerStyles,
71
72
  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.textContainerClassName,
@@ -86,23 +87,23 @@ function TextContainer(props, parentId) {
86
87
  }
87
88
 
88
89
  function ChatButton(props) {
89
- var _props$controlProps9, _props$controlProps10, _props$controlProps11, _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$styleProps11;
90
+ var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
90
91
 
91
- const elementId = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.id) ?? "lcw-components-chat-button";
92
- const defaultAriaLabel = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.ariaLabel) ?? "live chat button";
93
- const defaultRole = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.role) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.role);
94
- const containersDir = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
95
- const hideChatButton = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.hideChatButton) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatButton);
96
- const hideChatIcon = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.hideChatIcon) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatIcon);
97
- const hideChatTextContainer = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.hideChatTextContainer) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatTextContainer);
98
- const hideNotificationBubble = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideNotificationBubble) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideNotificationBubble);
92
+ const elementId = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.id) ?? "lcw-components-chat-button";
93
+ const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? defaultChatButtonControlProps.ariaLabel;
94
+ const defaultRole = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.role) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.role);
95
+ const containersDir = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.dir) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.dir);
96
+ const hideChatButton = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideChatButton) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatButton);
97
+ const hideChatIcon = ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.hideChatIcon) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatIcon);
98
+ const hideChatTextContainer = ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.hideChatTextContainer) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideChatTextContainer);
99
+ const hideNotificationBubble = ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.hideNotificationBubble) ?? (defaultChatButtonControlProps === null || defaultChatButtonControlProps === void 0 ? void 0 : defaultChatButtonControlProps.hideNotificationBubble);
99
100
  const chatButtonGroupStyles = {
100
101
  root: Object.assign({}, defaultChatButtonGeneralStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.generalStyleProps)
101
102
  };
102
103
  const handleInitiateChatClick = useCallback(() => {
103
- var _props$controlProps17;
104
+ var _props$controlProps20;
104
105
 
105
- if ((_props$controlProps17 = props.controlProps) !== null && _props$controlProps17 !== void 0 && _props$controlProps17.onClick) {
106
+ if ((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.onClick) {
106
107
  const customEvent = {
107
108
  elementType: ElementType.ChatButton,
108
109
  elementId: elementId,
@@ -2,7 +2,7 @@ export const defaultChatButtonControlProps = {
2
2
  id: "lcw-components-chat-button",
3
3
  dir: "ltr",
4
4
  role: "button",
5
- ariaLabel: "live chat button",
5
+ ariaLabel: "Let's chat We are online",
6
6
  unreadMessageCount: "0",
7
7
  titleText: "Let's Chat!",
8
8
  subtitleText: "We're online.",
@@ -16,5 +16,6 @@ export const defaultChatButtonControlProps = {
16
16
  hideChatTitle: false,
17
17
  hideNotificationBubble: true,
18
18
  unreadMessageString: "new messages",
19
- largeUnreadMessageString: "99+"
19
+ largeUnreadMessageString: "99+",
20
+ ariaLabelUnreadMessageString: "you have new messages"
20
21
  };
@@ -8,6 +8,7 @@ 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
13
  width: "max-content"
13
14
  };
@@ -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"
@@ -4,14 +4,42 @@ import { BroadcastService } from "../../../services/BroadcastService";
4
4
  import { ElementType } from "../../../common/Constants";
5
5
 
6
6
  function CommandButton(props) {
7
+ var _props$hoverStyles, _props$hoverStyles2, _props$focusStyles;
8
+
7
9
  //imageIconProps > iconName
8
10
  const iconProp = props.imageIconProps ? {
9
11
  imageProps: props.imageIconProps
10
12
  } : {
11
13
  iconName: props.iconName
12
14
  };
15
+ let iconStyles = {};
16
+
17
+ if (props.type === "icon") {
18
+ var _props$styles;
19
+
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+ iconStyles = { ...(props === null || props === void 0 ? void 0 : (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.icon)
22
+ };
23
+ }
24
+
13
25
  const buttonStyles = {
14
- root: props.styles,
26
+ icon: { ...iconStyles
27
+ },
28
+ root: {
29
+ selectors: {
30
+ ":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ ...(props === null || props === void 0 ? void 0 : (_props$hoverStyles = props.hoverStyles) === null || _props$hoverStyles === void 0 ? void 0 : _props$hoverStyles.icon)
32
+ },
33
+ ":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
+ ...(props === null || props === void 0 ? void 0 : (_props$hoverStyles2 = props.hoverStyles) === null || _props$hoverStyles2 === void 0 ? void 0 : _props$hoverStyles2.icon)
35
+ },
36
+ ":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
+ ...(props === null || props === void 0 ? void 0 : (_props$focusStyles = props.focusStyles) === null || _props$focusStyles === void 0 ? void 0 : _props$focusStyles.icon)
38
+ }
39
+ },
40
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
+ ...(props === null || props === void 0 ? void 0 : props.styles)
42
+ },
15
43
  rootHovered: props.hoverStyles,
16
44
  rootFocused: props.focusStyles,
17
45
  rootPressed: props.hoverStyles
@@ -38,7 +66,7 @@ function CommandButton(props) {
38
66
  }), props.type === "icon" && /*#__PURE__*/React.createElement(IconButton, {
39
67
  id: props.id,
40
68
  iconProps: iconProp,
41
- title: props.ariaLabel,
69
+ title: props.hideButtonTitle ? undefined : props.ariaLabel,
42
70
  ariaLabel: props.ariaLabel,
43
71
  disabled: props.disabled,
44
72
  styles: buttonStyles,
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
  import { ElementType } from "../../../common/Constants";
3
- import CommandButton from "../../common/commandbutton/CommandButton";
3
+ import CommandButton from "../commandbutton/CommandButton";
4
4
 
5
5
  function CloseButton(props) {
6
6
  const {
7
7
  type
8
8
  } = props;
9
9
  const customEvent = {
10
- elementType: ElementType.HeaderCloseButton,
10
+ elementType: ElementType.CloseButton,
11
11
  elementId: props === null || props === void 0 ? void 0 : props.id,
12
12
  eventName: "OnClick"
13
13
  };
@@ -23,7 +23,8 @@ function CloseButton(props) {
23
23
  onClick: props.onClick,
24
24
  ariaLabel: props.ariaLabel ?? "Close",
25
25
  className: props.className,
26
- customEvent: customEvent
26
+ customEvent: customEvent,
27
+ hideButtonTitle: props.hideButtonTitle
27
28
  });
28
29
  }
29
30
 
@@ -2,7 +2,7 @@ import { DefaultButton, PrimaryButton } from "@fluentui/react/lib/Button";
2
2
  import { Label, Stack } from "@fluentui/react";
3
3
  import React, { useCallback } from "react";
4
4
  import { BroadcastService } from "../../services/BroadcastService";
5
- import { ElementType } from "../../common/Constants";
5
+ import { ElementType, KeyCodes } from "../../common/Constants";
6
6
  import { decodeComponentString } from "../../common/decodeComponentString";
7
7
  import { defaultConfirmationPaneButtonGroupStyles } from "./common/defaultStyles/defaultConfirmationPaneButtonGroupStyles";
8
8
  import { defaultConfirmationPaneCancelButtonHoveredStyles } from "./common/defaultStyles/defaultConfirmationPaneCancelButtonHoveredStyles";
@@ -49,6 +49,12 @@ function ConfirmationPane(props) {
49
49
  BroadcastService.postMessage(customEvent);
50
50
  (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onCancel();
51
51
  }
52
+ }, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
+
54
+ const handleEscKeyDown = useCallback(e => {
55
+ if (e.code === KeyCodes.ESCAPE) {
56
+ handleCancelClick();
57
+ }
52
58
  }, []);
53
59
  const containerStyles = {
54
60
  root: Object.assign({}, defaultConfirmationPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
@@ -76,6 +82,7 @@ function ConfirmationPane(props) {
76
82
  };
77
83
  return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/React.createElement(Stack, {
78
84
  id: elementId,
85
+ onKeyDown: handleEscKeyDown,
79
86
  tabIndex: -1,
80
87
  dir: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.dir) || defaultConfirmationPaneControlProps.dir,
81
88
  styles: containerStyles,
@@ -1,7 +1,11 @@
1
1
  export const defaultConfirmationPaneButtonGroupStyles = {
2
2
  display: "flex",
3
+ width: "auto",
4
+ height: "auto",
5
+ boxSizing: "border-box",
3
6
  flexFlow: "row",
4
7
  justifyContent: "center",
5
8
  alignItems: "center",
6
- gap: "10px"
9
+ gap: "10px",
10
+ marginBottom: "10px"
7
11
  };
@@ -1,16 +1,19 @@
1
1
  export const defaultConfirmationPaneGeneralStyles = {
2
+ display: "flex",
3
+ minHeight: "160px",
4
+ maxHeight: "300px",
5
+ boxSizing: "border-box",
2
6
  backgroundColor: "white",
3
7
  borderRadius: "2px",
4
8
  color: "black",
5
9
  fontFamily: "Segoe UI, Arial, sans-serif",
6
10
  fontSize: "14px",
7
- height: "160px",
8
11
  padding: "10px 20px",
9
- width: "262px",
10
12
  position: "absolute",
11
13
  justifyContent: "center",
12
14
  alignItems: "center",
13
- display: "flex",
14
15
  flexFlow: "column",
15
- zIndex: "9999"
16
+ zIndex: "9999",
17
+ left: "26px",
18
+ right: "26px"
16
19
  };
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import * as React from "react";
4
4
  import { Stack, initializeIcons } from "@fluentui/react";
@@ -66,7 +66,7 @@ function Footer(props) {
66
66
  verticalAlign: "start"
67
67
  }, /*#__PURE__*/React.createElement(Stack, {
68
68
  horizontal: true,
69
- verticalAlign: "start"
69
+ verticalAlign: "center"
70
70
  }, processCustomComponents((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : (_props$controlProps15 = _props$controlProps14.rightGroup) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.children), !((_props$controlProps16 = props.controlProps) !== null && _props$controlProps16 !== void 0 && _props$controlProps16.hideAudioNotificationButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.AudioNotificationButton) || /*#__PURE__*/React.createElement(AudioNotificationButton, _extends({}, audioNotificationButtonProps, {
71
71
  onClick: (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioNotificationClick,
72
72
  styles: audioNotificationButtonStyles,
@@ -35,6 +35,7 @@ export const defaultFooterControlProps = {
35
35
  },
36
36
  audioNotificationButtonProps: {
37
37
  id: "oc-lcw-footer-audionotification-button",
38
+ type: "icon",
38
39
  ariaLabel: "Turn sound off",
39
40
  toggleAriaLabel: "Turn sound on",
40
41
  iconName: "Volume3",
@@ -8,8 +8,10 @@ export const defaultFooterStyleProps = {
8
8
  padding: "0 10px 5px 10px"
9
9
  },
10
10
  downloadTranscriptButtonStyleProps: {
11
- color: "blue",
12
- fontSize: 16,
11
+ icon: {
12
+ color: "blue",
13
+ fontSize: 16
14
+ },
13
15
  height: "25px",
14
16
  lineHeight: "25px",
15
17
  width: "25px"
@@ -19,8 +21,10 @@ export const defaultFooterStyleProps = {
19
21
  backgroundColor: "#C8C8C8"
20
22
  },
21
23
  emailTranscriptButtonStyleProps: {
22
- color: "blue",
23
- fontSize: 16,
24
+ icon: {
25
+ color: "blue",
26
+ fontSize: 16
27
+ },
24
28
  height: "25px",
25
29
  lineHeight: "25px",
26
30
  width: "25px"
@@ -30,8 +34,10 @@ export const defaultFooterStyleProps = {
30
34
  backgroundColor: "#C8C8C8"
31
35
  },
32
36
  audioNotificationButtonStyleProps: {
33
- color: "blue",
34
- fontSize: 16,
37
+ icon: {
38
+ color: "blue",
39
+ fontSize: 16
40
+ },
35
41
  height: "25px",
36
42
  lineHeight: "25px",
37
43
  width: "25px"
@@ -8,11 +8,34 @@ function AudioNotificationButton(props) {
8
8
  disabled
9
9
  } = props;
10
10
  const [muted, setMuted] = useState(props.isAudioMuted);
11
+ let iconStyles = {};
12
+
13
+ if (props.type === "icon") {
14
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
+ iconStyles = { ...(props === null || props === void 0 ? void 0 : props.styles).icon
16
+ };
17
+ }
18
+
11
19
  const iconButtonStyles = {
12
- root: props === null || props === void 0 ? void 0 : props.styles,
13
- rootHovered: props === null || props === void 0 ? void 0 : props.hoverStyles,
14
- rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles,
15
- rootPressed: props === null || props === void 0 ? void 0 : props.hoverStyles
20
+ icon: iconStyles,
21
+ root: {
22
+ selectors: {
23
+ ":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ ...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
25
+ },
26
+ ":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ ...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
28
+ },
29
+ ":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
+ ...(props === null || props === void 0 ? void 0 : props.focusStyles).icon
31
+ }
32
+ },
33
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
+ ...(props === null || props === void 0 ? void 0 : props.styles)
35
+ },
36
+ rootHovered: props.hoverStyles,
37
+ rootFocused: props.focusStyles,
38
+ rootPressed: props.hoverStyles
16
39
  }; //imageIconProps > iconName
17
40
 
18
41
  const volume0Icon = props.imageToggleIconProps ? {
@@ -1,8 +1,8 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import * as React from "react";
4
4
  import { Image, Label, Stack, initializeIcons } from "@fluentui/react";
5
- import CloseButton from "./subcomponents/CloseButton";
5
+ import CloseButton from "../common/subcomponents/CloseButton";
6
6
  import MinimizeButton from "./subcomponents/MinimizeButton";
7
7
  import { decodeComponentString } from "../../common/decodeComponentString";
8
8
  import { defaultHeaderProps } from "./common/defaultProps/defaultHeaderProps";