UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

217 lines 8.35 kB
import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src"; /** * @private */ export const getDeviceManager = (state) => state.deviceManager; /** * @private */ export const getRole = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.role; }; /** * @private */ export const isHideAttendeeNamesEnabled = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.hideAttendeeNames) !== null && _b !== void 0 ? _b : false; }; /** * @private */ export const getCapabilities = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; }; /** * @private */ export const getLatestCapabilitiesChangedInfo = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.latestCapabilitiesChangeInfo; }; /** * @private */ export const getCallExists = (state, props) => !!state.calls[props.callId]; /** * @private */ export const getDominantSpeakers = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.dominantSpeakers; }; /** * @private */ export const getRemoteParticipants = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.remoteParticipants; }; /** * @private */ export const getRemoteParticipantsEnded = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.remoteParticipantsEnded; }; /** * @private */ export const getLocalParticipantRaisedHand = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.raiseHand) === null || _b === void 0 ? void 0 : _b.localParticipantRaisedHand; }; /** * @private */ export const getSpotlightCallFeature = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.spotlight; }; /** * @private */ export const getLocalParticipantReactionState = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.localParticipantReaction; }; /** * @private */ export const getIsScreenSharingOn = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn; }; /** * @private */ export const getIsMuted = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.isMuted; }; /** * @private */ export const getOptimalVideoCount = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.optimalVideoCount.maxRemoteVideoStreams; }; /** * @private */ export const getLocalVideoStreams = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.localVideoStreams; }; /** * @private */ export const getScreenShareRemoteParticipant = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.screenShareRemoteParticipant; }; /** * @private */ export const getDisplayName = (state) => { var _a; return (_a = state.callAgent) === null || _a === void 0 ? void 0 : _a.displayName; }; /** * @private */ export const getIdentifier = (state) => toFlatCommunicationIdentifier(state.userId); /** * @private */ export const getLatestErrors = (state) => state.latestErrors; /** * @private */ export const getLatestNotifications = (state) => state.latestNotifications; /** * @private */ export const getDiagnostics = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.diagnostics; }; /** * @private */ export const getCallState = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.state; }; /** * @private */ export const getEnvironmentInfo = (state) => { return state.environmentInfo; }; /** @private */ export const getParticipantCount = (state, props) => { var _a; /* @conditional-compile-remove(total-participant-count) */ return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.totalParticipantCount; return undefined; }; /** @private */ export const getCaptionsKind = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.captionsKind; }; /** @private */ export const getCaptions = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.captions; }; /** @private */ export const getCaptionsStatus = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive; }; /** @private */ export const getStartCaptionsInProgress = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.startCaptionsInProgress; }; /** @private */ export const getCurrentCaptionLanguage = (state, props) => { var _a, _b; // we default to 'en' if the currentCaptionLanguage is not set if (((_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentCaptionLanguage) === '') { return 'en'; } return (_b = state.calls[props.callId]) === null || _b === void 0 ? void 0 : _b.captionsFeature.currentCaptionLanguage; }; /** @private */ export const getCurrentSpokenLanguage = (state, props) => { var _a; // when currentSpokenLanguage is '', it means the spoken language is not set. // In this case we suggest showing the captions modal to set the spoken language when starting captions return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentSpokenLanguage; }; /** @private */ export const getSupportedCaptionLanguages = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedCaptionLanguages; }; /** @private */ export const getSupportedSpokenLanguages = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedSpokenLanguages; }; /** @private */ export const getMeetingConferencePhones = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.meetingConference) === null || _b === void 0 ? void 0 : _b.conferencePhones; }; /** * selector for retrieving the incoming calls from state * @returns the incoming calls in the call client state * @private */ export const getIncomingCalls = (state) => { return Object.values(state.incomingCalls); }; /** * selector for retrieving the incoming calls that have been removed from state * @returns the incoming calls that have been removed * @private */ export const getRemovedIncomingCalls = (state) => { return Object.values(state.incomingCallsEnded); }; /** @private */ export const getAssignedBreakoutRoom = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.breakoutRooms) === null || _b === void 0 ? void 0 : _b.assignedBreakoutRoom; }; /** @private */ export const getRealTimeTextStatus = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.realTimeTextFeature.isRealTimeTextFeatureActive; }; /** @private */ export const getRealTimeText = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.realTimeTextFeature.realTimeTexts; }; /** * @private */ export const getTogetherModeCallFeature = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.togetherMode; }; //# sourceMappingURL=baseSelectors.js.map