@microsoft/omnichannel-chat-components 1.0.1-main.9f52604 → 1.0.2-main.9430c05

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 (110) hide show
  1. package/lib/cjs/common/Constants.js +16 -3
  2. package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
  3. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +6 -6
  4. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +26 -23
  5. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +20 -18
  6. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +6 -6
  7. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +22 -19
  8. package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +18 -16
  9. package/lib/cjs/components/chatbutton/ChatButton.js +4 -6
  10. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -7
  11. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonGeneralStyles.js +1 -1
  12. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
  13. package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +2 -1
  14. package/lib/cjs/components/common/commandbutton/CommandButton.js +6 -5
  15. package/lib/cjs/components/common/subcomponents/CloseButton.js +4 -4
  16. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +2 -2
  17. package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
  18. package/lib/cjs/components/footer/Footer.js +10 -17
  19. package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +16 -11
  20. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +21 -15
  21. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
  22. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +6 -5
  23. package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
  24. package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
  25. package/lib/cjs/components/header/Header.js +5 -3
  26. package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
  27. package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +13 -9
  28. package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
  29. package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +15 -11
  30. package/lib/cjs/components/header/subcomponents/MinimizeButton.js +6 -5
  31. package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
  32. package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
  33. package/lib/cjs/components/loadingpane/LoadingPane.js +1 -1
  34. package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
  35. package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  36. package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  37. package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  38. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
  39. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
  40. package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  41. package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  42. package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
  43. package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  44. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +2 -2
  45. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +4 -1
  46. package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  47. package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  48. package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +12 -9
  49. package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +12 -9
  50. package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +12 -9
  51. package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
  52. package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
  53. package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
  54. package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
  55. package/lib/esm/common/Constants.js +9 -2
  56. package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
  57. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
  58. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
  59. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
  60. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +7 -7
  61. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
  62. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
  63. package/lib/esm/components/chatbutton/ChatButton.js +5 -7
  64. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +7 -7
  65. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonGeneralStyles.js +1 -1
  66. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +2 -1
  67. package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +2 -1
  68. package/lib/esm/components/common/commandbutton/CommandButton.js +7 -6
  69. package/lib/esm/components/common/subcomponents/CloseButton.js +5 -5
  70. package/lib/esm/components/confirmationpane/ConfirmationPane.js +3 -3
  71. package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
  72. package/lib/esm/components/footer/Footer.js +9 -17
  73. package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +15 -11
  74. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +19 -15
  75. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
  76. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +7 -6
  77. package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +6 -6
  78. package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +6 -6
  79. package/lib/esm/components/header/Header.js +4 -3
  80. package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
  81. package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +12 -9
  82. package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
  83. package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +14 -11
  84. package/lib/esm/components/header/subcomponents/MinimizeButton.js +7 -6
  85. package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
  86. package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
  87. package/lib/esm/components/loadingpane/LoadingPane.js +1 -1
  88. package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
  89. package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  90. package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  91. package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  92. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -2
  93. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
  94. package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  95. package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  96. package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
  97. package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  98. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +3 -3
  99. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +2 -1
  100. package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  101. package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  102. package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +10 -9
  103. package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +10 -9
  104. package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +10 -9
  105. package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
  106. package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
  107. package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
  108. package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
  109. package/lib/types/common/Constants.d.ts +148 -0
  110. package/package.json +1 -1
