Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
callStatus,
currentLocale,
callDirection,
onTransfer,
isOnTransfer,
isOnHold,
onUnHold,
onHold,
disableLinks,
isWide,
transferRef,
} = props;
// reject conditions: call direction is inbound & call status is ringing
const isInComingCall =
callDirections.inbound === callDirection &&
telephonyStatuses.ringing === callStatus;
const muteIcon = isOnMute ? MuteIcon : UnmuteIcon;
const muteAction = isOnMute ? onUnmute : onMute;
const muteTitle = isOnMute ? 'unmute' : 'mute';
const holdTitle = isOnHold ? 'onHold' : 'hold';
const holdAction = isOnHold ? onUnHold : onHold;
const endTitle = isInComingCall ? 'reject' : 'hangup';
const endAction = isInComingCall ? onReject : onHangup;
const disabledCtrl = callStatus === telephonyStatuses.ringing;
return (
<div>
<span title="{i18n.getString(muteTitle,">
</span></div>
} from 'ringcentral-integration/lib/callLogHelpers';
import parseNumber from 'ringcentral-integration/lib/parseNumber';
import formatNumber from 'ringcentral-integration/lib/formatNumber';
import dynamicsFont from '../../assets/DynamicsFont/DynamicsFont.scss';
import DurationCounter from '../DurationCounter';
import ContactDisplay from '../ContactDisplay';
import formatDuration from '../../lib/formatDuration';
import ActionMenu from '../ActionMenu';
import FaxInboundIcon from '../../assets/images/FaxInbound.svg';
import FaxOutboundIcon from '../../assets/images/FaxOutbound.svg';
import styles from './styles.scss';
import i18n from './i18n';
const callIconMap = {
[callDirections.inbound]: dynamicsFont.inbound,
[callDirections.outbound]: dynamicsFont.outbound,
missed: dynamicsFont.missed,
};
function CallIcon({
direction,
missed,
active,
ringing,
inboundTitle,
outboundTitle,
missedTitle,
type,
}) {
let icon = null;
switch (type) {
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
export default {
[callDirections.inbound]: "Entrante",
[callDirections.outbound]: "Saliente",
status: "Estado:",
InboundNumber: "Identificador de llamadas:",
OutboundNumber: "Llamada de:",
InboundDirection: "Llamada entrante de:",
OutboundDirection: "Llamada saliente a:",
[telephonyStatuses.noCall]: "Desconectada",
[telephonyStatuses.callConnected]: "Conectada",
[telephonyStatuses.ringing]: "Llamando",
[telephonyStatuses.onHold]: "En espera",
[telephonyStatuses.parkedCall]: "Aparcada",
[callResults.unknown]: "Desconocido",
[callResults.missed]: "Perdida",
[callResults.callAccepted]: "Atendida",
[callResults.accepted]: "Atendida",
[callResults.voicemail]: "Buzón de voz",
<span>
);
CallIcon.propTypes = {
title: PropTypes.string,
iconClassName: PropTypes.string.isRequired,
};
CallIcon.defaultProps = {
title: '',
};
const callIconMap = {
[callResults.missed]: dynamicsFont.missed,
[callDirections.inbound]: dynamicsFont.inbound,
[callDirections.outbound]: dynamicsFont.outbound,
[telephonyStatuses.ringing]: dynamicsFont.callHover,
};
const colorStatusMap = {
green: [
telephonyStatuses.callConnected,
telephonyStatuses.ringing,
callResults.callAccepted,
callResults.accepted,
],
red: [
callResults.missed,
callResults.voicemail,
callResults.rejected,
callResults.blocked,
callResults.noAnswer,</span>
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
export default {
[callDirections.inbound]: "呼入",
[callDirections.outbound]: "呼出",
status: "状态:",
InboundNumber: "主叫显示号码:",
OutboundNumber: "被叫:",
InboundDirection: "呼入自:",
OutboundDirection: "呼出至:",
[telephonyStatuses.noCall]: "已断开连接",
[telephonyStatuses.callConnected]: "已连接",
[telephonyStatuses.ringing]: "正在振铃",
[telephonyStatuses.onHold]: "等候接听",
[telephonyStatuses.parkedCall]: "已寄存",
[callResults.unknown]: "未知",
[callResults.missed]: "未接",
[callResults.callAccepted]: "已接",
[callResults.accepted]: "已接",
[callResults.voicemail]: "语音邮件",
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
export default {
[callDirections.inbound]: "撥入電話",
[callDirections.outbound]: "撥出電話",
status: "狀態:",
InboundNumber: "來電者 ID:",
OutboundNumber: "已撥號:",
InboundDirection: "撥入電話自:",
OutboundDirection: "撥出電話至:",
[telephonyStatuses.noCall]: "中斷連接",
[telephonyStatuses.callConnected]: "已連線",
[telephonyStatuses.ringing]: "鈴響",
[telephonyStatuses.onHold]: "等待接通",
[telephonyStatuses.parkedCall]: "已寄存",
[callResults.unknown]: "未知",
[callResults.missed]: "未接",
[callResults.callAccepted]: "已接聽",
[callResults.accepted]: "已接聽",
[callResults.voicemail]: "語音信箱",
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
export default {
[callDirections.inbound]: "撥入電話",
[callDirections.outbound]: "撥出電話",
status: "狀態:",
InboundNumber: "來電者 ID:",
OutboundNumber: "已撥號:",
InboundDirection: "撥入電話自:",
OutboundDirection: "撥出電話至:",
[telephonyStatuses.noCall]: "中斷連接",
[telephonyStatuses.callConnected]: "已連線",
[telephonyStatuses.ringing]: "鈴響",
[telephonyStatuses.onHold]: "等待接通",
[telephonyStatuses.parkedCall]: "已寄存",
[callResults.unknown]: "未知",
[callResults.missed]: "未接",
[callResults.callAccepted]: "已接聽",
[callResults.accepted]: "已接聽",
[callResults.voicemail]: "語音信箱",
if (!contactName) {
if (activityMatches.length < SINGLE_OR_NONE_MATCH) {
return i18n.getString('Unknown', currentLocale);
}
return i18n.getString('Multiple', currentLocale);
}
return contactName;
}
function getNumber(numberObj) {
const { extensionNumber, phoneNumber } = numberObj;
return phoneNumber || extensionNumber || numberObj;
}
switch (direction) {
case callDirection.inbound: {
fallBackName = getName(call);
fallBackNumber = getNumber(call.from);
break;
}
case callDirection.outbound: {
fallBackName = getName(call);
fallBackNumber = getNumber(call.to);
break;
}
default:
break;
}
return {
fallBackName,
fallBackNumber,
direction === messageDirection.inbound ? (
<span title="{inboundTitle}">
</span>
) : (
<span title="{outboundTitle}">
</span>
);
break;
}
default: {
let title = null;
if (missed) {
title = missedTitle;
} else if (direction === callDirections.inbound) {
title = inboundTitle;
} else {
title = outboundTitle;
}
icon = (
<span title="{title}">
);
}</span>
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import callDirections from 'ringcentral-integration/enums/callDirections';
export default {
[callDirections.inbound]: "Inbound",
[callDirections.outbound]: "Outbound",
status: "Status:",
InboundNumber: "Caller ID:",
OutboundNumber: "Called:",
InboundDirection: "Inbound from:",
OutboundDirection: "Outbound to:",
[telephonyStatuses.noCall]: "Disconnected",
[telephonyStatuses.callConnected]: "Connected",
[telephonyStatuses.ringing]: "Ringing",
[telephonyStatuses.onHold]: "On Hold",
[telephonyStatuses.parkedCall]: "Parked",
[callResults.unknown]: "Unknown",
[callResults.missed]: "Missed",
[callResults.callAccepted]: "Answered",
[callResults.accepted]: "Answered",
[callResults.voicemail]: "Voicemail",