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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/lib/cjs/common/Constants.js +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 +2 -2
  10. package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +10 -7
  11. package/lib/cjs/components/common/commandbutton/CommandButton.js +4 -4
  12. package/lib/cjs/components/common/subcomponents/CloseButton.js +4 -4
  13. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +2 -2
  14. package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
  15. package/lib/cjs/components/footer/Footer.js +10 -17
  16. package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
  17. package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -15
  18. package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
  19. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +5 -5
  20. package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +4 -4
  21. package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +4 -4
  22. package/lib/cjs/components/header/Header.js +5 -3
  23. package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
  24. package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +9 -7
  25. package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
  26. package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +13 -11
  27. package/lib/cjs/components/header/subcomponents/MinimizeButton.js +4 -4
  28. package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
  29. package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
  30. package/lib/cjs/components/loadingpane/LoadingPane.js +1 -1
  31. package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
  32. package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  33. package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  34. package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  35. package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
  36. package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
  37. package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  38. package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  39. package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
  40. package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  41. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +2 -2
  42. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +4 -1
  43. package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  44. package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  45. package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +12 -9
  46. package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +12 -9
  47. package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +12 -9
  48. package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
  49. package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
  50. package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
  51. package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
  52. package/lib/esm/common/Constants.js +9 -2
  53. package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
  54. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
  55. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
  56. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
  57. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +7 -7
  58. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
  59. package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
  60. package/lib/esm/components/chatbutton/ChatButton.js +3 -3
  61. package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +8 -7
  62. package/lib/esm/components/common/commandbutton/CommandButton.js +5 -5
  63. package/lib/esm/components/common/subcomponents/CloseButton.js +5 -5
  64. package/lib/esm/components/confirmationpane/ConfirmationPane.js +3 -3
  65. package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
  66. package/lib/esm/components/footer/Footer.js +9 -17
  67. package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
  68. package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -15
  69. package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +1 -1
  70. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +6 -6
  71. package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
  72. package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
  73. package/lib/esm/components/header/Header.js +4 -3
  74. package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
  75. package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +8 -7
  76. package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
  77. package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +12 -11
  78. package/lib/esm/components/header/subcomponents/MinimizeButton.js +5 -5
  79. package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
  80. package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
  81. package/lib/esm/components/loadingpane/LoadingPane.js +1 -1
  82. package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
  83. package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
  84. package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
  85. package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
  86. package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +3 -2
  87. package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +1 -1
  88. package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
  89. package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
  90. package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
  91. package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
  92. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +3 -3
  93. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +2 -1
  94. package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
  95. package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
  96. package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +10 -9
  97. package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +10 -9
  98. package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +10 -9
  99. package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
  100. package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
  101. package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
  102. package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
  103. package/lib/types/common/Constants.d.ts +148 -0
  104. package/package.json +1 -1
@@ -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,25 +33,25 @@ 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
40
42
  },
41
43
  emailTranscriptButtonProps: {
42
- id: "oc-lcw-footer-emailtranscript-button",
43
- type: "icon",
44
+ id: _Constants.Ids.EmailTranscriptButtonId,
45
+ type: _Constants.ButtonTypes.Icon,
44
46
  imageIconProps: {
45
47
  src: _Icons.TranscriptEmailIconBase64
46
48
  },
47
- ariaLabel: "Email Transcript"
49
+ ariaLabel: _Constants.AriaLabels.EmailTranscript
48
50
  },
49
51
  audioNotificationButtonProps: {
50
- id: "oc-lcw-footer-audionotification-button",
51
- ariaLabel: "Turn sound off",
52
- toggleAriaLabel: "Turn sound on",
52
+ id: _Constants.Ids.AudioNotificationButtonId,
53
+ ariaLabel: _Constants.AriaLabels.TurnSoundOff,
54
+ toggleAriaLabel: _Constants.AriaLabels.TurnSoundOn,
53
55
  imageIconProps: {
54
56
  src: _Icons.AudioNotificationOnIconBase64
55
57
  },
@@ -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,24 @@ 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
35
38
  },
36
39
  emailTranscriptButtonProps: {
37
- id: "oc-lcw-footer-emailtranscript-button",
38
- type: "icon",
39
- iconName: "Mail",
40
- ariaLabel: "Email Transcript"
40
+ id: _Constants.Ids.EmailTranscriptButtonId,
41
+ type: _Constants.ButtonTypes.Icon,
42
+ iconName: _Constants.IconNames.Mail,
43
+ ariaLabel: _Constants.AriaLabels.EmailTranscript
41
44
  },
