@microsoft/omnichannel-chat-components 0.1.0-main.3e712be → 0.1.0-main.3fafc45

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 (131) hide show
  1. package/README.md +1 -0
  2. package/lib/cjs/assets/Icons.js +48 -0
  3. package/lib/cjs/common/Constants.js +11 -6
  4. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +31 -1
  5. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +6 -16
  6. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
  7. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +4 -16
  8. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +31 -1
  9. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/componentOverrideProps.js +2 -4
  10. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +4 -10
  11. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultStyles/defaultIncomingCallStyleProps.js +8 -8
  12. package/lib/cjs/components/chatbutton/ChatButton.js +37 -26
  13. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
  14. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonIconContainerStyles.js +2 -4
  15. package/lib/cjs/components/common/commandbutton/CommandButton.js +5 -4
  16. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +12 -10
  17. package/lib/cjs/components/footer/Footer.js +1 -1
  18. package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +5 -13
  19. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +4 -9
  20. package/lib/cjs/components/header/Header.js +1 -1
  21. package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +2 -4
  22. package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +4 -10
  23. package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +2 -4
  24. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +48 -18
  25. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconImageProps.js +2 -4
  26. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  27. package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeStyles/presetThreeLoadingPaneIconImageProps.js +2 -4
  28. package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoStyles/presetTwoLoadingPaneGeneralStyles.js +2 -4
  29. package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoStyles/presetTwoOOOHPaneGeneralStyles.js +2 -4
  30. package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -2
  31. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +5 -4
  32. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
  33. package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +17 -15
  34. package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -4
  35. package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneHeaderContainerStyles.js +2 -4
  36. package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +14 -12
  37. package/lib/cjs/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneIconStyles.js +2 -4
  38. package/lib/cjs/index.js +134 -0
  39. package/lib/cjs/services/BroadcastService.js +31 -7
  40. package/lib/esm/assets/Icons.js +21 -0
  41. package/lib/esm/common/Constants.js +9 -4
  42. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +33 -3
  43. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +6 -10
  44. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
  45. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +4 -16
  46. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +33 -3
  47. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/componentOverrideProps.js +2 -2
  48. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +4 -6
  49. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultStyles/defaultIncomingCallStyleProps.js +8 -8
  50. package/lib/esm/components/chatbutton/ChatButton.js +37 -26
  51. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
  52. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonIconContainerStyles.js +2 -2
  53. package/lib/esm/components/common/commandbutton/CommandButton.js +5 -4
  54. package/lib/esm/components/confirmationpane/ConfirmationPane.js +12 -10
  55. package/lib/esm/components/footer/Footer.js +1 -1
  56. package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +5 -8
  57. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +4 -9
  58. package/lib/esm/components/header/Header.js +1 -1
  59. package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +2 -2
  60. package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +4 -6
  61. package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +2 -2
  62. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +48 -18
  63. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconImageProps.js +2 -2
  64. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
  65. package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeStyles/presetThreeLoadingPaneIconImageProps.js +2 -2
  66. package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoStyles/presetTwoLoadingPaneGeneralStyles.js +2 -2
  67. package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoStyles/presetTwoOOOHPaneGeneralStyles.js +2 -2
  68. package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -2
  69. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +5 -4
  70. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
  71. package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +17 -15
  72. package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -2
  73. package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneHeaderContainerStyles.js +2 -2
  74. package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +14 -12
  75. package/lib/esm/components/reconnectchatpane/common/default/defaultStyles/defaultReconnectChatPaneIconStyles.js +2 -2
  76. package/lib/esm/index.js +3 -1
  77. package/lib/esm/services/BroadcastService.js +29 -7
  78. package/lib/types/assets/Icons.d.ts +21 -0
  79. package/lib/types/common/Constants.d.ts +7 -1
  80. package/lib/types/components/callingcontainer/subcomponents/CurrentCall/interfaces/ICurrentCallStyleProps.d.ts +0 -4
  81. package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
  82. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +1 -0
  83. package/lib/types/index.d.ts +2 -0
  84. package/lib/types/services/BroadcastService.d.ts +1 -0
  85. package/package.json +5 -10
  86. package/lib/cjs/assets/assets.d.js +0 -1
  87. package/lib/cjs/assets/imgs/ChatBubble.svg +0 -28
  88. package/lib/cjs/assets/imgs/ChatReconnectPopupIcon.png +0 -0
  89. package/lib/cjs/assets/imgs/Proactive_banner.png +0 -0
  90. package/lib/cjs/assets/imgs/agent.png +0 -0
  91. package/lib/cjs/assets/imgs/callacceptbutton.svg +0 -3
  92. package/lib/cjs/assets/imgs/callrejectbutton.svg +0 -3
  93. package/lib/cjs/assets/imgs/chat.svg +0 -47
  94. package/lib/cjs/assets/imgs/chatIcon.svg +0 -16
  95. package/lib/cjs/assets/imgs/closeButton.svg +0 -3
  96. package/lib/cjs/assets/imgs/closeChatButton.svg +0 -3
  97. package/lib/cjs/assets/imgs/error.svg +0 -3
  98. package/lib/cjs/assets/imgs/lcwAudioOff.svg +0 -3
  99. package/lib/cjs/assets/imgs/lcwAudioOn.svg +0 -3
  100. package/lib/cjs/assets/imgs/loading.gif +0 -0
  101. package/lib/cjs/assets/imgs/minimizeChatButton.svg +0 -3
  102. package/lib/cjs/assets/imgs/transcriptDownloadIcon.svg +0 -4
  103. package/lib/cjs/assets/imgs/transcriptEmailIcon.svg +0 -5
  104. package/lib/cjs/assets/imgs/videocallacceptbutton.svg +0 -3
  105. package/lib/cjs/assets/imgs/videooff.svg +0 -3
  106. package/lib/cjs/assets/imgs/videoon.svg +0 -3
  107. package/lib/cjs/assets/imgs/voiceoff.svg +0 -3
  108. package/lib/cjs/assets/imgs/voiceon.svg +0 -3
  109. package/lib/esm/assets/assets.d.js +0 -0
  110. package/lib/esm/assets/imgs/ChatBubble.svg +0 -28
  111. package/lib/esm/assets/imgs/ChatReconnectPopupIcon.png +0 -0
  112. package/lib/esm/assets/imgs/Proactive_banner.png +0 -0
  113. package/lib/esm/assets/imgs/agent.png +0 -0
  114. package/lib/esm/assets/imgs/callacceptbutton.svg +0 -3
  115. package/lib/esm/assets/imgs/callrejectbutton.svg +0 -3
  116. package/lib/esm/assets/imgs/chat.svg +0 -47
  117. package/lib/esm/assets/imgs/chatIcon.svg +0 -16
  118. package/lib/esm/assets/imgs/closeButton.svg +0 -3
  119. package/lib/esm/assets/imgs/closeChatButton.svg +0 -3
  120. package/lib/esm/assets/imgs/error.svg +0 -3
  121. package/lib/esm/assets/imgs/lcwAudioOff.svg +0 -3
  122. package/lib/esm/assets/imgs/lcwAudioOn.svg +0 -3
  123. package/lib/esm/assets/imgs/loading.gif +0 -0
  124. package/lib/esm/assets/imgs/minimizeChatButton.svg +0 -3
  125. package/lib/esm/assets/imgs/transcriptDownloadIcon.svg +0 -4
  126. package/lib/esm/assets/imgs/transcriptEmailIcon.svg +0 -5
  127. package/lib/esm/assets/imgs/videocallacceptbutton.svg +0 -3
  128. package/lib/esm/assets/imgs/videooff.svg +0 -3
  129. package/lib/esm/assets/imgs/videoon.svg +0 -3
  130. package/lib/esm/assets/imgs/voiceoff.svg +0 -3
  131. package/lib/esm/assets/imgs/voiceon.svg +0 -3
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
- 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); }
28
+ 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); }
29
29
 
