UNPKG

geostyler

Version:
28 lines (27 loc) 1.16 kB
import { default as React } from 'react'; import { Rule as GsRule } from 'geostyler-style'; import { TableProps } from 'antd/lib/table'; import { RuleComposableProps } from '../RuleCard/RuleCard'; export interface RuleRecord extends GsRule { key: string; amount?: number; duplicates?: number; maxScale?: number; minScale?: number; } export interface RuleTableInternalProps { /** The renderer to use */ rendererType?: 'SLD' | 'OpenLayers'; /** List of rules to display in rule table */ rules: GsRule[]; /** The footer of the rule table */ footer?: (currentPageData?: any) => React.ReactNode; /** The callback function that is triggered when the rules change */ onRulesChange?: (rules: GsRule[]) => void; /** The callback function that is triggered when the selection changes */ onSelectionChange?: (selectedRowKeys: string[], selectedRows: any[]) => void; onCloneRule?: (index: number) => void; onRemoveRule?: (index: number) => void; } export type RuleTableProps = RuleTableInternalProps & RuleComposableProps & TableProps<RuleRecord>; export declare const RuleTable: React.FC<RuleTableProps>;