import { ExtractPropTypes, CSSProperties, StyleValue } from 'vue'; import { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; import { BuildPropReturn } from '../../../utils/props'; import { DataNode } from 'ant-design-vue/es/tree'; export declare enum ToolbarEnum { SELECT_ALL = 0, UN_SELECT_ALL = 1, EXPAND_ALL = 2, UN_EXPAND_ALL = 3, CHECK_STRICTLY = 4, CHECK_UN_STRICTLY = 5 } export declare const treeEmits: string[]; export interface TreeState { expandedKeys: KeyType[]; selectedKeys: KeyType[]; checkedKeys: CheckKeys; checkStrictly: boolean; } export interface FieldNames { children?: string; title?: string; key?: string; general?: string; } export interface EmptyProps { image?: string; description?: string; imageStyle?: CSSProperties; style?: CSSProperties; } export type KeyType = string | number; export type CheckKeys = KeyType[] | { checked: string[] | number[]; halfChecked: string[] | number[]; }; export declare const treeProps: { value: BuildPropReturn<(new (...args: any[]) => KeyType[] | KeyType[] | { checked: string[] | number[]; halfChecked: string[] | number[]; }) | (() => KeyType[] | CheckKeys) | (((new (...args: any[]) => KeyType[] | KeyType[] | { checked: string[] | number[]; halfChecked: string[] | number[]; }) | (() => KeyType[] | CheckKeys)) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; renderIcon: BuildPropReturn<(new (...args: any[]) => (params: Recordable) => string) | (() => (params: Recordable) => string) | { (): (params: Recordable) => string; new (): any; readonly prototype: any; } | (((new (...args: any[]) => (params: Recordable) => string) | (() => (params: Recordable) => string) | { (): (params: Recordable) => string; new (): any; readonly prototype: any; }) | null)[], ((params: Recordable) => string) | (() => null) | (() => (params: Recordable) => string) | null | undefined, unknown, unknown, unknown>; helpMessage: BuildPropReturn<(new (...args: any[]) => string | string[]) | (() => string | string[]) | (((new (...args: any[]) => string | string[]) | (() => string | string[])) | null)[], string | (() => string) | undefined, unknown, unknown, unknown>; title: BuildPropReturn string) | undefined, unknown, unknown, unknown>; toolbar: BooleanConstructor; search: BooleanConstructor; searchValue: BuildPropReturn string) | undefined, unknown, unknown, unknown>; checkStrictly: BooleanConstructor; clickRowToExpand: BuildPropReturn false) | (() => true) | undefined, unknown, unknown, unknown>; checkable: BooleanConstructor; defaultExpandLevel: BuildPropReturn<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], string | (() => string) | undefined, unknown, unknown, unknown>; defaultExpandAll: BooleanConstructor; fieldNames: BuildPropReturn<(new (...args: any[]) => FieldNames) | (() => FieldNames) | (((new (...args: any[]) => FieldNames) | (() => FieldNames)) | null)[], FieldNames | (() => null) | (() => FieldNames) | null | undefined, unknown, unknown, unknown>; treeData: BuildPropReturn<(new (...args: any[]) => DataNode[]) | (() => DataNode[]) | (((new (...args: any[]) => DataNode[]) | (() => DataNode[])) | null)[], (() => null) | (() => DataNode[]) | null | undefined, unknown, unknown, unknown>; actionList: BuildPropReturn<(new (...args: any[]) => TreeActionItem[]) | (() => TreeActionItem[]) | (((new (...args: any[]) => TreeActionItem[]) | (() => TreeActionItem[])) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; expandedKeys: BuildPropReturn<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | (((new (...args: any[]) => KeyType[]) | (() => KeyType[])) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; selectedKeys: BuildPropReturn<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | (((new (...args: any[]) => KeyType[]) | (() => KeyType[])) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; checkedKeys: BuildPropReturn<(new (...args: any[]) => KeyType[] | { checked: string[] | number[]; halfChecked: string[] | number[]; }) | (() => CheckKeys) | (((new (...args: any[]) => KeyType[] | { checked: string[] | number[]; halfChecked: string[] | number[]; }) | (() => CheckKeys)) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; beforeRightClick: BuildPropReturn<(new (...args: any[]) => (...arg: any) => ContextMenuItem[] | ContextMenuOptions) | (() => (...arg: any) => ContextMenuItem[] | ContextMenuOptions) | { (): (...arg: any) => ContextMenuItem[] | ContextMenuOptions; new (): any; readonly prototype: any; } | (((new (...args: any[]) => (...arg: any) => ContextMenuItem[] | ContextMenuOptions) | (() => (...arg: any) => ContextMenuItem[] | ContextMenuOptions) | { (): (...arg: any) => ContextMenuItem[] | ContextMenuOptions; new (): any; readonly prototype: any; }) | null)[], ((...arg: any) => ContextMenuItem[] | ContextMenuOptions) | (() => null) | (() => (...arg: any) => ContextMenuItem[] | ContextMenuOptions) | null | undefined, unknown, unknown, unknown>; rightMenuList: BuildPropReturn<(new (...args: any[]) => ContextMenuItem[]) | (() => ContextMenuItem[]) | (((new (...args: any[]) => ContextMenuItem[]) | (() => ContextMenuItem[])) | null)[], (() => null) | (() => ContextMenuItem[]) | null | undefined, unknown, unknown, unknown>; filterFn: BuildPropReturn<(new (...args: any[]) => (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | (() => (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | { (): (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean; new (): any; readonly prototype: any; } | (((new (...args: any[]) => (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | (() => (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | { (): (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean; new (): any; readonly prototype: any; }) | null)[], ((searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | (() => null) | (() => (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean) | null | undefined, unknown, unknown, unknown>; highlight: BuildPropReturn<(new (...args: any[]) => String | Boolean) | (() => String | Boolean) | (((new (...args: any[]) => String | Boolean) | (() => String | Boolean)) | null)[], boolean | (() => false) | (() => true) | undefined, unknown, unknown, unknown>; expandOnSearch: BooleanConstructor; checkOnSearch: BooleanConstructor; selectedOnSearch: BooleanConstructor; loading: BuildPropReturn false) | (() => true) | undefined, unknown, unknown, unknown>; treeWrapperClassName: StringConstructor; treeWrapperStyle: BuildPropReturn<(new (...args: any[]) => string | false | CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], string | false | CSSProperties | (() => string) | (() => false) | (() => null) | (() => undefined) | (() => CSSProperties) | (() => StyleValue[]) | null | undefined, unknown, unknown, unknown>; emptyClass: StringConstructor; placeholder: BuildPropReturn string) | undefined, unknown, unknown, unknown>; isDirectoryTree: BooleanConstructor; emptyProps: BuildPropReturn<(new (...args: any[]) => EmptyProps) | (() => EmptyProps) | (((new (...args: any[]) => EmptyProps) | (() => EmptyProps)) | null)[], EmptyProps | (() => null) | (() => EmptyProps) | null | undefined, unknown, unknown, unknown>; searchTree: BuildPropReturn false) | (() => true) | undefined, unknown, unknown, unknown>; combo: BuildPropReturn false) | (() => true) | undefined, unknown, unknown, unknown>; }; export type HlxbTreeProps = ExtractPropTypes; export interface ContextMenuItem { label: string; icon?: string; hidden?: boolean; disabled?: boolean; handler?: Fn; divider?: boolean; children?: ContextMenuItem[]; } export interface ContextMenuOptions { icon?: string; styles?: any; items?: ContextMenuItem[]; } export interface TreeItem extends TreeDataItem { icon?: any; } export interface TreeActionItem { render: (record: Recordable) => any; show?: boolean | ((record: Recordable) => boolean); } export interface InsertNodeParams { parentKey: string | null; node: TreeDataItem; list?: TreeDataItem[]; push?: 'push' | 'unshift'; } export interface TreeActionType { checkAll: (checkAll: boolean) => void; expandAll: (expandAll: boolean) => void; setExpandedKeys: (keys: KeyType[]) => void; getExpandedKeys: () => KeyType[]; setSelectedKeys: (keys: KeyType[]) => void; getSelectedKeys: () => KeyType[]; setCheckedKeys: (keys: CheckKeys) => void; getCheckedKeys: () => CheckKeys; filterByLevel: (level: number) => void; insertNodeByKey: (opt: InsertNodeParams) => void; insertNodesByKey: (opt: InsertNodeParams) => void; deleteNodeByKey: (key: string) => void; updateNodeByKey: (key: string, node: Omit) => void; setSearchValue: (value: string) => void; getSearchValue: () => string; handleRightClick: ({ event, node }: Recordable) => void; getSelectedNode: (key: KeyType, treeList?: TreeItem[], selectNode?: TreeItem | null) => TreeItem | null; } export declare const directoryTree: { addIcon: BuildPropReturn string) | undefined, unknown, unknown, unknown>; addTitle: BuildPropReturn string) | undefined, unknown, unknown, unknown>; hasHeaderAdd: BuildPropReturn false) | (() => true) | undefined, unknown, unknown, unknown>; hasHeader: BooleanConstructor; title: BuildPropReturn string) | undefined, unknown, unknown, unknown>; showAction: BooleanConstructor; actionList: BuildPropReturn<(new (...args: any[]) => TreeActionItem[]) | (() => TreeActionItem[]) | (((new (...args: any[]) => TreeActionItem[]) | (() => TreeActionItem[])) | null)[], (() => never[]) | undefined, unknown, unknown, unknown>; }; export type DirectoryTreeProps = ExtractPropTypes; export type HlxbDirectoryTreeProps = DirectoryTreeProps;