30
30
  function IncomingCall(props) {
31
31
  var _props$controlProps, _defaultIncomingCallP, _props$controlProps2, _props$controlProps2$, _defaultIncomingCallP2, _defaultIncomingCallP3, _props$controlProps3, _props$controlProps3$, _defaultIncomingCallP4, _defaultIncomingCallP5, _props$controlProps4, _props$controlProps4$, _defaultIncomingCallP6, _defaultIncomingCallP7, _defaultIncomingCallP8, _props$styleProps, _props$controlProps5, _props$controlProps5$, _defaultIncomingCallP9, _defaultIncomingCallP10, _props$controlProps6, _props$controlProps6$, _defaultIncomingCallP11, _defaultIncomingCallP12, _props$controlProps7, _props$controlProps7$, _defaultIncomingCallP13, _defaultIncomingCallP14, _defaultIncomingCallP15, _props$controlProps8, _defaultIncomingCallP16, _props$controlProps9, _defaultIncomingCallP17, _props$controlProps10, _defaultIncomingCallP18, _props$controlProps11, _defaultIncomingCallP19, _props$styleProps2, _defaultIncomingCallP20, _props$styleProps3, _defaultIncomingCallP21, _props$styleProps4, _defaultIncomingCallP22, _props$styleProps5, _defaultIncomingCallP23, _props$styleProps6, _defaultIncomingCallP24, _props$styleProps7, _defaultIncomingCallP25, _props$styleProps8, _defaultIncomingCallP26, _props$styleProps9, _props$styleProps10, _props$controlProps18, _defaultIncomingCallP27, _props$controlProps19, _props$componentOverr, _props$controlProps20, _props$controlProps21, _props$controlProps22, _props$controlProps23, _props$controlProps24, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$controlProps28;
@@ -102,6 +102,36 @@ function IncomingCall(props) {
102
102
  (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioCallClick();
103
103
  }
104
104
  }, []);
