import React, { Component } from 'react'; import { type IconDefinition } from '@deephaven/icons'; import './HierarchicalCheckboxMenu.scss'; export type HierarchicalCheckboxValueMap = Map>; type HierarchicalCheckboxMenuProps = { className: string; menuText: string; valueMap: HierarchicalCheckboxValueMap; onUpdateValueMap: (map: HierarchicalCheckboxValueMap) => void; icon: IconDefinition | null; id: string; 'data-testid'?: string; }; type HierarchicalCheckboxMenuState = { menuIsOpen: boolean; }; /** * A pull down menu that displays a hierarchy of checkboxes. * * Currently supports only two levels of check boxes. The input should be a Map * where the keys are the parent names. The values can a boolean if the parent * has no children or another Map where keys are child names and values are booleans. * * Here is an example: * const INITIAL_TYPE_MAP = new Map([ * ['Queries', new Map([['Live', true], ['Batch', true]])], * [ * 'DBA Queries', * new Map([ * ['Data Merge', true], * ['Data Validation', true], * ['Imports', true], * ['Data Services', true], * ]), * ], * ['Helper Queries', true], * ]); * * When a checkbox is changed, this component will make a deep copy of the Map * with the appropriate booleans changed. It will then call onUpdateValueMap * with the new Map. */ declare class HierarchicalCheckboxMenu extends Component { static defaultProps: Partial; static isParentSelected(parent: string, valueMap: HierarchicalCheckboxValueMap): boolean | null; constructor(props: HierarchicalCheckboxMenuProps); toggleMenu(event: React.MouseEvent): void; toggleValueFor(parent: string, child?: string): void; setAllValues(value: boolean): void; selectAll(): void; clear(): void; renderMenuElement(): JSX.Element; render(): JSX.Element; } export default HierarchicalCheckboxMenu; //# sourceMappingURL=HierarchicalCheckboxMenu.d.ts.map