@microsoft/omnichannel-chat-components 0.1.0-main.fc27009 → 1.0.1-main.118265f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/common/Constants.js +26 -8
- package/lib/cjs/common/utils.js +21 -2
- package/lib/cjs/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +4 -1
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +7 -7
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +26 -23
- package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +20 -18
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +21 -8
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +22 -19
- package/lib/cjs/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +18 -16
- package/lib/cjs/components/chatbutton/ChatButton.js +28 -24
- package/lib/cjs/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +11 -5
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/cjs/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/cjs/components/common/commandbutton/CommandButton.js +37 -12
- package/lib/cjs/components/{header → common}/subcomponents/CloseButton.js +8 -7
- package/lib/cjs/components/confirmationpane/ConfirmationPane.js +9 -2
- package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +10 -7
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/cjs/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/cjs/components/footer/Footer.js +12 -19
- package/lib/cjs/components/footer/common/defaultProps/customFooterControlProps.js +12 -10
- package/lib/cjs/components/footer/common/defaultProps/defaultFooterControlProps.js +18 -14
- package/lib/cjs/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +31 -14
- package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +4 -4
- package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +4 -4
- package/lib/cjs/components/header/Header.js +7 -5
- package/lib/cjs/components/header/common/defaultProps/azureHeaderControlProps.js +8 -6
- package/lib/cjs/components/header/common/defaultProps/customHeaderControlProps.js +9 -7
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +3 -1
- package/lib/cjs/components/header/common/defaultProps/defaultHeaderControlProps.js +13 -11
- package/lib/cjs/components/header/subcomponents/MinimizeButton.js +4 -4
- package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +28 -28
- package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/cjs/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/cjs/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +11 -11
- package/lib/cjs/components/loadingpane/LoadingPane.js +3 -2
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +7 -4
- package/lib/cjs/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/cjs/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/OOOHPane.js +13 -6
- package/lib/cjs/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +7 -2
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +15 -0
- package/lib/cjs/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +16 -0
- package/lib/cjs/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/cjs/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/cjs/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +5 -2
- package/lib/cjs/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +25 -11
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +5 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +7 -1
- package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +10 -0
- package/lib/cjs/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/cjs/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/cjs/components/proactivechatpane/ProactiveChatPane.js +36 -35
- package/lib/cjs/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -13
- package/lib/cjs/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +15 -8
- package/lib/cjs/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +9 -6
- package/lib/cjs/components/reconnectchatpane/ReconnectChatPane.js +3 -3
- package/lib/cjs/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +12 -9
- package/lib/cjs/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +11 -8
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/services/BroadcastService.js +36 -8
- package/lib/esm/common/Constants.js +18 -6
- package/lib/esm/common/utils.js +16 -0
- package/lib/esm/components/callingcontainer/common/defaultProps/defaultCallingContainerControlProps.js +2 -1
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +8 -8
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlProps.js +24 -23
- package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/common/defaultProps/defaultCurrentCallControlPropsRtl.js +19 -18
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/IncomingCall.js +22 -9
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlProps.js +20 -19
- package/lib/esm/components/callingcontainer/subcomponents/IncomingCall/common/defaultProps/defaultIncomingCallControlPropsRtl.js +17 -16
- package/lib/esm/components/chatbutton/ChatButton.js +28 -24
- package/lib/esm/components/chatbutton/common/defaultProps/defaultChatButtonControlProps.js +9 -5
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonSubTitleStyles.js +3 -1
- package/lib/esm/components/chatbutton/common/defaultStyles/defaultChatButtonTitleStyles.js +1 -0
- package/lib/esm/components/common/commandbutton/CommandButton.js +38 -13
- package/lib/esm/components/{header → common}/subcomponents/CloseButton.js +9 -8
- package/lib/esm/components/confirmationpane/ConfirmationPane.js +10 -3
- package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +8 -7
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneButtonGroupStyles.js +5 -1
- package/lib/esm/components/confirmationpane/common/defaultStyles/defaultConfirmationPaneGeneralStyles.js +7 -4
- package/lib/esm/components/footer/Footer.js +11 -19
- package/lib/esm/components/footer/common/defaultProps/customFooterControlProps.js +11 -10
- package/lib/esm/components/footer/common/defaultProps/defaultFooterControlProps.js +16 -14
- package/lib/esm/components/footer/common/defaultStyles/defaultFooterStyleProps.js +13 -7
- package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +32 -15
- package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +5 -5
- package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +5 -5
- package/lib/esm/components/header/Header.js +6 -5
- package/lib/esm/components/header/common/defaultProps/azureHeaderControlProps.js +7 -6
- package/lib/esm/components/header/common/defaultProps/customHeaderControlProps.js +8 -7
- package/lib/esm/components/header/common/defaultProps/defaultHeaderComponentOverrides.js +2 -1
- package/lib/esm/components/header/common/defaultProps/defaultHeaderControlProps.js +12 -11
- package/lib/esm/components/header/subcomponents/MinimizeButton.js +5 -5
- package/lib/esm/components/inputvalidationpane/InputValidationPane.js +29 -29
- package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneCancelButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneGeneralStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneInvalidInputErrorMessageStyles.js +1 -1
- package/lib/esm/components/inputvalidationpane/common/default/defaultStyles/defaultInputValidationPaneSendButtonStyles.js +2 -1
- package/lib/esm/components/inputvalidationpane/common/presetTwo/presetTwoProps/presetTwoInputValidationPaneControlProps.js +12 -12
- package/lib/esm/components/loadingpane/LoadingPane.js +3 -2
- package/lib/esm/components/loadingpane/common/defaultProps/defaultLoadingPaneControlProps.js +5 -4
- package/lib/esm/components/loadingpane/common/defaultProps/defaultStyles/defaultLoadingPaneIconStyles.js +3 -2
- package/lib/esm/components/loadingpane/common/presetOneProps/presetOneLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetThreeProps/presetThreeLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/loadingpane/common/presetTwoProps/presetTwoLoadingPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/OOOHPane.js +13 -7
- package/lib/esm/components/outofofficehourspane/common/defaultProps/defaultOOOHPaneControlProps.js +5 -2
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.js +6 -0
- package/lib/esm/components/outofofficehourspane/common/presetOneProps/presetOneOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/outofofficehourspane/common/presetTwoProps/presetTwoOOOHPaneControlProps.js +1 -1
- package/lib/esm/components/postchatsurveypane/PostChatSurveyPane.js +2 -1
- package/lib/esm/components/postchatsurveypane/common/defaultProps/defaultPostChatSurveyPaneControlProps.js +3 -2
- package/lib/esm/components/postchatsurveypane/common/presetOneProps/presetOnePostChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +26 -12
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultPreChatSurveyPaneControlProps.js +3 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneButtonStyles.js +4 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles.js +5 -1
- package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +3 -0
- package/lib/esm/components/prechatsurveypane/common/presetThreeProps/presetThreePreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/common/presetTwoProps/presetTwoPreChatSurveyPaneControlProps.js +1 -1
- package/lib/esm/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.js +1 -0
- package/lib/esm/components/proactivechatpane/ProactiveChatPane.js +33 -34
- package/lib/esm/components/proactivechatpane/common/default/defaultProps/defaultProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/default/defaultStyles/defaultProactiveChatPaneCloseButtonStyles.js +2 -11
- package/lib/esm/components/proactivechatpane/common/presetOne/presetOneProps/presetOneProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetThree/presetThreeProps/presetThreeProactiveChatPaneControlProps.js +13 -8
- package/lib/esm/components/proactivechatpane/common/presetTwo/presetTwoProps/presetTwoProactiveChatPaneControlProps.js +7 -6
- package/lib/esm/components/reconnectchatpane/ReconnectChatPane.js +4 -4
- package/lib/esm/components/reconnectchatpane/common/default/defaultProps/defaultReconnectChatPaneControlProps.js +10 -9
- package/lib/esm/components/reconnectchatpane/common/presetThree/presetThreeProps/presetThreeReconnectChatPaneControlProps.js +9 -8
- package/lib/esm/index.js +1 -0
- package/lib/esm/services/BroadcastService.js +34 -8
- package/lib/types/common/Constants.d.ts +151 -2
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/chatbutton/interfaces/IChatButtonControlProps.d.ts +3 -0
- package/lib/types/components/common/interfaces/ICommandButtonControlProps.d.ts +1 -0
- package/lib/types/components/common/interfaces/ICommandButtonProps.d.ts +1 -0
- package/lib/types/components/{header → common}/subcomponents/CloseButton.d.ts +1 -1
- package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +0 -1
- package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +0 -1
- package/lib/types/components/loadingpane/interfaces/ILoadingPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneControlProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/common/presetFourProps/presetFourOOOHPaneProps.d.ts +2 -0
- package/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneControlProps.d.ts +1 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.d.ts +2 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneButtonStyles.d.ts +3 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneElementStyles.d.ts +5 -0
- package/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneStyleProps.d.ts +5 -0
- package/lib/types/components/proactivechatpane/interfaces/IProactiveChatPaneControlProps.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/BroadcastService.d.ts +1 -0
- package/package.json +2 -2
|
@@ -4,23 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultProactiveChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const defaultProactiveChatPaneControlProps = {
|
|
8
|
-
id:
|
|
11
|
+
id: _Constants.Ids.DefaultProactiveChatPaneId,
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideProactiveChatPane: false,
|
|
11
|
-
proactiveChatPaneAriaLabel:
|
|
14
|
+
proactiveChatPaneAriaLabel: _Constants.AriaLabels.ProactiveChatPane,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ProactiveChatPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ProactiveChatPaneSubtitleText,
|
|
16
19
|
hideCloseButton: false,
|
|
17
|
-
|
|
20
|
+
closeButtonProps: {
|
|
21
|
+
type: _Constants.ButtonTypes.Icon,
|
|
22
|
+
iconName: _Constants.IconNames.ChromeClose,
|
|
23
|
+
hideButtonTitle: true
|
|
24
|
+
},
|
|
18
25
|
isBodyContainerHorizantal: false,
|
|
19
26
|
hideBodyTitle: false,
|
|
20
|
-
bodyTitleText:
|
|
27
|
+
bodyTitleText: _Constants.Texts.ProactiveChatPaneBodyTitleText,
|
|
21
28
|
hideStartButton: false,
|
|
22
|
-
startButtonText:
|
|
23
|
-
startButtonAriaLabel:
|
|
29
|
+
startButtonText: _Constants.Texts.ProactiveChatPaneStartButtonText,
|
|
30
|
+
startButtonAriaLabel: _Constants.AriaLabels.ChatNow,
|
|
24
31
|
onClose: function () {
|
|
25
32
|
console.log("on close");
|
|
26
33
|
},
|
|
@@ -4,19 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultProactiveChatPaneCloseButtonStyles = void 0;
|
|
7
|
-
|
|
8
|
-
var _Icons = require("../../../../../assets/Icons");
|
|
9
|
-
|
|
10
7
|
const defaultProactiveChatPaneCloseButtonStyles = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
backgroundRepeat: "no-repeat",
|
|
14
|
-
color: "#605e5c",
|
|
15
|
-
cursor: "pointer",
|
|
16
|
-
height: "14px",
|
|
17
|
-
lineHeight: "14px",
|
|
18
|
-
textAlign: "center",
|
|
19
|
-
width: "14px",
|
|
20
|
-
zIndex: "inherit"
|
|
8
|
+
color: "white",
|
|
9
|
+
fontSize: "12px"
|
|
21
10
|
};
|
|
22
11
|
exports.defaultProactiveChatPaneCloseButtonStyles = defaultProactiveChatPaneCloseButtonStyles;
|
|
@@ -4,23 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.presetOneProactiveChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const presetOneProactiveChatPaneControlProps = {
|
|
8
|
-
id: "
|
|
11
|
+
id: "lcw-incoming-proactive-chat",
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideProactiveChatPane: false,
|
|
11
|
-
proactiveChatPaneAriaLabel:
|
|
14
|
+
proactiveChatPaneAriaLabel: _Constants.AriaLabels.ProactiveChatPane,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ProactiveChatPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ProactiveChatPaneSubtitleText,
|
|
16
19
|
hideCloseButton: false,
|
|
17
|
-
|
|
20
|
+
closeButtonProps: {
|
|
21
|
+
type: _Constants.ButtonTypes.Icon,
|
|
22
|
+
iconName: _Constants.IconNames.ChromeClose,
|
|
23
|
+
hideButtonTitle: true
|
|
24
|
+
},
|
|
18
25
|
isBodyContainerHorizantal: true,
|
|
19
26
|
hideBodyTitle: false,
|
|
20
|
-
bodyTitleText:
|
|
27
|
+
bodyTitleText: _Constants.Texts.ProactiveChatPaneBodyTitleText,
|
|
21
28
|
hideStartButton: false,
|
|
22
|
-
startButtonText:
|
|
23
|
-
startButtonAriaLabel:
|
|
29
|
+
startButtonText: _Constants.Texts.ProactiveChatPaneStartButtonText,
|
|
30
|
+
startButtonAriaLabel: _Constants.AriaLabels.ChatNow,
|
|
24
31
|
onClose: function () {
|
|
25
32
|
console.log("on close");
|
|
26
33
|
},
|
|
@@ -4,23 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.presetThreeProactiveChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const presetThreeProactiveChatPaneControlProps = {
|
|
8
|
-
id: "
|
|
11
|
+
id: "lcw-incoming-proactive-chat",
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideProactiveChatPane: false,
|
|
11
|
-
proactiveChatPaneAriaLabel:
|
|
14
|
+
proactiveChatPaneAriaLabel: _Constants.AriaLabels.ProactiveChatPane,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ProactiveChatPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ProactiveChatPaneSubtitleText,
|
|
16
19
|
hideCloseButton: false,
|
|
17
|
-
|
|
20
|
+
closeButtonProps: {
|
|
21
|
+
type: _Constants.ButtonTypes.Icon,
|
|
22
|
+
iconName: _Constants.IconNames.ChromeClose,
|
|
23
|
+
hideButtonTitle: true
|
|
24
|
+
},
|
|
18
25
|
isBodyContainerHorizantal: false,
|
|
19
26
|
hideBodyTitle: false,
|
|
20
|
-
bodyTitleText:
|
|
27
|
+
bodyTitleText: _Constants.Texts.ProactiveChatPaneBodyTitleText,
|
|
21
28
|
hideStartButton: false,
|
|
22
|
-
startButtonText:
|
|
23
|
-
startButtonAriaLabel:
|
|
29
|
+
startButtonText: _Constants.Texts.ProactiveChatPaneStartButtonText,
|
|
30
|
+
startButtonAriaLabel: _Constants.AriaLabels.ChatNow,
|
|
24
31
|
onClose: function () {
|
|
25
32
|
console.log("on close");
|
|
26
33
|
},
|
|
@@ -4,21 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.presetTwoProactiveChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const presetTwoProactiveChatPaneControlProps = {
|
|
8
|
-
id: "
|
|
11
|
+
id: "lcw-incoming-proactive-chat",
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideProactiveChatPane: false,
|
|
11
|
-
proactiveChatPaneAriaLabel:
|
|
14
|
+
proactiveChatPaneAriaLabel: _Constants.AriaLabels.ProactiveChatPane,
|
|
12
15
|
hideTitle: true,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ProactiveChatPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ProactiveChatPaneSubtitleText,
|
|
16
19
|
hideCloseButton: false,
|
|
17
20
|
isBodyContainerHorizantal: true,
|
|
18
21
|
hideBodyTitle: false,
|
|
19
22
|
hideStartButton: false,
|
|
20
|
-
startButtonText:
|
|
21
|
-
startButtonAriaLabel:
|
|
23
|
+
startButtonText: _Constants.Texts.ProactiveChatPaneStartButtonText,
|
|
24
|
+
startButtonAriaLabel: _Constants.AriaLabels.ChatNow,
|
|
22
25
|
onStart: function () {
|
|
23
26
|
console.log("on start");
|
|
24
27
|
}
|
|
@@ -54,7 +54,7 @@ function ReconnectChatPane(props) {
|
|
|
54
54
|
const customEvent = {
|
|
55
55
|
elementType: _Constants.ElementType.ReconnectChatContinueChatButton,
|
|
56
56
|
elementId: elementId + "-continueconversationbutton",
|
|
57
|
-
eventName:
|
|
57
|
+
eventName: _Constants.EventNames.OnClick
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -71,7 +71,7 @@ function ReconnectChatPane(props) {
|
|
|
71
71
|
const customEvent = {
|
|
72
72
|
elementType: _Constants.ElementType.ReconnectChatStartNewChatButton,
|
|
73
73
|
elementId: elementId + "-startnewconversationbutton",
|
|
74
|
-
eventName:
|
|
74
|
+
eventName: _Constants.EventNames.OnClick
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -89,7 +89,7 @@ function ReconnectChatPane(props) {
|
|
|
89
89
|
const customEvent = {
|
|
90
90
|
elementType: _Constants.ElementType.ReconnectChatPane,
|
|
91
91
|
elementId: elementId,
|
|
92
|
-
eventName:
|
|
92
|
+
eventName: _Constants.EventNames.OnEscapeKeyDown
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
_BroadcastService.BroadcastService.postMessage(customEvent);
|
|
@@ -4,24 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultReconnectChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const defaultReconnectChatPaneControlProps = {
|
|
8
|
-
id:
|
|
11
|
+
id: _Constants.Ids.DefaultReconnectChatPaneId,
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideReconnectChatPane: false,
|
|
11
|
-
reconnectChatPaneAriaLabel:
|
|
14
|
+
reconnectChatPaneAriaLabel: _Constants.AriaLabels.ReconnectChatPane,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ReconnectChatPaneTitleText,
|
|
14
17
|
hideSubtitle: false,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ReconnectChatPaneSubtitleText,
|
|
16
19
|
hideIcon: false,
|
|
17
|
-
iconAriaLabel:
|
|
20
|
+
iconAriaLabel: _Constants.AriaLabels.ReconnectChatPaneIcon,
|
|
18
21
|
isButtonGroupHorizontal: false,
|
|
19
22
|
hideContinueChatButton: false,
|
|
20
|
-
continueChatButtonText:
|
|
21
|
-
continueChatButtonAriaLabel:
|
|
23
|
+
continueChatButtonText: _Constants.Texts.ReconnectChatPaneContinueChatButtonText,
|
|
24
|
+
continueChatButtonAriaLabel: _Constants.AriaLabels.ContinueConversation,
|
|
22
25
|
hideStartNewChatButton: false,
|
|
23
|
-
startNewChatButtonText:
|
|
24
|
-
startNewChatButtonAriaLabel:
|
|
26
|
+
startNewChatButtonText: _Constants.Texts.ReconnectChatPaneStartNewChatButtonText,
|
|
27
|
+
startNewChatButtonAriaLabel: _Constants.AriaLabels.StartNewConversation,
|
|
25
28
|
onContinueChat: function () {
|
|
26
29
|
console.log("on continue conversation");
|
|
27
30
|
},
|
|
@@ -4,24 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.presetThreeReconnectChatPaneControlProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _Constants = require("../../../../../common/Constants");
|
|
9
|
+
|
|
7
10
|
const presetThreeReconnectChatPaneControlProps = {
|
|
8
11
|
id: "lcw-components-reconnect-chat-pane",
|
|
9
12
|
dir: "ltr",
|
|
10
13
|
hideReconnectChatPane: false,
|
|
11
|
-
reconnectChatPaneAriaLabel:
|
|
14
|
+
reconnectChatPaneAriaLabel: _Constants.AriaLabels.ReconnectChatPane,
|
|
12
15
|
hideTitle: false,
|
|
13
|
-
titleText:
|
|
16
|
+
titleText: _Constants.Texts.ReconnectChatPaneTitleText,
|
|
14
17
|
hideSubtitle: true,
|
|
15
|
-
subtitleText:
|
|
18
|
+
subtitleText: _Constants.Texts.ReconnectChatPaneSubtitleText,
|
|
16
19
|
hideIcon: false,
|
|
17
|
-
iconAriaLabel:
|
|
20
|
+
iconAriaLabel: _Constants.AriaLabels.ReconnectChatPaneIcon,
|
|
18
21
|
isButtonGroupHorizontal: false,
|
|
19
22
|
hideContinueChatButton: false,
|
|
20
|
-
continueChatButtonText:
|
|
21
|
-
continueChatButtonAriaLabel:
|
|
23
|
+
continueChatButtonText: _Constants.Texts.ReconnectChatPaneContinueChatButtonText,
|
|
24
|
+
continueChatButtonAriaLabel: _Constants.AriaLabels.ContinueConversation,
|
|
22
25
|
hideStartNewChatButton: true,
|
|
23
|
-
startNewChatButtonText:
|
|
24
|
-
startNewChatButtonAriaLabel:
|
|
26
|
+
startNewChatButtonText: _Constants.Texts.ReconnectChatPaneStartNewChatButtonText,
|
|
27
|
+
startNewChatButtonAriaLabel: _Constants.AriaLabels.StartNewConversation,
|
|
25
28
|
onContinueChat: function () {
|
|
26
29
|
console.log("on continue conversation");
|
|
27
30
|
},
|
package/lib/cjs/index.js
CHANGED
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "BroadcastService", {
|
|
|
27
27
|
return _BroadcastService.BroadcastService;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "BroadcastServiceInitialize", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _BroadcastService.BroadcastServiceInitialize;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "CallAcceptButtonBase64", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BroadcastService = void 0;
|
|
6
|
+
exports.BroadcastServiceInitialize = exports.BroadcastService = void 0;
|
|
7
7
|
|
|
8
8
|
var _rxjs = require("rxjs");
|
|
9
9
|
|
|
@@ -11,20 +11,48 @@ var _operators = require("rxjs/operators");
|
|
|
11
11
|
|
|
12
12
|
var _broadcastChannel = require("broadcast-channel");
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const newMessage = new _rxjs.Subject(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
const pubChannel = new _broadcastChannel.BroadcastChannel(_Constants.BROADCAST_CHANNEL_NAME);
|
|
18
|
-
const subChannel = new _broadcastChannel.BroadcastChannel(_Constants.BROADCAST_CHANNEL_NAME); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
const broadcastServicePubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const broadcastServiceSubList = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
|
|
20
|
+
let pubChannel; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
|
|
22
|
+
let subChannel;
|
|
23
|
+
|
|
24
|
+
const BroadcastServiceInitialize = channelName => {
|
|
25
|
+
if (broadcastServicePubList[channelName]) {
|
|
26
|
+
pubChannel = broadcastServicePubList[channelName];
|
|
27
|
+
} else {
|
|
28
|
+
const newPubChannel = new _broadcastChannel.BroadcastChannel(channelName);
|
|
29
|
+
broadcastServicePubList[channelName] = newPubChannel;
|
|
30
|
+
pubChannel = newPubChannel;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (broadcastServiceSubList[channelName]) {
|
|
34
|
+
subChannel = broadcastServiceSubList[channelName];
|
|
35
|
+
} else {
|
|
36
|
+
const newSubChannel = new _broadcastChannel.BroadcastChannel(channelName);
|
|
37
|
+
broadcastServiceSubList[channelName] = newSubChannel;
|
|
38
|
+
subChannel = newSubChannel;
|
|
39
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
subChannel.onmessage = message => {
|
|
43
|
+
newMessage.next(message);
|
|
44
|
+
};
|
|
22
45
|
};
|
|
23
46
|
|
|
47
|
+
exports.BroadcastServiceInitialize = BroadcastServiceInitialize;
|
|
24
48
|
const BroadcastService = {
|
|
25
49
|
//broadcast a message
|
|
26
50
|
postMessage: message => {
|
|
27
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Omit copying methods to prevent 'DataCloneError' in older browsers when passing an object with functions
|
|
53
|
+
* This exception occurs when an object can't be clone with the 'structured clone algorithm' (used by postMessage)
|
|
54
|
+
*/
|
|
55
|
+
pubChannel.postMessage(JSON.parse(JSON.stringify(message)));
|
|
28
56
|
},
|
|
29
57
|
getMessage: message => {
|
|
30
58
|
return newMessage.pipe((0, _operators.filter)(msg => msg.elementId == message.elementId && msg.elementType == message.elementType && msg.eventName == message.eventName));
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
var _class, _class2;
|
|
1
|
+
var _class, _class2, _class3, _class4, _class5, _class6, _class7, _class8;
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
|
|
5
5
|
/* CSS Constants */
|
|
6
6
|
export const AccessibilityBrightnessRatio = 1.2;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export const HiddenTextStyles = {
|
|
8
|
+
position: "absolute",
|
|
9
|
+
height: "1px",
|
|
10
|
+
width: "1px",
|
|
11
|
+
overflow: "hidden",
|
|
12
|
+
clip: "rect(1px, 1px, 1px, 1px)",
|
|
13
|
+
whiteSpace: "nowrap"
|
|
14
|
+
};
|
|
10
15
|
export const KeyCodes = (_class = class KeyCodes {}, _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "ESCAPE", "Escape"), _defineProperty(_class, "SPACE", "Space"), _defineProperty(_class, "DeclineCallHotKey", "D"), _defineProperty(_class, "AcceptAudioCallHotKey", "S"), _defineProperty(_class, "AcceptVideoCallHotKey", "A"), _defineProperty(_class, "ToggleMicHotKey", "M"), _defineProperty(_class, "ToggleCameraHotKey", "O"), _class);
|
|
11
16
|
export const Regex = (_class2 = class Regex {}, _defineProperty(_class2, "EmailRegex", "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"), _defineProperty(_class2, "URLRegex", /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi), _class2);
|
|
12
17
|
export let ElementType;
|
|
13
18
|
|
|
14
19
|
(function (ElementType) {
|
|
15
20
|
ElementType["ChatButton"] = "ChatButton";
|
|
16
|
-
ElementType["
|
|
21
|
+
ElementType["CloseButton"] = "CloseButton";
|
|
17
22
|
ElementType["HeaderMinimizeButton"] = "HeaderMinimizeButton";
|
|
18
23
|
ElementType["FooterDownloadTranscriptButton"] = "FooterDownloadTranscriptButton";
|
|
19
24
|
ElementType["FooterEmailTranscriptButton"] = "FooterEmailTranscriptButton";
|
|
@@ -33,4 +38,11 @@ export let ElementType;
|
|
|
33
38
|
ElementType["CurrentCallEndCallButton"] = "CurrentCallEndCallButton";
|
|
34
39
|
ElementType["Utility"] = "Utility";
|
|
35
40
|
ElementType["Custom"] = "Custom";
|
|
36
|
-
})(ElementType || (ElementType = {}));
|
|
41
|
+
})(ElementType || (ElementType = {}));
|
|
42
|
+
|
|
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);
|
|
44
|
+
export const ButtonTypes = (_class4 = class ButtonTypes {}, _defineProperty(_class4, "Icon", "icon"), _defineProperty(_class4, "Text", "text"), _class4);
|
|
45
|
+
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
|
+
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);
|
|
47
|
+
export const EventNames = (_class7 = class EventNames {}, _defineProperty(_class7, "OnClick", "OnClick"), _defineProperty(_class7, "OnEscapeKeyDown", "OnEscapeKeyDown"), _defineProperty(_class7, "IncomingCallEnded", "IncomingCallEnded"), _class7);
|
|
48
|
+
export const Texts = (_class8 = class Texts {}, _defineProperty(_class8, "IncomingCallTitle", "Incoming Call"), _defineProperty(_class8, "ChatButtonTitle", "Let's Chat!"), _defineProperty(_class8, "ChatButtonSubtitle", "We're online."), _defineProperty(_class8, "ChatButtonUnreadMessageString", "new messages"), _defineProperty(_class8, "ChatButtonLargeUnreadMessageString", "99+"), _defineProperty(_class8, "CloseButtonText", "Close"), _defineProperty(_class8, "ConfirmationPaneTitle", "Close chat"), _defineProperty(_class8, "ConfirmationPaneSubtitle", "Do you really want to close this chat?"), _defineProperty(_class8, "ConfirmButtonText", "Close"), _defineProperty(_class8, "CancelButtonText", "Cancel"), _defineProperty(_class8, "DownloadChatTranscriptText", "Download chat transcript"), _defineProperty(_class8, "EmailTranscriptText", "Email Transcript"), _defineProperty(_class8, "HeaderIcon", "Chat Icon"), _defineProperty(_class8, "HeaderTitle", "Let's Chat"), _defineProperty(_class8, "MinimizeText", "Minimize"), _defineProperty(_class8, "InputValidationPaneTitleText", "Email this chat transcript"), _defineProperty(_class8, "InputValidationPaneSubtitleText", "This will be sent after your chat ends."), _defineProperty(_class8, "InvalidInputErrorMessageText", "Enter a valid email address."), _defineProperty(_class8, "SendButtonText", "Send"), _defineProperty(_class8, "LoadingPaneTitleText", "Welcome to"), _defineProperty(_class8, "LoadingPaneSubtitleText", "live chat support ..."), _defineProperty(_class8, "LoadingPaneSpinnerText", "Loading ..."), _defineProperty(_class8, "OOOHPaneTitleText", "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."), _defineProperty(_class8, "PostChatSurveyPaneTitleText", "Post chat survey pane"), _defineProperty(_class8, "ProactiveChatPaneTitleText", "Welcome to"), _defineProperty(_class8, "ProactiveChatPaneSubtitleText", "Live chat support!"), _defineProperty(_class8, "ProactiveChatPaneBodyTitleText", "Hi! Have any questions? I am here to help."), _defineProperty(_class8, "ProactiveChatPaneStartButtonText", "Chat Now"), _defineProperty(_class8, "ReconnectChatPaneTitleText", "Previous session detected"), _defineProperty(_class8, "ReconnectChatPaneSubtitleText", "We have detected a previous chat session. Would you like to continue with your previous session?"), _defineProperty(_class8, "ReconnectChatPaneContinueChatButtonText", "Continue conversation"), _defineProperty(_class8, "ReconnectChatPaneStartNewChatButtonText", "Start new conversation"), _class8);
|
package/lib/esm/common/utils.js
CHANGED
|
@@ -93,4 +93,20 @@ export const addNoreferrerNoopenerTag = htmlNode => {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
};
|
|
97
|
+
export const replaceURLWithAnchor = (text, openInNewTab) => {
|
|
98
|
+
if (text) {
|
|
99
|
+
const modifiedText = text.replace(Regex.URLRegex, function (url) {
|
|
100
|
+
if (openInNewTab) {
|
|
101
|
+
// eslint-disable-next-line quotes
|
|
102
|
+
return '<a href="' + url + '" rel="noreferrer noopener" target="_blank">' + url + '</a>';
|
|
103
|
+
} // eslint-disable-next-line quotes
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
return '<a href="' + url + '">' + url + '</a>';
|
|
107
|
+
});
|
|
108
|
+
return modifiedText;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return text;
|
|
96
112
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { IconButton, Stack } from "@fluentui/react";
|
|
5
5
|
import { BroadcastService } from "../../../../services/BroadcastService";
|
|
6
6
|
import CommandButton from "../../../common/commandbutton/CommandButton";
|
|
7
|
-
import { ElementType, KeyCodes } from "../../../../common/Constants";
|
|
7
|
+
import { ElementType, EventNames, Ids, KeyCodes } from "../../../../common/Constants";
|
|
8
8
|
import Timer from "../Timer/Timer";
|
|
9
9
|
import { defaultCurrentCallProps } from "./common/defaultProps/defaultCurrentCallProps";
|
|
10
10
|
import { processCustomComponents } from "../../../../common/utils";
|
|
@@ -145,7 +145,7 @@ function CurrentCall(props) {
|
|
|
145
145
|
const endCallCustomEvent = {
|
|
146
146
|
elementType: ElementType.CurrentCallEndCallButton,
|
|
147
147
|
elementId: endCallButtonId,
|
|
148
|
-
eventName:
|
|
148
|
+
eventName: EventNames.OnClick
|
|
149
149
|
};
|
|
150
150
|
const handleEndCallClick = useCallback(() => {
|
|
151
151
|
var _props$controlProps62;
|
|
@@ -165,7 +165,7 @@ function CurrentCall(props) {
|
|
|
165
165
|
const videoOffCustomEvent = {
|
|
166
166
|
elementType: ElementType.CurrentCallVideoButton,
|
|
167
167
|
elementId: videoOffButtonId,
|
|
168
|
-
eventName:
|
|
168
|
+
eventName: EventNames.OnClick
|
|
169
169
|
};
|
|
170
170
|
BroadcastService.postMessage(videoOffCustomEvent);
|
|
171
171
|
(_props$controlProps65 = props.controlProps) === null || _props$controlProps65 === void 0 ? void 0 : _props$controlProps65.onVideoOffClick();
|
|
@@ -182,7 +182,7 @@ function CurrentCall(props) {
|
|
|
182
182
|
const micCustomEvent = {
|
|
183
183
|
elementType: ElementType.CurrentCallMicButton,
|
|
184
184
|
elementId: micButtonId,
|
|
185
|
-
eventName:
|
|
185
|
+
eventName: EventNames.OnClick
|
|
186
186
|
};
|
|
187
187
|
BroadcastService.postMessage(micCustomEvent);
|
|
188
188
|
(_props$controlProps67 = props.controlProps) === null || _props$controlProps67 === void 0 ? void 0 : _props$controlProps67.onMicCallClick();
|
|
@@ -244,12 +244,12 @@ function CurrentCall(props) {
|
|
|
244
244
|
dir: dir
|
|
245
245
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
246
246
|
horizontal: true,
|
|
247
|
-
id:
|
|
247
|
+
id: Ids.CurrentCallLeftGroupId,
|
|
248
248
|
verticalAlign: "center",
|
|
249
249
|
tokens: leftGroupStackTokens
|
|
250
250
|
}, processCustomComponents((_props$controlProps69 = props.controlProps) === null || _props$controlProps69 === void 0 ? void 0 : (_props$controlProps70 = _props$controlProps69.leftGroup) === null || _props$controlProps70 === void 0 ? void 0 : _props$controlProps70.children)), /*#__PURE__*/React.createElement(Stack, {
|
|
251
251
|
horizontal: true,
|
|
252
|
-
id:
|
|
252
|
+
id: Ids.CurrentCallMiddleGroupId,
|
|
253
253
|
verticalAlign: "center",
|
|
254
254
|
tokens: middleGroupStackTokens,
|
|
255
255
|
dir: dir
|
|
@@ -286,7 +286,7 @@ function CurrentCall(props) {
|
|
|
286
286
|
customEvent: endCallCustomEvent
|
|
287
287
|
}))), /*#__PURE__*/React.createElement(Stack, {
|
|
288
288
|
horizontal: true,
|
|
289
|
-
id:
|
|
289
|
+
id: Ids.CurrentCallRightGroupId,
|
|
290
290
|
verticalAlign: "center",
|
|
291
291
|
tokens: rightGroupStackTokens
|
|
292
292
|
}, processCustomComponents((_props$controlProps100 = props.controlProps) === null || _props$controlProps100 === void 0 ? void 0 : (_props$controlProps101 = _props$controlProps100.rightGroup) === null || _props$controlProps101 === void 0 ? void 0 : _props$controlProps101.children))));
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { AriaLabels, IconNames, ButtonTypes, Ids } from "../../../../../../common/Constants";
|
|
1
2
|
export const defaultCurrentCallControlProps = {
|
|
2
|
-
id:
|
|
3
|
+
id: Ids.DefaultCurrentCallId,
|
|
3
4
|
nonActionIds: {
|
|
4
|
-
currentCallActionGroupId:
|
|
5
|
-
currentCallFooterId:
|
|
6
|
-
remoteVideoTileId:
|
|
7
|
-
selfVideoTileId:
|
|
8
|
-
videoTileGroupId:
|
|
5
|
+
currentCallActionGroupId: Ids.CurrentCallActionGroupId,
|
|
6
|
+
currentCallFooterId: Ids.CurrentCallFooterId,
|
|
7
|
+
remoteVideoTileId: Ids.RemoteVideoTileId,
|
|
8
|
+
selfVideoTileId: Ids.SelfVideoTileId,
|
|
9
|
+
videoTileGroupId: Ids.VideoTileGroupId
|
|
9
10
|
},
|
|
10
11
|
hideMicButton: false,
|
|
11
12
|
hideVideoButton: false,
|
|
@@ -35,32 +36,32 @@ export const defaultCurrentCallControlProps = {
|
|
|
35
36
|
children: []
|
|
36
37
|
},
|
|
37
38
|
endCallButtonProps: {
|
|
38
|
-
id:
|
|
39
|
-
type:
|
|
40
|
-
ariaLabel:
|
|
41
|
-
iconName:
|
|
39
|
+
id: Ids.EndCallButtonId,
|
|
40
|
+
type: ButtonTypes.Icon,
|
|
41
|
+
ariaLabel: AriaLabels.EndCall,
|
|
42
|
+
iconName: IconNames.DeclineCall,
|
|
42
43
|
iconSize: 18
|
|
43
44
|
},
|
|
44
45
|
micButtonProps: {
|
|
45
|
-
id:
|
|
46
|
-
type:
|
|
47
|
-
ariaLabel:
|
|
48
|
-
toggleAriaLabel:
|
|
49
|
-
iconName:
|
|
50
|
-
toggleIconName:
|
|
46
|
+
id: Ids.MicButtonId,
|
|
47
|
+
type: ButtonTypes.Icon,
|
|
48
|
+
ariaLabel: AriaLabels.MicMute,
|
|
49
|
+
toggleAriaLabel: AriaLabels.MicUnmute,
|
|
50
|
+
iconName: IconNames.Microphone,
|
|
51
|
+
toggleIconName: IconNames.MicOff2,
|
|
51
52
|
iconSize: 18
|
|
52
53
|
},
|
|
53
54
|
videoButtonProps: {
|
|
54
|
-
id:
|
|
55
|
-
type:
|
|
56
|
-
ariaLabel:
|
|
57
|
-
toggleAriaLabel:
|
|
58
|
-
iconName:
|
|
59
|
-
toggleIconName:
|
|
55
|
+
id: Ids.VideoButtonId,
|
|
56
|
+
type: ButtonTypes.Icon,
|
|
57
|
+
ariaLabel: AriaLabels.VideoTurnCameraOn,
|
|
58
|
+
toggleAriaLabel: AriaLabels.VideoTurnCameraOff,
|
|
59
|
+
iconName: IconNames.Video,
|
|
60
|
+
toggleIconName: IconNames.VideoOff,
|
|
60
61
|
iconSize: 18
|
|
61
62
|
},
|
|
62
63
|
callTimerProps: {
|
|
63
|
-
id:
|
|
64
|
+
id: Ids.CallTimerId,
|
|
64
65
|
showHours: false,
|
|
65
66
|
timerStyles: {
|
|
66
67
|
color: "white",
|