@openproject/primer-view-components
Version:
ViewComponents of the Primer Design System for OpenProject
48 lines (47 loc) • 2.27 kB
TypeScript
import { SelectStrategy, SelectVariant, TreeViewSubTreeNodeElement } from './tree_view_sub_tree_node_element';
import type { TreeViewCheckedValue, TreeViewNodeInfo, TreeViewNodeType } from '../../shared_events';
export declare class TreeViewElement extends HTMLElement {
#private;
formInputContainer: HTMLElement;
formInputPrototype: HTMLInputElement;
connectedCallback(): void;
rootLeafNodes(): NodeListOf<HTMLElement>;
rootSubTreeNodes(): NodeListOf<TreeViewSubTreeNodeElement>;
disconnectedCallback(): void;
handleEvent(event: Event): void;
handleSingleSelection(event: Event, node: Element): void;
getFormInputValueForNode(node: Element): string | null;
getNodePath(node: Element): string[];
getNodeType(node: Element): TreeViewNodeType | null;
markCurrentAtPath(path: string[]): void;
get currentNode(): HTMLLIElement | null;
get activeNodes(): NodeListOf<Element>;
expandAtPath(path: string[]): void;
collapseAtPath(path: string[]): void;
toggleAtPath(path: string[]): void;
checkAtPath(path: string[]): void;
uncheckAtPath(path: string[]): void;
checkOnlyAtPath(path: string[]): void;
toggleCheckedAtPath(path: string[]): void;
checkedValueAtPath(path: string[]): TreeViewCheckedValue;
disabledValueAtPath(path: string[]): boolean;
nodeAtPath(path: string[], selector?: string): Element | null;
subTreeAtPath(path: string[]): TreeViewSubTreeNodeElement | null;
leafAtPath(path: string[]): HTMLLIElement | null;
setNodeCheckedValue(node: Element, value: TreeViewCheckedValue): void;
getNodeCheckedValue(node: Element): TreeViewCheckedValue;
getNodeDisabledValue(node: Element): boolean;
setNodeDisabledValue(node: Element, disabled: boolean): void;
nodeHasCheckBox(node: Element): boolean;
nodeHasNativeAction(node: Element): boolean;
expandAncestorsForNode(node: HTMLElement): void;
changeSelectStrategy(newStrategy: SelectStrategy): void;
infoFromNode(node: Element, newCheckedValue?: TreeViewCheckedValue): TreeViewNodeInfo | null;
selectVariant(node: Element): SelectVariant;
updateHiddenFormInputs(): void;
}
declare global {
interface Window {
TreeViewElement: typeof TreeViewElement;
}
}