import { WinboxUIComponent } from './component' export interface TreeProps { label: string; disabled: string; children: string; } export interface TreeAttributes { /** Text displayed when data is void */ emptyText: string; /**Whether to render a tree node's children after it is first expanded */ renderAfterExpand: boolean; /** Whether to check or uncheck node when clicking on the node, if false, the node can only be checked or unchecked by clicking on the checkbox. */ checkOnClickNode: boolean; /** Array of keys of initially expanded nodes */ defaultExpandedKeys: K[]; /** Whether checked state of a node not affects its father and child nodes when show-checkbox is true */ checkStrictly: boolean; /** Whether only one node among the same level can be expanded at one time */ accordion: boolean; /** Horizontal indentation of nodes in adjacent levels in pixels */ indent: number; /** Custom tree node icon */ iconClass?: string; } export interface TreeNode { checked: boolean; childNodes: TreeNode[]; data: D; expanded: boolean; id: number; indeterminate: boolean; isLeaf: boolean; level: number; loaded: boolean; loading: boolean; parent: TreeNode | null; store: any; visible: boolean; disabled: boolean; icon: string; key: K; label: string; nextSibling: TreeNode | null; previousSibling: TreeNode | null; isCurrent: boolean; } /** TreeSelect Component */ export declare class WTreeSelect extends WinboxUIComponent { treeData: K[] | []; /** Configuration options, see the following table */ treeProps: TreeProps; /** Attributes options, see the following table */ treeAttributes: TreeAttributes; /** Enable multiple selection */ multiple: boolean; /** Disable */ disabled: boolean; /** The key name that uniquely identifies value */ valueKey: string; /** Tree selection size */ size: string /** Can I clear the options */ clearable: boolean; /** Show drop-down arrow */ visibleArrow: boolean; /** Whether to display the selected value in the form of text when multiple selections are made */ collapseTags: boolean; /** Name attribute of treeselect input */ name: string; /** placeholder */ placeholder: string; /** Custom suffix Icon */ icon: string; /** Show border */ bordered: boolean; /** Searchable */ filterable: boolean; /** Search box placeholder */ filterPlaceholder: string; /** Getting data from remote */ loading: boolean; /** Text displayed when loading remotely */ loadingText: string; /** The class name of the treeselect drop-down box */ popperClass: string; /** Whether to insert the pop-up box into the body element. When there is a problem locating the pop-up box, you can set this property to false */ popperAppendToBody: boolean; /** Whether to lazy load child nodes needs to be used in combination with the load method */ lazy: boolean; /** Method for loading subtree data */ load: (data: D, resolve: Function) => void; /** * This function will be executed on each node when use filter method. If return false, tree node will be hidden. * * @param value The query string * @param data The original data object * @param node Tree node */ filterNodeMethod: (value: string, data: D, node: TreeNode) => boolean; }