Source code for tablate.type.type_input
from typing import TypedDict, Dict, Optional
from tablate.type.primitives import TextString, FrameDivider, ColumnWidth, TextStyle, TextAlign, Background, \
ColumnPadding, TextColor, ColumnDivider, HtmlDividerWeight, HtmlColumnDividerStyle, HtmlColumnPadding, \
HtmlTextStyle, HtmlTextAlign, HtmlTextColor, HtmlBackground, BackgroundPadding, HtmlTextSize, MaxLines, \
Multiline, HtmlFrameDivider, HtmlContainerBorder, HtmlContainerPadding, HtmlContainerWidth, HtmlDividerColor
[docs]
class HtmlContainerStylesInput(TypedDict, total=False): # HtmlContainerBase
html_container_border_weight: HtmlDividerWeight
html_container_border_style: HtmlContainerBorder
html_container_border_color: HtmlDividerColor
html_container_padding: HtmlContainerPadding
html_container_width: HtmlContainerWidth
########################################################################################################################
[docs]
class FrameStylesInput(TypedDict, total=False): # FrameBase
frame_divider: FrameDivider
max_lines: MaxLines
multiline: Multiline
background: Background
[docs]
class HtmlFrameStylesInput(TypedDict, total=False): # HtmlFrameBase
html_frame_divider_style: HtmlFrameDivider
html_frame_divider_weight: HtmlDividerWeight
html_frame_divider_color: HtmlDividerColor
html_max_lines: MaxLines
html_multiline: Multiline
html_background: HtmlBackground
########################################################################################################################
[docs]
class ColumnStylesInput(TypedDict, total=False): # ColumnBase
column_divider: ColumnDivider
padding: ColumnPadding
background_padding: BackgroundPadding
[docs]
class TextStylesInput(TypedDict, total=False): # TextBase
text_style: TextStyle
text_align: TextAlign
text_color: TextColor
[docs]
class HtmlColumnStylesInput(TypedDict, total=False): # HtmlColumnBase
html_column_divider_style: HtmlColumnDividerStyle
html_column_divider_weight: HtmlDividerWeight
html_column_divider_color: HtmlDividerColor
html_padding: HtmlColumnPadding
[docs]
class HtmlTextStylesInput(TypedDict, total=False): # HtmlTextBase
html_text_style: HtmlTextStyle
html_text_align: HtmlTextAlign
html_text_color: HtmlTextColor
html_text_size: HtmlTextSize
[docs]
class RowsStylesInput(TypedDict, total=False): # TableRowsBase
row_line_divider: FrameDivider
odds_background: Background
evens_background: Background
[docs]
class HtmlRowsStylesInput(TypedDict, total=False): # HtmlTableRowsBase
html_row_line_divider_weight: HtmlDividerWeight
html_row_line_divider_style: HtmlFrameDivider
html_row_line_divider_color: HtmlDividerColor
html_odds_background: HtmlBackground
html_evens_background: HtmlBackground
########################################################################################################################
########################################################################################################################
########################################################################################################################
[docs]
class HtmlColumnInput(TypedDict, total=False):
padding: HtmlColumnPadding
divider_style: HtmlColumnDividerStyle
divider_weight: HtmlDividerWeight
divider_color: HtmlDividerColor
text_style: HtmlTextStyle
text_align: HtmlTextAlign
text_color: HtmlTextColor
background: HtmlBackground
[docs]
class BaseColumnInput(TypedDict, total=False):
width: ColumnWidth
padding: ColumnPadding
divider: ColumnDivider
text_style: TextStyle
text_align: TextAlign
text_color: TextColor
background: Background
html_styles: Optional[HtmlColumnInput]
TableRowsInput = Dict[str, TextString]
########################################################################################################################
########################################################################################################################
########################################################################################################################
[docs]
class BaseStylesInput(TypedDict, total=False):
frame_styles: FrameStylesInput
column_styles: ColumnStylesInput
text_styles: TextStylesInput
#
#
# GridStylesInput = BaseStylesInput
#
#
TableHeaderFrameStylesInput = BaseStylesInput
########################################################################################################################
[docs]
class HtmlStylesInput(TypedDict, total=False):
html_frame_styles: HtmlFrameStylesInput
html_column_styles: HtmlColumnStylesInput
html_text_styles: HtmlTextStylesInput
[docs]
class HtmlTextFrameStylesInput(TypedDict, total=False):
html_frame_styles: HtmlFrameStylesInput
html_text_styles: HtmlTextStylesInput
HtmlGridFrameStylesInput = HtmlStylesInput
[docs]
class HtmlTableFrameStylesInput(HtmlStylesInput, total=False):
html_row_styles: HtmlRowsStylesInput
HtmlTableHeaderStylesInput = HtmlStylesInput
# HtmlTableBodyStylesInput = HtmlTableStylesInput
########################################################################################################################
########################################################################################################################
########################################################################################################################