105
+ (0, React.useEffect)(() => {
106
+ const declineCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.DeclineCallHotKey;
107
+
108
+ const acceptAudioCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.AcceptAudioCallHotKey;
109
+
110
+ const acceptVideoCallShortcut = e => e.ctrlKey && e.shiftKey && e.key === _Constants.KeyCodes.AcceptVideoCallHotKey;
111
+
112
+ const shortcutKeysHandler = e => {
113
+ if (declineCallShortcut(e)) {
114
+ handleDeclineCallClick();
115
+ } else if (acceptAudioCallShortcut(e)) {
116
+ handleAudioCallClick();
117
+ } else if (acceptVideoCallShortcut(e)) {
118
+ handleVideoCallClick();
119
+ }
120
+ };
121
+
122
+ const ignoreDefault = e => {
123
+ if (declineCallShortcut(e) || acceptAudioCallShortcut(e) || acceptVideoCallShortcut(e)) {
124
+ e.preventDefault();
125
+ }
126
+ };
127
+
128
+ window.addEventListener("keyup", shortcutKeysHandler);
129
+ window.addEventListener("keydown", ignoreDefault);
130
+ return () => {
131
+ window.removeEventListener("keyup", shortcutKeysHandler);
132
+ window.removeEventListener("keydown", ignoreDefault);
133
+ };
134
+ }, []);
105
135
  return /*#__PURE__*/React.createElement(_react2.Stack, {
106
136
  horizontal: true,
107
137
  className: (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.className,
@@ -9,9 +9,7 @@ var React = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _react2 = require("@fluentui/react");
11
11
 
12
- var _agent = _interopRequireDefault(require("../../../../../../assets/imgs/agent.png"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ var _Icons = require("../../../../../../assets/Icons");
15
13
 
16
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
15
 
@@ -51,7 +49,7 @@ const componentOverrideProps = {
51
49
  incomingCallTitle: /*#__PURE__*/React.createElement(_react2.Stack, {
52
50
  horizontal: true
53
51
  }, /*#__PURE__*/React.createElement(_react2.Image, {
54
- src: _agent.default,
52
+ src: _Icons.AgentIconBase64,
55
53
  styles: agentImageStyles
56
54
  }), /*#__PURE__*/React.createElement(_react2.Stack, {
57
55
  verticalAlign: "center",
@@ -5,13 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultIncomingCallControlPropsRtl = void 0;
7
7
 
8
- var _callrejectbutton = _interopRequireDefault(require("../../../../../../assets/imgs/callrejectbutton.svg"));
9
-
10
- var _callacceptbutton = _interopRequireDefault(require("../../../../../../assets/imgs/callacceptbutton.svg"));
11
-
12
- var _videocallacceptbutton = _interopRequireDefault(require("../../../../../../assets/imgs/videocallacceptbutton.svg"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../../../assets/Icons");
15
9
 
16
10
  const defaultIncomingCallControlPropsRtl = {
17
11
  id: "incomingCallPopup",
@@ -47,7 +41,7 @@ const defaultIncomingCallControlPropsRtl = {
47
41
  type: "icon",
48
42
  ariaLabel: "Decline Call",
49
43
  imageIconProps: {
50
- src: _callrejectbutton.default,
44
+ src: _Icons.CallRejectButtonBase64,
51
45
  styles: {
52
46
  image: {
53
47
  height: "18px",
@@ -62,7 +56,7 @@ const defaultIncomingCallControlPropsRtl = {
62
56
  type: "icon",
63
57
  ariaLabel: "Audio Call",
64
58
  imageIconProps: {
65
- src: _callacceptbutton.default,
59
+ src: _Icons.CallAcceptButtonBase64,
66
60
  styles: {
67
61
  image: {
68
62
  height: "18px",
@@ -77,7 +71,7 @@ const defaultIncomingCallControlPropsRtl = {
77
71
  type: "icon",
78
72
  ariaLabel: "Video Call",
79
73
  imageIconProps: {
80
- src: _videocallacceptbutton.default,
74
+ src: _Icons.VideoCallAcceptButtonIconBase64,
81
75
  styles: {
82
76
  image: {
83
77
  height: "18px",
@@ -12,8 +12,8 @@ const defaultIncomingCallStyleProps = {
12
12
  },
13
13
  audioCallButtonStyleProps: {
14
14
  borderRadius: "50%",
15
- color: "white",
16
- backgroundColor: "green",
15
+ color: "#FFFFFF",
16
+ backgroundColor: "#008000",
17
17
  lineHeight: "40px",
18
18
  height: "40px",
19
19
  width: "40px",
@@ -24,8 +24,8 @@ const defaultIncomingCallStyleProps = {
24
24
  },
25
25
  videoCallButtonStyleProps: {
26
26
  borderRadius: "50%",
27
- color: "white",
28
- backgroundColor: "green",
27
+ color: "#FFFFFF",
28
+ backgroundColor: "#008000",
29
29
  lineHeight: "40px",
30
30
  height: "40px",
31
31
  width: "40px",
@@ -40,8 +40,8 @@ const defaultIncomingCallStyleProps = {
40
40
  },
41
41
  declineCallButtonStyleProps: {
42
42
  borderRadius: "50%",
43
- color: "white",
44
- backgroundColor: "red",
43
+ color: "#FFFFFF",
44
+ backgroundColor: "#DC0000",
45
45
  lineHeight: "40px",
46
46
  height: "40px",
47
47
  width: "40px",
@@ -50,12 +50,12 @@ const defaultIncomingCallStyleProps = {
50
50
  },
51
51
  incomingCallTitleStyleProps: {
52
52
  margin: "0 5px",
53
- color: "white",
53
+ color: "#FFFFFF",
54
54
  fontSize: 12,
55
55
  fontFamily: "Segoe UI, Arial, sans-serif"
56
56
  },
57
57
  itemFocusStyleProps: {
58
- outline: "2px solid white"
58
+ outline: "2px solid #FFFFFF"
59
59
  }
60
60
  };
61
61
  exports.defaultIncomingCallStyleProps = defaultIncomingCallStyleProps;
@@ -34,17 +34,28 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
34
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
35
 
36
36
  function NotificationBubble(props, parentId) {
37
- var _props$styleProps, _props$controlProps, _props$componentOverr, _props$styleProps2, _props$styleProps2$cl;
37
+ var _props$styleProps, _props$controlProps;
38
38
 
39
39
  const notificationBubbleStyles = {
40
40
  root: Object.assign({}, _defaultChatButtonNotificationBubbleStyles.defaultChatButtonNotificationBubbleStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.notificationBubbleStyleProps)
41
41
  };
42
42
  const unreadMessageCount = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.unreadMessageCount) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.unreadMessageCount);
43
- return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
44
- styles: notificationBubbleStyles,
45
- 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,
46
- id: parentId + "-notification-bubble"
47
- }, unreadMessageCount);
43
+
44
+ if (unreadMessageCount !== "0") {
45
+ var _props$componentOverr, _props$controlProps2, _props$controlProps3, _props$styleProps2, _props$styleProps2$cl, _props$controlProps4, _props$controlProps5;
46
+
47
+ return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
48
+ "aria-live": "polite",
49
+ styles: notificationBubbleStyles,
50
+ "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.defaultChatButtonControlProps.ariaLabelUnreadMessageString,
51
+ 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,
52
+ id: parentId + "-notification-bubble"
53
+ }, unreadMessageCount, /*#__PURE__*/_react2.default.createElement("span", {
54
+ style: _Constants.HiddenTextStyles
55
+ }, (_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.defaultChatButtonControlProps.unreadMessageString));
56
+ }
57
+
58
+ return null;
48
59
  }
49
60
 
50
61
  function IconContainer(props, parentId) {
@@ -61,7 +72,7 @@ function IconContainer(props, parentId) {
61
72
  }
62
73
 
63
74
  function TextContainer(props, parentId) {
64
- var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$componentOverr3, _props$styleProps8, _props$styleProps8$cl, _props$componentOverr4, _props$styleProps9, _props$styleProps9$cl, _props$componentOverr5, _props$styleProps10, _props$styleProps10$c;
75
+ 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;
65
76
 
66
77
  const textContainerStyles = {
67
78
  root: Object.assign({}, _defaultChatButtonTextContainerStyles.defaultChatButtonTextContainerStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.textContainerStyleProps)
@@ -72,12 +83,12 @@ function TextContainer(props, parentId) {
72
83
  const subtitleStyles = {
73
84
  root: Object.assign({}, _defaultChatButtonSubTitleStyles.defaultChatButtonSubTitleStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.subtitleStyleProps)
74
85
  };
75
- const hideChatTitle = ((_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.hideChatTitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTitle);
76
- const hideChatSubtitle = ((_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.hideChatSubtitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatSubtitle);
77
- const titleDir = ((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
78
- const titleText = ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.titleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.titleText);
79
- const subtitleDir = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
80
- const subtitleText = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.subtitleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.subtitleText);
86
+ const hideChatTitle = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.hideChatTitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTitle);
87
+ const hideChatSubtitle = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.hideChatSubtitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatSubtitle);
88
+ const titleDir = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
89
+ const titleText = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.titleText);
90
+ const subtitleDir = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
91
+ const subtitleText = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.subtitleText);
81
92
  return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.textContainer) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
82
93
  styles: textContainerStyles,
83
94
  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,
@@ -98,23 +109,23 @@ function TextContainer(props, parentId) {
98
109
  }
99
110
 
100
111
  function ChatButton(props) {
101
- var _props$controlProps8, _props$controlProps9, _props$controlProps10, _props$controlProps11, _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$styleProps11;
102
-
103
- const elementId = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.id) ?? "lcw-components-chat-button";
104
- const defaultAriaLabel = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.ariaLabel) ?? "live chat button";
105
- const defaultRole = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.role) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.role);
106
- const containersDir = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
107
- const hideChatButton = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.hideChatButton) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatButton);
108
- const hideChatIcon = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.hideChatIcon) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatIcon);
109
- const hideChatTextContainer = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.hideChatTextContainer) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTextContainer);
110
- const hideNotificationBubble = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.hideNotificationBubble) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideNotificationBubble);
112
+ var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
113
+
114
+ const elementId = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.id) ?? "lcw-components-chat-button";
115
+ const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? "live chat button";
116
+ const defaultRole = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.role) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.role);
117
+ const containersDir = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
118
+ const hideChatButton = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideChatButton) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatButton);
119
+ const hideChatIcon = ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.hideChatIcon) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatIcon);
120
+ const hideChatTextContainer = ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.hideChatTextContainer) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTextContainer);
121
+ const hideNotificationBubble = ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.hideNotificationBubble) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideNotificationBubble);
111
122
  const chatButtonGroupStyles = {
112
123
  root: Object.assign({}, _defaultChatButtonGeneralStyles.defaultChatButtonGeneralStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.generalStyleProps)
113
124
  };
