@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.
- package/lib/cjs/common/Constants.js +26 -8
- package/lib/cjs/common/utils.js +21 -2
- package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +26 -23
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +20 -18
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +21 -8
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +22 -19
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +18 -16
- package/lib/cjs/components/chatbutton/ChatButton.js +28 -24
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +11 -5
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/cjs/components/common/commandbutton/CommandButton.js +37 -12
- package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +8 -7
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +9 -2
- package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/cjs/components/footer/Footer.js +12 -19
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -14
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +31 -14
- package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +4 -4
- package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +4 -4
- package/lib/cjs/components/header/Header.js +7 -5
- package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
- package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +9 -7
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +13 -11
- package/lib/cjs/components/header/subcomponents/MinimizeButton.js +4 -4
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
- package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/loadingpane/LoadingPane.js +3 -2
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
- package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +7 -2
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
- package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
- package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +25 -11
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +5 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
- package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
- package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
- package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/services/BroadcastService.js +36 -8
- package/lib/esm/common/Constants.js +18 -6
- package/lib/esm/common/utils.js +16 -0
- package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +8 -8
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +22 -9
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
- package/lib/esm/components/chatbutton/ChatButton.js +28 -24
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -5
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/esm/components/common/commandbutton/CommandButton.js +38 -13
- package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +9 -8
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +10 -3
- package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/esm/components/footer/Footer.js +11 -19
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -14
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +32 -15
- package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
- package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
- package/lib/esm/components/header/Header.js +6 -5
- package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
- package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +8 -7
- package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
- package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +12 -11
- package/lib/esm/components/header/subcomponents/MinimizeButton.js +5 -5
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
- package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/loadingpane/LoadingPane.js +3 -2
- package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
- package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
- package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
- package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +26 -12
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +3 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
- package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
- package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
- package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
- package/lib/esm/index.js +1 -0
- package/lib/esm/services/BroadcastService.js +34 -8
- package/lib/types/common/Constants.d.ts +151 -2
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
- package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
- package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
- package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
- package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
- package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
- package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +3 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
- package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/BroadcastService.d.ts +1 -0
- package/package.json +2 -2
|
@@ -42,13 +42,17 @@ function NotificationBubble(props, parentId) {
|
|
|
42
42
|
const unreadMessageCount = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.unreadMessageCount) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.unreadMessageCount);
|
|
43
43
|
|
|
44
44
|
if (unreadMessageCount !== "0") {
|
|
45
|
-
var _props$componentOverr, _props$styleProps2, _props$styleProps2$cl;
|
|
45
|
+
var _props$componentOverr, _props$controlProps2, _props$controlProps3, _props$styleProps2, _props$styleProps2$cl, _props$controlProps4, _props$controlProps5;
|
|
46
46
|
|
|
47
|
-
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.
|
|
47
|
+
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationBubble) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
48
|
+
"aria-live": "polite",
|
|
48
49
|
styles: notificationBubbleStyles,
|
|
50
|
+
"aria-label": (_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.ariaLabelUnreadMessageString ? (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.ariaLabelUnreadMessageString : _defaultChatButtonControlProps.defaultChatButtonControlProps.ariaLabelUnreadMessageString,
|
|
49
51
|
className: (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : (_props$styleProps2$cl = _props$styleProps2.classNames) === null || _props$styleProps2$cl === void 0 ? void 0 : _props$styleProps2$cl.notificationBubbleClassName,
|
|
50
52
|
id: parentId + "-notification-bubble"
|
|
51
|
-
}, unreadMessageCount
|
|
53
|
+
}, unreadMessageCount, /*#__PURE__*/_react2.default.createElement("span", {
|
|
54
|
+
style: _Constants.HiddenTextStyles
|
|
55
|
+
}, (_props$controlProps4 = props.controlProps) !== null && _props$controlProps4 !== void 0 && _props$controlProps4.unreadMessageString ? (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.unreadMessageString : _defaultChatButtonControlProps.defaultChatButtonControlProps.unreadMessageString));
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
return null;
|
|
@@ -68,7 +72,7 @@ function IconContainer(props, parentId) {
|
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
function TextContainer(props, parentId) {
|
|
71
|
-
var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$
|
|
75
|
+
var _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$controlProps9, _props$controlProps10, _props$controlProps11, _props$componentOverr3, _props$styleProps8, _props$styleProps8$cl, _props$componentOverr4, _props$styleProps9, _props$styleProps9$cl, _props$componentOverr5, _props$styleProps10, _props$styleProps10$c;
|
|
72
76
|
|
|
73
77
|
const textContainerStyles = {
|
|
74
78
|
root: Object.assign({}, _defaultChatButtonTextContainerStyles.defaultChatButtonTextContainerStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.textContainerStyleProps)
|
|
@@ -79,12 +83,12 @@ function TextContainer(props, parentId) {
|
|
|
79
83
|
const subtitleStyles = {
|
|
80
84
|
root: Object.assign({}, _defaultChatButtonSubTitleStyles.defaultChatButtonSubTitleStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.subtitleStyleProps)
|
|
81
85
|
};
|
|
82
|
-
const hideChatTitle = ((_props$
|
|
83
|
-
const hideChatSubtitle = ((_props$
|
|
84
|
-
const titleDir = ((_props$
|
|
85
|
-
const titleText = ((_props$
|
|
86
|
-
const subtitleDir = ((_props$
|
|
87
|
-
const subtitleText = ((_props$
|
|
86
|
+
const hideChatTitle = ((_props$controlProps6 = props.controlProps) === null || _props$controlProps6 === void 0 ? void 0 : _props$controlProps6.hideChatTitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTitle);
|
|
87
|
+
const hideChatSubtitle = ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.hideChatSubtitle) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatSubtitle);
|
|
88
|
+
const titleDir = ((_props$controlProps8 = props.controlProps) === null || _props$controlProps8 === void 0 ? void 0 : _props$controlProps8.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
89
|
+
const titleText = ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.titleText);
|
|
90
|
+
const subtitleDir = ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
91
|
+
const subtitleText = ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.subtitleText);
|
|
88
92
|
return (0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.textContainer) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
89
93
|
styles: textContainerStyles,
|
|
90
94
|
className: (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : (_props$styleProps8$cl = _props$styleProps8.classNames) === null || _props$styleProps8$cl === void 0 ? void 0 : _props$styleProps8$cl.textContainerClassName,
|
|
@@ -105,27 +109,27 @@ function TextContainer(props, parentId) {
|
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
function ChatButton(props) {
|
|
108
|
-
var _props$
|
|
109
|
-
|
|
110
|
-
const elementId = ((_props$
|
|
111
|
-
const defaultAriaLabel = ((_props$
|
|
112
|
-
const defaultRole = ((_props$
|
|
113
|
-
const containersDir = ((_props$
|
|
114
|
-
const hideChatButton = ((_props$
|
|
115
|
-
const hideChatIcon = ((_props$
|
|
116
|
-
const hideChatTextContainer = ((_props$
|
|
117
|
-
const hideNotificationBubble = ((_props$
|
|
112
|
+
var _props$controlProps12, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$controlProps16, _props$controlProps17, _props$controlProps18, _props$controlProps19, _props$styleProps11;
|
|
113
|
+
|
|
114
|
+
const elementId = ((_props$controlProps12 = props.controlProps) === null || _props$controlProps12 === void 0 ? void 0 : _props$controlProps12.id) ?? _Constants.Ids.DefaultChatButtonId;
|
|
115
|
+
const defaultAriaLabel = ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.ariaLabel) ?? _defaultChatButtonControlProps.defaultChatButtonControlProps.ariaLabel;
|
|
116
|
+
const defaultRole = ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.role) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.role);
|
|
117
|
+
const containersDir = ((_props$controlProps15 = props.controlProps) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.dir) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.dir);
|
|
118
|
+
const hideChatButton = ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.hideChatButton) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatButton);
|
|
119
|
+
const hideChatIcon = ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.hideChatIcon) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatIcon);
|
|
120
|
+
const hideChatTextContainer = ((_props$controlProps18 = props.controlProps) === null || _props$controlProps18 === void 0 ? void 0 : _props$controlProps18.hideChatTextContainer) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideChatTextContainer);
|
|
121
|
+
const hideNotificationBubble = ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.hideNotificationBubble) ?? (_defaultChatButtonControlProps.defaultChatButtonControlProps === null || _defaultChatButtonControlProps.defaultChatButtonControlProps === void 0 ? void 0 : _defaultChatButtonControlProps.defaultChatButtonControlProps.hideNotificationBubble);
|
|
118
122
|
const chatButtonGroupStyles = {
|
|
119
123
|
root: Object.assign({}, _defaultChatButtonGeneralStyles.defaultChatButtonGeneralStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.generalStyleProps)
|
|
120
124
|
};
|
|
121
125
|
const handleInitiateChatClick = (0, _react2.useCallback)(() => {
|
|
122
|
-
var _props$
|
|
126
|
+
var _props$controlProps20;
|
|
123
127
|
|
|
124
|
-
if ((_props$
|
|
128
|
+
if ((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.onClick) {
|
|
125
129
|
const customEvent = {
|
|
126
130
|
elementType: _Constants.ElementType.ChatButton,
|
|
127
131
|
elementId: elementId,
|
|
128
|
-
eventName:
|
|
132
|
+
eventName: _Constants.EventNames.OnClick
|
|
129
133
|
};
|
|
130
134
|
|
|
131
135
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -150,7 +154,7 @@ function ChatButton(props) {
|
|
|
150
154
|
onClick: handleInitiateChatClick,
|
|
151
155
|
onKeyDown: handleInputKeyDown,
|
|
152
156
|
"aria-label": defaultAriaLabel
|
|
153
|
-
}, !hideChatIcon && IconContainer(props, elementId), !
|
|
157
|
+
}, !hideChatIcon && IconContainer(props, elementId), !hideNotificationBubble && NotificationBubble(props, elementId), !hideChatTextContainer && TextContainer(props, elementId)));
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
var _default = ChatButton;
|
|
@@ -4,14 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultChatButtonControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const defaultChatButtonControlProps = {
|
|
8
|
-
id:
|
|
11
|
+
id: _Constants.Ids.DefaultChatButtonId,
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
role: "button",
|
|
11
|
-
ariaLabel:
|
|
14
|
+
ariaLabel: _Constants.AriaLabels.LetsChatWeAreOnline,
|
|
12
15
|
unreadMessageCount: "0",
|
|
13
|
-
titleText:
|
|
14
|
-
subtitleText:
|
|
16
|
+
titleText: _Constants.Texts.ChatButtonTitle,
|
|
17
|
+
subtitleText: _Constants.Texts.ChatButtonSubtitle,
|
|
15
18
|
onClick: function () {
|
|
16
19
|
console.log("initiate chat");
|
|
17
20
|
},
|
|
@@ -20,6 +23,9 @@ const defaultChatButtonControlProps = {
|
|
|
20
23
|
hideChatTextContainer: false,
|
|
21
24
|
hideChatSubtitle: false,
|
|
22
25
|
hideChatTitle: false,
|
|
23
|
-
hideNotificationBubble: true
|
|
26
|
+
hideNotificationBubble: true,
|
|
27
|
+
unreadMessageString: _Constants.Texts.ChatButtonUnreadMessageString,
|
|
28
|
+
largeUnreadMessageString: _Constants.Texts.ChatButtonLargeUnreadMessageString,
|
|
29
|
+
ariaLabelUnreadMessageString: _Constants.AriaLabels.UnreadMessageString
|
|
24
30
|
};
|
|
25
31
|
exports.defaultChatButtonControlProps = defaultChatButtonControlProps;
|
package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js
CHANGED
|
@@ -14,7 +14,9 @@ const defaultChatButtonSubTitleStyles = {
|
|
|
14
14
|
fontWeight: "200",
|
|
15
15
|
margin: "0px 14px 0px 14px",
|
|
16
16
|
overflow: "hidden",
|
|
17
|
+
padding: "0px",
|
|
17
18
|
textOverflow: "ellipsis !important",
|
|
18
|
-
|
|
19
|
+
whiteSpace: "nowrap",
|
|
20
|
+
width: "90px"
|
|
19
21
|
};
|
|
20
22
|
exports.defaultChatButtonSubTitleStyles = defaultChatButtonSubTitleStyles;
|
|
@@ -18,17 +18,42 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
20
|
function CommandButton(props) {
|
|
21
|
+
var _props$hoverStyles, _props$hoverStyles2, _props$focusStyles;
|
|
22
|
+
|
|
21
23
|
//imageIconProps > iconName
|
|
22
24
|
const iconProp = props.imageIconProps ? {
|
|
23
25
|
imageProps: props.imageIconProps
|
|
24
26
|
} : {
|
|
25
|
-
iconName: props.iconName
|
|
26
|
-
styles: {
|
|
27
|
-
root: props.styles
|
|
28
|
-
}
|
|
27
|
+
iconName: props.iconName
|
|
29
28
|
};
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
let iconStyles = {};
|
|
30
|
+
|
|
31
|
+
if (props.type === _Constants.ButtonTypes.Icon) {
|
|
32
|
+
var _props$styles;
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.icon)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const buttonStyles = {
|
|
40
|
+
icon: { ...iconStyles
|
|
41
|
+
},
|
|
42
|
+
root: {
|
|
43
|
+
selectors: {
|
|
44
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles = props.hoverStyles) === null || _props$hoverStyles === void 0 ? void 0 : _props$hoverStyles.icon)
|
|
46
|
+
},
|
|
47
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles2 = props.hoverStyles) === null || _props$hoverStyles2 === void 0 ? void 0 : _props$hoverStyles2.icon)
|
|
49
|
+
},
|
|
50
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
+
...(props === null || props === void 0 ? void 0 : (_props$focusStyles = props.focusStyles) === null || _props$focusStyles === void 0 ? void 0 : _props$focusStyles.icon)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
56
|
+
},
|
|
32
57
|
rootHovered: props.hoverStyles,
|
|
33
58
|
rootFocused: props.focusStyles,
|
|
34
59
|
rootPressed: props.hoverStyles
|
|
@@ -36,7 +61,7 @@ function CommandButton(props) {
|
|
|
36
61
|
const handleOnClick = (0, _react2.useCallback)(() => {
|
|
37
62
|
if (props !== null && props !== void 0 && props.onClick) {
|
|
38
63
|
const customEvent = props.customEvent ?? {
|
|
39
|
-
eventName:
|
|
64
|
+
eventName: _Constants.EventNames.OnClick,
|
|
40
65
|
elementType: _Constants.ElementType.Custom,
|
|
41
66
|
elementId: props === null || props === void 0 ? void 0 : props.id
|
|
42
67
|
};
|
|
@@ -46,21 +71,21 @@ function CommandButton(props) {
|
|
|
46
71
|
props === null || props === void 0 ? void 0 : props.onClick();
|
|
47
72
|
}
|
|
48
73
|
}, []);
|
|
49
|
-
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, props.type ===
|
|
74
|
+
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, props.type === _Constants.ButtonTypes.Text && /*#__PURE__*/_react2.default.createElement(_react.DefaultButton, {
|
|
50
75
|
id: props.id,
|
|
51
76
|
text: props.text,
|
|
52
77
|
ariaLabel: props.ariaLabel,
|
|
53
78
|
onClick: handleOnClick,
|
|
54
79
|
disabled: props.disabled,
|
|
55
80
|
className: props.className,
|
|
56
|
-
styles:
|
|
57
|
-
}), props.type ===
|
|
81
|
+
styles: buttonStyles
|
|
82
|
+
}), props.type === _Constants.ButtonTypes.Icon && /*#__PURE__*/_react2.default.createElement(_react.IconButton, {
|
|
58
83
|
id: props.id,
|
|
59
84
|
iconProps: iconProp,
|
|
60
|
-
title: props.ariaLabel,
|
|
85
|
+
title: props.hideButtonTitle ? undefined : props.ariaLabel,
|
|
61
86
|
ariaLabel: props.ariaLabel,
|
|
62
87
|
disabled: props.disabled,
|
|
63
|
-
styles:
|
|
88
|
+
styles: buttonStyles,
|
|
64
89
|
onClick: handleOnClick,
|
|
65
90
|
className: props.className
|
|
66
91
|
}));
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _Constants = require("../../../common/Constants");
|
|
11
11
|
|
|
12
|
-
var _CommandButton = _interopRequireDefault(require("
|
|
12
|
+
var _CommandButton = _interopRequireDefault(require("../commandbutton/CommandButton"));
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -18,23 +18,24 @@ function CloseButton(props) {
|
|
|
18
18
|
type
|
|
19
19
|
} = props;
|
|
20
20
|
const customEvent = {
|
|
21
|
-
elementType: _Constants.ElementType.
|
|
21
|
+
elementType: _Constants.ElementType.CloseButton,
|
|
22
22
|
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
23
|
-
eventName:
|
|
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 ??
|
|
28
|
+
text: props.text ?? _Constants.Texts.CloseButtonText,
|
|
29
29
|
styles: props.styles,
|
|
30
30
|
hoverStyles: props.hoverStyles,
|
|
31
31
|
focusStyles: props.focusStyles,
|
|
32
|
-
iconName: props.iconName ??
|
|
32
|
+
iconName: props.iconName ?? _Constants.IconNames.ChromeClose,
|
|
33
33
|
imageIconProps: props.imageIconProps,
|
|
34
34
|
onClick: props.onClick,
|
|
35
|
-
ariaLabel: props.ariaLabel ??
|
|
35
|
+
ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.Close,
|
|
36
36
|
className: props.className,
|
|
37
|
-
customEvent: customEvent
|
|
37
|
+
customEvent: customEvent,
|
|
38
|
+
hideButtonTitle: props.hideButtonTitle
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -56,7 +56,7 @@ function ConfirmationPane(props) {
|
|
|
56
56
|
const customEvent = {
|
|
57
57
|
elementType: _Constants.ElementType.ConfirmationPaneConfirmButton,
|
|
58
58
|
elementId: elementId + "-confirmbutton",
|
|
59
|
-
eventName:
|
|
59
|
+
eventName: _Constants.EventNames.OnClick
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -73,13 +73,19 @@ function ConfirmationPane(props) {
|
|
|
73
73
|
const customEvent = {
|
|
74
74
|
elementType: _Constants.ElementType.ConfirmationPaneCancelButton,
|
|
75
75
|
elementId: elementId + "-cancelbutton",
|
|
76
|
-
eventName:
|
|
76
|
+
eventName: _Constants.EventNames.OnClick
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
80
80
|
|
|
81
81
|
(_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.onCancel();
|
|
82
82
|
}
|
|
83
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
+
|
|
85
|
+
const handleEscKeyDown = (0, _react2.useCallback)(e => {
|
|
86
|
+
if (e.code === _Constants.KeyCodes.ESCAPE) {
|
|
87
|
+
handleCancelClick();
|
|
88
|
+
}
|
|
83
89
|
}, []);
|
|
84
90
|
const containerStyles = {
|
|
85
91
|
root: Object.assign({}, _defaultConfirmationPaneGeneralStyles.defaultConfirmationPaneGeneralStyles, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
|
|
@@ -107,6 +113,7 @@ function ConfirmationPane(props) {
|
|
|
107
113
|
};
|
|
108
114
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
109
115
|
id: elementId,
|
|
116
|
+
onKeyDown: handleEscKeyDown,
|
|
110
117
|
tabIndex: -1,
|
|
111
118
|
dir: ((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.dir) || _defaultConfirmationPaneControlProps.defaultConfirmationPaneControlProps.dir,
|
|
112
119
|
styles: containerStyles,
|
|
@@ -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:
|
|
11
|
+
id: _Constants.Ids.DefaultConfirmationPaneId,
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideConfirmationPane: false,
|
|
11
14
|
hideTitle: false,
|
|
12
|
-
titleText:
|
|
15
|
+
titleText: _Constants.Texts.ConfirmationPaneTitle,
|
|
13
16
|
hideSubtitle: false,
|
|
14
|
-
subtitleText:
|
|
17
|
+
subtitleText: _Constants.Texts.ConfirmationPaneSubtitle,
|
|
15
18
|
hideConfirmButton: false,
|
|
16
|
-
confirmButtonText:
|
|
17
|
-
confirmButtonAriaLabel:
|
|
19
|
+
confirmButtonText: _Constants.Texts.ConfirmButtonText,
|
|
20
|
+
confirmButtonAriaLabel: _Constants.AriaLabels.ConfirmationPaneConfirm,
|
|
18
21
|
hideCancelButton: false,
|
|
19
|
-
cancelButtonText:
|
|
20
|
-
cancelButtonAriaLabel:
|
|
22
|
+
cancelButtonText: _Constants.Texts.CancelButtonText,
|
|
23
|
+
cancelButtonAriaLabel: _Constants.AriaLabels.ConfirmationPaneCancel,
|
|
21
24
|
onConfirm: function () {
|
|
22
25
|
console.log("on confirm");
|
|
23
26
|
},
|
|
@@ -6,9 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.defaultConfirmationPaneButtonGroupStyles = void 0;
|
|
7
7
|
const defaultConfirmationPaneButtonGroupStyles = {
|
|
8
8
|
display: "flex",
|
|
9
|
+
width: "auto",
|
|
10
|
+
height: "auto",
|
|
11
|
+
boxSizing: "border-box",
|
|
9
12
|
flexFlow: "row",
|
|
10
13
|
justifyContent: "center",
|
|
11
14
|
alignItems: "center",
|
|
12
|
-
gap: "10px"
|
|
15
|
+
gap: "10px",
|
|
16
|
+
marginBottom: "10px"
|
|
13
17
|
};
|
|
14
18
|
exports.defaultConfirmationPaneButtonGroupStyles = defaultConfirmationPaneButtonGroupStyles;
|
|
@@ -5,19 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultConfirmationPaneGeneralStyles = void 0;
|
|
7
7
|
const defaultConfirmationPaneGeneralStyles = {
|
|
8
|
+
display: "flex",
|
|
9
|
+
minHeight: "160px",
|
|
10
|
+
maxHeight: "300px",
|
|
11
|
+
boxSizing: "border-box",
|
|
8
12
|
backgroundColor: "white",
|
|
9
13
|
borderRadius: "2px",
|
|
10
14
|
color: "black",
|
|
11
15
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
12
16
|
fontSize: "14px",
|
|
13
|
-
height: "160px",
|
|
14
17
|
padding: "10px 20px",
|
|
15
|
-
width: "262px",
|
|
16
18
|
position: "absolute",
|
|
17
19
|
justifyContent: "center",
|
|
18
20
|
alignItems: "center",
|
|
19
|
-
display: "flex",
|
|
20
21
|
flexFlow: "column",
|
|
21
|
-
zIndex: "9999"
|
|
22
|
+
zIndex: "9999",
|
|
23
|
+
left: "26px",
|
|
24
|
+
right: "26px"
|
|
22
25
|
};
|
|
23
26
|
exports.defaultConfirmationPaneGeneralStyles = defaultConfirmationPaneGeneralStyles;
|
|
@@ -21,13 +21,15 @@ 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); }
|
|
27
29
|
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
31
|
|
|
30
|
-
function _extends() { _extends = Object.assign
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
33
|
|
|
32
34
|
(0, _react2.initializeIcons)();
|
|
33
35
|
|
|
@@ -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:
|
|
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))
|
|
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, {
|
|
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, {
|
|
85
77
|
horizontal: true,
|
|
86
|
-
id:
|
|
87
|
-
verticalAlign: "
|
|
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,
|
|
90
|
-
|
|
82
|
+
id: _Constants.Ids.FooterRightGroupId,
|
|
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:
|
|
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:
|
|
35
|
-
type:
|
|
36
|
+
id: _Constants.Ids.DownloadTranscriptButtonId,
|
|
37
|
+
type: _Constants.ButtonTypes.Icon,
|
|
36
38
|
imageIconProps: {
|
|
37
39
|
src: _Icons.TranscriptDownloadIconBase64
|
|
38
40
|
},
|
|
39
|
-
ariaLabel:
|
|
41
|
+
ariaLabel: _Constants.AriaLabels.DownloadChatTranscript
|
|
40
42
|
},
|
|
41
43
|
emailTranscriptButtonProps: {
|
|
42
|
-
id:
|
|
43
|
-
type:
|
|
44
|
+
id: _Constants.Ids.EmailTranscriptButtonId,
|
|
45
|
+
type: _Constants.ButtonTypes.Icon,
|
|
44
46
|
imageIconProps: {
|
|
45
47
|
src: _Icons.TranscriptEmailIconBase64
|
|
46
48
|
},
|
|
47
|
-
ariaLabel:
|
|
49
|
+
ariaLabel: _Constants.AriaLabels.EmailTranscript
|
|
48
50
|
},
|
|
49
51
|
audioNotificationButtonProps: {
|
|
50
|
-
id:
|
|
51
|
-
ariaLabel:
|
|
52
|
-
toggleAriaLabel:
|
|
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:
|
|
11
|
+
id: _Constants.Ids.DefaultFooterId,
|
|
9
12
|
hideDownloadTranscriptButton: false,
|
|
10
13
|
hideEmailTranscriptButton: false,
|
|
11
14
|
hideAudioNotificationButton: false,
|
|
@@ -28,23 +31,24 @@ const defaultFooterControlProps = {
|
|
|
28
31
|
children: []
|
|
29
32
|
},
|
|
30
33
|
downloadTranscriptButtonProps: {
|
|
31
|
-
id:
|
|
32
|
-
type:
|
|
33
|
-
iconName:
|
|
34
|
-
ariaLabel:
|
|
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:
|
|
38
|
-
type:
|
|
39
|
-
iconName:
|
|
40
|
-
ariaLabel:
|
|
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:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
54
|
exports.defaultFooterControlProps = defaultFooterControlProps;
|
|
@@ -11,11 +11,13 @@ const defaultFooterStyleProps = {
|
|
|
11
11
|
minHeight: "25px",
|
|
12
12
|
width: "100%",
|
|
13
13
|
minWidth: "250px",
|
|
14
|
-
padding: "
|
|
14
|
+
padding: "5px"
|
|
15
15
|
},
|
|
16
16
|
downloadTranscriptButtonStyleProps: {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
icon: {
|
|
18
|
+
color: "blue",
|
|
19
|
+
fontSize: 16
|
|
20
|
+
},
|
|
19
21
|
height: "25px",
|
|
20
22
|
lineHeight: "25px",
|
|
21
23
|
width: "25px"
|
|
@@ -25,8 +27,10 @@ const defaultFooterStyleProps = {
|
|
|
25
27
|
backgroundColor: "#C8C8C8"
|
|
26
28
|
},
|
|
27
29
|
emailTranscriptButtonStyleProps: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
icon: {
|
|
31
|
+
color: "blue",
|
|
32
|
+
fontSize: 16
|
|
33
|
+
},
|
|
30
34
|
height: "25px",
|
|
31
35
|
lineHeight: "25px",
|
|
32
36
|
width: "25px"
|
|
@@ -36,8 +40,10 @@ const defaultFooterStyleProps = {
|
|
|
36
40
|
backgroundColor: "#C8C8C8"
|
|
37
41
|
},
|
|
38
42
|
audioNotificationButtonStyleProps: {
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
icon: {
|
|
44
|
+
color: "blue",
|
|
45
|
+
fontSize: 16
|
|
46
|
+
},
|
|
41
47
|
height: "25px",
|
|
42
48
|
lineHeight: "25px",
|
|
43
49
|
width: "25px"
|