@@ -56,7 +56,7 @@ function ConfirmationPane(props) {
56
56
  const customEvent = {
57
57
  elementType: _Constants.ElementType.ConfirmationPaneConfirmButton,
58
58
  elementId: elementId + "-confirmbutton",
59
- eventName: "OnClick"
59
+ eventName: _Constants.EventNames.OnClick
60
60
  };
61
61
 
62
62
  _BroadcastService.BroadcastService.postMessage(customEvent);
@@ -73,7 +73,7 @@ function ConfirmationPane(props) {
73
73
  const customEvent = {
74
74
  elementType: _Constants.ElementType.ConfirmationPaneCancelButton,
75
75
  elementId: elementId + "-cancelbutton",
76
- eventName: "OnClick"
76
+ eventName: _Constants.EventNames.OnClick
77
77
  };
78
78
 
79
79
  _BroadcastService.BroadcastService.postMessage(customEvent);
@@ -4,20 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultConfirmationPaneControlProps = void 0;
7
+
8
+ var _Constants = require("../../../../common/Constants");
9
+
7
10
  const defaultConfirmationPaneControlProps = {
8
- id: "lcw-components-confirmation-pane",
11
+ id: _Constants.Ids.DefaultConfirmationPaneId,
9
12
  dir: "ltr",
10
13
  hideConfirmationPane: false,
11
14
  hideTitle: false,
12
- titleText: "Close chat",
15
+ titleText: _Constants.Texts.ConfirmationPaneTitle,
13
16
  hideSubtitle: false,
14
- subtitleText: "Do you really want to close this chat?",
17
+ subtitleText: _Constants.Texts.ConfirmationPaneSubtitle,
15
18
  hideConfirmButton: false,
16
- confirmButtonText: "Close",
17
- confirmButtonAriaLabel: "Close Chat",
19
+ confirmButtonText: _Constants.Texts.ConfirmButtonText,
20
+ confirmButtonAriaLabel: _Constants.AriaLabels.ConfirmationPaneConfirm,
18
21
  hideCancelButton: false,
19
- cancelButtonText: "Cancel",
20
- cancelButtonAriaLabel: "Cancel. Return to Chat",
22
+ cancelButtonText: _Constants.Texts.CancelButtonText,
23
+ cancelButtonAriaLabel: _Constants.AriaLabels.ConfirmationPaneCancel,
21
24
  onConfirm: function () {
22
25
  console.log("on confirm");
23
26
  },
@@ -21,6 +21,8 @@ var _defaultFooterProps = require("./common/defaultProps/defaultFooterProps");
21
21
 
22
22
  var _utils = require("../../common/utils");
23
23
 
24
+ var _Constants = require("../../common/Constants");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
28
  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); }
@@ -53,15 +55,13 @@ function Footer(props) {
53
55
  horizontal: true,
54
56
  className: props.className,
55
57
  horizontalAlign: "space-between",
58
+ verticalAlign: "center",
56
59
  styles: stackStyles,
57
60
  dir: ((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.dir) ?? "ltr",
58
61
  role: "region"
59
62
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
60
63
  horizontal: true,
61
- id: "footerLeftGroup",
62
- verticalAlign: "center"
63
- }, /*#__PURE__*/React.createElement(_react2.Stack, {
64
- horizontal: true,
64
+ id: _Constants.Ids.FooterLeftGroupId,
65
65
  verticalAlign: "center"
66
66
  }, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideDownloadTranscriptButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.DownloadTranscriptButton) || /*#__PURE__*/React.createElement(_DownloadTranscriptButton.default, _extends({}, downloadTranscriptButtonProps, {
67
67
  onClick: (_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.onDownloadTranscriptClick,
@@ -73,27 +73,20 @@ function Footer(props) {
73
73
  styles: emailTranscriptButtonStyles,
74
74
  hoverStyles: emailTranscriptButtonHoverStyles,
75
75
  focusStyles: footerItemFocusStyles
76
- }))), (0, _utils.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(_react2.Stack, {
76
+ }))), (0, _utils.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(_react2.Stack, {
77
77
  horizontal: true,
78
- id: "footerMiddleGroup"
79
- }, /*#__PURE__*/React.createElement(_react2.Stack, {
80
- horizontal: true,
81
- verticalAlign: "start"
82
- }, /*#__PURE__*/React.createElement(_react2.Stack.Item, {
83
- align: "start"
84
- }, (0, _utils.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(_react2.Stack, {
85
- horizontal: true,
86
- id: "footerRightGroup",
87
- verticalAlign: "start"
88
- }, /*#__PURE__*/React.createElement(_react2.Stack, {
78
+ id: _Constants.Ids.FooterMiddleGroupId,
79
+ verticalAlign: "center"
80
+ }, (0, _utils.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(_react2.Stack, {
89
81
  horizontal: true,
82
+ id: _Constants.Ids.FooterRightGroupId,
90
83
  verticalAlign: "center"
91
84
  }, (0, _utils.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) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.AudioNotificationButton) || /*#__PURE__*/React.createElement(_AudioNotificationButton.default, _extends({}, audioNotificationButtonProps, {
92
85
  onClick: (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioNotificationClick,
93
86
  styles: audioNotificationButtonStyles,
94
87
  hoverStyles: audioNotificationButtonHoverStyles,
95
88
  focusStyles: footerItemFocusStyles
96
- }))))));
89
+ })))));
97
90
  }
