@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
|
@@ -22,28 +22,45 @@ function AudioNotificationButton(props) {
|
|
|
22
22
|
disabled
|
|
23
23
|
} = props;
|
|
24
24
|
const [muted, setMuted] = (0, _react2.useState)(props.isAudioMuted);
|
|
25
|
+
let iconStyles = {};
|
|
26
|
+
|
|
27
|
+
if (props.type === _Constants.ButtonTypes.Icon) {
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : props.styles).icon
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
const iconButtonStyles = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
icon: iconStyles,
|
|
35
|
+
root: {
|
|
36
|
+
selectors: {
|
|
37
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
39
|
+
},
|
|
40
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
42
|
+
},
|
|
43
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
...(props === null || props === void 0 ? void 0 : props.focusStyles).icon
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
49
|
+
},
|
|
50
|
+
rootHovered: props.hoverStyles,
|
|
51
|
+
rootFocused: props.focusStyles,
|
|
52
|
+
rootPressed: props.hoverStyles
|
|
30
53
|
}; //imageIconProps > iconName
|
|
31
54
|
|
|
32
55
|
const volume0Icon = props.imageToggleIconProps ? {
|
|
33
56
|
imageProps: props === null || props === void 0 ? void 0 : props.imageToggleIconProps
|
|
34
57
|
} : {
|
|
35
|
-
iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ??
|
|
36
|
-
styles: {
|
|
37
|
-
root: props.styles
|
|
38
|
-
}
|
|
58
|
+
iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? _Constants.IconNames.Volume0
|
|
39
59
|
};
|
|
40
60
|
const volume3Icon = props.imageIconProps ? {
|
|
41
61
|
imageProps: props === null || props === void 0 ? void 0 : props.imageIconProps
|
|
42
62
|
} : {
|
|
43
|
-
iconName: (props === null || props === void 0 ? void 0 : props.iconName) ??
|
|
44
|
-
styles: {
|
|
45
|
-
root: props.styles
|
|
46
|
-
}
|
|
63
|
+
iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? _Constants.IconNames.Volume3
|
|
47
64
|
};
|
|
48
65
|
const handleOnClick = (0, _react2.useCallback)(() => {
|
|
49
66
|
setMuted(!muted);
|
|
@@ -52,7 +69,7 @@ function AudioNotificationButton(props) {
|
|
|
52
69
|
const customEvent = {
|
|
53
70
|
elementType: _Constants.ElementType.FooterSoundNotificationButton,
|
|
54
71
|
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
55
|
-
eventName:
|
|
72
|
+
eventName: _Constants.EventNames.OnClick
|
|
56
73
|
};
|
|
57
74
|
|
|
58
75
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -71,7 +88,7 @@ function AudioNotificationButton(props) {
|
|
|
71
88
|
disabled: disabled,
|
|
72
89
|
styles: iconButtonStyles,
|
|
73
90
|
className: props.className,
|
|
74
|
-
title: muted ? props.toggleAriaLabel ??
|
|
91
|
+
title: muted ? props.toggleAriaLabel ?? _Constants.AriaLabels.TurnSoundOn : props.ariaLabel ?? _Constants.AriaLabels.TurnSoundOff
|
|
75
92
|
});
|
|
76
93
|
}
|
|
77
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:
|
|
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.DownloadChatTranscriptText,
|
|
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.Download,
|
|
33
33
|
imageIconProps: props.imageIconProps,
|
|
34
34
|
onClick: props.onClick,
|
|
35
|
-
ariaLabel: props.ariaLabel ??
|
|
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:
|
|
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.EmailTranscriptText,
|
|
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.Mail,
|
|
33
33
|
imageIconProps: props.imageIconProps,
|
|
34
34
|
onClick: props.onClick,
|
|
35
|
-
ariaLabel: props.ariaLabel ??
|
|
35
|
+
ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.EmailTranscript,
|
|
36
36
|
className: props.className,
|
|
37
37
|
customEvent: customEvent
|
|
38
38
|
});
|
|
@@ -9,7 +9,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@fluentui/react");
|
|
11
11
|
|
|
12
|
-
var _CloseButton = _interopRequireDefault(require("
|
|
12
|
+
var _CloseButton = _interopRequireDefault(require("../common/subcomponents/CloseButton"));
|
|
13
13
|
|
|
14
14
|
var _MinimizeButton = _interopRequireDefault(require("./subcomponents/MinimizeButton"));
|
|
15
15
|
|
|
@@ -19,13 +19,15 @@ 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); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
29
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
31
|
|
|
30
32
|
(0, _react2.initializeIcons)();
|
|
31
33
|
|
|
@@ -63,7 +65,7 @@ function Header(props) {
|
|
|
63
65
|
role: "region"
|
|
64
66
|
}, /*#__PURE__*/React.createElement(_react2.Stack, {
|
|
65
67
|
horizontal: true,
|
|
66
|
-
id:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
35
|
+
type: _Constants.ButtonTypes.Icon
|
|
34
36
|
},
|
|
35
37
|
closeButtonProps: {
|
|
36
38
|
id: "oc-lcw-header-closebutton",
|
|
37
|
-
type:
|
|
39
|
+
type: _Constants.ButtonTypes.Text,
|
|
38
40
|
text: "End Chat"
|
|
39
41
|
},
|
|
40
42
|
headerIconProps: {
|
|
41
|
-
id:
|
|
43
|
+
id: _Constants.Ids.HeaderIconId,
|
|
42
44
|
src: _Icons.LegacyChatIconBase64,
|
|
43
|
-
alt:
|
|
45
|
+
alt: _Constants.Texts.HeaderIcon
|
|
44
46
|
},
|
|
45
47
|
headerTitleProps: {
|
|
46
|
-
id:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
60
|
+
id: _Constants.Ids.HeaderIconId,
|
|
59
61
|
src: _Icons.LegacyChatIconBase64,
|
|
60
|
-
alt:
|
|
62
|
+
alt: _Constants.Texts.HeaderIcon
|
|
61
63
|
},
|
|
62
64
|
headerTitleProps: {
|
|
63
|
-
id:
|
|
64
|
-
text:
|
|
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:
|
|
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:
|
|
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:
|
|
33
|
-
type:
|
|
34
|
-
iconName:
|
|
34
|
+
id: _Constants.Ids.MinimizeButtonId,
|
|
35
|
+
type: _Constants.ButtonTypes.Icon,
|
|
36
|
+
iconName: _Constants.IconNames.ChromeMinimize
|
|
35
37
|
},
|
|
36
38
|
closeButtonProps: {
|
|
37
|
-
id:
|
|
38
|
-
type:
|
|
39
|
-
iconName:
|
|
39
|
+
id: _Constants.Ids.CloseButtonId,
|
|
40
|
+
type: _Constants.ButtonTypes.Icon,
|
|
41
|
+
iconName: _Constants.IconNames.ChromeClose
|
|
40
42
|
},
|
|
41
43
|
headerIconProps: {
|
|
42
|
-
id:
|
|
44
|
+
id: _Constants.Ids.HeaderIconId,
|
|
43
45
|
src: _Icons.ModernChatIconBase64,
|
|
44
|
-
alt:
|
|
46
|
+
alt: _Constants.Texts.HeaderIcon
|
|
45
47
|
},
|
|
46
48
|
headerTitleProps: {
|
|
47
|
-
id:
|
|
48
|
-
text:
|
|
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:
|
|
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.MinimizeText,
|
|
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.ChromeMinimize,
|
|
33
33
|
imageIconProps: props.imageIconProps,
|
|
34
34
|
onClick: props.onClick,
|
|
35
|
-
ariaLabel: props.ariaLabel ??
|
|
35
|
+
ariaLabel: props.ariaLabel ?? _Constants.AriaLabels.Minimize,
|
|
36
36
|
className: props.className,
|
|
37
37
|
customEvent: customEvent
|
|
38
38
|
});
|
|
@@ -55,23 +55,28 @@ function InputValidationPane(props) {
|
|
|
55
55
|
const [isInitialRendering, setIsInitialRendering] = (0, _react2.useState)(true);
|
|
56
56
|
const [isInvalidInput, setIsInvalidInput] = (0, _react2.useState)(false);
|
|
57
57
|
const [isSendButtonEnabled, setIsSendButtonEnabled] = (0, _react2.useState)(false);
|
|
58
|
-
|
|
59
|
-
const isValidInput = () => {
|
|
58
|
+
const isValidInput = (0, _react2.useCallback)(() => {
|
|
60
59
|
var _props$controlProps2, _props$controlProps3;
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
if (!((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.checkInput)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!inputValue) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
64
68
|
|
|
69
|
+
return (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.checkInput(inputValue);
|
|
70
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
71
|
|
|
66
|
-
const handleInputChange = e => {
|
|
72
|
+
const handleInputChange = (0, _react2.useCallback)(e => {
|
|
67
73
|
var _props$controlProps4, _props$controlProps5;
|
|
68
74
|
|
|
69
75
|
setInputValue(e.target.value);
|
|
70
76
|
e.target.value ? setIsSendButtonEnabled(((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.enableSendButton) || e.target.value !== "") : setIsSendButtonEnabled(((_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.enableSendButton) ?? false);
|
|
71
77
|
setIsInvalidInput(false);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const send = (controlId, suffix) => {
|
|
78
|
+
}, []);
|
|
79
|
+
const send = (0, _react2.useCallback)((controlId, suffix) => {
|
|
75
80
|
var _props$controlProps6;
|
|
76
81
|
|
|
77
82
|
if ((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.onSend) {
|
|
@@ -90,20 +95,17 @@ function InputValidationPane(props) {
|
|
|
90
95
|
setIsInvalidInput(true);
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
const handleInputKeyDown = e => {
|
|
100
|
+
const handleInputKeyUp = (0, _react2.useCallback)(e => {
|
|
97
101
|
if (e.code === _Constants.KeyCodes.ENTER) {
|
|
98
|
-
send(elementId + "-textField", "
|
|
102
|
+
send(elementId + "-textField", "KeyUp");
|
|
99
103
|
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const handleSendClick = () => {
|
|
104
|
+
}, [inputValue]);
|
|
105
|
+
const handleSendClick = (0, _react2.useCallback)(() => {
|
|
103
106
|
send(elementId + "-sendbutton", "Click");
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const cancel = (controlId, suffix) => {
|
|
107
|
+
}, [inputValue]);
|
|
108
|
+
const cancel = (0, _react2.useCallback)((controlId, suffix) => {
|
|
107
109
|
var _props$controlProps8;
|
|
108
110
|
|
|
109
111
|
if ((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.onCancel) {
|
|
@@ -121,19 +123,16 @@ function InputValidationPane(props) {
|
|
|
121
123
|
|
|
122
124
|
(_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.onCancel();
|
|
123
125
|
}
|
|
124
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
125
|
-
|
|
126
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
127
|
|
|
127
|
-
const handleEscKeyDown = e => {
|
|
128
|
+
const handleEscKeyDown = (0, _react2.useCallback)(e => {
|
|
128
129
|
if (e.code === _Constants.KeyCodes.ESCAPE) {
|
|
129
130
|
cancel(elementId, "KeyDown");
|
|
130
131
|
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const handleCancelClick = () => {
|
|
132
|
+
}, []);
|
|
133
|
+
const handleCancelClick = (0, _react2.useCallback)(() => {
|
|
134
134
|
cancel(elementId + "-cancelbutton", "Click");
|
|
135
|
-
};
|
|
136
|
-
|
|
135
|
+
}, []);
|
|
137
136
|
(0, _react2.useEffect)(() => {
|
|
138
137
|
var _props$controlProps11, _props$controlProps12, _props$controlProps13;
|
|
139
138
|
|
|
@@ -160,7 +159,8 @@ function InputValidationPane(props) {
|
|
|
160
159
|
const redBorderStyles = {
|
|
161
160
|
borderColor: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.inputWithErrorMessageBorderColor) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputWithErrorMessageBorderColor,
|
|
162
161
|
borderRadius: "1px",
|
|
163
|
-
borderStyle: "solid"
|
|
162
|
+
borderStyle: "solid",
|
|
163
|
+
borderWidth: "1px"
|
|
164
164
|
};
|
|
165
165
|
const inputStyles = {
|
|
166
166
|
root: Object.assign({}, _defaultInputValidationPaneInputStyles.defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
@@ -244,7 +244,7 @@ function InputValidationPane(props) {
|
|
|
244
244
|
ariaLabel: ((_props$controlProps24 = props.controlProps) === null || _props$controlProps24 === void 0 ? void 0 : _props$controlProps24.inputAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.inputAriaLabel,
|
|
245
245
|
borderless: isInvalidInput,
|
|
246
246
|
onChange: handleInputChange,
|
|
247
|
-
|
|
247
|
+
onKeyUp: handleInputKeyUp
|
|
248
248
|
})), isInvalidInput && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
249
249
|
className: (_props$styleProps22 = props.styleProps) === null || _props$styleProps22 === void 0 ? void 0 : (_props$styleProps22$c = _props$styleProps22.classNames) === null || _props$styleProps22$c === void 0 ? void 0 : _props$styleProps22$c.invalidInputErrorMessageClassName,
|
|
250
250
|
styles: invalidInputErrorMessageStyles,
|
|
@@ -8,28 +8,28 @@ exports.defaultInputValidationPaneControlProps = void 0;
|
|
|
8
8
|
var _Constants = require("../../../../../common/Constants");
|
|
9
9
|
|
|
10
10
|
const defaultInputValidationPaneControlProps = {
|
|
11
|
-
id:
|
|
11
|
+
id: _Constants.Ids.DefaultInputValidationPaneId,
|
|
12
12
|
dir: "ltr",
|
|
13
13
|
hideInputValidationPane: false,
|
|
14
|
-
inputValidationPaneAriaLabel:
|
|
14
|
+
inputValidationPaneAriaLabel: _Constants.AriaLabels.EmailChatTranscriptPane,
|
|
15
15
|
hideTitle: false,
|
|
16
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.InputValidationPaneTitleText,
|
|
17
17
|
hideSubtitle: false,
|
|
18
|
-
subtitleText:
|
|
19
|
-
inputId:
|
|
18
|
+
subtitleText: _Constants.Texts.InputValidationPaneSubtitleText,
|
|
19
|
+
inputId: _Constants.Ids.DefaultInputValidationPaneInputId,
|
|
20
20
|
inputInitialText: "",
|
|
21
21
|
hideInput: false,
|
|
22
|
-
inputAriaLabel:
|
|
22
|
+
inputAriaLabel: _Constants.AriaLabels.InputValidationPaneInput,
|
|
23
23
|
inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
|
|
24
|
-
invalidInputErrorMessageText:
|
|
24
|
+
invalidInputErrorMessageText: _Constants.Texts.InvalidInputErrorMessageText,
|
|
25
25
|
isButtonGroupHorizontal: true,
|
|
26
26
|
hideSendButton: false,
|
|
27
27
|
enableSendButton: false,
|
|
28
|
-
sendButtonText:
|
|
29
|
-
sendButtonAriaLabel:
|
|
28
|
+
sendButtonText: _Constants.Texts.SendButtonText,
|
|
29
|
+
sendButtonAriaLabel: _Constants.AriaLabels.Send,
|
|
30
30
|
hideCancelButton: false,
|
|
31
|
-
cancelButtonText:
|
|
32
|
-
cancelButtonAriaLabel:
|
|
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");
|
|
@@ -16,6 +16,7 @@ const defaultInputValidationPaneCancelButtonStyles = {
|
|
|
16
16
|
fontWeight: "500",
|
|
17
17
|
lineHeight: "19px",
|
|
18
18
|
textOverflow: "ellipsis",
|
|
19
|
-
whiteSpace: "nowrap"
|
|
19
|
+
whiteSpace: "nowrap",
|
|
20
|
+
width: "80px"
|
|
20
21
|
};
|
|
21
22
|
exports.defaultInputValidationPaneCancelButtonStyles = defaultInputValidationPaneCancelButtonStyles;
|
|
@@ -13,10 +13,10 @@ const defaultInputValidationPaneGeneralStyles = {
|
|
|
13
13
|
borderTopWidth: "1px",
|
|
14
14
|
bottom: "0",
|
|
15
15
|
left: "0",
|
|
16
|
-
minHeight: "180px",
|
|
17
16
|
padding: "10px",
|
|
18
17
|
position: "absolute",
|
|
19
18
|
width: "100%",
|
|
19
|
+
maxHeight: "100%",
|
|
20
20
|
zIndex: "9999"
|
|
21
21
|
};
|
|
22
22
|
exports.defaultInputValidationPaneGeneralStyles = defaultInputValidationPaneGeneralStyles;
|
|
@@ -12,6 +12,7 @@ const defaultInputValidationPaneSendButtonStyles = {
|
|
|
12
12
|
fontWeight: "500",
|
|
13
13
|
lineHeight: "19px",
|
|
14
14
|
textOverflow: "ellipsis",
|
|
15
|
-
whiteSpace: "nowrap"
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
width: "80px"
|
|
16
17
|
};
|
|
17
18
|
exports.defaultInputValidationPaneSendButtonStyles = defaultInputValidationPaneSendButtonStyles;
|
|
@@ -8,27 +8,27 @@ exports.presetTwoInputValidationPaneControlProps = void 0;
|
|
|
8
8
|
var _Constants = require("../../../../../common/Constants");
|
|
9
9
|
|
|
10
10
|
const presetTwoInputValidationPaneControlProps = {
|
|
11
|
-
id:
|
|
11
|
+
id: _Constants.Ids.DefaultInputValidationPaneId,
|
|
12
12
|
dir: "ltr",
|
|
13
13
|
hideInputValidationPane: false,
|
|
14
|
-
inputValidationPaneAriaLabel:
|
|
14
|
+
inputValidationPaneAriaLabel: _Constants.AriaLabels.EmailChatTranscriptPane,
|
|
15
15
|
hideTitle: false,
|
|
16
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.InputValidationPaneTitleText,
|
|
17
17
|
hideSubtitle: false,
|
|
18
|
-
subtitleText:
|
|
19
|
-
inputId:
|
|
18
|
+
subtitleText: _Constants.Texts.InputValidationPaneSubtitleText,
|
|
19
|
+
inputId: _Constants.Ids.DefaultInputValidationPaneInputId,
|
|
20
20
|
hideInput: false,
|
|
21
|
-
inputAriaLabel:
|
|
21
|
+
inputAriaLabel: _Constants.AriaLabels.InputValidationPaneInput,
|
|
22
22
|
inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
|
|
23
|
-
invalidInputErrorMessageText:
|
|
23
|
+
invalidInputErrorMessageText: _Constants.Texts.InvalidInputErrorMessageText,
|
|
24
24
|
isButtonGroupHorizontal: false,
|
|
25
25
|
hideSendButton: false,
|
|
26
26
|
enableSendButton: true,
|
|
27
|
-
sendButtonText:
|
|
28
|
-
sendButtonAriaLabel:
|
|
27
|
+
sendButtonText: _Constants.Texts.SendButtonText,
|
|
28
|
+
sendButtonAriaLabel: _Constants.AriaLabels.Send,
|
|
29
29
|
hideCancelButton: false,
|
|
30
|
-
cancelButtonText:
|
|
31
|
-
cancelButtonAriaLabel:
|
|
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) ??
|
|
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
|
};
|
|
@@ -52,13 +52,14 @@ function LoadingPane(props) {
|
|
|
52
52
|
const spinnerTextStyles = {
|
|
53
53
|
root: Object.assign({}, _defaultLoadingPaneSpinnerTextStyles.defaultLoadingPaneSpinnerTextStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.spinnerTextStyleProps)
|
|
54
54
|
};
|
|
55
|
+
const showInSmallWindow = props.windowHeight ? props.windowHeight > 375 : true;
|
|
55
56
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, !((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.hideLoadingPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
56
57
|
id: elementId,
|
|
57
58
|
tabIndex: -1,
|
|
58
59
|
styles: containerStyles,
|
|
59
60
|
role: (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.role,
|
|
60
61
|
dir: ((_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.dir) ?? _defaultLoadingPaneControlProps.defaultLoadingPaneControlProps.dir
|
|
61
|
-
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
62
|
+
}, !((_props$controlProps5 = props.controlProps) !== null && _props$controlProps5 !== void 0 && _props$controlProps5.hideIcon) && showInSmallWindow && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.icon) || /*#__PURE__*/_react2.default.createElement(_react.Icon, {
|
|
62
63
|
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.iconClassName,
|
|
63
64
|
styles: iconStyles,
|
|
64
65
|
imageProps: iconImageProps,
|
package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js
CHANGED
|
@@ -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:
|
|
11
|
+
id: _Constants.Ids.DefaultLoadingPaneId,
|
|
9
12
|
dir: "auto",
|
|
10
13
|
hideLoadingPane: false,
|
|
11
14
|
hideIcon: false,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.LoadingPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.LoadingPaneSubtitleText,
|
|
16
19
|
hideSpinner: false,
|
|
17
20
|
hideSpinnerText: false,
|
|
18
|
-
spinnerText:
|
|
21
|
+
spinnerText: _Constants.Texts.LoadingPaneSpinnerText
|
|
19
22
|
};
|
|
20
23
|
exports.defaultLoadingPaneControlProps = defaultLoadingPaneControlProps;
|