@microsoft/omnichannel-chat-components 0.1.0-main.fc27009 → 1.0.1-main.118265f

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 (169) hide show
  1. package/lib/cjs/common/Constants.js +26 -8
  2. package/lib/cjs/common/utils.js +21 -2
  3. package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
  4. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
  5. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +26 -23
  6. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +20 -18
  7. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +21 -8
  8. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +22 -19
  9. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +18 -16
  10. package/lib/cjs/components/chatbutton/ChatButton.js +28 -24
  11. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +11 -5
  12. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
  13. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  14. package/lib/cjs/components/common/commandbutton/CommandButton.js +37 -12
  15. package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +8 -7
  16. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +9 -2
  17. package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
  18. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  19. package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  20. package/lib/cjs/components/footer/Footer.js +12 -19
  21. package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
  22. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -14
  23. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
  24. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +31 -14
  25. package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +4 -4
  26. package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +4 -4
  27. package/lib/cjs/components/header/Header.js +7 -5
  28. package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
  29. package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +9 -7
  30. package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
  31. package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +13 -11
  32. package/lib/cjs/components/header/subcomponents/MinimizeButton.js +4 -4
  33. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
  34. package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
  35. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  36. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
  37. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  38. package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  39. package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
  40. package/lib/cjs/components/loadingpane/LoadingPane.js +3 -2
  41. package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
  42. package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
  43. package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  44. package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  45. package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  46. package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
  47. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +7 -2
  48. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
  49. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
  50. package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  51. package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  52. package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  53. package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
  54. package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  55. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +25 -11
  56. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +5 -1
  57. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
  58. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
  59. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
  60. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
  61. package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  62. package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  63. package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  64. package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
  65. package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +15 -8
  66. package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
  67. package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +15 -8
  68. package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +15 -8
  69. package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
  70. package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
  71. package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
  72. package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
  73. package/lib/cjs/index.js +6 -0
  74. package/lib/cjs/services/BroadcastService.js +36 -8
  75. package/lib/esm/common/Constants.js +18 -6
  76. package/lib/esm/common/utils.js +16 -0
  77. package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
  78. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +8 -8
  79. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
  80. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
  81. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +22 -9
  82. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
  83. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
  84. package/lib/esm/components/chatbutton/ChatButton.js +28 -24
  85. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -5
  86. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
  87. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
  88. package/lib/esm/components/common/commandbutton/CommandButton.js +38 -13
  89. package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +9 -8
  90. package/lib/esm/components/confirmationpane/ConfirmationPane.js +10 -3
  91. package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
  92. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
  93. package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
  94. package/lib/esm/components/footer/Footer.js +11 -19
  95. package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
  96. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -14
  97. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
  98. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +32 -15
  99. package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
  100. package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
  101. package/lib/esm/components/header/Header.js +6 -5
  102. package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
  103. package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +8 -7
  104. package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
  105. package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +12 -11
  106. package/lib/esm/components/header/subcomponents/MinimizeButton.js +5 -5
  107. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
  108. package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
  109. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
  110. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
  111. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
  112. package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
  113. package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
  114. package/lib/esm/components/loadingpane/LoadingPane.js +3 -2
  115. package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
  116. package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
  117. package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  118. package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  119. package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  120. package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
  121. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
  122. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
  123. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
  124. package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  125. package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  126. package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
  127. package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
  128. package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  129. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +26 -12
  130. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +3 -1
  131. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
  132. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
  133. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
  134. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
  135. package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  136. package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  137. package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
  138. package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
  139. package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +13 -8
  140. package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
  141. package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +13 -8
  142. package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +13 -8
  143. package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
  144. package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
  145. package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
  146. package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
  147. package/lib/esm/index.js +1 -0
  148. package/lib/esm/services/BroadcastService.js +34 -8
  149. package/lib/types/common/Constants.d.ts +151 -2
  150. package/lib/types/common/utils.d.ts +1 -0
  151. package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
  152. package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
  153. package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
  154. package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
  155. package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
  156. package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
  157. package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
  158. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
  159. package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
  160. package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
  161. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
  162. package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
  163. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +3 -0
  164. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
  165. package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
  166. package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
  167. package/lib/types/index.d.ts +1 -0
  168. package/lib/types/services/BroadcastService.d.ts +1 -0
  169. package/package.json +2 -2
