@kelvininc/ui-components
Version:
Kelvin UI Components
15 lines (14 loc) • 1.83 kB
TypeScript
import { ISelectMultiOptions, ISelectOptionWithChildren, ISelectOptionsWithChildren, ISelectSingleOptions } from '../types';
export declare const getSelectableOptions: (options?: ISelectOptionsWithChildren) => ISelectOptionsWithChildren;
export declare const getSelectableOptionsFromArray: (options: ISelectOptionWithChildren[]) => ISelectOptionWithChildren[];
export declare const getSelectedSelectableOptions: (options?: ISelectMultiOptions, selectedOptions?: Record<string, boolean>) => ISelectMultiOptions;
export declare const getFlattenSelectOptions: (selectOptions?: ISelectOptionsWithChildren) => ISelectOptionsWithChildren;
export declare const getFlattenSelectOptionsArray: (selectOptions?: ISelectOptionsWithChildren) => ISelectOptionWithChildren[];
export declare const flattenSelectOptionsArray: (selectOptions?: ISelectOptionWithChildren[]) => ISelectOptionWithChildren[];
export declare const buildSelectedOptions: (options: ISelectMultiOptions, selected: string[]) => Record<string, boolean>;
export declare const buildAllOptionsSelected: (options?: ISelectMultiOptions) => Record<string, boolean>;
export declare const getSelectedCount: (selectedOptions?: Record<string, boolean>) => number;
export declare const buildPartialOptionsSelected: (options: ISelectMultiOptions, maxSelectable: number, currentSelectedCount: number) => Record<string, boolean> | undefined;
export declare const getPreviousHightlightableOption: (options: ISelectOptionWithChildren[], highlightedOption?: string) => string | undefined;
export declare const getNextHightlightableOption: (options: ISelectOptionWithChildren[], highlightedOption?: string) => string | undefined;
export declare const searchDropdownOptions: (term: string, options?: ISelectSingleOptions | ISelectMultiOptions) => ISelectSingleOptions | ISelectMultiOptions;