import { JSXInterface } from '../../jsx'; import { ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; import '../../checkbox/index.js'; import '../../icon/index.js'; import type { TreeDataItem } from '../helpers/types'; import { CheckedState } from '../managers/tree-manager.js'; /** * Displays a tree list item. * Groups display expansion arrows. */ export declare class TreeItem extends ControlElement { /** * Element version number * @returns version number */ static get version(): string; /** * Tree-item should not be focusable */ protected readonly defaultTabIndex: number | null; protected readonly defaultRole: string | null; /** * Checked state of the item */ checkedState: CheckedState; /** * Is the item a parent and should it show an expansion toggle? */ parent: boolean; /** * Display in multiple selection mode */ multiple: boolean; /** * Expanded state of the item */ expanded: boolean; /** * Depth of the item */ depth: number; /** * Label of the item */ label: string; /** * Icon of the item */ icon?: string; /** * Original data item, used for interacting with the tree manager */ item: T; /** * Highlighted state of the item. * This is for showing which item is currently being interacted with. */ highlighted: boolean; /** * Template for rendering the indentation element */ protected get indentTemplate(): TemplateResult; /** * Template for rendering the toggle * * ! expand-toggle is required for automatically toggling expanded state */ protected get toggleTemplate(): TemplateResult; /** * Template for rendering the checkbox */ protected get checkboxTemplate(): TemplateResult; /** * Template for rendering the icon */ protected get iconTemplate(): TemplateResult; /** * Is the item fully checked? */ protected get checked(): boolean; /** * Is the checked state indeterminate? */ protected get indeterminate(): boolean; /** * Handles aria-checked and aria-selected when mode changes * aria-checked is used for multiple mode due to tri-state support * @returns {void} **/ private multipleChanged; /** * Handles selected and aria attribute changes * @returns {void} */ private checkedChanged; /** * Handles aria-expanded when expanded state changes * @returns {void} */ private expandedChanged; /** * Called after the component is first rendered * @param changedProperties Properties which have changed * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Invoked before update() to compute values needed during the update. * @param changedProperties changed properties * @returns {void} */ protected willUpdate(changedProperties: PropertyValues): void; /** * A `TemplateResult` that will be used * to render the updated internal template. * @returns Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-tree-item': TreeItem; } } declare global { interface HTMLElementTagNameMap { 'ef-tree-item': TreeItem; } namespace JSX { interface IntrinsicElements { 'ef-tree-item': Partial | JSXInterface.HTMLAttributes; } } } export {};