98
91
 
99
92
  var _default = Footer;
@@ -7,8 +7,10 @@ exports.customFooterControlProps = void 0;
7
7
 
8
8
  var _Icons = require("../../../../assets/Icons");
9
9
 
10
+ var _Constants = require("../../../../common/Constants");
11
+
10
12
  const customFooterControlProps = {
11
- id: "oc-lcw-footer",
13
+ id: _Constants.Ids.CustomFooterId,
12
14
  hideDownloadTranscriptButton: false,
13
15
  hideEmailTranscriptButton: false,
14
16
  hideAudioNotificationButton: false,
@@ -31,31 +33,34 @@ const customFooterControlProps = {
31
33
  children: []
32
34
  },
33
35
  downloadTranscriptButtonProps: {
34
- id: "oc-lcw-footer-downloadtranscript-button",
35
- type: "icon",
36
+ id: _Constants.Ids.DownloadTranscriptButtonId,
37
+ type: _Constants.ButtonTypes.Icon,
36
38
  imageIconProps: {
37
39
  src: _Icons.TranscriptDownloadIconBase64
38
40
  },
39
- ariaLabel: "Download chat transcript"
41
+ ariaLabel: _Constants.AriaLabels.DownloadChatTranscript,
42
+ hideButtonTitle: true
40
43
  },
41
44
  emailTranscriptButtonProps: {
42
- id: "oc-lcw-footer-emailtranscript-button",
43
- type: "icon",
45
+ id: _Constants.Ids.EmailTranscriptButtonId,
46
+ type: _Constants.ButtonTypes.Icon,
44
47
  imageIconProps: {
45
48
  src: _Icons.TranscriptEmailIconBase64
46
49
  },
47
- ariaLabel: "Email Transcript"
50
+ ariaLabel: _Constants.AriaLabels.EmailTranscript,
51
+ hideButtonTitle: true
48
52
  },
49
53
  audioNotificationButtonProps: {
50
- id: "oc-lcw-footer-audionotification-button",
51
- ariaLabel: "Turn sound off",
52
- toggleAriaLabel: "Turn sound on",
54
+ id: _Constants.Ids.AudioNotificationButtonId,
55
+ ariaLabel: _Constants.AriaLabels.TurnSoundOff,
56
+ toggleAriaLabel: _Constants.AriaLabels.TurnSoundOn,
53
57
  imageIconProps: {
54
58
  src: _Icons.AudioNotificationOnIconBase64
55
59
  },
56
60
  imageToggleIconProps: {
57
61
  src: _Icons.AudioNotificationOffIconBase64
58
- }
62
+ },
63
+ hideButtonTitle: true
59
64
  }
60
65
  };
