@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
40 lines (39 loc) • 1.23 kB
TypeScript
import React from 'react';
import type { FilterConfig } from './components/types';
type FilterValue = string | string[] | Date | null | undefined;
interface Config {
title: string;
summary: string;
filters: FilterConfig[];
tourFilters?: FilterConfig[];
themeColor?: string;
}
export interface MetricsDataProps {
id: number;
gridColSpan?: number;
metricData: any;
}
export interface VisualDataProps {
id: number;
sectionTitle: string;
data: MetricsDataProps[];
}
interface DashboardWrapperProps {
data: {
config: Config;
visualData: VisualDataProps[];
eventsVisualData?: VisualDataProps[];
};
showVisualHeader?: boolean;
showEventsTabbedLayout?: boolean;
handleFilterChange?: (name: string, value: FilterValue) => void;
handleTourFilterChange?: (name: string, value: FilterValue) => void;
selectedFilters?: Record<string, FilterValue>;
tourSelectedFilters?: Record<string, FilterValue>;
resetFilters?: () => void;
handleApplyFilters?: () => void;
handleApplyTourFilters?: () => void;
}
declare const DashboardWrapper: React.FC<DashboardWrapperProps>;
export default DashboardWrapper;
export type { DashboardWrapperProps };