114
125
  const handleInitiateChatClick = (0, _react2.useCallback)(() => {
115
- var _props$controlProps16;
126
+ var _props$controlProps20;
116
127
 
117
- if ((_props$controlProps16 = props.controlProps) !== null && _props$controlProps16 !== void 0 && _props$controlProps16.onClick) {
128
+ if ((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.onClick) {
118
129
  const customEvent = {
119
130
  elementType: _Constants.ElementType.ChatButton,
120
131
  elementId: elementId,
@@ -143,7 +154,7 @@ function ChatButton(props) {
143
154
  onClick: handleInitiateChatClick,
144
155
  onKeyDown: handleInputKeyDown,
145
156
  "aria-label": defaultAriaLabel
146
- }, !hideChatIcon && IconContainer(props, elementId), !hideChatTextContainer && TextContainer(props, elementId), !hideNotificationBubble && NotificationBubble(props, elementId)));
157
+ }, !hideChatIcon && IconContainer(props, elementId), !hideNotificationBubble && NotificationBubble(props, elementId), !hideChatTextContainer && TextContainer(props, elementId)));
147
158
  }
148
159
 
149
160
  var _default = ChatButton;
@@ -20,6 +20,9 @@ const defaultChatButtonControlProps = {
20
20
  hideChatTextContainer: false,
21
21
  hideChatSubtitle: false,
22
22
  hideChatTitle: false,
23
- hideNotificationBubble: true
23
+ hideNotificationBubble: true,
24
+ unreadMessageString: "new messages",
25
+ largeUnreadMessageString: "99+",
26
+ ariaLabelUnreadMessageString: "you have new messages"
24
27
  };