61
66
  exports.customFooterControlProps = customFooterControlProps;
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultFooterControlProps = void 0;
7
+
8
+ var _Constants = require("../../../../common/Constants");
9
+
7
10
  const defaultFooterControlProps = {
8
- id: "lcw-components-footer",
11
+ id: _Constants.Ids.DefaultFooterId,
9
12
  hideDownloadTranscriptButton: false,
10
13
  hideEmailTranscriptButton: false,
11
14
  hideAudioNotificationButton: false,
@@ -28,24 +31,27 @@ const defaultFooterControlProps = {
28
31
  children: []
29
32
  },
30
33
  downloadTranscriptButtonProps: {
31
- id: "oc-lcw-footer-downloadtranscript-button",
32
- type: "icon",
33
- iconName: "Download",
34
- ariaLabel: "Download chat transcript"
34
+ id: _Constants.Ids.DownloadTranscriptButtonId,
35
+ type: _Constants.ButtonTypes.Icon,
36
+ iconName: _Constants.IconNames.Download,
37
+ ariaLabel: _Constants.AriaLabels.DownloadChatTranscript,
38
+ hideButtonTitle: true
35
39
  },
36
40
  emailTranscriptButtonProps: {
37
- id: "oc-lcw-footer-emailtranscript-button",
38
- type: "icon",
39
- iconName: "Mail",
40
- ariaLabel: "Email Transcript"
41
+ id: _Constants.Ids.EmailTranscriptButtonId,
42
+ type: _Constants.ButtonTypes.Icon,
43
+ iconName: _Constants.IconNames.Mail,
44
+ ariaLabel: _Constants.AriaLabels.EmailTranscript,
45
+ hideButtonTitle: true
41
46
  },
42
47
  audioNotificationButtonProps: {
43
- id: "oc-lcw-footer-audionotification-button",
44
- type: "icon",
45
- ariaLabel: "Turn sound off",
46
- toggleAriaLabel: "Turn sound on",
47
- iconName: "Volume3",
48
- toggleIconName: "Volume0"
48
+ id: _Constants.Ids.AudioNotificationButtonId,
49
+ type: _Constants.ButtonTypes.Icon,
50
+ ariaLabel: _Constants.AriaLabels.TurnSoundOff,
51
+ toggleAriaLabel: _Constants.AriaLabels.TurnSoundOn,
52
+ iconName: _Constants.IconNames.Volume3,
53
+ toggleIconName: _Constants.IconNames.Volume0,
54
+ hideButtonTitle: true
49
55
  }
50
56
  };
51
57
  exports.defaultFooterControlProps = defaultFooterControlProps;
@@ -11,7 +11,7 @@ const defaultFooterStyleProps = {
11
11
  minHeight: "25px",
12
12
  width: "100%",
13
13
  minWidth: "250px",
14
- padding: "0 10px 5px 10px"
14
+ padding: "5px"
15
15
  },
