@azure/communication-react 1.18.0-alpha-202406260014 → 1.18.0-alpha-202406280014
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 +98 -106
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-_hqOwT_h.js → ChatMessageComponentAsRichTextEditBox-Bl9FzI6X.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-_hqOwT_h.js.map → ChatMessageComponentAsRichTextEditBox-Bl9FzI6X.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D-KYGmZ9.js → RichTextSendBoxWrapper-G-04IaQB.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D-KYGmZ9.js.map → RichTextSendBoxWrapper-G-04IaQB.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-DCf8u3Nr.js → index-CWs0GTYF.js} +75 -158
- package/dist/dist-cjs/communication-react/index-CWs0GTYF.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +3 -3
- 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/errorBarSelector.js +5 -20
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/{errorNotificationsSelector.d.ts → notificationStackSelector.d.ts} +4 -3
- package/dist/dist-esm/calling-component-bindings/src/{errorNotificationsSelector.js → notificationStackSelector.js} +7 -3
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +9 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -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/communication-react/src/mergedHooks.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.d.ts +1 -21
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js +8 -8
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/{NotificationBar.d.ts → Notification.d.ts} +8 -8
- package/dist/dist-esm/react-components/src/components/{NotificationBar.js → Notification.js} +5 -5
- package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{Notifications.d.ts → NotificationStack.d.ts} +46 -42
- package/dist/dist-esm/react-components/src/components/{Notifications.js → NotificationStack.js} +7 -7
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/index.js +2 -2
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/{NotificationBar.styles.d.ts → Notification.styles.d.ts} +1 -1
- package/dist/dist-esm/react-components/src/components/styles/{NotificationBar.styles.js → Notification.styles.js} +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Notification.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +3 -1
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +4 -4
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +10 -10
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +4 -0
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +3 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -9
- 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/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +12 -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.map +1 -1
- 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/components/SidePane/useVideoEffectsPane.d.ts +2 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -3
- 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.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -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.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +2 -3
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +2 -40
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -7
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/index-DCf8u3Nr.js.map +0 -1
- package/dist/dist-esm/calling-component-bindings/src/errorNotificationsSelector.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/NotificationBar.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/Notifications.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BadNetworkQualityNotificationBar.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BadNetworkQualityNotificationBar.js +0 -40
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BadNetworkQualityNotificationBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/badNetworkQualitySelector.d.ts +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/badNetworkQualitySelector.js +0 -26
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/badNetworkQualitySelector.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAIxG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AA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BAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB;YAC5C,2DAA2D;YAC3D,4BAA4B,EAAE,KAAK,CAAC,4BAA4B,GAChE;QACD,oBAAC,MAAM,kBAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAM,WAAW,EAAI,CAC1F,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(notifications) */\nimport { ActiveNotification } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\nimport { Prompt, PromptProps } from '../components/Prompt';\n/* @conditional-compile-remove(teams-meeting-conference) */\nimport { BadNetworkQualityBannerProps } from '../components/BadNetworkQualityNotificationBar';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[] | /* @conditional-compile-remove(notifications) */ ActiveNotification[];\n onDismissError: (\n error: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification\n ) => void;\n galleryLayout: VideoGalleryLayout;\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n compositeAudioContext?: AudioContext;\n disableAutoShowDtmfDialer?: boolean;\n /* @conditional-compile-remove(teams-meeting-conference) */\n badNetworkQualityBannerProps?: BadNetworkQualityBannerProps;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane,\n pinnedParticipants,\n setPinnedParticipants,\n compositeAudioContext,\n disableAutoShowDtmfDialer = false\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(\n renderDtmfDialerFromStart && disableAutoShowDtmfDialer\n );\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n compositeAudioContext={compositeAudioContext}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n setIsPromptOpen={setIsPromptOpen}\n setPromptProps={setPromptProps}\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n videoTilesOptions={options?.videoTilesOptions}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n /* @conditional-compile-remove(notifications) */\n showErrorNotifications={options?.errorBar ?? true}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n setIsPromptOpen={setIsPromptOpen}\n setPromptProps={setPromptProps}\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n /* @conditional-compile-remove(teams-meeting-conference) */\n badNetworkQualityBannerProps={props.badNetworkQualityBannerProps}\n />\n {<Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />}\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
1
|
+
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAIxG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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aAAa,EACnC,uCAAuC,EAAE,KAAK,CAAC,uCAAuC,EACtF,gBAAgB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,EAChE,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,oBAAoB,EAC9D,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,GAC5C;QACD,oBAAC,MAAM,kBAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAM,WAAW,EAAI,CAC1F,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(notifications) */\nimport { ActiveNotification } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\nimport { Prompt, PromptProps } from '../components/Prompt';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[] | /* @conditional-compile-remove(notifications) */ ActiveNotification[];\n onDismissError: (\n error: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification\n ) => void;\n galleryLayout: VideoGalleryLayout;\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n compositeAudioContext?: AudioContext;\n disableAutoShowDtmfDialer?: boolean;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane,\n pinnedParticipants,\n setPinnedParticipants,\n compositeAudioContext,\n disableAutoShowDtmfDialer = false\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(\n renderDtmfDialerFromStart && disableAutoShowDtmfDialer\n );\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n compositeAudioContext={compositeAudioContext}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n setIsPromptOpen={setIsPromptOpen}\n setPromptProps={setPromptProps}\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n videoTilesOptions={options?.videoTilesOptions}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n /* @conditional-compile-remove(notifications) */\n showErrorNotifications={options?.errorBar ?? true}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile\n {...networkReconnectTileProps}\n /* /* @conditional-compile-remove(teams-meeting-conference) */ isMobile={mobileView}\n />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n setIsPromptOpen={setIsPromptOpen}\n setPromptProps={setPromptProps}\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n />\n {<Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />}\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO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C,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,KAA2E,EAAe,EAAE;IACxG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,yCAAK,CAAC;IACf,CAAC;IACD,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,oCAAoC,GAAG,CAAC,eAAiC,EAAuB,EAAE;IACtG,sDAAsD;IACtD,OAAO,eAAe,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAK,QAAQ,CAAC;IAE1F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport {\n callDetailsContainerStyles,\n configurationCenteredContent,\n configurationSectionStyle,\n deviceConfigurationStackTokens,\n fillWidth,\n logoStyles,\n panelFocusProps,\n panelStyles,\n startCallButtonStyleDesktop\n} from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyle,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n backgroundImage?: {\n url: string;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */ deviceChecks,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick\n } = props;\n\n const theme = useTheme();\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n const role = adapter.getState().call?.role;\n\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n );\n }\n\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');\n }\n\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (\n ['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&\n ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)\n ) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title =\n locale.strings.call.configurationPageTitle.length > 0 ? (\n <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping\n width={mobileView ? 325 : 445}\n lineHeightPx={16 * 1.5}\n bufferHeightPx={16}\n text={locale.strings.call.configurationPageTitle}\n />\n </Stack.Item>\n ) : (\n <></>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n const mobileWithPreview = mobileView && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera:\n videoState && videoState !== 'unsupported'\n ? cameraPermissionGranted !== false\n ? videoState\n : 'denied'\n : cameraPermissionGranted !== false\n ? cameraPermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied',\n microphone:\n audioState && audioState !== 'unsupported'\n ? microphonePermissionGranted !== false\n ? audioState\n : 'denied'\n : microphonePermissionGranted !== false\n ? microphonePermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(\n props.updateSidePaneRenderer,\n mobileView,\n props.latestErrors,\n props.onDismissError\n );\n\n const startCall = useCallback(async () => {\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, closeVideoEffectsPane]);\n\n const panelLayerProps = useMemo(\n () => ({\n hostId: modalLayerHostId\n }),\n [modalLayerHostId]\n );\n\n const filteredErrorBarProps = useMemo(\n () => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }),\n [errorBarProps, filteredLatestErrors]\n );\n\n const containerStyles = useMemo(\n () => configurationContainerStyle(!mobileView, props.backgroundImage?.url),\n [mobileView, props.backgroundImage?.url]\n );\n\n return (\n <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={filteredErrorBarProps}\n onDismissError={props.onDismissError}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (\n <CallReadinessModal\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack\n className={configurationCenteredContent(mobileWithPreview, !!props.logo)}\n verticalAlign=\"center\"\n verticalFill={mobileWithPreview}\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo logo={props.logo} />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalFill={mobileWithPreview}\n tokens={deviceConfigurationStackTokens}\n >\n {localPreviewTrampoline(mobileWithPreview, !!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && (\n <Stack\n className={\n mobileView\n ? undefined\n : selectionContainerStyle(\n theme,\n isSafariBrowserEnvironmentTrampoline(\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n )\n )\n }\n >\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n onClickVideoEffects={toggleVideoEffectsPane}\n />\n </Stack>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop}\n onClick={startCall}\n disabled={disableStartCallButton}\n hideIcon={true}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n isOpen={isVideoEffectsPaneOpen}\n hasCloseButton={false}\n isBlocking={false}\n isHiddenOnDismiss={false}\n styles={panelStyles}\n focusTrapZoneProps={panelFocusProps}\n layerProps={panelLayerProps}\n type={PanelType.custom}\n customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n >\n <SidePane\n mobileView={props.mobileView}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n />\n </Panel>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\nconst Logo = (props: { logo?: { url: string; alt?: string; shape?: 'unset' | 'circle' } }): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\n\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n\n return false;\n};\n"]}
|
1
|
+
{"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;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AC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CACrC,2BAAgD,EAChD,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,KAA2E,EAAe,EAAE;IACxG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,yCAAK,CAAC;IACf,CAAC;IACD,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,oCAAoC,GAAG,CAAC,eAAiC,EAAuB,EAAE;IACtG,sDAAsD;IACtD,OAAO,eAAe,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAK,QAAQ,CAAC;IAE1F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport {\n callDetailsContainerStyles,\n configurationCenteredContent,\n configurationSectionStyle,\n deviceConfigurationStackTokens,\n fillWidth,\n logoStyles,\n panelFocusProps,\n panelStyles,\n startCallButtonStyleDesktop\n} from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyle,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n backgroundImage?: {\n url: string;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */ deviceChecks,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick\n } = props;\n\n const theme = useTheme();\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n const role = adapter.getState().call?.role;\n\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n );\n }\n\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');\n }\n\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (\n ['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&\n ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)\n ) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title =\n locale.strings.call.configurationPageTitle.length > 0 ? (\n <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping\n width={mobileView ? 325 : 445}\n lineHeightPx={16 * 1.5}\n bufferHeightPx={16}\n text={locale.strings.call.configurationPageTitle}\n />\n </Stack.Item>\n ) : (\n <></>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n const mobileWithPreview = mobileView && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera:\n videoState && videoState !== 'unsupported'\n ? cameraPermissionGranted !== false\n ? videoState\n : 'denied'\n : cameraPermissionGranted !== false\n ? cameraPermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied',\n microphone:\n audioState && audioState !== 'unsupported'\n ? microphonePermissionGranted !== false\n ? audioState\n : 'denied'\n : microphonePermissionGranted !== false\n ? microphonePermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(\n props.updateSidePaneRenderer,\n mobileView,\n props.latestErrors,\n props.onDismissError\n );\n\n const startCall = useCallback(async () => {\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, closeVideoEffectsPane]);\n\n const panelLayerProps = useMemo(\n () => ({\n hostId: modalLayerHostId\n }),\n [modalLayerHostId]\n );\n\n const filteredErrorBarProps = useMemo(\n () => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }),\n [errorBarProps, filteredLatestErrors]\n );\n\n const containerStyles = useMemo(\n () => configurationContainerStyle(!mobileView, props.backgroundImage?.url),\n [mobileView, props.backgroundImage?.url]\n );\n\n return (\n <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={filteredErrorBarProps}\n onDismissError={props.onDismissError}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (\n <CallReadinessModal\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack\n className={configurationCenteredContent(mobileWithPreview, !!props.logo)}\n verticalAlign=\"center\"\n verticalFill={mobileWithPreview}\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo logo={props.logo} />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalFill={mobileWithPreview}\n tokens={deviceConfigurationStackTokens}\n >\n {localPreviewTrampoline(mobileWithPreview, !!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && (\n <Stack\n className={\n mobileView\n ? undefined\n : selectionContainerStyle(\n theme,\n isSafariBrowserEnvironmentTrampoline(\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n )\n )\n }\n >\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n onClickVideoEffects={toggleVideoEffectsPane}\n />\n </Stack>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop}\n onClick={startCall}\n disabled={disableStartCallButton}\n hideIcon={true}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n isOpen={isVideoEffectsPaneOpen}\n hasCloseButton={false}\n isBlocking={false}\n isHiddenOnDismiss={false}\n styles={panelStyles}\n focusTrapZoneProps={panelFocusProps}\n layerProps={panelLayerProps}\n type={PanelType.custom}\n customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n >\n <SidePane\n mobileView={props.mobileView}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n />\n </Panel>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\nconst Logo = (props: { logo?: { url: string; alt?: string; shape?: 'unset' | 'circle' } }): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\n\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n\n return false;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LobbyPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/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CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC/D,kBAAkB,CAAC,MAAM,KAAK,CAAC;QAC7B,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACvB,CAAC,CAAC,SAAS,CAAC;IAEhB,OAAO,OAAO;QACZ,CAAC,CAAC,+BAA+B,CAAC,OAAO,CAAC;QAC1C,CAAC,CAAC,uBAAuB;
|
1
|
+
{"version":3,"file":"LobbyPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/LobbyPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,QAAQ,EAAE,4CAAmC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAqB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAyB,MAAM,6BAA6B,CAAC;AAsB7F;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAe,EAAE;;IAC9D,MAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAC9C,MA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/B,OAA6B,EAC7B,WAAmC,EAChB,EAAE;;IACrB,IAAI,uBAAuB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QACpD,OAAO;YACL,KAAK,EAAG,WAAW,CAAC,UAAoC,CAAC,WAAW;YACpE,WAAW,EAAE,OAAO,CAAC,2BAA2B;SACjD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,KAAK,EAAE,MAAA,OAAO,CAAC,2BAA2B,mCAAI,EAAE;SACjD,CAAC;IACJ,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ActiveErrorMessage, ErrorBar } from '@internal/react-components';\nimport { useSelector } from '../hooks/useSelector';\nimport { lobbySelector } from '../selectors/lobbySelector';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { LobbyOverlayProps, LobbyTile } from '../components/LobbyTile';\nimport { getCallStatus, getRemoteParticipants } from '../selectors/baseSelectors';\nimport { disableCallControls, reduceCallControlsForMobile } from '../utils';\nimport { CallCompositeStrings } from '../Strings';\nimport { useLocale } from '../../localization';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\n\n/**\n * @private\n */\nexport interface LobbyPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n options?: CallCompositeOptions;\n mobileChatTabHeader: MobileChatSidePaneTabHeaderProps | undefined;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n}\n\n/**\n * @private\n */\nexport const LobbyPage = (props: LobbyPageProps): JSX.Element => {\n const errorBarProps = usePropsFor(ErrorBar);\n const lobbyProps = useSelector(lobbySelector);\n const strings = useLocale().strings.call;\n\n const callState = useSelector(getCallStatus);\n const inLobby = callState === 'InLobby';\n\n const participants = useSelector(getRemoteParticipants) ?? {};\n\n // Reduce the controls shown when mobile view is enabled.\n let callControlOptions = props.mobileView\n ? reduceCallControlsForMobile(props.options?.callControls)\n : props.options?.callControls;\n\n callControlOptions = disableCallControls(callControlOptions, ['screenShareButton', 'participantsButton']);\n\n return (\n <CallArrangement\n complianceBannerProps={{ strings }}\n errorBarProps={props.options?.errorBar !== false && errorBarProps}\n /* @conditional-compile-remove(notifications) */\n showErrorNotifications={props.options?.errorBar ?? true}\n callControlProps={{\n options: callControlOptions,\n increaseFlyoutItemSize: props.mobileView\n }}\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() => (\n <LobbyTile\n {...lobbyProps}\n showLocalVideoCameraCycleButton={props.mobileView}\n overlayProps={overlayProps(strings, inLobby, Object.values(participants))}\n />\n )}\n dataUiId={'lobby-page'}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n />\n );\n};\n\nconst overlayProps = (\n strings: CallCompositeStrings,\n inLobby: boolean,\n remoteParticipants: RemoteParticipantState[]\n): LobbyOverlayProps => {\n /**\n * Only grab the first participant because there will only be one in this situation.\n * when starting a call with multiple people the call goes to the connected state and composite goes directly to\n * videoGallery.\n *\n * We also need to check the participant state since in a group call the remote participants array will populate just before\n * the user joins. In this situation we also check the participant states. in a groupCall the state of the participants\n * will be 'Idle'.\n */\n const outboundCallParticipant: RemoteParticipantState | undefined =\n remoteParticipants[0] &&\n ['Ringing', 'Connecting'].includes(remoteParticipants[0].state) &&\n remoteParticipants.length === 1\n ? remoteParticipants[0]\n : undefined;\n\n return inLobby\n ? overlayPropsWaitingToBeAdmitted(strings)\n : outboundCallParticipant\n ? overlayPropsOutboundCall(strings, outboundCallParticipant)\n : overlayPropsConnectingToCall(strings);\n};\n\nconst overlayPropsConnectingToCall = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenConnectingToCallTitle,\n moreDetails: strings.lobbyScreenConnectingToCallMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenConnectingToCall\" />\n});\n\nconst overlayPropsWaitingToBeAdmitted = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenWaitingToBeAdmittedTitle,\n moreDetails: strings.lobbyScreenWaitingToBeAdmittedMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenWaitingToBeAdmitted\" />\n});\n\nconst overlayPropsOutboundCall = (\n strings: CallCompositeStrings,\n participant: RemoteParticipantState\n): LobbyOverlayProps => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n title: (participant.identifier as PhoneNumberIdentifier).phoneNumber,\n moreDetails: strings.outboundCallingNoticeString\n };\n } else {\n return {\n title: strings.outboundCallingNoticeString ?? ''\n };\n }\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions
|
1
|
+
{"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions = CommonCallControlOptions & {\n /**\n * Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n legacyControlBarExperience?: boolean;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAuC,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAClH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,sDAA6C;AAGvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AActE,MAAM,oCAAoC,GAAG,IAAI,CAAC;AAClD,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;AAC3E,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,6CAA6C;AAC7C,MAAM,0BAA0B,GAAG,IAAI,CAAC;AACxC,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C,eAAe;AACf,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AACjD,eAAe;AACf,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AACpD,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAA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Ac,CAAC;YACvE,CAAC;YAED,wBAAwB,GAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,kBAAkB,CAAC;QAC5D,CAAC;QACD,uCACK,KAAK,KACR,IAAI,EAAE,KAAK,CAAC,IAAI;gBACd,CAAC,iCACM,KAAK,CAAC,IAAI,KACb,kBAAkB,EAAE,oBAAoB,IAE5C,CAAC,CAAC,SAAS,IACb;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,cAAiD,EACjD,gCAAkE,EAChC,EAAE,CACpC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,UAAU,MAAK,MAAM;IACnC,CAAC,CAAC,gCAAgC,CAAC,0BAA0B,EAAE;IAC/D,CAAC,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,UAAU,MAAK,aAAa;QAC9C,CAAC,CAAC,gCAAgC,CAAC,iCAAiC,CAAC;YACjE,kBAAkB,EAAE,cAAc,CAAC,kBAAkB;SACtD,CAAC;QACJ,CAAC,CAAC,SAAS,CAAC;AAEhB;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAuB,EAA+B,EAAE,CACxG,KAAK,CAAC,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,sBAAkE,EACjB,EAAE;IACnD,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACjD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES, StartCallIdentifier } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { AdapterStateModifier, CallAdapterLocator } from '../adapter/AzureCommunicationCallAdapter';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\n\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { VideoDeviceInfo } from '@azure/communication-calling';\n\nimport { VideoEffectProcessor } from '@azure/communication-calling';\nimport { CompositeLocale } from '../../localization';\nimport { CallCompositeIcons } from '../../common/icons';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\nconst CALL_REJECTED_CODE = 603;\n/* @conditional-compile-remove(meeting-id) */\nconst INVALID_MEETING_IDENTIFIER = 5751;\n/** @private */\nexport const ROOM_NOT_FOUND_SUB_CODE = 5732;\n/** @private */\nexport const ROOM_NOT_VALID_SUB_CODE = 5829;\n/** @private */\nexport const NOT_INVITED_TO_ROOM_SUB_CODE = 5828;\n/** @private */\nexport const INVITE_TO_ROOM_REMOVED_SUB_CODE = 5317;\n/** @private */\nexport const CALL_TIMEOUT_SUB_CODE = 10004;\n/** @private */\nexport const CALL_TIMEOUT_CODE = 487;\n/** @private */\nexport const BOT_TIMEOUT_CODE = 486;\n/** @private */\nexport const BOT_TIMEOUT_SUB_CODE = 10321;\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL,\n BAD_REQUEST\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n // If the call end reason code is 400, the call is ended due to a bad request. Keep this line at the bottom right before returning normal left call to catch the scenarios not including the ones above.\n if (call.callEndReason?.code === 400) {\n return CallEndReasons.BAD_REQUEST;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * Helper function for determine strings and icons for end call page\n * @private\n */\nexport const getEndedCallPageProps = (\n locale: CompositeLocale,\n endedCall?: CallState\n): { title: string; moreDetails?: string; disableStartCallButton: boolean; iconName: keyof CallCompositeIcons } => {\n let title = locale.strings.call.leftCallTitle;\n let moreDetails = locale.strings.call.leftCallMoreDetails;\n let disableStartCallButton = false;\n let iconName: keyof CallCompositeIcons = 'NoticePageLeftCall';\n switch (endedCall?.callEndReason?.subCode) {\n case ROOM_NOT_FOUND_SUB_CODE:\n if (locale.strings.call.roomNotFoundTitle) {\n title = locale.strings.call.roomNotFoundTitle;\n moreDetails = locale.strings.call.roomNotFoundDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageRoomNotFound';\n }\n break;\n case ROOM_NOT_VALID_SUB_CODE:\n if (locale.strings.call.roomNotValidTitle) {\n title = locale.strings.call.roomNotValidTitle;\n moreDetails = locale.strings.call.roomNotValidDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageRoomNotValid';\n }\n break;\n case NOT_INVITED_TO_ROOM_SUB_CODE:\n if (locale.strings.call.notInvitedToRoomTitle) {\n title = locale.strings.call.notInvitedToRoomTitle;\n moreDetails = locale.strings.call.notInvitedToRoomDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageNotInvitedToRoom';\n }\n break;\n case INVITE_TO_ROOM_REMOVED_SUB_CODE:\n if (locale.strings.call.inviteToRoomRemovedTitle) {\n title = locale.strings.call.inviteToRoomRemovedTitle;\n moreDetails = locale.strings.call.inviteToRoomRemovedDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageInviteToRoomRemoved';\n }\n break;\n case CALL_TIMEOUT_SUB_CODE:\n if (endedCall?.callEndReason?.code === CALL_TIMEOUT_CODE && locale.strings.call.callTimeoutTitle) {\n title = locale.strings.call.callTimeoutTitle;\n moreDetails = locale.strings.call.callTimeoutDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallTimeout';\n }\n break;\n case BOT_TIMEOUT_SUB_CODE:\n if (endedCall?.callEndReason?.code === BOT_TIMEOUT_CODE && locale.strings.call.callTimeoutBotTitle) {\n title = locale.strings.call.callTimeoutBotTitle;\n moreDetails = locale.strings.call.callTimeoutBotDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallTimeout';\n }\n break;\n }\n\n switch (endedCall?.callEndReason?.code) {\n case CALL_REJECTED_CODE:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n moreDetails = locale.strings.call.callRejectedMoreDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallRejected';\n }\n break;\n }\n /* @conditional-compile-remove(teams-adhoc-call) */\n switch (endedCall?.callEndReason?.subCode) {\n case 10037:\n if (locale.strings.call.participantCouldNotBeReachedTitle) {\n title = locale.strings.call.participantCouldNotBeReachedTitle;\n moreDetails = locale.strings.call.participantCouldNotBeReachedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10124:\n if (locale.strings.call.permissionToReachTargetParticipantNotAllowedTitle) {\n title = locale.strings.call.permissionToReachTargetParticipantNotAllowedTitle;\n moreDetails = locale.strings.call.permissionToReachTargetParticipantNotAllowedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10119:\n if (locale.strings.call.unableToResolveTenantTitle) {\n title = locale.strings.call.unableToResolveTenantTitle;\n moreDetails = locale.strings.call.unableToResolveTenantMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10044:\n if (locale.strings.call.participantIdIsMalformedTitle) {\n title = locale.strings.call.participantIdIsMalformedTitle;\n moreDetails = locale.strings.call.participantIdIsMalformedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n }\n /* @conditional-compile-remove(meeting-id) */\n switch (endedCall?.callEndReason?.subCode) {\n case INVALID_MEETING_IDENTIFIER:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n moreDetails = locale.strings.call.invalidMeetingIdentifier;\n disableStartCallButton = true;\n }\n break;\n }\n // keep this at the bottom to catch the scenarios not including the ones above.\n switch (endedCall?.callEndReason?.code) {\n case 400:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n disableStartCallButton = true;\n }\n break;\n }\n return { title, moreDetails, disableStartCallButton, iconName };\n};\n\n/**\n * type definition for conditional-compilation\n */\ntype GetCallCompositePageFunction = ((\n call: CallState | undefined,\n previousCall: CallState | undefined\n) => CallCompositePage) &\n ((\n call: CallState | undefined,\n previousCall: CallState | undefined,\n transferCall?: CallState,\n /* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserInfo?: {\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n ) => CallCompositePage);\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage: GetCallCompositePageFunction = (\n call,\n previousCall?,\n transferCall?: CallState,\n unsupportedBrowserInfo?: {\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n): CallCompositePage => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (\n isUnsupportedEnvironment(\n unsupportedBrowserInfo?.environmentInfo,\n unsupportedBrowserInfo?.unsupportedBrowserVersionOptedIn\n )\n ) {\n return 'unsupportedEnvironment';\n }\n\n if (transferCall !== undefined) {\n return 'transferring';\n }\n\n if (call) {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (call?.state === 'Disconnecting') {\n return 'leaving';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.BAD_REQUEST:\n return 'badRequest';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page: CallCompositePage\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions: CallControlOptions | boolean | undefined =\n (callControlOptions instanceof Object ? ({ ...callControlOptions } as CallControlOptions) : callControlOptions) ??\n ({} as Partial<CallControlOptions>);\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error TODO: fix noImplicitAny error here\n // Not solveable at this time due to typescript limitations. The typing is too complex for typescript to\n // understand. Will need to revisit when either typescript or the calling component bindings are updated.\n acc[key] = { disabled: true };\n return acc;\n }, {} as Partial<CallControlOptions>);\n } else {\n disabledControls.forEach((key) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error refer to above comment\n if (newOptions[key] !== false) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error refer to above comment\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n * A button is only disabled if is explicitly set to disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option: boolean | { disabled: boolean } | undefined): boolean => {\n if (option === undefined || typeof option === 'boolean') {\n return false;\n }\n\n return option.disabled;\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the camera.\n */\nconst queryCameraPermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'camera' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the microphone.\n */\nconst queryMicrophonePermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'microphone' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n *\n * This function uses permission API to determine if device permission state is granted, prompt or denied\n * @returns whether device permission state is granted, prompt or denied\n * If permission API is not supported on this browser, permission state is set to unsupported.\n * @private\n */\nexport const getDevicePermissionState = async (\n setVideoState: (state: PermissionState | 'unsupported') => void,\n setAudioState: (state: PermissionState | 'unsupported') => void\n): Promise<void> => {\n const [cameraResult, microphoneResult] = await Promise.all([\n queryCameraPermissionFromPermissionsAPI(),\n queryMicrophonePermissionFromPermissionsAPI()\n ]);\n setVideoState(cameraResult);\n setAudioState(microphoneResult);\n};\n/* @conditional-compile-remove(unsupported-browser) */\nconst isUnsupportedEnvironment = (\n environmentInfo?: EnvironmentInfo,\n unsupportedBrowserVersionOptedIn?: boolean\n): boolean => {\n return !!(\n environmentInfo?.isSupportedBrowser === false ||\n (environmentInfo?.isSupportedBrowserVersion === false && !unsupportedBrowserVersionOptedIn) ||\n environmentInfo?.isSupportedPlatform === false\n );\n};\n\n/**\n * Check if we are using safari browser\n * @private\n */\nexport const _isSafari = (\n environmentInfo: undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo\n): boolean => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo?.environment.browser === 'safari';\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n};\n\n/**\n * @private\n * This is the util function to create a participant modifier for remote participantList\n * It memoize previous original participant items and only update the changed participant\n * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified\n */\nexport const createParticipantModifier = (\n createModifiedParticipant: (id: string, participant: RemoteParticipantState) => RemoteParticipantState | undefined\n): AdapterStateModifier => {\n let previousParticipantState:\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined = undefined;\n let modifiedParticipants: {\n [keys: string]: RemoteParticipantState;\n } = {};\n const memoizedParticipants: {\n [id: string]: { originalRef: RemoteParticipantState; newParticipant: RemoteParticipantState };\n } = {};\n\n return (state: CallAdapterState) => {\n // if root state is the same, we don't need to update the participants\n if (state.call?.remoteParticipants !== previousParticipantState) {\n modifiedParticipants = {};\n const originalParticipants = state.call?.remoteParticipants;\n for (const key in originalParticipants) {\n const modifiedParticipant = createModifiedParticipant(key, originalParticipants[key]);\n if (modifiedParticipant === undefined) {\n modifiedParticipants[key] = originalParticipants[key];\n continue;\n }\n // Generate the new item if original cached item has been changed\n if (memoizedParticipants[key]?.originalRef !== originalParticipants[key]) {\n memoizedParticipants[key] = {\n newParticipant: modifiedParticipant,\n originalRef: originalParticipants[key]\n };\n }\n\n // the modified participant is always coming from the memoized cache, whether is was refreshed\n // from the previous closure or not\n modifiedParticipants[key] = memoizedParticipants[key].newParticipant;\n }\n\n previousParticipantState = state.call?.remoteParticipants;\n }\n return {\n ...state,\n call: state.call\n ? {\n ...state.call,\n remoteParticipants: modifiedParticipants\n }\n : undefined\n };\n };\n};\n\n/** @private */\nexport const getBackgroundEffectFromSelectedEffect = (\n selectedEffect: VideoBackgroundEffect | undefined,\n VideoBackgroundEffectsDependency: VideoBackgroundEffectsDependency\n): VideoEffectProcessor | undefined =>\n selectedEffect?.effectName === 'blur'\n ? VideoBackgroundEffectsDependency.createBackgroundBlurEffect()\n : selectedEffect?.effectName === 'replacement'\n ? VideoBackgroundEffectsDependency.createBackgroundReplacementEffect({\n backgroundImageUrl: selectedEffect.backgroundImageUrl\n })\n : undefined;\n\n/**\n * @remarks this logic should mimic the onToggleCamera in the common call handlers.\n * @private\n */\nexport const getSelectedCameraFromAdapterState = (state: CallAdapterState): VideoDeviceInfo | undefined =>\n state.devices.selectedCamera || state.devices.cameras[0];\n\n/**\n * Helper to determine if the adapter has a locator or targetCallees\n * @param locatorOrTargetCallees\n * @returns boolean to determine if the adapter has a locator or targetCallees, true is locator, false is targetCallees\n * @private\n */\nexport const getLocatorOrTargetCallees = (\n locatorOrTargetCallees: CallAdapterLocator | StartCallIdentifier[]\n): locatorOrTargetCallees is StartCallIdentifier[] => {\n return !!Array.isArray(locatorOrTargetCallees);\n};\n"]}
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAuC,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAClH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,sDAA6C;AAGvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AActE,MAAM,oCAAoC,GAAG,IAAI,CAAC;AAClD,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;AAC3E,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,6CAA6C;AAC7C,MAAM,0BAA0B,GAAG,IAAI,CAAC;AACxC,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C,eAAe;AACf,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AACjD,eAAe;AACf,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AACpD,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAC3C,eAAe;AACf,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,eAAe;AACf,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACpC,eAAe;AACf,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,K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,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,cAAiD,EACjD,gCAAkE,EAChC,EAAE,CACpC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,UAAU,MAAK,MAAM;IACnC,CAAC,CAAC,gCAAgC,CAAC,0BAA0B,EAAE;IAC/D,CAAC,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,UAAU,MAAK,aAAa;QAC5C,CAAC,CAAC,gCAAgC,CAAC,iCAAiC,CAAC;YACjE,kBAAkB,EAAE,cAAc,CAAC,kBAAkB;SACtD,CAAC;QACJ,CAAC,CAAC,SAAS,CAAC;AAElB;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAuB,EAA+B,EAAE,CACxG,KAAK,CAAC,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,sBAAkE,EACjB,EAAE;IACnD,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACjD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES, StartCallIdentifier } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { AdapterStateModifier, CallAdapterLocator } from '../adapter/AzureCommunicationCallAdapter';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\n\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { VideoDeviceInfo } from '@azure/communication-calling';\n\nimport { VideoEffectProcessor } from '@azure/communication-calling';\nimport { CompositeLocale } from '../../localization';\nimport { CallCompositeIcons } from '../../common/icons';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\nconst CALL_REJECTED_CODE = 603;\n/* @conditional-compile-remove(meeting-id) */\nconst INVALID_MEETING_IDENTIFIER = 5751;\n/** @private */\nexport const ROOM_NOT_FOUND_SUB_CODE = 5732;\n/** @private */\nexport const ROOM_NOT_VALID_SUB_CODE = 5829;\n/** @private */\nexport const NOT_INVITED_TO_ROOM_SUB_CODE = 5828;\n/** @private */\nexport const INVITE_TO_ROOM_REMOVED_SUB_CODE = 5317;\n/** @private */\nexport const CALL_TIMEOUT_SUB_CODE = 10004;\n/** @private */\nexport const CALL_TIMEOUT_CODE = 487;\n/** @private */\nexport const BOT_TIMEOUT_CODE = 486;\n/** @private */\nexport const BOT_TIMEOUT_SUB_CODE = 10321;\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL,\n BAD_REQUEST\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n // If the call end reason code is 400, the call is ended due to a bad request. Keep this line at the bottom right before returning normal left call to catch the scenarios not including the ones above.\n if (call.callEndReason?.code === 400) {\n return CallEndReasons.BAD_REQUEST;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * Helper function for determine strings and icons for end call page\n * @private\n */\nexport const getEndedCallPageProps = (\n locale: CompositeLocale,\n endedCall?: CallState\n): { title: string; moreDetails?: string; disableStartCallButton: boolean; iconName: keyof CallCompositeIcons } => {\n let title = locale.strings.call.leftCallTitle;\n let moreDetails = locale.strings.call.leftCallMoreDetails;\n let disableStartCallButton = false;\n let iconName: keyof CallCompositeIcons = 'NoticePageLeftCall';\n switch (endedCall?.callEndReason?.subCode) {\n case ROOM_NOT_FOUND_SUB_CODE:\n if (locale.strings.call.roomNotFoundTitle) {\n title = locale.strings.call.roomNotFoundTitle;\n moreDetails = locale.strings.call.roomNotFoundDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageRoomNotFound';\n }\n break;\n case ROOM_NOT_VALID_SUB_CODE:\n if (locale.strings.call.roomNotValidTitle) {\n title = locale.strings.call.roomNotValidTitle;\n moreDetails = locale.strings.call.roomNotValidDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageRoomNotValid';\n }\n break;\n case NOT_INVITED_TO_ROOM_SUB_CODE:\n if (locale.strings.call.notInvitedToRoomTitle) {\n title = locale.strings.call.notInvitedToRoomTitle;\n moreDetails = locale.strings.call.notInvitedToRoomDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageNotInvitedToRoom';\n }\n break;\n case INVITE_TO_ROOM_REMOVED_SUB_CODE:\n if (locale.strings.call.inviteToRoomRemovedTitle) {\n title = locale.strings.call.inviteToRoomRemovedTitle;\n moreDetails = locale.strings.call.inviteToRoomRemovedDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageInviteToRoomRemoved';\n }\n break;\n case CALL_TIMEOUT_SUB_CODE:\n if (endedCall?.callEndReason?.code === CALL_TIMEOUT_CODE && locale.strings.call.callTimeoutTitle) {\n title = locale.strings.call.callTimeoutTitle;\n moreDetails = locale.strings.call.callTimeoutDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallTimeout';\n }\n break;\n case BOT_TIMEOUT_SUB_CODE:\n if (endedCall?.callEndReason?.code === BOT_TIMEOUT_CODE && locale.strings.call.callTimeoutBotTitle) {\n title = locale.strings.call.callTimeoutBotTitle;\n moreDetails = locale.strings.call.callTimeoutBotDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallTimeout';\n }\n break;\n }\n\n switch (endedCall?.callEndReason?.code) {\n case CALL_REJECTED_CODE:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n moreDetails = locale.strings.call.callRejectedMoreDetails;\n disableStartCallButton = true;\n iconName = 'NoticePageCallRejected';\n }\n break;\n }\n /* @conditional-compile-remove(teams-adhoc-call) */\n switch (endedCall?.callEndReason?.subCode) {\n case 10037:\n if (locale.strings.call.participantCouldNotBeReachedTitle) {\n title = locale.strings.call.participantCouldNotBeReachedTitle;\n moreDetails = locale.strings.call.participantCouldNotBeReachedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10124:\n if (locale.strings.call.permissionToReachTargetParticipantNotAllowedTitle) {\n title = locale.strings.call.permissionToReachTargetParticipantNotAllowedTitle;\n moreDetails = locale.strings.call.permissionToReachTargetParticipantNotAllowedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10119:\n if (locale.strings.call.unableToResolveTenantTitle) {\n title = locale.strings.call.unableToResolveTenantTitle;\n moreDetails = locale.strings.call.unableToResolveTenantMoreDetails;\n disableStartCallButton = true;\n }\n break;\n case 10044:\n if (locale.strings.call.participantIdIsMalformedTitle) {\n title = locale.strings.call.participantIdIsMalformedTitle;\n moreDetails = locale.strings.call.participantIdIsMalformedMoreDetails;\n disableStartCallButton = true;\n }\n break;\n }\n /* @conditional-compile-remove(meeting-id) */\n switch (endedCall?.callEndReason?.subCode) {\n case INVALID_MEETING_IDENTIFIER:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n moreDetails = locale.strings.call.invalidMeetingIdentifier;\n disableStartCallButton = true;\n }\n break;\n }\n // keep this at the bottom to catch the scenarios not including the ones above.\n switch (endedCall?.callEndReason?.code) {\n case 400:\n if (locale.strings.call.callRejectedTitle) {\n title = locale.strings.call.callRejectedTitle;\n disableStartCallButton = true;\n }\n break;\n }\n return { title, moreDetails, disableStartCallButton, iconName };\n};\n\n/**\n * type definition for conditional-compilation\n */\ntype GetCallCompositePageFunction = ((\n call: CallState | undefined,\n previousCall: CallState | undefined\n) => CallCompositePage) &\n ((\n call: CallState | undefined,\n previousCall: CallState | undefined,\n transferCall?: CallState,\n /* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserInfo?: {\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n ) => CallCompositePage);\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage: GetCallCompositePageFunction = (\n call,\n previousCall?,\n transferCall?: CallState,\n unsupportedBrowserInfo?: {\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n): CallCompositePage => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (\n isUnsupportedEnvironment(\n unsupportedBrowserInfo?.environmentInfo,\n unsupportedBrowserInfo?.unsupportedBrowserVersionOptedIn\n )\n ) {\n return 'unsupportedEnvironment';\n }\n\n if (transferCall !== undefined) {\n return 'transferring';\n }\n\n if (call) {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (call?.state === 'Disconnecting') {\n return 'leaving';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.BAD_REQUEST:\n return 'badRequest';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page: CallCompositePage\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions: CallControlOptions | boolean | undefined =\n (callControlOptions instanceof Object ? ({ ...callControlOptions } as CallControlOptions) : callControlOptions) ??\n ({} as Partial<CallControlOptions>);\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error TODO: fix noImplicitAny error here\n // Not solveable at this time due to typescript limitations. The typing is too complex for typescript to\n // understand. Will need to revisit when either typescript or the calling component bindings are updated.\n acc[key] = { disabled: true };\n return acc;\n }, {} as Partial<CallControlOptions>);\n } else {\n disabledControls.forEach((key) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error refer to above comment\n if (newOptions[key] !== false) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // @ts-expect-error refer to above comment\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n * A button is only disabled if is explicitly set to disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option: boolean | { disabled: boolean } | undefined): boolean => {\n if (option === undefined || typeof option === 'boolean') {\n return false;\n }\n\n return option.disabled;\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the camera.\n */\nconst queryCameraPermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'camera' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the microphone.\n */\nconst queryMicrophonePermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'microphone' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n *\n * This function uses permission API to determine if device permission state is granted, prompt or denied\n * @returns whether device permission state is granted, prompt or denied\n * If permission API is not supported on this browser, permission state is set to unsupported.\n * @private\n */\nexport const getDevicePermissionState = async (\n setVideoState: (state: PermissionState | 'unsupported') => void,\n setAudioState: (state: PermissionState | 'unsupported') => void\n): Promise<void> => {\n const [cameraResult, microphoneResult] = await Promise.all([\n queryCameraPermissionFromPermissionsAPI(),\n queryMicrophonePermissionFromPermissionsAPI()\n ]);\n setVideoState(cameraResult);\n setAudioState(microphoneResult);\n};\n/* @conditional-compile-remove(unsupported-browser) */\nconst isUnsupportedEnvironment = (\n environmentInfo?: EnvironmentInfo,\n unsupportedBrowserVersionOptedIn?: boolean\n): boolean => {\n return !!(\n environmentInfo?.isSupportedBrowser === false ||\n (environmentInfo?.isSupportedBrowserVersion === false && !unsupportedBrowserVersionOptedIn) ||\n environmentInfo?.isSupportedPlatform === false\n );\n};\n\n/**\n * Check if we are using safari browser\n * @private\n */\nexport const _isSafari = (\n environmentInfo: undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo\n): boolean => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo?.environment.browser === 'safari';\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n};\n\n/**\n * @private\n * This is the util function to create a participant modifier for remote participantList\n * It memoize previous original participant items and only update the changed participant\n * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified\n */\nexport const createParticipantModifier = (\n createModifiedParticipant: (id: string, participant: RemoteParticipantState) => RemoteParticipantState | undefined\n): AdapterStateModifier => {\n let previousParticipantState:\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined = undefined;\n let modifiedParticipants: {\n [keys: string]: RemoteParticipantState;\n } = {};\n const memoizedParticipants: {\n [id: string]: { originalRef: RemoteParticipantState; newParticipant: RemoteParticipantState };\n } = {};\n\n return (state: CallAdapterState) => {\n // if root state is the same, we don't need to update the participants\n if (state.call?.remoteParticipants !== previousParticipantState) {\n modifiedParticipants = {};\n const originalParticipants = state.call?.remoteParticipants;\n for (const key in originalParticipants) {\n const modifiedParticipant = createModifiedParticipant(key, originalParticipants[key]);\n if (modifiedParticipant === undefined) {\n modifiedParticipants[key] = originalParticipants[key];\n continue;\n }\n // Generate the new item if original cached item has been changed\n if (memoizedParticipants[key]?.originalRef !== originalParticipants[key]) {\n memoizedParticipants[key] = {\n newParticipant: modifiedParticipant,\n originalRef: originalParticipants[key]\n };\n }\n\n // the modified participant is always coming from the memoized cache, whether is was refreshed\n // from the previous closure or not\n modifiedParticipants[key] = memoizedParticipants[key].newParticipant;\n }\n\n previousParticipantState = state.call?.remoteParticipants;\n }\n return {\n ...state,\n call: state.call\n ? {\n ...state.call,\n remoteParticipants: modifiedParticipants\n }\n : undefined\n };\n };\n};\n\n/** @private */\nexport const getBackgroundEffectFromSelectedEffect = (\n selectedEffect: VideoBackgroundEffect | undefined,\n VideoBackgroundEffectsDependency: VideoBackgroundEffectsDependency\n): VideoEffectProcessor | undefined =>\n selectedEffect?.effectName === 'blur'\n ? VideoBackgroundEffectsDependency.createBackgroundBlurEffect()\n : selectedEffect?.effectName === 'replacement'\n ? VideoBackgroundEffectsDependency.createBackgroundReplacementEffect({\n backgroundImageUrl: selectedEffect.backgroundImageUrl\n })\n : undefined;\n\n/**\n * @remarks this logic should mimic the onToggleCamera in the common call handlers.\n * @private\n */\nexport const getSelectedCameraFromAdapterState = (state: CallAdapterState): VideoDeviceInfo | undefined =>\n state.devices.selectedCamera || state.devices.cameras[0];\n\n/**\n * Helper to determine if the adapter has a locator or targetCallees\n * @param locatorOrTargetCallees\n * @returns boolean to determine if the adapter has a locator or targetCallees, true is locator, false is targetCallees\n * @private\n */\nexport const getLocatorOrTargetCallees = (\n locatorOrTargetCallees: CallAdapterLocator | StartCallIdentifier[]\n): locatorOrTargetCallees is StartCallIdentifier[] => {\n return !!Array.isArray(locatorOrTargetCallees);\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CaptionsBannerMoreButton.js","sourceRoot":"","sources":["../../../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EAAE,wBAAwB,CAAC,qBAAqB;SAC/D,CAAC,CAAC;IACL,CAAC,CAAA,EAAE,CAAC,2BAA2B,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAElF,6BAA6B,CAAC,IAAI,CAAC;QACjC,GAAG,EAAE,mBAAmB;QACxB,IAAI,EAAE,wBAAwB,CAAC,OAAO;YACpC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC;YAChE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC;QACnE,OAAO,EAAE,GAAG,EAAE;YACZ,wBAAwB,CAAC,OAAO;gBAC9B,CAAC,CAAC,2BAA2B,CAAC,cAAc,EAAE;gBAC9C,CAAC,CAAC,wBAAwB,CAAC,qBAAqB,KAAK,EAAE;
|
1
|
+
{"version":3,"file":"CaptionsBannerMoreButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CaptionsBannerMoreButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,yCAAmC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,mDAA6C;AACpF,OAAO,EAAE,sBAAsB,EAAE,sCAAgC;AAOjE;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB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QAAQ,EAAE,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,cAAc;YAC/E,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;SACpC;QACD,SAAS,EAAE;YACT,MAAM,EAAE,+BAA+B;SACxC;KACF,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,uBAAuB,EAAE,CAAC;QAClC,6BAA6B,CAAC,IAAI,CAAC;YACjC,GAAG,EAAE,yBAAyB;YAC9B,EAAE,EAAE,gDAAgD;YACpD,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB;YACtD,OAAO,EAAE,KAAK,CAAC,uBAAuB;YACtC,SAAS,EAAE;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;aACpC;YACD,SAAS,EAAE;gBACT,MAAM,EAAE,+BAA+B;aACxC;YACD,QAAQ,EAAE,CAAC,wBAAwB,CAAC,OAAO;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CACL,oBAAC,UAAU,oBACL,KAAK,kBACE,6BAA6B,EACxC,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/B,SAAS,EAAE;YACT,KAAK,EAAE,6BAA6B;YACpC,YAAY,EAAE;gBACZ,qBAAqB,EAAE,sBAAsB;aAC9C;SACF,IACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ControlBarButtonProps } from '@internal/react-components';\nimport { useCallback } from 'react';\nimport { IContextualMenuItem } from '@fluentui/react';\nimport { _StartCaptionsButton } from '@internal/react-components';\nimport { useMemo } from 'react';\nimport { useAdaptedSelector } from '../CallComposite/hooks/useAdaptedSelector';\nimport { useHandlers } from '../CallComposite/hooks/useHandlers';\nimport { buttonFlyoutIncreasedSizeStyles } from '../CallComposite/styles/Buttons.styles';\nimport { useLocale } from '../localization';\nimport { MoreButton } from './MoreButton';\nimport { _startCaptionsButtonSelector } from '@internal/calling-component-bindings';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/** @private */\nexport interface CaptionsBannerMoreButtonProps extends ControlBarButtonProps {\n onCaptionsSettingsClick?: () => void;\n}\n\n/**\n *\n * @private\n */\nexport const CaptionsBannerMoreButton = (props: CaptionsBannerMoreButtonProps): JSX.Element => {\n const localeStrings = useLocale();\n const startCaptionsButtonProps = useAdaptedSelector(_startCaptionsButtonSelector);\n const startCaptionsButtonHandlers = useHandlers(_StartCaptionsButton);\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.captionsBannerMoreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.call.captionsBannerMoreButtonTooltip\n }),\n [localeStrings]\n );\n\n const moreButtonContextualMenuItems: IContextualMenuItem[] = [];\n\n const startCaptions = useCallback(async () => {\n await startCaptionsButtonHandlers.onStartCaptions({\n spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage\n });\n }, [startCaptionsButtonHandlers, startCaptionsButtonProps.currentSpokenLanguage]);\n\n moreButtonContextualMenuItems.push({\n key: 'ToggleCaptionsKey',\n text: startCaptionsButtonProps.checked\n ? localeStrings.strings.call.startCaptionsButtonTooltipOnContent\n : localeStrings.strings.call.startCaptionsButtonTooltipOffContent,\n onClick: () => {\n startCaptionsButtonProps.checked\n ? startCaptionsButtonHandlers.onStopCaptions()\n : startCaptionsButtonProps.currentSpokenLanguage !== ''\n ? startCaptions()\n : props.onCaptionsSettingsClick && props.onCaptionsSettingsClick();\n },\n iconProps: {\n iconName: startCaptionsButtonProps.checked ? 'CaptionsOffIcon' : 'CaptionsIcon',\n styles: { root: { lineHeight: 0 } }\n },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n\n if (props.onCaptionsSettingsClick) {\n moreButtonContextualMenuItems.push({\n key: 'openCaptionsSettingsKey',\n id: 'common-call-composite-captions-settings-button',\n text: localeStrings.strings.call.captionsSettingsLabel,\n onClick: props.onCaptionsSettingsClick,\n iconProps: {\n iconName: 'CaptionsSettingsIcon',\n styles: { root: { lineHeight: 0 } }\n },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: !startCaptionsButtonProps.checked\n });\n }\n\n return (\n <MoreButton\n {...props}\n data-ui-id=\"captions-banner-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{\n items: moreButtonContextualMenuItems,\n calloutProps: {\n preventDismissOnEvent: _preventDismissOnEvent\n }\n }}\n />\n );\n};\n"]}
|
@@ -21,7 +21,7 @@ export declare const CUSTOM_BUTTON_OPTIONS: {
|
|
21
21
|
* @public
|
22
22
|
*/
|
23
23
|
export type CustomButtons = {
|
24
|
-
[key in CustomCallControlButtonPlacement]: typeof ControlBarButton[] | undefined;
|
24
|
+
[key in CustomCallControlButtonPlacement]: (typeof ControlBarButton)[] | undefined;
|
25
25
|
};
|
26
26
|
/**
|
27
27
|
* Arguments for {@link CustomCallControlButtonCallback}.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CustomButton.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CustomButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAuB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAA+C,4CAAmC;AAC3G,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kCAAkC,EAAE,CAAC;IACrC,iCAAiC,EAAE,CAAC;IACpC,oCAAoC,EAAE,CAAC;CACxC,CAAC;AAoGF,eAAe;AACf,MAAM,CAAC,MAA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AAI,CAAC,OAAO,EACjB,OAAO,EAAE,IAAI,CAAC,WAAW;QACvB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;;YACL,MAAA,IAAI,CAAC,WAAW,qDAAG,EAAE,CAAC,CAAC;QACzB,CAAC;QACH,CAAC,CAAC,SAAS,EACb,YAAY,EAAE,IAAI,CAAC,YAAY;QAC7B,CAAC,CAAC;YACE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,kCAAkC,CAAC;SACjE;QACH,CAAC,CAAC,SAAS,IACb,CAAC;AA+BH,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAAkC,EACa,EAAE;IACjD,IAAI,QAAQ,GAAkD,SAAS,CAAC;IACxE,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon, IContextualMenuItem, mergeStyleSets } from '@fluentui/react';\nimport { ControlBarButton, ControlBarButtonProps, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport { CallControlDisplayType } from '../types/CommonCallControlOptions';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n\n/**\n * Max number of Custom Buttons in primary and secondary ControlBar\n * Does not include existing buttons in the controlBar.\n *\n * @private\n */\nexport const CUSTOM_BUTTON_OPTIONS = {\n MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,\n MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,\n MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2\n};\n\n/**\n * Custom Buttons array as ControlBarButtons.\n * Return type for {@link generateCustomCallControlBarButton}\n *\n * @public\n */\nexport type CustomButtons = {\n [key in CustomCallControlButtonPlacement]: typeof ControlBarButton[] | undefined;\n};\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @public\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 * Response from {@link CustomCallControlButtonCallback}.\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @public\n */\nexport interface CustomCallControlButtonProps {\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 * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n *\n * @defaultValue true\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n * If no value is set, showLabel will follow composite rules\n */\n showLabel?: boolean;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n /**\n * Optional strings to override in component\n */\n strings?: CustomCallControlButtonStrings;\n}\n\n/**\n * Strings for CustomCallControlButtons\n *\n * @public\n */\nexport interface CustomCallControlButtonStrings {\n /**\n * Optional label for the button\n */\n label?: string;\n /**\n * Text that is shown in Tooltip content\n */\n tooltipContent?: string;\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\n/**\n * onRenderButton is a custom prop that can be passed to override the default rendering of the button\n * This is useful for custom buttons that need to render more than just an icon and label and is used\n * for CallWithChat button notification badge.\n *\n * @private\n */\nexport type _InternalCustomButtonType = (props: ControlBarButtonProps) => JSX.Element;\n\n/** @private */\nexport const generateCustomCallControlBarButton = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const allButtonProps = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n\n return {\n primary: generateCustomControlBarButtons('primary', allButtonProps),\n secondary: generateCustomControlBarButtons('secondary', allButtonProps),\n overflow: generateCustomControlBarButtons('overflow', allButtonProps)\n };\n};\n\n/** @private */\nconst generateCustomControlBarButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): typeof ControlBarButton[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map((buttonProps, i) => (internalProps) => {\n // onRenderButton is a custom prop that can be passed to override the default rendering of the button\n // This is useful for custom buttons that need to render more than just an icon and label and is used\n // for CallWithChat button notification badge. However, onRenderButton is not a public prop and is\n // not documented in the API. This is a temporary solution and will need to be revisited.\n if ('onRenderButton' in buttonProps) {\n return (buttonProps['onRenderButton'] as _InternalCustomButtonType)(internalProps);\n }\n return (\n <ControlBarButton\n ariaDescription={buttonProps.strings?.ariaDescription ?? internalProps.ariaDescription}\n ariaLabel={\n buttonProps.strings?.ariaLabel ?? buttonProps.strings?.tooltipContent ?? internalProps.ariaLabel\n }\n disabled={buttonProps.disabled ?? internalProps.disabled}\n id={buttonProps.id ?? internalProps.id}\n key={`${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick ?? internalProps.onClick}\n onRenderIcon={() => (\n <Icon iconName={buttonProps.iconName ?? internalProps.iconProps?.iconName ?? 'DefaultCustomButton'} />\n )}\n showLabel={buttonProps.showLabel ?? internalProps.showLabel}\n styles={mergeStyleSets(internalProps.styles)}\n strings={buttonProps.strings}\n />\n );\n })\n : [];\n\n/** @private */\nconst generateCustomDrawerButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): _DrawerMenuItemProps[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map(\n (buttonProps, i): _DrawerMenuItemProps => ({\n ...buttonProps,\n disabled: buttonProps.disabled,\n iconProps: { iconName: buttonProps.iconName ?? 'DefaultCustomButton', styles: { root: { lineHeight: 0 } } },\n id: buttonProps.id,\n itemKey: `${buttonProps.placement}_${i}`,\n onItemClick: buttonProps.onItemClick,\n text: buttonProps.strings?.label\n })\n )\n : [];\n\n/** @private */\nexport type CustomDrawerButtons = {\n [key in CustomCallControlButtonPlacement]: _DrawerMenuItemProps[];\n};\n\n/** @private */\nexport const generateCustomCallDrawerButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDrawerButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons),\n secondary: generateCustomDrawerButtons('secondary', customButtons),\n overflow: generateCustomDrawerButtons('overflow', customButtons)\n };\n};\n\n/** @private */\nexport type CustomDesktopOverflowButtons = {\n [key in CustomCallControlButtonPlacement]: IContextualMenuItem[];\n};\n\n/** @private */\nexport const generateCustomCallDesktopOverflowButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDesktopOverflowButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),\n secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),\n overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)\n };\n};\n\n/** @private */\nexport const drawerMenuItemToContextualMenuItem = (item: _DrawerMenuItemProps): IContextualMenuItem => ({\n ...item,\n key: item.itemKey,\n onClick: item.onItemClick\n ? (ev) => {\n item.onItemClick?.(ev);\n }\n : undefined,\n subMenuProps: item.subMenuProps\n ? {\n items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)\n }\n : undefined\n});\n\n/**\n * A callback that returns the props to render a custom {@link ControlBarButton} and {@link DrawerMenuItem}.\n *\n * The response indicates where the custom button should be placed.\n *\n * Performance tip: This callback is only called when either the callback or its arguments change.\n * @public\n */\nexport type CustomCallControlButtonCallback = (\n args: CustomCallControlButtonCallbackArgs\n) => CustomCallControlButtonProps;\n\n/**\n * Placement for a custom button injected in the {@link CommonCallControlBar}.\n *\n * 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).\n * 'overflow': Place the buttons(s) on the end of the overflow Menu.\n * 'secondary': Place the button(s) on the left end of the side control bar (right in rtl mode).\n *\n * Multiple buttons assigned the same placement are appended in order.\n * E.g., if two buttons are placed in 'secondary', they'll both appear on the left end (right end in rtl mode)\n * in the order provided.\n *\n * Only 'primary' placement works when legacy call control is enabled in call composite\n *\n * @public\n */\nexport type CustomCallControlButtonPlacement = 'primary' | 'overflow' | 'secondary';\n\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CommonCallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n"]}
|
1
|
+
{"version":3,"file":"CustomButton.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CustomButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAuB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAA+C,4CAAmC;AAC3G,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kCAAkC,EAAE,CAAC;IACrC,iCAAiC,EAAE,CAAC;IACpC,oCAAoC,EAAE,CAAC;CACxC,CAAC;AAoGF,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,wBAA4D,EAC5D,WAAoC,EACrB,EAAE;IACjB,MAAM,cAAc,GAAG,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,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C;QACH,CAAC,CAAC,SAAS,EACb,YAAY,EAAE,IAAI,CAAC,YAAY;QAC7B,CAAC,CAAC;YACE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,kCAAkC,CAAC;SACjE;QACH,CAAC,CAAC,SAAS,IACb,CAAC;AA+BH,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAAkC,EACa,EAAE;IACjD,IAAI,QAAQ,GAAkD,SAAS,CAAC;IACxE,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon, IContextualMenuItem, mergeStyleSets } from '@fluentui/react';\nimport { ControlBarButton, ControlBarButtonProps, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport { CallControlDisplayType } from '../types/CommonCallControlOptions';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n\n/**\n * Max number of Custom Buttons in primary and secondary ControlBar\n * Does not include existing buttons in the controlBar.\n *\n * @private\n */\nexport const CUSTOM_BUTTON_OPTIONS = {\n MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,\n MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,\n MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2\n};\n\n/**\n * Custom Buttons array as ControlBarButtons.\n * Return type for {@link generateCustomCallControlBarButton}\n *\n * @public\n */\nexport type CustomButtons = {\n [key in CustomCallControlButtonPlacement]: (typeof ControlBarButton)[] | undefined;\n};\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @public\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 * Response from {@link CustomCallControlButtonCallback}.\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @public\n */\nexport interface CustomCallControlButtonProps {\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 * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n *\n * @defaultValue true\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n * If no value is set, showLabel will follow composite rules\n */\n showLabel?: boolean;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n /**\n * Optional strings to override in component\n */\n strings?: CustomCallControlButtonStrings;\n}\n\n/**\n * Strings for CustomCallControlButtons\n *\n * @public\n */\nexport interface CustomCallControlButtonStrings {\n /**\n * Optional label for the button\n */\n label?: string;\n /**\n * Text that is shown in Tooltip content\n */\n tooltipContent?: string;\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\n/**\n * onRenderButton is a custom prop that can be passed to override the default rendering of the button\n * This is useful for custom buttons that need to render more than just an icon and label and is used\n * for CallWithChat button notification badge.\n *\n * @private\n */\nexport type _InternalCustomButtonType = (props: ControlBarButtonProps) => JSX.Element;\n\n/** @private */\nexport const generateCustomCallControlBarButton = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const allButtonProps = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n\n return {\n primary: generateCustomControlBarButtons('primary', allButtonProps),\n secondary: generateCustomControlBarButtons('secondary', allButtonProps),\n overflow: generateCustomControlBarButtons('overflow', allButtonProps)\n };\n};\n\n/** @private */\nconst generateCustomControlBarButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): (typeof ControlBarButton)[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map((buttonProps, i) => (internalProps) => {\n // onRenderButton is a custom prop that can be passed to override the default rendering of the button\n // This is useful for custom buttons that need to render more than just an icon and label and is used\n // for CallWithChat button notification badge. However, onRenderButton is not a public prop and is\n // not documented in the API. This is a temporary solution and will need to be revisited.\n if ('onRenderButton' in buttonProps) {\n return (buttonProps['onRenderButton'] as _InternalCustomButtonType)(internalProps);\n }\n return (\n <ControlBarButton\n ariaDescription={buttonProps.strings?.ariaDescription ?? internalProps.ariaDescription}\n ariaLabel={\n buttonProps.strings?.ariaLabel ?? buttonProps.strings?.tooltipContent ?? internalProps.ariaLabel\n }\n disabled={buttonProps.disabled ?? internalProps.disabled}\n id={buttonProps.id ?? internalProps.id}\n key={`${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick ?? internalProps.onClick}\n onRenderIcon={() => (\n <Icon iconName={buttonProps.iconName ?? internalProps.iconProps?.iconName ?? 'DefaultCustomButton'} />\n )}\n showLabel={buttonProps.showLabel ?? internalProps.showLabel}\n styles={mergeStyleSets(internalProps.styles)}\n strings={buttonProps.strings}\n />\n );\n })\n : [];\n\n/** @private */\nconst generateCustomDrawerButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): _DrawerMenuItemProps[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map(\n (buttonProps, i): _DrawerMenuItemProps => ({\n ...buttonProps,\n disabled: buttonProps.disabled,\n iconProps: { iconName: buttonProps.iconName ?? 'DefaultCustomButton', styles: { root: { lineHeight: 0 } } },\n id: buttonProps.id,\n itemKey: `${buttonProps.placement}_${i}`,\n onItemClick: buttonProps.onItemClick,\n text: buttonProps.strings?.label\n })\n )\n : [];\n\n/** @private */\nexport type CustomDrawerButtons = {\n [key in CustomCallControlButtonPlacement]: _DrawerMenuItemProps[];\n};\n\n/** @private */\nexport const generateCustomCallDrawerButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDrawerButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons),\n secondary: generateCustomDrawerButtons('secondary', customButtons),\n overflow: generateCustomDrawerButtons('overflow', customButtons)\n };\n};\n\n/** @private */\nexport type CustomDesktopOverflowButtons = {\n [key in CustomCallControlButtonPlacement]: IContextualMenuItem[];\n};\n\n/** @private */\nexport const generateCustomCallDesktopOverflowButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDesktopOverflowButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),\n secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),\n overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)\n };\n};\n\n/** @private */\nexport const drawerMenuItemToContextualMenuItem = (item: _DrawerMenuItemProps): IContextualMenuItem => ({\n ...item,\n key: item.itemKey,\n onClick: item.onItemClick\n ? (ev) => {\n item.onItemClick?.(ev);\n }\n : undefined,\n subMenuProps: item.subMenuProps\n ? {\n items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)\n }\n : undefined\n});\n\n/**\n * A callback that returns the props to render a custom {@link ControlBarButton} and {@link DrawerMenuItem}.\n *\n * The response indicates where the custom button should be placed.\n *\n * Performance tip: This callback is only called when either the callback or its arguments change.\n * @public\n */\nexport type CustomCallControlButtonCallback = (\n args: CustomCallControlButtonCallbackArgs\n) => CustomCallControlButtonProps;\n\n/**\n * Placement for a custom button injected in the {@link CommonCallControlBar}.\n *\n * 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).\n * 'overflow': Place the buttons(s) on the end of the overflow Menu.\n * 'secondary': Place the button(s) on the left end of the side control bar (right in rtl mode).\n *\n * Multiple buttons assigned the same placement are appended in order.\n * E.g., if two buttons are placed in 'secondary', they'll both appear on the left end (right end in rtl mode)\n * in the order provided.\n *\n * Only 'primary' placement works when legacy call control is enabled in call composite\n *\n * @public\n */\nexport type CustomCallControlButtonPlacement = 'primary' | 'overflow' | 'secondary';\n\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CommonCallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n"]}
|