@chayns-components/person-finder
Version:
A set of beautiful React components for developing your own applications with chayns.
27 lines (26 loc) • 1.21 kB
TypeScript
import { PersonEntry, PersonFinderData, PersonFinderDataMap, PersonFinderEntry, PersonFinderFilterTypes, SiteEntry } from '../types/personFinder';
export declare const getGroupName: (key: string) => string | undefined;
export declare const isSiteEntry: (entry: PersonEntry | SiteEntry) => entry is SiteEntry;
interface FilterDataByKeysOptions {
excludedEntryIds?: PersonFinderEntry['id'][];
shouldShowOwnUser?: boolean;
}
export declare const filterDataByKeys: (data?: {
[key: string]: PersonFinderData;
}, keys?: PersonFinderFilterTypes[], options?: FilterDataByKeysOptions) => {
[key: string]: PersonFinderData;
};
export declare const capitalizeFirstLetter: (str: string) => string;
export declare const destructureData: (data: Record<string, PersonFinderData> | undefined, filterType: string) => {
count: number;
skip: number;
searchString: string;
entries: PersonFinderEntry[];
};
interface LoadDataOptions {
searchString: string;
filter: PersonFinderFilterTypes[];
skipMap: Partial<Record<PersonFinderFilterTypes, number>>;
}
export declare const loadData: ({ skipMap, searchString, filter, }: LoadDataOptions) => Promise<PersonFinderDataMap>;
export {};