42
45
  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"
46
+ id: _Constants.Ids.AudioNotificationButtonId,
47
+ type: _Constants.ButtonTypes.Icon,
48
+ ariaLabel: _Constants.AriaLabels.TurnSoundOff,
49
+ toggleAriaLabel: _Constants.AriaLabels.TurnSoundOn,
50
+ iconName: _Constants.IconNames.Volume3,
51
+ toggleIconName: _Constants.IconNames.Volume0
49
52
  }
50
53
  };
51
54
  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,7 @@ 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: muted ? props.toggleAriaLabel ?? _Constants.AriaLabels.TurnSoundOn : props.ariaLabel ?? _Constants.AriaLabels.TurnSoundOff
92
92
  });
93
93
  }
94
94
 
@@ -20,19 +20,19 @@ 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",
28
+ text: props.text ?? _Constants.Texts.DownloadChatTranscriptText,
29
29
  styles: props.styles,
30
30
  hoverStyles: props.hoverStyles,
31
31
  focusStyles: props.focusStyles,
32
- iconName: props.iconName ?? "Download",
32
+ iconName: props.iconName ?? _Constants.IconNames.Download,
33
33
  imageIconProps: props.imageIconProps,
34
34
  onClick: props.onClick,
35
- ariaLabel: props.ariaLabel ?? "Download chat transcript",
35
+ ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.DownloadChatTranscript,
36
36
  className: props.className,
37
37
  customEvent: customEvent
38
38
  });
@@ -20,19 +20,19 @@ 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",
28
+ text: props.text ?? _Constants.Texts.EmailTranscriptText,
29
29
  styles: props.styles,
30
30
  hoverStyles: props.hoverStyles,
31
31
  focusStyles: props.focusStyles,
32
- iconName: props.iconName ?? "Mail",
32
+ iconName: props.iconName ?? _Constants.IconNames.Mail,
33
33
  imageIconProps: props.imageIconProps,
34
34
  onClick: props.onClick,
35
- ariaLabel: props.ariaLabel ?? "Email Transcript",
35
+ ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.EmailTranscript,
36
36
  className: props.className,
37
37
  customEvent: customEvent
38
38
  });
@@ -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: {
@@ -43,7 +45,7 @@ const customHeaderControlProps = {
43
45
  },
44
46
  closeButtonProps: {
45
47
  id: "oc-lcw-header-closebutton",
46
- type: "icon",
48
+ type: _Constants.ButtonTypes.Icon,
47
49
  imageIconProps: {
48
50
  src: _Icons.CloseChatButtonIconBase64,
49
51
  styles: {
@@ -55,13 +57,13 @@ const customHeaderControlProps = {
55
57
  }
56
58
  },
57
59
  headerIconProps: {
58
- id: "oc-lcw-header-icon",
60
+ id: _Constants.Ids.HeaderIconId,
59
61
  src: _Icons.LegacyChatIconBase64,
60
- alt: "Chat Icon"
62
+ alt: _Constants.Texts.HeaderIcon
61
63
  },
62
64
  headerTitleProps: {
63
- id: "oc-lcw-header-title",
64
- text: "Let's Chat"
65
+ id: _Constants.Ids.HeaderTitleId,
66
+ text: _Constants.Texts.HeaderTitle
65
67
  }
66
68
  };
67
69
  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,23 @@ 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
35
37
  },
36
38
  closeButtonProps: {
37
- id: "oc-lcw-header-close-button",
38
- type: "icon",
39
- iconName: "ChromeClose"
39
+ id: _Constants.Ids.CloseButtonId,
40
+ type: _Constants.ButtonTypes.Icon,
41
+ iconName: _Constants.IconNames.ChromeClose
40
42
  },
41
43
  headerIconProps: {
42
- id: "oc-lcw-header-icon",
44
+ id: _Constants.Ids.HeaderIconId,
43
45
  src: _Icons.ModernChatIconBase64,
44
- alt: "Chat Icon"
46
+ alt: _Constants.Texts.HeaderIcon
45
47
  },
46
48
  headerTitleProps: {
47
- id: "oc-lcw-header-title",
48
- text: "Let's Chat"
49
+ id: _Constants.Ids.HeaderTitleId,
50
+ text: _Constants.Texts.HeaderTitle
49
51
  }
50
52
  };
