constcreateTree:WidgetFactory<TreeWidget>
Create a Tree with given config props
an optional tree config
a TreeWidget
constgetTreeDefaultConfig: () =>TreeProps
Retrieve a shallow copy of the default Tree config
the default Tree config
Normalized TreeItem object
ariaLabel:
string
Accessibility label for the node
children:
NormalizedTreeItem[]
An array of children nodes
optionalisExpanded:boolean
If true the node is expanded
label:
string
String title of the node
level:
number
Level in the hierarchy, starts with 0 for a root node
Interface representing the API for a Tree component.
TreeComponent is an Angular component that extends the BaseWidgetDirective to provide a customizable tree widget. This component allows for various configurations and customizations through its inputs and outputs.
readonlyariaLabel:InputSignal<undefined|string>
Optional accessibility label for the tree if there is no explicit label
''
readonlyariaLabelToggleFn:InputSignal<undefined| (label) =>string>
Return the value for the 'aria-label' attribute of the toggle
tree item label
(label: string) => `Toggle ${label}`
readonlyclassName:InputSignal<undefined|string>
CSS classes to be applied on the widget main container
''
readonlyexpandToggle:OutputEmitterRef<NormalizedTreeItem>
An event emitted when the user toggles the expand of the TreeItem.
Event payload is equal to the TreeItem clicked.
() => {}
readonlyitem:InputSignal<SlotContent<TreeSlotItemContext>>
Slot to change the default tree item
readonlyitemContent:InputSignal<SlotContent<TreeSlotItemContext>>
Slot to change the default tree item content
readonlyitemToggle:InputSignal<SlotContent<TreeSlotItemContext>>
Slot to change the default tree item toggle
readonlynavSelector:InputSignal<undefined| (node) =>NodeListOf<HTMLElement>>
Retrieves expand items of the TreeItem
HTML element that is representing the expand item
(node: HTMLElement) => node.querySelectorAll('button')
readonlynodes:InputSignal<undefined|TreeItem[]>
Array of the tree nodes to display
[]
readonlystructure:InputSignal<SlotContent<TreeContext>>
Slot to change the default display of the tree
get api():
W["api"]
Retrieves the widget api
W["api"]
the widget api
get directives():
W["directives"]
Retrieves the widget directives
W["directives"]
the widget directives
get state():
AngularState<W>
Retrieves the widget state. Each property of the state is exposed through an Angular Signal
AngularState<W>
the widget state
TreeContext =
WidgetSlotContext<TreeWidget>
Represents the context for a Tree widget.
This interface is an alias for WidgetSlotContext<TreeWidget>.
consttreeDefaultItemToggle:SlotContent<TreeSlotItemContext>
A constant representing the default slot for tree item toggle.
consttreeDefaultSlotItem:SlotContent<TreeSlotItemContext>
A constant representing the default slot for tree item.
consttreeDefaultSlotItemContent:SlotContent<TreeSlotItemContext>
A constant representing the default slot for tree item.
consttreeDefaultSlotStructure:SlotContent<TreeContext>
A constant representing the default slot for tree structure.
Interface representing various directives used in the Tree component.
itemAttributesDirective:
Directive<{item:NormalizedTreeItem; }>
Directive to handle attributes for the tree item
itemToggleDirective:
Directive<{item:NormalizedTreeItem; }>
Directive to handle toggle for the tree item
navigationDirective:
Directive
Directive to attach navManager for the tree
Represents a tree item component.
optionalariaLabel:string
Optional accessibility label for the node
optionalchildren:TreeItem[]
Optional array of children nodes
optionalisExpanded:boolean
If true the node is expanded
label:
string
String title of the node
Directive to provide a template reference for tree item content.
This directive uses a template reference to render the TreeSlotItemContext.
Directive to provide a template reference for tree item.
This directive uses a template reference to render the TreeSlotItemContext.
Directive to provide a template reference for tree item toggle.
This directive uses a template reference to render the TreeSlotItemContext.
Represents the properties for the Tree component.
optionalariaLabel:string
Optional accessibility label for the tree if there is no explicit label
''
ariaLabelToggleFn: (
label) =>string
Return the value for the 'aria-label' attribute of the toggle
string
tree item label
string
(label: string) => `Toggle ${label}` className:
string
CSS classes to be applied on the widget main container
''
item:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item
itemContent:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item content
itemToggle:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item toggle
nodes:
TreeItem[]
Array of the tree nodes to display
[]
onExpandToggle: (
node) =>void
An event emitted when the user toggles the expand of the TreeItem.
Event payload is equal to the TreeItem clicked.
void
() => {} structure:
SlotContent<TreeContext>
Slot to change the default display of the tree
navSelector(
node):NodeListOf<HTMLElement>
Retrieves expand items of the TreeItem
HTML element that is representing the expand item
NodeListOf<HTMLElement>
(node: HTMLElement) => node.querySelectorAll('button') TreeSlotItemContext =
TreeContext&object
Represents the context for a tree item, extending the base TreeContext
with an additional item property.
item:
NormalizedTreeItem
Represents the state of a Tree component.
optionalariaLabel:string
Optional accessibility label for the tree if there is no explicit label
''
className:
string
CSS classes to be applied on the widget main container
''
expandedMap:
object
Getter of expanded state for each tree node
get(
item):undefined|boolean
####### item
undefined | boolean
item:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item
itemContent:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item content
itemToggle:
SlotContent<TreeSlotItemContext>
Slot to change the default tree item toggle
normalizedNodes:
NormalizedTreeItem[]
Array of normalized tree nodes
structure:
SlotContent<TreeContext>
Slot to change the default display of the tree
Directive to provide a template reference for tree structure.
This directive uses a template reference to render the TreeContext.
TreeWidget =
Widget<TreeProps,TreeState,TreeApi,TreeDirectives>
Represents a Tree widget component.