25
28
  exports.defaultChatButtonControlProps = defaultChatButtonControlProps;
@@ -5,14 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultChatButtonIconContainerStyles = void 0;
7
7
 
8
- var _chat = _interopRequireDefault(require("../../../../assets/imgs/chat.svg"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../assets/Icons");
11
9
 
12
10
  const defaultChatButtonIconContainerStyles = {
13
11
  align: "center",
14
12
  backgroundColor: "#315FA2",
15
- backgroundImage: `url(${_chat.default})`,
13
+ backgroundImage: `url(${_Icons.ModernChatIconBase64})`,
16
14
  backgroundPosition: "center",
17
15
  backgroundRepeat: "no-repeat",
18
16
  backgroundSize: "65% 65%",
@@ -27,10 +27,11 @@ function CommandButton(props) {
27
27
  root: props.styles
28
28
  }
29
29
  };
30
- const iconButtonStyles = {
30
+ const buttonStyles = {
31
31
  root: props.styles,
32
32
  rootHovered: props.hoverStyles,
33
- rootFocused: props.focusStyles
33
+ rootFocused: props.focusStyles,
34
+ rootPressed: props.hoverStyles
34
35
  };
35
36
  const handleOnClick = (0, _react2.useCallback)(() => {
36
37
  if (props !== null && props !== void 0 && props.onClick) {
@@ -52,14 +53,14 @@ function CommandButton(props) {
52
53
  onClick: handleOnClick,
53
54
  disabled: props.disabled,
54
55
  className: props.className,
55
- styles: iconButtonStyles
56
+ styles: buttonStyles
56
57
  }), props.type === "icon" && /*#__PURE__*/_react2.default.createElement(_react.IconButton, {
57
58
  id: props.id,
58
59
  iconProps: iconProp,
59
60
  title: props.ariaLabel,
60
61
  ariaLabel: props.ariaLabel,
61
62
  disabled: props.disabled,
62
- styles: iconButtonStyles,
63
+ styles: buttonStyles,
63
64
  onClick: handleOnClick,
64
65
  className: props.className
65
66
  }));
@@ -44,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
44
44
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
45
45
 
46
46
  function ConfirmationPane(props) {
47
- var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$styleProps11, _props$styleProps11$c, _props$controlProps9, _props$controlProps10, _props$componentOverr2, _props$styleProps12, _props$styleProps12$c, _props$controlProps11, _props$styleProps13, _props$styleProps13$c, _props$controlProps12, _props$componentOverr3, _props$styleProps14, _props$styleProps14$c, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$componentOverr4, _props$styleProps15, _props$styleProps15$c, _props$controlProps16, _props$controlProps17;
47
+ 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$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$styleProps13, _props$styleProps13$c, _props$controlProps9, _props$controlProps10, _props$componentOverr2, _props$styleProps14, _props$styleProps14$c, _props$controlProps11, _props$styleProps15, _props$styleProps15$c, _props$controlProps12, _props$componentOverr3, _props$styleProps16, _props$styleProps16$c, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$componentOverr4, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17;
48
48
 
49
49
  const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.id;
50
50
  const handleConfirmClick = (0, _react2.useCallback)(() => {
@@ -96,12 +96,14 @@ function ConfirmationPane(props) {
96
96
  const confirmButtonStyles = {
97
97
  root: Object.assign({}, _defaultConfirmationPaneConfirmButtonStyles.defaultConfirmationPaneConfirmButtonStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.confirmButtonStyleProps),
98
98
  rootHovered: Object.assign({}, _defaultConfirmationPaneConfirmButtonHoveredStyles.defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.confirmButtonHoveredStyleProps),
99
- rootFocused: Object.assign({}, _defaultConfirmationPaneConfirmButtonFocusedStyles.defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps)
99
+ rootFocused: Object.assign({}, _defaultConfirmationPaneConfirmButtonFocusedStyles.defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps),
100
+ rootPressed: Object.assign({}, _defaultConfirmationPaneConfirmButtonHoveredStyles.defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.confirmButtonHoveredStyleProps)
100
101
  };
101
102
  const cancelButtonStyles = {
102
- root: Object.assign({}, _defaultConfirmationPaneCancelButtonStyles.defaultConfirmationPaneCancelButtonStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.cancelButtonStyleProps),
103
- rootHovered: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.cancelButtonHoveredStyleProps),
104
- rootFocused: Object.assign({}, _defaultConfirmationPaneCancelButtonFocusedStyles.defaultConfirmationPaneCancelButtonFocusedStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.cancelButtonFocusedStyleProps)
103
+ root: Object.assign({}, _defaultConfirmationPaneCancelButtonStyles.defaultConfirmationPaneCancelButtonStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.cancelButtonStyleProps),
104
+ rootHovered: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.cancelButtonHoveredStyleProps),
105
+ rootFocused: Object.assign({}, _defaultConfirmationPaneCancelButtonFocusedStyles.defaultConfirmationPaneCancelButtonFocusedStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.cancelButtonFocusedStyleProps),
106
+ rootPressed: Object.assign({}, _defaultConfirmationPaneCancelButtonHoveredStyles.defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.cancelButtonHoveredStyleProps)
105
107
  };
106
108
  return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
107
109
  id: elementId,
@@ -112,29 +114,29 @@ function ConfirmationPane(props) {
112
114
  "aria-labelledby": elementId + "-title",
113
115
  "aria-describedby": elementId + "-subtitle"
114
116
  }, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
115
- 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.titleClassName,
117
+ 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,
116
118
  styles: titleStyles,
117
119
  tabIndex: -1,
118
120
  id: elementId + "-title"
119
121
  }, ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.titleText)), !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideSubtitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/_react2.default.createElement(_react.Label, {
120
- 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.subtitleClassName,
122
+ 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,
121
123
  styles: subtitleStyles,
122
124
  tabIndex: -1,
123
125
  id: elementId + "-subtitle"
124
126
  }, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.subtitleText)), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
125
127
  horizontal: true,
126
- 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.buttonGroupClassName,
128
+ 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.buttonGroupClassName,
127
129
  styles: buttonGroupStyles,
128
130
  id: elementId + "-buttongroup"
129
131
  }, !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideConfirmButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.confirmButton) || /*#__PURE__*/_react2.default.createElement(_Button.PrimaryButton, {
130
- 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.confirmButtonClassName,
132
+ 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.confirmButtonClassName,
131
133
  styles: confirmButtonStyles,
132
134
  text: ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.confirmButtonText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.confirmButtonText,
133
135
  onClick: handleConfirmClick,
134
136
  id: elementId + "-confirmbutton",
135
137
  ariaLabel: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.confirmButtonAriaLabel) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.confirmButtonAriaLabel
136
138
  })), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideCancelButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.cancelButton) || /*#__PURE__*/_react2.default.createElement(_Button.DefaultButton, {
137
- 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.cancelButtonClassName,
139
+ 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.cancelButtonClassName,
138
140
  styles: cancelButtonStyles,
139
141
  text: ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.cancelButtonText) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.cancelButtonText,
140
142
  onClick: handleCancelClick,
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
- 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); }
30
+ 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); }
31
31
 