16
16
  downloadTranscriptButtonStyleProps: {
17
17
  icon: {
@@ -24,7 +24,7 @@ function AudioNotificationButton(props) {
24
24
  const [muted, setMuted] = (0, _react2.useState)(props.isAudioMuted);
25
25
  let iconStyles = {};
26
26
 
27
- if (props.type === "icon") {
27
+ if (props.type === _Constants.ButtonTypes.Icon) {
28
28
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
29
  iconStyles = { ...(props === null || props === void 0 ? void 0 : props.styles).icon
30
30
  };
@@ -55,12 +55,12 @@ function AudioNotificationButton(props) {
55
55
  const volume0Icon = props.imageToggleIconProps ? {
56
56
  imageProps: props === null || props === void 0 ? void 0 : props.imageToggleIconProps
57
57
  } : {
58
- iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0"
58
+ iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? _Constants.IconNames.Volume0
59
59
  };
60
60
  const volume3Icon = props.imageIconProps ? {
61
61
  imageProps: props === null || props === void 0 ? void 0 : props.imageIconProps
62
62
  } : {
63
- iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3"
63
+ iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? _Constants.IconNames.Volume3
64
64
  };
65
65
  const handleOnClick = (0, _react2.useCallback)(() => {
66
66
  setMuted(!muted);
@@ -69,7 +69,7 @@ function AudioNotificationButton(props) {
69
69
  const customEvent = {
70
70
  elementType: _Constants.ElementType.FooterSoundNotificationButton,
71
71
  elementId: props === null || props === void 0 ? void 0 : props.id,
72
- eventName: "OnClick"
72
+ eventName: _Constants.EventNames.OnClick
73
73
  };
74
74
 
75
75
  _BroadcastService.BroadcastService.postMessage(customEvent);
@@ -88,7 +88,8 @@ function AudioNotificationButton(props) {
88
88
  disabled: disabled,
89
89
  styles: iconButtonStyles,
90
90
  className: props.className,
91
- title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
91
+ title: undefined,
92
+ ariaLabel: muted ? props.toggleAriaLabel ?? _Constants.AriaLabels.TurnSoundOn : props.ariaLabel ?? _Constants.AriaLabels.TurnSoundOff
92
93
  });
93
94
  }
94
95
 
@@ -20,21 +20,21 @@ function DownloadTranscriptButton(props) {
20
20
  const customEvent = {
21
21
  elementType: _Constants.ElementType.FooterDownloadTranscriptButton,
22
22
  elementId: props === null || props === void 0 ? void 0 : props.id,
23
- eventName: "OnClick"
23
+ eventName: _Constants.EventNames.OnClick
24
24
  };
25
25
  return /*#__PURE__*/_react.default.createElement(_CommandButton.default, {
26
26
  id: props === null || props === void 0 ? void 0 : props.id,
27
27
  type: type,
28
- text: props.text ?? "Download chat transcript",
29
28
  styles: props.styles,
30
29
  hoverStyles: props.hoverStyles,
31
30
  focusStyles: props.focusStyles,
32
- iconName: props.iconName ?? "Download",
31
+ iconName: props.iconName ?? _Constants.IconNames.Download,
33
32
  imageIconProps: props.imageIconProps,
34
33
  onClick: props.onClick,
35
- ariaLabel: props.ariaLabel ?? "Download chat transcript",
34
+ ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.DownloadChatTranscript,
36
35
  className: props.className,
37
- customEvent: customEvent
36
+ customEvent: customEvent,
37
+ hideButtonTitle: props.hideButtonTitle
38
38
  });
39
39
  }
40
40
 
@@ -20,21 +20,21 @@ function EmailTranscriptButton(props) {
20
20
  const customEvent = {
21
21
  elementType: _Constants.ElementType.FooterEmailTranscriptButton,
22
22
  elementId: props === null || props === void 0 ? void 0 : props.id,
23
- eventName: "OnClick"
23
+ eventName: _Constants.EventNames.OnClick
24
24
  };
25
25
  return /*#__PURE__*/_react.default.createElement(_CommandButton.default, {
26
26
  id: props === null || props === void 0 ? void 0 : props.id,
27
27
  type: type,
28
- text: props.text ?? "Email Transcript",
29
28
  styles: props.styles,
30
29
  hoverStyles: props.hoverStyles,
31
30
  focusStyles: props.focusStyles,
32
- iconName: props.iconName ?? "Mail",
31
+ iconName: props.iconName ?? _Constants.IconNames.Mail,
33
32
  imageIconProps: props.imageIconProps,
34
33
  onClick: props.onClick,
35
- ariaLabel: props.ariaLabel ?? "Email Transcript",
34
+ ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.EmailTranscript,
36
35
  className: props.className,
37
- customEvent: customEvent
36
+ customEvent: customEvent,
37
+ hideButtonTitle: props.hideButtonTitle
38
38
  });
39
39
  }
40
40
 
@@ -19,6 +19,8 @@ var _defaultHeaderProps = require("./common/defaultProps/defaultHeaderProps");
19
19
 
20
20
  var _utils = require("../../common/utils");
21
21
 
22
+ var _Constants = require("../../common/Constants");
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
24
26
  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); }
@@ -63,7 +65,7 @@ function Header(props) {
63
65
  role: "region"
64
66
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
65
67
  horizontal: true,
66
- id: "headerLeftGroup",
68
+ id: _Constants.Ids.HeaderLeftGroupId,
67
69
  verticalAlign: "center"
68
70
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
69
71
  horizontal: true,
@@ -80,7 +82,7 @@ function Header(props) {
80
82
  styles: titleStyles
81
83
  }, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text)))), /*#__PURE__*/React.createElement(_react2.Stack, {
82
84
  horizontal: true,
83
- id: "headerMiddleGroup"
85
+ id: _Constants.Ids.HeaderMiddleGroupId
84
86
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
85
87
  horizontal: true,
86
88
  verticalAlign: "start"
@@ -88,7 +90,7 @@ function Header(props) {
88
90
  align: "start"
89
91
  }, (0, _utils.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(_react2.Stack, {
90
92
  horizontal: true,
91
- id: "headerRightGroup",
93
+ id: _Constants.Ids.HeaderRightGroupId,
92
94
  verticalAlign: "start"
93
95
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
94
96
  horizontal: true,
@@ -7,8 +7,10 @@ exports.azureHeaderControlProps = void 0;
7
7
 
8
8
  var _Icons = require("../../../../assets/Icons");
9
9
 
10
+ var _Constants = require("../../../../common/Constants");
11
+
10
12
  const azureHeaderControlProps = {
11
- id: "oc-lcw-header",
13
+ id: _Constants.Ids.DefaultHeaderId,
12
14
  hideIcon: false,
13
15
  hideTitle: true,
14
16
  hideCloseButton: false,
@@ -30,20 +32,20 @@ const azureHeaderControlProps = {
30
32
  },
31
33
  minimizeButtonProps: {
32
34
  id: "oc-lcw-header-minimizebutton",
33
- type: "icon"
35
+ type: _Constants.ButtonTypes.Icon
34
36
  },
35
37
  closeButtonProps: {
36
38
  id: "oc-lcw-header-closebutton",
37
- type: "text",
39
+ type: _Constants.ButtonTypes.Text,
38
40
  text: "End Chat"
39
41
  },
40
42
  headerIconProps: {
41
- id: "oc-lcw-header-icon",
43
+ id: _Constants.Ids.HeaderIconId,
42
44
  src: _Icons.LegacyChatIconBase64,
43
- alt: "Chat Icon"
45
+ alt: _Constants.Texts.HeaderIcon
44
46
  },
45
47
  headerTitleProps: {
46
- id: "oc-lcw-header-title",
48
+ id: _Constants.Ids.HeaderTitleId,
47
49
  text: "Azure Chat Support"
48
50
  }
49
51
  };
@@ -7,8 +7,10 @@ exports.customHeaderControlProps = void 0;
7
7
 
8
8
  var _Icons = require("../../../../assets/Icons");
9
9
 
10
+ var _Constants = require("../../../../common/Constants");
11
+
10
12
  const customHeaderControlProps = {
11
- id: "oc-lcw-header",
13
+ id: _Constants.Ids.DefaultHeaderId,
12
14
  hideIcon: false,
13
15
  hideTitle: false,
14
16
  hideCloseButton: false,
@@ -30,7 +32,7 @@ const customHeaderControlProps = {
30
32
  },
31
33
  minimizeButtonProps: {
32
34
  id: "oc-lcw-header-minimizebutton",
33
- type: "icon",
35
+ type: _Constants.ButtonTypes.Icon,
34
36
  imageIconProps: {
35
37
  src: _Icons.MinimizeChatButtonIconBase64,
36
38
  styles: {
@@ -39,11 +41,12 @@ const customHeaderControlProps = {
39
41
  width: "16px"
40
42
  }
41
43
  }
42
- }
44
+ },
45
+ hideButtonTitle: true
43
46
  },
44
47
  closeButtonProps: {
45
48
  id: "oc-lcw-header-closebutton",
46
- type: "icon",
49
+ type: _Constants.ButtonTypes.Icon,
47
50
  imageIconProps: {
48
51
  src: _Icons.CloseChatButtonIconBase64,
49
52
  styles: {
@@ -52,16 +55,17 @@ const customHeaderControlProps = {
52
55
  width: "16px"
53
56
  }
54
57
  }
55
- }
58
+ },
59
+ hideButtonTitle: true
56
60
  },
57
61
  headerIconProps: {
58
- id: "oc-lcw-header-icon",
62
+ id: _Constants.Ids.HeaderIconId,
59
63
  src: _Icons.LegacyChatIconBase64,
60
- alt: "Chat Icon"
64
+ alt: _Constants.Texts.HeaderIcon
61
65
  },
62
66
  headerTitleProps: {
63
- id: "oc-lcw-header-title",
64
- text: "Let's Chat"
67
+ id: _Constants.Ids.HeaderTitleId,
68
+ text: _Constants.Texts.HeaderTitle
65
69
  }
66
70
  };
67
71
  exports.customHeaderControlProps = customHeaderControlProps;
@@ -13,6 +13,8 @@ var _Icon = require("@fluentui/react/lib/Icon");
13
13
 
14
14
  var _styleUtilities = require("@fluentui/style-utilities");
15
15
 
16
+ var _Constants = require("../../../../common/Constants");
17
+
16
18
  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
19
 
18
20
  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; }
@@ -38,7 +40,7 @@ const defaultHeaderComponentOverrides = {
38
40
  }),
39
41
  headerTitle: /*#__PURE__*/React.createElement(_react2.Label, {
40
42
  styles: labelClass,
41
- id: "oc-lcw-header-title"
43
+ id: _Constants.Ids.HeaderTitleId
42
44
  }, "Hi, there!")
43
45
  };
44
46
  exports.defaultHeaderComponentOverrides = defaultHeaderComponentOverrides;
@@ -7,8 +7,10 @@ exports.defaultHeaderControlProps = void 0;
7
7
 
8
8
  var _Icons = require("../../../../assets/Icons");
9
9
 
10
+ var _Constants = require("../../../../common/Constants");
11
+
10
12
  const defaultHeaderControlProps = {
11
- id: "oc-lcw-header",
13
+ id: _Constants.Ids.DefaultHeaderId,
12
14
  hideIcon: false,
13
15
  hideTitle: false,
14
16
  hideCloseButton: false,
@@ -29,23 +31,25 @@ const defaultHeaderControlProps = {
29
31
  children: []
30
32
  },
31
33
  minimizeButtonProps: {
32
- id: "oc-lcw-header-minimize-button",
33
- type: "icon",
34
- iconName: "ChromeMinimize"
34
+ id: _Constants.Ids.MinimizeButtonId,
35
+ type: _Constants.ButtonTypes.Icon,
36
+ iconName: _Constants.IconNames.ChromeMinimize,
37
+ hideButtonTitle: true
35
38
  },
36
39
  closeButtonProps: {
37
- id: "oc-lcw-header-close-button",
38
- type: "icon",
39
- iconName: "ChromeClose"
40
+ id: _Constants.Ids.CloseButtonId,
41
+ type: _Constants.ButtonTypes.Icon,
42
+ iconName: _Constants.IconNames.ChromeClose,
43
+ hideButtonTitle: true
40
44
  },
41
45
  headerIconProps: {
42
- id: "oc-lcw-header-icon",
46
+ id: _Constants.Ids.HeaderIconId,
43
47
  src: _Icons.ModernChatIconBase64,
44
- alt: "Chat Icon"
48
+ alt: _Constants.Texts.HeaderIcon
45
49
  },
46
50
  headerTitleProps: {
47
- id: "oc-lcw-header-title",
48
- text: "Let's Chat"
51
+ id: _Constants.Ids.HeaderTitleId,
52
+ text: _Constants.Texts.HeaderTitle
49
53
  }
50
54
  };
51
55
  exports.defaultHeaderControlProps = defaultHeaderControlProps;
@@ -20,21 +20,22 @@ function MinimizeButton(props) {
20
20
  const customEvent = {
21
21
  elementType: _Constants.ElementType.HeaderMinimizeButton,
22
22
  elementId: props === null || props === void 0 ? void 0 : props.id,
23
- eventName: "OnClick"
23
+ eventName: _Constants.EventNames.OnClick
24
24
  };
25
25
  return /*#__PURE__*/_react.default.createElement(_CommandButton.default, {
26
26
  id: props === null || props === void 0 ? void 0 : props.id,
27
27
  type: type,
28
- text: props.text ?? "Minimize",
28
+ text: props.text ?? _Constants.Texts.MinimizeText,
29
29
  styles: props.styles,
30
30
  hoverStyles: props.hoverStyles,
31
31
  focusStyles: props.focusStyles,
32
- iconName: props.iconName ?? "ChromeMinimize",
32
+ iconName: props.iconName ?? _Constants.IconNames.ChromeMinimize,
33
33
  imageIconProps: props.imageIconProps,
34
34
  onClick: props.onClick,
35
- ariaLabel: props.ariaLabel ?? "Minimize",
35
+ ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.Minimize,
36
36
  className: props.className,
37
- customEvent: customEvent
37
+ customEvent: customEvent,
38
+ hideButtonTitle: props.hideButtonTitle
38
39
  });
39
40
  }
40
41
 
@@ -8,28 +8,28 @@ exports.defaultInputValidationPaneControlProps = void 0;
8
8
  var _Constants = require("../../../../../common/Constants");
9
9
 
10
10
  const defaultInputValidationPaneControlProps = {
11
- id: "oclcw-emailTranscriptDialogContainer",
11
+ id: _Constants.Ids.DefaultInputValidationPaneId,
12
12
  dir: "ltr",
13
13
  hideInputValidationPane: false,
14
- inputValidationPaneAriaLabel: "Email Chat Transcript Pane",
14
+ inputValidationPaneAriaLabel: _Constants.AriaLabels.EmailChatTranscriptPane,
15
15
  hideTitle: false,
16
- titleText: "Email this chat transcript",
16
+ titleText: _Constants.Texts.InputValidationPaneTitleText,
17
17
  hideSubtitle: false,
18
- subtitleText: "This will be sent after your chat ends.",
19
- inputId: "oclcw-emailTranscriptDialogTextField",
18
+ subtitleText: _Constants.Texts.InputValidationPaneSubtitleText,
19
+ inputId: _Constants.Ids.DefaultInputValidationPaneInputId,
20
20
  inputInitialText: "",
21
21
  hideInput: false,
22
- inputAriaLabel: "Email this chat transcript. This will be sent after your chat ends. Email address text area",
22
+ inputAriaLabel: _Constants.AriaLabels.InputValidationPaneInput,
23
23
  inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
24
- invalidInputErrorMessageText: "Enter a valid email address.",
24
+ invalidInputErrorMessageText: _Constants.Texts.InvalidInputErrorMessageText,
25
25
  isButtonGroupHorizontal: true,
26
26
  hideSendButton: false,
27
27
  enableSendButton: false,
28
- sendButtonText: "Send",
29
- sendButtonAriaLabel: "Send",
28
+ sendButtonText: _Constants.Texts.SendButtonText,
29
+ sendButtonAriaLabel: _Constants.AriaLabels.Send,
30
30
  hideCancelButton: false,
31
- cancelButtonText: "Cancel",
32
- cancelButtonAriaLabel: "Cancel",
31
+ cancelButtonText: _Constants.Texts.CancelButtonText,
32
+ cancelButtonAriaLabel: _Constants.AriaLabels.Cancel,
33
33
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
34
  onSend: function (input) {
35
35
  console.log("on send");
@@ -8,27 +8,27 @@ exports.presetTwoInputValidationPaneControlProps = void 0;
8
8
  var _Constants = require("../../../../../common/Constants");
9
9
 
10
10
  const presetTwoInputValidationPaneControlProps = {
11
- id: "oclcw-emailTranscriptDialogContainer",
11
+ id: _Constants.Ids.DefaultInputValidationPaneId,
12
12
  dir: "ltr",
13
13
  hideInputValidationPane: false,
14
- inputValidationPaneAriaLabel: "Email Chat Transcript Pane",
14
+ inputValidationPaneAriaLabel: _Constants.AriaLabels.EmailChatTranscriptPane,
15
15
  hideTitle: false,
16
- titleText: "Email this chat transcript",
16
+ titleText: _Constants.Texts.InputValidationPaneTitleText,
17
17
  hideSubtitle: false,
18
- subtitleText: "This will be sent after your chat ends.",
19
- inputId: "oclcw-emailTranscriptDialogTextField",
18
+ subtitleText: _Constants.Texts.InputValidationPaneSubtitleText,
19
+ inputId: _Constants.Ids.DefaultInputValidationPaneInputId,
20
20
  hideInput: false,
21
- inputAriaLabel: "Email this chat transcript. This will be sent after your chat ends. Email address text area",
21
+ inputAriaLabel: _Constants.AriaLabels.InputValidationPaneInput,
22
22
  inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
23
- invalidInputErrorMessageText: "Enter a valid email address.",
23
+ invalidInputErrorMessageText: _Constants.Texts.InvalidInputErrorMessageText,
24
24
  isButtonGroupHorizontal: false,
25
25
  hideSendButton: false,
26
26
  enableSendButton: true,
27
- sendButtonText: "Send",
28
- sendButtonAriaLabel: "Send",
27
+ sendButtonText: _Constants.Texts.SendButtonText,
28
+ sendButtonAriaLabel: _Constants.AriaLabels.Send,
29
29
  hideCancelButton: false,
30
- cancelButtonText: "Cancel",
31
- cancelButtonAriaLabel: "Cancel",
30
+ cancelButtonText: _Constants.Texts.CancelButtonText,
31
+ cancelButtonAriaLabel: _Constants.AriaLabels.Cancel,
32
32
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
33
  onSend: function (input) {
34
34
  console.log("on send");