import React from 'react'; import { Intent, Position, Button, Tooltip } from '@blueprintjs/core'; import { FormattedMessage as T, useIntl } from 'react-intl'; import { Icon, Money, Hint } from 'components'; import { AccountsListFieldCell, MoneyFieldCell, InputGroupCell, ContactsListFieldCell, } from 'components/DataTableCells'; import { safeSumBy } from 'utils'; /** * Contact header cell. */ export function ContactHeaderCell() { return ( <> } position={Position.LEFT_BOTTOM} /> ); } /** * Account footer cell. */ function AccountFooterCell() { return {'Total USD'}; } /** * Total credit table footer cell. */ function TotalCreditFooterCell({ rows }) { const credit = safeSumBy(rows, 'original.credit'); return ( ); } /** * Total debit table footer cell. */ function TotalDebitFooterCell({ rows }) { const debit = safeSumBy(rows, 'original.debit'); return ( ); } /** * Actions cell renderer. */ export const ActionsCellRenderer = ({ row: { index }, column: { id }, cell: { value: initialValue }, data, payload, }) => { const onClickRemoveRole = () => { payload.removeRow(index); }; return ( } position={Position.LEFT}>