Source code for spaday_perspective.components

# Generated by spaday.cem from components.cem.json — do not edit by hand.
from __future__ import annotations

from typing import Any

from spaday.catalog import ComponentSchema, PropertySchema
from spaday.component import Child, Component

__all__ = ["PerspectivePanel"]


[docs] class PerspectivePanel(Component): """Perspective workspace whose data connection and layout are configured by a serializable prop.""" tag = "perspective-panel" schema = ComponentSchema( tag="perspective-panel", class_name="PerspectivePanel", summary="Perspective workspace whose data connection and layout are configured by a serializable prop.", props=( PropertySchema(name="config", kind="json", choices=(), default=None, description=None), PropertySchema(name="theme", kind="string", choices=(), default=None, description=None), PropertySchema( name="themes", kind="json", choices=(), default=None, description="Theme names offered by the status-bar picker; light/dark map to Pro Light/Pro Dark.", ), PropertySchema( name="autosize", kind="boolean", choices=(), default=None, description="Auto-size mode (on by default); disable to drive resizes imperatively.", ), PropertySchema( name="autopause", kind="boolean", choices=(), default=None, description="Auto-pause rendering while the element is not visible (on by default).", ), PropertySchema( name="throttle", kind="number", choices=(), default=None, description="Render throttle in milliseconds; unset restores adaptive throttling.", ), PropertySchema(name="settings", kind="boolean", choices=(), default=None, description="Whether the settings sidebar is open."), ), events=( "perspective-click", "perspective-select", "perspective-global-filter", "perspective-global-filter-update", "perspective-config-update", "perspective-toggle-settings", "perspective-statusbar-pointerdown", "perspective-table-delete", "perspective-ready", "perspective-error", ), slots=(), ) def __init__( self, *children: Child, key: str | None = None, config: Any = None, theme: str | None = None, themes: Any = None, autosize: bool | None = None, autopause: bool | None = None, throttle: float | None = None, settings: bool | None = None, **props: Any, ) -> None: super().__init__( *children, key=key, props={ "config": config, "theme": theme, "themes": themes, "autosize": autosize, "autopause": autopause, "throttle": throttle, "settings": settings, }, **props, )