@@ -1,17 +1,18 @@
1
+ import { AriaLabels, Ids, Texts } from "../../../../common/Constants";
1
2
  export const defaultConfirmationPaneControlProps = {
2
- id: "lcw-components-confirmation-pane",
3
+ id: Ids.DefaultConfirmationPaneId,
3
4
  dir: "ltr",
4
5
  hideConfirmationPane: false,
5
6
  hideTitle: false,
6
- titleText: "Close chat",
7
+ titleText: Texts.ConfirmationPaneTitle,
7
8
  hideSubtitle: false,
8
- subtitleText: "Do you really want to close this chat?",
9
+ subtitleText: Texts.ConfirmationPaneSubtitle,
9
10
  hideConfirmButton: false,
10
- confirmButtonText: "Close",
11
- confirmButtonAriaLabel: "Close Chat",
11
+ confirmButtonText: Texts.ConfirmButtonText,
12
+ confirmButtonAriaLabel: AriaLabels.ConfirmationPaneConfirm,
12
13
  hideCancelButton: false,
13
- cancelButtonText: "Cancel",
14
- cancelButtonAriaLabel: "Cancel. Return to Chat",
14
+ cancelButtonText: Texts.CancelButtonText,
15
+ cancelButtonAriaLabel: AriaLabels.ConfirmationPaneCancel,
15
16
  onConfirm: function () {
16
17
  console.log("on confirm");
17
18
  },
@@ -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";
@@ -8,6 +8,7 @@ import EmailTranscriptButton from "./subcomponents/EmailTranscriptButton";
8
8
  import { decodeComponentString } from "../../common/decodeComponentString";
9
9
  import { defaultFooterProps } from "./common/defaultProps/defaultFooterProps";
10
10
  import { processCustomComponents } from "../../common/utils";
11
+ import { Ids } from "../../common/Constants";
11
12
  initializeIcons();
12
13
 
13
14
  function Footer(props) {
@@ -32,15 +33,13 @@ function Footer(props) {
32
33
  horizontal: true,
33
34
  className: props.className,
34
35
  horizontalAlign: "space-between",
36
+ verticalAlign: "center",
35
37
  styles: stackStyles,
36
38
  dir: ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.dir) ?? "ltr",
37
39
  role: "region"
38
40
  }, /*#__PURE__*/React.createElement(Stack, {
39
41
  horizontal: true,
40
- id: "footerLeftGroup",
41
- verticalAlign: "center"
42
- }, /*#__PURE__*/React.createElement(Stack, {
43
- horizontal: true,
42
+ id: Ids.FooterLeftGroupId,
44
43
  verticalAlign: "center"
45
44
  }, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideDownloadTranscriptButton) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.DownloadTranscriptButton) || /*#__PURE__*/React.createElement(DownloadTranscriptButton, _extends({}, downloadTranscriptButtonProps, {
46
45
  onClick: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.onDownloadTranscriptClick,
@@ -52,27 +51,20 @@ function Footer(props) {
52
51
  styles: emailTranscriptButtonStyles,
53
52
  hoverStyles: emailTranscriptButtonHoverStyles,
54
53
  focusStyles: footerItemFocusStyles
55
- }))), processCustomComponents((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : (_props$controlProps11 = _props$controlProps10.leftGroup) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.children))), /*#__PURE__*/React.createElement(Stack, {
56
- horizontal: true,
57
- id: "footerMiddleGroup"
58
- }, /*#__PURE__*/React.createElement(Stack, {
54
+ }))), processCustomComponents((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : (_props$controlProps11 = _props$controlProps10.leftGroup) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.children)), /*#__PURE__*/React.createElement(Stack, {
59
55
  horizontal: true,
60
- verticalAlign: "start"
61
- }, /*#__PURE__*/React.createElement(Stack.Item, {
62
- align: "start"
63
- }, processCustomComponents((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : (_props$controlProps13 = _props$controlProps12.middleGroup) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.children)))), /*#__PURE__*/React.createElement(Stack, {
64
- horizontal: true,
65
- id: "footerRightGroup",
66
- verticalAlign: "start"
67
- }, /*#__PURE__*/React.createElement(Stack, {
56
+ id: Ids.FooterMiddleGroupId,
57
+ verticalAlign: "center"
58
+ }, processCustomComponents((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : (_props$controlProps13 = _props$controlProps12.middleGroup) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.children)), /*#__PURE__*/React.createElement(Stack, {
68
59
  horizontal: true,
69
- verticalAlign: "start"
60
+ id: Ids.FooterRightGroupId,
61
+ verticalAlign: "center"
70
62
  }, 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
63
  onClick: (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioNotificationClick,
72
64
  styles: audioNotificationButtonStyles,
73
65
  hoverStyles: audioNotificationButtonHoverStyles,
74
66
  focusStyles: footerItemFocusStyles
75
- }))))));
67
+ })))));
76
68
  }
