2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ props }) => [
|
|
|
|
'p-tree p-component',
|
|
|
|
{
|
|
|
|
'p-tree-selectable': props.selectionMode != null,
|
|
|
|
'p-tree-loading': props.loading,
|
|
|
|
'p-tree-flex-scrollable': props.scrollHeight === 'flex'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
loadingOverlay: 'p-tree-loading-overlay p-component-overlay',
|
|
|
|
loadingIcon: 'p-tree-loading-icon',
|
|
|
|
filterContainer: 'p-tree-filter-container',
|
|
|
|
input: 'p-tree-filter p-inputtext p-component',
|
|
|
|
searchIcon: 'p-tree-filter-icon',
|
|
|
|
wrapper: 'p-tree-wrapper',
|
|
|
|
container: 'p-tree-container',
|
|
|
|
node: ({ instance }) => ['p-treenode', { 'p-treenode-leaf': instance.leaf }],
|
|
|
|
content: ({ instance }) => [
|
|
|
|
'p-treenode-content',
|
|
|
|
instance.node.styleClass,
|
|
|
|
{
|
|
|
|
'p-treenode-selectable': instance.selectable,
|
2024-01-18 13:05:30 +00:00
|
|
|
'p-highlight': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
toggler: 'p-tree-toggler p-link',
|
|
|
|
togglerIcon: 'p-tree-toggler-icon',
|
2023-11-28 08:46:39 +00:00
|
|
|
nodeTogglerIcon: 'p-tree-node-toggler-icon',
|
2024-01-14 13:38:51 +00:00
|
|
|
nodeCheckbox: ({ instance }) => [
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-indeterminate': instance.partialChecked
|
|
|
|
}
|
|
|
|
],
|
2023-11-17 17:06:08 +00:00
|
|
|
nodeIcon: 'p-treenode-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
label: 'p-treenode-label',
|
|
|
|
subgroup: 'p-treenode-children'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'tree',
|
|
|
|
classes
|
|
|
|
});
|