synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
45 lines (44 loc) • 1.46 kB
TypeScript
import { FacetSelection } from '../../containers/QueryWrapper';
import { QueryBundleRequest } from '../synapseTypes/';
import { FacetColumnResultValueCount } from '../synapseTypes/';
/**
* Calculates the state of a specific facet value given the current state
* of the application.
*
* @param
* isLoading: boolean | undefined,
* lastFacetSelection: FacetSelection | undefined,
* curFacetSelection: any,
* columnName: string
* @returns boolean
*/
export declare const getIsValueSelected: ({ isLoading, lastFacetSelection, curFacetSelection, columnName, }: {
isLoading: boolean | undefined;
lastFacetSelection: FacetSelection | undefined;
curFacetSelection: FacetColumnResultValueCount;
columnName: string;
}) => boolean;
export declare type SyntheticHTMLInputElement = {
value: string;
checked: boolean;
};
/**
* Function reads over a set of checkboxes and then returns a corresponding
* queryRequest given the state of the prior queryRequest
* htmlCheckboxes: any,
* selector : string,
* queryRequest: QueryBundleRequest,
* facet: string,
* value?: string
* }
* @returns
*/
export declare const readFacetValues: ({ htmlCheckboxes, selector, queryRequest, facet, value, }: {
htmlCheckboxes: SyntheticHTMLInputElement[];
selector: string;
queryRequest: QueryBundleRequest;
facet: string;
value?: string | undefined;
}) => {
newQueryRequest: QueryBundleRequest;
};