UNPKG

@pagamio/frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

58 lines (57 loc) 1.73 kB
import React from 'react'; import type { ApiErrorResponse } from '../../api'; import type { QueryProps } from '../../shared/types'; import type { ChartOptionsProps, ChartToolTipProps } from '../types'; export type ColumnProps = { header: string; accessor: string; }; export type StatisticsMetricsProps = { title: string; format: string; value: number; previousValue?: number; change: number; isEmpty: boolean; loading: boolean; error?: ApiErrorResponse; currency?: string; refresh: () => void; }; export type DistributionMetricsProps = { title: string; data: ChartOptionsProps<unknown>; isEmpty: boolean; loading: boolean; error?: ApiErrorResponse; refresh: () => void; chartToolTip?: ChartToolTipProps; }; interface DetailsModalProps { isOpen: boolean; onClose: () => void; error?: ApiErrorResponse; isEmpty: boolean; loading: boolean; refresh: () => void; data: any[]; columns: any[]; title?: string; itemMetricsData: StatisticsMetricsProps; valueMetricsData: StatisticsMetricsProps; averageMetricsData: StatisticsMetricsProps; distributionMetricsData: DistributionMetricsProps; chartData: ChartOptionsProps<unknown>; top5PerformingItems: ChartOptionsProps<unknown>; bottom5NonPerformingItems: ChartOptionsProps<unknown>; valueKey: string; searchKey: string; dataGridQuery: QueryProps; searchInputPlaceHolder: string; renderDetailsChart: boolean; detailsTableTitle?: string; topFivePerformingChartTitle?: string; bottomFivePerformingChartTitle?: string; } declare const ChartDetailsModal: React.FC<DetailsModalProps>; export default ChartDetailsModal;