32
32
  (0, _react2.initializeIcons)();
33
33
 
@@ -5,15 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.customFooterControlProps = void 0;
7
7
 
8
- var _lcwAudioOff = _interopRequireDefault(require("../../../../assets/imgs/lcwAudioOff.svg"));
9
-
10
- var _lcwAudioOn = _interopRequireDefault(require("../../../../assets/imgs/lcwAudioOn.svg"));
11
-
12
- var _transcriptDownloadIcon = _interopRequireDefault(require("../../../../assets/imgs/transcriptDownloadIcon.svg"));
13
-
14
- var _transcriptEmailIcon = _interopRequireDefault(require("../../../../assets/imgs/transcriptEmailIcon.svg"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../assets/Icons");
17
9
 
18
10
  const customFooterControlProps = {
19
11
  id: "oc-lcw-footer",
@@ -42,7 +34,7 @@ const customFooterControlProps = {
42
34
  id: "oc-lcw-footer-downloadtranscript-button",
43
35
  type: "icon",
44
36
  imageIconProps: {
45
- src: _transcriptDownloadIcon.default
37
+ src: _Icons.TranscriptDownloadIconBase64
46
38
  },
47
39
  ariaLabel: "Download chat transcript"
48
40
  },
@@ -50,7 +42,7 @@ const customFooterControlProps = {
50
42
  id: "oc-lcw-footer-emailtranscript-button",
51
43
  type: "icon",
52
44
  imageIconProps: {
53
- src: _transcriptEmailIcon.default
45
+ src: _Icons.TranscriptEmailIconBase64
54
46
  },
55
47
  ariaLabel: "Email Transcript"
56
48
  },
@@ -59,10 +51,10 @@ const customFooterControlProps = {
59
51
  ariaLabel: "Turn sound off",
60
52
  toggleAriaLabel: "Turn sound on",
61
53
  imageIconProps: {
62
- src: _lcwAudioOn.default
54
+ src: _Icons.AudioNotificationOnIconBase64
63
55
  },
64
56
  imageToggleIconProps: {
65
- src: _lcwAudioOff.default
57
+ src: _Icons.AudioNotificationOffIconBase64
66
58
  }
67
59
  }
68
60
  };
@@ -25,24 +25,19 @@ function AudioNotificationButton(props) {
25
25
  const iconButtonStyles = {
26
26
  root: props === null || props === void 0 ? void 0 : props.styles,
27
27
  rootHovered: props === null || props === void 0 ? void 0 : props.hoverStyles,
28
- rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles
28
+ rootFocused: props === null || props === void 0 ? void 0 : props.focusStyles,
29
+ rootPressed: props === null || props === void 0 ? void 0 : props.hoverStyles
29
30
  }; //imageIconProps > iconName
30
31
 
31
32
  const volume0Icon = props.imageToggleIconProps ? {
32
33
  imageProps: props === null || props === void 0 ? void 0 : props.imageToggleIconProps
33
34
  } : {
34
- iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0",
35
- styles: {
36
- root: props.styles
37
- }
35
+ iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0"
38
36
  };
39
37
  const volume3Icon = props.imageIconProps ? {
40
38
  imageProps: props === null || props === void 0 ? void 0 : props.imageIconProps
41
39
  } : {
42
- iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3",
43
- styles: {
44
- root: props.styles
45
- }
40
+ iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3"
46
41
  };
47
42
  const handleOnClick = (0, _react2.useCallback)(() => {
48
43
  setMuted(!muted);
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
- 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); }
28
+ 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); }
29
29
 
30
30
  (0, _react2.initializeIcons)();
31
31
 
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.azureHeaderControlProps = void 0;
7
7
 
8
- var _chatIcon = _interopRequireDefault(require("../../../../assets/imgs/chatIcon.svg"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../assets/Icons");
11
9
 
12
10
  const azureHeaderControlProps = {
13
11
  id: "oc-lcw-header",
@@ -41,7 +39,7 @@ const azureHeaderControlProps = {
41
39
  },
42
40
  headerIconProps: {
43
41
  id: "oc-lcw-header-icon",
44
- src: _chatIcon.default,
42
+ src: _Icons.LegacyChatIconBase64,
45
43
  alt: "Chat Icon"
46
44
  },
47
45
  headerTitleProps: {
@@ -5,13 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.customHeaderControlProps = void 0;
7
7
 
8
- var _chatIcon = _interopRequireDefault(require("../../../../assets/imgs/chatIcon.svg"));
9
-
10
- var _closeChatButton = _interopRequireDefault(require("../../../../assets/imgs/closeChatButton.svg"));
11
-
12
- var _minimizeChatButton = _interopRequireDefault(require("../../../../assets/imgs/minimizeChatButton.svg"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../assets/Icons");
15
9
 
16
10
  const customHeaderControlProps = {
17
11
  id: "oc-lcw-header",
@@ -38,7 +32,7 @@ const customHeaderControlProps = {
38
32
  id: "oc-lcw-header-minimizebutton",
39
33
  type: "icon",
40
34
  imageIconProps: {
41
- src: _minimizeChatButton.default,
35
+ src: _Icons.MinimizeChatButtonIconBase64,
42
36
  styles: {
43
37
  image: {
44
38
  height: "16px",
@@ -51,7 +45,7 @@ const customHeaderControlProps = {
51
45
  id: "oc-lcw-header-closebutton",
52
46
  type: "icon",
53
47
  imageIconProps: {
54
- src: _closeChatButton.default,
48
+ src: _Icons.CloseChatButtonIconBase64,
55
49
  styles: {
56
50
  image: {
57
51
  height: "16px",
@@ -62,7 +56,7 @@ const customHeaderControlProps = {
62
56
  },
63
57
  headerIconProps: {
64
58
  id: "oc-lcw-header-icon",
65
- src: _chatIcon.default,
59
+ src: _Icons.LegacyChatIconBase64,
66
60
  alt: "Chat Icon"
67
61
  },
68
62
  headerTitleProps: {
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultHeaderControlProps = void 0;
7
7
 
8
- var _chat = _interopRequireDefault(require("../../../../assets/imgs/chat.svg"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ var _Icons = require("../../../../assets/Icons");
11
9
 
12
10
  const defaultHeaderControlProps = {
13
11
  id: "oc-lcw-header",
@@ -42,7 +40,7 @@ const defaultHeaderControlProps = {
42
40
  },
43
41
  headerIconProps: {
44
42
  id: "oc-lcw-header-icon",
45
- src: _chat.default,
43
+ src: _Icons.ModernChatIconBase64,
46
44
  alt: "Chat Icon"
47
45
  },
48
46
  headerTitleProps: {