Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
webphone,
locale,
contactMatcher,
regionSettings,
brand,
forwardingNumber,
callMonitor,
contactSearch,
},
}) {
const currentSession = webphone.activeSession || {};
const contactMapping = contactMatcher && contactMatcher.dataMapping;
const fromMatches = (contactMapping && contactMapping[currentSession.from]) || [];
const toMatches = (contactMapping && contactMapping[currentSession.to]) || [];
const nameMatches =
currentSession.direction === callDirections.outbound ? toMatches : fromMatches;
return {
brand: brand.fullName,
nameMatches,
currentLocale: locale.currentLocale,
session: currentSession,
areaCode: regionSettings.areaCode,
countryCode: regionSettings.countryCode,
flipNumbers: forwardingNumber.flipNumbers,
calls: callMonitor.calls,
searchContactList: contactSearch.sortedResult,
};
}
locale,
contactMatcher,
contactSearch,
regionSettings,
forwardingNumber,
brand,
},
showContactDisplayPlaceholder = false,
phoneTypeRenderer
}) {
const currentSession = webphone.ringSession || {};
const contactMapping = contactMatcher && contactMatcher.dataMapping;
const fromMatches = (contactMapping && contactMapping[currentSession.from]) || [];
const toMatches = (contactMapping && contactMapping[currentSession.to]) || [];
const nameMatches =
currentSession.direction === callDirections.outbound ? toMatches : fromMatches;
return {
brand: brand.fullName,
nameMatches,
currentLocale: locale.currentLocale,
session: currentSession,
activeSessionId: webphone.activeSessionId,
areaCode: regionSettings.areaCode,
countryCode: regionSettings.countryCode,
forwardingNumbers: forwardingNumber.forwardingNumbers,
showContactDisplayPlaceholder,
searchContactList: contactSearch.sortedResult,
phoneTypeRenderer
};
}
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) {
case messageTypes.fax: {
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]: "语音邮件",
[callResults.rejected]: "已拒绝",
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]: "Entrant",
[callDirections.outbound]: "Sortant",
status: "Statut :",
InboundNumber: "Identifiant de l'appelant :",
OutboundNumber: "A appelé :",
InboundDirection: "Appel entrant de :",
OutboundDirection: "Appel sortant à :",
[telephonyStatuses.noCall]: "Déconnecté",
[telephonyStatuses.callConnected]: "Connecté",
[telephonyStatuses.ringing]: "Sonnerie en cours",
[telephonyStatuses.onHold]: "En attente",
[telephonyStatuses.parkedCall]: "Parqué",
[callResults.unknown]: "Inconnu",
[callResults.missed]: "Manqué",
[callResults.callAccepted]: "Réponse obtenue",
[callResults.accepted]: "Réponse obtenue",
[callResults.voicemail]: "Messagerie vocale",
[callResults.rejected]: "Refusé",
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import dynamicsFont from 'ringcentral-widgets/assets/DynamicsFont/DynamicsFont.scss';
import callDirections from 'ringcentral-integration/enums/callDirections';
import callResults from 'ringcentral-integration/enums/callResults';
import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus';
import { isMissed } from 'ringcentral-integration/lib/callLogHelpers';
import i18n from './i18n';
import styles from './styles.scss';
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,
callResults.busy,
contact = null,
useContact = false,
}) {
let sessionId = null;
let currentContact = contact;
let ready =
dateTimeFormat.ready &&
locale.ready &&
recentMessages.ready &&
recentCalls.ready;
if (!useContact) {
const session = getSession();
sessionId = session.id;
currentContact = session.contactMatch;
const contactMapping = contactMatcher && contactMatcher.dataMapping;
const phoneNumber = session.direction === callDirections.outbound ?
session.to : session.from;
if (!currentContact) {
currentContact = contactMapping && contactMapping[phoneNumber];
if (currentContact && currentContact.length >= 1) {
currentContact = currentContact[0];
}
}
ready = ready && contactMatcher.ready;
}
return {
currentLocale,
title: i18n.getString('recentActivities', locale.currentLocale),
showSpinner: !ready,
currentContact,
calls: recentCalls.calls || [],
tabs: getTabs({
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]: "ボイスメール",
[callResults.rejected]: "拒否済み",
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]: "In entrata",
[callDirections.outbound]: "In uscita",
status: "Stato:",
InboundNumber: "ID chiamante:",
OutboundNumber: "Chiamato:",
InboundDirection: "In entrata da:",
OutboundDirection: "In uscita verso:",
[telephonyStatuses.noCall]: "Disconnessa",
[telephonyStatuses.callConnected]: "Connessa",
[telephonyStatuses.ringing]: "Squillo",
[telephonyStatuses.onHold]: "In attesa",
[telephonyStatuses.parkedCall]: "Parcheggiata",
[callResults.unknown]: "Sconosciuto",
[callResults.missed]: "Persa",
[callResults.callAccepted]: "Risposta",
[callResults.accepted]: "Risposta",
[callResults.voicemail]: "Segreteria telefonica",
[callResults.rejected]: "Rifiutata",
webphone.onCallStart((session) => {
if (session.direction === callDirections.outbound) {
return;
}
const path = `/calls/active/${session.id}`;
if (routerInteraction.currentPath !== path) {
if (routerInteraction.currentPath.indexOf('/calls/active') === 0) {
routerInteraction.replace(path);
} else {
routerInteraction.push(path);
}
}
});