@microsoft/omnichannel-chat-components 0.1.0-main.2eda736 → 0.1.0-main.307185
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 +12 -7
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +31 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +31 -1
- package/lib/cjs/components/chatbutton/ChatButton.js +37 -26
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
- package/lib/cjs/components/common/commandbutton/CommandButton.js +36 -10
- package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +4 -3
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/cjs/components/footer/Footer.js +2 -2
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +30 -11
- package/lib/cjs/components/header/Header.js +2 -2
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +76 -46
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -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/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +6 -4
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +33 -30
- package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/services/BroadcastService.js +36 -8
- package/lib/esm/common/Constants.js +10 -5
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +33 -3
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/customizedCurrentCallStyleProps.js +0 -12
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultStyles/defaultCurrentCallStyleProps.js +0 -12
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +33 -3
- package/lib/esm/components/chatbutton/ChatButton.js +37 -26
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +4 -1
- package/lib/esm/components/common/commandbutton/CommandButton.js +36 -10
- package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +4 -3
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +12 -10
- package/lib/esm/components/footer/Footer.js +2 -2
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +1 -0
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +12 -6
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +30 -11
- package/lib/esm/components/header/Header.js +2 -2
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +77 -47
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -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/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +1 -1
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +6 -4
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +2 -1
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +30 -29
- package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +5 -1
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +14 -12
- package/lib/esm/index.js +1 -0
- package/lib/esm/services/BroadcastService.js +34 -8
- package/lib/types/common/Constants.d.ts +8 -2
- package/lib/types/components/callingcontainer/subcomponents/CurrentCall/interfaces/ICurrentCallStyleProps.d.ts +0 -4
- 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/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +1 -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 +4 -7
|
@@ -4,19 +4,45 @@ import { BroadcastService } from "../../../services/BroadcastService";
|
|
|
4
4
|
import { ElementType } from "../../../common/Constants";
|
|
5
5
|
|
|
6
6
|
function CommandButton(props) {
|
|
7
|
+
var _props$hoverStyles, _props$hoverStyles2, _props$focusStyles;
|
|
8
|
+
|
|
7
9
|
//imageIconProps > iconName
|
|
8
10
|
const iconProp = props.imageIconProps ? {
|
|
9
11
|
imageProps: props.imageIconProps
|
|
10
12
|
} : {
|
|
11
|
-
iconName: props.iconName
|
|
12
|
-
styles: {
|
|
13
|
-
root: props.styles
|
|
14
|
-
}
|
|
13
|
+
iconName: props.iconName
|
|
15
14
|
};
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
let iconStyles = {};
|
|
16
|
+
|
|
17
|
+
if (props.type === "icon") {
|
|
18
|
+
var _props$styles;
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.icon)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const buttonStyles = {
|
|
26
|
+
icon: { ...iconStyles
|
|
27
|
+
},
|
|
28
|
+
root: {
|
|
29
|
+
selectors: {
|
|
30
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles = props.hoverStyles) === null || _props$hoverStyles === void 0 ? void 0 : _props$hoverStyles.icon)
|
|
32
|
+
},
|
|
33
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
...(props === null || props === void 0 ? void 0 : (_props$hoverStyles2 = props.hoverStyles) === null || _props$hoverStyles2 === void 0 ? void 0 : _props$hoverStyles2.icon)
|
|
35
|
+
},
|
|
36
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
...(props === null || props === void 0 ? void 0 : (_props$focusStyles = props.focusStyles) === null || _props$focusStyles === void 0 ? void 0 : _props$focusStyles.icon)
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
42
|
+
},
|
|
18
43
|
rootHovered: props.hoverStyles,
|
|
19
|
-
rootFocused: props.focusStyles
|
|
44
|
+
rootFocused: props.focusStyles,
|
|
45
|
+
rootPressed: props.hoverStyles
|
|
20
46
|
};
|
|
21
47
|
const handleOnClick = useCallback(() => {
|
|
22
48
|
if (props !== null && props !== void 0 && props.onClick) {
|
|
@@ -36,14 +62,14 @@ function CommandButton(props) {
|
|
|
36
62
|
onClick: handleOnClick,
|
|
37
63
|
disabled: props.disabled,
|
|
38
64
|
className: props.className,
|
|
39
|
-
styles:
|
|
65
|
+
styles: buttonStyles
|
|
40
66
|
}), props.type === "icon" && /*#__PURE__*/React.createElement(IconButton, {
|
|
41
67
|
id: props.id,
|
|
42
68
|
iconProps: iconProp,
|
|
43
|
-
title: props.ariaLabel,
|
|
69
|
+
title: props.hideButtonTitle ? undefined : props.ariaLabel,
|
|
44
70
|
ariaLabel: props.ariaLabel,
|
|
45
71
|
disabled: props.disabled,
|
|
46
|
-
styles:
|
|
72
|
+
styles: buttonStyles,
|
|
47
73
|
onClick: handleOnClick,
|
|
48
74
|
className: props.className
|
|
49
75
|
}));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ElementType } from "../../../common/Constants";
|
|
3
|
-
import CommandButton from "
|
|
3
|
+
import CommandButton from "../commandbutton/CommandButton";
|
|
4
4
|
|
|
5
5
|
function CloseButton(props) {
|
|
6
6
|
const {
|
|
7
7
|
type
|
|
8
8
|
} = props;
|
|
9
9
|
const customEvent = {
|
|
10
|
-
elementType: ElementType.
|
|
10
|
+
elementType: ElementType.CloseButton,
|
|
11
11
|
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
12
12
|
eventName: "OnClick"
|
|
13
13
|
};
|
|
@@ -23,7 +23,8 @@ function CloseButton(props) {
|
|
|
23
23
|
onClick: props.onClick,
|
|
24
24
|
ariaLabel: props.ariaLabel ?? "Close",
|
|
25
25
|
className: props.className,
|
|
26
|
-
customEvent: customEvent
|
|
26
|
+
customEvent: customEvent,
|
|
27
|
+
hideButtonTitle: props.hideButtonTitle
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -17,7 +17,7 @@ import { defaultConfirmationPaneConfirmButtonFocusedStyles } from "./common/defa
|
|
|
17
17
|
import { defaultConfirmationPaneCancelButtonFocusedStyles } from "./common/defaultStyles/defaultConfirmationPaneCancelButtonFocusedStyles";
|
|
18
18
|
|
|
19
19
|
function ConfirmationPane(props) {
|
|
20
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$
|
|
20
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$styleProps13, _props$styleProps13$c, _props$controlProps9, _props$controlProps10, _props$componentOverr2, _props$styleProps14, _props$styleProps14$c, _props$controlProps11, _props$styleProps15, _props$styleProps15$c, _props$controlProps12, _props$componentOverr3, _props$styleProps16, _props$styleProps16$c, _props$controlProps13, _props$controlProps14, _props$controlProps15, _props$componentOverr4, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17;
|
|
21
21
|
|
|
22
22
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultConfirmationPaneControlProps.id;
|
|
23
23
|
const handleConfirmClick = useCallback(() => {
|
|
@@ -65,12 +65,14 @@ function ConfirmationPane(props) {
|
|
|
65
65
|
const confirmButtonStyles = {
|
|
66
66
|
root: Object.assign({}, defaultConfirmationPaneConfirmButtonStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.confirmButtonStyleProps),
|
|
67
67
|
rootHovered: Object.assign({}, defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.confirmButtonHoveredStyleProps),
|
|
68
|
-
rootFocused: Object.assign({}, defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps)
|
|
68
|
+
rootFocused: Object.assign({}, defaultConfirmationPaneConfirmButtonFocusedStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.confirmButtonFocusedStyleProps),
|
|
69
|
+
rootPressed: Object.assign({}, defaultConfirmationPaneConfirmButtonHoveredStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.confirmButtonHoveredStyleProps)
|
|
69
70
|
};
|
|
70
71
|
const cancelButtonStyles = {
|
|
71
|
-
root: Object.assign({}, defaultConfirmationPaneCancelButtonStyles, (_props$
|
|
72
|
-
rootHovered: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$
|
|
73
|
-
rootFocused: Object.assign({}, defaultConfirmationPaneCancelButtonFocusedStyles, (_props$
|
|
72
|
+
root: Object.assign({}, defaultConfirmationPaneCancelButtonStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.cancelButtonStyleProps),
|
|
73
|
+
rootHovered: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.cancelButtonHoveredStyleProps),
|
|
74
|
+
rootFocused: Object.assign({}, defaultConfirmationPaneCancelButtonFocusedStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.cancelButtonFocusedStyleProps),
|
|
75
|
+
rootPressed: Object.assign({}, defaultConfirmationPaneCancelButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.cancelButtonHoveredStyleProps)
|
|
74
76
|
};
|
|
75
77
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hideConfirmationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
76
78
|
id: elementId,
|
|
@@ -81,29 +83,29 @@ function ConfirmationPane(props) {
|
|
|
81
83
|
"aria-labelledby": elementId + "-title",
|
|
82
84
|
"aria-describedby": elementId + "-subtitle"
|
|
83
85
|
}, !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
84
|
-
className: (_props$
|
|
86
|
+
className: (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : (_props$styleProps13$c = _props$styleProps13.classNames) === null || _props$styleProps13$c === void 0 ? void 0 : _props$styleProps13$c.titleClassName,
|
|
85
87
|
styles: titleStyles,
|
|
86
88
|
tabIndex: -1,
|
|
87
89
|
id: elementId + "-title"
|
|
88
90
|
}, ((_props$controlProps9 = props.controlProps) === null || _props$controlProps9 === void 0 ? void 0 : _props$controlProps9.titleText) || defaultConfirmationPaneControlProps.titleText)), !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
89
|
-
className: (_props$
|
|
91
|
+
className: (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : (_props$styleProps14$c = _props$styleProps14.classNames) === null || _props$styleProps14$c === void 0 ? void 0 : _props$styleProps14$c.subtitleClassName,
|
|
90
92
|
styles: subtitleStyles,
|
|
91
93
|
tabIndex: -1,
|
|
92
94
|
id: elementId + "-subtitle"
|
|
93
95
|
}, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.subtitleText) || defaultConfirmationPaneControlProps.subtitleText)), /*#__PURE__*/React.createElement(Stack, {
|
|
94
96
|
horizontal: true,
|
|
95
|
-
className: (_props$
|
|
97
|
+
className: (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : (_props$styleProps15$c = _props$styleProps15.classNames) === null || _props$styleProps15$c === void 0 ? void 0 : _props$styleProps15$c.buttonGroupClassName,
|
|
96
98
|
styles: buttonGroupStyles,
|
|
97
99
|
id: elementId + "-buttongroup"
|
|
98
100
|
}, !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideConfirmButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.confirmButton) || /*#__PURE__*/React.createElement(PrimaryButton, {
|
|
99
|
-
className: (_props$
|
|
101
|
+
className: (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : (_props$styleProps16$c = _props$styleProps16.classNames) === null || _props$styleProps16$c === void 0 ? void 0 : _props$styleProps16$c.confirmButtonClassName,
|
|
100
102
|
styles: confirmButtonStyles,
|
|
101
103
|
text: ((_props$controlProps13 = props.controlProps) === null || _props$controlProps13 === void 0 ? void 0 : _props$controlProps13.confirmButtonText) || defaultConfirmationPaneControlProps.confirmButtonText,
|
|
102
104
|
onClick: handleConfirmClick,
|
|
103
105
|
id: elementId + "-confirmbutton",
|
|
104
106
|
ariaLabel: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.confirmButtonAriaLabel) || defaultConfirmationPaneControlProps.confirmButtonAriaLabel
|
|
105
107
|
})), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideCancelButton) && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.cancelButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
106
|
-
className: (_props$
|
|
108
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.cancelButtonClassName,
|
|
107
109
|
styles: cancelButtonStyles,
|
|
108
110
|
text: ((_props$controlProps16 = props.controlProps) === null || _props$controlProps16 === void 0 ? void 0 : _props$controlProps16.cancelButtonText) || defaultConfirmationPaneControlProps.cancelButtonText,
|
|
109
111
|
onClick: handleCancelClick,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Stack, initializeIcons } from "@fluentui/react";
|
|
@@ -66,7 +66,7 @@ function Footer(props) {
|
|
|
66
66
|
verticalAlign: "start"
|
|
67
67
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
68
68
|
horizontal: true,
|
|
69
|
-
verticalAlign: "
|
|
69
|
+
verticalAlign: "center"
|
|
70
70
|
}, processCustomComponents((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : (_props$controlProps15 = _props$controlProps14.rightGroup) === null || _props$controlProps15 === void 0 ? void 0 : _props$controlProps15.children), !((_props$controlProps16 = props.controlProps) !== null && _props$controlProps16 !== void 0 && _props$controlProps16.hideAudioNotificationButton) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.AudioNotificationButton) || /*#__PURE__*/React.createElement(AudioNotificationButton, _extends({}, audioNotificationButtonProps, {
|
|
71
71
|
onClick: (_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.onAudioNotificationClick,
|
|
72
72
|
styles: audioNotificationButtonStyles,
|
|
@@ -8,8 +8,10 @@ export const defaultFooterStyleProps = {
|
|
|
8
8
|
padding: "0 10px 5px 10px"
|
|
9
9
|
},
|
|
10
10
|
downloadTranscriptButtonStyleProps: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
icon: {
|
|
12
|
+
color: "blue",
|
|
13
|
+
fontSize: 16
|
|
14
|
+
},
|
|
13
15
|
height: "25px",
|
|
14
16
|
lineHeight: "25px",
|
|
15
17
|
width: "25px"
|
|
@@ -19,8 +21,10 @@ export const defaultFooterStyleProps = {
|
|
|
19
21
|
backgroundColor: "#C8C8C8"
|
|
20
22
|
},
|
|
21
23
|
emailTranscriptButtonStyleProps: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
icon: {
|
|
25
|
+
color: "blue",
|
|
26
|
+
fontSize: 16
|
|
27
|
+
},
|
|
24
28
|
height: "25px",
|
|
25
29
|
lineHeight: "25px",
|
|
26
30
|
width: "25px"
|
|
@@ -30,8 +34,10 @@ export const defaultFooterStyleProps = {
|
|
|
30
34
|
backgroundColor: "#C8C8C8"
|
|
31
35
|
},
|
|
32
36
|
audioNotificationButtonStyleProps: {
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
icon: {
|
|
38
|
+
color: "blue",
|
|
39
|
+
fontSize: 16
|
|
40
|
+
},
|
|
35
41
|
height: "25px",
|
|
36
42
|
lineHeight: "25px",
|
|
37
43
|
width: "25px"
|
|
@@ -8,27 +8,45 @@ function AudioNotificationButton(props) {
|
|
|
8
8
|
disabled
|
|
9
9
|
} = props;
|
|
10
10
|
const [muted, setMuted] = useState(props.isAudioMuted);
|
|
11
|
+
let iconStyles = {};
|
|
12
|
+
|
|
13
|
+
if (props.type === "icon") {
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
iconStyles = { ...(props === null || props === void 0 ? void 0 : props.styles).icon
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
const iconButtonStyles = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
icon: iconStyles,
|
|
21
|
+
root: {
|
|
22
|
+
selectors: {
|
|
23
|
+
":hover .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
25
|
+
},
|
|
26
|
+
":active .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
...(props === null || props === void 0 ? void 0 : props.hoverStyles).icon
|
|
28
|
+
},
|
|
29
|
+
":focus .ms-Button-icon": { // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
...(props === null || props === void 0 ? void 0 : props.focusStyles).icon
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
...(props === null || props === void 0 ? void 0 : props.styles)
|
|
35
|
+
},
|
|
36
|
+
rootHovered: props.hoverStyles,
|
|
37
|
+
rootFocused: props.focusStyles,
|
|
38
|
+
rootPressed: props.hoverStyles
|
|
15
39
|
}; //imageIconProps > iconName
|
|
16
40
|
|
|
17
41
|
const volume0Icon = props.imageToggleIconProps ? {
|
|
18
42
|
imageProps: props === null || props === void 0 ? void 0 : props.imageToggleIconProps
|
|
19
43
|
} : {
|
|
20
|
-
iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0"
|
|
21
|
-
styles: {
|
|
22
|
-
root: props.styles
|
|
23
|
-
}
|
|
44
|
+
iconName: (props === null || props === void 0 ? void 0 : props.toggleIconName) ?? "Volume0"
|
|
24
45
|
};
|
|
25
46
|
const volume3Icon = props.imageIconProps ? {
|
|
26
47
|
imageProps: props === null || props === void 0 ? void 0 : props.imageIconProps
|
|
27
48
|
} : {
|
|
28
|
-
iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3"
|
|
29
|
-
styles: {
|
|
30
|
-
root: props.styles
|
|
31
|
-
}
|
|
49
|
+
iconName: (props === null || props === void 0 ? void 0 : props.iconName) ?? "Volume3"
|
|
32
50
|
};
|
|
33
51
|
const handleOnClick = useCallback(() => {
|
|
34
52
|
setMuted(!muted);
|
|
@@ -54,6 +72,7 @@ function AudioNotificationButton(props) {
|
|
|
54
72
|
disabled: disabled,
|
|
55
73
|
styles: iconButtonStyles,
|
|
56
74
|
className: props.className,
|
|
75
|
+
"aria-label": muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off",
|
|
57
76
|
title: muted ? props.toggleAriaLabel ?? "Turn sound on" : props.ariaLabel ?? "Turn sound off"
|
|
58
77
|
});
|
|
59
78
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Image, Label, Stack, initializeIcons } from "@fluentui/react";
|
|
5
|
-
import CloseButton from "
|
|
5
|
+
import CloseButton from "../common/subcomponents/CloseButton";
|
|
6
6
|
import MinimizeButton from "./subcomponents/MinimizeButton";
|
|
7
7
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
8
8
|
import { defaultHeaderProps } from "./common/defaultProps/defaultHeaderProps";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultButton, PrimaryButton } from "@fluentui/react/lib/Button";
|
|
2
2
|
import { Label, Stack, TextField } from "@fluentui/react";
|
|
3
|
-
import React, { useEffect, useState } from "react";
|
|
3
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
4
4
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
5
5
|
import { KeyCodes } from "../../common/Constants";
|
|
6
6
|
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
@@ -19,30 +19,35 @@ import { defaultInputValidationPaneTitleStyles } from "./common/default/defaultS
|
|
|
19
19
|
import { generateEventName } from "../../common/utils";
|
|
20
20
|
|
|
21
21
|
function InputValidationPane(props) {
|
|
22
|
-
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps14, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$controlProps15, _props$
|
|
22
|
+
var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps14, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$styleProps13, _props$styleProps14, _props$styleProps15, _props$styleProps16, _props$controlProps15, _props$styleProps17, _props$styleProps17$c, _props$controlProps16, _props$controlProps17, _props$styleProps18, _props$styleProps18$c, _props$controlProps18, _props$componentOverr, _props$styleProps19, _props$styleProps19$c, _props$controlProps19, _props$controlProps20, _props$componentOverr2, _props$styleProps20, _props$styleProps20$c, _props$controlProps21, _props$controlProps22, _props$componentOverr3, _props$styleProps21, _props$styleProps21$c, _props$controlProps23, _props$controlProps24, _props$componentOverr4, _props$styleProps22, _props$styleProps22$c, _props$controlProps25, _props$controlProps26, _props$controlProps27, _props$styleProps23, _props$styleProps23$c, _props$controlProps28, _props$componentOverr5, _props$styleProps24, _props$styleProps24$c, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$controlProps32, _props$componentOverr6, _props$styleProps25, _props$styleProps25$c, _props$controlProps33, _props$controlProps34, _props$controlProps35;
|
|
23
23
|
|
|
24
24
|
const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? defaultInputValidationPaneControlProps.id;
|
|
25
25
|
const [inputValue, setInputValue] = useState("");
|
|
26
26
|
const [isInitialRendering, setIsInitialRendering] = useState(true);
|
|
27
27
|
const [isInvalidInput, setIsInvalidInput] = useState(false);
|
|
28
28
|
const [isSendButtonEnabled, setIsSendButtonEnabled] = useState(false);
|
|
29
|
-
|
|
30
|
-
const isValidInput = () => {
|
|
29
|
+
const isValidInput = useCallback(() => {
|
|
31
30
|
var _props$controlProps2, _props$controlProps3;
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
if (!((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.checkInput)) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!inputValue) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
35
39
|
|
|
40
|
+
return (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.checkInput(inputValue);
|
|
41
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
42
|
|
|
37
|
-
const handleInputChange = e => {
|
|
43
|
+
const handleInputChange = useCallback(e => {
|
|
38
44
|
var _props$controlProps4, _props$controlProps5;
|
|
39
45
|
|
|
40
46
|
setInputValue(e.target.value);
|
|
41
47
|
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);
|
|
42
48
|
setIsInvalidInput(false);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const send = (controlId, suffix) => {
|
|
49
|
+
}, []);
|
|
50
|
+
const send = useCallback((controlId, suffix) => {
|
|
46
51
|
var _props$controlProps6;
|
|
47
52
|
|
|
48
53
|
if ((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.onSend) {
|
|
@@ -59,20 +64,17 @@ function InputValidationPane(props) {
|
|
|
59
64
|
setIsInvalidInput(true);
|
|
60
65
|
}
|
|
61
66
|
}
|
|
62
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
+
}, [inputValue]); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
const handleInputKeyDown = e => {
|
|
69
|
+
const handleInputKeyUp = useCallback(e => {
|
|
66
70
|
if (e.code === KeyCodes.ENTER) {
|
|
67
|
-
send(elementId + "-textField", "
|
|
71
|
+
send(elementId + "-textField", "KeyUp");
|
|
68
72
|
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const handleSendClick = () => {
|
|
73
|
+
}, [inputValue]);
|
|
74
|
+
const handleSendClick = useCallback(() => {
|
|
72
75
|
send(elementId + "-sendbutton", "Click");
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const cancel = (controlId, suffix) => {
|
|
76
|
+
}, [inputValue]);
|
|
77
|
+
const cancel = useCallback((controlId, suffix) => {
|
|
76
78
|
var _props$controlProps8;
|
|
77
79
|
|
|
78
80
|
if ((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.onCancel) {
|
|
@@ -88,19 +90,16 @@ function InputValidationPane(props) {
|
|
|
88
90
|
BroadcastService.postMessage(customEvent);
|
|
89
91
|
(_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.onCancel();
|
|
90
92
|
}
|
|
91
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
-
|
|
93
|
+
}, []); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
94
|
|
|
94
|
-
const handleEscKeyDown = e => {
|
|
95
|
+
const handleEscKeyDown = useCallback(e => {
|
|
95
96
|
if (e.code === KeyCodes.ESCAPE) {
|
|
96
97
|
cancel(elementId, "KeyDown");
|
|
97
98
|
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const handleCancelClick = () => {
|
|
99
|
+
}, []);
|
|
100
|
+
const handleCancelClick = useCallback(() => {
|
|
101
101
|
cancel(elementId + "-cancelbutton", "Click");
|
|
102
|
-
};
|
|
103
|
-
|
|
102
|
+
}, []);
|
|
104
103
|
useEffect(() => {
|
|
105
104
|
var _props$controlProps11, _props$controlProps12, _props$controlProps13;
|
|
106
105
|
|
|
@@ -127,30 +126,61 @@ function InputValidationPane(props) {
|
|
|
127
126
|
const redBorderStyles = {
|
|
128
127
|
borderColor: ((_props$controlProps14 = props.controlProps) === null || _props$controlProps14 === void 0 ? void 0 : _props$controlProps14.inputWithErrorMessageBorderColor) ?? defaultInputValidationPaneControlProps.inputWithErrorMessageBorderColor,
|
|
129
128
|
borderRadius: "1px",
|
|
130
|
-
borderStyle: "solid"
|
|
129
|
+
borderStyle: "solid",
|
|
130
|
+
borderWidth: "1px"
|
|
131
131
|
};
|
|
132
132
|
const inputStyles = {
|
|
133
|
-
root: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps)
|
|
133
|
+
root: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : _props$styleProps5.inputStyleProps),
|
|
134
|
+
field: Object.assign({}, defaultInputValidationPaneInputStyles, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.inputStyleProps),
|
|
135
|
+
fieldGroup: undefined,
|
|
136
|
+
prefix: undefined,
|
|
137
|
+
suffix: undefined,
|
|
138
|
+
icon: undefined,
|
|
139
|
+
description: undefined,
|
|
140
|
+
wrapper: undefined,
|
|
141
|
+
errorMessage: undefined,
|
|
142
|
+
subComponentStyles: {
|
|
143
|
+
label: {}
|
|
144
|
+
},
|
|
145
|
+
revealButton: undefined,
|
|
146
|
+
revealSpan: undefined,
|
|
147
|
+
revealIcon: undefined
|
|
134
148
|
};
|
|
135
149
|
const inputWithErrorMessageStyles = {
|
|
136
|
-
root: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$
|
|
150
|
+
root: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.inputStyleProps),
|
|
151
|
+
field: Object.assign({}, defaultInputValidationPaneInputStyles, redBorderStyles, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.inputStyleProps),
|
|
152
|
+
fieldGroup: undefined,
|
|
153
|
+
prefix: undefined,
|
|
154
|
+
suffix: undefined,
|
|
155
|
+
icon: undefined,
|
|
156
|
+
description: undefined,
|
|
157
|
+
wrapper: undefined,
|
|
158
|
+
errorMessage: undefined,
|
|
159
|
+
subComponentStyles: {
|
|
160
|
+
label: {}
|
|
161
|
+
},
|
|
162
|
+
revealButton: undefined,
|
|
163
|
+
revealSpan: undefined,
|
|
164
|
+
revealIcon: undefined
|
|
137
165
|
};
|
|
138
166
|
const invalidInputErrorMessageStyles = {
|
|
139
|
-
root: Object.assign({}, defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$
|
|
167
|
+
root: Object.assign({}, defaultInputValidationPaneInvalidInputErrorMessageStyles, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.invalidInputErrorMessageStyleProps)
|
|
140
168
|
};
|
|
141
169
|
const buttonGroupStyles = {
|
|
142
|
-
root: Object.assign({}, defaultInputValidationPaneButtonGroupStyles, (_props$
|
|
170
|
+
root: Object.assign({}, defaultInputValidationPaneButtonGroupStyles, (_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.buttonGroupStyleProps)
|
|
143
171
|
};
|
|
144
172
|
const sendButtonStyles = {
|
|
145
|
-
root: Object.assign({}, defaultInputValidationPaneSendButtonStyles, (_props$
|
|
146
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$
|
|
173
|
+
root: Object.assign({}, defaultInputValidationPaneSendButtonStyles, (_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.sendButtonStyleProps),
|
|
174
|
+
rootHovered: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.sendButtonHoveredStyleProps),
|
|
175
|
+
rootPressed: Object.assign({}, defaultInputValidationPaneSendButtonHoveredStyles, (_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.sendButtonHoveredStyleProps)
|
|
147
176
|
};
|
|
148
177
|
const cancelButtonStyles = {
|
|
149
|
-
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$
|
|
150
|
-
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$
|
|
178
|
+
root: Object.assign({}, defaultInputValidationPaneCancelButtonStyles, (_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.cancelButtonStyleProps),
|
|
179
|
+
rootHovered: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 ? void 0 : _props$styleProps15.cancelButtonHoveredStyleProps),
|
|
180
|
+
rootPressed: Object.assign({}, defaultInputValidationPaneCancelButtonHoveredStyles, (_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 ? void 0 : _props$styleProps16.cancelButtonHoveredStyleProps)
|
|
151
181
|
};
|
|
152
182
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hideInputValidationPane) && /*#__PURE__*/React.createElement(Stack, {
|
|
153
|
-
className: (_props$
|
|
183
|
+
className: (_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 ? void 0 : (_props$styleProps17$c = _props$styleProps17.classNames) === null || _props$styleProps17$c === void 0 ? void 0 : _props$styleProps17$c.containerClassName,
|
|
154
184
|
id: elementId,
|
|
155
185
|
tabIndex: -1,
|
|
156
186
|
onKeyDown: handleEscKeyDown,
|
|
@@ -158,22 +188,22 @@ function InputValidationPane(props) {
|
|
|
158
188
|
"aria-label": ((_props$controlProps17 = props.controlProps) === null || _props$controlProps17 === void 0 ? void 0 : _props$controlProps17.inputValidationPaneAriaLabel) || defaultInputValidationPaneControlProps.inputValidationPaneAriaLabel,
|
|
159
189
|
styles: containerStyles
|
|
160
190
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
161
|
-
className: (_props$
|
|
191
|
+
className: (_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 ? void 0 : (_props$styleProps18$c = _props$styleProps18.classNames) === null || _props$styleProps18$c === void 0 ? void 0 : _props$styleProps18$c.headerGroupClassName,
|
|
162
192
|
styles: headerGroupStyles,
|
|
163
193
|
tabIndex: -1,
|
|
164
194
|
id: elementId + "-headergroup"
|
|
165
195
|
}, !((_props$controlProps18 = props.controlProps) !== null && _props$controlProps18 !== void 0 && _props$controlProps18.hideTitle) && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.title) || /*#__PURE__*/React.createElement(Label, {
|
|
166
|
-
className: (_props$
|
|
196
|
+
className: (_props$styleProps19 = props.styleProps) === null || _props$styleProps19 === void 0 ? void 0 : (_props$styleProps19$c = _props$styleProps19.classNames) === null || _props$styleProps19$c === void 0 ? void 0 : _props$styleProps19$c.titleClassName,
|
|
167
197
|
styles: titleStyles,
|
|
168
198
|
tabIndex: -1,
|
|
169
199
|
id: elementId + "-title"
|
|
170
200
|
}, ((_props$controlProps19 = props.controlProps) === null || _props$controlProps19 === void 0 ? void 0 : _props$controlProps19.titleText) || defaultInputValidationPaneControlProps.titleText)), !((_props$controlProps20 = props.controlProps) !== null && _props$controlProps20 !== void 0 && _props$controlProps20.hideSubtitle) && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
171
|
-
className: (_props$
|
|
201
|
+
className: (_props$styleProps20 = props.styleProps) === null || _props$styleProps20 === void 0 ? void 0 : (_props$styleProps20$c = _props$styleProps20.classNames) === null || _props$styleProps20$c === void 0 ? void 0 : _props$styleProps20$c.subtitleClassName,
|
|
172
202
|
styles: subtitleStyles,
|
|
173
203
|
tabIndex: -1,
|
|
174
204
|
id: elementId + "-subtitle"
|
|
175
205
|
}, ((_props$controlProps21 = props.controlProps) === null || _props$controlProps21 === void 0 ? void 0 : _props$controlProps21.subtitleText) || defaultInputValidationPaneControlProps.subtitleText)), !((_props$controlProps22 = props.controlProps) !== null && _props$controlProps22 !== void 0 && _props$controlProps22.hideInput) && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.input) || /*#__PURE__*/React.createElement(TextField, {
|
|
176
|
-
className: (_props$
|
|
206
|
+
className: (_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 ? void 0 : (_props$styleProps21$c = _props$styleProps21.classNames) === null || _props$styleProps21$c === void 0 ? void 0 : _props$styleProps21$c.inputClassName,
|
|
177
207
|
styles: isInvalidInput ? inputWithErrorMessageStyles : inputStyles,
|
|
178
208
|
tabIndex: 0,
|
|
179
209
|
value: inputValue ?? defaultInputValidationPaneControlProps.inputInitialText,
|
|
@@ -181,9 +211,9 @@ function InputValidationPane(props) {
|
|
|
181
211
|
ariaLabel: ((_props$controlProps24 = props.controlProps) === null || _props$controlProps24 === void 0 ? void 0 : _props$controlProps24.inputAriaLabel) || defaultInputValidationPaneControlProps.inputAriaLabel,
|
|
182
212
|
borderless: isInvalidInput,
|
|
183
213
|
onChange: handleInputChange,
|
|
184
|
-
|
|
214
|
+
onKeyUp: handleInputKeyUp
|
|
185
215
|
})), isInvalidInput && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.invalidInputErrorMessage) || /*#__PURE__*/React.createElement(Stack, {
|
|
186
|
-
className: (_props$
|
|
216
|
+
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,
|
|
187
217
|
styles: invalidInputErrorMessageStyles,
|
|
188
218
|
"aria-label": ((_props$controlProps25 = props.controlProps) === null || _props$controlProps25 === void 0 ? void 0 : _props$controlProps25.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText,
|
|
189
219
|
tabIndex: -1,
|
|
@@ -191,12 +221,12 @@ function InputValidationPane(props) {
|
|
|
191
221
|
id: elementId + "-invalidinputerrormessage"
|
|
192
222
|
}, ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.invalidInputErrorMessageText) || defaultInputValidationPaneControlProps.invalidInputErrorMessageText))), /*#__PURE__*/React.createElement(Stack, {
|
|
193
223
|
horizontal: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.isButtonGroupHorizontal) ?? defaultInputValidationPaneControlProps.isButtonGroupHorizontal,
|
|
194
|
-
className: (_props$
|
|
224
|
+
className: (_props$styleProps23 = props.styleProps) === null || _props$styleProps23 === void 0 ? void 0 : (_props$styleProps23$c = _props$styleProps23.classNames) === null || _props$styleProps23$c === void 0 ? void 0 : _props$styleProps23$c.buttonGroupClassName,
|
|
195
225
|
styles: buttonGroupStyles,
|
|
196
226
|
tabIndex: -1,
|
|
197
227
|
id: elementId + "-buttongroup"
|
|
198
228
|
}, !((_props$controlProps28 = props.controlProps) !== null && _props$controlProps28 !== void 0 && _props$controlProps28.hideSendButton) && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.sendButton) || /*#__PURE__*/React.createElement(PrimaryButton, {
|
|
199
|
-
className: (_props$
|
|
229
|
+
className: (_props$styleProps24 = props.styleProps) === null || _props$styleProps24 === void 0 ? void 0 : (_props$styleProps24$c = _props$styleProps24.classNames) === null || _props$styleProps24$c === void 0 ? void 0 : _props$styleProps24$c.sendButtonClassName,
|
|
200
230
|
styles: sendButtonStyles,
|
|
201
231
|
title: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || defaultInputValidationPaneControlProps.sendButtonText,
|
|
202
232
|
tabIndex: 0,
|
|
@@ -206,7 +236,7 @@ function InputValidationPane(props) {
|
|
|
206
236
|
id: elementId + "-sendbutton",
|
|
207
237
|
ariaLabel: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.sendButtonAriaLabel) || defaultInputValidationPaneControlProps.sendButtonAriaLabel
|
|
208
238
|
})), !((_props$controlProps32 = props.controlProps) !== null && _props$controlProps32 !== void 0 && _props$controlProps32.hideCancelButton) && (decodeComponentString((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.cancelButton) || /*#__PURE__*/React.createElement(DefaultButton, {
|
|
209
|
-
className: (_props$
|
|
239
|
+
className: (_props$styleProps25 = props.styleProps) === null || _props$styleProps25 === void 0 ? void 0 : (_props$styleProps25$c = _props$styleProps25.classNames) === null || _props$styleProps25$c === void 0 ? void 0 : _props$styleProps25$c.cancelButtonClassName,
|
|
210
240
|
styles: cancelButtonStyles,
|
|
211
241
|
title: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || defaultInputValidationPaneControlProps.cancelButtonText,
|
|
212
242
|
tabIndex: 0,
|
|
@@ -15,7 +15,8 @@ function PostChatSurveyPane(props) {
|
|
|
15
15
|
const iframeStyles = {
|
|
16
16
|
height: "100vh",
|
|
17
17
|
width: "100%",
|
|
18
|
-
display: "block"
|
|
18
|
+
display: "block",
|
|
19
|
+
maxHeight: "100%"
|
|
19
20
|
};
|
|
20
21
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
21
22
|
id: elementId,
|