@microsoft/omnichannel-chat-components 1.0.6-main.d0effe1 → 1.0.7-main.6244c5e
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 +3 -1
- package/lib/cjs/components/notificationpane/NotificationPane.js +125 -0
- package/lib/cjs/components/notificationpane/interfaces/INotificationPaneProps.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectClassNames.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectControlProps.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectNotificationProps.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectStyleProps.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneClassNames.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneComponentOverrides.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneControlProps.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneInternal.js +1 -0
- package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneStyleProps.js +1 -0
- package/lib/cjs/components/notificationpane/subcomponents/CloseChatButton.js +43 -0
- package/lib/cjs/components/notificationpane/subcomponents/DismissButton.js +43 -0
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +4 -2
- package/lib/cjs/index.js +8 -0
- package/lib/esm/common/Constants.js +3 -1
- package/lib/esm/components/notificationpane/NotificationPane.js +110 -0
- package/lib/esm/components/notificationpane/interfaces/INotificationPaneProps.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectClassNames.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectControlProps.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectNotificationProps.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectStyleProps.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneClassNames.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneComponentOverrides.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneControlProps.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneInternal.js +1 -0
- package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneStyleProps.js +1 -0
- package/lib/esm/components/notificationpane/subcomponents/CloseChatButton.js +31 -0
- package/lib/esm/components/notificationpane/subcomponents/DismissButton.js +31 -0
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +3 -1
- package/lib/esm/index.js +1 -0
- package/lib/types/common/Constants.d.ts +3 -0
- package/lib/types/components/notificationpane/NotificationPane.d.ts +3 -0
- package/lib/types/components/notificationpane/interfaces/INotificationPaneProps.d.ts +8 -0
- package/lib/types/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectClassNames.d.ts +8 -0
- package/lib/types/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectControlProps.d.ts +10 -0
- package/lib/types/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectNotificationProps.d.ts +11 -0
- package/lib/types/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectStyleProps.d.ts +13 -0
- package/lib/types/components/notificationpane/interfaces/common/INotificationPaneClassNames.d.ts +11 -0
- package/lib/types/components/notificationpane/interfaces/common/INotificationPaneComponentOverrides.d.ts +12 -0
- package/lib/types/components/notificationpane/interfaces/common/INotificationPaneControlProps.d.ts +22 -0
- package/lib/types/components/notificationpane/interfaces/common/INotificationPaneInternal.d.ts +53 -0
- package/lib/types/components/notificationpane/interfaces/common/INotificationPaneStyleProps.d.ts +16 -0
- package/lib/types/components/notificationpane/subcomponents/CloseChatButton.d.ts +3 -0
- package/lib/types/components/notificationpane/subcomponents/DismissButton.d.ts +3 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,8 @@ exports.ElementType = ElementType;
|
|
|
32
32
|
ElementType["ChatButton"] = "ChatButton";
|
|
33
33
|
ElementType["CloseButton"] = "CloseButton";
|
|
34
34
|
ElementType["HeaderMinimizeButton"] = "HeaderMinimizeButton";
|
|
35
|
+
ElementType["NotificationDismissButton"] = "NotificationDismissButton";
|
|
36
|
+
ElementType["NotificationCloseChatButton"] = "NotificationCloseChatButton";
|
|
35
37
|
ElementType["FooterDownloadTranscriptButton"] = "FooterDownloadTranscriptButton";
|
|
36
38
|
ElementType["FooterEmailTranscriptButton"] = "FooterEmailTranscriptButton";
|
|
37
39
|
ElementType["FooterSoundNotificationButton"] = "FooterSoundNotificationButton";
|
|
@@ -52,7 +54,7 @@ exports.ElementType = ElementType;
|
|
|
52
54
|
ElementType["Custom"] = "Custom";
|
|
53
55
|
})(ElementType || (exports.ElementType = ElementType = {}));
|
|
54
56
|
|
|
55
|
-
const Ids = (_class3 = class Ids {}, _defineProperty(_class3, "DefaultCallingContainerId", "lcw-calling-container"), _defineProperty(_class3, "DefaultCurrentCallId", "lcw-current-call-container"), _defineProperty(_class3, "CurrentCallActionGroupId", "lcw-current-call-action-icons"), _defineProperty(_class3, "CurrentCallFooterId", "lcw-current-call-footer"), _defineProperty(_class3, "RemoteVideoTileId", "lcw-remote-video"), _defineProperty(_class3, "SelfVideoTileId", "lcw-self-video"), _defineProperty(_class3, "VideoTileGroupId", "lcw-current-call-body"), _defineProperty(_class3, "EndCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "MicButtonId", "lcw-toggle-audio"), _defineProperty(_class3, "VideoButtonId", "lcw-toggle-video"), _defineProperty(_class3, "CallTimerId", "lcw-current-call-timer"), _defineProperty(_class3, "CurrentCallLeftGroupId", "lcw-current-call-left-group"), _defineProperty(_class3, "CurrentCallMiddleGroupId", "lcw-current-call-middle-group"), _defineProperty(_class3, "CurrentCallRightGroupId", "lcw-current-call-right-group"), _defineProperty(_class3, "DefaultIncomingCallId", "lcw-incoming-call"), _defineProperty(_class3, "DeclineCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "AudioCallButtonId", "lcw-call-accept-button"), _defineProperty(_class3, "VideoCallButtonId", "lcw-video-call-accept-button"), _defineProperty(_class3, "IncomingCallTitleId", "lcw-incoming-call-message"), _defineProperty(_class3, "DefaultIncomingCallPopupId", "lcw-incoming-call-popup"), _defineProperty(_class3, "IncomingCallLeftGroupId", "lcw-incoming-call-left-group"), _defineProperty(_class3, "IncomingCallMiddleGroupId", "lcw-incoming-call-middle-group"), _defineProperty(_class3, "IncomingCallRightGroupId", "lcw-incoming-call-right-group"), _defineProperty(_class3, "DefaultChatButtonId", "lcw-components-chat-button"), _defineProperty(_class3, "DefaultConfirmationPaneId", "lcw-components-confirmation-pane"), _defineProperty(_class3, "CustomFooterId", "lcw-footer"), _defineProperty(_class3, "DownloadTranscriptButtonId", "lcw-footer-download-transcript-button"), _defineProperty(_class3, "EmailTranscriptButtonId", "lcw-footer-email-transcript-button"), _defineProperty(_class3, "AudioNotificationButtonId", "lcw-footer-audio-notification-button"), _defineProperty(_class3, "DefaultFooterId", "lcw-components-footer"), _defineProperty(_class3, "FooterLeftGroupId", "lcw-footer-left-group"), _defineProperty(_class3, "FooterMiddleGroupId", "lcw-footer-middle-group"), _defineProperty(_class3, "FooterRightGroupId", "lcw-footer-right-group"), _defineProperty(_class3, "DefaultHeaderId", "lcw-header"), _defineProperty(_class3, "MinimizeButtonId", "lcw-header-minimize-button"), _defineProperty(_class3, "CloseButtonId", "lcw-header-close-button"), _defineProperty(_class3, "HeaderIconId", "lcw-header-icon"), _defineProperty(_class3, "HeaderTitleId", "lcw-header-title"), _defineProperty(_class3, "HeaderLeftGroupId", "lcw-header-left-group"), _defineProperty(_class3, "HeaderMiddleGroupId", "lcw-header-middle-group"), _defineProperty(_class3, "HeaderRightGroupId", "lcw-header-right-group"), _defineProperty(_class3, "DefaultInputValidationPaneId", "lcw-email-transcript-dialog-container"), _defineProperty(_class3, "DefaultInputValidationPaneInputId", "lcw-email-transcript-dialog-text-field"), _defineProperty(_class3, "DefaultLoadingPaneId", "lcw-loading-pane"), _defineProperty(_class3, "DefaultOOOHPaneId", "lcw-out-of-office-hours-pane"), _defineProperty(_class3, "DefaultPostChatSurveyPaneId", "lcw-postchat-survey-pane"), _defineProperty(_class3, "DefaultPreChatSurveyPaneId", "lcw-prechat-survey-pane-default"), _defineProperty(_class3, "DefaultProactiveChatPaneId", "lcw-proactive-chat"), _defineProperty(_class3, "DefaultReconnectChatPaneId", "lcw-reconnect-chat-pane"), _class3);
|
|
57
|
+
const Ids = (_class3 = class Ids {}, _defineProperty(_class3, "DefaultCallingContainerId", "lcw-calling-container"), _defineProperty(_class3, "DefaultCurrentCallId", "lcw-current-call-container"), _defineProperty(_class3, "CurrentCallActionGroupId", "lcw-current-call-action-icons"), _defineProperty(_class3, "CurrentCallFooterId", "lcw-current-call-footer"), _defineProperty(_class3, "RemoteVideoTileId", "lcw-remote-video"), _defineProperty(_class3, "SelfVideoTileId", "lcw-self-video"), _defineProperty(_class3, "VideoTileGroupId", "lcw-current-call-body"), _defineProperty(_class3, "EndCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "MicButtonId", "lcw-toggle-audio"), _defineProperty(_class3, "VideoButtonId", "lcw-toggle-video"), _defineProperty(_class3, "CallTimerId", "lcw-current-call-timer"), _defineProperty(_class3, "CurrentCallLeftGroupId", "lcw-current-call-left-group"), _defineProperty(_class3, "CurrentCallMiddleGroupId", "lcw-current-call-middle-group"), _defineProperty(_class3, "CurrentCallRightGroupId", "lcw-current-call-right-group"), _defineProperty(_class3, "DefaultIncomingCallId", "lcw-incoming-call"), _defineProperty(_class3, "DeclineCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "AudioCallButtonId", "lcw-call-accept-button"), _defineProperty(_class3, "VideoCallButtonId", "lcw-video-call-accept-button"), _defineProperty(_class3, "IncomingCallTitleId", "lcw-incoming-call-message"), _defineProperty(_class3, "DefaultIncomingCallPopupId", "lcw-incoming-call-popup"), _defineProperty(_class3, "IncomingCallLeftGroupId", "lcw-incoming-call-left-group"), _defineProperty(_class3, "IncomingCallMiddleGroupId", "lcw-incoming-call-middle-group"), _defineProperty(_class3, "IncomingCallRightGroupId", "lcw-incoming-call-right-group"), _defineProperty(_class3, "DefaultChatButtonId", "lcw-components-chat-button"), _defineProperty(_class3, "DefaultConfirmationPaneId", "lcw-components-confirmation-pane"), _defineProperty(_class3, "CustomFooterId", "lcw-footer"), _defineProperty(_class3, "DownloadTranscriptButtonId", "lcw-footer-download-transcript-button"), _defineProperty(_class3, "EmailTranscriptButtonId", "lcw-footer-email-transcript-button"), _defineProperty(_class3, "AudioNotificationButtonId", "lcw-footer-audio-notification-button"), _defineProperty(_class3, "DefaultFooterId", "lcw-components-footer"), _defineProperty(_class3, "FooterLeftGroupId", "lcw-footer-left-group"), _defineProperty(_class3, "FooterMiddleGroupId", "lcw-footer-middle-group"), _defineProperty(_class3, "FooterRightGroupId", "lcw-footer-right-group"), _defineProperty(_class3, "DefaultHeaderId", "lcw-header"), _defineProperty(_class3, "MinimizeButtonId", "lcw-header-minimize-button"), _defineProperty(_class3, "CloseButtonId", "lcw-header-close-button"), _defineProperty(_class3, "HeaderIconId", "lcw-header-icon"), _defineProperty(_class3, "HeaderTitleId", "lcw-header-title"), _defineProperty(_class3, "HeaderLeftGroupId", "lcw-header-left-group"), _defineProperty(_class3, "HeaderMiddleGroupId", "lcw-header-middle-group"), _defineProperty(_class3, "HeaderRightGroupId", "lcw-header-right-group"), _defineProperty(_class3, "DefaultInputValidationPaneId", "lcw-email-transcript-dialog-container"), _defineProperty(_class3, "DefaultInputValidationPaneInputId", "lcw-email-transcript-dialog-text-field"), _defineProperty(_class3, "DefaultLoadingPaneId", "lcw-loading-pane"), _defineProperty(_class3, "DefaultNotificationPaneId", "lcw-notification-pane"), _defineProperty(_class3, "DefaultOOOHPaneId", "lcw-out-of-office-hours-pane"), _defineProperty(_class3, "DefaultPostChatSurveyPaneId", "lcw-postchat-survey-pane"), _defineProperty(_class3, "DefaultPreChatSurveyPaneId", "lcw-prechat-survey-pane-default"), _defineProperty(_class3, "DefaultProactiveChatPaneId", "lcw-proactive-chat"), _defineProperty(_class3, "DefaultReconnectChatPaneId", "lcw-reconnect-chat-pane"), _class3);
|
|
56
58
|
exports.Ids = Ids;
|
|
57
59
|
const ButtonTypes = (_class4 = class ButtonTypes {}, _defineProperty(_class4, "Icon", "icon"), _defineProperty(_class4, "Text", "text"), _class4);
|
|
58
60
|
exports.ButtonTypes = ButtonTypes;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _react2 = require("@fluentui/react");
|
|
11
|
+
|
|
12
|
+
var _DismissButton = _interopRequireDefault(require("./subcomponents/DismissButton"));
|
|
13
|
+
|
|
14
|
+
var _CloseChatButton = _interopRequireDefault(require("./subcomponents/CloseChatButton"));
|
|
15
|
+
|
|
16
|
+
var _decodeComponentString = require("../../common/decodeComponentString");
|
|
17
|
+
|
|
18
|
+
var _Constants = require("../../common/Constants");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
function NotificationPane(props) {
|
|
25
|
+
var _props$componentOverr, _props$componentOverr2, _props$componentOverr3, _props$componentOverr4, _props$componentOverr5, _props$dismissButtonP, _props$closeChatButto;
|
|
26
|
+
|
|
27
|
+
const elementId = props.id ?? _Constants.Ids.DefaultNotificationPaneId;
|
|
28
|
+
const containerStyles = {
|
|
29
|
+
root: Object.assign({}, props.generalStyleProps)
|
|
30
|
+
};
|
|
31
|
+
const titleStyles = {
|
|
32
|
+
root: Object.assign({}, props.titleStyleProps)
|
|
33
|
+
};
|
|
34
|
+
const subtitleStyles = {
|
|
35
|
+
root: Object.assign({}, props.subtitleStyleProps)
|
|
36
|
+
};
|
|
37
|
+
const hyperlinkStyles = {
|
|
38
|
+
root: Object.assign({}, props.hyperlinkStyleProps)
|
|
39
|
+
};
|
|
40
|
+
const hyperlinkHoverStyles = {
|
|
41
|
+
root: Object.assign({}, props.hyperlinkHoverStyleProps)
|
|
42
|
+
};
|
|
43
|
+
const notificationIconProps = Object.assign({}, props.notificationIconProps);
|
|
44
|
+
const notificationIconStyles = Object.assign({}, props.notificationIconStyleProps);
|
|
45
|
+
const notificationIconImageStyles = {
|
|
46
|
+
root: {},
|
|
47
|
+
image: notificationIconStyles
|
|
48
|
+
};
|
|
49
|
+
const notificationIconContainerStyles = {
|
|
50
|
+
root: Object.assign({}, props.notificationIconContainerStyleProps)
|
|
51
|
+
};
|
|
52
|
+
const dismissButtonProps = Object.assign({}, props.dismissButtonProps);
|
|
53
|
+
const dismissButtonStyles = Object.assign({}, props.dismissButtonStyleProps);
|
|
54
|
+
const dismissButtonHoverStyles = Object.assign({}, props.dismissButtonHoverStyleProps);
|
|
55
|
+
const closeChatButtonProps = Object.assign({}, props.closeChatButtonProps);
|
|
56
|
+
const closeChatButtonStyles = Object.assign({}, props.closeChatButtonStyleProps);
|
|
57
|
+
const closeChatButtonHoverStyles = Object.assign({}, props.closeChatButtonHoverStyleProps);
|
|
58
|
+
const infoGroupStyles = {
|
|
59
|
+
root: Object.assign({}, props.infoGroupStyleProps)
|
|
60
|
+
};
|
|
61
|
+
const buttonGroupStyles = {
|
|
62
|
+
root: Object.assign({}, props.buttonGroupStyleProps)
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_react2.Stack, {
|
|
65
|
+
className: props.containerClassName,
|
|
66
|
+
styles: containerStyles,
|
|
67
|
+
id: elementId,
|
|
68
|
+
dir: props.dir ?? "ltr",
|
|
69
|
+
tabIndex: -1,
|
|
70
|
+
role: "presentation"
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_react2.Stack, {
|
|
72
|
+
horizontal: true,
|
|
73
|
+
horizontalAlign: "space-between",
|
|
74
|
+
styles: containerStyles,
|
|
75
|
+
dir: props.dir ?? "ltr"
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_react2.Stack, {
|
|
77
|
+
styles: notificationIconContainerStyles
|
|
78
|
+
}, !props.hideNotificationIcon && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationIcon) || /*#__PURE__*/_react.default.createElement(_react2.Image, {
|
|
79
|
+
className: notificationIconProps.className,
|
|
80
|
+
id: notificationIconProps.id,
|
|
81
|
+
src: notificationIconProps.src,
|
|
82
|
+
alt: notificationIconProps.alt,
|
|
83
|
+
tabIndex: -1,
|
|
84
|
+
styles: notificationIconImageStyles
|
|
85
|
+
}))), /*#__PURE__*/_react.default.createElement(_react2.Stack, {
|
|
86
|
+
styles: infoGroupStyles,
|
|
87
|
+
dir: props.dir ?? "ltr"
|
|
88
|
+
}, !props.hideTitle && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.title) || /*#__PURE__*/_react.default.createElement(_react2.Label, {
|
|
89
|
+
className: props.titleClassName,
|
|
90
|
+
styles: titleStyles,
|
|
91
|
+
tabIndex: -1,
|
|
92
|
+
id: elementId + "-title"
|
|
93
|
+
}, props.titleText)), !props.hideSubtitle && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.subtitle) || /*#__PURE__*/_react.default.createElement(_react2.Label, {
|
|
94
|
+
className: props.subtitleClassName,
|
|
95
|
+
styles: subtitleStyles,
|
|
96
|
+
tabIndex: -1,
|
|
97
|
+
id: elementId + "-subtitle"
|
|
98
|
+
}, props.subtitleText)), !props.hideHyperlink && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.hyperlink) || /*#__PURE__*/_react.default.createElement(_react2.Link, {
|
|
99
|
+
className: props.hyperlinkClassName,
|
|
100
|
+
ariaLabel: props.hyperlinkAriaLabel,
|
|
101
|
+
id: elementId + "-hyperlink",
|
|
102
|
+
styles: hyperlinkStyles,
|
|
103
|
+
hoverStyles: hyperlinkHoverStyles,
|
|
104
|
+
target: "_blank",
|
|
105
|
+
rel: "noopener noreferrer",
|
|
106
|
+
href: props.hyperlinkHref
|
|
107
|
+
}, props.hyperlinkText))), !props.hideDismissButton && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.dismissButton) || /*#__PURE__*/_react.default.createElement(_DismissButton.default, _extends({}, dismissButtonProps, {
|
|
108
|
+
className: props.dismissButtonClassName,
|
|
109
|
+
onClick: (_props$dismissButtonP = props.dismissButtonProps) === null || _props$dismissButtonP === void 0 ? void 0 : _props$dismissButtonP.onClick,
|
|
110
|
+
styles: dismissButtonStyles,
|
|
111
|
+
hoverStyles: dismissButtonHoverStyles
|
|
112
|
+
})))), /*#__PURE__*/_react.default.createElement(_react2.Stack, {
|
|
113
|
+
horizontal: true,
|
|
114
|
+
styles: buttonGroupStyles,
|
|
115
|
+
dir: props.dir ?? "ltr"
|
|
116
|
+
}, !props.hideCloseChatButton && /*#__PURE__*/_react.default.createElement(_CloseChatButton.default, _extends({}, closeChatButtonProps, {
|
|
117
|
+
className: props.closeChatButtonClassName,
|
|
118
|
+
onClick: (_props$closeChatButto = props.closeChatButtonProps) === null || _props$closeChatButto === void 0 ? void 0 : _props$closeChatButto.onClick,
|
|
119
|
+
styles: closeChatButtonStyles,
|
|
120
|
+
hoverStyles: closeChatButtonHoverStyles
|
|
121
|
+
})))));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
var _default = NotificationPane;
|
|
125
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectClassNames.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectStyleProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneComponentOverrides.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/notificationpane/interfaces/common/INotificationPaneControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Constants = require("../../../common/Constants");
|
|
11
|
+
|
|
12
|
+
var _CommandButton = _interopRequireDefault(require("../../common/commandbutton/CommandButton"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function CloseChatButton(props) {
|
|
17
|
+
const {
|
|
18
|
+
type
|
|
19
|
+
} = props;
|
|
20
|
+
const customEvent = {
|
|
21
|
+
elementType: _Constants.ElementType.NotificationCloseChatButton,
|
|
22
|
+
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
23
|
+
eventName: _Constants.EventNames.OnClick
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_CommandButton.default, {
|
|
26
|
+
id: props === null || props === void 0 ? void 0 : props.id,
|
|
27
|
+
type: type,
|
|
28
|
+
text: props.text,
|
|
29
|
+
styles: props.styles,
|
|
30
|
+
hoverStyles: props.hoverStyles,
|
|
31
|
+
focusStyles: props.focusStyles,
|
|
32
|
+
iconName: props.iconName,
|
|
33
|
+
imageIconProps: props.imageIconProps,
|
|
34
|
+
onClick: props.onClick,
|
|
35
|
+
ariaLabel: props.ariaLabel,
|
|
36
|
+
className: props.className,
|
|
37
|
+
customEvent: customEvent,
|
|
38
|
+
hideButtonTitle: props.hideButtonTitle
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var _default = CloseChatButton;
|
|
43
|
+
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Constants = require("../../../common/Constants");
|
|
11
|
+
|
|
12
|
+
var _CommandButton = _interopRequireDefault(require("../../common/commandbutton/CommandButton"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function DismissButton(props) {
|
|
17
|
+
const {
|
|
18
|
+
type
|
|
19
|
+
} = props;
|
|
20
|
+
const customEvent = {
|
|
21
|
+
elementType: _Constants.ElementType.NotificationDismissButton,
|
|
22
|
+
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
23
|
+
eventName: _Constants.EventNames.OnClick
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_CommandButton.default, {
|
|
26
|
+
id: props === null || props === void 0 ? void 0 : props.id,
|
|
27
|
+
type: type,
|
|
28
|
+
text: props.text,
|
|
29
|
+
styles: props.styles,
|
|
30
|
+
hoverStyles: props.hoverStyles,
|
|
31
|
+
focusStyles: props.focusStyles,
|
|
32
|
+
iconName: props.iconName,
|
|
33
|
+
imageIconProps: props.imageIconProps,
|
|
34
|
+
onClick: props.onClick,
|
|
35
|
+
ariaLabel: props.ariaLabel,
|
|
36
|
+
className: props.className,
|
|
37
|
+
customEvent: customEvent,
|
|
38
|
+
hideButtonTitle: props.hideButtonTitle
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var _default = DismissButton;
|
|
43
|
+
exports.default = _default;
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var AdaptiveCards = _interopRequireWildcard(require("adaptivecards"));
|
|
9
9
|
|
|
10
|
+
var _Constants = require("../../common/Constants");
|
|
11
|
+
|
|
10
12
|
var _react = require("@fluentui/react");
|
|
11
13
|
|
|
12
14
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
@@ -15,8 +17,6 @@ var _utils = require("../../common/utils");
|
|
|
15
17
|
|
|
16
18
|
var _BroadcastService = require("../../services/BroadcastService");
|
|
17
19
|
|
|
18
|
-
var _Constants = require("../../common/Constants");
|
|
19
|
-
|
|
20
20
|
var _defaultPreChatSurveyPaneACContainerStyles = require("./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneACContainerStyles");
|
|
21
21
|
|
|
22
22
|
var _defaultPreChatSurveyPaneControlProps = require("./common/defaultProps/defaultPreChatSurveyPaneControlProps");
|
|
@@ -95,6 +95,8 @@ function PreChatSurveyPane(props) {
|
|
|
95
95
|
font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontSize} !important;
|
|
96
96
|
height: ${(_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customTextStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.height};
|
|
97
97
|
padding-top: ${(_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customTextStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.paddingTop};
|
|
98
|
+
overflow-wrap: break-word;
|
|
99
|
+
white-space: normal !important;
|
|
98
100
|
}
|
|
99
101
|
.ac-textRun {
|
|
100
102
|
font-size: ${(_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : (_props$styleProps6$cu = _props$styleProps6.customTextStyleProps) === null || _props$styleProps6$cu === void 0 ? void 0 : _props$styleProps6$cu.fontSize} !important;
|
package/lib/cjs/index.js
CHANGED
|
@@ -153,6 +153,12 @@ Object.defineProperty(exports, "ModernChatIconBase64", {
|
|
|
153
153
|
return _Icons.ModernChatIconBase64;
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
+
Object.defineProperty(exports, "NotificationPane", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _NotificationPane.default;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
156
162
|
Object.defineProperty(exports, "OutOfOfficeHoursPane", {
|
|
157
163
|
enumerable: true,
|
|
158
164
|
get: function () {
|
|
@@ -268,6 +274,8 @@ var _LoadingPane = _interopRequireDefault(require("./components/loadingpane/Load
|
|
|
268
274
|
|
|
269
275
|
var _OOOHPane = _interopRequireDefault(require("./components/outofofficehourspane/OOOHPane"));
|
|
270
276
|
|
|
277
|
+
var _NotificationPane = _interopRequireDefault(require("./components/notificationpane/NotificationPane"));
|
|
278
|
+
|
|
271
279
|
var _PreChatSurveyPane = _interopRequireDefault(require("./components/prechatsurveypane/PreChatSurveyPane"));
|
|
272
280
|
|
|
273
281
|
var _PostChatSurveyPane = _interopRequireDefault(require("./components/postchatsurveypane/PostChatSurveyPane"));
|
|
@@ -20,6 +20,8 @@ export let ElementType;
|
|
|
20
20
|
ElementType["ChatButton"] = "ChatButton";
|
|
21
21
|
ElementType["CloseButton"] = "CloseButton";
|
|
22
22
|
ElementType["HeaderMinimizeButton"] = "HeaderMinimizeButton";
|
|
23
|
+
ElementType["NotificationDismissButton"] = "NotificationDismissButton";
|
|
24
|
+
ElementType["NotificationCloseChatButton"] = "NotificationCloseChatButton";
|
|
23
25
|
ElementType["FooterDownloadTranscriptButton"] = "FooterDownloadTranscriptButton";
|
|
24
26
|
ElementType["FooterEmailTranscriptButton"] = "FooterEmailTranscriptButton";
|
|
25
27
|
ElementType["FooterSoundNotificationButton"] = "FooterSoundNotificationButton";
|
|
@@ -40,7 +42,7 @@ export let ElementType;
|
|
|
40
42
|
ElementType["Custom"] = "Custom";
|
|
41
43
|
})(ElementType || (ElementType = {}));
|
|
42
44
|
|
|
43
|
-
export const Ids = (_class3 = class Ids {}, _defineProperty(_class3, "DefaultCallingContainerId", "lcw-calling-container"), _defineProperty(_class3, "DefaultCurrentCallId", "lcw-current-call-container"), _defineProperty(_class3, "CurrentCallActionGroupId", "lcw-current-call-action-icons"), _defineProperty(_class3, "CurrentCallFooterId", "lcw-current-call-footer"), _defineProperty(_class3, "RemoteVideoTileId", "lcw-remote-video"), _defineProperty(_class3, "SelfVideoTileId", "lcw-self-video"), _defineProperty(_class3, "VideoTileGroupId", "lcw-current-call-body"), _defineProperty(_class3, "EndCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "MicButtonId", "lcw-toggle-audio"), _defineProperty(_class3, "VideoButtonId", "lcw-toggle-video"), _defineProperty(_class3, "CallTimerId", "lcw-current-call-timer"), _defineProperty(_class3, "CurrentCallLeftGroupId", "lcw-current-call-left-group"), _defineProperty(_class3, "CurrentCallMiddleGroupId", "lcw-current-call-middle-group"), _defineProperty(_class3, "CurrentCallRightGroupId", "lcw-current-call-right-group"), _defineProperty(_class3, "DefaultIncomingCallId", "lcw-incoming-call"), _defineProperty(_class3, "DeclineCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "AudioCallButtonId", "lcw-call-accept-button"), _defineProperty(_class3, "VideoCallButtonId", "lcw-video-call-accept-button"), _defineProperty(_class3, "IncomingCallTitleId", "lcw-incoming-call-message"), _defineProperty(_class3, "DefaultIncomingCallPopupId", "lcw-incoming-call-popup"), _defineProperty(_class3, "IncomingCallLeftGroupId", "lcw-incoming-call-left-group"), _defineProperty(_class3, "IncomingCallMiddleGroupId", "lcw-incoming-call-middle-group"), _defineProperty(_class3, "IncomingCallRightGroupId", "lcw-incoming-call-right-group"), _defineProperty(_class3, "DefaultChatButtonId", "lcw-components-chat-button"), _defineProperty(_class3, "DefaultConfirmationPaneId", "lcw-components-confirmation-pane"), _defineProperty(_class3, "CustomFooterId", "lcw-footer"), _defineProperty(_class3, "DownloadTranscriptButtonId", "lcw-footer-download-transcript-button"), _defineProperty(_class3, "EmailTranscriptButtonId", "lcw-footer-email-transcript-button"), _defineProperty(_class3, "AudioNotificationButtonId", "lcw-footer-audio-notification-button"), _defineProperty(_class3, "DefaultFooterId", "lcw-components-footer"), _defineProperty(_class3, "FooterLeftGroupId", "lcw-footer-left-group"), _defineProperty(_class3, "FooterMiddleGroupId", "lcw-footer-middle-group"), _defineProperty(_class3, "FooterRightGroupId", "lcw-footer-right-group"), _defineProperty(_class3, "DefaultHeaderId", "lcw-header"), _defineProperty(_class3, "MinimizeButtonId", "lcw-header-minimize-button"), _defineProperty(_class3, "CloseButtonId", "lcw-header-close-button"), _defineProperty(_class3, "HeaderIconId", "lcw-header-icon"), _defineProperty(_class3, "HeaderTitleId", "lcw-header-title"), _defineProperty(_class3, "HeaderLeftGroupId", "lcw-header-left-group"), _defineProperty(_class3, "HeaderMiddleGroupId", "lcw-header-middle-group"), _defineProperty(_class3, "HeaderRightGroupId", "lcw-header-right-group"), _defineProperty(_class3, "DefaultInputValidationPaneId", "lcw-email-transcript-dialog-container"), _defineProperty(_class3, "DefaultInputValidationPaneInputId", "lcw-email-transcript-dialog-text-field"), _defineProperty(_class3, "DefaultLoadingPaneId", "lcw-loading-pane"), _defineProperty(_class3, "DefaultOOOHPaneId", "lcw-out-of-office-hours-pane"), _defineProperty(_class3, "DefaultPostChatSurveyPaneId", "lcw-postchat-survey-pane"), _defineProperty(_class3, "DefaultPreChatSurveyPaneId", "lcw-prechat-survey-pane-default"), _defineProperty(_class3, "DefaultProactiveChatPaneId", "lcw-proactive-chat"), _defineProperty(_class3, "DefaultReconnectChatPaneId", "lcw-reconnect-chat-pane"), _class3);
|
|
45
|
+
export const Ids = (_class3 = class Ids {}, _defineProperty(_class3, "DefaultCallingContainerId", "lcw-calling-container"), _defineProperty(_class3, "DefaultCurrentCallId", "lcw-current-call-container"), _defineProperty(_class3, "CurrentCallActionGroupId", "lcw-current-call-action-icons"), _defineProperty(_class3, "CurrentCallFooterId", "lcw-current-call-footer"), _defineProperty(_class3, "RemoteVideoTileId", "lcw-remote-video"), _defineProperty(_class3, "SelfVideoTileId", "lcw-self-video"), _defineProperty(_class3, "VideoTileGroupId", "lcw-current-call-body"), _defineProperty(_class3, "EndCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "MicButtonId", "lcw-toggle-audio"), _defineProperty(_class3, "VideoButtonId", "lcw-toggle-video"), _defineProperty(_class3, "CallTimerId", "lcw-current-call-timer"), _defineProperty(_class3, "CurrentCallLeftGroupId", "lcw-current-call-left-group"), _defineProperty(_class3, "CurrentCallMiddleGroupId", "lcw-current-call-middle-group"), _defineProperty(_class3, "CurrentCallRightGroupId", "lcw-current-call-right-group"), _defineProperty(_class3, "DefaultIncomingCallId", "lcw-incoming-call"), _defineProperty(_class3, "DeclineCallButtonId", "lcw-call-reject-button"), _defineProperty(_class3, "AudioCallButtonId", "lcw-call-accept-button"), _defineProperty(_class3, "VideoCallButtonId", "lcw-video-call-accept-button"), _defineProperty(_class3, "IncomingCallTitleId", "lcw-incoming-call-message"), _defineProperty(_class3, "DefaultIncomingCallPopupId", "lcw-incoming-call-popup"), _defineProperty(_class3, "IncomingCallLeftGroupId", "lcw-incoming-call-left-group"), _defineProperty(_class3, "IncomingCallMiddleGroupId", "lcw-incoming-call-middle-group"), _defineProperty(_class3, "IncomingCallRightGroupId", "lcw-incoming-call-right-group"), _defineProperty(_class3, "DefaultChatButtonId", "lcw-components-chat-button"), _defineProperty(_class3, "DefaultConfirmationPaneId", "lcw-components-confirmation-pane"), _defineProperty(_class3, "CustomFooterId", "lcw-footer"), _defineProperty(_class3, "DownloadTranscriptButtonId", "lcw-footer-download-transcript-button"), _defineProperty(_class3, "EmailTranscriptButtonId", "lcw-footer-email-transcript-button"), _defineProperty(_class3, "AudioNotificationButtonId", "lcw-footer-audio-notification-button"), _defineProperty(_class3, "DefaultFooterId", "lcw-components-footer"), _defineProperty(_class3, "FooterLeftGroupId", "lcw-footer-left-group"), _defineProperty(_class3, "FooterMiddleGroupId", "lcw-footer-middle-group"), _defineProperty(_class3, "FooterRightGroupId", "lcw-footer-right-group"), _defineProperty(_class3, "DefaultHeaderId", "lcw-header"), _defineProperty(_class3, "MinimizeButtonId", "lcw-header-minimize-button"), _defineProperty(_class3, "CloseButtonId", "lcw-header-close-button"), _defineProperty(_class3, "HeaderIconId", "lcw-header-icon"), _defineProperty(_class3, "HeaderTitleId", "lcw-header-title"), _defineProperty(_class3, "HeaderLeftGroupId", "lcw-header-left-group"), _defineProperty(_class3, "HeaderMiddleGroupId", "lcw-header-middle-group"), _defineProperty(_class3, "HeaderRightGroupId", "lcw-header-right-group"), _defineProperty(_class3, "DefaultInputValidationPaneId", "lcw-email-transcript-dialog-container"), _defineProperty(_class3, "DefaultInputValidationPaneInputId", "lcw-email-transcript-dialog-text-field"), _defineProperty(_class3, "DefaultLoadingPaneId", "lcw-loading-pane"), _defineProperty(_class3, "DefaultNotificationPaneId", "lcw-notification-pane"), _defineProperty(_class3, "DefaultOOOHPaneId", "lcw-out-of-office-hours-pane"), _defineProperty(_class3, "DefaultPostChatSurveyPaneId", "lcw-postchat-survey-pane"), _defineProperty(_class3, "DefaultPreChatSurveyPaneId", "lcw-prechat-survey-pane-default"), _defineProperty(_class3, "DefaultProactiveChatPaneId", "lcw-proactive-chat"), _defineProperty(_class3, "DefaultReconnectChatPaneId", "lcw-reconnect-chat-pane"), _class3);
|
|
44
46
|
export const ButtonTypes = (_class4 = class ButtonTypes {}, _defineProperty(_class4, "Icon", "icon"), _defineProperty(_class4, "Text", "text"), _class4);
|
|
45
47
|
export const IconNames = (_class5 = class IconNames {}, _defineProperty(_class5, "DeclineCall", "DeclineCall"), _defineProperty(_class5, "Microphone", "Microphone"), _defineProperty(_class5, "MicOff2", "MicOff2"), _defineProperty(_class5, "Video", "Video"), _defineProperty(_class5, "VideoOff", "VideoOff"), _defineProperty(_class5, "IncomingCall", "IncomingCall"), _defineProperty(_class5, "ChromeClose", "ChromeClose"), _defineProperty(_class5, "Download", "Download"), _defineProperty(_class5, "Mail", "Mail"), _defineProperty(_class5, "Volume3", "Volume3"), _defineProperty(_class5, "Volume0", "Volume0"), _defineProperty(_class5, "ChromeMinimize", "ChromeMinimize"), _class5);
|
|
46
48
|
export const AriaLabels = (_class6 = class AriaLabels {}, _defineProperty(_class6, "EndCall", "End Call"), _defineProperty(_class6, "MicMute", "Mute"), _defineProperty(_class6, "MicUnmute", "Unmute"), _defineProperty(_class6, "VideoTurnCameraOn", "Turn camera on"), _defineProperty(_class6, "VideoTurnCameraOff", "Turn camera off"), _defineProperty(_class6, "IncomingCallArea", "Incoming call area"), _defineProperty(_class6, "RejectCall", "Reject call"), _defineProperty(_class6, "AcceptVoiceCall", "Accept voice call"), _defineProperty(_class6, "AcceptVideoCall", "Accept video Call"), _defineProperty(_class6, "DeclineCall", "Decline Call"), _defineProperty(_class6, "AudioCall", "Audio Call"), _defineProperty(_class6, "VideoCall", "Video Call"), _defineProperty(_class6, "LetsChatWeAreOnline", "Let's chat we are online"), _defineProperty(_class6, "UnreadMessageString", "you have new messages"), _defineProperty(_class6, "Close", "Close"), _defineProperty(_class6, "ConfirmationPaneConfirm", "Close Chat"), _defineProperty(_class6, "ConfirmationPaneCancel", "Cancel. Return to Chat"), _defineProperty(_class6, "DownloadChatTranscript", "Download chat transcript"), _defineProperty(_class6, "EmailTranscript", "Email Transcript"), _defineProperty(_class6, "TurnSoundOff", "Turn sound off"), _defineProperty(_class6, "TurnSoundOn", "Turn sound on"), _defineProperty(_class6, "Minimize", "Minimize"), _defineProperty(_class6, "EmailChatTranscriptPane", "Email Chat Transcript Pane"), _defineProperty(_class6, "InputValidationPaneInput", "Email this chat transcript. This will be sent after your chat ends. Email address text area"), _defineProperty(_class6, "Send", "Send"), _defineProperty(_class6, "Cancel", "Cancel"), _defineProperty(_class6, "ProactiveChatPane", "Proactive Chat Pane"), _defineProperty(_class6, "ChatNow", "Chat Now"), _defineProperty(_class6, "ReconnectChatPane", "Reconnect Chat Pane"), _defineProperty(_class6, "ReconnectChatPaneIcon", "Reconnect Chat Pane Icon"), _defineProperty(_class6, "ContinueConversation", "Continue conversation"), _defineProperty(_class6, "StartNewConversation", "Start new conversation"), _class6);
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Image, Label, Stack, Link } from "@fluentui/react";
|
|
5
|
+
import DismissButton from "./subcomponents/DismissButton";
|
|
6
|
+
import CloseChatButton from "./subcomponents/CloseChatButton";
|
|
7
|
+
import { decodeComponentString } from "../../common/decodeComponentString";
|
|
8
|
+
import { Ids } from "../../common/Constants";
|
|
9
|
+
|
|
10
|
+
function NotificationPane(props) {
|
|
11
|
+
var _props$componentOverr, _props$componentOverr2, _props$componentOverr3, _props$componentOverr4, _props$componentOverr5, _props$dismissButtonP, _props$closeChatButto;
|
|
12
|
+
|
|
13
|
+
const elementId = props.id ?? Ids.DefaultNotificationPaneId;
|
|
14
|
+
const containerStyles = {
|
|
15
|
+
root: Object.assign({}, props.generalStyleProps)
|
|
16
|
+
};
|
|
17
|
+
const titleStyles = {
|
|
18
|
+
root: Object.assign({}, props.titleStyleProps)
|
|
19
|
+
};
|
|
20
|
+
const subtitleStyles = {
|
|
21
|
+
root: Object.assign({}, props.subtitleStyleProps)
|
|
22
|
+
};
|
|
23
|
+
const hyperlinkStyles = {
|
|
24
|
+
root: Object.assign({}, props.hyperlinkStyleProps)
|
|
25
|
+
};
|
|
26
|
+
const hyperlinkHoverStyles = {
|
|
27
|
+
root: Object.assign({}, props.hyperlinkHoverStyleProps)
|
|
28
|
+
};
|
|
29
|
+
const notificationIconProps = Object.assign({}, props.notificationIconProps);
|
|
30
|
+
const notificationIconStyles = Object.assign({}, props.notificationIconStyleProps);
|
|
31
|
+
const notificationIconImageStyles = {
|
|
32
|
+
root: {},
|
|
33
|
+
image: notificationIconStyles
|
|
34
|
+
};
|
|
35
|
+
const notificationIconContainerStyles = {
|
|
36
|
+
root: Object.assign({}, props.notificationIconContainerStyleProps)
|
|
37
|
+
};
|
|
38
|
+
const dismissButtonProps = Object.assign({}, props.dismissButtonProps);
|
|
39
|
+
const dismissButtonStyles = Object.assign({}, props.dismissButtonStyleProps);
|
|
40
|
+
const dismissButtonHoverStyles = Object.assign({}, props.dismissButtonHoverStyleProps);
|
|
41
|
+
const closeChatButtonProps = Object.assign({}, props.closeChatButtonProps);
|
|
42
|
+
const closeChatButtonStyles = Object.assign({}, props.closeChatButtonStyleProps);
|
|
43
|
+
const closeChatButtonHoverStyles = Object.assign({}, props.closeChatButtonHoverStyleProps);
|
|
44
|
+
const infoGroupStyles = {
|
|
45
|
+
root: Object.assign({}, props.infoGroupStyleProps)
|
|
46
|
+
};
|
|
47
|
+
const buttonGroupStyles = {
|
|
48
|
+
root: Object.assign({}, props.buttonGroupStyleProps)
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
51
|
+
className: props.containerClassName,
|
|
52
|
+
styles: containerStyles,
|
|
53
|
+
id: elementId,
|
|
54
|
+
dir: props.dir ?? "ltr",
|
|
55
|
+
tabIndex: -1,
|
|
56
|
+
role: "presentation"
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
58
|
+
horizontal: true,
|
|
59
|
+
horizontalAlign: "space-between",
|
|
60
|
+
styles: containerStyles,
|
|
61
|
+
dir: props.dir ?? "ltr"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
63
|
+
styles: notificationIconContainerStyles
|
|
64
|
+
}, !props.hideNotificationIcon && (decodeComponentString((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.notificationIcon) || /*#__PURE__*/React.createElement(Image, {
|
|
65
|
+
className: notificationIconProps.className,
|
|
66
|
+
id: notificationIconProps.id,
|
|
67
|
+
src: notificationIconProps.src,
|
|
68
|
+
alt: notificationIconProps.alt,
|
|
69
|
+
tabIndex: -1,
|
|
70
|
+
styles: notificationIconImageStyles
|
|
71
|
+
}))), /*#__PURE__*/React.createElement(Stack, {
|
|
72
|
+
styles: infoGroupStyles,
|
|
73
|
+
dir: props.dir ?? "ltr"
|
|
74
|
+
}, !props.hideTitle && (decodeComponentString((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.title) || /*#__PURE__*/React.createElement(Label, {
|
|
75
|
+
className: props.titleClassName,
|
|
76
|
+
styles: titleStyles,
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
id: elementId + "-title"
|
|
79
|
+
}, props.titleText)), !props.hideSubtitle && (decodeComponentString((_props$componentOverr3 = props.componentOverrides) === null || _props$componentOverr3 === void 0 ? void 0 : _props$componentOverr3.subtitle) || /*#__PURE__*/React.createElement(Label, {
|
|
80
|
+
className: props.subtitleClassName,
|
|
81
|
+
styles: subtitleStyles,
|
|
82
|
+
tabIndex: -1,
|
|
83
|
+
id: elementId + "-subtitle"
|
|
84
|
+
}, props.subtitleText)), !props.hideHyperlink && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.hyperlink) || /*#__PURE__*/React.createElement(Link, {
|
|
85
|
+
className: props.hyperlinkClassName,
|
|
86
|
+
ariaLabel: props.hyperlinkAriaLabel,
|
|
87
|
+
id: elementId + "-hyperlink",
|
|
88
|
+
styles: hyperlinkStyles,
|
|
89
|
+
hoverStyles: hyperlinkHoverStyles,
|
|
90
|
+
target: "_blank",
|
|
91
|
+
rel: "noopener noreferrer",
|
|
92
|
+
href: props.hyperlinkHref
|
|
93
|
+
}, props.hyperlinkText))), !props.hideDismissButton && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.dismissButton) || /*#__PURE__*/React.createElement(DismissButton, _extends({}, dismissButtonProps, {
|
|
94
|
+
className: props.dismissButtonClassName,
|
|
95
|
+
onClick: (_props$dismissButtonP = props.dismissButtonProps) === null || _props$dismissButtonP === void 0 ? void 0 : _props$dismissButtonP.onClick,
|
|
96
|
+
styles: dismissButtonStyles,
|
|
97
|
+
hoverStyles: dismissButtonHoverStyles
|
|
98
|
+
})))), /*#__PURE__*/React.createElement(Stack, {
|
|
99
|
+
horizontal: true,
|
|
100
|
+
styles: buttonGroupStyles,
|
|
101
|
+
dir: props.dir ?? "ltr"
|
|
102
|
+
}, !props.hideCloseChatButton && /*#__PURE__*/React.createElement(CloseChatButton, _extends({}, closeChatButtonProps, {
|
|
103
|
+
className: props.closeChatButtonClassName,
|
|
104
|
+
onClick: (_props$closeChatButto = props.closeChatButtonProps) === null || _props$closeChatButto === void 0 ? void 0 : _props$closeChatButto.onClick,
|
|
105
|
+
styles: closeChatButtonStyles,
|
|
106
|
+
hoverStyles: closeChatButtonHoverStyles
|
|
107
|
+
})))));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export default NotificationPane;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectClassNames.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/notificationpane/interfaces/chatdisconnect/IChatDisconnectStyleProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneComponentOverrides.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/notificationpane/interfaces/common/INotificationPaneControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ElementType, EventNames } from "../../../common/Constants";
|
|
3
|
+
import CommandButton from "../../common/commandbutton/CommandButton";
|
|
4
|
+
|
|
5
|
+
function CloseChatButton(props) {
|
|
6
|
+
const {
|
|
7
|
+
type
|
|
8
|
+
} = props;
|
|
9
|
+
const customEvent = {
|
|
10
|
+
elementType: ElementType.NotificationCloseChatButton,
|
|
11
|
+
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
12
|
+
eventName: EventNames.OnClick
|
|
13
|
+
};
|
|
14
|
+
return /*#__PURE__*/React.createElement(CommandButton, {
|
|
15
|
+
id: props === null || props === void 0 ? void 0 : props.id,
|
|
16
|
+
type: type,
|
|
17
|
+
text: props.text,
|
|
18
|
+
styles: props.styles,
|
|
19
|
+
hoverStyles: props.hoverStyles,
|
|
20
|
+
focusStyles: props.focusStyles,
|
|
21
|
+
iconName: props.iconName,
|
|
22
|
+
imageIconProps: props.imageIconProps,
|
|
23
|
+
onClick: props.onClick,
|
|
24
|
+
ariaLabel: props.ariaLabel,
|
|
25
|
+
className: props.className,
|
|
26
|
+
customEvent: customEvent,
|
|
27
|
+
hideButtonTitle: props.hideButtonTitle
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default CloseChatButton;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ElementType, EventNames } from "../../../common/Constants";
|
|
3
|
+
import CommandButton from "../../common/commandbutton/CommandButton";
|
|
4
|
+
|
|
5
|
+
function DismissButton(props) {
|
|
6
|
+
const {
|
|
7
|
+
type
|
|
8
|
+
} = props;
|
|
9
|
+
const customEvent = {
|
|
10
|
+
elementType: ElementType.NotificationDismissButton,
|
|
11
|
+
elementId: props === null || props === void 0 ? void 0 : props.id,
|
|
12
|
+
eventName: EventNames.OnClick
|
|
13
|
+
};
|
|
14
|
+
return /*#__PURE__*/React.createElement(CommandButton, {
|
|
15
|
+
id: props === null || props === void 0 ? void 0 : props.id,
|
|
16
|
+
type: type,
|
|
17
|
+
text: props.text,
|
|
18
|
+
styles: props.styles,
|
|
19
|
+
hoverStyles: props.hoverStyles,
|
|
20
|
+
focusStyles: props.focusStyles,
|
|
21
|
+
iconName: props.iconName,
|
|
22
|
+
imageIconProps: props.imageIconProps,
|
|
23
|
+
onClick: props.onClick,
|
|
24
|
+
ariaLabel: props.ariaLabel,
|
|
25
|
+
className: props.className,
|
|
26
|
+
customEvent: customEvent,
|
|
27
|
+
hideButtonTitle: props.hideButtonTitle
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default DismissButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as AdaptiveCards from "adaptivecards";
|
|
2
|
+
import { ElementType, EventNames } from "../../common/Constants";
|
|
2
3
|
import { Stack } from "@fluentui/react";
|
|
3
4
|
import React, { useCallback } from "react";
|
|
4
5
|
import { addNoreferrerNoopenerTag, broadcastError, getInputValuesFromAdaptiveCard } from "../../common/utils";
|
|
5
6
|
import { BroadcastService } from "../../services/BroadcastService";
|
|
6
|
-
import { ElementType, EventNames } from "../../common/Constants";
|
|
7
7
|
import { defaultPreChatSurveyPaneACContainerStyles } from "./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneACContainerStyles";
|
|
8
8
|
import { defaultPreChatSurveyPaneControlProps } from "./common/defaultProps/defaultPreChatSurveyPaneControlProps";
|
|
9
9
|
import { defaultPreChatSurveyPaneGeneralStyles } from "./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneGeneralStyles";
|
|
@@ -73,6 +73,8 @@ function PreChatSurveyPane(props) {
|
|
|
73
73
|
font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 ? void 0 : (_props$styleProps3$cu = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3$cu === void 0 ? void 0 : _props$styleProps3$cu.fontSize} !important;
|
|
74
74
|
height: ${(_props$styleProps4 = props.styleProps) === null || _props$styleProps4 === void 0 ? void 0 : (_props$styleProps4$cu = _props$styleProps4.customTextStyleProps) === null || _props$styleProps4$cu === void 0 ? void 0 : _props$styleProps4$cu.height};
|
|
75
75
|
padding-top: ${(_props$styleProps5 = props.styleProps) === null || _props$styleProps5 === void 0 ? void 0 : (_props$styleProps5$cu = _props$styleProps5.customTextStyleProps) === null || _props$styleProps5$cu === void 0 ? void 0 : _props$styleProps5$cu.paddingTop};
|
|
76
|
+
overflow-wrap: break-word;
|
|
77
|
+
white-space: normal !important;
|
|
76
78
|
}
|
|
77
79
|
.ac-textRun {
|
|
78
80
|
font-size: ${(_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : (_props$styleProps6$cu = _props$styleProps6.customTextStyleProps) === null || _props$styleProps6$cu === void 0 ? void 0 : _props$styleProps6$cu.fontSize} !important;
|
package/lib/esm/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { default as ProactiveChatPane } from "./components/proactivechatpane/Pro
|
|
|
7
7
|
export { default as ReconnectChatPane } from "./components/reconnectchatpane/ReconnectChatPane";
|
|
8
8
|
export { default as LoadingPane } from "./components/loadingpane/LoadingPane";
|
|
9
9
|
export { default as OutOfOfficeHoursPane } from "./components/outofofficehourspane/OOOHPane";
|
|
10
|
+
export { default as NotificationPane } from "./components/notificationpane/NotificationPane";
|
|
10
11
|
export { default as PreChatSurveyPane } from "./components/prechatsurveypane/PreChatSurveyPane";
|
|
11
12
|
export { default as PostChatSurveyPane } from "./components/postchatsurveypane/PostChatSurveyPane";
|
|
12
13
|
export { encodeComponentString } from "./common/encodeComponentString";
|
|
@@ -21,6 +21,8 @@ export declare enum ElementType {
|
|
|
21
21
|
ChatButton = "ChatButton",
|
|
22
22
|
CloseButton = "CloseButton",
|
|
23
23
|
HeaderMinimizeButton = "HeaderMinimizeButton",
|
|
24
|
+
NotificationDismissButton = "NotificationDismissButton",
|
|
25
|
+
NotificationCloseChatButton = "NotificationCloseChatButton",
|
|
24
26
|
FooterDownloadTranscriptButton = "FooterDownloadTranscriptButton",
|
|
25
27
|
FooterEmailTranscriptButton = "FooterEmailTranscriptButton",
|
|
26
28
|
FooterSoundNotificationButton = "FooterSoundNotificationButton",
|
|
@@ -86,6 +88,7 @@ export declare const Ids: {
|
|
|
86
88
|
readonly DefaultInputValidationPaneId: "lcw-email-transcript-dialog-container";
|
|
87
89
|
readonly DefaultInputValidationPaneInputId: "lcw-email-transcript-dialog-text-field";
|
|
88
90
|
readonly DefaultLoadingPaneId: "lcw-loading-pane";
|
|
91
|
+
readonly DefaultNotificationPaneId: "lcw-notification-pane";
|
|
89
92
|
readonly DefaultOOOHPaneId: "lcw-out-of-office-hours-pane";
|
|
90
93
|
readonly DefaultPostChatSurveyPaneId: "lcw-postchat-survey-pane";
|
|
91
94
|
readonly DefaultPreChatSurveyPaneId: "lcw-prechat-survey-pane-default";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IChatDisconnectNotificationProps } from "./chatdisconnect/IChatDisconnectNotificationProps";
|
|
2
|
+
/**
|
|
3
|
+
* This interface acts as the entry point to the notification pane.
|
|
4
|
+
* It will have all the scenarios based props which will get processed in stateful
|
|
5
|
+
*/
|
|
6
|
+
export interface INotificationPaneProps {
|
|
7
|
+
chatDisconnectNotificationProps?: IChatDisconnectNotificationProps;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { INotificationPaneClassNames } from "../common/INotificationPaneClassNames";
|
|
2
|
+
/**
|
|
3
|
+
* This interface will have all the class name properties as customized by C1 for chat disconnect scenario
|
|
4
|
+
* It extends the common class names properties <INotificationPaneClassNames>
|
|
5
|
+
*/
|
|
6
|
+
export interface IChatDisconnectClassNames extends INotificationPaneClassNames {
|
|
7
|
+
closeChatButtonClassName?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICommandButtonControlProps } from "../../../common/interfaces/ICommandButtonControlProps";
|
|
2
|
+
import { INotificationPaneControlProps } from "../common/INotificationPaneControlProps";
|
|
3
|
+
/**
|
|
4
|
+
* This interface will have all the properties as customized by C1 for chat disconnect scenario
|
|
5
|
+
* It extends the common properties <INotificationPaneControlProps>
|
|
6
|
+
*/
|
|
7
|
+
export interface IChatDisconnectControlProps extends INotificationPaneControlProps {
|
|
8
|
+
hideCloseChatButton?: boolean;
|
|
9
|
+
closeChatButtonProps?: ICommandButtonControlProps;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { INotificationPaneComponentOverrides } from "../common/INotificationPaneComponentOverrides";
|
|
2
|
+
import { IChatDisconnectStyleProps } from "./IChatDisconnectStyleProps";
|
|
3
|
+
import { IChatDisconnectControlProps } from "./IChatDisconnectControlProps";
|
|
4
|
+
/**
|
|
5
|
+
* This interface will have all required control/style/overrides props for chat disconnect scenario
|
|
6
|
+
*/
|
|
7
|
+
export interface IChatDisconnectNotificationProps {
|
|
8
|
+
componentOverrides?: INotificationPaneComponentOverrides;
|
|
9
|
+
controlProps?: IChatDisconnectControlProps;
|
|
10
|
+
styleProps?: IChatDisconnectStyleProps;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IStyle } from "@fluentui/react";
|
|
2
|
+
import { INotificationPaneStyleProps } from "../common/INotificationPaneStyleProps";
|
|
3
|
+
import { IChatDisconnectClassNames } from "./IChatDisconnectClassNames";
|
|
4
|
+
/**
|
|
5
|
+
* This interface will have all the style properties as customized by C1 for chat disconnect scenario
|
|
6
|
+
* It extends the common style properties <INotificationPaneStyleProps>
|
|
7
|
+
*/
|
|
8
|
+
export interface IChatDisconnectStyleProps extends INotificationPaneStyleProps {
|
|
9
|
+
closeChatButtonStyleProps?: IStyle;
|
|
10
|
+
closeChatButtonHoverStyleProps?: IStyle;
|
|
11
|
+
buttonGroupStyleProps?: IStyle;
|
|
12
|
+
classNames?: IChatDisconnectClassNames;
|
|
13
|
+
}
|
package/lib/types/components/notificationpane/interfaces/common/INotificationPaneClassNames.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface will have the common class names properties and is inherited by each scenarios.
|
|
3
|
+
*/
|
|
4
|
+
export interface INotificationPaneClassNames {
|
|
5
|
+
containerClassName?: string;
|
|
6
|
+
titleClassName?: string;
|
|
7
|
+
subtitleClassName?: string;
|
|
8
|
+
dismissButtonClassName?: string;
|
|
9
|
+
hyperlinkClassName?: string;
|
|
10
|
+
notificationIconClassName?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This interface will have the component overrides properties.
|
|
4
|
+
* It acts as common interface for all the scenarios for component overrides.
|
|
5
|
+
*/
|
|
6
|
+
export interface INotificationPaneComponentOverrides {
|
|
7
|
+
title?: ReactNode | string;
|
|
8
|
+
subtitle?: ReactNode | string;
|
|
9
|
+
dismissButton?: ReactNode | string;
|
|
10
|
+
hyperlink?: ReactNode | string;
|
|
11
|
+
notificationIcon?: ReactNode | string;
|
|
12
|
+
}
|
package/lib/types/components/notificationpane/interfaces/common/INotificationPaneControlProps.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ICommandButtonControlProps } from "../../../common/interfaces/ICommandButtonControlProps";
|
|
2
|
+
import { IImageControlProps } from "../../../common/interfaces/IImageControlProps";
|
|
3
|
+
/**
|
|
4
|
+
* This interface will have the common control properties and is inherited by each scenarios.
|
|
5
|
+
*/
|
|
6
|
+
export interface INotificationPaneControlProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
dir?: "ltr" | "rtl" | "auto";
|
|
9
|
+
hideNotificationPane?: boolean;
|
|
10
|
+
hideTitle?: boolean;
|
|
11
|
+
titleText?: string;
|
|
12
|
+
hideSubtitle?: boolean;
|
|
13
|
+
subtitleText?: string;
|
|
14
|
+
hideDismissButton?: boolean;
|
|
15
|
+
dismissButtonProps?: ICommandButtonControlProps;
|
|
16
|
+
hideHyperlink?: boolean;
|
|
17
|
+
hyperlinkText?: string;
|
|
18
|
+
hyperlinkAriaLabel?: string;
|
|
19
|
+
hyperlinkHref?: string;
|
|
20
|
+
hideIcon?: boolean;
|
|
21
|
+
notificationIconProps?: IImageControlProps;
|
|
22
|
+
}
|
package/lib/types/components/notificationpane/interfaces/common/INotificationPaneInternal.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IStyle } from "@fluentui/react";
|
|
2
|
+
import { ICommandButtonControlProps } from "../../../common/interfaces/ICommandButtonControlProps";
|
|
3
|
+
import { IImageControlProps } from "../../../common/interfaces/IImageControlProps";
|
|
4
|
+
import { INotificationPaneComponentOverrides } from "./INotificationPaneComponentOverrides";
|
|
5
|
+
/**
|
|
6
|
+
* This interface will act as a generic object that will have the common properties and also the properties for each scenario.
|
|
7
|
+
* Stateful will populate this interface based on the scenario type and send it to NotificationPane component view.
|
|
8
|
+
*/
|
|
9
|
+
export interface INotificationPaneInternal {
|
|
10
|
+
/**
|
|
11
|
+
* Common notification properties
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
dir?: "ltr" | "rtl" | "auto";
|
|
15
|
+
generalStyleProps?: IStyle;
|
|
16
|
+
containerClassName?: string;
|
|
17
|
+
componentOverrides?: INotificationPaneComponentOverrides;
|
|
18
|
+
infoGroupStyleProps?: IStyle;
|
|
19
|
+
hideTitle?: boolean;
|
|
20
|
+
titleText?: string;
|
|
21
|
+
titleStyleProps?: IStyle;
|
|
22
|
+
titleClassName?: string;
|
|
23
|
+
hideSubtitle?: boolean;
|
|
24
|
+
subtitleText?: string;
|
|
25
|
+
subtitleStyleProps?: IStyle;
|
|
26
|
+
subtitleClassName?: string;
|
|
27
|
+
hideHyperlink?: boolean;
|
|
28
|
+
hyperlinkText?: string;
|
|
29
|
+
hyperlinkAriaLabel?: string;
|
|
30
|
+
hyperlinkHref?: string;
|
|
31
|
+
hyperlinkStyleProps?: IStyle;
|
|
32
|
+
hyperlinkHoverStyleProps?: IStyle;
|
|
33
|
+
hyperlinkClassName?: string;
|
|
34
|
+
hideNotificationIcon?: boolean;
|
|
35
|
+
notificationIconProps?: IImageControlProps;
|
|
36
|
+
notificationIconStyleProps?: IStyle;
|
|
37
|
+
notificationIconClassName?: string;
|
|
38
|
+
notificationIconContainerStyleProps?: IStyle;
|
|
39
|
+
hideDismissButton?: boolean;
|
|
40
|
+
dismissButtonProps?: ICommandButtonControlProps;
|
|
41
|
+
dismissButtonStyleProps?: IStyle;
|
|
42
|
+
dismissButtonHoverStyleProps?: IStyle;
|
|
43
|
+
dismissButtonClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Chat disconnect scenario specific properties
|
|
46
|
+
*/
|
|
47
|
+
hideCloseChatButton?: boolean;
|
|
48
|
+
closeChatButtonProps?: ICommandButtonControlProps;
|
|
49
|
+
closeChatButtonStyleProps?: IStyle;
|
|
50
|
+
closeChatButtonHoverStyleProps?: IStyle;
|
|
51
|
+
closeChatButtonClassName?: string;
|
|
52
|
+
buttonGroupStyleProps?: IStyle;
|
|
53
|
+
}
|
package/lib/types/components/notificationpane/interfaces/common/INotificationPaneStyleProps.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IStyle } from "@fluentui/react";
|
|
2
|
+
/**
|
|
3
|
+
* This interface will have the common styles properties and is inherited by each scenarios.
|
|
4
|
+
*/
|
|
5
|
+
export interface INotificationPaneStyleProps {
|
|
6
|
+
generalStyleProps?: IStyle;
|
|
7
|
+
titleStyleProps?: IStyle;
|
|
8
|
+
subtitleStyleProps?: IStyle;
|
|
9
|
+
dismissButtonStyleProps?: IStyle;
|
|
10
|
+
dismissButtonHoverStyleProps?: IStyle;
|
|
11
|
+
hyperlinkStyleProps?: IStyle;
|
|
12
|
+
hyperlinkHoverStyleProps?: IStyle;
|
|
13
|
+
notificationIconStyleProps?: IStyle;
|
|
14
|
+
notificationIconContainerStyleProps?: IStyle;
|
|
15
|
+
infoGroupStyleProps?: IStyle;
|
|
16
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { default as ProactiveChatPane } from "./components/proactivechatpane/Pro
|
|
|
7
7
|
export { default as ReconnectChatPane } from "./components/reconnectchatpane/ReconnectChatPane";
|
|
8
8
|
export { default as LoadingPane } from "./components/loadingpane/LoadingPane";
|
|
9
9
|
export { default as OutOfOfficeHoursPane } from "./components/outofofficehourspane/OOOHPane";
|
|
10
|
+
export { default as NotificationPane } from "./components/notificationpane/NotificationPane";
|
|
10
11
|
export { default as PreChatSurveyPane } from "./components/prechatsurveypane/PreChatSurveyPane";
|
|
11
12
|
export { default as PostChatSurveyPane } from "./components/postchatsurveypane/PostChatSurveyPane";
|
|
12
13
|
export { encodeComponentString } from "./common/encodeComponentString";
|
package/package.json
CHANGED