import sys
# You may also pick one without version check, of course
if sys.version_info < (3, 11):
from typing_extensions import TypedDict, Required
else:
from typing import TypedDict, Required
from typing import Literal, Any
# from .chart_dicts import BaseChart
[docs]
class Panel(TypedDict, total=False):
"""This describes a panel in a view."""
[docs]
layout: Literal["gridstack", "absolute"]
[docs]
panelWidth: int | float
[docs]
class View(TypedDict, total=False):
"""This metadata of a view to be added to a project views.json file."""
[docs]
initialCharts: Required[dict[str, list[Any]]] # todo
[docs]
dataSources: dict[str, Panel]
[docs]
links: dict[str, list[Any]] # todo