@azure/communication-react 1.19.0-alpha-202407250014 → 1.19.0-alpha-202407270014
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/dist/communication-react.d.ts +203 -23
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D4Pf_JpT.js → ChatMessageComponentAsRichTextEditBox-BueeC-ud.js} +14 -15
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BueeC-ud.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BNwd6bE2.js → RichTextSendBoxWrapper-Br441vhG.js} +2 -3
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BNwd6bE2.js.map → RichTextSendBoxWrapper-Br441vhG.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-DdAkrosV.js → index-DznlW8XT.js} +411 -246
- package/dist/dist-cjs/communication-react/index-DznlW8XT.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +2 -2
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -0
- package/dist/dist-esm/acs-ui-common/src/index.js +2 -0
- package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +7 -0
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +18 -0
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +1 -0
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +14 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +16 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +2 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +17 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +2 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +17 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +13 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/incomingCallStackSelector.d.ts +16 -0
- package/dist/dist-esm/calling-component-bindings/src/incomingCallStackSelector.js +33 -0
- package/dist/dist-esm/calling-component-bindings/src/incomingCallStackSelector.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +1 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +6 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +2 -7
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +62 -3
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +6 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +4 -3
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +26 -3
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +3 -2
- package/dist/dist-esm/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +12 -12
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +6 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +2 -2
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.d.ts +27 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js +73 -36
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallStack.d.ts +76 -0
- package/dist/dist-esm/react-components/src/components/IncomingCallStack.js +23 -0
- package/dist/dist-esm/react-components/src/components/IncomingCallStack.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js +3 -23
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +6 -5
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -3
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +15 -5
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +6 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +13 -11
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +14 -14
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +3 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +15 -15
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +9 -6
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/index.js +3 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +14 -11
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js +6 -2
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +7 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +36 -33
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +9 -8
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +4 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +7 -23
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/package.json +2 -3
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-D4Pf_JpT.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-DdAkrosV.js.map +0 -1
@@ -1,45 +1,73 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import { IconButton, Persona, PersonaSize, Stack, Text, useTheme } from '@fluentui/react';
|
3
|
+
import { DefaultButton, IconButton, Persona, PersonaSize, PrimaryButton, Stack, Text, useTheme } from '@fluentui/react';
|
4
4
|
import React from 'react';
|
5
5
|
/* @conditional-compile-remove(one-to-n-calling) */
|
6
6
|
import { useLocale } from '../localization';
|
7
|
+
import { _formatString } from "../../../acs-ui-common/src";
|
7
8
|
/**
|
8
9
|
* A Notification component that is to be used to represent incoming calls to the end user.
|
9
10
|
* Allows the user to accept or reject the incoming call.
|
10
11
|
* @beta
|
11
12
|
*/
|
12
13
|
export const IncomingCallNotification = (props) => {
|
13
|
-
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
15
|
+
const { callerName, alertText, avatarImage, onAcceptWithAudio,
|
16
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
17
|
+
onAcceptWithVideo, onReject, onDismiss, personaSize, styles, strings,
|
18
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
19
|
+
acceptOptions } = props;
|
14
20
|
const theme = useTheme();
|
15
21
|
/* @conditional-compile-remove(one-to-n-calling) */
|
16
22
|
const localeStrings = useLocale().strings.IncomingCallNotification;
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
24
|
+
const formattedMessageString = localeStrings.incomingCallNotificationPlaceholderAlert && callerName
|
25
|
+
? _formatString(localeStrings.incomingCallNotificationPlaceholderAlert, { callerName: callerName })
|
26
|
+
: callerName;
|
27
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
28
|
+
const acceptManuOptions = acceptOptions.showAcceptWithVideo
|
29
|
+
? {
|
30
|
+
items: [
|
31
|
+
{
|
32
|
+
key: 'audio',
|
33
|
+
text:
|
34
|
+
/* @conditional-compile-remove(one-to-n-calling) */ (_a = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _a !== void 0 ? _a : localeStrings.incomingCallNotificationAcceptButtonLabel,
|
35
|
+
onClick: () => onAcceptWithAudio()
|
36
|
+
},
|
37
|
+
{
|
38
|
+
key: 'video',
|
39
|
+
text:
|
40
|
+
/* @conditional-compile-remove(one-to-n-calling) */ (_b = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAccceptWithVideoButtonLabel) !== null && _b !== void 0 ? _b : localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,
|
41
|
+
onClick: () => onAcceptWithVideo()
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
45
|
+
: undefined;
|
46
|
+
return (React.createElement(Stack, { tokens: { childrenGap: '0.5rem' }, verticalAlign: "center", styles: (styles === null || styles === void 0 ? void 0 : styles.root) ? styles.root : incomingCallToastStyle(theme) },
|
47
|
+
React.createElement(Stack, { horizontal: true, verticalAlign: "center", tokens: { childrenGap: personaSize ? '0.5rem' : '0rem' } },
|
48
|
+
React.createElement(Stack, { horizontalAlign: "start", styles: (styles === null || styles === void 0 ? void 0 : styles.avatarContainer) ? styles.avatarContainer : incomingCallToastAvatarContainerStyle },
|
49
|
+
React.createElement(Persona, { imageUrl: avatarImage, text: callerName, size: PersonaSize.size24, coinSize: personaSize, hidePersonaDetails: true, "aria-label": callerName })),
|
50
|
+
React.createElement(Stack, { grow: true, horizontalAlign: "center", style: { alignItems: 'flex-start', fontFamily: 'Segoe UI' } },
|
51
|
+
React.createElement(Stack, { style: { fontSize: '0.75rem' } },
|
52
|
+
React.createElement(Text, null, (_c = alertText !== null && alertText !== void 0 ? alertText : strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationPlaceholderAlert) !== null && _c !== void 0 ? _c :
|
53
|
+
/* @conditional-compile-remove(one-to-n-calling) */ formattedMessageString))),
|
54
|
+
React.createElement(IconButton, { iconProps: { iconName: 'cancel' }, onClick: onDismiss, styles: dismissButtonStyle(theme) })),
|
55
|
+
React.createElement(Stack, { horizontal: true, horizontalAlign: 'center', tokens: { childrenGap: '0.5rem' } },
|
56
|
+
React.createElement(PrimaryButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithAudio(), iconProps: { iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } },
|
29
57
|
/* @conditional-compile-remove(one-to-n-calling) */
|
30
|
-
ariaLabel: localeStrings.
|
31
|
-
React.createElement(IconButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithVideo(), iconProps: { iconName: 'IncomingCallNotificationAcceptWithVideoIcon' },
|
58
|
+
ariaLabel: (_d = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationAcceptWithAudioAriaLabel) !== null && _d !== void 0 ? _d : localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel,
|
32
59
|
/* @conditional-compile-remove(one-to-n-calling) */
|
33
|
-
|
34
|
-
|
60
|
+
menuProps: acceptManuOptions },
|
61
|
+
/* @conditional-compile-remove(one-to-n-calling) */ (_e = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _e !== void 0 ? _e : localeStrings.incomingCallNotificationAcceptButtonLabel),
|
62
|
+
React.createElement(DefaultButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.rejectButton) ? styles.rejectButton : incomingCallRejectButtonStyle(theme), onClick: () => onReject(), label: 'Decline', iconProps: { iconName: 'IncomingCallNotificationRejectIcon' },
|
35
63
|
/* @conditional-compile-remove(one-to-n-calling) */
|
36
|
-
ariaLabel: localeStrings.
|
64
|
+
ariaLabel: (_f = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationRejectAriaLabel) !== null && _f !== void 0 ? _f : localeStrings.incomingCallNoticicationRejectAriaLabel },
|
65
|
+
/* @conditional-compile-remove(one-to-n-calling) */ (_g = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationRejectButtonLabel) !== null && _g !== void 0 ? _g : localeStrings.incomingCallNotificationRejectButtonLabel))));
|
37
66
|
};
|
38
67
|
const incomingCallToastStyle = (theme) => {
|
39
68
|
return {
|
40
69
|
root: {
|
41
|
-
|
42
|
-
maxWidth: '40rem',
|
70
|
+
width: '20rem',
|
43
71
|
background: theme.palette.white,
|
44
72
|
opacity: 0.95,
|
45
73
|
borderRadius: '0.5rem',
|
@@ -53,35 +81,44 @@ const incomingCallToastAvatarContainerStyle = {
|
|
53
81
|
marginRight: '0.5rem'
|
54
82
|
}
|
55
83
|
};
|
84
|
+
const dismissButtonStyle = (theme) => {
|
85
|
+
return {
|
86
|
+
root: {
|
87
|
+
color: theme.palette.neutralPrimary,
|
88
|
+
width: '1rem',
|
89
|
+
height: '1rem'
|
90
|
+
},
|
91
|
+
rootHovered: {
|
92
|
+
color: theme.palette.neutralDark
|
93
|
+
}
|
94
|
+
};
|
95
|
+
};
|
56
96
|
const incomingCallAcceptButtonStyle = (theme) => {
|
57
97
|
return {
|
58
98
|
root: {
|
59
|
-
backgroundColor: theme.palette.greenDark,
|
60
99
|
color: theme.palette.white,
|
61
|
-
|
62
|
-
|
63
|
-
width: '
|
64
|
-
|
100
|
+
border: 'none',
|
101
|
+
borderRadius: theme.effects.roundedCorner4,
|
102
|
+
width: '100%',
|
103
|
+
maxWidth: '8.875rem'
|
65
104
|
},
|
66
105
|
rootHovered: {
|
67
|
-
backgroundColor: theme.palette.green,
|
68
106
|
color: theme.palette.white
|
107
|
+
},
|
108
|
+
icon: {
|
109
|
+
height: '1.25rem'
|
69
110
|
}
|
70
111
|
};
|
71
112
|
};
|
72
113
|
const incomingCallRejectButtonStyle = (theme) => {
|
73
114
|
return {
|
74
115
|
root: {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
minWidth: '2rem',
|
79
|
-
width: '2rem',
|
80
|
-
border: 'none'
|
116
|
+
borderRadius: theme.effects.roundedCorner4,
|
117
|
+
maxWidth: '8.875rem',
|
118
|
+
width: '100%'
|
81
119
|
},
|
82
|
-
|
83
|
-
|
84
|
-
color: theme.palette.white
|
120
|
+
icon: {
|
121
|
+
height: '1.25rem'
|
85
122
|
}
|
86
123
|
};
|
87
124
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IncomingCallNotification.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/IncomingCallNotification.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAGL,UAAU,EACV,OAAO,EACP,WAAW,EACX,KAAK,EAC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YACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;YAC1B,YAAY,EAAE,MAAM;YACpB,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;SACf;QACD,WAAW,EAAE;YACX,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG;YAClC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;SAC3B;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n IButtonStyles,\n IStackStyles,\n IconButton,\n Persona,\n PersonaSize,\n Stack,\n Text,\n Theme,\n useTheme\n} from '@fluentui/react';\nimport React from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useLocale } from '../localization';\n\n/**\n * Strings for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationStrings {\n /**\n *Placeholder CallerID for the incoming call notification.\n */\n incomingCallNotificationPlaceholderId?: string;\n /**\n * Placeholder Alert for the incoming call notification.\n */\n incomingCallNotificationPlaceholderAlert?: string;\n /**\n * Aria label for the accept with audio button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithAudioAriaLabel?: string;\n /**\n * Aria label for the accept with video button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithVideoAriaLabel?: string;\n /**\n * Aria label for the reject button in the incoming call notification.\n */\n incomingCallNoticicationRejectAriaLabel?: string;\n}\n\n/**\n * Styles for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationStyles {\n /**\n * Styles for the accept buttons.\n */\n acceptButton?: IButtonStyles;\n /**\n * Styles for the reject button.\n */\n rejectButton?: IButtonStyles;\n /**\n * Styles for the root container.\n */\n root?: IStackStyles;\n /**\n * Styles for the avatar container.\n */\n avatarContainer?: IStackStyles;\n}\n\n/**\n * Properties for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationProps {\n /**\n * Caller's Name\n */\n callerName?: string;\n /**\n * Alert Text\"\n */\n alertText?: string;\n /**\n * URL to the avatar image for the user\n */\n avatarImage?: string;\n /**\n * Size of the persona coin\n */\n personaSize?: number;\n /**\n * Callback to render the avatar\n */\n onRenderAvatar?: () => JSX.Element;\n /**\n * Callback to accept the call with audio\n */\n onAcceptWithAudio: () => void;\n /**\n * Callback to accept the call with Video\n */\n onAcceptWithVideo: () => void;\n /**\n * Callback to reject the call\n */\n onReject: () => void;\n /**\n * Styles for the incoming call notification component.\n */\n styles?: IncomingCallNotificationStyles;\n}\n\n/**\n * A Notification component that is to be used to represent incoming calls to the end user.\n * Allows the user to accept or reject the incoming call.\n * @beta\n */\nexport const IncomingCallNotification = (props: IncomingCallNotificationProps): JSX.Element => {\n const { callerName, alertText, avatarImage, onAcceptWithAudio, onAcceptWithVideo, onReject, personaSize, styles } =\n props;\n const theme = useTheme();\n /* @conditional-compile-remove(one-to-n-calling) */\n const localeStrings = useLocale().strings.IncomingCallNotification;\n return (\n <Stack\n horizontal\n tokens={{ childrenGap: '0.5rem' }}\n verticalAlign=\"center\"\n styles={styles?.root ? styles.root : incomingCallToastStyle(theme)}\n >\n <Stack\n horizontalAlign=\"start\"\n styles={styles?.avatarContainer ? styles.avatarContainer : incomingCallToastAvatarContainerStyle}\n >\n <Persona\n imageUrl={avatarImage}\n text={callerName}\n size={PersonaSize.size40}\n coinSize={personaSize}\n hidePersonaDetails={true}\n aria-label={callerName}\n />\n </Stack>\n\n <Stack grow={1} horizontalAlign=\"center\" style={{ alignItems: 'flex-start', fontFamily: 'Segoe UI' }}>\n <Stack style={{ fontSize: '0.875rem' }}>\n <Text>\n {callerName ??\n /* @conditional-compile-remove(one-to-n-calling) */ localeStrings.incomingCallNotificationPlaceholderId}\n </Text>\n </Stack>\n <Stack style={{ fontSize: '0.75rem' }}>\n <Text>\n {alertText ??\n /* @conditional-compile-remove(one-to-n-calling) */ localeStrings.incomingCallNotificationPlaceholderAlert}\n </Text>\n </Stack>\n </Stack>\n\n <Stack horizontal tokens={{ childrenGap: 10 }}>\n <IconButton\n styles={styles?.rejectButton ? styles.rejectButton : incomingCallRejectButtonStyle(theme)}\n onClick={() => onReject()}\n iconProps={{ iconName: 'IncomingCallNotificationRejectIcon' }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={localeStrings.incomingCallNoticicationRejectAriaLabel}\n />\n <IconButton\n styles={styles?.acceptButton ? styles.acceptButton : incomingCallAcceptButtonStyle(theme)}\n onClick={() => onAcceptWithVideo()}\n iconProps={{ iconName: 'IncomingCallNotificationAcceptWithVideoIcon' }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={localeStrings.incomingCallNoticicationAcceptWithVideoAriaLabel}\n />\n <IconButton\n styles={styles?.acceptButton ? styles.acceptButton : incomingCallAcceptButtonStyle(theme)}\n onClick={() => onAcceptWithAudio()}\n iconProps={{ iconName: 'IncomingCallNotificationAcceptIcon' }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel}\n />\n </Stack>\n </Stack>\n );\n};\n\nconst incomingCallToastStyle = (theme: Theme): IStackStyles => {\n return {\n root: {\n minWidth: '20rem',\n maxWidth: '40rem',\n background: theme.palette.white,\n opacity: 0.95,\n borderRadius: '0.5rem',\n boxShadow: theme.effects.elevation8,\n padding: '1rem'\n }\n };\n};\n\nconst incomingCallToastAvatarContainerStyle: IStackStyles = {\n root: {\n marginRight: '0.5rem'\n }\n};\n\nconst incomingCallAcceptButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n backgroundColor: theme.palette.greenDark,\n color: theme.palette.white,\n borderRadius: '2rem',\n minWidth: '2rem',\n width: '2rem',\n border: 'none'\n },\n rootHovered: {\n backgroundColor: theme.palette.green,\n color: theme.palette.white\n }\n };\n};\n\nconst incomingCallRejectButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n backgroundColor: theme.palette.redDark,\n color: theme.palette.white,\n borderRadius: '2rem',\n minWidth: '2rem',\n width: '2rem',\n border: 'none'\n },\n rootHovered: {\n backgroundColor: theme.palette.red,\n color: theme.palette.white\n }\n };\n};\n"]}
|
1
|
+
{"version":3,"file":"IncomingCallNotification.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/IncomingCallNotification.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,OAAO,EACP,WAAW,EACX,aAAa,EACb,KAAK,EACL,IAAI,EAEJ,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,mDAAmD;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,mCAAgC;AA4HxD;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAoC,EAAe,EAAE;;IAC5F,MAAM,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB;IACjB,mDAAmD;IACnD,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,OAAO;IACP,mDAAmD;IACnD,aAAa,EACd,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,mDAAmD;IACnD,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,wBAAwB,CAAC;IACnE,mDAAmD;IACnD,MAAM,sBAAsB,GAC1B,aAAa,CAAC,wCAAwC,IAAI,UAAU;QAClE,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,wCAAwC,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;QACnG,CAAC,CAAC,UAAU,CAAC;IAEjB,mDAAmD;IACnD,MAAM,iBAAiB,GAAqC,aAAa,CAAC,mBAAmB;QAC3F,CAAC,CAAC;YACE,KAAK,EAAE;gBACL;oBACE,GAAG,EAAE,OA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K,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;YAC1B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YAC1C,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,UAAU;SACrB;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;SAC3B;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,SAAS;SAClB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,KAAY,EAAiB,EAAE;IACpE,OAAO;QACL,IAAI,EAAE;YACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YAC1C,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,MAAM;SACd;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,SAAS;SAClB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButtonStyles,\n IconButton,\n IStackStyles,\n Persona,\n PersonaSize,\n PrimaryButton,\n Stack,\n Text,\n Theme,\n useTheme\n} from '@fluentui/react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuProps } from '@fluentui/react';\nimport React from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useLocale } from '../localization';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Strings for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationStrings {\n /**\n * Placeholder CallerID for the incoming call notification.\n */\n incomingCallNotificationPlaceholderId?: string;\n /**\n * Placeholder Alert for the incoming call notification.\n */\n incomingCallNotificationPlaceholderAlert?: string;\n /**\n * Aria label for the accept with audio button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithAudioAriaLabel?: string;\n /**\n * Aria label for the accept with video button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithVideoAriaLabel?: string;\n /**\n * Aria label for the reject button in the incoming call notification.\n */\n incomingCallNoticicationRejectAriaLabel?: string;\n /**\n * Label for the accept button in the incoming call notification.\n */\n incomingCallNotificationAcceptButtonLabel?: string;\n /**\n * Label for the accept with video button in the incoming call notification.\n */\n incomingCallNotificationAccceptWithVideoButtonLabel?: string;\n /**\n * label for the reject button in the incoming call notification.\n */\n incomingCallNotificationRejectButtonLabel?: string;\n}\n\n/**\n * Styles for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationStyles {\n /**\n * Styles for the accept buttons.\n */\n acceptButton?: IButtonStyles;\n /**\n * Styles for the reject button.\n */\n rejectButton?: IButtonStyles;\n /**\n * Styles for the root container.\n */\n root?: IStackStyles;\n /**\n * Styles for the avatar container.\n */\n avatarContainer?: IStackStyles;\n}\n\n/**\n * Properties for the incoming call notification component.\n *\n * @beta\n */\nexport interface IncomingCallNotificationProps {\n /**\n * Caller's Name\n */\n callerName?: string;\n /**\n * Alert Text\"\n */\n alertText?: string;\n /**\n * URL to the avatar image for the user\n */\n avatarImage?: string;\n /**\n * Size of the persona coin\n */\n personaSize?: number;\n /**\n * Callback to render the avatar\n */\n onRenderAvatar?: () => JSX.Element;\n /**\n * Callback to accept the call with audio\n */\n onAcceptWithAudio: () => void;\n /**\n * Callback to accept the call with Video\n */\n onAcceptWithVideo: () => void;\n /**\n * Callback to reject the call\n */\n onReject: () => void;\n /**\n * Callback when the notification is dismissed\n */\n onDismiss?: () => void;\n /**\n * Styles for the incoming call notification component.\n */\n styles?: IncomingCallNotificationStyles;\n /**\n * Strings for the incoming call notification component.\n */\n strings?: IncomingCallNotificationStrings;\n /**\n * Options for whether to show the accept with video button\n */\n acceptOptions: {\n showAcceptWithVideo: boolean;\n };\n}\n\n/**\n * A Notification component that is to be used to represent incoming calls to the end user.\n * Allows the user to accept or reject the incoming call.\n * @beta\n */\nexport const IncomingCallNotification = (props: IncomingCallNotificationProps): JSX.Element => {\n const {\n callerName,\n alertText,\n avatarImage,\n onAcceptWithAudio,\n /* @conditional-compile-remove(one-to-n-calling) */\n onAcceptWithVideo,\n onReject,\n onDismiss,\n personaSize,\n styles,\n strings,\n /* @conditional-compile-remove(one-to-n-calling) */\n acceptOptions\n } = props;\n const theme = useTheme();\n /* @conditional-compile-remove(one-to-n-calling) */\n const localeStrings = useLocale().strings.IncomingCallNotification;\n /* @conditional-compile-remove(one-to-n-calling) */\n const formattedMessageString =\n localeStrings.incomingCallNotificationPlaceholderAlert && callerName\n ? _formatString(localeStrings.incomingCallNotificationPlaceholderAlert, { callerName: callerName })\n : callerName;\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const acceptManuOptions: IContextualMenuProps | undefined = acceptOptions.showAcceptWithVideo\n ? {\n items: [\n {\n key: 'audio',\n text:\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel,\n onClick: () => onAcceptWithAudio()\n },\n {\n key: 'video',\n text:\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAccceptWithVideoButtonLabel ??\n localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,\n onClick: () => onAcceptWithVideo()\n }\n ]\n }\n : undefined;\n\n return (\n <Stack\n tokens={{ childrenGap: '0.5rem' }}\n verticalAlign=\"center\"\n styles={styles?.root ? styles.root : incomingCallToastStyle(theme)}\n >\n <Stack horizontal verticalAlign=\"center\" tokens={{ childrenGap: personaSize ? '0.5rem' : '0rem' }}>\n <Stack\n horizontalAlign=\"start\"\n styles={styles?.avatarContainer ? styles.avatarContainer : incomingCallToastAvatarContainerStyle}\n >\n <Persona\n imageUrl={avatarImage}\n text={callerName}\n size={PersonaSize.size24}\n coinSize={personaSize}\n hidePersonaDetails={true}\n aria-label={callerName}\n />\n </Stack>\n\n <Stack grow horizontalAlign=\"center\" style={{ alignItems: 'flex-start', fontFamily: 'Segoe UI' }}>\n <Stack style={{ fontSize: '0.75rem' }}>\n <Text>\n {alertText ??\n strings?.incomingCallNotificationPlaceholderAlert ??\n /* @conditional-compile-remove(one-to-n-calling) */ formattedMessageString}\n </Text>\n </Stack>\n </Stack>\n <IconButton iconProps={{ iconName: 'cancel' }} onClick={onDismiss} styles={dismissButtonStyle(theme)} />\n </Stack>\n\n <Stack horizontal horizontalAlign={'center'} tokens={{ childrenGap: '0.5rem' }}>\n <PrimaryButton\n styles={styles?.acceptButton ? styles.acceptButton : incomingCallAcceptButtonStyle(theme)}\n onClick={() => onAcceptWithAudio()}\n iconProps={{ iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={\n strings?.incomingCallNoticicationAcceptWithAudioAriaLabel ??\n localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel\n }\n /* @conditional-compile-remove(one-to-n-calling) */\n menuProps={acceptManuOptions}\n >\n {\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel\n }\n </PrimaryButton>\n <DefaultButton\n styles={styles?.rejectButton ? styles.rejectButton : incomingCallRejectButtonStyle(theme)}\n onClick={() => onReject()}\n label={'Decline'}\n iconProps={{ iconName: 'IncomingCallNotificationRejectIcon' }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={\n strings?.incomingCallNoticicationRejectAriaLabel ?? localeStrings.incomingCallNoticicationRejectAriaLabel\n }\n >\n {\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationRejectButtonLabel ??\n localeStrings.incomingCallNotificationRejectButtonLabel\n }\n </DefaultButton>\n </Stack>\n </Stack>\n );\n};\n\nconst incomingCallToastStyle = (theme: Theme): IStackStyles => {\n return {\n root: {\n width: '20rem',\n background: theme.palette.white,\n opacity: 0.95,\n borderRadius: '0.5rem',\n boxShadow: theme.effects.elevation8,\n padding: '1rem'\n }\n };\n};\n\nconst incomingCallToastAvatarContainerStyle: IStackStyles = {\n root: {\n marginRight: '0.5rem'\n }\n};\n\nconst dismissButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.neutralPrimary,\n width: '1rem',\n height: '1rem'\n },\n rootHovered: {\n color: theme.palette.neutralDark\n }\n };\n};\n\nconst incomingCallAcceptButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.white,\n border: 'none',\n borderRadius: theme.effects.roundedCorner4,\n width: '100%',\n maxWidth: '8.875rem'\n },\n rootHovered: {\n color: theme.palette.white\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n\nconst incomingCallRejectButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n borderRadius: theme.effects.roundedCorner4,\n maxWidth: '8.875rem',\n width: '100%'\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n"]}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IncomingCallNotificationStyles, IncomingCallNotificationStrings } from './IncomingCallNotification';
|
3
|
+
/**
|
4
|
+
* Represents an active incoming call.
|
5
|
+
* @beta
|
6
|
+
*/
|
7
|
+
export interface ActiveIncomingCall {
|
8
|
+
/**
|
9
|
+
* Unique identifier for the incoming call.
|
10
|
+
*/
|
11
|
+
id: string;
|
12
|
+
/**
|
13
|
+
* Information about the caller.
|
14
|
+
*/
|
15
|
+
callerInfo: {
|
16
|
+
/**
|
17
|
+
* Display name of the caller.
|
18
|
+
*/
|
19
|
+
displayName: string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Start time of the incoming call.
|
23
|
+
*/
|
24
|
+
startTime: Date;
|
25
|
+
/**
|
26
|
+
* End time of the incoming call.
|
27
|
+
*/
|
28
|
+
endTime?: Date;
|
29
|
+
/**
|
30
|
+
* Whether or not the call is a voip capable call.
|
31
|
+
*/
|
32
|
+
videoAvailable: boolean;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Props for the IncomingCallManager component.
|
36
|
+
* @beta
|
37
|
+
*/
|
38
|
+
export interface IncomingCallStackProps {
|
39
|
+
/**
|
40
|
+
* List of incoming calls.
|
41
|
+
*/
|
42
|
+
activeIncomingCalls: ActiveIncomingCall[];
|
43
|
+
/**
|
44
|
+
* List of incoming calls that have ended.
|
45
|
+
*/
|
46
|
+
removedIncomingCalls: ActiveIncomingCall[];
|
47
|
+
/**
|
48
|
+
* Handler to accept the incoming call.
|
49
|
+
* @param incomingCallId - Id of the incoming call to accept.
|
50
|
+
* @param useVideo - Whether to accept with video.
|
51
|
+
* @returns void
|
52
|
+
*/
|
53
|
+
onAcceptCall: (incomingCallId: string, useVideo?: boolean) => void;
|
54
|
+
/**
|
55
|
+
* Handler to reject the incoming call.
|
56
|
+
* @param incomingCallId - id of the incoming call to reject
|
57
|
+
* @returns - void
|
58
|
+
*/
|
59
|
+
onRejectCall: (incomingCallId: string) => void;
|
60
|
+
/**
|
61
|
+
* Styles for the incoming call notifications.
|
62
|
+
*/
|
63
|
+
styles?: IncomingCallNotificationStyles;
|
64
|
+
/**
|
65
|
+
* Strings for the incoming call notifications.
|
66
|
+
*/
|
67
|
+
strings?: IncomingCallNotificationStrings;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Wrapper to manage multiple incoming calls
|
71
|
+
* @param props - {@link IncomingCallManagerProps}
|
72
|
+
* @returns
|
73
|
+
* @beta
|
74
|
+
*/
|
75
|
+
export declare const IncomingCallStack: (props: IncomingCallStackProps) => JSX.Element;
|
76
|
+
//# sourceMappingURL=IncomingCallStack.d.ts.map
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
4
|
+
import { IncomingCallNotification } from './IncomingCallNotification';
|
5
|
+
import { Stack } from '@fluentui/react';
|
6
|
+
import React from 'react';
|
7
|
+
/**
|
8
|
+
* Wrapper to manage multiple incoming calls
|
9
|
+
* @param props - {@link IncomingCallManagerProps}
|
10
|
+
* @returns
|
11
|
+
* @beta
|
12
|
+
*/
|
13
|
+
export const IncomingCallStack = (props) => {
|
14
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
15
|
+
const { activeIncomingCalls, removedIncomingCalls, onAcceptCall, onRejectCall, styles, strings } = props;
|
16
|
+
return (React.createElement(Stack, { tokens: { childrenGap: '0.25rem' } },
|
17
|
+
/* @conditional-compile-remove(one-to-n-calling) */ activeIncomingCalls
|
18
|
+
.filter((incomingCall) => !removedIncomingCalls.some((call) => call.id === incomingCall.id))
|
19
|
+
.map((incomingCall) => {
|
20
|
+
return (React.createElement(IncomingCallNotification, { key: incomingCall.id, callerName: incomingCall.callerInfo.displayName, onAcceptWithAudio: () => onAcceptCall(incomingCall.id), onAcceptWithVideo: () => onAcceptCall(incomingCall.id, true), onReject: () => onRejectCall(incomingCall.id), onDismiss: () => onRejectCall(incomingCall.id), styles: styles, strings: strings, acceptOptions: { showAcceptWithVideo: incomingCall.videoAvailable } }));
|
21
|
+
})));
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=IncomingCallStack.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IncomingCallStack.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/IncomingCallStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,mDAAmD;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAqE1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,mDAAmD;IACnD,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzG,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;IAErC,mDAAmD,CAAC,mBAAmB;SACpE,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAC,CAAC;SAC3F,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;QACpB,OAAO,CACL,oBAAC,wBAAwB,IACvB,GAAG,EAAE,YAAY,CAAC,EAAE,EACpB,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC,WAAW,EAC/C,iBAAiB,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC,EACtD,iBAAiB,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,EAC5D,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC,EAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC,EAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,EAAE,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,GACzC,CAC7B,CAAC;IACJ,CAAC,CAAC,CAEA,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IncomingCallNotification } from './IncomingCallNotification';\nimport { IncomingCallNotificationStyles, IncomingCallNotificationStrings } from './IncomingCallNotification';\nimport { Stack } from '@fluentui/react';\nimport React from 'react';\n\n/**\n * Represents an active incoming call.\n * @beta\n */\nexport interface ActiveIncomingCall {\n /**\n * Unique identifier for the incoming call.\n */\n id: string;\n /**\n * Information about the caller.\n */\n callerInfo: {\n /**\n * Display name of the caller.\n */\n displayName: string;\n };\n /**\n * Start time of the incoming call.\n */\n startTime: Date;\n /**\n * End time of the incoming call.\n */\n endTime?: Date;\n /**\n * Whether or not the call is a voip capable call.\n */\n videoAvailable: boolean;\n}\n/**\n * Props for the IncomingCallManager component.\n * @beta\n */\nexport interface IncomingCallStackProps {\n /**\n * List of incoming calls.\n */\n activeIncomingCalls: ActiveIncomingCall[];\n /**\n * List of incoming calls that have ended.\n */\n removedIncomingCalls: ActiveIncomingCall[];\n /**\n * Handler to accept the incoming call.\n * @param incomingCallId - Id of the incoming call to accept.\n * @param useVideo - Whether to accept with video.\n * @returns void\n */\n onAcceptCall: (incomingCallId: string, useVideo?: boolean) => void;\n /**\n * Handler to reject the incoming call.\n * @param incomingCallId - id of the incoming call to reject\n * @returns - void\n */\n onRejectCall: (incomingCallId: string) => void;\n /**\n * Styles for the incoming call notifications.\n */\n styles?: IncomingCallNotificationStyles;\n /**\n * Strings for the incoming call notifications.\n */\n strings?: IncomingCallNotificationStrings;\n}\n\n/**\n * Wrapper to manage multiple incoming calls\n * @param props - {@link IncomingCallManagerProps}\n * @returns\n * @beta\n */\nexport const IncomingCallStack = (props: IncomingCallStackProps): JSX.Element => {\n /* @conditional-compile-remove(one-to-n-calling) */\n const { activeIncomingCalls, removedIncomingCalls, onAcceptCall, onRejectCall, styles, strings } = props;\n return (\n <Stack tokens={{ childrenGap: '0.25rem' }}>\n {\n /* @conditional-compile-remove(one-to-n-calling) */ activeIncomingCalls\n .filter((incomingCall) => !removedIncomingCalls.some((call) => call.id === incomingCall.id))\n .map((incomingCall) => {\n return (\n <IncomingCallNotification\n key={incomingCall.id}\n callerName={incomingCall.callerInfo.displayName}\n onAcceptWithAudio={() => onAcceptCall(incomingCall.id)}\n onAcceptWithVideo={() => onAcceptCall(incomingCall.id, true)}\n onReject={() => onRejectCall(incomingCall.id)}\n onDismiss={() => onRejectCall(incomingCall.id)}\n styles={styles}\n strings={strings}\n acceptOptions={{ showAcceptWithVideo: incomingCall.videoAvailable }}\n ></IncomingCallNotification>\n );\n })\n }\n </Stack>\n );\n};\n"]}
|
@@ -51,11 +51,6 @@ export interface MeetingConferencePhoneInfoModalProps {
|
|
51
51
|
* a component for setting spoken languages
|
52
52
|
*/
|
53
53
|
export declare const MeetingConferencePhoneInfoModal: (props: MeetingConferencePhoneInfoModalProps) => JSX.Element;
|
54
|
-
/**
|
55
|
-
* @internal
|
56
|
-
* format phone number
|
57
|
-
*/
|
58
|
-
export declare const formatPhoneNumber: (phoneNumber: string) => string;
|
59
54
|
/**
|
60
55
|
* @internal
|
61
56
|
* format phone number link
|
@@ -11,9 +11,8 @@ import { themedPhoneInfoModalStyle, titleClassName, titleContainerClassName, pho
|
|
11
11
|
/* @conditional-compile-remove(teams-meeting-conference) */
|
12
12
|
import { useLocale } from '../localization';
|
13
13
|
/* @conditional-compile-remove(teams-meeting-conference) */
|
14
|
-
import { isPossiblePhoneNumber, parsePhoneNumber } from 'libphonenumber-js';
|
15
|
-
/* @conditional-compile-remove(teams-meeting-conference) */
|
16
14
|
import { _pxToRem } from "../../../acs-ui-common/src";
|
15
|
+
import { _formatPhoneNumber } from './utils/formatPhoneNumber';
|
17
16
|
/* @conditional-compile-remove(teams-meeting-conference) */
|
18
17
|
/**
|
19
18
|
* @public
|
@@ -48,7 +47,7 @@ export const MeetingConferencePhoneInfoModal = (props) => {
|
|
48
47
|
React.createElement(Text, { className: stepTextStyle }, strings === null || strings === void 0 ? void 0 : strings.meetingConferencePhoneInfoModalDialIn)))),
|
49
48
|
React.createElement(Stack.Item, { className: phoneInfoStep }, conferencePhoneInfoList.map((phoneNumber, index) => (React.createElement(Stack.Item, { key: index },
|
50
49
|
React.createElement(Text, { className: phoneInfoTextStyle },
|
51
|
-
|
50
|
+
_formatPhoneNumber(phoneNumber.phoneNumber, true),
|
52
51
|
' ',
|
53
52
|
phoneNumber.isTollFree
|
54
53
|
? strings.meetingConferencePhoneInfoModalTollFree
|
@@ -75,25 +74,6 @@ export const MeetingConferencePhoneInfoModal = (props) => {
|
|
75
74
|
React.createElement(Text, { className: stepTextStyle }, strings === null || strings === void 0 ? void 0 : strings.meetingConferencePhoneInfoModalWait)))))))));
|
76
75
|
};
|
77
76
|
/* @conditional-compile-remove(teams-meeting-conference) */
|
78
|
-
/**
|
79
|
-
* @internal
|
80
|
-
* format phone number
|
81
|
-
*/
|
82
|
-
export const formatPhoneNumber = (phoneNumber) => {
|
83
|
-
var _a;
|
84
|
-
if (!phoneNumber) {
|
85
|
-
return '';
|
86
|
-
}
|
87
|
-
let enchantedPhoneNumber = phoneNumber;
|
88
|
-
if (!phoneNumber.startsWith('+')) {
|
89
|
-
enchantedPhoneNumber = `+${phoneNumber}`;
|
90
|
-
}
|
91
|
-
if (isPossiblePhoneNumber(enchantedPhoneNumber)) {
|
92
|
-
return ((_a = parsePhoneNumber(enchantedPhoneNumber)) === null || _a === void 0 ? void 0 : _a.formatInternational()) || enchantedPhoneNumber;
|
93
|
-
}
|
94
|
-
return phoneNumber;
|
95
|
-
};
|
96
|
-
/* @conditional-compile-remove(teams-meeting-conference) */
|
97
77
|
/**
|
98
78
|
* @internal
|
99
79
|
* format phone number link
|
@@ -108,7 +88,7 @@ export const formatPhoneNumberLink = (phoneNumber) => {
|
|
108
88
|
*/
|
109
89
|
export const formatPhoneNumberInfo = (phoneNumber, strings) => {
|
110
90
|
const templateText = phoneNumber.country && phoneNumber.city ? strings === null || strings === void 0 ? void 0 : strings.meetingConferencePhoneInfoModalTollGeoData : '';
|
111
|
-
return ((templateText === null || templateText === void 0 ? void 0 : templateText.replace('{
|
91
|
+
return ((templateText === null || templateText === void 0 ? void 0 : templateText.replace('{country}', phoneNumber.country || '').replace('{city}', phoneNumber.city || '').trim()) || '');
|
112
92
|
};
|
113
93
|
/* @conditional-compile-remove(teams-meeting-conference) */
|
114
94
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MeetingConferencePhoneInfo.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingConferencePhoneIn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,GAAG,CAAC,SAAkB,EAAU,EAAE;IAC5D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,MAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport React, { useCallback } from 'react';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton, Icon } from '@fluentui/react';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport {\n themedPhoneInfoModalStyle,\n titleClassName,\n titleContainerClassName,\n phoneInfoTextStyle,\n phoneInfoIcon,\n phoneInfoInctructionLine,\n phoneInfoStep,\n stepTextStyle,\n infoConnectionLinkStyle,\n phoneInfoIconStyle\n} from './styles/TeamsMeetingConferenceInfo';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { isPossiblePhoneNumber, parsePhoneNumber } from 'libphonenumber-js';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * strings for phone info modal\n * @public\n */\nexport interface MeetingConferencePhoneInfoModalStrings {\n /**\n * Header for the phone info modal\n */\n meetingConferencePhoneInfoModalTitle: string;\n /**\n * Phone number instruction\n */\n meetingConferencePhoneInfoModalDialIn: string;\n /**\n * Meeting ID instruction\n */\n meetingConferencePhoneInfoModalMeetingId: string;\n /**\n * Wait for phone connection\n */\n meetingConferencePhoneInfoModalWait: string;\n /**\n * Toll Free Phone Label\n */\n meetingConferencePhoneInfoModalTollFree: string;\n /**\n * Toll Phone Label\n */\n meetingConferencePhoneInfoModalToll: string;\n /**\n * Toll Phone Label without geo data\n */\n meetingConferencePhoneInfoModalTollGeoData: string;\n /**\n * No phone number available message\n */\n meetingConferencePhoneInfoModalNoPhoneAvailable: string;\n}\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * MeetingConferencePhoneInfoModal Component Props.\n */\nexport interface MeetingConferencePhoneInfoModalProps {\n conferencePhoneInfoList: ConferencePhoneInfo[];\n showModal?: boolean;\n onDismissMeetingPhoneInfoSettings?: () => void;\n}\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * a component for setting spoken languages\n */\nexport const MeetingConferencePhoneInfoModal = (props: MeetingConferencePhoneInfoModalProps): JSX.Element => {\n const { conferencePhoneInfoList, showModal, onDismissMeetingPhoneInfoSettings } = props;\n\n const theme = useTheme();\n const strings = useLocale().strings.meetingConferencePhoneInfo;\n\n const onDismiss = useCallback((): void => {\n if (onDismissMeetingPhoneInfoSettings) {\n onDismissMeetingPhoneInfoSettings();\n }\n }, [onDismissMeetingPhoneInfoSettings]);\n\n const PhoneInfoModalStyle: Partial<IModalStyles> = useMemo(() => themedPhoneInfoModalStyle(theme), [theme]);\n\n return (\n <>\n <Modal\n titleAriaId={strings?.meetingConferencePhoneInfoModalTitle}\n isOpen={showModal}\n onDismiss={onDismiss}\n isBlocking={true}\n styles={PhoneInfoModalStyle}\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={titleContainerClassName}>\n <Text className={titleClassName}>{strings?.meetingConferencePhoneInfoModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings?.meetingConferencePhoneInfoModalTitle}\n onClick={onDismiss}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n {conferencePhoneInfoList.length === 0 && (\n <Stack horizontal>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalNoPhoneAvailable}</Text>\n </Stack>\n )}\n {conferencePhoneInfoList.length > 0 && (\n <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" className={phoneInfoInctructionLine}>\n <Stack.Item style={{ display: 'flex' }}>\n <Stack horizontal className={phoneInfoStep}>\n <Stack className={infoConnectionLinkStyle(theme)}></Stack>\n <Stack.Item className={phoneInfoIcon(theme)}>\n <Stack verticalAlign=\"center\" horizontalAlign=\"center\">\n <Icon iconName=\"JoinByPhoneDialStepIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack>\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalDialIn}</Text>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n <Stack.Item className={phoneInfoStep}>\n {conferencePhoneInfoList.map((phoneNumber, index) => (\n <Stack.Item key={index}>\n <Text className={phoneInfoTextStyle}>\n {formatPhoneNumber(phoneNumber.phoneNumber)}{' '}\n {phoneNumber.isTollFree\n ? strings.meetingConferencePhoneInfoModalTollFree\n : strings.meetingConferencePhoneInfoModalToll}\n </Text>\n <br />\n <Text className={phoneInfoTextStyle}> {formatPhoneNumberInfo(phoneNumber, strings)}</Text>\n </Stack.Item>\n ))}\n </Stack.Item>\n </Stack>\n <Stack\n horizontal\n horizontalAlign=\"space-between\"\n verticalAlign=\"center\"\n className={phoneInfoInctructionLine}\n >\n <Stack.Item style={{ display: 'flex' }}>\n <Stack horizontal>\n <Stack className={infoConnectionLinkStyle(theme)}></Stack>\n <Stack.Item className={phoneInfoIcon(theme)}>\n <Stack verticalAlign=\"center\" horizontalAlign=\"center\">\n <Icon iconName=\"JoinByPhoneConferenceIdIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack>\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalMeetingId}</Text>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n <Text className={phoneInfoTextStyle}>{formatMeetingId(conferencePhoneInfoList[0].conferenceId)}</Text>\n </Stack>\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\">\n <Stack horizontal>\n <Stack.Item className={phoneInfoIcon(theme)} style={{ marginLeft: _pxToRem(2) }}>\n <Icon iconName=\"JoinByPhoneWaitToBeAdmittedIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalWait}</Text>\n </Stack.Item>\n </Stack>\n </Stack>\n </Stack>\n )}\n </Modal>\n </>\n );\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format phone number\n */\nexport const formatPhoneNumber = (phoneNumber: string): string => {\n if (!phoneNumber) {\n return '';\n }\n let enchantedPhoneNumber = phoneNumber;\n if (!phoneNumber.startsWith('+')) {\n enchantedPhoneNumber = `+${phoneNumber}`;\n }\n if (isPossiblePhoneNumber(enchantedPhoneNumber)) {\n return parsePhoneNumber(enchantedPhoneNumber)?.formatInternational() || enchantedPhoneNumber;\n }\n return phoneNumber;\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format phone number link\n */\nexport const formatPhoneNumberLink = (phoneNumber: ConferencePhoneInfo): string => {\n return `tel:+${phoneNumber.phoneNumber},,${phoneNumber.conferenceId}#`;\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format phone number\n */\nexport const formatPhoneNumberInfo = (\n phoneNumber: ConferencePhoneInfo,\n strings: MeetingConferencePhoneInfoModalStrings | undefined\n): string => {\n const templateText =\n phoneNumber.country && phoneNumber.city ? strings?.meetingConferencePhoneInfoModalTollGeoData : '';\n return (\n templateText\n ?.replace('{phoneNumber}', formatPhoneNumber(phoneNumber.phoneNumber))\n .replace('{country}', phoneNumber.country || '')\n .replace('{city}', phoneNumber.city || '')\n .trim() || ''\n );\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format meeting id\n */\nexport const formatMeetingId = (meetingId?: string): string => {\n if (!meetingId) {\n return '';\n }\n if (meetingId?.length !== 9) {\n return meetingId;\n }\n\n return [meetingId.slice(0, 3), meetingId.slice(3, 6), meetingId.slice(6, 9)].join(' ') + '#';\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * Information for conference phone info\n */\nexport interface ConferencePhoneInfo {\n phoneNumber: string;\n conferenceId: string;\n isTollFree: boolean;\n country?: string;\n city?: string;\n}\n"]}
|
1
|
+
{"version":3,"file":"MeetingConferencePhoneInfo.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingConferencePhoneInfo.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2DAA2D;AAC3D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,2DAA2D;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,2DAA2D;AAC3D,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE/F,2DAA2D;AAC3D,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,qCAAqC,CAAC;AAG7C,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;A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3D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAU,EAAE;IAC5D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,MAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport React, { useCallback } from 'react';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton, Icon } from '@fluentui/react';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport {\n themedPhoneInfoModalStyle,\n titleClassName,\n titleContainerClassName,\n phoneInfoTextStyle,\n phoneInfoIcon,\n phoneInfoInctructionLine,\n phoneInfoStep,\n stepTextStyle,\n infoConnectionLinkStyle,\n phoneInfoIconStyle\n} from './styles/TeamsMeetingConferenceInfo';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { _formatPhoneNumber } from './utils/formatPhoneNumber';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * strings for phone info modal\n * @public\n */\nexport interface MeetingConferencePhoneInfoModalStrings {\n /**\n * Header for the phone info modal\n */\n meetingConferencePhoneInfoModalTitle: string;\n /**\n * Phone number instruction\n */\n meetingConferencePhoneInfoModalDialIn: string;\n /**\n * Meeting ID instruction\n */\n meetingConferencePhoneInfoModalMeetingId: string;\n /**\n * Wait for phone connection\n */\n meetingConferencePhoneInfoModalWait: string;\n /**\n * Toll Free Phone Label\n */\n meetingConferencePhoneInfoModalTollFree: string;\n /**\n * Toll Phone Label\n */\n meetingConferencePhoneInfoModalToll: string;\n /**\n * Toll Phone Label without geo data\n */\n meetingConferencePhoneInfoModalTollGeoData: string;\n /**\n * No phone number available message\n */\n meetingConferencePhoneInfoModalNoPhoneAvailable: string;\n}\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * MeetingConferencePhoneInfoModal Component Props.\n */\nexport interface MeetingConferencePhoneInfoModalProps {\n conferencePhoneInfoList: ConferencePhoneInfo[];\n showModal?: boolean;\n onDismissMeetingPhoneInfoSettings?: () => void;\n}\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * a component for setting spoken languages\n */\nexport const MeetingConferencePhoneInfoModal = (props: MeetingConferencePhoneInfoModalProps): JSX.Element => {\n const { conferencePhoneInfoList, showModal, onDismissMeetingPhoneInfoSettings } = props;\n\n const theme = useTheme();\n const strings = useLocale().strings.meetingConferencePhoneInfo;\n\n const onDismiss = useCallback((): void => {\n if (onDismissMeetingPhoneInfoSettings) {\n onDismissMeetingPhoneInfoSettings();\n }\n }, [onDismissMeetingPhoneInfoSettings]);\n\n const PhoneInfoModalStyle: Partial<IModalStyles> = useMemo(() => themedPhoneInfoModalStyle(theme), [theme]);\n\n return (\n <>\n <Modal\n titleAriaId={strings?.meetingConferencePhoneInfoModalTitle}\n isOpen={showModal}\n onDismiss={onDismiss}\n isBlocking={true}\n styles={PhoneInfoModalStyle}\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={titleContainerClassName}>\n <Text className={titleClassName}>{strings?.meetingConferencePhoneInfoModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings?.meetingConferencePhoneInfoModalTitle}\n onClick={onDismiss}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n {conferencePhoneInfoList.length === 0 && (\n <Stack horizontal>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalNoPhoneAvailable}</Text>\n </Stack>\n )}\n {conferencePhoneInfoList.length > 0 && (\n <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" className={phoneInfoInctructionLine}>\n <Stack.Item style={{ display: 'flex' }}>\n <Stack horizontal className={phoneInfoStep}>\n <Stack className={infoConnectionLinkStyle(theme)}></Stack>\n <Stack.Item className={phoneInfoIcon(theme)}>\n <Stack verticalAlign=\"center\" horizontalAlign=\"center\">\n <Icon iconName=\"JoinByPhoneDialStepIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack>\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalDialIn}</Text>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n <Stack.Item className={phoneInfoStep}>\n {conferencePhoneInfoList.map((phoneNumber, index) => (\n <Stack.Item key={index}>\n <Text className={phoneInfoTextStyle}>\n {_formatPhoneNumber(phoneNumber.phoneNumber, true)}{' '}\n {phoneNumber.isTollFree\n ? strings.meetingConferencePhoneInfoModalTollFree\n : strings.meetingConferencePhoneInfoModalToll}\n </Text>\n <br />\n <Text className={phoneInfoTextStyle}> {formatPhoneNumberInfo(phoneNumber, strings)}</Text>\n </Stack.Item>\n ))}\n </Stack.Item>\n </Stack>\n <Stack\n horizontal\n horizontalAlign=\"space-between\"\n verticalAlign=\"center\"\n className={phoneInfoInctructionLine}\n >\n <Stack.Item style={{ display: 'flex' }}>\n <Stack horizontal>\n <Stack className={infoConnectionLinkStyle(theme)}></Stack>\n <Stack.Item className={phoneInfoIcon(theme)}>\n <Stack verticalAlign=\"center\" horizontalAlign=\"center\">\n <Icon iconName=\"JoinByPhoneConferenceIdIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack>\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalMeetingId}</Text>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n <Text className={phoneInfoTextStyle}>{formatMeetingId(conferencePhoneInfoList[0].conferenceId)}</Text>\n </Stack>\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\">\n <Stack horizontal>\n <Stack.Item className={phoneInfoIcon(theme)} style={{ marginLeft: _pxToRem(2) }}>\n <Icon iconName=\"JoinByPhoneWaitToBeAdmittedIcon\" className={phoneInfoIconStyle(theme)} />\n </Stack.Item>\n <Stack.Item>\n <Text className={stepTextStyle}>{strings?.meetingConferencePhoneInfoModalWait}</Text>\n </Stack.Item>\n </Stack>\n </Stack>\n </Stack>\n )}\n </Modal>\n </>\n );\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format phone number link\n */\nexport const formatPhoneNumberLink = (phoneNumber: ConferencePhoneInfo): string => {\n return `tel:+${phoneNumber.phoneNumber},,${phoneNumber.conferenceId}#`;\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format phone number\n */\nexport const formatPhoneNumberInfo = (\n phoneNumber: ConferencePhoneInfo,\n strings: MeetingConferencePhoneInfoModalStrings | undefined\n): string => {\n const templateText =\n phoneNumber.country && phoneNumber.city ? strings?.meetingConferencePhoneInfoModalTollGeoData : '';\n return (\n templateText\n ?.replace('{country}', phoneNumber.country || '')\n .replace('{city}', phoneNumber.city || '')\n .trim() || ''\n );\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @internal\n * format meeting id\n */\nexport const formatMeetingId = (meetingId?: string): string => {\n if (!meetingId) {\n return '';\n }\n if (meetingId?.length !== 9) {\n return meetingId;\n }\n\n return [meetingId.slice(0, 3), meetingId.slice(3, 6), meetingId.slice(6, 9)].join(' ') + '#';\n};\n\n/* @conditional-compile-remove(teams-meeting-conference) */\n/**\n * @public\n * Information for conference phone info\n */\nexport interface ConferencePhoneInfo {\n phoneNumber: string;\n conferenceId: string;\n isTollFree: boolean;\n country?: string;\n city?: string;\n}\n"]}
|
@@ -316,18 +316,19 @@ export type MessageThreadProps = {
|
|
316
316
|
*/
|
317
317
|
export interface RichTextEditBoxOptions extends RichTextEditorOptions {
|
318
318
|
/**
|
319
|
-
* Optional callback to
|
319
|
+
* Optional callback to handle an inline image that's inserted in the rich text editor.
|
320
|
+
* When not provided, pasting images into rich text editor will be disabled.
|
320
321
|
*/
|
321
|
-
|
322
|
+
onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;
|
322
323
|
/**
|
323
|
-
* Optional callback to remove the
|
324
|
+
* Optional callback to remove the image upload or delete the image from server before sending.
|
324
325
|
*/
|
325
326
|
onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;
|
326
327
|
/**
|
327
328
|
* Optional Record of type {@link AttachmentMetadataInProgress}
|
328
|
-
* to render inline images being
|
329
|
+
* to render inline images being inserted in the MessageThread's edit boxes.
|
329
330
|
*/
|
330
|
-
|
331
|
+
messagesInlineImages?: Record<string, AttachmentMetadataInProgress[]>;
|
331
332
|
}
|
332
333
|
/**
|
333
334
|
* Props to render a single message.
|
@@ -538,10 +538,10 @@ export const MessageThreadWrapper = (props) => {
|
|
538
538
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
539
539
|
onPaste: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onPaste,
|
540
540
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
541
|
-
|
541
|
+
onInsertInlineImage: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onInsertInlineImage,
|
542
542
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
543
|
-
|
544
|
-
(richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.
|
543
|
+
inlineImages: (richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImages) &&
|
544
|
+
(richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImages[message.message.messageId]),
|
545
545
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
546
546
|
onCancelInlineImageUpload: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onCancelInlineImageUpload })));
|
547
547
|
}))))));
|