UNPKG

@gpa-gemstone/common-pages

Version:
37 lines (36 loc) 1.89 kB
import * as React from 'react'; import { GenericSlice, Search } from '@gpa-gemstone/react-interactive'; import { OpenXDA, SystemCenter, Application } from '@gpa-gemstone/application-typings'; interface U { ID: number | string; } interface IProps<T extends U> { /** A Generic Slyce for the Search */ Slice: GenericSlice<T>; /** Functions that gets available values for any ENUM Types */ GetEnum: (setOptions: (options: IOptions[]) => void, field: Search.IField<T>) => () => void; /** Function that Grabs any additional Filters that shoudl be available (such as Addl Fields) */ GetAddlFields: (setAddlFields: (cols: Search.IField<T>[]) => void) => () => void; AddlFilters?: Search.IFilter<T>[]; StorageID?: string; } interface IOptions { Value: string; Label: string; } /** This Implements a few standardized SearchBars */ export declare namespace DefaultSearch { /** This Implements a standard Meter Search */ const Meter: (props: React.PropsWithChildren<IProps<SystemCenter.Types.DetailedMeter>>) => JSX.Element; /** This Implements a standard Substation Search */ const Location: (props: React.PropsWithChildren<IProps<SystemCenter.Types.DetailedLocation>>) => JSX.Element; /** This Implements a standard Transmission Asset Search */ const Asset: (props: React.PropsWithChildren<IProps<SystemCenter.Types.DetailedAsset>>) => JSX.Element; /** This Implements a standard AssetGroup Search */ const AssetGroup: (props: React.PropsWithChildren<IProps<OpenXDA.Types.AssetGroup>>) => JSX.Element; /** This Implements a standard User Search */ const User: (props: React.PropsWithChildren<IProps<Application.Types.iUserAccount>>) => JSX.Element; /** This Implements a standard Customer Search */ const Customer: (props: React.PropsWithChildren<IProps<OpenXDA.Types.Customer>>) => JSX.Element; } export {};