77
69
 
78
70
  export default Footer;
@@ -1,6 +1,7 @@
1
1
  import { AudioNotificationOffIconBase64, AudioNotificationOnIconBase64, TranscriptDownloadIconBase64, TranscriptEmailIconBase64 } from "../../../../assets/Icons";
2
+ import { AriaLabels, ButtonTypes, Ids } from "../../../../common/Constants";
2
3
  export const customFooterControlProps = {
3
- id: "oc-lcw-footer",
4
+ id: Ids.CustomFooterId,
4
5
  hideDownloadTranscriptButton: false,
5
6
  hideEmailTranscriptButton: false,
6
7
  hideAudioNotificationButton: false,
@@ -23,25 +24,25 @@ export const customFooterControlProps = {
23
24
  children: []
24
25
  },
25
26
  downloadTranscriptButtonProps: {
26
- id: "oc-lcw-footer-downloadtranscript-button",
27
- type: "icon",
27
+ id: Ids.DownloadTranscriptButtonId,
28
+ type: ButtonTypes.Icon,
28
29
  imageIconProps: {
29
30
  src: TranscriptDownloadIconBase64
30
31
  },
31
- ariaLabel: "Download chat transcript"
32
+ ariaLabel: AriaLabels.DownloadChatTranscript
32
33
  },
33
34
  emailTranscriptButtonProps: {
34
- id: "oc-lcw-footer-emailtranscript-button",
35
- type: "icon",
35
+ id: Ids.EmailTranscriptButtonId,
36
+ type: ButtonTypes.Icon,
36
37
  imageIconProps: {
37
38
  src: TranscriptEmailIconBase64
38
39
  },
39
- ariaLabel: "Email Transcript"
40
+ ariaLabel: AriaLabels.EmailTranscript
40
41
  },
41
42
  audioNotificationButtonProps: {
42
- id: "oc-lcw-footer-audionotification-button",
43
- ariaLabel: "Turn sound off",
44
- toggleAriaLabel: "Turn sound on",
43
+ id: Ids.AudioNotificationButtonId,
44
+ ariaLabel: AriaLabels.TurnSoundOff,
45
+ toggleAriaLabel: AriaLabels.TurnSoundOn,
45
46
  imageIconProps: {
46
47
  src: AudioNotificationOnIconBase64
47
48
  },
@@ -1,5 +1,6 @@
1
+ import { AriaLabels, ButtonTypes, IconNames, Ids } from "../../../../common/Constants";
1
2
  export const defaultFooterControlProps = {
2
- id: "lcw-components-footer",
3
+ id: Ids.DefaultFooterId,
3
4
  hideDownloadTranscriptButton: false,
4
5
  hideEmailTranscriptButton: false,
5
6
  hideAudioNotificationButton: false,
@@ -22,22 +23,23 @@ export const defaultFooterControlProps = {
22
23
  children: []
23
24
  },
24
25
  downloadTranscriptButtonProps: {
25
- id: "oc-lcw-footer-downloadtranscript-button",
26
- type: "icon",
27
- iconName: "Download",
28
- ariaLabel: "Download chat transcript"
26
+ id: Ids.DownloadTranscriptButtonId,
27
+ type: ButtonTypes.Icon,
28
+ iconName: IconNames.Download,
29
+ ariaLabel: AriaLabels.DownloadChatTranscript
29
30
  },
30
31
  emailTranscriptButtonProps: {
31
- id: "oc-lcw-footer-emailtranscript-button",
32
- type: "icon",
33
- iconName: "Mail",
34
- ariaLabel: "Email Transcript"
32
+ id: Ids.EmailTranscriptButtonId,
33
+ type: ButtonTypes.Icon,
34
+ iconName: IconNames.Mail,
35
+ ariaLabel: AriaLabels.EmailTranscript
35
36
  },
36
37
  audioNotificationButtonProps: {
37
- id: "oc-lcw-footer-audionotification-button",
38
- ariaLabel: "Turn sound off",
39
- toggleAriaLabel: "Turn sound on",
40
- iconName: "Volume3",
41
- toggleIconName: "Volume0"
38
+ id: Ids.AudioNotificationButtonId,
39
+ type: ButtonTypes.Icon,
40
+ ariaLabel: AriaLabels.TurnSoundOff,
41
+ toggleAriaLabel: AriaLabels.TurnSoundOn,
42
+ iconName: IconNames.Volume3,
43
+ toggleIconName: IconNames.Volume0
42
44
  }
43
45
  };
@@ -5,11 +5,13 @@ export const defaultFooterStyleProps = {
5
5
  minHeight: "25px",
6
6
  width: "100%",
7
7
  minWidth: "250px",
8
- padding: "0 10px 5px 10px"
8
+ padding: "5px"
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"
@@ -1,35 +1,52 @@
1
1
  import { IconButton } from "@fluentui/react";
2
2
  import React, { useCallback, useEffect, useState } from "react";
3
3
  import { BroadcastService } from "../../../services/BroadcastService";
4
- import { ElementType } from "../../../common/Constants";
4
+ import { AriaLabels, ButtonTypes, ElementType, EventNames, IconNames } from "../../../common/Constants";
5
5
 
6
6
  function AudioNotificationButton(props) {
7
7
  const {
8
8
  disabled
9
9
  } = props;
10
10
  const [muted, setMuted] = useState(props.isAudioMuted);
11
+ let iconStyles = {};
12
+
13
+ if (props.type === ButtonTypes.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 ? {
19
42
  imageProps: props === null || props === void 0 ? void 0 : props.imageToggleIconProps
20
43
  } : {
21
- iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0",
22
- styles: {
23
- root: props.styles
24
- }
44
+ iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? IconNames.Volume0
25
45
  };
26
46
  const volume3Icon = props.imageIconProps ? {
27
47
  imageProps: props === null || props === void 0 ? void 0 : props.imageIconProps
28
48
  } : {
29
- iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3",
30
- styles: {
31
- root: props.styles
32
- }
49
+ iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? IconNames.Volume3
33
50
  };
34
51
  const handleOnClick = useCallback(() => {
35
52
  setMuted(!muted);
@@ -38,7 +55,7 @@ function AudioNotificationButton(props) {
38
55
  const customEvent = {
39
56
  elementType: ElementType.FooterSoundNotificationButton,
40
57
  elementId: props === null || props === void 0 ? void 0 : props.id,
41
- eventName: "OnClick"
58
+ eventName: EventNames.OnClick
42
59
  };
43
60
  BroadcastService.postMessage(customEvent);
44
61
  props === null || props === void 0 ? void 0 : props.onClick();
@@ -55,7 +72,7 @@ function AudioNotificationButton(props) {
55
72
  disabled: disabled,
56
73
  styles: iconButtonStyles,
57
74
  className: props.className,
58
- title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
75
+ title: muted ? props.toggleAriaLabel ?? AriaLabels.TurnSoundOn : props.ariaLabel ?? AriaLabels.TurnSoundOff
59
76
  });
60
77
  }
61
78
 
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ElementType } from "../../../common/Constants";
2
+ import { AriaLabels, ElementType, EventNames, IconNames, Texts } from "../../../common/Constants";
3
3
  import CommandButton from "../../common/commandbutton/CommandButton";
4
4
 
5
5
  function DownloadTranscriptButton(props) {
@@ -9,19 +9,19 @@ function DownloadTranscriptButton(props) {
9
9
  const customEvent = {
10
10
  elementType: ElementType.FooterDownloadTranscriptButton,
11
11
  elementId: props === null || props === void 0 ? void 0 : props.id,
12
- eventName: "OnClick"
12
+ eventName: EventNames.OnClick
13
13
  };
14
14
  return /*#__PURE__*/React.createElement(CommandButton, {
15
15
  id: props === null || props === void 0 ? void 0 : props.id,
16
16
  type: type,
17
- text: props.text ?? "Download chat transcript",
17
+ text: props.text ?? Texts.DownloadChatTranscriptText,
18
18
  styles: props.styles,
19
19
  hoverStyles: props.hoverStyles,
20
20
  focusStyles: props.focusStyles,
21
- iconName: props.iconName ?? "Download",
21
+ iconName: props.iconName ?? IconNames.Download,
22
22
  imageIconProps: props.imageIconProps,
23
23
  onClick: props.onClick,
24
- ariaLabel: props.ariaLabel ?? "Download chat transcript",
24
+ ariaLabel: props.ariaLabel ?? AriaLabels.DownloadChatTranscript,
25
25
  className: props.className,
26
26
  customEvent: customEvent
27
27
  });
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ElementType } from "../../../common/Constants";
2
+ import { AriaLabels, ElementType, EventNames, IconNames, Texts } from "../../../common/Constants";
3
3
  import CommandButton from "../../common/commandbutton/CommandButton";
4
4
 
5
5
  function EmailTranscriptButton(props) {
@@ -9,19 +9,19 @@ function EmailTranscriptButton(props) {
9
9
  const customEvent = {
10
10
  elementType: ElementType.FooterEmailTranscriptButton,
11
11
  elementId: props === null || props === void 0 ? void 0 : props.id,
12
- eventName: "OnClick"
12
+ eventName: EventNames.OnClick
13
13
  };
14
14
  return /*#__PURE__*/React.createElement(CommandButton, {
15
15
  id: props === null || props === void 0 ? void 0 : props.id,
16
16
  type: type,
17
- text: props.text ?? "Email Transcript",
17
+ text: props.text ?? Texts.EmailTranscriptText,
18
18
  styles: props.styles,
19
19
  hoverStyles: props.hoverStyles,
20
20
  focusStyles: props.focusStyles,
21
- iconName: props.iconName ?? "Mail",
21
+ iconName: props.iconName ?? IconNames.Mail,
22
22
  imageIconProps: props.imageIconProps,
23
23
  onClick: props.onClick,
24
- ariaLabel: props.ariaLabel ?? "Email Transcript",
24
+ ariaLabel: props.ariaLabel ?? AriaLabels.EmailTranscript,
25
25
  className: props.className,
26
26
  customEvent: customEvent
27
27
  });
@@ -1,12 +1,13 @@
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";
9
9
  import { processCustomComponents } from "../../common/utils";
10
+ import { Ids } from "../../common/Constants";
10
11
  initializeIcons();
11
12
 
12
13
  function Header(props) {
@@ -43,7 +44,7 @@ function Header(props) {
43
44
  role: "region"
44
45
  }, /*#__PURE__*/React.createElement(Stack, {
45
46
  horizontal: true,
46
- id: "headerLeftGroup",
47
+ id: Ids.HeaderLeftGroupId,
47
48
  verticalAlign: "center"
48
49
  }, /*#__PURE__*/React.createElement(Stack, {
49
50
  horizontal: true,
@@ -60,7 +61,7 @@ function Header(props) {
60
61
  styles: titleStyles
61
62
  }, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text)))), /*#__PURE__*/React.createElement(Stack, {
62
63
  horizontal: true,
63
- id: "headerMiddleGroup"
64
+ id: Ids.HeaderMiddleGroupId
64
65
  }, /*#__PURE__*/React.createElement(Stack, {
65
66
  horizontal: true,
66
67
  verticalAlign: "start"
@@ -68,7 +69,7 @@ function Header(props) {
68
69
  align: "start"
69
70
  }, processCustomComponents((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : (_props$controlProps11 = _props$controlProps10.middleGroup) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.children)))), /*#__PURE__*/React.createElement(Stack, {
70
71
  horizontal: true,
71
- id: "headerRightGroup",
72
+ id: Ids.HeaderRightGroupId,
72
73
  verticalAlign: "start"
73
74
  }, /*#__PURE__*/React.createElement(Stack, {
74
75
  horizontal: true,
@@ -1,6 +1,7 @@
1
1
  import { LegacyChatIconBase64 } from "../../../../assets/Icons";
2
+ import { ButtonTypes, Ids, Texts } from "../../../../common/Constants";
2
3
  export const azureHeaderControlProps = {
3
- id: "oc-lcw-header",
4
+ id: Ids.DefaultHeaderId,
4
5
  hideIcon: false,
5
6
  hideTitle: true,
6
7
  hideCloseButton: false,
@@ -22,20 +23,20 @@ export const azureHeaderControlProps = {
22
23
  },
23
24
  minimizeButtonProps: {
24
25
  id: "oc-lcw-header-minimizebutton",
25
- type: "icon"
26
+ type: ButtonTypes.Icon
26
27
  },
27
28
  closeButtonProps: {
28
29
  id: "oc-lcw-header-closebutton",
29
- type: "text",
30
+ type: ButtonTypes.Text,
30
31
  text: "End Chat"
31
32
  },
32
33
  headerIconProps: {
33
- id: "oc-lcw-header-icon",
34
+ id: Ids.HeaderIconId,
34
35
  src: LegacyChatIconBase64,
35
- alt: "Chat Icon"
36
+ alt: Texts.HeaderIcon
36
37
  },
37
38
  headerTitleProps: {
38
- id: "oc-lcw-header-title",
39
+ id: Ids.HeaderTitleId,
39
40
  text: "Azure Chat Support"
40
41
  }
41
42
  };
@@ -1,6 +1,7 @@
1
1
  import { CloseChatButtonIconBase64, LegacyChatIconBase64, MinimizeChatButtonIconBase64 } from "../../../../assets/Icons";
2
+ import { ButtonTypes, Ids, Texts } from "../../../../common/Constants";
2
3
  export const customHeaderControlProps = {
3
- id: "oc-lcw-header",
4
+ id: Ids.DefaultHeaderId,
4
5
  hideIcon: false,
5
6
  hideTitle: false,
6
7
  hideCloseButton: false,
@@ -22,7 +23,7 @@ export const customHeaderControlProps = {
22
23
  },
23
24
  minimizeButtonProps: {
24
25
  id: "oc-lcw-header-minimizebutton",
25
- type: "icon",
26
+ type: ButtonTypes.Icon,
26
27
  imageIconProps: {
27
28
  src: MinimizeChatButtonIconBase64,
28
29
  styles: {
@@ -35,7 +36,7 @@ export const customHeaderControlProps = {
35
36
  },
36
37
  closeButtonProps: {
37
38
  id: "oc-lcw-header-closebutton",
38
- type: "icon",
39
+ type: ButtonTypes.Icon,
39
40
  imageIconProps: {
40
41
  src: CloseChatButtonIconBase64,
41
42
  styles: {
@@ -47,12 +48,12 @@ export const customHeaderControlProps = {
47
48
  }
48
49
  },
49
50
  headerIconProps: {
50
- id: "oc-lcw-header-icon",
51
+ id: Ids.HeaderIconId,
51
52
  src: LegacyChatIconBase64,
52
- alt: "Chat Icon"
53
+ alt: Texts.HeaderIcon
53
54
  },
54
55
  headerTitleProps: {
55
- id: "oc-lcw-header-title",
56
- text: "Let's Chat"
56
+ id: Ids.HeaderTitleId,
57
+ text: Texts.HeaderTitle
57
58
  }
58
59
  };
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { Label } from "@fluentui/react";
3
3
  import { FontIcon } from "@fluentui/react/lib/Icon";
4
4
  import { mergeStyles } from "@fluentui/style-utilities";
5
+ import { Ids } from "../../../../common/Constants";
5
6
  const iconClass = mergeStyles({
6
7
  fontSize: 40,
7
8
  height: 40,
@@ -23,6 +24,6 @@ export const defaultHeaderComponentOverrides = {
23
24
  }),
24
25
  headerTitle: /*#__PURE__*/React.createElement(Label, {
25
26
  styles: labelClass,
26
- id: "oc-lcw-header-title"
27
+ id: Ids.HeaderTitleId
27
28
  }, "Hi, there!")
28
29
  };
@@ -1,6 +1,7 @@
1
1
  import { ModernChatIconBase64 } from "../../../../assets/Icons";
2
+ import { ButtonTypes, IconNames, Ids, Texts } from "../../../../common/Constants";
2
3
  export const defaultHeaderControlProps = {
3
- id: "oc-lcw-header",
4
+ id: Ids.DefaultHeaderId,
4
5
  hideIcon: false,
5
6
  hideTitle: false,
6
7
  hideCloseButton: false,
@@ -21,22 +22,22 @@ export const defaultHeaderControlProps = {
21
22
  children: []
22
23
  },
23
24
  minimizeButtonProps: {
24
- id: "oc-lcw-header-minimize-button",
25
- type: "icon",
26
- iconName: "ChromeMinimize"
25
+ id: Ids.MinimizeButtonId,
26
+ type: ButtonTypes.Icon,
27
+ iconName: IconNames.ChromeMinimize
27
28
  },
28
29
  closeButtonProps: {
29
- id: "oc-lcw-header-close-button",
30
- type: "icon",
31
- iconName: "ChromeClose"
30
+ id: Ids.CloseButtonId,
31
+ type: ButtonTypes.Icon,
32
+ iconName: IconNames.ChromeClose
32
33
  },
33
34
  headerIconProps: {
34
- id: "oc-lcw-header-icon",
35
+ id: Ids.HeaderIconId,
35
36
  src: ModernChatIconBase64,
36
- alt: "Chat Icon"
37
+ alt: Texts.HeaderIcon
37
38
  },
38
39
  headerTitleProps: {
39
- id: "oc-lcw-header-title",
40
- text: "Let's Chat"
40
+ id: Ids.HeaderTitleId,
41
+ text: Texts.HeaderTitle
41
42
  }
42
43
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ElementType } from "../../../common/Constants";
2
+ import { AriaLabels, ElementType, EventNames, IconNames, Texts } from "../../../common/Constants";
3
3
  import CommandButton from "../../common/commandbutton/CommandButton";
4
4
 
5
5
  function MinimizeButton(props) {
@@ -9,19 +9,19 @@ function MinimizeButton(props) {
9
9
  const customEvent = {
10
10
  elementType: ElementType.HeaderMinimizeButton,
11
11
  elementId: props === null || props === void 0 ? void 0 : props.id,
12
- eventName: "OnClick"
12
+ eventName: EventNames.OnClick
13
13
  };
14
14
  return /*#__PURE__*/React.createElement(CommandButton, {
15
15
  id: props === null || props === void 0 ? void 0 : props.id,
16
16
  type: type,
17
- text: props.text ?? "Minimize",
17
+ text: props.text ?? Texts.MinimizeText,
18
18
  styles: props.styles,
19
19
  hoverStyles: props.hoverStyles,
20
20
  focusStyles: props.focusStyles,
21
- iconName: props.iconName ?? "ChromeMinimize",
21
+ iconName: props.iconName ?? IconNames.ChromeMinimize,
22
22
  imageIconProps: props.imageIconProps,
23
23
  onClick: props.onClick,
24
- ariaLabel: props.ariaLabel ?? "Minimize",
24
+ ariaLabel: props.ariaLabel ?? AriaLabels.Minimize,
25
25
  className: props.className,
26
26
  customEvent: customEvent
27
27
  });