@azure/communication-react 1.12.1-alpha-202401260012 → 1.12.1-alpha-202401280013
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 +75 -8
- package/dist/dist-cjs/communication-react/index.js +823 -780
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +33 -10
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +4 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +26 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +32 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +127 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -0
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +2 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.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.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +0 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +0 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +0 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +0 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +0 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +8 -2
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +12 -5
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +6 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/MessageThread.js +0 -28
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +23 -15
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +5 -2
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +20 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +14 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +28 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +2 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +19 -16
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +4 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +0 -12
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +45 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js +4 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/index.js +1 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -1
- 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 +6 -0
- 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.js +3 -34
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -36
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +8 -2
- 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/buttons/Reaction.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +10 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -42
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAgC,4CAAmC;AACrG,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,OAAO,KAAK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AAE,KAAK,CAAC,QAAQ,GAC9B,CACH,CAAC;gBACJ,CAAC,CAAC;gBAEF,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;gBACjM,cAAc,IAAI,CAChB,oBAAC,UAAU,IACT,cAAc,EAAE,KAAK,CAAC,QAAQ,gBACnB,mCAAmC,EAC9C,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/B,SAAS,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EACzC,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,SAAS,GAC7C,CACH;gBAEF,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAW,EAAE;IAC3E,wCAAwC;IACxC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC;IAEtC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, DevicesButton, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { callControlsContainerStyles } from '../styles/CallPage.styles';\nimport { CommonCallAdapter } from '../adapter';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from './buttons/RaiseHand';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { _generateDefaultDeviceMenuProps } from '@internal/react-components';\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n generateCustomCallDesktopOverflowButtons,\n onFetchCustomButtonPropsTrampoline\n} from '../../common/ControlBar/CustomButton';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from './buttons/Reaction';\n/* @conditional-compile-remove(reaction) */\nimport { useSelector } from '../hooks/useSelector';\n/* @conditional-compile-remove(reaction) */\nimport { capabilitySelector } from '../../CallComposite/selectors/capabilitySelector';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n displayVertical?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\nconst inferCallControlOptions = (\n mobileView: boolean,\n callControlOptions?: boolean | CallControlOptions\n): CallControlOptions => {\n if (callControlOptions === false) {\n return {};\n }\n\n const options = callControlOptions === true || callControlOptions === undefined ? {} : callControlOptions;\n if (mobileView) {\n // Set options to always not show screen share button for mobile\n options.screenShareButton = false;\n }\n return options;\n};\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options: CallControlOptions = useMemo(\n () => inferCallControlOptions(!!props.isMobile, props.options),\n [props.isMobile, props.options]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n /* @conditional-compile-remove(reaction) */\n const capabilitiesSelector = useSelector(capabilitySelector);\n /* @conditional-compile-remove(reaction) */\n const isReactionAllowed =\n !capabilitiesSelector?.capabilities || capabilitiesSelector.capabilities.useReactions.isPresent;\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n const devicesButtonProps = usePropsFor(DevicesButton);\n\n let numberOfButtons = 0;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n if (screenShareButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n if (microphoneButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n if (cameraButtonIsEnabled) {\n numberOfButtons++;\n }\n\n if (isEnabled(options?.endCallButton)) {\n numberOfButtons++;\n }\n\n const showParticipantsButtonInControlBar =\n isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile;\n if (showParticipantsButtonInControlBar) {\n numberOfButtons++;\n }\n\n /* @conditional-compile-remove(reaction) */\n const showReactionButtonInControlBar = isEnabled(options?.reactionButton) && isReactionAllowed && !props.isMobile;\n /* @conditional-compile-remove(reaction) */\n if (showReactionButtonInControlBar) {\n numberOfButtons++;\n }\n\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n if (!isRoomsCallTrampoline(adapter)) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n return items;\n };\n\n const customDrawerButtons = useMemo(\n () =>\n generateCustomCallDesktopOverflowButtons(\n onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined),\n typeof options === 'object' ? options.displayType : undefined\n ),\n [options]\n );\n\n const moreButtonMenuItems = moreButtonContextualMenuItems();\n let showMoreButton = isEnabled(options?.moreButton) && moreButtonMenuItems.length > 0;\n if (showMoreButton) {\n numberOfButtons++;\n }\n\n const customButtons = useMemo(\n () => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n numberOfButtons += React.Children.count(customButtons['primary']) + React.Children.count(customButtons['secondary']);\n\n let showDevicesButtonInControlBar = isEnabled(options?.devicesButton);\n if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n showDevicesButtonInControlBar = false;\n\n showMoreButton = isEnabled(options?.moreButton);\n }\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonIsEnabled = isEnabled(options?.raiseHandButton);\n /* @conditional-compile-remove(raise-hand) */\n let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n adapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n /* @conditional-compile-remove(raise-hand) */\n if (showRaiseHandButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n // If more button is not present but enabled then replace previous button (devices button) with more button\n if (!showMoreButton && isEnabled(options?.moreButton)) {\n showMoreButton = true;\n showDevicesButtonInControlBar = false;\n }\n\n showRaiseHandButtonInControlBar = false;\n }\n\n if (!showDevicesButtonInControlBar) {\n const devicesButtonMenu = _generateDefaultDeviceMenuProps(\n devicesButtonProps,\n localeStrings.component.strings.devicesButton\n );\n moreButtonMenuItems.push({\n key: 'devicesButtonKey',\n text: localeStrings.component.strings.devicesButton.label,\n iconProps: { iconName: 'ControlButtonOptions', styles: { root: { lineHeight: 0 } } },\n subMenuProps: devicesButtonMenu,\n ['data-ui-id']: 'call-composite-more-menu-devices-button'\n });\n }\n\n /* @conditional-compile-remove(raise-hand) */\n if (!showRaiseHandButtonInControlBar && /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall) {\n moreButtonMenuItems.push({\n key: 'raiseHandButtonKey',\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n },\n iconProps: { iconName: 'RaiseHandContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.raiseHandButton),\n ['data-ui-id']: 'call-composite-more-menu-raise-hand-button'\n });\n }\n\n // Custom Buttons in More Button Menu should always be the last items pushed into the moreButtonMenuItems array\n if (customDrawerButtons['primary']) {\n customDrawerButtons['primary']\n .slice(\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['secondary']) {\n customDrawerButtons['secondary'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['overflow']) {\n customDrawerButtons['overflow'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n return (\n <Stack horizontalAlign=\"center\" className={callControlsContainerStyles}>\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar\n layout={props.displayVertical ? 'vertical' : 'horizontal'}\n styles={controlBarStyles(theme.semanticColors.bodyBackground)}\n >\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {\n /* @conditional-compile-remove(reaction) */\n showReactionButtonInControlBar && <Reaction displayType={options?.displayType} />\n }\n {\n /* @conditional-compile-remove(raise-hand) */ showRaiseHandButtonInControlBar &&\n /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (\n <RaiseHand displayType={options?.displayType} />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {showParticipantsButtonInControlBar && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n disableTooltip={props.isMobile}\n />\n )}\n {showDevicesButtonInControlBar && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {customButtons['primary']\n ?.slice(\n 0,\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n // styles={commonButtonStyles}\n showLabel={options?.displayType !== 'compact'}\n disableTooltip={props.isMobile}\n />\n );\n })}\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n showMoreButton && (\n <MoreButton\n disableTooltip={props.isMobile}\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonMenuItems }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n return adapter.getState().isRoomsCall;\n\n return false;\n};\n"]}
|
1
|
+
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAInE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAgC,4CAAmC;AACrG,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,2FAA2F;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,SAAS,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AAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAW,EAAE;IAC3E,wCAAwC;IACxC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC;IAEtC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { IContextualMenuItem } from '@fluentui/react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, DevicesButton, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { callControlsContainerStyles } from '../styles/CallPage.styles';\nimport { CommonCallAdapter } from '../adapter';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from './buttons/RaiseHand';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { _generateDefaultDeviceMenuProps } from '@internal/react-components';\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n generateCustomCallDesktopOverflowButtons,\n onFetchCustomButtonPropsTrampoline\n} from '../../common/ControlBar/CustomButton';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from './buttons/Reaction';\n/* @conditional-compile-remove(reaction) */\nimport { useSelector } from '../hooks/useSelector';\n/* @conditional-compile-remove(reaction) */\nimport { capabilitySelector } from '../../CallComposite/selectors/capabilitySelector';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n displayVertical?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\nconst inferCallControlOptions = (\n mobileView: boolean,\n callControlOptions?: boolean | CallControlOptions\n): CallControlOptions => {\n if (callControlOptions === false) {\n return {};\n }\n\n const options = callControlOptions === true || callControlOptions === undefined ? {} : callControlOptions;\n if (mobileView) {\n // Set options to always not show screen share button for mobile\n options.screenShareButton = false;\n }\n return options;\n};\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options: CallControlOptions = useMemo(\n () => inferCallControlOptions(!!props.isMobile, props.options),\n [props.isMobile, props.options]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n /* @conditional-compile-remove(reaction) */\n const capabilitiesSelector = useSelector(capabilitySelector);\n /* @conditional-compile-remove(reaction) */\n const isReactionAllowed =\n !capabilitiesSelector?.capabilities || capabilitiesSelector.capabilities.useReactions.isPresent;\n\n const devicesButtonProps = usePropsFor(DevicesButton);\n\n let numberOfButtons = 0;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n if (screenShareButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n if (microphoneButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n if (cameraButtonIsEnabled) {\n numberOfButtons++;\n }\n\n if (isEnabled(options?.endCallButton)) {\n numberOfButtons++;\n }\n\n const showParticipantsButtonInControlBar =\n isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile;\n if (showParticipantsButtonInControlBar) {\n numberOfButtons++;\n }\n\n /* @conditional-compile-remove(reaction) */\n const showReactionButtonInControlBar = isEnabled(options?.reactionButton) && isReactionAllowed && !props.isMobile;\n /* @conditional-compile-remove(reaction) */\n if (showReactionButtonInControlBar) {\n numberOfButtons++;\n }\n\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n if (!isRoomsCallTrampoline(adapter)) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n return items;\n };\n\n const customDrawerButtons = useMemo(\n () =>\n generateCustomCallDesktopOverflowButtons(\n onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined),\n typeof options === 'object' ? options.displayType : undefined\n ),\n [options]\n );\n\n const moreButtonMenuItems = moreButtonContextualMenuItems();\n let showMoreButton = isEnabled(options?.moreButton) && moreButtonMenuItems.length > 0;\n if (showMoreButton) {\n numberOfButtons++;\n }\n\n const customButtons = useMemo(\n () => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n numberOfButtons += React.Children.count(customButtons['primary']) + React.Children.count(customButtons['secondary']);\n\n let showDevicesButtonInControlBar = isEnabled(options?.devicesButton);\n if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n showDevicesButtonInControlBar = false;\n\n showMoreButton = isEnabled(options?.moreButton);\n }\n\n /* @conditional-compile-remove(reaction) */\n const reactionResources = adapter.getState().reactions;\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonIsEnabled = isEnabled(options?.raiseHandButton);\n /* @conditional-compile-remove(raise-hand) */\n let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n adapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n /* @conditional-compile-remove(raise-hand) */\n if (showRaiseHandButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n // If more button is not present but enabled then replace previous button (devices button) with more button\n if (!showMoreButton && isEnabled(options?.moreButton)) {\n showMoreButton = true;\n showDevicesButtonInControlBar = false;\n }\n\n showRaiseHandButtonInControlBar = false;\n }\n\n if (!showDevicesButtonInControlBar) {\n const devicesButtonMenu = _generateDefaultDeviceMenuProps(\n devicesButtonProps,\n localeStrings.component.strings.devicesButton\n );\n moreButtonMenuItems.push({\n key: 'devicesButtonKey',\n text: localeStrings.component.strings.devicesButton.label,\n iconProps: { iconName: 'ControlButtonOptions', styles: { root: { lineHeight: 0 } } },\n subMenuProps: devicesButtonMenu,\n ['data-ui-id']: 'call-composite-more-menu-devices-button'\n });\n }\n\n /* @conditional-compile-remove(raise-hand) */\n if (!showRaiseHandButtonInControlBar && /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall) {\n moreButtonMenuItems.push({\n key: 'raiseHandButtonKey',\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n },\n iconProps: { iconName: 'RaiseHandContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.raiseHandButton),\n ['data-ui-id']: 'call-composite-more-menu-raise-hand-button'\n });\n }\n\n // Custom Buttons in More Button Menu should always be the last items pushed into the moreButtonMenuItems array\n if (customDrawerButtons['primary']) {\n customDrawerButtons['primary']\n .slice(\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['secondary']) {\n customDrawerButtons['secondary'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['overflow']) {\n customDrawerButtons['overflow'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n\n const theme = useTheme();\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n return (\n <Stack horizontalAlign=\"center\" className={callControlsContainerStyles}>\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar\n layout={props.displayVertical ? 'vertical' : 'horizontal'}\n styles={controlBarStyles(theme.semanticColors.bodyBackground)}\n >\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {\n /* @conditional-compile-remove(reaction) */\n showReactionButtonInControlBar && reactionResources && (\n <Reaction displayType={options?.displayType} reactionResource={reactionResources} />\n )\n }\n {\n /* @conditional-compile-remove(raise-hand) */ showRaiseHandButtonInControlBar &&\n /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (\n <RaiseHand displayType={options?.displayType} />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {showParticipantsButtonInControlBar && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n disableTooltip={props.isMobile}\n />\n )}\n {showDevicesButtonInControlBar && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {customButtons['primary']\n ?.slice(\n 0,\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n // styles={commonButtonStyles}\n showLabel={options?.displayType !== 'compact'}\n disableTooltip={props.isMobile}\n />\n );\n })}\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n showMoreButton && (\n <MoreButton\n disableTooltip={props.isMobile}\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonMenuItems }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n return adapter.getState().isRoomsCall;\n\n return false;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js
CHANGED
@@ -53,6 +53,8 @@ export const MediaGallery = (props) => {
|
|
53
53
|
const containerHeight = _useContainerHeight(containerRef);
|
54
54
|
/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */
|
55
55
|
const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
|
56
|
+
/* @conditional-compile-remove(reaction) */
|
57
|
+
const reactionResources = adapter.getState().reactions;
|
56
58
|
const layoutBasedOnTilePosition = localVideoTileLayoutTrampoline(
|
57
59
|
/* @conditional-compile-remove(click-to-call) */ (_b = props.localVideoTileOptions) === null || _b === void 0 ? void 0 : _b.position);
|
58
60
|
const cameraSwitcherProps = useMemo(() => {
|
@@ -101,7 +103,9 @@ export const MediaGallery = (props) => {
|
|
101
103
|
? 'hidden'
|
102
104
|
: props.isMobile && containerAspectRatio < 1
|
103
105
|
? '9:16'
|
104
|
-
: '16:9'
|
106
|
+
: '16:9',
|
107
|
+
/* @conditional-compile-remove(reaction) */
|
108
|
+
reactionResources: reactionResources })));
|
105
109
|
}, [
|
106
110
|
videoGalleryProps,
|
107
111
|
props.isMobile,
|
@@ -121,7 +125,9 @@ export const MediaGallery = (props) => {
|
|
121
125
|
containerAspectRatio,
|
122
126
|
/* @conditional-compile-remove(gallery-layouts) */
|
123
127
|
props.userSetGalleryLayout,
|
124
|
-
layoutBasedOnTilePosition
|
128
|
+
layoutBasedOnTilePosition,
|
129
|
+
/* @conditional-compile-remove(reaction) */
|
130
|
+
reactionResources
|
125
131
|
]);
|
126
132
|
return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
127
133
|
React.createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnE,mDAAmD,CAAC,wCAAwC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAA2C,SAAS,EAAE,4CAAmC;AAE9G,mDAAmD,CAAC,wCAAwC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,4CAAmC;AAGrF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,4CAAmC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAK/E,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,M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gBACzG,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,oBAAoB,GAAG,CAAC;oBAC5C,CAAC,CAAC,MAAM;oBACR,CAAC,CAAC,MAAM,IAEZ,CACH,CAAC;IACJ,CAAC,EAAE;QACD,iBAAiB;QACjB,KAAK,CAAC,QAAQ;QACd,wCAAwC;QACxC,KAAK,CAAC,qBAAqB;QAC3B,mBAAmB;QACnB,cAAc;QACd,sDAAsD;QACtD,0BAA0B;QAC1B,mDAAmD;QACnD,uBAAuB;QACvB,wCAAwC;QACxC,QAAQ;QACR,wCAAwC;QACxC,WAAW;QACX,mDAAmD;QACnD,oBAAoB;QACpB,kDAAkD;QAClD,KAAK,CAAC,oBAAoB;QAC1B,yBAAyB;KAC1B,CAAC,CAAC;IAEH,OAAO,CACL,6BAAyD,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,2BAA2B;QAC5G,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAErF,MAAM,8BAA8B,GAAG;AACrC,gDAAgD,CAAC,gBAAyB,EACtD,EAAE;IACtB,gDAAgD;IAChD,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACtE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { useRef } from 'react';\nimport { VideoGallery, VideoStreamOptions, CustomAvatarOptions, Announcer } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\nimport { LocalVideoTileOptions } from '../CallComposite';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout: VideoGalleryLayout;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const userRole = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerHeight = _useContainerHeight(containerRef);\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = localVideoTileLayoutTrampoline(\n /* @conditional-compile-remove(click-to-call) */ (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(gallery-layouts) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n /* @conditional-compile-remove(gallery-layouts) */\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition={overflowGalleryPosition}\n /* @conditional-compile-remove(rooms) */\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n /* @conditional-compile-remove(rooms) */\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions,\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition,\n /* @conditional-compile-remove(rooms) */\n userRole,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall,\n /* @conditional-compile-remove(vertical-gallery) */\n containerAspectRatio,\n /* @conditional-compile-remove(gallery-layouts) */\n props.userSetGalleryLayout,\n layoutBasedOnTilePosition\n ]);\n\n return (\n <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst localVideoTileLayoutTrampoline = (\n /* @conditional-compile-remove(click-to-call) */ localTileOptions?: string\n): VideoGalleryLayout => {\n /* @conditional-compile-remove(click-to-call) */\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n return 'floatingLocalVideo';\n};\n"]}
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnE,mDAAmD,CAAC,wCAAwC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC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AkD;QAClD,KAAK,CAAC,oBAAoB;QAC1B,yBAAyB;QACzB,2CAA2C;QAC3C,iBAAiB;KAClB,CAAC,CAAC;IAEH,OAAO,CACL,6BAAyD,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,2BAA2B;QAC5G,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAErF,MAAM,8BAA8B,GAAG;AACrC,gDAAgD,CAAC,gBAAyB,EACtD,EAAE;IACtB,gDAAgD;IAChD,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACtE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { useRef } from 'react';\nimport { VideoGallery, VideoStreamOptions, CustomAvatarOptions, Announcer } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\nimport { LocalVideoTileOptions } from '../CallComposite';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout: VideoGalleryLayout;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const userRole = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerHeight = _useContainerHeight(containerRef);\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n /* @conditional-compile-remove(reaction) */\n const reactionResources = adapter.getState().reactions;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = localVideoTileLayoutTrampoline(\n /* @conditional-compile-remove(click-to-call) */ (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(gallery-layouts) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n /* @conditional-compile-remove(gallery-layouts) */\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition={overflowGalleryPosition}\n /* @conditional-compile-remove(rooms) */\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n /* @conditional-compile-remove(reaction) */\n reactionResources={reactionResources}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n /* @conditional-compile-remove(rooms) */\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions,\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition,\n /* @conditional-compile-remove(rooms) */\n userRole,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall,\n /* @conditional-compile-remove(vertical-gallery) */\n containerAspectRatio,\n /* @conditional-compile-remove(gallery-layouts) */\n props.userSetGalleryLayout,\n layoutBasedOnTilePosition,\n /* @conditional-compile-remove(reaction) */\n reactionResources\n ]);\n\n return (\n <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst localVideoTileLayoutTrampoline = (\n /* @conditional-compile-remove(click-to-call) */ localTileOptions?: string\n): VideoGalleryLayout => {\n /* @conditional-compile-remove(click-to-call) */\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n return 'floatingLocalVideo';\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { ReactionResources } from "../../../../../../react-components/src";
|
2
3
|
import { ControlBarButtonStyles } from "../../../../../../react-components/src";
|
3
4
|
import { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';
|
4
5
|
/** @private */
|
5
6
|
export declare const Reaction: (props: {
|
7
|
+
reactionResource: ReactionResources;
|
6
8
|
option?: boolean | {
|
7
9
|
disabled: boolean;
|
8
10
|
};
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js
CHANGED
@@ -14,7 +14,7 @@ export const Reaction = (props) => {
|
|
14
14
|
const reactionButtonProps = usePropsFor(ReactionButton);
|
15
15
|
const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
16
16
|
const reactionButtonDisabled = isDisabled(props.option) || reactionButtonProps.disabled;
|
17
|
-
return (React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true })));
|
17
|
+
return (React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true, reactionResources: props.reactionResource })));
|
18
18
|
};
|
19
19
|
/* @conditional-compile-remove(reaction) */
|
20
20
|
const isDisabled = (option) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Reaction.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Reaction.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"Reaction.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Reaction.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,2CAA2C;AAC3C,OAAO,EAA0B,cAAc,EAAuB,+CAAmC;AACzG,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,2CAA2C;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,2CAA2C;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,2CAA2C;AAC3C,eAAe;AACf,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAQxB,EAAe,EAAE;IAChB,MAAM,mBAAmB,GAAG,WAAW,CAAC,cAAc,CAAmC,CAAC;IAC1F,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEzF,MAAM,sBAAsB,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC;IAExF,OAAO,CACL,oBAAC,cAAc,gCACF,gCAAgC,IACvC,mBAAmB,IACvB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,QAAQ,EAAE,sBAAsB,IAAI,KAAK,CAAC,QAAQ,EAClD,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,WAAW,EAAE,IAAI,EACjB,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,IACzC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,2CAA2C;AAC3C,MAAM,UAAU,GAAG,CAAC,MAAwC,EAAW,EAAE;IACvE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport { ReactionResources } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */\nimport { ControlBarButtonStyles, ReactionButton, ReactionButtonProps } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */\nimport React, { useMemo } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\n/* @conditional-compile-remove(reaction) */\nimport { usePropsFor } from '../../hooks/usePropsFor';\n/* @conditional-compile-remove(reaction) */\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\n\n/* @conditional-compile-remove(reaction) */\n/** @private */\nexport const Reaction = (props: {\n // The value of `CallControlOptions.reactionButton`.\n reactionResource: ReactionResources;\n option?: boolean | { disabled: boolean };\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n disabled?: boolean;\n disableTooltip?: boolean;\n}): JSX.Element => {\n const reactionButtonProps = usePropsFor(ReactionButton) as unknown as ReactionButtonProps;\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n\n const reactionButtonDisabled = isDisabled(props.option) || reactionButtonProps.disabled;\n\n return (\n <ReactionButton\n data-ui-id=\"call-composite-reaction-button\"\n {...reactionButtonProps}\n showLabel={props.displayType !== 'compact'}\n disabled={reactionButtonDisabled || props.disabled}\n styles={styles}\n disableTooltip={props.disableTooltip}\n persistMenu={true}\n reactionResources={props.reactionResource}\n />\n );\n};\n\n/* @conditional-compile-remove(reaction) */\nconst isDisabled = (option?: boolean | { disabled: boolean }): boolean => {\n if (option === undefined || option === true || option === false) {\n return false;\n }\n return option.disabled;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js
CHANGED
@@ -10,12 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
});
|
11
11
|
};
|
12
12
|
import { Dialpad } from "../../../../../react-components/src";
|
13
|
-
import React, { useEffect,
|
13
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
14
14
|
import { useAdapter } from '../adapter/CallAdapterProvider';
|
15
15
|
import { Stack, Text, useTheme } from '@fluentui/react';
|
16
16
|
import { getReadableTime } from '../utils/timerUtils';
|
17
17
|
import { DtmfDialpadContentTimerStyles } from '../styles/DtmfDialpadPage.styles';
|
18
18
|
import { isPhoneNumberIdentifier } from '@azure/communication-common';
|
19
|
+
import { useSelector } from '../hooks/useSelector';
|
20
|
+
import { getStartTime } from '../selectors/baseSelectors';
|
19
21
|
const DtmfDialpadPageContent = (props) => {
|
20
22
|
var _a, _b;
|
21
23
|
const { adapter } = props;
|
@@ -40,15 +42,19 @@ const DtmfDialpadPageContent = (props) => {
|
|
40
42
|
React.createElement(Dialpad, { onSendDtmfTone: (tone) => __awaiter(void 0, void 0, void 0, function* () {
|
41
43
|
/* @conditional-compile-remove(dtmf-dialer) */
|
42
44
|
yield adapter.sendDtmfTone(tone);
|
43
|
-
}), dialpadMode: 'dtmf' }))));
|
45
|
+
}), longPressTrigger: props.mobileView ? 'touch' : 'mouseAndTouch', dialpadMode: 'dtmf' }))));
|
44
46
|
};
|
45
47
|
const DtmfDialerContentTimer = () => {
|
46
48
|
const [time, setTime] = useState(0);
|
47
49
|
const elapsedTime = getReadableTime(time);
|
48
|
-
const
|
50
|
+
const statefulStartTime = useSelector(getStartTime);
|
51
|
+
const startTime = useMemo(() => {
|
52
|
+
return statefulStartTime !== null && statefulStartTime !== void 0 ? statefulStartTime : new Date(Date.now());
|
53
|
+
}, [statefulStartTime]);
|
49
54
|
useEffect(() => {
|
50
55
|
const interval = setInterval(() => {
|
51
|
-
|
56
|
+
var _a;
|
57
|
+
setTime((_a = new Date(Date.now()).getTime() - (startTime === null || startTime === void 0 ? void 0 : startTime.getTime())) !== null && _a !== void 0 ? _a : 0);
|
52
58
|
}, 10);
|
53
59
|
return () => {
|
54
60
|
clearInterval(interval);
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DtmfDialpadPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAsB,OAAO,EAAY,4CAAmC;AAKnF,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"DtmfDialpadPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.tsx"],"names":[],"mappings":"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AAC,CAAC,CAAC;IAExB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;;YAChC,OAAO,CAAC,MAAA,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,IAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,EAAE,CAAA,mCAAI,CAAC,CAAC,CAAC;QACtE,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,OAAO,GAAG,EAAE;YACV,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,oBAAC,IAAI,IAAC,MAAM,EAAE,6BAA6B,IAAG,WAAW,CAAQ,CAAC;AAC3E,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAe,EAAE;IACtE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,OAAO,oBAAC,sBAAsB,IAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CAAC;AACpF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ActiveErrorMessage, Dialpad, DtmfTone } from '@internal/react-components';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CommonCallAdapter } from '../adapter';\nimport { Stack, Text, useTheme } from '@fluentui/react';\nimport { getReadableTime } from '../utils/timerUtils';\nimport { DtmfDialpadContentTimerStyles } from '../styles/DtmfDialpadPage.styles';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { useSelector } from '../hooks/useSelector';\nimport { getStartTime } from '../selectors/baseSelectors';\n\n/**\n * @internal\n */\nexport interface DialpadPageProps {\n mobileView: boolean;\n options?: CallCompositeOptions;\n modalLayerHostId: string;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onSetDialpadPage: () => void;\n dtmfDialerPresent: boolean;\n}\n\ninterface DialpadPageContentProps {\n mobileView: boolean;\n adapter: CommonCallAdapter;\n}\n\nconst DtmfDialpadPageContent = (props: DialpadPageContentProps): JSX.Element => {\n const { adapter } = props;\n const adapterState = adapter.getState();\n const theme = useTheme();\n\n const calleeId = adapterState.targetCallees?.[0];\n const remoteParticipants = adapterState.call?.remoteParticipants;\n let calleeName;\n\n if (remoteParticipants) {\n const remoteParticipantValues: RemoteParticipantState[] = Object.values(remoteParticipants);\n if (calleeId && isPhoneNumberIdentifier(calleeId)) {\n calleeName = calleeId.phoneNumber;\n } else {\n calleeName = remoteParticipantValues.find((p) => p.identifier === calleeId);\n }\n }\n\n return (\n <Stack style={{ height: '100%', width: '100%', background: theme.palette.white }}>\n <Stack verticalAlign={'center'} style={{ margin: 'auto' }}>\n <DtmfDialerContentTimer />\n <Text style={{ margin: 'auto' }}>{calleeName !== 'Unnamed participant' ? calleeName : ''}</Text>\n <Dialpad\n onSendDtmfTone={async (tone: DtmfTone) => {\n /* @conditional-compile-remove(dtmf-dialer) */\n await adapter.sendDtmfTone(tone);\n }}\n longPressTrigger={props.mobileView ? 'touch' : 'mouseAndTouch'}\n dialpadMode={'dtmf'}\n ></Dialpad>\n </Stack>\n </Stack>\n );\n};\n\nconst DtmfDialerContentTimer = (): JSX.Element => {\n const [time, setTime] = useState<number>(0);\n const elapsedTime = getReadableTime(time);\n const statefulStartTime = useSelector(getStartTime);\n const startTime = useMemo(() => {\n return statefulStartTime ?? new Date(Date.now());\n }, [statefulStartTime]);\n\n useEffect(() => {\n const interval = setInterval(() => {\n setTime(new Date(Date.now()).getTime() - startTime?.getTime() ?? 0);\n }, 10);\n return () => {\n clearInterval(interval);\n };\n }, [startTime]);\n\n return <Text styles={DtmfDialpadContentTimerStyles}>{elapsedTime}</Text>;\n};\n\n/**\n * @internal\n */\nexport const DtmfDialpadPage = (props: DialpadPageProps): JSX.Element => {\n const adapter = useAdapter();\n\n return <DtmfDialpadPageContent adapter={adapter} mobileView={props.mobileView} />;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts
CHANGED
@@ -133,4 +133,8 @@ export declare const getLatestCapabilitiesChangedInfo: (state: CallAdapterState)
|
|
133
133
|
* @private
|
134
134
|
*/
|
135
135
|
export declare const getTargetCallees: (state: CallAdapterState) => CommunicationIdentifier[] | undefined;
|
136
|
+
/**
|
137
|
+
* @private
|
138
|
+
*/
|
139
|
+
export declare const getStartTime: (state: CallAdapterState) => Date | undefined;
|
136
140
|
//# sourceMappingURL=baseSelectors.d.ts.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js
CHANGED
@@ -155,4 +155,8 @@ export const getLatestCapabilitiesChangedInfo = (state) => {
|
|
155
155
|
* @private
|
156
156
|
*/
|
157
157
|
export const getTargetCallees = (state) => state.targetCallees;
|
158
|
+
/**
|
159
|
+
* @private
|
160
|
+
*/
|
161
|
+
export const getStartTime = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.startTime; };
|
158
162
|
//# sourceMappingURL=baseSelectors.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuBlC,OAAO,EAAa,YAAY,EAA+B,sDAA6C;AAK5G;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAAsB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,EAAE,CAAA,EAAA,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAyB,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAiB,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,mCAAI,MAAM,CAAA,EAAA,CAAC;AAErG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;AAE/F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAuB,EAAW,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,iBAAiB,mCAAI,KAAK,CAAA,EAAA,CAAC;AAE/G,6CAA6C;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAuB,EAA+B,EAAE,WACpG,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAC,0BAA0B,CAAA,EAAA,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAuC,EAAE,eAC7F,OAAA,MAAA,MAAA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AAE,CAAC,KAAK,CAAC,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState as SDKCallStatus, DominantSpeakersInfo } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { VideoDeviceInfo, AudioDeviceInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(capabilities) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport {\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n LocalVideoStreamState,\n RemoteParticipantState\n} from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\nimport { CallAdapterState, CallCompositePage } from '../adapter/CallAdapter';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _dominantSpeakersWithFlatId } from '@internal/calling-component-bindings';\nimport { AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/**\n * @private\n */\nexport const getDisplayName = (state: CallAdapterState): string | undefined => state.displayName;\n\n/**\n * @private\n */\nexport const getCallId = (state: CallAdapterState): string | undefined => state.call?.id;\n\n/**\n * @private\n */\nexport const getEndedCall = (state: CallAdapterState): CallState | undefined => state.endedCall;\n\n/**\n * @private\n */\nexport const getCallStatus = (state: CallAdapterState): SDKCallStatus => state.call?.state ?? 'None';\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallAdapterState): DeviceManagerState => state.devices;\n\n/**\n * @private\n */\nexport const getIsScreenShareOn = (state: CallAdapterState): boolean => state.call?.isScreenSharingOn ?? false;\n\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (state: CallAdapterState): RaisedHandState | undefined =>\n state.call?.raiseHand.localParticipantRaisedHand;\n\n/**\n * @private\n */\nexport const getCapabilites = (state: CallAdapterState): ParticipantCapabilities | undefined =>\n state.call?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getIsPreviewCameraOn = (state: CallAdapterState): boolean => _isPreviewOn(state.devices);\n\n/**\n * @private\n */\nexport const getMicrophones = (state: CallAdapterState): AudioDeviceInfo[] => state.devices.microphones;\n\n/**\n * @private\n */\nexport const getCameras = (state: CallAdapterState): VideoDeviceInfo[] => state.devices.cameras;\n\n/* @conditional-compile-remove(capabilities) */\n/**\n * @private\n */\nexport const getRole = (state: CallAdapterState): ParticipantRole | undefined => state.call?.role;\n\n/**\n * @private\n */\nexport const getPage = (state: CallAdapterState): CallCompositePage => state.page;\n\n/* @conditional-compile-remove(call-transfer) */\n/**\n * @private\n */\nexport const getTransferCall = (state: CallAdapterState): CallState | undefined => state.acceptedTransferCallState;\n\n/**\n * @private\n */\nexport const getLocalMicrophoneEnabled = (state: CallAdapterState): boolean => state.isLocalPreviewMicrophoneEnabled;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (state: CallAdapterState): LocalVideoStreamState[] | undefined =>\n state.call?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getIsTranscriptionActive = (state: CallAdapterState): boolean =>\n !!state.call?.transcription.isTranscriptionActive;\n\n/**\n * @private\n */\nexport const getIsRecordingActive = (state: CallAdapterState): boolean => !!state.call?.recording.isRecordingActive;\n\n/**\n * @private\n */\nexport const getUserFacingDiagnostics = (state: CallAdapterState): DiagnosticsCallFeatureState | undefined =>\n state.call?.diagnostics;\n\n/**\n * @private\n */\nexport const getDominantSpeakerInfo = (state: CallAdapterState): undefined | DominantSpeakersInfo =>\n state.call?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallAdapterState\n):\n | undefined\n | {\n [keys: string]: RemoteParticipantState;\n } => state.call?.remoteParticipants;\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallAdapterState): EnvironmentInfo | undefined => state.environmentInfo;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * @private\n */\nexport const getSelectedVideoEffect = (state: CallAdapterState): VideoBackgroundEffect | undefined =>\n state.selectedVideoBackgroundEffect;\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptions = (state: CallAdapterState): CaptionsInfo[] | undefined => {\n return state.call?.captionsFeature.captions;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptionsStatus = (state: CallAdapterState): boolean | undefined => {\n return state.call?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentCaptionLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentCaptionLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentSpokenLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentSpokenLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedCaptionLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedCaptionLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedSpokenLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedSpokenLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @private\n */\nexport const getIsTeamsCall = (state: CallAdapterState): boolean => state.isTeamsCall;\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallAdapterState): AdapterErrors => state.latestErrors;\n\n/* @conditional-compile-remove(capabilities) */\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (state: CallAdapterState): CapabilitiesChangeInfo | undefined => {\n return state.call?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getTargetCallees = (state: CallAdapterState): CommunicationIdentifier[] | undefined => state.targetCallees;\n"]}
|
1
|
+
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuBlC,OAAO,EAAa,YAAY,EAA+B,sDAA6C;AAK5G;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAAsB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,EAAE,CAAA,EAAA,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAyB,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAiB,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,mCAAI,MAAM,CAAA,EAAA,CAAC;AAErG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;AAE/F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAuB,EAAW,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,iBAAiB,mCAAI,KAAK,CAAA,EAAA,CAAC;AAE/G,6CAA6C;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAuB,EAA+B,EAAE,WACpG,OAAA,MAAA,KAAK,CAAC,I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AAA,KAAK,CAAC,IAAI,0CAAE,mBAAmB,0CAAE,4BAA4B,CAAC;AACvE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAyC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAoB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState as SDKCallStatus, DominantSpeakersInfo } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { VideoDeviceInfo, AudioDeviceInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(capabilities) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport {\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n LocalVideoStreamState,\n RemoteParticipantState\n} from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\nimport { CallAdapterState, CallCompositePage } from '../adapter/CallAdapter';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _dominantSpeakersWithFlatId } from '@internal/calling-component-bindings';\nimport { AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/**\n * @private\n */\nexport const getDisplayName = (state: CallAdapterState): string | undefined => state.displayName;\n\n/**\n * @private\n */\nexport const getCallId = (state: CallAdapterState): string | undefined => state.call?.id;\n\n/**\n * @private\n */\nexport const getEndedCall = (state: CallAdapterState): CallState | undefined => state.endedCall;\n\n/**\n * @private\n */\nexport const getCallStatus = (state: CallAdapterState): SDKCallStatus => state.call?.state ?? 'None';\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallAdapterState): DeviceManagerState => state.devices;\n\n/**\n * @private\n */\nexport const getIsScreenShareOn = (state: CallAdapterState): boolean => state.call?.isScreenSharingOn ?? false;\n\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (state: CallAdapterState): RaisedHandState | undefined =>\n state.call?.raiseHand.localParticipantRaisedHand;\n\n/**\n * @private\n */\nexport const getCapabilites = (state: CallAdapterState): ParticipantCapabilities | undefined =>\n state.call?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getIsPreviewCameraOn = (state: CallAdapterState): boolean => _isPreviewOn(state.devices);\n\n/**\n * @private\n */\nexport const getMicrophones = (state: CallAdapterState): AudioDeviceInfo[] => state.devices.microphones;\n\n/**\n * @private\n */\nexport const getCameras = (state: CallAdapterState): VideoDeviceInfo[] => state.devices.cameras;\n\n/* @conditional-compile-remove(capabilities) */\n/**\n * @private\n */\nexport const getRole = (state: CallAdapterState): ParticipantRole | undefined => state.call?.role;\n\n/**\n * @private\n */\nexport const getPage = (state: CallAdapterState): CallCompositePage => state.page;\n\n/* @conditional-compile-remove(call-transfer) */\n/**\n * @private\n */\nexport const getTransferCall = (state: CallAdapterState): CallState | undefined => state.acceptedTransferCallState;\n\n/**\n * @private\n */\nexport const getLocalMicrophoneEnabled = (state: CallAdapterState): boolean => state.isLocalPreviewMicrophoneEnabled;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (state: CallAdapterState): LocalVideoStreamState[] | undefined =>\n state.call?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getIsTranscriptionActive = (state: CallAdapterState): boolean =>\n !!state.call?.transcription.isTranscriptionActive;\n\n/**\n * @private\n */\nexport const getIsRecordingActive = (state: CallAdapterState): boolean => !!state.call?.recording.isRecordingActive;\n\n/**\n * @private\n */\nexport const getUserFacingDiagnostics = (state: CallAdapterState): DiagnosticsCallFeatureState | undefined =>\n state.call?.diagnostics;\n\n/**\n * @private\n */\nexport const getDominantSpeakerInfo = (state: CallAdapterState): undefined | DominantSpeakersInfo =>\n state.call?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallAdapterState\n):\n | undefined\n | {\n [keys: string]: RemoteParticipantState;\n } => state.call?.remoteParticipants;\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallAdapterState): EnvironmentInfo | undefined => state.environmentInfo;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * @private\n */\nexport const getSelectedVideoEffect = (state: CallAdapterState): VideoBackgroundEffect | undefined =>\n state.selectedVideoBackgroundEffect;\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptions = (state: CallAdapterState): CaptionsInfo[] | undefined => {\n return state.call?.captionsFeature.captions;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptionsStatus = (state: CallAdapterState): boolean | undefined => {\n return state.call?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentCaptionLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentCaptionLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentSpokenLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentSpokenLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedCaptionLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedCaptionLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedSpokenLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedSpokenLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @private\n */\nexport const getIsTeamsCall = (state: CallAdapterState): boolean => state.isTeamsCall;\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallAdapterState): AdapterErrors => state.latestErrors;\n\n/* @conditional-compile-remove(capabilities) */\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (state: CallAdapterState): CapabilitiesChangeInfo | undefined => {\n return state.call?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getTargetCallees = (state: CallAdapterState): CommunicationIdentifier[] | undefined => state.targetCallees;\n\n/**\n * @private\n */\nexport const getStartTime = (state: CallAdapterState): Date | undefined => state.call?.startTime;\n"]}
|
@@ -8,6 +8,7 @@ import { ChatAdapter, ChatAdapterState } from '../../ChatComposite';
|
|
8
8
|
import { FileUploadsUiState } from '../../ChatComposite';
|
9
9
|
import { AdapterErrors } from '../../common/adapters';
|
10
10
|
import { EnvironmentInfo } from '@azure/communication-calling';
|
11
|
+
import { ReactionResources } from "../../../../../react-components/src";
|
11
12
|
/**
|
12
13
|
* UI state pertaining to the {@link CallWithChatComposite}.
|
13
14
|
*
|
@@ -77,6 +78,8 @@ export interface CallWithChatClientState {
|
|
77
78
|
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
|
78
79
|
/** Hide attendee names in teams meeting */
|
79
80
|
hideAttendeeNames?: boolean;
|
81
|
+
/** Reaction resources to render in meetings */
|
82
|
+
reactions?: ReactionResources;
|
80
83
|
}
|
81
84
|
/**
|
82
85
|
* CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallWithChatAdapterState.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"CallWithChatAdapterState.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA8GlC;;GAEG;AACH,MAAM,UAAU,yCAAyC,CACvD,WAAwB,EACxB,WAAwB;IAExB,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAChD,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAEhD,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,IAAI;QAC3B,IAAI,EAAE,gBAAgB,CAAC,MAAM;QAC7B,MAAM,EAAE,gBAAgB,CAAC,MAAM;QAC/B,IAAI,EAAE,gBAAgB,CAAC,IAAI;QAC3B,WAAW,EAAE,gBAAgB,CAAC,WAAW;QACzC,OAAO,EAAE,gBAAgB,CAAC,OAAO;QACjC,+BAA+B,EAAE,gBAAgB,CAAC,+BAA+B;QACjF,WAAW,EAAE,gBAAgB,CAAC,WAAW;QACzC,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,+CAA+C;QAC/C,WAAW,EAAE,gBAAgB,CAAC,WAAW;QACzC,6CAA6C;QAC7C,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB;QACrD,sDAAsD;QACtD,eAAe,EAAE,gBAAgB,CAAC,eAAe;QACjD,2DAA2D;QAC3D,qBAAqB,EAAE,gBAAgB,CAAC,qBAAqB;QAC7D,2DAA2D;QAC3D,8BAA8B,EAAE,gBAAgB,CAAC,8BAA8B;QAC/E,2DAA2D;QAC3D,6BAA6B,EAAE,gBAAgB,CAAC,6BAA6B;QAC7E,qDAAqD;QACrD,2CAA2C;QAC3C,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB;KACtD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iDAAiD,CAC/D,gCAA0D,EAC1D,gBAAkC;IAElC,uCACK,gCAAgC,KACnC,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAC7B,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,+CAA+C;QAC/C,WAAW,EAAE,gBAAgB,CAAC,WAAW,IACzC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iDAAiD,CAC/D,gCAA0D,EAC1D,gBAAkC;IAElC,uCACK,gCAAgC,KACnC,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAC/B,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,+BAA+B,EAAE,gBAAgB,CAAC,+BAA+B,EACjF,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,2DAA2D;QAC3D,qBAAqB,EAAE,gBAAgB,CAAC,qBAAqB;QAC7D,2DAA2D;QAC3D,8BAA8B,EAAE,gBAAgB,CAAC,8BAA8B;QAC/E,2DAA2D;QAC3D,6BAA6B,EAAE,gBAAgB,CAAC,6BAA6B,IAC7E;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { ChatThreadClientState } from '@internal/chat-stateful-client';\nimport { CallAdapter, CallAdapterState, CallCompositePage } from '../../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\nimport { ChatAdapter, ChatAdapterState } from '../../ChatComposite';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileUploadsUiState } from '../../ChatComposite';\nimport { AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionResources } from '@internal/react-components';\n\n/**\n * UI state pertaining to the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatAdapterUiState {\n /**\n * Microphone state before a call has joined.\n *\n * @public\n */\n isLocalPreviewMicrophoneEnabled: boolean;\n /**\n * Current page of the Composite.\n *\n * @public\n */\n page: CallCompositePage;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Files being uploaded by a user in the current thread.\n * Should be set to null once the upload is complete.\n * Array of type {@link FileUploadsUiState}\n *\n * @beta\n */\n fileUploads?: FileUploadsUiState;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * State to track whether the end user has opted in to using a\n * out of date version of a supported browser. Allows the user\n * to start a call in this state.\n *\n * @beta\n */\n unsupportedBrowserVersionsAllowed?: boolean;\n}\n\n/**\n * State from the backend services that drives {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatClientState {\n /** ID of the call participant using this CallWithChatAdapter. */\n userId: CommunicationIdentifierKind;\n /** Display name of the participant using this CallWithChatAdapter. */\n displayName: string | undefined;\n /** State of the current call. */\n call?: CallState;\n /** State of the current chat. */\n chat?: ChatThreadClientState;\n /** Latest call error encountered for each operation performed via the adapter. */\n latestCallErrors: AdapterErrors;\n /** Latest chat error encountered for each operation performed via the adapter. */\n latestChatErrors: AdapterErrors;\n /** State of available and currently selected devices */\n devices: DeviceManagerState;\n /** State of whether the active call is a Teams interop call */\n isTeamsCall: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n /** alternateCallerId for PSTN call */\n alternateCallerId?: string | undefined;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Environment information for system adapter is made on */\n environmentInfo?: EnvironmentInfo;\n /* @conditional-compile-remove(video-background-effects) */\n /** Default set of background images for background replacement effect */\n videoBackgroundImages?: VideoBackgroundImage[];\n /* @conditional-compile-remove(video-background-effects) */\n /** Dependency to be injected for video background effects */\n onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(video-background-effects) */\n /** State to track the selected video background effect */\n selectedVideoBackgroundEffect?: VideoBackgroundEffect;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames?: boolean;\n /* @conditional-compile-remove(reaction) */\n /** Reaction resources to render in meetings */\n reactions?: ReactionResources;\n}\n\n/**\n * CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some\n * state specific to the CallWithChat Composite only.\n *\n * @public\n */\nexport interface CallWithChatAdapterState extends CallWithChatAdapterUiState, CallWithChatClientState {}\n\n/**\n * @private\n */\nexport function callWithChatAdapterStateFromBackingStates(\n callAdapter: CallAdapter,\n chatAdapter: ChatAdapter\n): CallWithChatAdapterState {\n const callAdapterState = callAdapter.getState();\n const chatAdapterState = chatAdapter.getState();\n\n return {\n call: callAdapterState.call,\n chat: chatAdapterState.thread,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n latestCallErrors: callAdapterState.latestErrors,\n latestChatErrors: chatAdapterState.latestErrors,\n /* @conditional-compile-remove(file-sharing) */\n fileUploads: chatAdapterState.fileUploads,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId: callAdapterState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo: callAdapterState.environmentInfo,\n /* @conditional-compile-remove(video-background-effects) */\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n /* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(video-background-effects) */\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect,\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames: callAdapterState.hideAttendeeNames\n };\n}\n\n/**\n * @private\n */\nexport function mergeChatAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n chatAdapterState: ChatAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n chat: chatAdapterState.thread,\n latestChatErrors: chatAdapterState.latestErrors,\n /* @conditional-compile-remove(file-sharing) */\n fileUploads: chatAdapterState.fileUploads\n };\n}\n\n/**\n * @private\n */\nexport function mergeCallAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n callAdapterState: CallAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n call: callAdapterState.call,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n latestCallErrors: callAdapterState.latestErrors,\n /* @conditional-compile-remove(video-background-effects) */\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n /* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(video-background-effects) */\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect\n };\n}\n"]}
|
@@ -96,17 +96,6 @@ export const ChatScreen = (props) => {
|
|
96
96
|
const onRenderFileDownloads = useCallback((userId, message) => (React.createElement(_FileDownloadCards, { userId: userId, fileMetadata: message.files || [], downloadHandler: fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler, onDownloadErrorMessage: (errorMessage) => {
|
97
97
|
setDownloadErrorMessage(errorMessage);
|
98
98
|
} })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
99
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
100
|
-
const onRenderInlineAttachment = useCallback((attachment) => __awaiter(void 0, void 0, void 0, function* () {
|
101
|
-
const entry = {};
|
102
|
-
attachment.forEach((target) => {
|
103
|
-
if (target.attachmentType === 'inlineImage' && target.previewUrl) {
|
104
|
-
entry[target.id] = target.previewUrl;
|
105
|
-
}
|
106
|
-
});
|
107
|
-
const blob = yield adapter.downloadAttachments({ attachmentUrls: entry });
|
108
|
-
return blob;
|
109
|
-
}), [adapter]);
|
110
99
|
/* @conditional-compile-remove(image-gallery) */
|
111
100
|
const onInlineImageClicked = useCallback((attachmentId, messageId) => __awaiter(void 0, void 0, void 0, function* () {
|
112
101
|
var _a, _b;
|
@@ -145,6 +134,7 @@ export const ChatScreen = (props) => {
|
|
145
134
|
return;
|
146
135
|
}
|
147
136
|
if (attachment.attachmentType === 'inlineImage' && attachment.url) {
|
137
|
+
// TBD: Need to begin investigating how to download HQ images.
|
148
138
|
const blob = yield adapter.downloadAttachments({ attachmentUrls: { [attachment.id]: attachment.url } });
|
149
139
|
if (blob[0]) {
|
150
140
|
const blobUrl = blob[0].blobUrl;
|
@@ -195,8 +185,6 @@ export const ChatScreen = (props) => {
|
|
195
185
|
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
196
186
|
/* @conditional-compile-remove(file-sharing) */
|
197
187
|
onRenderFileDownloads: onRenderFileDownloads,
|
198
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
199
|
-
onFetchAttachments: onRenderInlineAttachment,
|
200
188
|
/* @conditional-compile-remove(image-gallery) */
|
201
189
|
onInlineImageClicked: onInlineImageClicked, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
202
190
|
React.createElement(Stack, { className: mergeStyles(sendboxContainerStyles) },
|