51
53
  exports.defaultHeaderControlProps = defaultHeaderControlProps;
@@ -20,19 +20,19 @@ 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
37
  customEvent: customEvent
38
38
  });
@@ -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");
@@ -32,7 +32,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
32
32
  function LoadingPane(props) {
33
33
  var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5, _props$componentOverr, _props$styleProps8, _props$styleProps8$cl, _props$controlProps6, _props$componentOverr2, _props$styleProps9, _props$styleProps9$cl, _props$controlProps7, _props$controlProps8, _props$componentOverr3, _props$styleProps10, _props$styleProps10$c, _props$controlProps9, _props$controlProps10, _props$componentOverr4, _props$styleProps11, _props$styleProps11$c, _props$controlProps11, _props$controlProps12, _props$componentOverr5, _props$styleProps12, _props$styleProps12$c, _props$controlProps13;
34
34
 
35
- const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? "lcw-components-loading-pane";
35
+ const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultLoadingPaneControlProps.defaultLoadingPaneControlProps.id;
36
36
  const containerStyles = {
37
37
  root: Object.assign({}, _defaultLoadingPaneGeneralStyles.defaultLoadingPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
38
38
  };
@@ -4,17 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultLoadingPaneControlProps = void 0;
7
+
8
+ var _Constants = require("../../../../common/Constants");
9
+
7
10
  const defaultLoadingPaneControlProps = {
8
- id: "oc-lcw-loadingpane",
11
+ id: _Constants.Ids.DefaultLoadingPaneId,
9
12
  dir: "auto",
10
13
  hideLoadingPane: false,
11
14
  hideIcon: false,
12
15
  hideTitle: false,
13
- titleText: "Welcome to",
16
+ titleText: _Constants.Texts.LoadingPaneTitleText,
14
17
  hideSubtitle: false,
15
- subtitleText: "live chat support ...",
18
+ subtitleText: _Constants.Texts.LoadingPaneSubtitleText,
16
19
  hideSpinner: false,
17
20
  hideSpinnerText: false,
18
- spinnerText: "Loading ..."
21
+ spinnerText: _Constants.Texts.LoadingPaneSpinnerText
19
22
  };
20
23
  exports.defaultLoadingPaneControlProps = defaultLoadingPaneControlProps;
@@ -8,7 +8,7 @@ exports.presetOneLoadingPaneControlProps = void 0;
8
8
  var _defaultLoadingPaneControlProps = require("../defaultProps/defaultLoadingPaneControlProps");
9
9
 
10
10
  const presetOneLoadingPaneControlProps = { ..._defaultLoadingPaneControlProps.defaultLoadingPaneControlProps,
11
- id: "oc-lcw-loadingpane-preset1",
11
+ id: "lcw-loading-pane-preset1",
12
12
  dir: "rtl"
13
13
  };
14
14
  exports.presetOneLoadingPaneControlProps = presetOneLoadingPaneControlProps;
@@ -10,7 +10,7 @@ var _react = require("@fluentui/react");
10
10
  var _defaultLoadingPaneControlProps = require("../defaultProps/defaultLoadingPaneControlProps");
11
11
 
12
12
  const presetThreeLoadingPaneControlProps = { ..._defaultLoadingPaneControlProps.defaultLoadingPaneControlProps,
13
- id: "oc-lcw-loadingpane-preset3",
13
+ id: "lcw-loading-pane-preset3",
14
14
  titleText: "Please Wait ...",
15
15
  subtitleText: "Loading Content",
16
16
  spinnerText: "Processing ...",
@@ -10,7 +10,7 @@ var _react = require("@fluentui/react");
10
10
  var _defaultLoadingPaneControlProps = require("../defaultProps/defaultLoadingPaneControlProps");
11
11
 
12
12
  const presetTwoLoadingPaneControlProps = { ..._defaultLoadingPaneControlProps.defaultLoadingPaneControlProps,
13
- id: "oc-lcw-loadingpane-preset2",
13
+ id: "lcw-loading-pane-preset2",
14
14
  hideIcon: true,
15
15
  hideTitle: true,
16
16
  hideSubtitle: true,