@azure/communication-react 1.3.3-alpha-202210290014.0 → 1.4.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{CHANGELOG.md → CHANGELOG.beta.md} +52 -211
- package/CHANGELOG.json +2307 -0
- package/CHANGELOG.stable.md +287 -0
- package/dist/communication-react.d.ts +307 -91
- package/dist/dist-cjs/communication-react/index.js +11193 -10508
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetry.d.ts +10 -0
- package/dist/dist-esm/acs-ui-common/src/telemetry.js +10 -0
- package/dist/dist-esm/acs-ui-common/src/telemetry.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/calling-component-bindings/src/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +51 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +270 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.d.ts +20 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +36 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +6 -51
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +22 -299
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +43 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +81 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js +17 -5
- package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js +3 -3
- package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +4 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +4 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +10 -3
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +12 -2
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +25 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +16 -2
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +27 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +11 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +15 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +7 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +26 -0
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js +4 -0
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +9 -6
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +37 -182
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +53 -0
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +204 -0
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js +4 -65
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.d.ts +13 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +88 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +4 -3
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +4 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.d.ts +3 -2
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +16 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +89 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +48 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +35 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +8 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js +4 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +3 -7
- package/dist/dist-esm/calling-stateful-client/src/index.js +2 -1
- package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +5 -0
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +6 -4
- package/dist/dist-esm/communication-react/src/index.js +4 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.d.ts → DevicePermissions/BrowserPermissionDenied.d.ts} +4 -4
- package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.js → DevicePermissions/BrowserPermissionDenied.js} +8 -6
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{BrowserPermissionDeniedIOS.d.ts → DevicePermissions/BrowserPermissionDeniedIOS.d.ts} +1 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +58 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.d.ts → DevicePermissions/DevicePermissionDropdown.d.ts} +4 -0
- package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.js → DevicePermissions/DevicePermissionDropdown.js} +3 -2
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +101 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +80 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.d.ts +86 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js +31 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -11
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +3 -3
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -2
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +9 -8
- package/dist/dist-esm/react-components/src/components/index.js +4 -4
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +0 -2
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +10 -1
- package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.d.ts +1 -5
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +0 -11
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +6 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/utils.js +6 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +21 -5
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +56 -2
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +2 -1
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +4 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +30 -18
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
- package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
- package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +3 -0
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +23 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +25 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +24 -11
- 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 +7 -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/adapter/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -12
- 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 +4 -4
- 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/CallPane.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +6 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +76 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +6 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +9 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +12 -12
- package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js +0 -57
- package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +0 -53
- package/dist/dist-esm/react-components/src/components/DomainPermissions.js +0 -43
- package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +0 -1
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js
CHANGED
@@ -5,16 +5,16 @@ import { _ComplianceBanner, _useContainerHeight, _useContainerWidth, ErrorBar, u
|
|
5
5
|
/* @conditional-compile-remove(rooms) */
|
6
6
|
import { _usePermissions } from "../../../../../react-components/src";
|
7
7
|
import React, { useMemo, useRef } from 'react';
|
8
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
8
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
9
9
|
import { useCallback } from 'react';
|
10
10
|
import { containerDivStyles } from '../../common/ContainerRectProps';
|
11
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
11
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
12
12
|
import { useAdapter } from '../adapter/CallAdapterProvider';
|
13
13
|
import { CallControls } from '../components/CallControls';
|
14
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
14
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
15
15
|
import { useSidePaneState } from '../hooks/useSidePaneState';
|
16
16
|
import { callControlsContainerStyles, notificationsContainerStyles, containerStyleDesktop, containerStyleMobile, mediaGalleryContainerStyles, galleryParentContainerStyles, bannerNotificationStyles } from '../styles/CallPage.styles';
|
17
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
17
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
18
18
|
import { CallPane } from './CallPane';
|
19
19
|
import { MutedNotification } from './MutedNotification';
|
20
20
|
/**
|
@@ -30,24 +30,24 @@ export const CallArrangement = (props) => {
|
|
30
30
|
const containerRef = useRef(null);
|
31
31
|
const containerWidth = _useContainerWidth(containerRef);
|
32
32
|
const containerHeight = _useContainerHeight(containerRef);
|
33
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
33
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
34
34
|
const adapter = useAdapter();
|
35
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
35
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
36
36
|
const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();
|
37
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
37
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
38
38
|
const isMobileWithActivePane = props.mobileView && activePane;
|
39
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
39
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
40
40
|
const callCompositeContainerCSS = useMemo(() => {
|
41
41
|
return { display: isMobileWithActivePane ? 'none' : 'flex' };
|
42
42
|
}, [isMobileWithActivePane]);
|
43
43
|
// To be removed once feature is out of beta, replace with callCompositeContainerCSS
|
44
44
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
45
45
|
const callCompositeContainerFlex = () => {
|
46
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
46
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
47
47
|
return callCompositeContainerCSS;
|
48
48
|
return { display: 'flex' };
|
49
49
|
};
|
50
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
50
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
51
51
|
const callPaneContent = useCallback(() => {
|
52
52
|
var _a;
|
53
53
|
if (adapter && activePane === 'people') {
|
@@ -88,16 +88,18 @@ export const CallArrangement = (props) => {
|
|
88
88
|
canUnmute && !!props.mutedNotificationProps && React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
|
89
89
|
React.createElement(Stack.Item, { grow: true, style: callCompositeContainerFlex() },
|
90
90
|
React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
|
91
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
91
92
|
callPaneContent()),
|
92
93
|
((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
|
93
|
-
/* @conditional-compile-remove(one-to-n-calling)
|
94
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
95
|
+
!isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles },
|
94
96
|
React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
|
95
97
|
/* @conditional-compile-remove(one-to-n-calling) */
|
96
98
|
peopleButtonChecked: activePane === 'people',
|
97
99
|
/* @conditional-compile-remove(one-to-n-calling) */
|
98
100
|
onPeopleButtonClicked: togglePeoplePane })))))));
|
99
101
|
};
|
100
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
102
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
101
103
|
const showShowPeopleTabHeaderButton = (callControls) => {
|
102
104
|
if (callControls === undefined || callControls === true) {
|
103
105
|
return true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,mDAAmD;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,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I,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied')\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack horizontal grow>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {/* @conditional-compile-remove(one-to-n-calling) */ callPaneContent()}\n </Stack>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) */ !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,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AsB,EAAI,CAC5F;gBACb,oBAAC,KAAK,CAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,0BAA0B,EAAE;oBAClD,oBAAC,KAAK,CAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,UACxC,KAAK,CAAC,sBAAsB,IAAI,CAC/B,oBAAC,KAAK,IAAC,YAAY,QAAC,MAAM,EAAE,2BAA2B,IACpD,KAAK,CAAC,sBAAsB,EAAE,CACzB,CACT,CACU,CACF;gBAEX,2FAA2F;gBAC3F,eAAe,EAAE,CAEb;YACP,CAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,OAAO,MAAK,KAAK;gBACxC,2FAA2F;gBAC3F,CAAC,sBAAsB,IAAI,CACzB,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,2BAA2B;gBAChD,oBAAC,YAAY,oBACP,KAAK,CAAC,gBAAgB,IAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,KAAK,CAAC,UAAU;oBAC1B,mDAAmD;oBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;oBAC5C,mDAAmD;oBACnD,qBAAqB,EAAE,gBAAgB,IACvC,CACS,CACd,CACG,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied')\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack horizontal grow>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js
CHANGED
@@ -17,9 +17,9 @@ import { EndCall } from './buttons/EndCall';
|
|
17
17
|
import { Microphone } from './buttons/Microphone';
|
18
18
|
import { Participants } from './buttons/Participants';
|
19
19
|
import { ScreenShare } from './buttons/ScreenShare';
|
20
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
20
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
21
21
|
import { People } from './buttons/People';
|
22
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
22
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
23
23
|
import { useLocale } from '../../localization';
|
24
24
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
25
25
|
import { MoreButton } from '../../common/MoreButton';
|
@@ -39,9 +39,9 @@ const controlBarStyles = memoizeFunction((background) => ({ root: { background:
|
|
39
39
|
*/
|
40
40
|
export const CallControls = (props) => {
|
41
41
|
const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);
|
42
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
42
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
43
43
|
const localeStrings = useLocale();
|
44
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
44
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
45
45
|
const peopleButtonStrings = useMemo(() => ({
|
46
46
|
label: localeStrings.strings.call.peopleButtonLabel,
|
47
47
|
tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,
|
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,EAAgC,4CAAmC;AACtF,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,+DAA+D;AAC/D,OAAO,EAAE,+BAA+B,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5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AAsB,EACpD,QAAQ,EAAE,UAAU,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,GAC5C,CACH;gBAEC,mDAAmD,CAAC,6CAA6C;gBACjG,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC,IAAI,6BAA6B,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9E,oBAAC,UAAU,IACT,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/B,SAAS,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,EAAE,EACrD,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,SAAS,GAC7C,CACH;gBAE8D,aAAa,CAAC,SAAS,CAAC;gBACxF,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,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,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) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\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) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\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};\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\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) */\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) */\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(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\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 if (!isRoomsCallTrampoline()) {\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\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\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 /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\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 layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\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 {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\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 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 />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\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 = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
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;A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CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,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) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\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(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\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 /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\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};\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\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\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) */\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(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\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 if (!isRoomsCallTrampoline()) {\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\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\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 /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\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 layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\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 {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\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 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 />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\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 = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
@@ -38,7 +38,7 @@ export const CallPane = (props) => {
|
|
38
38
|
const localeStrings = useLocale();
|
39
39
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
40
40
|
const getStrings = () => {
|
41
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
41
|
+
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
42
42
|
return localeStrings.strings.call;
|
43
43
|
return localeStrings.strings.callWithChat;
|
44
44
|
};
|
@@ -74,7 +74,7 @@ export const CallPane = (props) => {
|
|
74
74
|
alternateCallerId: alternateCallerId }))))))),
|
75
75
|
props.mobileView && (React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
76
76
|
React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !props.activePane, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
|
77
|
-
drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles },
|
77
|
+
drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles() },
|
78
78
|
React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
|
79
79
|
};
|
80
80
|
//# sourceMappingURL=CallPane.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKrH,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;GAGG;AACH,YAAY;AACZ,MAAM,CAAC,MAAM,QAAQ,GAAG,CAA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,kBAChB,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,QAAQ,IACjC,KAAK,IACT,mBAAmB,EAAE,yBAAyB;gCAC9C,6CAA6C;gCAC7C,gBAAgB,EAAE,oBAAoB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO;gCAChB,6CAA6C;gCAC7C,iBAAiB,EAAE,iBAAiB,IACpC,CACkB,CAChB,CACG,CACP,CACG;QACZ,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,mBAAmB,IAAC,OAAO,EAAE,KAAK,CAAC,WAAW;YAC7C,oBAAC,sBAAsB,IACrB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACkB,CACvB;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB;YAClC,oBAAC,WAAW,IAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAI,CAC/E,CACT,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CallAdapter, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\nimport { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,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IAAC,YAAY,QAAC,MAAM,EAAE,2BAA2B;oBAC1D,oBAAC,KAAK,IAAC,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY;wBAChF,oBAAC,mBAAmB,IAAC,OAAO,EAAE,KAAK,CAAC,WAAW;4BAC7C,oBAAC,iBAAiB,kBAChB,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,QAAQ,IACjC,KAAK,IACT,mBAAmB,EAAE,yBAAyB;gCAC9C,6CAA6C;gCAC7C,gBAAgB,EAAE,oBAAoB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO;gCAChB,6CAA6C;gCAC7C,iBAAiB,EAAE,iBAAiB,IACpC,CACkB,CAChB,CACG,CACP,CACG;QACZ,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,mBAAmB,IAAC,OAAO,EAAE,KAAK,CAAC,WAAW;YAC7C,oBAAC,sBAAsB,IACrB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACkB,CACvB;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB,EAAE;YACpC,oBAAC,WAAW,IAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAI,CAC/E,CACT,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CallAdapter, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\nimport { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
|
@@ -7,6 +7,8 @@ export interface ConfigurationpageCameraDropdownProps {
|
|
7
7
|
cameraGrantedDropdown: JSX.Element;
|
8
8
|
cameraPermissionGranted: boolean;
|
9
9
|
dropdownProps?: Record<string, never> & Partial<CallingHandlers>;
|
10
|
+
callReadinessOptedIn?: boolean;
|
11
|
+
onClickEnableDevicePermission?: () => void;
|
10
12
|
}
|
11
13
|
/**
|
12
14
|
* @private
|
@@ -20,9 +20,11 @@ export const ConfigurationpageCameraDropdown = (props) => {
|
|
20
20
|
actionButtonContent: 'Allow'
|
21
21
|
};
|
22
22
|
/* @conditional-compile-remove(call-readiness) */
|
23
|
-
const cameraBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: true, audio: false }, strings: devicePermissionDropdownStringsCamera, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonCameraOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }, props.dropdownProps)));
|
23
|
+
const cameraBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: true, audio: false }, strings: devicePermissionDropdownStringsCamera, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonCameraOn", style: { height: '1.25rem', marginRight: '0.625rem' } }), onClick: props.onClickEnableDevicePermission }, props.dropdownProps)));
|
24
24
|
/* @conditional-compile-remove(call-readiness) */
|
25
|
-
|
25
|
+
if (props.callReadinessOptedIn) {
|
26
|
+
return React.createElement(React.Fragment, null, props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown);
|
27
|
+
}
|
26
28
|
return props.cameraGrantedDropdown;
|
27
29
|
};
|
28
30
|
//# sourceMappingURL=ConfigurationpageCameraDropdown.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigurationpageCameraDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"ConfigurationpageCameraDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAcvD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAA2C,EAAe,EAAE;IAC1G,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,iDAAiD;IACjD,MAAM,qCAAqC,GAAqC;QAC9E,eAAe,EAAE,0BAA0B;QAC3C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IACF,iDAAiD;IACjD,MAAM,qBAAqB,GAAG,CAC5B,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EACxC,OAAO,EAAE,qCAAqC,EAC9C,IAAI,EACF,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,uBAAuB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,EAE/G,OAAO,EAAE,KAAK,CAAC,6BAA6B,IACxC,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,IAAI,KAAK,CAAC,oBAAoB,EAAE;QAC9B,OAAO,0CAAG,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAI,CAAC;KACnG;IAED,OAAO,KAAK,CAAC,qBAAqB,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageCameraDropdownProps {\n cameraGrantedDropdown: JSX.Element;\n cameraPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n callReadinessOptedIn?: boolean;\n onClickEnableDevicePermission?: () => void;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageCameraDropdown = (props: ConfigurationpageCameraDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsCamera: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Camera (optional)',\n actionButtonContent: 'Allow'\n };\n /* @conditional-compile-remove(call-readiness) */\n const cameraBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: true, audio: false }}\n strings={devicePermissionDropdownStringsCamera}\n icon={\n <CallCompositeIcon iconName=\"ControlButtonCameraOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />\n }\n onClick={props.onClickEnableDevicePermission}\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n if (props.callReadinessOptedIn) {\n return <>{props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown}</>;\n }\n\n return props.cameraGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
|
@@ -14,7 +14,9 @@ export const ConfigurationpageErrorBar = (props) => {
|
|
14
14
|
/* @conditional-compile-remove(call-readiness) */
|
15
15
|
onNetworkingTroubleShootingClick,
|
16
16
|
/* @conditional-compile-remove(call-readiness) */
|
17
|
-
permissionsState
|
17
|
+
permissionsState,
|
18
|
+
/* @conditional-compile-remove(call-readiness) */
|
19
|
+
callReadinessOptedIn = false } = props;
|
18
20
|
/* @conditional-compile-remove(call-readiness) */
|
19
21
|
const permissionTroubleshootingGuideStrings = {
|
20
22
|
devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions',
|
@@ -22,7 +24,7 @@ export const ConfigurationpageErrorBar = (props) => {
|
|
22
24
|
dismissButtonText: 'OK'
|
23
25
|
};
|
24
26
|
/* @conditional-compile-remove(call-readiness) */
|
25
|
-
if (showTroubleShootingErrorBar) {
|
27
|
+
if (showTroubleShootingErrorBar && callReadinessOptedIn) {
|
26
28
|
return (React.createElement(_TroubleshootingGuideErrorBar, Object.assign({ troubleshootingGuideStrings: permissionTroubleshootingGuideStrings, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, onNetworkingTroubleshootingClick: onNetworkingTroubleShootingClick, permissionsState: permissionsState }, errorBarProps)));
|
27
29
|
}
|
28
30
|
return React.createElement(ErrorBar, Object.assign({}, errorBarProps));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigurationpageErrorBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOL,6BAA6B,EAC7B,QAAQ,EACT,4CAAmC;
|
1
|
+
{"version":3,"file":"ConfigurationpageErrorBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOL,6BAA6B,EAC7B,QAAQ,EACT,4CAAmC;AAwBpC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqC,EAAe,EAAE;IAC9F,MAAM,EACJ,aAAa;IACb,iDAAiD;IACjD,2BAA2B,GAAG,KAAK;IACnC,iDAAiD;IACjD,iCAAiC;IACjC,iDAAiD;IACjD,gCAAgC;IAChC,iDAAiD;IACjD,gBAAgB;IAChB,iDAAiD;IACjD,oBAAoB,GAAG,KAAK,EAC7B,GAAG,KAAK,CAAC;IAEV,iDAAiD;IACjD,MAAM,qCAAqC,GAAyC;QAClF,wBAAwB,EAAE,mDAAmD;QAC7E,8BAA8B,EAAE,oCAAoC;QACpE,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,iDAAiD;IACjD,IAAI,2BAA2B,IAAI,oBAAoB,EAAE;QACvD,OAAO,CACL,oBAAC,6BAA6B,kBAC5B,2BAA2B,EAAE,qCAAqC,EAClE,iCAAiC,EAAE,iCAAiC,EACpE,gCAAgC,EAAE,gCAAgC,EAClE,gBAAgB,EAAE,gBAAgB,IAC9B,aAAa,EACjB,CACH,CAAC;KACH;IAED,OAAO,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps,\n ActiveErrorMessage,\n ErrorBarProps,\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBar,\n ErrorBar\n} from '@internal/react-components';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\nimport { Common } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport interface ConfigurationpageErrorBarProps {\n errorBarProps: {\n activeErrorMessages: ActiveErrorMessage[];\n } & Common<CallingHandlers, ErrorBarProps>;\n showTroubleShootingErrorBar?: boolean;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n onNetworkingTroubleShootingClick?: () => void;\n permissionsState?: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n callReadinessOptedIn?: boolean;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageErrorBar = (props: ConfigurationpageErrorBarProps): JSX.Element => {\n const {\n errorBarProps,\n /* @conditional-compile-remove(call-readiness) */\n showTroubleShootingErrorBar = false,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n permissionsState,\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn = false\n } = props;\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionTroubleshootingGuideStrings: _TroubleshootingGuideErrorBarStrings = {\n devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions',\n networkTroubleshootingLinkText: 'Troubleshooting Network Connection',\n dismissButtonText: 'OK'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n if (showTroubleShootingErrorBar && callReadinessOptedIn) {\n return (\n <_TroubleshootingGuideErrorBar\n troubleshootingGuideStrings={permissionTroubleshootingGuideStrings}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n onNetworkingTroubleshootingClick={onNetworkingTroubleShootingClick}\n permissionsState={permissionsState}\n {...errorBarProps}\n />\n );\n }\n\n return <ErrorBar {...errorBarProps} />;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\"\"../../../../../acs-ui-common/src\""]}
|
@@ -7,6 +7,8 @@ export interface ConfigurationpageMicDropdownProps {
|
|
7
7
|
micGrantedDropdown: JSX.Element;
|
8
8
|
micPermissionGranted: boolean;
|
9
9
|
dropdownProps?: Record<string, never> & Partial<CallingHandlers>;
|
10
|
+
callReadinessOptedIn?: boolean;
|
11
|
+
onClickEnableDevicePermission?: () => void;
|
10
12
|
}
|
11
13
|
/**
|
12
14
|
* @private
|
@@ -20,11 +20,13 @@ export const ConfigurationpageMicDropdown = (props) => {
|
|
20
20
|
actionButtonContent: 'Allow'
|
21
21
|
};
|
22
22
|
/* @conditional-compile-remove(call-readiness) */
|
23
|
-
const microphoneBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: false, audio: true }, strings: devicePermissionDropdownStringsMicrophone, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonMicOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }, props.dropdownProps)));
|
23
|
+
const microphoneBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: false, audio: true }, strings: devicePermissionDropdownStringsMicrophone, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonMicOn", style: { height: '1.25rem', marginRight: '0.625rem' } }), onClick: props.onClickEnableDevicePermission }, props.dropdownProps)));
|
24
24
|
/* @conditional-compile-remove(call-readiness) */
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
if (props.callReadinessOptedIn) {
|
26
|
+
return React.createElement(React.Fragment, null,
|
27
|
+
" ",
|
28
|
+
props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown);
|
29
|
+
}
|
28
30
|
return props.micGrantedDropdown;
|
29
31
|
};
|
30
32
|
//# sourceMappingURL=ConfigurationpageMicDropdown.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigurationpageMicDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"ConfigurationpageMicDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAcvD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwC,EAAe,EAAE;IACpG,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,iDAAiD;IACjD,MAAM,yCAAyC,GAAqC;QAClF,eAAe,EAAE,8BAA8B;QAC/C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IAEF,iDAAiD;IACjD,MAAM,yBAAyB,GAAG,CAChC,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EACxC,OAAO,EAAE,yCAAyC,EAClD,IAAI,EAAE,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,EAChH,OAAO,EAAE,KAAK,CAAC,6BAA6B,IACxC,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,IAAI,KAAK,CAAC,oBAAoB,EAAE;QAC9B,OAAO;;YAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,yBAAyB,CAAI,CAAC;KAClG;IACD,OAAO,KAAK,CAAC,kBAAkB,CAAC;AAClC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageMicDropdownProps {\n micGrantedDropdown: JSX.Element;\n micPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n callReadinessOptedIn?: boolean;\n onClickEnableDevicePermission?: () => void;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageMicDropdown = (props: ConfigurationpageMicDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsMicrophone: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Microphone (required)',\n actionButtonContent: 'Allow'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n const microphoneBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: false, audio: true }}\n strings={devicePermissionDropdownStringsMicrophone}\n icon={<CallCompositeIcon iconName=\"ControlButtonMicOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />}\n onClick={props.onClickEnableDevicePermission}\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n if (props.callReadinessOptedIn) {\n return <> {props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown}</>;\n }\n return props.micGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
|
@@ -16,6 +16,8 @@ export interface LocalDeviceSettingsType {
|
|
16
16
|
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
|
17
17
|
onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;
|
18
18
|
onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;
|
19
|
+
callReadinessOptedIn?: boolean;
|
20
|
+
onClickEnableDevicePermission?: () => void;
|
19
21
|
}
|
20
22
|
/**
|
21
23
|
* @private
|
@@ -59,7 +59,7 @@ const localVideoViewOptions = {
|
|
59
59
|
* @private
|
60
60
|
*/
|
61
61
|
export const LocalDeviceSettings = (props) => {
|
62
|
-
var _a;
|
62
|
+
var _a, _b, _c;
|
63
63
|
const theme = useTheme();
|
64
64
|
const locale = useLocale();
|
65
65
|
/* @conditional-compile-remove(call-readiness) */
|
@@ -117,13 +117,21 @@ export const LocalDeviceSettings = (props) => {
|
|
117
117
|
React.createElement(Label, { id: 'call-composite-local-camera-settings-label', className: mergeStyles(dropDownStyles(theme).label), disabled: !cameraPermissionGranted }, cameraLabel),
|
118
118
|
React.createElement(ConfigurationpageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false,
|
119
119
|
/* @conditional-compile-remove(call-readiness) */
|
120
|
-
dropdownProps: dropdownProps
|
120
|
+
dropdownProps: dropdownProps,
|
121
|
+
/* @conditional-compile-remove(call-readiness) */
|
122
|
+
callReadinessOptedIn: (_b = props.callReadinessOptedIn) !== null && _b !== void 0 ? _b : false,
|
123
|
+
/* @conditional-compile-remove(call-readiness) */
|
124
|
+
onClickEnableDevicePermission: props.onClickEnableDevicePermission }))),
|
121
125
|
React.createElement(Stack, null,
|
122
126
|
React.createElement(Label, { id: 'call-composite-local-sound-settings-label', className: mergeStyles(dropDownStyles(theme).label), disabled: !micPermissionGranted }, soundLabel),
|
123
127
|
React.createElement(Stack, { "data-ui-id": "call-composite-sound-settings", tokens: mainStackTokens },
|
124
128
|
React.createElement(ConfigurationpageMicDropdown, { micGrantedDropdown: micGrantedDropdown, micPermissionGranted: micPermissionGranted !== null && micPermissionGranted !== void 0 ? micPermissionGranted : false,
|
125
129
|
/* @conditional-compile-remove(call-readiness) */
|
126
|
-
dropdownProps: dropdownProps
|
130
|
+
dropdownProps: dropdownProps,
|
131
|
+
/* @conditional-compile-remove(call-readiness) */
|
132
|
+
callReadinessOptedIn: (_c = props.callReadinessOptedIn) !== null && _c !== void 0 ? _c : false,
|
133
|
+
/* @conditional-compile-remove(call-readiness) */
|
134
|
+
onClickEnableDevicePermission: props.onClickEnableDevicePermission }),
|
127
135
|
React.createElement(Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: props.speakers.length === 0, options: getDropDownList(props.speakers), defaultSelectedKey: props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers), onChange: (event, option, index) => {
|
128
136
|
props.onSelectSpeaker(props.speakers[index !== null && index !== void 0 ? index : 0]);
|
129
137
|
}, onRenderTitle: (props) => onRenderTitle('Speaker', props) })))));
|