@azure/communication-react 1.5.1-alpha-202305030013 → 1.5.1-alpha-202305050017
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/CHANGELOG.beta.md +9 -1
- package/dist/dist-cjs/communication-react/index.js +1902 -1847
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- 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/react-components/src/components/Caption.js +1 -2
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +3 -2
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +12 -5
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +33 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +76 -65
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +16 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +14 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +63 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.d.ts +58 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js +31 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +43 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +81 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -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/pages/ConfigurationPage.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +35 -29
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +116 -162
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.d.ts → ChatButton/ChatButton.d.ts} +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.js → ChatButton/ChatButton.js} +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.d.ts → ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts} +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.js → ChatButton/ChatButtonWithUnreadMessagesBadge.js} +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +4 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +11 -24
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +5 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +32 -12
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +8 -5
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +11 -2
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +3 -15
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +16 -34
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/package.json +10 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +0 -24
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +0 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +0 -16
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +0 -38
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts +0 -34
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +0 -90
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js.map +0 -1
- /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.d.ts → ChatButton/NotificationIcon.d.ts} +0 -0
- /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.js → ChatButton/NotificationIcon.js} +0 -0
- /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.d.ts +0 -0
- /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TabHeader.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/TabHeader.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,yCAAmC;AACtD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"TabHeader.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/TabHeader.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,yCAAmC;AACtD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAsB7D;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAe,EAAE;IAClF,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,SAAS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AQ,EAAE,KAAK,CAAC,iBAAiB,IAEhC,OAAO,CAAC,eAAe,CACV,CACjB,CACU;QACb,oBAAC,KAAK,CAAC,IAAI,IAAC,IAAI,UACb,qBAAqB,IAAI,CACxB,oBAAC,aAAa,IACZ,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,4BAA4B,EACpC,OAAO,EAAE,SAAS,KAAK,QAAQ,EAC/B,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,KAAK,CAAC,mBAAmB,IAElC,OAAO,CAAC,iBAAiB,CACZ,CACjB,CACU;QAEb,oBAAC,aAAa,IACZ,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,GAAG,EAAE,CAAC,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,aAAa,GAAG,GACzD,CACX,CACT,CAAC;AACJ,CAAC,CAAC;AAOF,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG,CAAC,MAAuB,EAAO,EAAE;IACxD,uDAAuD;IACvD,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;IAE3B,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { concatStyleSets, DefaultButton, Stack } from '@fluentui/react';\nimport { useTheme } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallWithChatCompositeIcon } from '../common/icons';\nimport {\n mobilePaneBackButtonStyles,\n mobilePaneButtonStyles,\n mobilePaneControlBarStyle,\n mobilePaneHiddenIconStyles\n} from './styles/Pane.styles';\nimport { CompositeLocale, useLocale } from '../localization';\n\n/** @private */\nexport interface MobileChatSidePaneTabHeaderProps {\n onClick: () => void;\n disabled: boolean;\n}\n\n/**\n * Props for {@link TabHeader} component\n */\ntype PeopleAndChatHeaderProps = {\n onClose: () => void;\n // If set, show a button to open chat tab.\n onChatButtonClicked?: () => void;\n // If set, show a button to open people tab.\n onPeopleButtonClicked?: () => void;\n activeTab: TabHeaderTab;\n disableChatButton?: boolean;\n disablePeopleButton?: boolean;\n};\n\n/**\n * Legacy header to be removed when we make a breaking change.\n * @private\n */\nexport const PeopleAndChatHeader = (props: PeopleAndChatHeaderProps): JSX.Element => {\n const { onClose, onChatButtonClicked, onPeopleButtonClicked, activeTab } = props;\n const theme = useTheme();\n const strings = localeTrampoline(useLocale());\n const haveMultipleTabs = onChatButtonClicked && onPeopleButtonClicked;\n const mobilePaneButtonStylesThemed = useMemo(() => {\n return concatStyleSets(\n mobilePaneButtonStyles,\n {\n root: {\n width: '100%'\n },\n label: {\n fontSize: theme.fonts.medium.fontSize,\n fontWeight: theme.fonts.medium.fontWeight\n }\n },\n haveMultipleTabs\n ? {\n rootChecked: {\n borderBottom: `0.125rem solid ${theme.palette.themePrimary}`\n }\n }\n : {}\n );\n }, [theme, haveMultipleTabs]);\n\n return (\n <Stack horizontal grow styles={mobilePaneControlBarStyle}>\n <DefaultButton\n ariaLabel={strings.returnToCallButtonAriaLabel}\n ariaDescription={strings.returnToCallButtonAriaDescription}\n onClick={onClose}\n styles={mobilePaneBackButtonStyles}\n onRenderIcon={() => <CallWithChatCompositeIcon iconName=\"ChevronLeft\" />}\n autoFocus\n ></DefaultButton>\n <Stack.Item grow>\n {onChatButtonClicked && (\n <DefaultButton\n onClick={onChatButtonClicked}\n styles={mobilePaneButtonStylesThemed}\n checked={activeTab === 'chat'}\n role={'tab'}\n disabled={props.disableChatButton}\n >\n {strings.chatButtonLabel}\n </DefaultButton>\n )}\n </Stack.Item>\n <Stack.Item grow>\n {onPeopleButtonClicked && (\n <DefaultButton\n onClick={onPeopleButtonClicked}\n styles={mobilePaneButtonStylesThemed}\n checked={activeTab === 'people'}\n role={'tab'}\n disabled={props.disablePeopleButton}\n >\n {strings.peopleButtonLabel}\n </DefaultButton>\n )}\n </Stack.Item>\n {/* Hidden icon to take the same space as the actual back button on the left. */}\n <DefaultButton\n styles={mobilePaneHiddenIconStyles}\n onRenderIcon={() => <CallWithChatCompositeIcon iconName=\"ChevronLeft\" />}\n ></DefaultButton>\n </Stack>\n );\n};\n\n/**\n * Type used to define which tab is active in {@link TabHeader}\n */\nexport type TabHeaderTab = 'chat' | 'people';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst localeTrampoline = (locale: CompositeLocale): any => {\n /* @conditional-compile-remove(new-call-control-bar) */\n return locale.strings.call;\n\n return locale.strings.callWithChat;\n};\n\"../../../../react-components/src\""]}
|
@@ -1,24 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { AdapterError } from './adapters';
|
3
|
-
/**
|
4
|
-
* @private
|
5
|
-
*/
|
6
|
-
interface DismissedError {
|
7
|
-
dismissedAt: Date;
|
8
|
-
activeSince?: Date;
|
9
|
-
}
|
10
3
|
/**
|
11
4
|
* Pane that is used to show video effects button
|
12
5
|
* @private
|
13
6
|
*/
|
14
7
|
/** @beta */
|
15
|
-
export declare const
|
16
|
-
|
17
|
-
|
8
|
+
export declare const VideoEffectsPaneContent: (props: {
|
9
|
+
onDismissError: (error: AdapterError) => void;
|
10
|
+
activeVideoEffectError: () => AdapterError | undefined;
|
18
11
|
}) => JSX.Element;
|
19
|
-
/**
|
20
|
-
* @private
|
21
|
-
*/
|
22
|
-
export declare const dismissError: (toDismiss: AdapterError) => DismissedError;
|
23
|
-
export {};
|
24
12
|
//# sourceMappingURL=VideoEffectsPane.d.ts.map
|
@@ -11,11 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
11
11
|
// Licensed under the MIT license.
|
12
12
|
import React from 'react';
|
13
13
|
/* @conditional-compile-remove(video-background-effects) */
|
14
|
-
import { useState } from 'react';
|
15
|
-
/* @conditional-compile-remove(video-background-effects) */
|
16
14
|
import { useCallback, useMemo } from 'react';
|
17
15
|
/* @conditional-compile-remove(video-background-effects) */
|
18
|
-
import { MessageBar, MessageBarType,
|
16
|
+
import { MessageBar, MessageBarType, Stack } from '@fluentui/react';
|
19
17
|
/* @conditional-compile-remove(video-background-effects) */
|
20
18
|
import { useLocale } from '../localization';
|
21
19
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -27,16 +25,13 @@ import { useSelector } from '../CallComposite/hooks/useSelector';
|
|
27
25
|
/* @conditional-compile-remove(video-background-effects) */
|
28
26
|
import { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';
|
29
27
|
/* @conditional-compile-remove(video-background-effects) */
|
30
|
-
import { videoBackgroundErrorsSelector } from '../CallComposite/selectors/videoBackgroundErrorsSelector';
|
31
|
-
/* @conditional-compile-remove(video-background-effects) */
|
32
28
|
import { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';
|
33
29
|
/**
|
34
30
|
* Pane that is used to show video effects button
|
35
31
|
* @private
|
36
32
|
*/
|
37
33
|
/** @beta */
|
38
|
-
export const
|
39
|
-
const { showVideoEffectsOptions, setshowVideoEffectsOptions } = props;
|
34
|
+
export const VideoEffectsPaneContent = (props) => {
|
40
35
|
/* @conditional-compile-remove(video-background-effects) */
|
41
36
|
const locale = useLocale();
|
42
37
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -115,21 +110,15 @@ export const VideoEffectsPane = (props) => {
|
|
115
110
|
}
|
116
111
|
}
|
117
112
|
}), [adapter, selectableVideoEffects]);
|
118
|
-
return VideoEffectsPaneTrampoline(
|
113
|
+
return VideoEffectsPaneTrampoline(props.onDismissError, props.activeVideoEffectError,
|
119
114
|
/* @conditional-compile-remove(video-background-effects) */
|
120
115
|
selectableVideoEffects,
|
121
116
|
/* @conditional-compile-remove(video-background-effects) */
|
122
117
|
onEffectChange);
|
123
118
|
};
|
124
|
-
const VideoEffectsPaneTrampoline = (
|
125
|
-
/* @conditional-compile-remove(video-background-effects) */
|
126
|
-
const [dismissedError, setDismissedError] = useState();
|
127
|
-
/* @conditional-compile-remove(video-background-effects) */
|
128
|
-
const latestEffectError = useSelector(videoBackgroundErrorsSelector);
|
129
|
-
/* @conditional-compile-remove(video-background-effects) */
|
130
|
-
const showError = latestEffectError && (!dismissedError || latestEffectError.timestamp > dismissedError.dismissedAt);
|
119
|
+
const VideoEffectsPaneTrampoline = (onDismissError, activeVideoEffectError, selectableVideoEffects, onEffectChange) => {
|
131
120
|
/* @conditional-compile-remove(video-background-effects) */
|
132
|
-
const
|
121
|
+
const videoEffectError = activeVideoEffectError && activeVideoEffectError();
|
133
122
|
/* @conditional-compile-remove(video-background-effects) */
|
134
123
|
const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);
|
135
124
|
/* @conditional-compile-remove(video-background-effects) */
|
@@ -137,28 +126,21 @@ const VideoEffectsPaneTrampoline = (showVideoEffectsOptions, setshowVideoEffects
|
|
137
126
|
/* @conditional-compile-remove(video-background-effects) */
|
138
127
|
const showWarning = !isCameraOn && selectedEffect !== 'none';
|
139
128
|
/* @conditional-compile-remove(video-background-effects) */
|
140
|
-
const
|
141
|
-
zIndex: 0
|
142
|
-
};
|
129
|
+
const locale = useLocale();
|
143
130
|
/* @conditional-compile-remove(video-background-effects) */
|
144
|
-
return (React.createElement(
|
145
|
-
|
131
|
+
return (React.createElement(Stack, { horizontalAlign: "center" },
|
132
|
+
videoEffectError && (React.createElement(MessageBar, { messageBarType: MessageBarType.error, onDismiss: () => onDismissError(videoEffectError) }, locale.strings.call.unableToStartVideoEffect)),
|
146
133
|
showWarning && (React.createElement(MessageBar, { messageBarType: MessageBarType.warning }, locale.strings.call.cameraOffBackgroundEffectWarningText)),
|
147
|
-
|
134
|
+
React.createElement(_VideoBackgroundEffectsPicker, { label: "Background" // TODO [jaburnsi]: localize
|
135
|
+
, styles: backgroundPickerStyles, options: selectableVideoEffects !== null && selectableVideoEffects !== void 0 ? selectableVideoEffects : [], onChange: onEffectChange, selectedEffectKey: selectedEffect })));
|
148
136
|
return React.createElement(React.Fragment, null);
|
149
137
|
};
|
150
138
|
/* @conditional-compile-remove(video-background-effects) */
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
const toDismissTimestamp = (_a = toDismiss.timestamp) !== null && _a !== void 0 ? _a : now;
|
158
|
-
// Record that this error was dismissed for the first time right now.
|
159
|
-
return {
|
160
|
-
dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,
|
161
|
-
activeSince: toDismiss.timestamp
|
162
|
-
};
|
139
|
+
const backgroundPickerStyles = {
|
140
|
+
label: {
|
141
|
+
fontSize: '0.75rem',
|
142
|
+
lineHeight: '0.5rem',
|
143
|
+
fontWeight: '400'
|
144
|
+
}
|
163
145
|
};
|
164
146
|
//# sourceMappingURL=VideoEffectsPane.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,2DAA2D;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjF,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,2DAA2D;AAC3D,OAAO,EAAE,6BAA6B,EAAE,yCAAmC;AAQ3E,2DAA2D;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AACrH,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,2DAA2D;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,0DAA0D,CAAC;AAGzG,2DAA2D;AAC3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C,UAAU,IACT,cAAc,EAAE,cAAc,CAAC,KAAK,EACpC,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,IAElE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAClC,CACd;QACA,WAAW,IAAI,CACd,oBAAC,UAAU,IAAC,cAAc,EAAE,cAAc,CAAC,OAAO,IAC/C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAC9C,CACd;QACA,sBAAsB,IAAI,CACzB,oBAAC,6BAA6B,IAC5B,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,cAAc,EACxB,iBAAiB,EAAE,cAAc,GACF,CAClC,CACK,CACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,2DAA2D;AAC3D;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAuB,EAAkB,EAAE;;IACtE,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,MAAM,kBAAkB,GAAG,MAAA,SAAS,CAAC,SAAS,mCAAI,GAAG,CAAC;IAEtD,qEAAqE;IACrE,OAAO;QACL,WAAW,EAAE,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,kBAAkB;QAChE,WAAW,EAAE,SAAS,CAAC,SAAS;KACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { MessageBar, MessageBarType, Panel, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useLocale } from '../localization';\nimport { _VideoEffectsItemProps } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport {\n VideoBackgroundImage,\n VideoBackgroundBlurEffect,\n VideoBackgroundNoneEffect,\n VideoBackgroundReplacementEffect\n} from '../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\n/* @conditional-compile-remove(video-background-effects) */\nimport { videoBackgroundErrorsSelector } from '../CallComposite/selectors/videoBackgroundErrorsSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { AdapterError } from './adapters';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * @private\n */\ninterface DismissedError {\n dismissedAt: Date;\n activeSince?: Date;\n}\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPane = (props: {\n showVideoEffectsOptions: boolean;\n setshowVideoEffectsOptions: (showVideoEffectsOptions: boolean) => void;\n}): JSX.Element => {\n const { showVideoEffectsOptions, setshowVideoEffectsOptions } = props;\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n /* @conditional-compile-remove(video-background-effects) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const strings = locale.strings.call;\n /* @conditional-compile-remove(video-background-effects) */\n const selectableVideoEffects: _VideoEffectsItemProps[] = useMemo(() => {\n const videoEffects: _VideoEffectsItemProps[] = [\n {\n key: 'none',\n iconProps: {\n iconName: 'RemoveVideoBackgroundEffect'\n },\n title: strings.removeBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.removeBackgroundTooltip\n }\n },\n {\n key: 'blur',\n iconProps: {\n iconName: 'BlurVideoBackground'\n },\n title: strings.blurBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.blurBackgroundTooltip\n }\n }\n ];\n const videoEffectImages = adapter.getState().videoBackgroundImages;\n\n if (videoEffectImages) {\n videoEffectImages.forEach((img: VideoBackgroundImage) => {\n videoEffects.push({\n key: img.key,\n backgroundProps: {\n url: img.url\n },\n tooltipProps: {\n content: img.tooltipText ?? ''\n }\n });\n });\n }\n return videoEffects;\n }, [strings, adapter]);\n\n /* @conditional-compile-remove(video-background-effects) */\n const onEffectChange = useCallback(\n async (effectKey: string) => {\n if (effectKey === 'blur') {\n const blurEffect: VideoBackgroundBlurEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n await adapter.blurVideoBackground();\n } else if (effectKey === 'none') {\n const noneEffect: VideoBackgroundNoneEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n await adapter.stopVideoBackgroundEffect();\n } else {\n const backgroundImg = selectableVideoEffects.find((effect) => {\n return effect.key === effectKey;\n });\n if (backgroundImg && backgroundImg.backgroundProps) {\n const replaceEffect: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n effectKey,\n backgroundImageUrl: backgroundImg.backgroundProps.url\n };\n adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n await adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });\n }\n }\n },\n [adapter, selectableVideoEffects]\n );\n return VideoEffectsPaneTrampoline(\n showVideoEffectsOptions,\n setshowVideoEffectsOptions,\n /* @conditional-compile-remove(video-background-effects) */\n selectableVideoEffects,\n /* @conditional-compile-remove(video-background-effects) */\n onEffectChange\n );\n};\n\nconst VideoEffectsPaneTrampoline = (\n showVideoEffectsOptions: boolean,\n setshowVideoEffectsOptions: (showVideoEffectsOptions: boolean) => void,\n selectableVideoEffects?: _VideoEffectsItemProps[],\n onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const [dismissedError, setDismissedError] = useState<DismissedError>();\n /* @conditional-compile-remove(video-background-effects) */\n const latestEffectError = useSelector(videoBackgroundErrorsSelector);\n /* @conditional-compile-remove(video-background-effects) */\n const showError = latestEffectError && (!dismissedError || latestEffectError.timestamp > dismissedError.dismissedAt);\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n /* @conditional-compile-remove(video-background-effects) */\n const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n /* @conditional-compile-remove(video-background-effects) */\n const showWarning = !isCameraOn && selectedEffect !== 'none';\n /* @conditional-compile-remove(video-background-effects) */\n const headerStyles = {\n zIndex: 0\n };\n\n /* @conditional-compile-remove(video-background-effects) */\n return (\n <Panel\n headerText={locale.strings.call.effects}\n isOpen={showVideoEffectsOptions}\n onDismiss={() => setshowVideoEffectsOptions(false)}\n hasCloseButton={true}\n closeButtonAriaLabel=\"Close\"\n isLightDismiss={true}\n className={mergeStyles(headerStyles)}\n >\n {showError && latestEffectError && (\n <MessageBar\n messageBarType={MessageBarType.error}\n onDismiss={() => setDismissedError(dismissError(latestEffectError))}\n >\n {locale.strings.call.unableToStartVideoEffect}\n </MessageBar>\n )}\n {showWarning && (\n <MessageBar messageBarType={MessageBarType.warning}>\n {locale.strings.call.cameraOffBackgroundEffectWarningText}\n </MessageBar>\n )}\n {selectableVideoEffects && (\n <_VideoBackgroundEffectsPicker\n options={selectableVideoEffects}\n onChange={onEffectChange}\n selectedEffectKey={selectedEffect}\n ></_VideoBackgroundEffectsPicker>\n )}\n </Panel>\n );\n return <></>;\n};\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * @private\n */\nexport const dismissError = (toDismiss: AdapterError): DismissedError => {\n const now = new Date(Date.now());\n const toDismissTimestamp = toDismiss.timestamp ?? now;\n\n // Record that this error was dismissed for the first time right now.\n return {\n dismissedAt: now > toDismissTimestamp ? now : toDismissTimestamp,\n activeSince: toDismiss.timestamp\n };\n};\n\"../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,2DAA2D;AAC3D,OAAO,EAAE,6BAA6B,EAAE,yCAAmC;AAQ3E,2DAA2D;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AACrH,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,2DAA2D;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAEzF;;;GAGG;AACH,YAAY;AACZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAGvC,EAAe,EAAE;IAChB,2DAA2D;IAC3D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,2DAA2D;IAC3D,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,2DAA2D;IAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;IACpC,2DAA2D;IAC3D,MAAM,sBAAsB,GAA6B,OAAO,CAAC,GAAG,EAAE;QACpE,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2D;IAC3D,MAAM,WAAW,GAAG,CAAC,UAAU,IAAI,cAAc,KAAK,MAAM,CAAC;IAC7D,2DAA2D;IAC3D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,2DAA2D;IAC3D,OAAO,CACL,oBAAC,KAAK,IAAC,eAAe,EAAC,QAAQ;QAC5B,gBAAgB,IAAI,CACnB,oBAAC,UAAU,IAAC,cAAc,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAChG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAClC,CACd;QACA,WAAW,IAAI,CACd,oBAAC,UAAU,IAAC,cAAc,EAAE,cAAc,CAAC,OAAO,IAC/C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAC9C,CACd;QACD,oBAAC,6BAA6B,IAC5B,KAAK,EAAC,YAAY,CAAC,4BAA4B;cAC/C,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACrC,QAAQ,EAAE,cAAc,EACxB,iBAAiB,EAAE,cAAc,GACjC,CACI,CACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,2DAA2D;AAC3D,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { MessageBar, MessageBarType, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useLocale } from '../localization';\nimport { _VideoEffectsItemProps } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport {\n VideoBackgroundImage,\n VideoBackgroundBlurEffect,\n VideoBackgroundNoneEffect,\n VideoBackgroundReplacementEffect\n} from '../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { AdapterError } from './adapters';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPaneContent = (props: {\n onDismissError: (error: AdapterError) => void;\n activeVideoEffectError: () => AdapterError | undefined;\n}): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n /* @conditional-compile-remove(video-background-effects) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const strings = locale.strings.call;\n /* @conditional-compile-remove(video-background-effects) */\n const selectableVideoEffects: _VideoEffectsItemProps[] = useMemo(() => {\n const videoEffects: _VideoEffectsItemProps[] = [\n {\n key: 'none',\n iconProps: {\n iconName: 'RemoveVideoBackgroundEffect'\n },\n title: strings.removeBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.removeBackgroundTooltip\n }\n },\n {\n key: 'blur',\n iconProps: {\n iconName: 'BlurVideoBackground'\n },\n title: strings.blurBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.blurBackgroundTooltip\n }\n }\n ];\n const videoEffectImages = adapter.getState().videoBackgroundImages;\n\n if (videoEffectImages) {\n videoEffectImages.forEach((img: VideoBackgroundImage) => {\n videoEffects.push({\n key: img.key,\n backgroundProps: {\n url: img.url\n },\n tooltipProps: {\n content: img.tooltipText ?? ''\n }\n });\n });\n }\n return videoEffects;\n }, [strings, adapter]);\n\n /* @conditional-compile-remove(video-background-effects) */\n const onEffectChange = useCallback(\n async (effectKey: string) => {\n if (effectKey === 'blur') {\n const blurEffect: VideoBackgroundBlurEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n await adapter.blurVideoBackground();\n } else if (effectKey === 'none') {\n const noneEffect: VideoBackgroundNoneEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n await adapter.stopVideoBackgroundEffect();\n } else {\n const backgroundImg = selectableVideoEffects.find((effect) => {\n return effect.key === effectKey;\n });\n if (backgroundImg && backgroundImg.backgroundProps) {\n const replaceEffect: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n effectKey,\n backgroundImageUrl: backgroundImg.backgroundProps.url\n };\n adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n await adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });\n }\n }\n },\n [adapter, selectableVideoEffects]\n );\n return VideoEffectsPaneTrampoline(\n props.onDismissError,\n props.activeVideoEffectError,\n /* @conditional-compile-remove(video-background-effects) */\n selectableVideoEffects,\n /* @conditional-compile-remove(video-background-effects) */\n onEffectChange\n );\n};\n\nconst VideoEffectsPaneTrampoline = (\n onDismissError: (error: AdapterError) => void,\n activeVideoEffectError?: () => AdapterError | undefined,\n selectableVideoEffects?: _VideoEffectsItemProps[],\n onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const videoEffectError = activeVideoEffectError && activeVideoEffectError();\n /* @conditional-compile-remove(video-background-effects) */\n const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n /* @conditional-compile-remove(video-background-effects) */\n const showWarning = !isCameraOn && selectedEffect !== 'none';\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n\n /* @conditional-compile-remove(video-background-effects) */\n return (\n <Stack horizontalAlign=\"center\">\n {videoEffectError && (\n <MessageBar messageBarType={MessageBarType.error} onDismiss={() => onDismissError(videoEffectError)}>\n {locale.strings.call.unableToStartVideoEffect}\n </MessageBar>\n )}\n {showWarning && (\n <MessageBar messageBarType={MessageBarType.warning}>\n {locale.strings.call.cameraOffBackgroundEffectWarningText}\n </MessageBar>\n )}\n <_VideoBackgroundEffectsPicker\n label=\"Background\" // TODO [jaburnsi]: localize\n styles={backgroundPickerStyles}\n options={selectableVideoEffects ?? []}\n onChange={onEffectChange}\n selectedEffectKey={selectedEffect}\n />\n </Stack>\n );\n return <></>;\n};\n\n/* @conditional-compile-remove(video-background-effects) */\nconst backgroundPickerStyles = {\n label: {\n fontSize: '0.75rem',\n lineHeight: '0.5rem',\n fontWeight: '400'\n }\n};\n\"../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts
CHANGED
@@ -85,6 +85,14 @@ export declare type CommonCallControlOptions = {
|
|
85
85
|
disabled: boolean;
|
86
86
|
};
|
87
87
|
};
|
88
|
+
/**
|
89
|
+
* While the public API for the custom buttons is in beta. Use this type to access the internal
|
90
|
+
* API.
|
91
|
+
* @internal
|
92
|
+
*/
|
93
|
+
export declare type _CommonCallControlOptions = CommonCallControlOptions & {
|
94
|
+
onFetchCustomButtonProps?: CustomCallControlButtonCallback[];
|
95
|
+
};
|
88
96
|
/**
|
89
97
|
* Arguments for {@link CustomCallControlButtonCallback}.
|
90
98
|
*
|
package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CommonCallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/types/CommonCallControlOptions.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { CustomCallControlButtonPlacement } from '../ControlBar/CustomButton';\
|
1
|
+
{"version":3,"file":"CommonCallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/types/CommonCallControlOptions.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { CustomCallControlButtonPlacement } from '../ControlBar/CustomButton';\nimport { CustomCallControlButtonCallback } from '../ControlBar/CustomButton';\n\n/**\n * Control bar display type for {@link CallComposite}.\n *\n * @public\n */\nexport type CallControlDisplayType = 'default' | 'compact';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CommonCallControlOptions = {\n /**\n * {@link CallControlDisplayType} to change how the call controls are displayed.\n * `'compact'` display type will decreases the size of buttons and hide the labels.\n *\n * @remarks\n * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.\n *\n * @defaultValue 'default'\n */\n displayType?: CallControlDisplayType;\n /**\n * Show or Hide Camera Button during a call\n * @defaultValue true\n */\n cameraButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show or Hide EndCall button during a call.\n * @defaultValue true\n */\n endCallButton?: boolean;\n /**\n * Show or Hide Microphone button during a call.\n * @defaultValue true\n */\n microphoneButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show or Hide Devices button during a call.\n * @defaultValue true\n */\n devicesButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show, Hide or Disable participants button during a call.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n /**\n * Show, Hide or Disable the screen share button during a call.\n * @defaultValue true\n */\n screenShareButton?: boolean | { disabled: boolean };\n /* @conditional-compile-remove(PSTN-calls) */\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show, Hide or disable the more button during a call.\n * @defaultValue true\n */\n moreButton?: boolean;\n /* @conditional-compile-remove(control-bar-button-injection) */\n /**\n * Inject custom buttons in the call controls.\n *\n * @beta\n */\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[];\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n holdButton?: boolean | { disabled: boolean };\n /**\n * Show or hide the people button in the composite control bar.\n * @defaultValue true\n */\n peopleButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n};\n\n/**\n * While the public API for the custom buttons is in beta. Use this type to access the internal\n * API.\n * @internal\n */\nexport type _CommonCallControlOptions = CommonCallControlOptions & {\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[];\n};\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @beta\n */\nexport interface CustomCallControlButtonCallbackArgs {\n /**\n * Buttons should reduce the size to fit a smaller viewport when `displayType` is `'compact'`.\n *\n * @defaultValue `'default'`\n */\n displayType?: CallControlDisplayType;\n}\n\n/**\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @beta\n */\nexport interface CustomControlButtonProps {\n /**\n * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n /**\n * Fluent styles, common to all {@link ControlBarButton}s or {@link DrawerMenuItem}s.\n */\n styles?: ControlBarButtonStyles | BaseCustomStyles;\n /**\n * Optional label for the button\n */\n text?: string;\n /**\n * A unique key for the button\n */\n key?: string | number;\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n /**\n * Detailed description of the button for the benefit of screen readers.\n */\n ariaDescription?: string;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\"../../../../../react-components/src\""]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.5.1-alpha-
|
3
|
+
"version": "1.5.1-alpha-202305050017",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"uuid": "^8.1.0"
|
48
48
|
},
|
49
49
|
"peerDependencies": {
|
50
|
-
"@azure/communication-calling": "1.13.
|
50
|
+
"@azure/communication-calling": "1.13.1-beta.1 || >=1.12.1",
|
51
51
|
"@azure/communication-calling-effects": "1.0.0-beta.2",
|
52
52
|
"@azure/communication-chat": "1.3.2-beta.1 || >=1.2.0",
|
53
53
|
"@types/react": ">=16.8.0 <18.0.0",
|
@@ -83,19 +83,19 @@
|
|
83
83
|
"_by-flavor": "rushx _current-flavor && env-cmd -f ../../common/config/env/.env --use-shell"
|
84
84
|
},
|
85
85
|
"devDependencies": {
|
86
|
-
"@azure/communication-calling": "1.13.
|
86
|
+
"@azure/communication-calling": "1.13.1-beta.1 || >=1.12.1",
|
87
87
|
"@azure/communication-calling-effects": "1.0.0-beta.2",
|
88
88
|
"@azure/communication-chat": "1.3.2-beta.1 || >=1.2.0",
|
89
89
|
"@azure/core-auth": "1.3.2",
|
90
90
|
"@babel/cli": "~7.16.0",
|
91
91
|
"@babel/core": "~7.16.0",
|
92
|
-
"@internal/calling-component-bindings": "1.5.1-alpha-
|
93
|
-
"@internal/calling-stateful-client": "1.5.1-alpha-
|
94
|
-
"@internal/chat-component-bindings": "1.5.1-alpha-
|
95
|
-
"@internal/chat-stateful-client": "1.5.1-alpha-
|
96
|
-
"@internal/fake-backends": "1.5.1-alpha-
|
97
|
-
"@internal/react-components": "1.5.1-alpha-
|
98
|
-
"@internal/react-composites": "1.5.1-alpha-
|
92
|
+
"@internal/calling-component-bindings": "1.5.1-alpha-202305050017",
|
93
|
+
"@internal/calling-stateful-client": "1.5.1-alpha-202305050017",
|
94
|
+
"@internal/chat-component-bindings": "1.5.1-alpha-202305050017",
|
95
|
+
"@internal/chat-stateful-client": "1.5.1-alpha-202305050017",
|
96
|
+
"@internal/fake-backends": "1.5.1-alpha-202305050017",
|
97
|
+
"@internal/react-components": "1.5.1-alpha-202305050017",
|
98
|
+
"@internal/react-composites": "1.5.1-alpha-202305050017",
|
99
99
|
"@microsoft/api-documenter": "~7.12.11",
|
100
100
|
"@microsoft/api-extractor": "~7.18.0",
|
101
101
|
"@rollup/plugin-json": "~4.1.0",
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { ParticipantMenuItemsCallback } from "../../../../../react-components/src";
|
3
|
-
import { CommonCallAdapter, CallControlOptions } from '../';
|
4
|
-
import { AvatarPersonaDataCallback } from '../../common/AvatarPersona';
|
5
|
-
import { CallSidePaneOption } from '../hooks/useSidePaneState';
|
6
|
-
/**
|
7
|
-
* Pane that is used to store participants for Call composite
|
8
|
-
* @private
|
9
|
-
*/
|
10
|
-
/** @beta */
|
11
|
-
export declare const CallPane: (props: {
|
12
|
-
callAdapter: CommonCallAdapter;
|
13
|
-
onClose: () => void;
|
14
|
-
onFetchAvatarPersonaData?: AvatarPersonaDataCallback;
|
15
|
-
onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;
|
16
|
-
onPeopleButtonClicked?: () => void;
|
17
|
-
modalLayerHostId: string;
|
18
|
-
activePane: CallSidePaneOption;
|
19
|
-
mobileView?: boolean;
|
20
|
-
inviteLink?: string;
|
21
|
-
rtl?: boolean;
|
22
|
-
callControls?: CallControlOptions;
|
23
|
-
}) => JSX.Element;
|
24
|
-
//# sourceMappingURL=CallPane.d.ts.map
|
@@ -1,80 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
// Copyright (c) Microsoft Corporation.
|
11
|
-
// Licensed under the MIT license.
|
12
|
-
import { Stack } from '@fluentui/react';
|
13
|
-
import { _DrawerMenu, useTheme } from "../../../../../react-components/src";
|
14
|
-
import React, { useMemo, useState } from 'react';
|
15
|
-
import { CallAdapterProvider } from '../adapter/CallAdapterProvider';
|
16
|
-
import { paneBodyContainer, scrollableContainer, scrollableContainerContents } from '../../common/styles/ParticipantContainer.styles';
|
17
|
-
import { SidePaneHeader } from '../../common/SidePaneHeader';
|
18
|
-
import { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';
|
19
|
-
import { PeoplePaneContent } from '../../common/PeoplePaneContent';
|
20
|
-
import { drawerContainerStyles } from '../styles/CallComposite.styles';
|
21
|
-
import { TabHeader } from '../../common/TabHeader';
|
22
|
-
import { useLocale } from '../../localization';
|
23
|
-
import { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';
|
24
|
-
import { useMinMaxDragPosition } from '../../common/utils';
|
25
|
-
import { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';
|
26
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
27
|
-
import { useAdapter } from '../adapter/CallAdapterProvider';
|
28
|
-
import { isDisabled } from '../utils';
|
29
|
-
/**
|
30
|
-
* Pane that is used to store participants for Call composite
|
31
|
-
* @private
|
32
|
-
*/
|
33
|
-
/** @beta */
|
34
|
-
export const CallPane = (props) => {
|
35
|
-
var _a;
|
36
|
-
const [drawerMenuItems, setDrawerMenuItems] = useState([]);
|
37
|
-
const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
|
38
|
-
const localeStrings = useLocale();
|
39
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
40
|
-
const getStrings = () => {
|
41
|
-
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
42
|
-
return localeStrings.strings.call;
|
43
|
-
return localeStrings.strings.callWithChat;
|
44
|
-
};
|
45
|
-
const strings = getStrings();
|
46
|
-
const theme = useTheme();
|
47
|
-
const header = !props.activePane ? null : props.mobileView ? (React.createElement(TabHeader, Object.assign({}, props, { strings: strings, activeTab: props.activePane, disablePeopleButton: isDisabled((_a = props.callControls) === null || _a === void 0 ? void 0 : _a.participantsButton) }))) : (React.createElement(SidePaneHeader, Object.assign({}, props, { strings: strings, headingText: props.activePane === 'people' ? strings.peoplePaneTitle : '' })));
|
48
|
-
/**
|
49
|
-
* In a Call Composite when a participant is removed, we must remove them from the call.
|
50
|
-
*/
|
51
|
-
const removeParticipantFromCall = (participantId) => __awaiter(void 0, void 0, void 0, function* () {
|
52
|
-
yield props.callAdapter.removeParticipant(participantId);
|
53
|
-
});
|
54
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
55
|
-
const addParticipantToCall = (participant, options) => __awaiter(void 0, void 0, void 0, function* () {
|
56
|
-
yield props.callAdapter.addParticipant(participant, options);
|
57
|
-
});
|
58
|
-
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
|
59
|
-
const pipStyles = useMemo(() => getPipStyles(theme), [theme]);
|
60
|
-
const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';
|
61
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
62
|
-
const alternateCallerId = useAdapter().getState().alternateCallerId;
|
63
|
-
return (React.createElement(Stack, { verticalFill: true, grow: true, styles: paneStyles, "data-ui-id": dataUiId, tokens: props.mobileView ? {} : sidePaneTokens },
|
64
|
-
header,
|
65
|
-
React.createElement(Stack.Item, { verticalFill: true, grow: true, styles: paneBodyContainer },
|
66
|
-
React.createElement(Stack, { horizontal: true, styles: scrollableContainer },
|
67
|
-
React.createElement(Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
|
68
|
-
React.createElement(Stack, { styles: props.activePane === 'people' ? availableSpaceStyles : hiddenStyles },
|
69
|
-
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
70
|
-
React.createElement(PeoplePaneContent, Object.assign({ active: props.activePane === 'people' }, props, { onRemoveParticipant: removeParticipantFromCall,
|
71
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
72
|
-
onAddParticipant: addParticipantToCall, setDrawerMenuItems: setDrawerMenuItems, strings: strings,
|
73
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
74
|
-
alternateCallerId: alternateCallerId }))))))),
|
75
|
-
props.mobileView && (React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
76
|
-
React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !props.activePane, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
|
77
|
-
drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles() },
|
78
|
-
React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
|
79
|
-
};
|
80
|
-
//# sourceMappingURL=CallPane.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKrH,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC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oBAAoB,CAAC,CAAC,CAAC,YAAY;wBAChF,oBAAC,mBAAmB,IAAC,OAAO,EAAE,KAAK,CAAC,WAAW;4BAC7C,oBAAC,iBAAiB,kBAChB,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,QAAQ,IACjC,KAAK,IACT,mBAAmB,EAAE,yBAAyB;gCAC9C,6CAA6C;gCAC7C,gBAAgB,EAAE,oBAAoB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO;gCAChB,6CAA6C;gCAC7C,iBAAiB,EAAE,iBAAiB,IACpC,CACkB,CAChB,CACG,CACP,CACG;QACZ,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,mBAAmB,IAAC,OAAO,EAAE,KAAK,CAAC,WAAW;YAC7C,oBAAC,sBAAsB,IACrB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACkB,CACvB;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB,EAAE;YACpC,oBAAC,WAAW,IAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAI,CAC/E,CACT,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CommonCallAdapter, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\nimport { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CommonCallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Active tab option type for {@link CallPane} component
|
3
|
-
* @private
|
4
|
-
*/
|
5
|
-
/** @beta */
|
6
|
-
export declare type CallSidePaneOption = null | 'people';
|
7
|
-
/**
|
8
|
-
* @private
|
9
|
-
*/
|
10
|
-
export declare const useSidePaneState: () => {
|
11
|
-
activePane: CallSidePaneOption;
|
12
|
-
closePane: () => void;
|
13
|
-
openPeoplePane: () => void;
|
14
|
-
togglePeoplePane: () => void;
|
15
|
-
};
|
16
|
-
//# sourceMappingURL=useSidePaneState.d.ts.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT license.
|
3
|
-
import { _isInCall } from "../../../../../calling-component-bindings/src";
|
4
|
-
import { useCallback, useMemo, useState } from 'react';
|
5
|
-
import { callStatusSelector } from '../selectors/callStatusSelector';
|
6
|
-
import { useSelector } from './useSelector';
|
7
|
-
/**
|
8
|
-
* @private
|
9
|
-
*/
|
10
|
-
export const useSidePaneState = () => {
|
11
|
-
const { callStatus } = useSelector(callStatusSelector);
|
12
|
-
const isInCall = _isInCall(callStatus);
|
13
|
-
const [chosenPane, setChosenPane] = useState(null);
|
14
|
-
const closePane = useCallback(() => {
|
15
|
-
setChosenPane(null);
|
16
|
-
}, [setChosenPane]);
|
17
|
-
const openPeoplePane = useCallback(() => {
|
18
|
-
setChosenPane('people');
|
19
|
-
}, []);
|
20
|
-
const togglePeoplePane = useCallback(() => {
|
21
|
-
if (chosenPane === 'people') {
|
22
|
-
closePane();
|
23
|
-
}
|
24
|
-
else {
|
25
|
-
openPeoplePane();
|
26
|
-
}
|
27
|
-
}, [chosenPane, closePane, openPeoplePane]);
|
28
|
-
// If we are not in a call, we should not show the people pane.
|
29
|
-
const activePane = chosenPane === 'people' && isInCall ? 'people' : null;
|
30
|
-
const memoizedReturnValue = useMemo(() => ({
|
31
|
-
activePane,
|
32
|
-
closePane,
|
33
|
-
openPeoplePane,
|
34
|
-
togglePeoplePane
|
35
|
-
}), [activePane, closePane, openPeoplePane, togglePeoplePane]);
|
36
|
-
return memoizedReturnValue;
|
37
|
-
};
|
38
|
-
//# sourceMappingURL=useSidePaneState.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useSidePaneState.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useSidePaneState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAK9B,EAAE;IACF,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAC;IAEvE,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,aAAa,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QACtC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,IAAI,UAAU,KAAK,QAAQ,EAAE;YAC3B,SAAS,EAAE,CAAC;SACb;aAAM;YACL,cAAc,EAAE,CAAC;SAClB;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE5C,+DAA+D;IAC/D,MAAM,UAAU,GAAuB,UAAU,KAAK,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IAE7F,MAAM,mBAAmB,GAAG,OAAO,CACjC,GAAG,EAAE,CAAC,CAAC;QACL,UAAU;QACV,SAAS;QACT,cAAc;QACd,gBAAgB;KACjB,CAAC,EACF,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAC1D,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { useCallback, useMemo, useState } from 'react';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { useSelector } from './useSelector';\n\n/**\n * Active tab option type for {@link CallPane} component\n * @private\n */\n/** @beta */\nexport type CallSidePaneOption = null | 'people';\n\n/**\n * @private\n */\nexport const useSidePaneState = (): {\n activePane: CallSidePaneOption;\n closePane: () => void;\n openPeoplePane: () => void;\n togglePeoplePane: () => void;\n} => {\n const { callStatus } = useSelector(callStatusSelector);\n const isInCall = _isInCall(callStatus);\n const [chosenPane, setChosenPane] = useState<CallSidePaneOption>(null);\n\n const closePane = useCallback(() => {\n setChosenPane(null);\n }, [setChosenPane]);\n\n const openPeoplePane = useCallback(() => {\n setChosenPane('people');\n }, []);\n\n const togglePeoplePane = useCallback(() => {\n if (chosenPane === 'people') {\n closePane();\n } else {\n openPeoplePane();\n }\n }, [chosenPane, closePane, openPeoplePane]);\n\n // If we are not in a call, we should not show the people pane.\n const activePane: CallSidePaneOption = chosenPane === 'people' && isInCall ? 'people' : null;\n\n const memoizedReturnValue = useMemo(\n () => ({\n activePane,\n closePane,\n openPeoplePane,\n togglePeoplePane\n }),\n [activePane, closePane, openPeoplePane, togglePeoplePane]\n );\n\n return memoizedReturnValue;\n};\n\"../../../../../calling-component-bindings/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { ParticipantMenuItemsCallback } from "../../../../react-components/src";
|
3
|
-
import { CallAdapter } from '../CallComposite';
|
4
|
-
import { ChatAdapter, ChatCompositeProps } from '../ChatComposite';
|
5
|
-
import { AvatarPersonaDataCallback } from '../common/AvatarPersona';
|
6
|
-
import { FileSharingOptions } from '../ChatComposite';
|
7
|
-
import { CallWithChatControlOptions } from './CallWithChatComposite';
|
8
|
-
/**
|
9
|
-
* Pane that is used to store chat and people for CallWithChat composite
|
10
|
-
* @private
|
11
|
-
*/
|
12
|
-
export declare const CallWithChatPane: (props: {
|
13
|
-
chatCompositeProps: Partial<ChatCompositeProps>;
|
14
|
-
callAdapter: CallAdapter;
|
15
|
-
chatAdapter: ChatAdapter;
|
16
|
-
onClose: () => void;
|
17
|
-
onFetchAvatarPersonaData?: AvatarPersonaDataCallback;
|
18
|
-
onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;
|
19
|
-
onChatButtonClicked?: () => void;
|
20
|
-
onPeopleButtonClicked?: () => void;
|
21
|
-
modalLayerHostId: string;
|
22
|
-
activePane: CallWithChatPaneOption;
|
23
|
-
mobileView?: boolean;
|
24
|
-
inviteLink?: string;
|
25
|
-
fileSharing?: FileSharingOptions;
|
26
|
-
rtl?: boolean;
|
27
|
-
callControls?: CallWithChatControlOptions;
|
28
|
-
}) => JSX.Element;
|
29
|
-
/**
|
30
|
-
* Active tab option type for {@link CallWithChatPane} component
|
31
|
-
* @private
|
32
|
-
*/
|
33
|
-
export declare type CallWithChatPaneOption = 'none' | 'chat' | 'people';
|
34
|
-
//# sourceMappingURL=CallWithChatPane.d.ts.map
|