UNPKG

drizzle-cube

Version:

Drizzle ORM-first semantic layer with Cube.js compatibility. Type-safe analytics and dashboards with SQL injection protection.

55 lines (54 loc) 2 kB
import { default as React, HTMLAttributes, ReactNode, CSSProperties, ComponentType } from 'react'; import { DashboardFilter, PortletConfig } from '../types'; import { ColorPalette } from '../utils/colorPalettes'; /** * Simplified props interface after Zustand migration. * State (isEditMode, selectedFilterId, debugData) now comes from store. * Actions now come from callbacks prop or store. */ interface DashboardPortletCardProps { portlet: PortletConfig; editable: boolean; dashboardFilters?: DashboardFilter[]; configEagerLoad?: boolean; loadingComponent?: ReactNode; colorPalette?: ColorPalette; containerProps?: HTMLAttributes<HTMLDivElement>; headerProps?: HTMLAttributes<HTMLDivElement>; setPortletRef: (portletId: string, element: HTMLDivElement | null) => void; setPortletComponentRef: (portletId: string, element: { refresh: () => void; } | null) => void; callbacks: { onToggleFilter: (portletId: string, filterId: string) => void; onRefresh: (portletId: string) => void; onDuplicate: (portletId: string) => void; onEdit: (portlet: PortletConfig) => void; onDelete: (portletId: string) => void; onOpenFilterConfig: (portlet: PortletConfig) => void; }; icons: { RefreshIcon: ComponentType<{ className?: string; style?: CSSProperties; }>; EditIcon: ComponentType<{ className?: string; style?: CSSProperties; }>; DeleteIcon: ComponentType<{ className?: string; style?: CSSProperties; }>; CopyIcon: ComponentType<{ className?: string; style?: CSSProperties; }>; FilterIcon: ComponentType<{ className?: string; style?: CSSProperties; }>; }; } declare const DashboardPortletCard: React.NamedExoticComponent<DashboardPortletCardProps>; export default DashboardPortletCard;