Source code for dazzler.components.extra._tree_view

"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


[docs]class TreeView(Component): """ A tree of nested items. :CSS: - ``dazzler-extra-tree-view`` - ``tree-item`` - ``tree-item-label`` - ``tree-sub-items`` - ``tree-caret`` - ``selected`` - ``level-{n}`` :example: .. literalinclude:: ../../tests/components/pages/treeview.py """ items = Aspect(required=True, docstring="An array of items to render recursively.") # noqa: E501 selected = Aspect(docstring="Last clicked path identifier joined by dot.") expanded_items = Aspect(default=UNDEFINED, docstring="Identifiers that have sub items and are open.READONLY. (default=[])") # noqa: E501 nest_icon_collapsed = Aspect(default='⏵', docstring="Icon to show when sub items are hidden. (default='⏵')") # noqa: E501 nest_icon_expanded = Aspect(default='⏷', docstring="Icon to show when sub items are shown. (default='⏷')") # noqa: E501 class_name = Aspect(docstring="Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become ``dazzler-core-container``.When added on the component, the class names will be concatenated.") # noqa: E501 style = Aspect(docstring="Style object for the top level wrapper of the component.") # noqa: E501
[docs] def __init__( self, items: typing.Union[typing.List[str], typing.List[typing.Dict]], selected: typing.Optional[str] = UNDEFINED, expanded_items: typing.Optional[typing.List[str]] = UNDEFINED, nest_icon_collapsed: typing.Optional[str] = '⏵', nest_icon_expanded: typing.Optional[str] = '⏷', class_name: typing.Optional[str] = UNDEFINED, style: typing.Optional[typing.Dict] = UNDEFINED, identity: str = None ): """ :param items: An array of items to render recursively. :param selected: Last clicked path identifier joined by dot. :param expanded_items: Identifiers that have sub items and are open. READONLY. (default=[]) :param nest_icon_collapsed: Icon to show when sub items are hidden. (default='⏵') :param nest_icon_expanded: Icon to show when sub items are shown. (default='⏷') :param class_name: Class name automatically added by dazzler api with a prefix for the component library. ie: core component Container become ``dazzler-core-container``. When added on the component, the class names will be concatenated. :param style: Style object for the top level wrapper of the component. """ Component.__init__(self, locals(), identity)