mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3924 - For Tree
This commit is contained in:
parent
6a4226a4e0
commit
e10c1cf988
5 changed files with 158 additions and 19 deletions
115
components/lib/tree/Tree.d.ts
vendored
115
components/lib/tree/Tree.d.ts
vendored
|
@ -10,6 +10,16 @@
|
|||
import { VNode } from 'vue';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type TreePassThroughOptionType = TreePassThroughAttributes | ((options: TreePassThroughMethodOptions) => TreePassThroughAttributes) | null | undefined;
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) option method.
|
||||
*/
|
||||
export interface TreePassThroughMethodOptions {
|
||||
props: TreeProps;
|
||||
state: TreeState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom TreeNode metadata.
|
||||
*/
|
||||
|
@ -90,6 +100,106 @@ export interface TreeSelectionKeys {
|
|||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough(pt) options.
|
||||
* @see {@link TreeProps.pt}
|
||||
*/
|
||||
export interface TreePassThroughOptions {
|
||||
/**
|
||||
* Uses to pass attributes to the root's DOM element.
|
||||
*/
|
||||
root?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the loading overlay's DOM element.
|
||||
*/
|
||||
loadingOverlay?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the loading icon's DOM element.
|
||||
*/
|
||||
loadingIcon?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the filter container's DOM element.
|
||||
*/
|
||||
filterContainer?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the input's DOM element.
|
||||
*/
|
||||
input?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the search icon's DOM element.
|
||||
*/
|
||||
searchIcon?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the wrapper's DOM element.
|
||||
*/
|
||||
wrapper?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the container's DOM element.
|
||||
*/
|
||||
container?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the node's DOM element.
|
||||
*/
|
||||
node?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the content's DOM element.
|
||||
*/
|
||||
content?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the toggler's DOM element.
|
||||
*/
|
||||
toggler?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the toggler icon's DOM element.
|
||||
*/
|
||||
togglerIcon?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the checkbox container's DOM element.
|
||||
*/
|
||||
checkboxContainer?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the checkbox's DOM element.
|
||||
*/
|
||||
checkbox?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the checkbox icon's DOM element.
|
||||
*/
|
||||
checkboxIcon?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the node icon's DOM element.
|
||||
*/
|
||||
nodeIcon?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the label's DOM element.
|
||||
*/
|
||||
label?: TreePassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the subgroup's DOM element.
|
||||
*/
|
||||
subgroup?: TreePassThroughOptionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom passthrough attributes for each DOM elements
|
||||
*/
|
||||
export interface TreePassThroughAttributes {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines current inline state in Tree component.
|
||||
*/
|
||||
export interface TreeState {
|
||||
/**
|
||||
* Current expanded keys state.
|
||||
*/
|
||||
d_expandedKeys: TreeExpandedKeys;
|
||||
/**
|
||||
* Current filter value state as a string.
|
||||
*/
|
||||
filterValue: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid properties in Tree component.
|
||||
*/
|
||||
|
@ -161,6 +271,11 @@ export interface TreeProps {
|
|||
* Identifier of the underlying menu element.
|
||||
*/
|
||||
'aria-labelledby'?: string | undefined;
|
||||
/**
|
||||
* Uses to pass attributes to DOM elements inside the component.
|
||||
* @type {TreePassThroughOptions}
|
||||
*/
|
||||
pt?: TreePassThroughOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue