diff --git a/py/h2o_lightwave/h2o_lightwave/types.py b/py/h2o_lightwave/h2o_lightwave/types.py index 75725e0c3b..69e4d0fd6d 100644 --- a/py/h2o_lightwave/h2o_lightwave/types.py +++ b/py/h2o_lightwave/h2o_lightwave/types.py @@ -3020,21 +3020,27 @@ def __init__( self, items: List['Component'], visible: Optional[bool] = None, + name: Optional[str] = None, ): _guard_vector('MiniButtons.items', items, (Component,), False, False, False) _guard_scalar('MiniButtons.visible', visible, (bool,), False, True, False) + _guard_scalar('MiniButtons.name', name, (str,), False, True, False) self.items = items """The buttons in this set.""" self.visible = visible """True if the component should be visible. Defaults to True.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_vector('MiniButtons.items', self.items, (Component,), False, False, False) _guard_scalar('MiniButtons.visible', self.visible, (bool,), False, True, False) + _guard_scalar('MiniButtons.name', self.name, (str,), False, True, False) return _dump( items=[__e.dump() for __e in self.items], visible=self.visible, + name=self.name, ) @staticmethod @@ -3044,11 +3050,15 @@ def load(__d: Dict) -> 'MiniButtons': _guard_vector('MiniButtons.items', __d_items, (dict,), False, False, False) __d_visible: Any = __d.get('visible') _guard_scalar('MiniButtons.visible', __d_visible, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MiniButtons.name', __d_name, (str,), False, True, False) items: List['Component'] = [Component.load(__e) for __e in __d_items] visible: Optional[bool] = __d_visible + name: Optional[str] = __d_name return MiniButtons( items, visible, + name, ) @@ -3280,26 +3290,32 @@ def __init__( label: str, color: str, label_color: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Tag.label', label, (str,), False, False, False) _guard_scalar('Tag.color', color, (str,), False, False, False) _guard_scalar('Tag.label_color', label_color, (str,), False, True, False) + _guard_scalar('Tag.name', name, (str,), False, True, False) self.label = label """The text displayed within the tag.""" self.color = color """Tag's background color.""" self.label_color = label_color """Tag's label color. If not specified, black or white will be picked based on correct contrast with background.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Tag.label', self.label, (str,), False, False, False) _guard_scalar('Tag.color', self.color, (str,), False, False, False) _guard_scalar('Tag.label_color', self.label_color, (str,), False, True, False) + _guard_scalar('Tag.name', self.name, (str,), False, True, False) return _dump( label=self.label, color=self.color, label_color=self.label_color, + name=self.name, ) @staticmethod @@ -3311,13 +3327,17 @@ def load(__d: Dict) -> 'Tag': _guard_scalar('Tag.color', __d_color, (str,), False, False, False) __d_label_color: Any = __d.get('label_color') _guard_scalar('Tag.label_color', __d_label_color, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Tag.name', __d_name, (str,), False, True, False) label: str = __d_label color: str = __d_color label_color: Optional[str] = __d_label_color + name: Optional[str] = __d_name return Tag( label, color, label_color, + name, ) @@ -3459,12 +3479,14 @@ def __init__( tag: Optional[TagTableCellType] = None, menu: Optional[MenuTableCellType] = None, markdown: Optional[MarkdownTableCellType] = None, + name: Optional[str] = None, ): _guard_scalar('TableCellType.progress', progress, (ProgressTableCellType,), False, True, False) _guard_scalar('TableCellType.icon', icon, (IconTableCellType,), False, True, False) _guard_scalar('TableCellType.tag', tag, (TagTableCellType,), False, True, False) _guard_scalar('TableCellType.menu', menu, (MenuTableCellType,), False, True, False) _guard_scalar('TableCellType.markdown', markdown, (MarkdownTableCellType,), False, True, False) + _guard_scalar('TableCellType.name', name, (str,), True, True, False) self.progress = progress """Renders a progress arc with a percentage value in the middle.""" self.icon = icon @@ -3475,6 +3497,8 @@ def __init__( """Renders a command menu.""" self.markdown = markdown """Renders text using markdown.""" + self.name = name + """An identifying name for this Component""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -3483,12 +3507,14 @@ def dump(self) -> Dict: _guard_scalar('TableCellType.tag', self.tag, (TagTableCellType,), False, True, False) _guard_scalar('TableCellType.menu', self.menu, (MenuTableCellType,), False, True, False) _guard_scalar('TableCellType.markdown', self.markdown, (MarkdownTableCellType,), False, True, False) + _guard_scalar('TableCellType.name', self.name, (str,), True, True, False) return _dump( progress=None if self.progress is None else self.progress.dump(), icon=None if self.icon is None else self.icon.dump(), tag=None if self.tag is None else self.tag.dump(), menu=None if self.menu is None else self.menu.dump(), markdown=None if self.markdown is None else self.markdown.dump(), + name=self.name, ) @staticmethod @@ -3504,17 +3530,21 @@ def load(__d: Dict) -> 'TableCellType': _guard_scalar('TableCellType.menu', __d_menu, (dict,), False, True, False) __d_markdown: Any = __d.get('markdown') _guard_scalar('TableCellType.markdown', __d_markdown, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TableCellType.name', __d_name, (str,), True, True, False) progress: Optional[ProgressTableCellType] = None if __d_progress is None else ProgressTableCellType.load(__d_progress) icon: Optional[IconTableCellType] = None if __d_icon is None else IconTableCellType.load(__d_icon) tag: Optional[TagTableCellType] = None if __d_tag is None else TagTableCellType.load(__d_tag) menu: Optional[MenuTableCellType] = None if __d_menu is None else MenuTableCellType.load(__d_menu) markdown: Optional[MarkdownTableCellType] = None if __d_markdown is None else MarkdownTableCellType.load(__d_markdown) + name: Optional[str] = __d_name return TableCellType( progress, icon, tag, menu, markdown, + name, ) @@ -3742,26 +3772,32 @@ def __init__( label: str, rows: List[TableRow], collapsed: Optional[bool] = None, + name: Optional[str] = None, ): _guard_scalar('TableGroup.label', label, (str,), False, False, False) _guard_vector('TableGroup.rows', rows, (TableRow,), False, False, False) _guard_scalar('TableGroup.collapsed', collapsed, (bool,), False, True, False) + _guard_scalar('TableGroup.name', name, (str,), True, True, False) self.label = label """The title of the group.""" self.rows = rows """The rows in this group.""" self.collapsed = collapsed """Indicates whether the table group should be collapsed by default. Defaults to True.""" + self.name = name + """An identifying name for this group.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TableGroup.label', self.label, (str,), False, False, False) _guard_vector('TableGroup.rows', self.rows, (TableRow,), False, False, False) _guard_scalar('TableGroup.collapsed', self.collapsed, (bool,), False, True, False) + _guard_scalar('TableGroup.name', self.name, (str,), True, True, False) return _dump( label=self.label, rows=[__e.dump() for __e in self.rows], collapsed=self.collapsed, + name=self.name, ) @staticmethod @@ -3773,13 +3809,17 @@ def load(__d: Dict) -> 'TableGroup': _guard_vector('TableGroup.rows', __d_rows, (dict,), False, False, False) __d_collapsed: Any = __d.get('collapsed') _guard_scalar('TableGroup.collapsed', __d_collapsed, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TableGroup.name', __d_name, (str,), True, True, False) label: str = __d_label rows: List[TableRow] = [TableRow.load(__e) for __e in __d_rows] collapsed: Optional[bool] = __d_collapsed + name: Optional[str] = __d_name return TableGroup( label, rows, collapsed, + name, ) @@ -3790,21 +3830,27 @@ def __init__( self, total_rows: int, rows_per_page: int, + name: Optional[str] = None, ): _guard_scalar('TablePagination.total_rows', total_rows, (int,), False, False, False) _guard_scalar('TablePagination.rows_per_page', rows_per_page, (int,), False, False, False) + _guard_scalar('TablePagination.name', name, (str,), False, True, False) self.total_rows = total_rows """Total count of all the rows in your dataset.""" self.rows_per_page = rows_per_page """The maximum amount of rows to be displayed in a single page.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TablePagination.total_rows', self.total_rows, (int,), False, False, False) _guard_scalar('TablePagination.rows_per_page', self.rows_per_page, (int,), False, False, False) + _guard_scalar('TablePagination.name', self.name, (str,), False, True, False) return _dump( total_rows=self.total_rows, rows_per_page=self.rows_per_page, + name=self.name, ) @staticmethod @@ -3814,11 +3860,15 @@ def load(__d: Dict) -> 'TablePagination': _guard_scalar('TablePagination.total_rows', __d_total_rows, (int,), False, False, False) __d_rows_per_page: Any = __d.get('rows_per_page') _guard_scalar('TablePagination.rows_per_page', __d_rows_per_page, (int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('TablePagination.name', __d_name, (str,), False, True, False) total_rows: int = __d_total_rows rows_per_page: int = __d_rows_per_page + name: Optional[str] = __d_name return TablePagination( total_rows, rows_per_page, + name, ) @@ -4180,11 +4230,13 @@ def __init__( label: Optional[str] = None, inline: Optional[bool] = None, width: Optional[str] = None, + name: Optional[str] = None, ): _guard_vector('Links.items', items, (Component,), False, False, False) _guard_scalar('Links.label', label, (str,), False, True, False) _guard_scalar('Links.inline', inline, (bool,), False, True, False) _guard_scalar('Links.width', width, (str,), False, True, False) + _guard_scalar('Links.name', name, (str,), False, True, False) self.items = items """The links contained in this group.""" self.label = label @@ -4193,6 +4245,8 @@ def __init__( """Render links horizontally. Defaults to False.""" self.width = width """The width of the links, e.g. '100px'.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -4200,11 +4254,13 @@ def dump(self) -> Dict: _guard_scalar('Links.label', self.label, (str,), False, True, False) _guard_scalar('Links.inline', self.inline, (bool,), False, True, False) _guard_scalar('Links.width', self.width, (str,), False, True, False) + _guard_scalar('Links.name', self.name, (str,), False, True, False) return _dump( items=[__e.dump() for __e in self.items], label=self.label, inline=self.inline, width=self.width, + name=self.name, ) @staticmethod @@ -4218,15 +4274,19 @@ def load(__d: Dict) -> 'Links': _guard_scalar('Links.inline', __d_inline, (bool,), False, True, False) __d_width: Any = __d.get('width') _guard_scalar('Links.width', __d_width, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Links.name', __d_name, (str,), False, True, False) items: List['Component'] = [Component.load(__e) for __e in __d_items] label: Optional[str] = __d_label inline: Optional[bool] = __d_inline width: Optional[str] = __d_width + name: Optional[str] = __d_name return Links( items, label, inline, width, + name, ) @@ -4925,26 +4985,32 @@ def __init__( label: str, icon: Optional[str] = None, done: Optional[bool] = None, + name: Optional[str] = None, ): _guard_scalar('Step.label', label, (str,), False, False, False) _guard_scalar('Step.icon', icon, (str,), False, True, False) _guard_scalar('Step.done', done, (bool,), False, True, False) + _guard_scalar('Step.name', name, (str,), False, True, False) self.label = label """Text displayed below icon.""" self.icon = icon """Icon to be displayed.""" self.done = done """Indicates whether this step has already been completed.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Step.label', self.label, (str,), False, False, False) _guard_scalar('Step.icon', self.icon, (str,), False, True, False) _guard_scalar('Step.done', self.done, (bool,), False, True, False) + _guard_scalar('Step.name', self.name, (str,), False, True, False) return _dump( label=self.label, icon=self.icon, done=self.done, + name=self.name, ) @staticmethod @@ -4956,13 +5022,17 @@ def load(__d: Dict) -> 'Step': _guard_scalar('Step.icon', __d_icon, (str,), False, True, False) __d_done: Any = __d.get('done') _guard_scalar('Step.done', __d_done, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Step.name', __d_name, (str,), False, True, False) label: str = __d_label icon: Optional[str] = __d_icon done: Optional[bool] = __d_done + name: Optional[str] = __d_name return Step( label, icon, done, + name, ) @@ -5202,6 +5272,7 @@ def __init__( label_font_weight: Optional[str] = None, label_line_height: Optional[float] = None, label_align: Optional[str] = None, + name: Optional[str] = None, ref_stroke_color: Optional[str] = None, ref_stroke_opacity: Optional[float] = None, ref_stroke_size: Optional[float] = None, @@ -5251,6 +5322,7 @@ def __init__( _guard_scalar('Mark.label_font_weight', label_font_weight, (str,), False, True, False) _guard_scalar('Mark.label_line_height', label_line_height, (float, int,), False, True, False) _guard_enum('Mark.label_align', label_align, _MarkLabelAlign, True) + _guard_scalar('Mark.name', name, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_color', ref_stroke_color, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_opacity', ref_stroke_opacity, (float, int,), False, True, False) _guard_scalar('Mark.ref_stroke_size', ref_stroke_size, (float, int,), False, True, False) @@ -5372,6 +5444,8 @@ def __init__( """Label line height.""" self.label_align = label_align """Label text alignment. One of 'left', 'right', 'center', 'start', 'end'. See enum h2o_wave.ui.MarkLabelAlign.""" + self.name = name + """An optional name""" self.ref_stroke_color = ref_stroke_color """Reference line stroke color.""" self.ref_stroke_opacity = ref_stroke_opacity @@ -5428,6 +5502,7 @@ def dump(self) -> Dict: _guard_scalar('Mark.label_font_weight', self.label_font_weight, (str,), False, True, False) _guard_scalar('Mark.label_line_height', self.label_line_height, (float, int,), False, True, False) _guard_enum('Mark.label_align', self.label_align, _MarkLabelAlign, True) + _guard_scalar('Mark.name', self.name, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_color', self.ref_stroke_color, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_opacity', self.ref_stroke_opacity, (float, int,), False, True, False) _guard_scalar('Mark.ref_stroke_size', self.ref_stroke_size, (float, int,), False, True, False) @@ -5492,6 +5567,7 @@ def dump(self) -> Dict: label_font_weight=self.label_font_weight, label_line_height=self.label_line_height, label_align=self.label_align, + name=self.name, ref_stroke_color=self.ref_stroke_color, ref_stroke_opacity=self.ref_stroke_opacity, ref_stroke_size=self.ref_stroke_size, @@ -5603,6 +5679,8 @@ def load(__d: Dict) -> 'Mark': _guard_scalar('Mark.label_line_height', __d_label_line_height, (float, int,), False, True, False) __d_label_align: Any = __d.get('label_align') _guard_enum('Mark.label_align', __d_label_align, _MarkLabelAlign, True) + __d_name: Any = __d.get('name') + _guard_scalar('Mark.name', __d_name, (str,), False, True, False) __d_ref_stroke_color: Any = __d.get('ref_stroke_color') _guard_scalar('Mark.ref_stroke_color', __d_ref_stroke_color, (str,), False, True, False) __d_ref_stroke_opacity: Any = __d.get('ref_stroke_opacity') @@ -5671,6 +5749,7 @@ def load(__d: Dict) -> 'Mark': label_font_weight: Optional[str] = __d_label_font_weight label_line_height: Optional[float] = __d_label_line_height label_align: Optional[str] = __d_label_align + name: Optional[str] = __d_name ref_stroke_color: Optional[str] = __d_ref_stroke_color ref_stroke_opacity: Optional[float] = __d_ref_stroke_opacity ref_stroke_size: Optional[float] = __d_ref_stroke_size @@ -5735,6 +5814,7 @@ def load(__d: Dict) -> 'Mark': label_font_weight, label_line_height, label_align, + name, ref_stroke_color, ref_stroke_opacity, ref_stroke_size, @@ -6261,6 +6341,7 @@ def __init__( width: Optional[str] = None, visible: Optional[bool] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Image.title', title, (str,), False, False, False) _guard_scalar('Image.type', type, (str,), False, True, False) @@ -6269,6 +6350,7 @@ def __init__( _guard_scalar('Image.width', width, (str,), False, True, False) _guard_scalar('Image.visible', visible, (bool,), False, True, False) _guard_scalar('Image.path_popup', path_popup, (str,), False, True, False) + _guard_scalar('Image.name', name, (str,), False, True, False) self.title = title """The image title, typically displayed as a tooltip.""" self.type = type @@ -6283,6 +6365,8 @@ def __init__( """True if the component should be visible. Defaults to True.""" self.path_popup = path_popup """The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property.""" + self.name = name + """An optional identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -6293,6 +6377,7 @@ def dump(self) -> Dict: _guard_scalar('Image.width', self.width, (str,), False, True, False) _guard_scalar('Image.visible', self.visible, (bool,), False, True, False) _guard_scalar('Image.path_popup', self.path_popup, (str,), False, True, False) + _guard_scalar('Image.name', self.name, (str,), False, True, False) return _dump( title=self.title, type=self.type, @@ -6301,6 +6386,7 @@ def dump(self) -> Dict: width=self.width, visible=self.visible, path_popup=self.path_popup, + name=self.name, ) @staticmethod @@ -6320,6 +6406,8 @@ def load(__d: Dict) -> 'Image': _guard_scalar('Image.visible', __d_visible, (bool,), False, True, False) __d_path_popup: Any = __d.get('path_popup') _guard_scalar('Image.path_popup', __d_path_popup, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Image.name', __d_name, (str,), False, True, False) title: str = __d_title type: Optional[str] = __d_type image: Optional[str] = __d_image @@ -6327,6 +6415,7 @@ def load(__d: Dict) -> 'Image': width: Optional[str] = __d_width visible: Optional[bool] = __d_visible path_popup: Optional[str] = __d_path_popup + name: Optional[str] = __d_name return Image( title, type, @@ -6335,6 +6424,7 @@ def load(__d: Dict) -> 'Image': width, visible, path_popup, + name, ) @@ -6505,21 +6595,27 @@ def __init__( self, text: str, tag: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('TextAnnotatorItem.text', text, (str,), False, False, False) _guard_scalar('TextAnnotatorItem.tag', tag, (str,), False, True, False) + _guard_scalar('TextAnnotatorItem.name', name, (str,), False, True, False) self.text = text """Text to be highlighted.""" self.tag = tag """The `name` of the text annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TextAnnotatorItem.text', self.text, (str,), False, False, False) _guard_scalar('TextAnnotatorItem.tag', self.tag, (str,), False, True, False) + _guard_scalar('TextAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( text=self.text, tag=self.tag, + name=self.name, ) @staticmethod @@ -6529,11 +6625,15 @@ def load(__d: Dict) -> 'TextAnnotatorItem': _guard_scalar('TextAnnotatorItem.text', __d_text, (str,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('TextAnnotatorItem.tag', __d_tag, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TextAnnotatorItem.name', __d_name, (str,), False, True, False) text: str = __d_text tag: Optional[str] = __d_tag + name: Optional[str] = __d_name return TextAnnotatorItem( text, tag, + name, ) @@ -6676,11 +6776,13 @@ def __init__( y1: float, x2: float, y2: float, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorRect.x1', x1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y1', y1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.x2', x2, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y2', y2, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorRect.name', name, (str,), False, True, False) self.x1 = x1 """`x` coordinate of the rectangle's corner.""" self.y1 = y1 @@ -6689,6 +6791,8 @@ def __init__( """`x` coordinate of the diagonally opposite corner.""" self.y2 = y2 """`y` coordinate of the diagonally opposite corner.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -6696,11 +6800,13 @@ def dump(self) -> Dict: _guard_scalar('ImageAnnotatorRect.y1', self.y1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.x2', self.x2, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y2', self.y2, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorRect.name', self.name, (str,), False, True, False) return _dump( x1=self.x1, y1=self.y1, x2=self.x2, y2=self.y2, + name=self.name, ) @staticmethod @@ -6714,15 +6820,19 @@ def load(__d: Dict) -> 'ImageAnnotatorRect': _guard_scalar('ImageAnnotatorRect.x2', __d_x2, (float, int,), False, False, False) __d_y2: Any = __d.get('y2') _guard_scalar('ImageAnnotatorRect.y2', __d_y2, (float, int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorRect.name', __d_name, (str,), False, True, False) x1: float = __d_x1 y1: float = __d_y1 x2: float = __d_x2 y2: float = __d_y2 + name: Optional[str] = __d_name return ImageAnnotatorRect( x1, y1, x2, y2, + name, ) @@ -6733,21 +6843,27 @@ def __init__( self, x: float, y: float, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorPoint.x', x, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorPoint.y', y, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorPoint.name', name, (str,), False, True, False) self.x = x """`x` coordinate of the point.""" self.y = y """`y` coordinate of the point.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('ImageAnnotatorPoint.x', self.x, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorPoint.y', self.y, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorPoint.name', self.name, (str,), False, True, False) return _dump( x=self.x, y=self.y, + name=self.name, ) @staticmethod @@ -6757,11 +6873,15 @@ def load(__d: Dict) -> 'ImageAnnotatorPoint': _guard_scalar('ImageAnnotatorPoint.x', __d_x, (float, int,), False, False, False) __d_y: Any = __d.get('y') _guard_scalar('ImageAnnotatorPoint.y', __d_y, (float, int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorPoint.name', __d_name, (str,), False, True, False) x: float = __d_x y: float = __d_y + name: Optional[str] = __d_name return ImageAnnotatorPoint( x, y, + name, ) @@ -6771,16 +6891,22 @@ class ImageAnnotatorPolygon: def __init__( self, vertices: List[ImageAnnotatorPoint], + name: Optional[str] = None, ): _guard_vector('ImageAnnotatorPolygon.vertices', vertices, (ImageAnnotatorPoint,), False, False, False) + _guard_scalar('ImageAnnotatorPolygon.name', name, (str,), False, True, False) self.vertices = vertices """List of polygon points.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_vector('ImageAnnotatorPolygon.vertices', self.vertices, (ImageAnnotatorPoint,), False, False, False) + _guard_scalar('ImageAnnotatorPolygon.name', self.name, (str,), False, True, False) return _dump( vertices=[__e.dump() for __e in self.vertices], + name=self.name, ) @staticmethod @@ -6788,9 +6914,13 @@ def load(__d: Dict) -> 'ImageAnnotatorPolygon': """Creates an instance of this class using the contents of a dict.""" __d_vertices: Any = __d.get('vertices') _guard_vector('ImageAnnotatorPolygon.vertices', __d_vertices, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorPolygon.name', __d_name, (str,), False, True, False) vertices: List[ImageAnnotatorPoint] = [ImageAnnotatorPoint.load(__e) for __e in __d_vertices] + name: Optional[str] = __d_name return ImageAnnotatorPolygon( vertices, + name, ) @@ -6840,21 +6970,27 @@ def __init__( self, shape: ImageAnnotatorShape, tag: str, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorItem.shape', shape, (ImageAnnotatorShape,), False, False, False) _guard_scalar('ImageAnnotatorItem.tag', tag, (str,), False, False, False) + _guard_scalar('ImageAnnotatorItem.name', name, (str,), False, True, False) self.shape = shape """The annotation shape.""" self.tag = tag """The `name` of the image annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('ImageAnnotatorItem.shape', self.shape, (ImageAnnotatorShape,), False, False, False) _guard_scalar('ImageAnnotatorItem.tag', self.tag, (str,), False, False, False) + _guard_scalar('ImageAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( shape=self.shape.dump(), tag=self.tag, + name=self.name, ) @staticmethod @@ -6864,11 +7000,15 @@ def load(__d: Dict) -> 'ImageAnnotatorItem': _guard_scalar('ImageAnnotatorItem.shape', __d_shape, (dict,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('ImageAnnotatorItem.tag', __d_tag, (str,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorItem.name', __d_name, (str,), False, True, False) shape: ImageAnnotatorShape = ImageAnnotatorShape.load(__d_shape) tag: str = __d_tag + name: Optional[str] = __d_name return ImageAnnotatorItem( shape, tag, + name, ) @@ -7040,26 +7180,32 @@ def __init__( start: float, end: float, tag: str, + name: Optional[str] = None, ): _guard_scalar('AudioAnnotatorItem.start', start, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.end', end, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.tag', tag, (str,), False, False, False) + _guard_scalar('AudioAnnotatorItem.name', name, (str,), False, True, False) self.start = start """The start of the audio annotation in seconds.""" self.end = end """The end of the audio annotation in seconds.""" self.tag = tag """The `name` of the audio annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An identifying name for this component""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('AudioAnnotatorItem.start', self.start, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.end', self.end, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.tag', self.tag, (str,), False, False, False) + _guard_scalar('AudioAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( start=self.start, end=self.end, tag=self.tag, + name=self.name, ) @staticmethod @@ -7071,13 +7217,17 @@ def load(__d: Dict) -> 'AudioAnnotatorItem': _guard_scalar('AudioAnnotatorItem.end', __d_end, (float, int,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('AudioAnnotatorItem.tag', __d_tag, (str,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('AudioAnnotatorItem.name', __d_name, (str,), False, True, False) start: float = __d_start end: float = __d_end tag: str = __d_tag + name: Optional[str] = __d_name return AudioAnnotatorItem( start, end, tag, + name, ) @@ -7441,7 +7591,7 @@ def __init__( self.placeholder = placeholder """A string that provides a brief hint to the user as to what kind of information is expected in the field.""" self.value = value - """The time value in hh:mm format. E.g. '10:30', '14:25', '23:59', '00:00'""" + """The time value in hh:mm:ss format. E.g. '10:30:45', '14:25:30', '23:59:59', '00:00:00'""" self.disabled = disabled """True if this field is disabled.""" self.width = width @@ -7455,9 +7605,9 @@ def __init__( self.hour_format = hour_format """Specifies 12-hour or 24-hour time format. One of `12` or `24`. Defaults to `12`.""" self.min = min - """The minimum allowed time value in hh:mm format. E.g.: '08:00', '13:30'""" + """The minimum allowed time value in hh:mm:ss format. E.g.: '08:00:00', '13:30:00'""" self.max = max - """The maximum allowed time value in hh:mm format. E.g.: '15:30', '00:00'""" + """The maximum allowed time value in hh:mm:ss format. E.g.: '15:30:00', '00:00:00'""" self.minutes_step = minutes_step """Limits the available minutes to select from. One of `1`, `5`, `10`, `15`, `20`, `30` or `60`. Defaults to `1`.""" @@ -8089,12 +8239,14 @@ def __init__( title: str, content: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ArticleCard.box', box, (str,), False, False, False) _guard_scalar('ArticleCard.title', title, (str,), False, False, False) _guard_scalar('ArticleCard.content', content, (str,), False, True, False) _guard_vector('ArticleCard.items', items, (Component,), False, True, False) + _guard_scalar('ArticleCard.name', name, (str,), False, True, False) _guard_vector('ArticleCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8104,6 +8256,8 @@ def __init__( """Markdown text.""" self.items = items """Collection of small buttons rendered under the title.""" + self.name = name + """An identifying name for this component""" self.commands = commands """Contextual menu commands for this component.""" @@ -8113,6 +8267,7 @@ def dump(self) -> Dict: _guard_scalar('ArticleCard.title', self.title, (str,), False, False, False) _guard_scalar('ArticleCard.content', self.content, (str,), False, True, False) _guard_vector('ArticleCard.items', self.items, (Component,), False, True, False) + _guard_scalar('ArticleCard.name', self.name, (str,), False, True, False) _guard_vector('ArticleCard.commands', self.commands, (Command,), False, True, False) return _dump( view='article', @@ -8120,6 +8275,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8134,18 +8290,22 @@ def load(__d: Dict) -> 'ArticleCard': _guard_scalar('ArticleCard.content', __d_content, (str,), False, True, False) __d_items: Any = __d.get('items') _guard_vector('ArticleCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ArticleCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ArticleCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: Optional[str] = __d_content items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ArticleCard( box, title, content, items, + name, commands, ) @@ -8202,15 +8362,19 @@ def __init__( self, box: str, items: List[Breadcrumb], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('BreadcrumbsCard.box', box, (str,), False, False, False) _guard_vector('BreadcrumbsCard.items', items, (Breadcrumb,), False, False, False) + _guard_scalar('BreadcrumbsCard.name', name, (str,), True, True, False) _guard_vector('BreadcrumbsCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" self.items = items """A list of `h2o_wave.types.Breadcrumb` instances to display. See `h2o_wave.ui.breadcrumb()`""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8218,11 +8382,13 @@ def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('BreadcrumbsCard.box', self.box, (str,), False, False, False) _guard_vector('BreadcrumbsCard.items', self.items, (Breadcrumb,), False, False, False) + _guard_scalar('BreadcrumbsCard.name', self.name, (str,), True, True, False) _guard_vector('BreadcrumbsCard.commands', self.commands, (Command,), False, True, False) return _dump( view='breadcrumbs', box=self.box, items=[__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8233,14 +8399,18 @@ def load(__d: Dict) -> 'BreadcrumbsCard': _guard_scalar('BreadcrumbsCard.box', __d_box, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('BreadcrumbsCard.items', __d_items, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('BreadcrumbsCard.name', __d_name, (str,), True, True, False) __d_commands: Any = __d.get('commands') _guard_vector('BreadcrumbsCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: List[Breadcrumb] = [Breadcrumb.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return BreadcrumbsCard( box, items, + name, commands, ) @@ -8789,11 +8959,13 @@ def __init__( box: str, caption: str, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FooterCard.box', box, (str,), False, False, False) _guard_scalar('FooterCard.caption', caption, (str,), False, False, False) _guard_vector('FooterCard.items', items, (Component,), False, True, False) + _guard_scalar('FooterCard.name', name, (str,), False, True, False) _guard_vector('FooterCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8801,6 +8973,8 @@ def __init__( """The caption. Supports markdown. *""" self.items = items """The components displayed to the right of the caption.""" + self.name = name + """An optional identifying name to the card""" self.commands = commands """Contextual menu commands for this component.""" @@ -8809,12 +8983,14 @@ def dump(self) -> Dict: _guard_scalar('FooterCard.box', self.box, (str,), False, False, False) _guard_scalar('FooterCard.caption', self.caption, (str,), False, False, False) _guard_vector('FooterCard.items', self.items, (Component,), False, True, False) + _guard_scalar('FooterCard.name', self.name, (str,), False, True, False) _guard_vector('FooterCard.commands', self.commands, (Command,), False, True, False) return _dump( view='footer', box=self.box, caption=self.caption, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8827,16 +9003,20 @@ def load(__d: Dict) -> 'FooterCard': _guard_scalar('FooterCard.caption', __d_caption, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('FooterCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FooterCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FooterCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box caption: str = __d_caption items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FooterCard( box, caption, items, + name, commands, ) @@ -8849,11 +9029,13 @@ def __init__( box: str, items: Union[List[Component], str], title: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FormCard.box', box, (str,), False, False, False) _guard_vector('FormCard.items', items, (Component,), False, False, True) _guard_scalar('FormCard.title', title, (str,), False, True, False) + _guard_scalar('FormCard.name', name, (str,), False, True, False) _guard_vector('FormCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8861,6 +9043,8 @@ def __init__( """The components in this form.""" self.title = title """The title for this card.""" + self.name = name + """An optional name for this form.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8869,12 +9053,14 @@ def dump(self) -> Dict: _guard_scalar('FormCard.box', self.box, (str,), False, False, False) _guard_vector('FormCard.items', self.items, (Component,), False, False, True) _guard_scalar('FormCard.title', self.title, (str,), False, True, False) + _guard_scalar('FormCard.name', self.name, (str,), False, True, False) _guard_vector('FormCard.commands', self.commands, (Command,), False, True, False) return _dump( view='form', box=self.box, items=self.items if isinstance(self.items, str) else [__e.dump() for __e in self.items], title=self.title, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8887,16 +9073,20 @@ def load(__d: Dict) -> 'FormCard': _guard_vector('FormCard.items', __d_items, (dict,), False, False, True) __d_title: Any = __d.get('title') _guard_scalar('FormCard.title', __d_title, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FormCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FormCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: Union[List[Component], str] = __d_items if isinstance(__d_items, str) else [Component.load(__e) for __e in __d_items] title: Optional[str] = __d_title + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FormCard( box, items, title, + name, commands, ) @@ -8913,6 +9103,7 @@ def __init__( path: Optional[str] = None, content: Optional[str] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FrameCard.box', box, (str,), False, False, False) @@ -8920,6 +9111,7 @@ def __init__( _guard_scalar('FrameCard.path', path, (str,), False, True, False) _guard_scalar('FrameCard.content', content, (str,), False, True, False) _guard_scalar('FrameCard.compact', compact, (bool,), False, True, False) + _guard_scalar('FrameCard.name', name, (str,), False, True, False) _guard_vector('FrameCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8931,6 +9123,8 @@ def __init__( """The HTML content of the page. A string containing `...`.""" self.compact = compact """True if title and padding should be removed. Defaults to False.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8941,6 +9135,7 @@ def dump(self) -> Dict: _guard_scalar('FrameCard.path', self.path, (str,), False, True, False) _guard_scalar('FrameCard.content', self.content, (str,), False, True, False) _guard_scalar('FrameCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('FrameCard.name', self.name, (str,), False, True, False) _guard_vector('FrameCard.commands', self.commands, (Command,), False, True, False) return _dump( view='frame', @@ -8949,6 +9144,7 @@ def dump(self) -> Dict: path=self.path, content=self.content, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8965,6 +9161,8 @@ def load(__d: Dict) -> 'FrameCard': _guard_scalar('FrameCard.content', __d_content, (str,), False, True, False) __d_compact: Any = __d.get('compact') _guard_scalar('FrameCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FrameCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FrameCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -8972,6 +9170,7 @@ def load(__d: Dict) -> 'FrameCard': path: Optional[str] = __d_path content: Optional[str] = __d_content compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FrameCard( box, @@ -8979,6 +9178,7 @@ def load(__d: Dict) -> 'FrameCard': path, content, compact, + name, commands, ) @@ -8997,6 +9197,7 @@ def __init__( image: Optional[str] = None, image_path: Optional[str] = None, image_type: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('GraphicsCard.box', box, (str,), False, False, False) @@ -9006,6 +9207,7 @@ def __init__( _guard_scalar('GraphicsCard.image', image, (str,), False, True, False) _guard_scalar('GraphicsCard.image_path', image_path, (str,), False, True, False) _guard_scalar('GraphicsCard.image_type', image_type, (str,), False, True, False) + _guard_scalar('GraphicsCard.name', name, (str,), False, True, False) _guard_vector('GraphicsCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9025,6 +9227,8 @@ def __init__( """The path or URL or data URL of the background image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`.""" self.image_type = image_type """The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set.""" + self.name = name + """An optional identifying name for this Card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9037,6 +9241,7 @@ def dump(self) -> Dict: _guard_scalar('GraphicsCard.image', self.image, (str,), False, True, False) _guard_scalar('GraphicsCard.image_path', self.image_path, (str,), False, True, False) _guard_scalar('GraphicsCard.image_type', self.image_type, (str,), False, True, False) + _guard_scalar('GraphicsCard.name', self.name, (str,), False, True, False) _guard_vector('GraphicsCard.commands', self.commands, (Command,), False, True, False) return _dump( view='graphics', @@ -9049,6 +9254,7 @@ def dump(self) -> Dict: image=self.image, image_path=self.image_path, image_type=self.image_type, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9071,6 +9277,8 @@ def load(__d: Dict) -> 'GraphicsCard': _guard_scalar('GraphicsCard.image_path', __d_image_path, (str,), False, True, False) __d_image_type: Any = __d.get('image_type') _guard_scalar('GraphicsCard.image_type', __d_image_type, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('GraphicsCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('GraphicsCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9082,6 +9290,7 @@ def load(__d: Dict) -> 'GraphicsCard': image: Optional[str] = __d_image image_path: Optional[str] = __d_image_path image_type: Optional[str] = __d_image_type + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return GraphicsCard( box, @@ -9093,6 +9302,7 @@ def load(__d: Dict) -> 'GraphicsCard': image, image_path, image_type, + name, commands, ) @@ -9314,6 +9524,7 @@ def __init__( items: Optional[List[Component]] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('HeaderCard.box', box, (str,), False, False, False) @@ -9326,6 +9537,7 @@ def __init__( _guard_vector('HeaderCard.items', items, (Component,), False, True, False) _guard_vector('HeaderCard.secondary_items', secondary_items, (Component,), False, True, False) _guard_enum('HeaderCard.color', color, _HeaderCardColor, True) + _guard_scalar('HeaderCard.name', name, (str,), False, True, False) _guard_vector('HeaderCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9347,6 +9559,8 @@ def __init__( """Items that should be displayed in the center of the header.""" self.color = color """Header background color. Defaults to 'primary'. One of 'card', 'transparent', 'primary'. See enum h2o_wave.ui.HeaderCardColor.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9362,6 +9576,7 @@ def dump(self) -> Dict: _guard_vector('HeaderCard.items', self.items, (Component,), False, True, False) _guard_vector('HeaderCard.secondary_items', self.secondary_items, (Component,), False, True, False) _guard_enum('HeaderCard.color', self.color, _HeaderCardColor, True) + _guard_scalar('HeaderCard.name', self.name, (str,), False, True, False) _guard_vector('HeaderCard.commands', self.commands, (Command,), False, True, False) return _dump( view='header', @@ -9375,6 +9590,7 @@ def dump(self) -> Dict: items=None if self.items is None else [__e.dump() for __e in self.items], secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], color=self.color, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9401,6 +9617,8 @@ def load(__d: Dict) -> 'HeaderCard': _guard_vector('HeaderCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_color: Any = __d.get('color') _guard_enum('HeaderCard.color', __d_color, _HeaderCardColor, True) + __d_name: Any = __d.get('name') + _guard_scalar('HeaderCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('HeaderCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9413,6 +9631,7 @@ def load(__d: Dict) -> 'HeaderCard': items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] secondary_items: Optional[List[Component]] = None if __d_secondary_items is None else [Component.load(__e) for __e in __d_secondary_items] color: Optional[str] = __d_color + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return HeaderCard( box, @@ -9425,6 +9644,7 @@ def load(__d: Dict) -> 'HeaderCard': items, secondary_items, color, + name, commands, ) @@ -9441,6 +9661,7 @@ def __init__( data: Optional[PackedRecord] = None, path: Optional[str] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ImageCard.box', box, (str,), False, False, False) @@ -9449,6 +9670,7 @@ def __init__( _guard_scalar('ImageCard.image', image, (str,), False, True, False) _guard_scalar('ImageCard.path', path, (str,), False, True, False) _guard_scalar('ImageCard.path_popup', path_popup, (str,), False, True, False) + _guard_scalar('ImageCard.name', name, (str,), False, True, False) _guard_vector('ImageCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9464,6 +9686,8 @@ def __init__( """The path or URL or data URL of the image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`.""" self.path_popup = path_popup """The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property.""" + self.name = name + """An optional identifying name for the image""" self.commands = commands """Contextual menu commands for this component.""" @@ -9475,6 +9699,7 @@ def dump(self) -> Dict: _guard_scalar('ImageCard.image', self.image, (str,), False, True, False) _guard_scalar('ImageCard.path', self.path, (str,), False, True, False) _guard_scalar('ImageCard.path_popup', self.path_popup, (str,), False, True, False) + _guard_scalar('ImageCard.name', self.name, (str,), False, True, False) _guard_vector('ImageCard.commands', self.commands, (Command,), False, True, False) return _dump( view='image', @@ -9485,6 +9710,7 @@ def dump(self) -> Dict: data=self.data, path=self.path, path_popup=self.path_popup, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9504,6 +9730,8 @@ def load(__d: Dict) -> 'ImageCard': _guard_scalar('ImageCard.path', __d_path, (str,), False, True, False) __d_path_popup: Any = __d.get('path_popup') _guard_scalar('ImageCard.path_popup', __d_path_popup, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ImageCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9513,6 +9741,7 @@ def load(__d: Dict) -> 'ImageCard': data: Optional[PackedRecord] = __d_data path: Optional[str] = __d_path path_popup: Optional[str] = __d_path_popup + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ImageCard( box, @@ -9522,6 +9751,7 @@ def load(__d: Dict) -> 'ImageCard': data, path, path_popup, + name, commands, ) @@ -9541,6 +9771,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('LargeBarStatCard.box', box, (str,), False, False, False) @@ -9552,6 +9783,7 @@ def __init__( _guard_scalar('LargeBarStatCard.aux_value_caption', aux_value_caption, (str,), False, False, False) _guard_scalar('LargeBarStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('LargeBarStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('LargeBarStatCard.name', name, (str,), False, True, False) _guard_vector('LargeBarStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9573,6 +9805,8 @@ def __init__( """The color of the progress bar.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this group.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9587,6 +9821,7 @@ def dump(self) -> Dict: _guard_scalar('LargeBarStatCard.aux_value_caption', self.aux_value_caption, (str,), False, False, False) _guard_scalar('LargeBarStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('LargeBarStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('LargeBarStatCard.name', self.name, (str,), False, True, False) _guard_vector('LargeBarStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='large_bar_stat', @@ -9600,6 +9835,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9625,6 +9861,8 @@ def load(__d: Dict) -> 'LargeBarStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('LargeBarStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('LargeBarStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('LargeBarStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9637,6 +9875,7 @@ def load(__d: Dict) -> 'LargeBarStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return LargeBarStatCard( box, @@ -9649,6 +9888,7 @@ def load(__d: Dict) -> 'LargeBarStatCard': progress, plot_color, data, + name, commands, ) @@ -9664,6 +9904,7 @@ def __init__( aux_value: str, caption: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('LargeStatCard.box', box, (str,), False, False, False) @@ -9671,6 +9912,7 @@ def __init__( _guard_scalar('LargeStatCard.value', value, (str,), False, False, False) _guard_scalar('LargeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('LargeStatCard.caption', caption, (str,), False, False, False) + _guard_scalar('LargeStatCard.name', name, (str,), False, True, False) _guard_vector('LargeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9684,6 +9926,8 @@ def __init__( """The caption displayed below the primary value.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9694,6 +9938,7 @@ def dump(self) -> Dict: _guard_scalar('LargeStatCard.value', self.value, (str,), False, False, False) _guard_scalar('LargeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('LargeStatCard.caption', self.caption, (str,), False, False, False) + _guard_scalar('LargeStatCard.name', self.name, (str,), False, True, False) _guard_vector('LargeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='large_stat', @@ -9703,6 +9948,7 @@ def dump(self) -> Dict: aux_value=self.aux_value, caption=self.caption, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9720,6 +9966,8 @@ def load(__d: Dict) -> 'LargeStatCard': __d_caption: Any = __d.get('caption') _guard_scalar('LargeStatCard.caption', __d_caption, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('LargeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('LargeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9728,6 +9976,7 @@ def load(__d: Dict) -> 'LargeStatCard': aux_value: str = __d_aux_value caption: str = __d_caption data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return LargeStatCard( box, @@ -9736,6 +9985,7 @@ def load(__d: Dict) -> 'LargeStatCard': aux_value, caption, data, + name, commands, ) @@ -9917,12 +10167,14 @@ def __init__( content: str, data: Optional[PackedRecord] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('MarkdownCard.box', box, (str,), False, False, False) _guard_scalar('MarkdownCard.title', title, (str,), False, False, False) _guard_scalar('MarkdownCard.content', content, (str,), False, False, False) _guard_scalar('MarkdownCard.compact', compact, (bool,), False, True, False) + _guard_scalar('MarkdownCard.name', name, (str,), False, True, False) _guard_vector('MarkdownCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9934,6 +10186,8 @@ def __init__( """Additional data for the card.""" self.compact = compact """Make spacing tighter. Defaults to True.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9943,6 +10197,7 @@ def dump(self) -> Dict: _guard_scalar('MarkdownCard.title', self.title, (str,), False, False, False) _guard_scalar('MarkdownCard.content', self.content, (str,), False, False, False) _guard_scalar('MarkdownCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('MarkdownCard.name', self.name, (str,), False, True, False) _guard_vector('MarkdownCard.commands', self.commands, (Command,), False, True, False) return _dump( view='markdown', @@ -9951,6 +10206,7 @@ def dump(self) -> Dict: content=self.content, data=self.data, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9966,6 +10222,8 @@ def load(__d: Dict) -> 'MarkdownCard': __d_data: Any = __d.get('data') __d_compact: Any = __d.get('compact') _guard_scalar('MarkdownCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MarkdownCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('MarkdownCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9973,6 +10231,7 @@ def load(__d: Dict) -> 'MarkdownCard': content: str = __d_content data: Optional[PackedRecord] = __d_data compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MarkdownCard( box, @@ -9980,6 +10239,7 @@ def load(__d: Dict) -> 'MarkdownCard': content, data, compact, + name, commands, ) @@ -9993,12 +10253,14 @@ def __init__( title: str, content: str, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('MarkupCard.box', box, (str,), False, False, False) _guard_scalar('MarkupCard.title', title, (str,), False, False, False) _guard_scalar('MarkupCard.content', content, (str,), False, False, False) _guard_scalar('MarkupCard.compact', compact, (bool,), False, True, False) + _guard_scalar('MarkupCard.name', name, (str,), False, True, False) _guard_vector('MarkupCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -10008,6 +10270,8 @@ def __init__( """The HTML content.""" self.compact = compact """True if outer spacing should be removed. Defaults to False.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -10017,6 +10281,7 @@ def dump(self) -> Dict: _guard_scalar('MarkupCard.title', self.title, (str,), False, False, False) _guard_scalar('MarkupCard.content', self.content, (str,), False, False, False) _guard_scalar('MarkupCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('MarkupCard.name', self.name, (str,), False, True, False) _guard_vector('MarkupCard.commands', self.commands, (Command,), False, True, False) return _dump( view='markup', @@ -10024,6 +10289,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -10038,18 +10304,22 @@ def load(__d: Dict) -> 'MarkupCard': _guard_scalar('MarkupCard.content', __d_content, (str,), False, False, False) __d_compact: Any = __d.get('compact') _guard_scalar('MarkupCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MarkupCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('MarkupCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: str = __d_content compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MarkupCard( box, title, content, compact, + name, commands, ) @@ -10852,21 +11122,27 @@ def __init__( self, content: str, media: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('InlineStylesheet.content', content, (str,), False, False, False) _guard_scalar('InlineStylesheet.media', media, (str,), False, True, False) + _guard_scalar('InlineStylesheet.name', name, (str,), False, True, False) self.content = content """The CSS to be applied to this page.""" self.media = media """A valid media query to set conditions for when the style should be applied. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#attr-media.""" + self.name = name + """An optional identifying name for this stylesheet.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('InlineStylesheet.content', self.content, (str,), False, False, False) _guard_scalar('InlineStylesheet.media', self.media, (str,), False, True, False) + _guard_scalar('InlineStylesheet.name', self.name, (str,), False, True, False) return _dump( content=self.content, media=self.media, + name=self.name, ) @staticmethod @@ -10876,11 +11152,15 @@ def load(__d: Dict) -> 'InlineStylesheet': _guard_scalar('InlineStylesheet.content', __d_content, (str,), False, False, False) __d_media: Any = __d.get('media') _guard_scalar('InlineStylesheet.media', __d_media, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('InlineStylesheet.name', __d_name, (str,), False, True, False) content: str = __d_content media: Optional[str] = __d_media + name: Optional[str] = __d_name return InlineStylesheet( content, media, + name, ) @@ -10892,26 +11172,32 @@ def __init__( path: str, media: Optional[str] = None, cross_origin: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Stylesheet.path', path, (str,), False, False, False) _guard_scalar('Stylesheet.media', media, (str,), False, True, False) _guard_scalar('Stylesheet.cross_origin', cross_origin, (str,), False, True, False) + _guard_scalar('Stylesheet.name', name, (str,), False, True, False) self.path = path """The URI of an external stylesheet.""" self.media = media """A valid media query to set conditions for when the stylesheet should be loaded. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media.""" self.cross_origin = cross_origin """The CORS setting. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin""" + self.name = name + """An optional identifying name for this stylesheet.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Stylesheet.path', self.path, (str,), False, False, False) _guard_scalar('Stylesheet.media', self.media, (str,), False, True, False) _guard_scalar('Stylesheet.cross_origin', self.cross_origin, (str,), False, True, False) + _guard_scalar('Stylesheet.name', self.name, (str,), False, True, False) return _dump( path=self.path, media=self.media, cross_origin=self.cross_origin, + name=self.name, ) @staticmethod @@ -10923,13 +11209,17 @@ def load(__d: Dict) -> 'Stylesheet': _guard_scalar('Stylesheet.media', __d_media, (str,), False, True, False) __d_cross_origin: Any = __d.get('cross_origin') _guard_scalar('Stylesheet.cross_origin', __d_cross_origin, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Stylesheet.name', __d_name, (str,), False, True, False) path: str = __d_path media: Optional[str] = __d_media cross_origin: Optional[str] = __d_cross_origin + name: Optional[str] = __d_name return Stylesheet( path, media, cross_origin, + name, ) @@ -10958,6 +11248,7 @@ def __init__( script: Optional[InlineScript] = None, stylesheet: Optional[InlineStylesheet] = None, stylesheets: Optional[List[Stylesheet]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ): @@ -10978,6 +11269,7 @@ def __init__( _guard_scalar('MetaCard.script', script, (InlineScript,), False, True, False) _guard_scalar('MetaCard.stylesheet', stylesheet, (InlineStylesheet,), False, True, False) _guard_vector('MetaCard.stylesheets', stylesheets, (Stylesheet,), False, True, False) + _guard_scalar('MetaCard.name', name, (str,), False, True, False) _guard_scalar('MetaCard.animate', animate, (bool,), False, True, False) _guard_vector('MetaCard.commands', commands, (Command,), False, True, False) self.box = box @@ -11014,6 +11306,8 @@ def __init__( """CSS stylesheet to be applied to this page.""" self.stylesheets = stylesheets """External CSS files to load into the page.""" + self.name = name + """An Optional identifying name for this page""" self.animate = animate """EXPERIMENTAL: True to turn on the card animations. Defaults to False.""" self.commands = commands @@ -11038,6 +11332,7 @@ def dump(self) -> Dict: _guard_scalar('MetaCard.script', self.script, (InlineScript,), False, True, False) _guard_scalar('MetaCard.stylesheet', self.stylesheet, (InlineStylesheet,), False, True, False) _guard_vector('MetaCard.stylesheets', self.stylesheets, (Stylesheet,), False, True, False) + _guard_scalar('MetaCard.name', self.name, (str,), False, True, False) _guard_scalar('MetaCard.animate', self.animate, (bool,), False, True, False) _guard_vector('MetaCard.commands', self.commands, (Command,), False, True, False) return _dump( @@ -11059,6 +11354,7 @@ def dump(self) -> Dict: script=None if self.script is None else self.script.dump(), stylesheet=None if self.stylesheet is None else self.stylesheet.dump(), stylesheets=None if self.stylesheets is None else [__e.dump() for __e in self.stylesheets], + name=self.name, animate=self.animate, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11100,6 +11396,8 @@ def load(__d: Dict) -> 'MetaCard': _guard_scalar('MetaCard.stylesheet', __d_stylesheet, (dict,), False, True, False) __d_stylesheets: Any = __d.get('stylesheets') _guard_vector('MetaCard.stylesheets', __d_stylesheets, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MetaCard.name', __d_name, (str,), False, True, False) __d_animate: Any = __d.get('animate') _guard_scalar('MetaCard.animate', __d_animate, (bool,), False, True, False) __d_commands: Any = __d.get('commands') @@ -11121,6 +11419,7 @@ def load(__d: Dict) -> 'MetaCard': script: Optional[InlineScript] = None if __d_script is None else InlineScript.load(__d_script) stylesheet: Optional[InlineStylesheet] = None if __d_stylesheet is None else InlineStylesheet.load(__d_stylesheet) stylesheets: Optional[List[Stylesheet]] = None if __d_stylesheets is None else [Stylesheet.load(__e) for __e in __d_stylesheets] + name: Optional[str] = __d_name animate: Optional[bool] = __d_animate commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MetaCard( @@ -11141,6 +11440,7 @@ def load(__d: Dict) -> 'MetaCard': script, stylesheet, stylesheets, + name, animate, commands, ) @@ -11170,6 +11470,7 @@ def __init__( persona: Optional[Component] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('NavCard.box', box, (str,), False, False, False) @@ -11183,6 +11484,7 @@ def __init__( _guard_scalar('NavCard.persona', persona, (Component,), False, True, False) _guard_vector('NavCard.secondary_items', secondary_items, (Component,), False, True, False) _guard_enum('NavCard.color', color, _NavCardColor, True) + _guard_scalar('NavCard.name', name, (str,), False, True, False) _guard_vector('NavCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11206,6 +11508,8 @@ def __init__( """Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle.""" self.color = color """Card background color. Defaults to 'card'. One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11222,6 +11526,7 @@ def dump(self) -> Dict: _guard_scalar('NavCard.persona', self.persona, (Component,), False, True, False) _guard_vector('NavCard.secondary_items', self.secondary_items, (Component,), False, True, False) _guard_enum('NavCard.color', self.color, _NavCardColor, True) + _guard_scalar('NavCard.name', self.name, (str,), False, True, False) _guard_vector('NavCard.commands', self.commands, (Command,), False, True, False) return _dump( view='nav', @@ -11236,6 +11541,7 @@ def dump(self) -> Dict: persona=None if self.persona is None else self.persona.dump(), secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], color=self.color, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11264,6 +11570,8 @@ def load(__d: Dict) -> 'NavCard': _guard_vector('NavCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_color: Any = __d.get('color') _guard_enum('NavCard.color', __d_color, _NavCardColor, True) + __d_name: Any = __d.get('name') + _guard_scalar('NavCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('NavCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11277,6 +11585,7 @@ def load(__d: Dict) -> 'NavCard': persona: Optional[Component] = None if __d_persona is None else Component.load(__d_persona) secondary_items: Optional[List[Component]] = None if __d_secondary_items is None else [Component.load(__e) for __e in __d_secondary_items] color: Optional[str] = __d_color + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return NavCard( box, @@ -11290,6 +11599,7 @@ def load(__d: Dict) -> 'NavCard': persona, secondary_items, color, + name, commands, ) @@ -11305,10 +11615,12 @@ def __init__( box: str, title: str, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('PixelArtCard.box', box, (str,), False, False, False) _guard_scalar('PixelArtCard.title', title, (str,), False, False, False) + _guard_scalar('PixelArtCard.name', name, (str,), False, True, False) _guard_vector('PixelArtCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11316,6 +11628,8 @@ def __init__( """The title for this card.""" self.data = data """The data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11323,12 +11637,14 @@ def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('PixelArtCard.box', self.box, (str,), False, False, False) _guard_scalar('PixelArtCard.title', self.title, (str,), False, False, False) + _guard_scalar('PixelArtCard.name', self.name, (str,), False, True, False) _guard_vector('PixelArtCard.commands', self.commands, (Command,), False, True, False) return _dump( view='pixel_art', box=self.box, title=self.title, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11340,16 +11656,20 @@ def load(__d: Dict) -> 'PixelArtCard': __d_title: Any = __d.get('title') _guard_scalar('PixelArtCard.title', __d_title, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('PixelArtCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('PixelArtCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title data: PackedRecord = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PixelArtCard( box, title, data, + name, commands, ) @@ -11365,6 +11685,7 @@ def __init__( plot: Plot, events: Optional[List[str]] = None, interactions: Optional[List[str]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ): @@ -11373,6 +11694,7 @@ def __init__( _guard_scalar('PlotCard.plot', plot, (Plot,), False, False, False) _guard_vector('PlotCard.events', events, (str,), False, True, False) _guard_vector('PlotCard.interactions', interactions, (str,), False, True, False) + _guard_scalar('PlotCard.name', name, (str,), False, True, False) _guard_scalar('PlotCard.animate', animate, (bool,), False, True, False) _guard_vector('PlotCard.commands', commands, (Command,), False, True, False) self.box = box @@ -11387,6 +11709,8 @@ def __init__( """The events to capture on this card. One of 'select_marks'.""" self.interactions = interactions """The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event.""" + self.name = name + """An optional identifying name for this card""" self.animate = animate """EXPERIMENTAL: True to turn on the chart animations. Defaults to False.""" self.commands = commands @@ -11399,6 +11723,7 @@ def dump(self) -> Dict: _guard_scalar('PlotCard.plot', self.plot, (Plot,), False, False, False) _guard_vector('PlotCard.events', self.events, (str,), False, True, False) _guard_vector('PlotCard.interactions', self.interactions, (str,), False, True, False) + _guard_scalar('PlotCard.name', self.name, (str,), False, True, False) _guard_scalar('PlotCard.animate', self.animate, (bool,), False, True, False) _guard_vector('PlotCard.commands', self.commands, (Command,), False, True, False) return _dump( @@ -11409,6 +11734,7 @@ def dump(self) -> Dict: plot=self.plot.dump(), events=self.events, interactions=self.interactions, + name=self.name, animate=self.animate, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11427,6 +11753,8 @@ def load(__d: Dict) -> 'PlotCard': _guard_vector('PlotCard.events', __d_events, (str,), False, True, False) __d_interactions: Any = __d.get('interactions') _guard_vector('PlotCard.interactions', __d_interactions, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('PlotCard.name', __d_name, (str,), False, True, False) __d_animate: Any = __d.get('animate') _guard_scalar('PlotCard.animate', __d_animate, (bool,), False, True, False) __d_commands: Any = __d.get('commands') @@ -11437,6 +11765,7 @@ def load(__d: Dict) -> 'PlotCard': plot: Plot = Plot.load(__d_plot) events: Optional[List[str]] = __d_events interactions: Optional[List[str]] = __d_interactions + name: Optional[str] = __d_name animate: Optional[bool] = __d_animate commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PlotCard( @@ -11446,6 +11775,7 @@ def load(__d: Dict) -> 'PlotCard': plot, events, interactions, + name, animate, commands, ) @@ -11462,6 +11792,7 @@ def __init__( aux_value: Optional[str] = None, caption: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('PostCard.box', box, (str,), False, False, False) @@ -11470,6 +11801,7 @@ def __init__( _guard_scalar('PostCard.aux_value', aux_value, (str,), False, True, False) _guard_scalar('PostCard.caption', caption, (str,), False, True, False) _guard_vector('PostCard.items', items, (Component,), False, True, False) + _guard_scalar('PostCard.name', name, (str,), False, True, False) _guard_vector('PostCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11483,6 +11815,8 @@ def __init__( """The card's caption, displayed below the image.""" self.items = items """The card's buttons, displayed at the bottom.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11494,6 +11828,7 @@ def dump(self) -> Dict: _guard_scalar('PostCard.aux_value', self.aux_value, (str,), False, True, False) _guard_scalar('PostCard.caption', self.caption, (str,), False, True, False) _guard_vector('PostCard.items', self.items, (Component,), False, True, False) + _guard_scalar('PostCard.name', self.name, (str,), False, True, False) _guard_vector('PostCard.commands', self.commands, (Command,), False, True, False) return _dump( view='post', @@ -11503,6 +11838,7 @@ def dump(self) -> Dict: aux_value=self.aux_value, caption=self.caption, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11521,6 +11857,8 @@ def load(__d: Dict) -> 'PostCard': _guard_scalar('PostCard.caption', __d_caption, (str,), False, True, False) __d_items: Any = __d.get('items') _guard_vector('PostCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('PostCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('PostCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11529,6 +11867,7 @@ def load(__d: Dict) -> 'PostCard': aux_value: Optional[str] = __d_aux_value caption: Optional[str] = __d_caption items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PostCard( box, @@ -11537,6 +11876,7 @@ def load(__d: Dict) -> 'PostCard': aux_value, caption, items, + name, commands, ) @@ -11651,6 +11991,7 @@ def __init__( image: str, items: Optional[List[Component]] = None, height: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ProfileCard.box', box, (str,), False, False, False) @@ -11658,6 +11999,7 @@ def __init__( _guard_scalar('ProfileCard.image', image, (str,), False, False, False) _guard_vector('ProfileCard.items', items, (Component,), False, True, False) _guard_scalar('ProfileCard.height', height, (str,), False, True, False) + _guard_scalar('ProfileCard.name', name, (str,), False, True, False) _guard_vector('ProfileCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11669,6 +12011,8 @@ def __init__( """Components in this card displayed below the image.""" self.height = height """The height of the bottom content (items), e.g. '400px'. Use sparingly, e.g. in grid views.""" + self.name = name + """The name of the card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11679,6 +12023,7 @@ def dump(self) -> Dict: _guard_scalar('ProfileCard.image', self.image, (str,), False, False, False) _guard_vector('ProfileCard.items', self.items, (Component,), False, True, False) _guard_scalar('ProfileCard.height', self.height, (str,), False, True, False) + _guard_scalar('ProfileCard.name', self.name, (str,), False, True, False) _guard_vector('ProfileCard.commands', self.commands, (Command,), False, True, False) return _dump( view='profile', @@ -11687,6 +12032,7 @@ def dump(self) -> Dict: image=self.image, items=None if self.items is None else [__e.dump() for __e in self.items], height=self.height, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11703,6 +12049,8 @@ def load(__d: Dict) -> 'ProfileCard': _guard_vector('ProfileCard.items', __d_items, (dict,), False, True, False) __d_height: Any = __d.get('height') _guard_scalar('ProfileCard.height', __d_height, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ProfileCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ProfileCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11710,6 +12058,7 @@ def load(__d: Dict) -> 'ProfileCard': image: str = __d_image items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] height: Optional[str] = __d_height + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ProfileCard( box, @@ -11717,6 +12066,7 @@ def load(__d: Dict) -> 'ProfileCard': image, items, height, + name, commands, ) @@ -11796,12 +12146,14 @@ def __init__( title: str, subtitle: str, items: Optional[Union[List[Component], str]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SectionCard.box', box, (str,), False, False, False) _guard_scalar('SectionCard.title', title, (str,), False, False, False) _guard_scalar('SectionCard.subtitle', subtitle, (str,), False, False, False) _guard_vector('SectionCard.items', items, (Component,), False, True, True) + _guard_scalar('SectionCard.name', name, (str,), False, True, False) _guard_vector('SectionCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11811,6 +12163,8 @@ def __init__( """The subtitle, displayed below the title. Supports Markdown.""" self.items = items """The components to display in this card""" + self.name = name + """An optional identifying name for this card""" self.commands = commands """Contextual menu commands for this component.""" @@ -11820,6 +12174,7 @@ def dump(self) -> Dict: _guard_scalar('SectionCard.title', self.title, (str,), False, False, False) _guard_scalar('SectionCard.subtitle', self.subtitle, (str,), False, False, False) _guard_vector('SectionCard.items', self.items, (Component,), False, True, True) + _guard_scalar('SectionCard.name', self.name, (str,), False, True, False) _guard_vector('SectionCard.commands', self.commands, (Command,), False, True, False) return _dump( view='section', @@ -11827,6 +12182,7 @@ def dump(self) -> Dict: title=self.title, subtitle=self.subtitle, items=None if self.items is None else self.items if isinstance(self.items, str) else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11841,18 +12197,22 @@ def load(__d: Dict) -> 'SectionCard': _guard_scalar('SectionCard.subtitle', __d_subtitle, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('SectionCard.items', __d_items, (dict,), False, True, True) + __d_name: Any = __d.get('name') + _guard_scalar('SectionCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SectionCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title subtitle: str = __d_subtitle items: Optional[Union[List[Component], str]] = __d_items if isinstance(__d_items, str) else None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SectionCard( box, title, subtitle, items, + name, commands, ) @@ -11892,6 +12252,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SmallSeriesStatCard.box', box, (str,), False, False, False) @@ -11903,6 +12264,7 @@ def __init__( _guard_enum('SmallSeriesStatCard.plot_type', plot_type, _SmallSeriesStatCardPlotType, True) _guard_enum('SmallSeriesStatCard.plot_curve', plot_curve, _SmallSeriesStatCardPlotCurve, True) _guard_scalar('SmallSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('SmallSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('SmallSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11926,6 +12288,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11940,6 +12304,7 @@ def dump(self) -> Dict: _guard_enum('SmallSeriesStatCard.plot_type', self.plot_type, _SmallSeriesStatCardPlotType, True) _guard_enum('SmallSeriesStatCard.plot_curve', self.plot_curve, _SmallSeriesStatCardPlotCurve, True) _guard_scalar('SmallSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('SmallSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('SmallSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='small_series_stat', @@ -11954,6 +12319,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11980,6 +12346,8 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('SmallSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('SmallSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SmallSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11993,6 +12361,7 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SmallSeriesStatCard( box, @@ -12006,6 +12375,7 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) @@ -12019,11 +12389,13 @@ def __init__( title: str, value: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SmallStatCard.box', box, (str,), False, False, False) _guard_scalar('SmallStatCard.title', title, (str,), False, False, False) _guard_scalar('SmallStatCard.value', value, (str,), False, False, False) + _guard_scalar('SmallStatCard.name', name, (str,), False, True, False) _guard_vector('SmallStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12033,6 +12405,8 @@ def __init__( """The primary value displayed.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12041,6 +12415,7 @@ def dump(self) -> Dict: _guard_scalar('SmallStatCard.box', self.box, (str,), False, False, False) _guard_scalar('SmallStatCard.title', self.title, (str,), False, False, False) _guard_scalar('SmallStatCard.value', self.value, (str,), False, False, False) + _guard_scalar('SmallStatCard.name', self.name, (str,), False, True, False) _guard_vector('SmallStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='small_stat', @@ -12048,6 +12423,7 @@ def dump(self) -> Dict: title=self.title, value=self.value, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12061,18 +12437,22 @@ def load(__d: Dict) -> 'SmallStatCard': __d_value: Any = __d.get('value') _guard_scalar('SmallStatCard.value', __d_value, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('SmallStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SmallStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title value: str = __d_value data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SmallStatCard( box, title, value, data, + name, commands, ) @@ -12637,6 +13017,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TallGaugeStatCard.box', box, (str,), False, False, False) @@ -12645,6 +13026,7 @@ def __init__( _guard_scalar('TallGaugeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('TallGaugeStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('TallGaugeStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('TallGaugeStatCard.name', name, (str,), False, True, False) _guard_vector('TallGaugeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12660,6 +13042,8 @@ def __init__( """The color of the progress gauge.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12671,6 +13055,7 @@ def dump(self) -> Dict: _guard_scalar('TallGaugeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('TallGaugeStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('TallGaugeStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('TallGaugeStatCard.name', self.name, (str,), False, True, False) _guard_vector('TallGaugeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='tall_gauge_stat', @@ -12681,6 +13066,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12700,6 +13086,8 @@ def load(__d: Dict) -> 'TallGaugeStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('TallGaugeStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TallGaugeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TallGaugeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -12709,6 +13097,7 @@ def load(__d: Dict) -> 'TallGaugeStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TallGaugeStatCard( box, @@ -12718,6 +13107,7 @@ def load(__d: Dict) -> 'TallGaugeStatCard': progress, plot_color, data, + name, commands, ) @@ -12878,6 +13268,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TallSeriesStatCard.box', box, (str,), False, False, False) @@ -12890,6 +13281,7 @@ def __init__( _guard_enum('TallSeriesStatCard.plot_type', plot_type, _TallSeriesStatCardPlotType, True) _guard_enum('TallSeriesStatCard.plot_curve', plot_curve, _TallSeriesStatCardPlotCurve, True) _guard_scalar('TallSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('TallSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('TallSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12915,6 +13307,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12930,6 +13324,7 @@ def dump(self) -> Dict: _guard_enum('TallSeriesStatCard.plot_type', self.plot_type, _TallSeriesStatCardPlotType, True) _guard_enum('TallSeriesStatCard.plot_curve', self.plot_curve, _TallSeriesStatCardPlotCurve, True) _guard_scalar('TallSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('TallSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('TallSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='tall_series_stat', @@ -12945,6 +13340,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12973,6 +13369,8 @@ def load(__d: Dict) -> 'TallSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('TallSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TallSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TallSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -12987,6 +13385,7 @@ def load(__d: Dict) -> 'TallSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TallSeriesStatCard( box, @@ -13001,6 +13400,7 @@ def load(__d: Dict) -> 'TallSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) @@ -13074,11 +13474,13 @@ def __init__( title: str, content: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TemplateCard.box', box, (str,), False, False, False) _guard_scalar('TemplateCard.title', title, (str,), False, False, False) _guard_scalar('TemplateCard.content', content, (str,), False, False, False) + _guard_scalar('TemplateCard.name', name, (str,), False, True, False) _guard_vector('TemplateCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13088,6 +13490,8 @@ def __init__( """The Handlebars template. https://handlebarsjs.com/guide/""" self.data = data """Data for the Handlebars template.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13096,6 +13500,7 @@ def dump(self) -> Dict: _guard_scalar('TemplateCard.box', self.box, (str,), False, False, False) _guard_scalar('TemplateCard.title', self.title, (str,), False, False, False) _guard_scalar('TemplateCard.content', self.content, (str,), False, False, False) + _guard_scalar('TemplateCard.name', self.name, (str,), False, True, False) _guard_vector('TemplateCard.commands', self.commands, (Command,), False, True, False) return _dump( view='template', @@ -13103,6 +13508,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13116,18 +13522,22 @@ def load(__d: Dict) -> 'TemplateCard': __d_content: Any = __d.get('content') _guard_scalar('TemplateCard.content', __d_content, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TemplateCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TemplateCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: str = __d_content data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TemplateCard( box, title, content, data, + name, commands, ) @@ -13141,12 +13551,14 @@ def __init__( items: List[Command], secondary_items: Optional[List[Command]] = None, overflow_items: Optional[List[Command]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ToolbarCard.box', box, (str,), False, False, False) _guard_vector('ToolbarCard.items', items, (Command,), False, False, False) _guard_vector('ToolbarCard.secondary_items', secondary_items, (Command,), False, True, False) _guard_vector('ToolbarCard.overflow_items', overflow_items, (Command,), False, True, False) + _guard_scalar('ToolbarCard.name', name, (str,), False, True, False) _guard_vector('ToolbarCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13156,6 +13568,8 @@ def __init__( """Items to render on the right side (or left, in RTL).""" self.overflow_items = overflow_items """Items to render in an overflow menu.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13165,6 +13579,7 @@ def dump(self) -> Dict: _guard_vector('ToolbarCard.items', self.items, (Command,), False, False, False) _guard_vector('ToolbarCard.secondary_items', self.secondary_items, (Command,), False, True, False) _guard_vector('ToolbarCard.overflow_items', self.overflow_items, (Command,), False, True, False) + _guard_scalar('ToolbarCard.name', self.name, (str,), False, True, False) _guard_vector('ToolbarCard.commands', self.commands, (Command,), False, True, False) return _dump( view='toolbar', @@ -13172,6 +13587,7 @@ def dump(self) -> Dict: items=[__e.dump() for __e in self.items], secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], overflow_items=None if self.overflow_items is None else [__e.dump() for __e in self.overflow_items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13186,18 +13602,22 @@ def load(__d: Dict) -> 'ToolbarCard': _guard_vector('ToolbarCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_overflow_items: Any = __d.get('overflow_items') _guard_vector('ToolbarCard.overflow_items', __d_overflow_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ToolbarCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ToolbarCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: List[Command] = [Command.load(__e) for __e in __d_items] secondary_items: Optional[List[Command]] = None if __d_secondary_items is None else [Command.load(__e) for __e in __d_secondary_items] overflow_items: Optional[List[Command]] = None if __d_overflow_items is None else [Command.load(__e) for __e in __d_overflow_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ToolbarCard( box, items, secondary_items, overflow_items, + name, commands, ) @@ -13220,12 +13640,14 @@ def __init__( specification: str, data: Optional[PackedRecord] = None, grammar: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('VegaCard.box', box, (str,), False, False, False) _guard_scalar('VegaCard.title', title, (str,), False, False, False) _guard_scalar('VegaCard.specification', specification, (str,), False, False, False) _guard_enum('VegaCard.grammar', grammar, _VegaCardGrammar, True) + _guard_scalar('VegaCard.name', name, (str,), False, True, False) _guard_vector('VegaCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13237,6 +13659,8 @@ def __init__( """Data for the plot, if any.""" self.grammar = grammar """Vega grammar to use. Defaults to 'vega-lite'. One of 'vega-lite', 'vega'. See enum h2o_wave.ui.VegaCardGrammar.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13246,6 +13670,7 @@ def dump(self) -> Dict: _guard_scalar('VegaCard.title', self.title, (str,), False, False, False) _guard_scalar('VegaCard.specification', self.specification, (str,), False, False, False) _guard_enum('VegaCard.grammar', self.grammar, _VegaCardGrammar, True) + _guard_scalar('VegaCard.name', self.name, (str,), False, True, False) _guard_vector('VegaCard.commands', self.commands, (Command,), False, True, False) return _dump( view='vega', @@ -13254,6 +13679,7 @@ def dump(self) -> Dict: specification=self.specification, data=self.data, grammar=self.grammar, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13269,6 +13695,8 @@ def load(__d: Dict) -> 'VegaCard': __d_data: Any = __d.get('data') __d_grammar: Any = __d.get('grammar') _guard_enum('VegaCard.grammar', __d_grammar, _VegaCardGrammar, True) + __d_name: Any = __d.get('name') + _guard_scalar('VegaCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('VegaCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13276,6 +13704,7 @@ def load(__d: Dict) -> 'VegaCard': specification: str = __d_specification data: Optional[PackedRecord] = __d_data grammar: Optional[str] = __d_grammar + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return VegaCard( box, @@ -13283,6 +13712,7 @@ def load(__d: Dict) -> 'VegaCard': specification, data, grammar, + name, commands, ) @@ -13409,6 +13839,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideBarStatCard.box', box, (str,), False, False, False) @@ -13417,6 +13848,7 @@ def __init__( _guard_scalar('WideBarStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('WideBarStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('WideBarStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideBarStatCard.name', name, (str,), False, True, False) _guard_vector('WideBarStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13432,6 +13864,8 @@ def __init__( """The color of the progress bar.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13443,6 +13877,7 @@ def dump(self) -> Dict: _guard_scalar('WideBarStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('WideBarStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('WideBarStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideBarStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideBarStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_bar_stat', @@ -13453,6 +13888,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13472,6 +13908,8 @@ def load(__d: Dict) -> 'WideBarStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideBarStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideBarStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideBarStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13481,6 +13919,7 @@ def load(__d: Dict) -> 'WideBarStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideBarStatCard( box, @@ -13490,6 +13929,7 @@ def load(__d: Dict) -> 'WideBarStatCard': progress, plot_color, data, + name, commands, ) @@ -13506,6 +13946,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideGaugeStatCard.box', box, (str,), False, False, False) @@ -13514,6 +13955,7 @@ def __init__( _guard_scalar('WideGaugeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('WideGaugeStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('WideGaugeStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideGaugeStatCard.name', name, (str,), False, True, False) _guard_vector('WideGaugeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13529,6 +13971,8 @@ def __init__( """The color of the progress gauge.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13540,6 +13984,7 @@ def dump(self) -> Dict: _guard_scalar('WideGaugeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('WideGaugeStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('WideGaugeStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideGaugeStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideGaugeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_gauge_stat', @@ -13550,6 +13995,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13569,6 +14015,8 @@ def load(__d: Dict) -> 'WideGaugeStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideGaugeStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideGaugeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideGaugeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13578,6 +14026,7 @@ def load(__d: Dict) -> 'WideGaugeStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideGaugeStatCard( box, @@ -13587,6 +14036,7 @@ def load(__d: Dict) -> 'WideGaugeStatCard': progress, plot_color, data, + name, commands, ) @@ -13739,12 +14189,14 @@ def __init__( fraction: float, color: str, aux_value: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Pie.label', label, (str,), False, False, False) _guard_scalar('Pie.value', value, (str,), False, False, False) _guard_scalar('Pie.fraction', fraction, (float, int,), False, False, False) _guard_scalar('Pie.color', color, (str,), False, False, False) _guard_scalar('Pie.aux_value', aux_value, (str,), False, True, False) + _guard_scalar('Pie.name', name, (str,), False, True, False) self.label = label """The description for the pie, displayed in the legend.""" self.value = value @@ -13755,6 +14207,8 @@ def __init__( """The color of the pie.""" self.aux_value = aux_value """The auxiliary value, displayed below the label.""" + self.name = name + """An optional name, for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -13763,12 +14217,14 @@ def dump(self) -> Dict: _guard_scalar('Pie.fraction', self.fraction, (float, int,), False, False, False) _guard_scalar('Pie.color', self.color, (str,), False, False, False) _guard_scalar('Pie.aux_value', self.aux_value, (str,), False, True, False) + _guard_scalar('Pie.name', self.name, (str,), False, True, False) return _dump( label=self.label, value=self.value, fraction=self.fraction, color=self.color, aux_value=self.aux_value, + name=self.name, ) @staticmethod @@ -13784,17 +14240,21 @@ def load(__d: Dict) -> 'Pie': _guard_scalar('Pie.color', __d_color, (str,), False, False, False) __d_aux_value: Any = __d.get('aux_value') _guard_scalar('Pie.aux_value', __d_aux_value, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Pie.name', __d_name, (str,), False, True, False) label: str = __d_label value: str = __d_value fraction: float = __d_fraction color: str = __d_color aux_value: Optional[str] = __d_aux_value + name: Optional[str] = __d_name return Pie( label, value, fraction, color, aux_value, + name, ) @@ -13806,11 +14266,13 @@ def __init__( box: str, title: str, pies: List[Pie], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WidePieStatCard.box', box, (str,), False, False, False) _guard_scalar('WidePieStatCard.title', title, (str,), False, False, False) _guard_vector('WidePieStatCard.pies', pies, (Pie,), False, False, False) + _guard_scalar('WidePieStatCard.name', name, (str,), False, True, False) _guard_vector('WidePieStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13818,6 +14280,8 @@ def __init__( """The card's title.""" self.pies = pies """The pies to be included in the pie chart.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13826,12 +14290,14 @@ def dump(self) -> Dict: _guard_scalar('WidePieStatCard.box', self.box, (str,), False, False, False) _guard_scalar('WidePieStatCard.title', self.title, (str,), False, False, False) _guard_vector('WidePieStatCard.pies', self.pies, (Pie,), False, False, False) + _guard_scalar('WidePieStatCard.name', self.name, (str,), False, True, False) _guard_vector('WidePieStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_pie_stat', box=self.box, title=self.title, pies=[__e.dump() for __e in self.pies], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13844,16 +14310,20 @@ def load(__d: Dict) -> 'WidePieStatCard': _guard_scalar('WidePieStatCard.title', __d_title, (str,), False, False, False) __d_pies: Any = __d.get('pies') _guard_vector('WidePieStatCard.pies', __d_pies, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('WidePieStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WidePieStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title pies: List[Pie] = [Pie.load(__e) for __e in __d_pies] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WidePieStatCard( box, title, pies, + name, commands, ) @@ -13868,12 +14338,14 @@ def __init__( caption: str, plot: Plot, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WidePlotCard.box', box, (str,), False, False, False) _guard_scalar('WidePlotCard.title', title, (str,), False, False, False) _guard_scalar('WidePlotCard.caption', caption, (str,), False, False, False) _guard_scalar('WidePlotCard.plot', plot, (Plot,), False, False, False) + _guard_scalar('WidePlotCard.name', name, (str,), False, True, False) _guard_vector('WidePlotCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13885,6 +14357,8 @@ def __init__( """The card's plot.""" self.data = data """The card's plot data.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13894,6 +14368,7 @@ def dump(self) -> Dict: _guard_scalar('WidePlotCard.title', self.title, (str,), False, False, False) _guard_scalar('WidePlotCard.caption', self.caption, (str,), False, False, False) _guard_scalar('WidePlotCard.plot', self.plot, (Plot,), False, False, False) + _guard_scalar('WidePlotCard.name', self.name, (str,), False, True, False) _guard_vector('WidePlotCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_plot', @@ -13902,6 +14377,7 @@ def dump(self) -> Dict: caption=self.caption, plot=self.plot.dump(), data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13917,6 +14393,8 @@ def load(__d: Dict) -> 'WidePlotCard': __d_plot: Any = __d.get('plot') _guard_scalar('WidePlotCard.plot', __d_plot, (dict,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WidePlotCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WidePlotCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13924,6 +14402,7 @@ def load(__d: Dict) -> 'WidePlotCard': caption: str = __d_caption plot: Plot = Plot.load(__d_plot) data: PackedRecord = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WidePlotCard( box, @@ -13931,6 +14410,7 @@ def load(__d: Dict) -> 'WidePlotCard': caption, plot, data, + name, commands, ) @@ -13971,6 +14451,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideSeriesStatCard.box', box, (str,), False, False, False) @@ -13983,6 +14464,7 @@ def __init__( _guard_enum('WideSeriesStatCard.plot_type', plot_type, _WideSeriesStatCardPlotType, True) _guard_enum('WideSeriesStatCard.plot_curve', plot_curve, _WideSeriesStatCardPlotCurve, True) _guard_scalar('WideSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('WideSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -14008,6 +14490,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -14023,6 +14507,7 @@ def dump(self) -> Dict: _guard_enum('WideSeriesStatCard.plot_type', self.plot_type, _WideSeriesStatCardPlotType, True) _guard_enum('WideSeriesStatCard.plot_curve', self.plot_curve, _WideSeriesStatCardPlotCurve, True) _guard_scalar('WideSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_series_stat', @@ -14038,6 +14523,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -14066,6 +14552,8 @@ def load(__d: Dict) -> 'WideSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -14080,6 +14568,7 @@ def load(__d: Dict) -> 'WideSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideSeriesStatCard( box, @@ -14094,5 +14583,6 @@ def load(__d: Dict) -> 'WideSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) diff --git a/py/h2o_lightwave/h2o_lightwave/ui.py b/py/h2o_lightwave/h2o_lightwave/ui.py index c301fdd3a5..39e0bbd131 100644 --- a/py/h2o_lightwave/h2o_lightwave/ui.py +++ b/py/h2o_lightwave/h2o_lightwave/ui.py @@ -1124,18 +1124,21 @@ def mini_button( def mini_buttons( items: List[Component], visible: Optional[bool] = None, + name: Optional[str] = None, ) -> Component: """Create a set of mini buttons laid out horizontally. Args: items: The buttons in this set. visible: True if the component should be visible. Defaults to True. + name: An identifying name for this component. Returns: A `h2o_wave.types.MiniButtons` instance. """ return Component(mini_buttons=MiniButtons( items, visible, + name, )) @@ -1230,6 +1233,7 @@ def tag( label: str, color: str, label_color: Optional[str] = None, + name: Optional[str] = None, ) -> Tag: """Create a tag. @@ -1237,6 +1241,7 @@ def tag( label: The text displayed within the tag. color: Tag's background color. label_color: Tag's label color. If not specified, black or white will be picked based on correct contrast with background. + name: An identifying name for this component. Returns: A `h2o_wave.types.Tag` instance. """ @@ -1244,6 +1249,7 @@ def tag( label, color, label_color, + name, ) @@ -1312,6 +1318,36 @@ def markdown_table_cell_type( )) +def table_cell_type( + progress: Optional[ProgressTableCellType] = None, + icon: Optional[IconTableCellType] = None, + tag: Optional[TagTableCellType] = None, + menu: Optional[MenuTableCellType] = None, + markdown: Optional[MarkdownTableCellType] = None, + name: Optional[str] = None, +) -> TableCellType: + """Defines cell content to be rendered instead of a simple text. + + Args: + progress: Renders a progress arc with a percentage value in the middle. + icon: Renders an icon. + tag: Renders one or more tags. + menu: Renders a command menu. + markdown: Renders text using markdown. + name: An identifying name for this Component + Returns: + A `h2o_wave.types.TableCellType` instance. + """ + return TableCellType( + progress, + icon, + tag, + menu, + markdown, + name, + ) + + def table_column( name: str, label: str, @@ -1385,6 +1421,7 @@ def table_group( label: str, rows: List[TableRow], collapsed: Optional[bool] = None, + name: Optional[str] = None, ) -> TableGroup: """Make rows within the table collapsible/expandable. @@ -1394,6 +1431,7 @@ def table_group( label: The title of the group. rows: The rows in this group. collapsed: Indicates whether the table group should be collapsed by default. Defaults to True. + name: An identifying name for this group. Returns: A `h2o_wave.types.TableGroup` instance. """ @@ -1401,24 +1439,28 @@ def table_group( label, rows, collapsed, + name, ) def table_pagination( total_rows: int, rows_per_page: int, + name: Optional[str] = None, ) -> TablePagination: """Configure table pagination. Use as `pagination` parameter to `ui.table()` Args: total_rows: Total count of all the rows in your dataset. rows_per_page: The maximum amount of rows to be displayed in a single page. + name: An identifying name for this component. Returns: A `h2o_wave.types.TablePagination` instance. """ return TablePagination( total_rows, rows_per_page, + name, ) @@ -1557,6 +1599,7 @@ def links( label: Optional[str] = None, inline: Optional[bool] = None, width: Optional[str] = None, + name: Optional[str] = None, ) -> Component: """Create a collection of links. @@ -1565,6 +1608,7 @@ def links( label: The name of the link group. inline: Render links horizontally. Defaults to False. width: The width of the links, e.g. '100px'. + name: An identifying name for this component. Returns: A `h2o_wave.types.Links` instance. """ @@ -1573,6 +1617,7 @@ def links( label, inline, width, + name, )) @@ -1843,6 +1888,7 @@ def step( label: str, icon: Optional[str] = None, done: Optional[bool] = None, + name: Optional[str] = None, ) -> Step: """Create a step for a stepper. @@ -1850,6 +1896,7 @@ def step( label: Text displayed below icon. icon: Icon to be displayed. done: Indicates whether this step has already been completed. + name: An identifying name for this component. Returns: A `h2o_wave.types.Step` instance. """ @@ -1857,6 +1904,7 @@ def step( label, icon, done, + name, ) @@ -1947,6 +1995,7 @@ def mark( label_font_weight: Optional[str] = None, label_line_height: Optional[float] = None, label_align: Optional[str] = None, + name: Optional[str] = None, ref_stroke_color: Optional[str] = None, ref_stroke_opacity: Optional[float] = None, ref_stroke_size: Optional[float] = None, @@ -2015,6 +2064,7 @@ def mark( label_font_weight: Label font weight. label_line_height: Label line height. label_align: Label text alignment. One of 'left', 'right', 'center', 'start', 'end'. See enum h2o_wave.ui.MarkLabelAlign. + name: An optional name ref_stroke_color: Reference line stroke color. ref_stroke_opacity: Reference line stroke opacity. ref_stroke_size: Reference line stroke size (line width or pen thickness). @@ -2082,6 +2132,7 @@ def mark( label_font_weight, label_line_height, label_align, + name, ref_stroke_color, ref_stroke_opacity, ref_stroke_size, @@ -2275,6 +2326,7 @@ def image( width: Optional[str] = None, visible: Optional[bool] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, ) -> Component: """Create an image. @@ -2286,6 +2338,7 @@ def image( width: The width of the image, e.g. '100px'. visible: True if the component should be visible. Defaults to True. path_popup: The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. + name: An optional identifying name for this component. Returns: A `h2o_wave.types.Image` instance. """ @@ -2297,6 +2350,7 @@ def image( width, visible, path_popup, + name, )) @@ -2361,18 +2415,21 @@ def text_annotator_tag( def text_annotator_item( text: str, tag: Optional[str] = None, + name: Optional[str] = None, ) -> TextAnnotatorItem: """Create an annotator item with initial selected tags or no tag for plaintext. Args: text: Text to be highlighted. tag: The `name` of the text annotator tag to refer to for the `label` and `color` of this item. + name: An identifying name for this component. Returns: A `h2o_wave.types.TextAnnotatorItem` instance. """ return TextAnnotatorItem( text, tag, + name, ) @@ -2434,6 +2491,7 @@ def image_annotator_rect( y1: float, x2: float, y2: float, + name: Optional[str] = None, ) -> ImageAnnotatorShape: """Create a rectangular annotation shape. @@ -2442,6 +2500,7 @@ def image_annotator_rect( y1: `y` coordinate of the rectangle's corner. x2: `x` coordinate of the diagonally opposite corner. y2: `y` coordinate of the diagonally opposite corner. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorRect` instance. """ @@ -2450,57 +2509,67 @@ def image_annotator_rect( y1, x2, y2, + name, )) def image_annotator_point( x: float, y: float, + name: Optional[str] = None, ) -> ImageAnnotatorPoint: """Create a polygon annotation point with x and y coordinates.. Args: x: `x` coordinate of the point. y: `y` coordinate of the point. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorPoint` instance. """ return ImageAnnotatorPoint( x, y, + name, ) def image_annotator_polygon( vertices: List[ImageAnnotatorPoint], + name: Optional[str] = None, ) -> ImageAnnotatorShape: """Create a polygon annotation shape. Args: vertices: List of polygon points. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorPolygon` instance. """ return ImageAnnotatorShape(polygon=ImageAnnotatorPolygon( vertices, + name, )) def image_annotator_item( shape: ImageAnnotatorShape, tag: str, + name: Optional[str] = None, ) -> ImageAnnotatorItem: """Create an annotator item with initial selected tags or no tag for plaintext. Args: shape: The annotation shape. tag: The `name` of the image annotator tag to refer to for the `label` and `color` of this item. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorItem` instance. """ return ImageAnnotatorItem( shape, tag, + name, ) @@ -2570,6 +2639,7 @@ def audio_annotator_item( start: float, end: float, tag: str, + name: Optional[str] = None, ) -> AudioAnnotatorItem: """Create an annotator item with initial selected tags or no tags. @@ -2577,6 +2647,7 @@ def audio_annotator_item( start: The start of the audio annotation in seconds. end: The end of the audio annotation in seconds. tag: The `name` of the audio annotator tag to refer to for the `label` and `color` of this item. + name: An identifying name for this component Returns: A `h2o_wave.types.AudioAnnotatorItem` instance. """ @@ -2584,6 +2655,7 @@ def audio_annotator_item( start, end, tag, + name, ) @@ -2740,15 +2812,15 @@ def time_picker( name: An identifying name for this component. label: Text to be displayed alongside the component. placeholder: A string that provides a brief hint to the user as to what kind of information is expected in the field. - value: The time value in hh:mm format. E.g. '10:30', '14:25', '23:59', '00:00' + value: The time value in hh:mm:ss format. E.g. '10:30:45', '14:25:30', '23:59:59', '00:00:00' disabled: True if this field is disabled. width: The width of the time picker, e.g. '100px'. Defaults to '100%'. visible: True if the component should be visible. Defaults to True. trigger: True if the form should be submitted when the time is selected. required: True if this is a required field. Defaults to False. hour_format: Specifies 12-hour or 24-hour time format. One of `12` or `24`. Defaults to `12`. - min: The minimum allowed time value in hh:mm format. E.g.: '08:00', '13:30' - max: The maximum allowed time value in hh:mm format. E.g.: '15:30', '00:00' + min: The minimum allowed time value in hh:mm:ss format. E.g.: '08:00:00', '13:30:00' + max: The maximum allowed time value in hh:mm:ss format. E.g.: '15:30:00', '00:00:00' minutes_step: Limits the available minutes to select from. One of `1`, `5`, `10`, `15`, `20`, `30` or `60`. Defaults to `1`. Returns: A `h2o_wave.types.TimePicker` instance. @@ -2775,6 +2847,7 @@ def article_card( title: str, content: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ArticleCard: """Create an article card for longer texts. @@ -2784,6 +2857,7 @@ def article_card( title: The card’s title, displayed at the top. content: Markdown text. items: Collection of small buttons rendered under the title. + name: An identifying name for this component commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ArticleCard` instance. @@ -2793,6 +2867,7 @@ def article_card( title, content, items, + name, commands, ) @@ -2818,6 +2893,7 @@ def breadcrumb( def breadcrumbs_card( box: str, items: List[Breadcrumb], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> BreadcrumbsCard: """Create a card containing breadcrumbs. @@ -2831,6 +2907,7 @@ def breadcrumbs_card( Args: box: A string indicating how to place this component on the page. items: A list of `h2o_wave.types.Breadcrumb` instances to display. See `h2o_wave.ui.breadcrumb()` + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.BreadcrumbsCard` instance. @@ -2838,6 +2915,7 @@ def breadcrumbs_card( return BreadcrumbsCard( box, items, + name, commands, ) @@ -3040,6 +3118,7 @@ def footer_card( box: str, caption: str, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FooterCard: """Render a page footer displaying a caption. @@ -3049,6 +3128,7 @@ def footer_card( box: A string indicating how to place this component on the page. caption: The caption. Supports markdown. * items: The components displayed to the right of the caption. + name: An optional identifying name to the card commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FooterCard` instance. @@ -3057,6 +3137,7 @@ def footer_card( box, caption, items, + name, commands, ) @@ -3065,6 +3146,7 @@ def form_card( box: str, items: Union[List[Component], str], title: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FormCard: """Create a form. @@ -3073,6 +3155,7 @@ def form_card( box: A string indicating how to place this component on the page. items: The components in this form. title: The title for this card. + name: An optional name for this form. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FormCard` instance. @@ -3081,6 +3164,7 @@ def form_card( box, items, title, + name, commands, ) @@ -3091,6 +3175,7 @@ def frame_card( path: Optional[str] = None, content: Optional[str] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FrameCard: """Render a card containing a HTML page inside an inline frame (an `iframe`). @@ -3103,6 +3188,7 @@ def frame_card( path: The path or URL of the web page, e.g. `/foo.html` or `http://example.com/foo.html`. content: The HTML content of the page. A string containing `...`. compact: True if title and padding should be removed. Defaults to False. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FrameCard` instance. @@ -3113,6 +3199,7 @@ def frame_card( path, content, compact, + name, commands, ) @@ -3127,6 +3214,7 @@ def graphics_card( image: Optional[str] = None, image_path: Optional[str] = None, image_type: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> GraphicsCard: """Create a card for displaying vector graphics. @@ -3141,6 +3229,7 @@ def graphics_card( image: Background image data, base64-encoded. image_path: The path or URL or data URL of the background image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. image_type: The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set. + name: An optional identifying name for this Card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.GraphicsCard` instance. @@ -3155,6 +3244,7 @@ def graphics_card( image, image_path, image_type, + name, commands, ) @@ -3248,6 +3338,7 @@ def header_card( items: Optional[List[Component]] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> HeaderCard: """Render a page header displaying a title, subtitle and an optional navigation menu. @@ -3264,6 +3355,7 @@ def header_card( items: Items that should be displayed on the right side of the header. secondary_items: Items that should be displayed in the center of the header. color: Header background color. Defaults to 'primary'. One of 'card', 'transparent', 'primary'. See enum h2o_wave.ui.HeaderCardColor. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.HeaderCard` instance. @@ -3279,6 +3371,7 @@ def header_card( items, secondary_items, color, + name, commands, ) @@ -3291,6 +3384,7 @@ def image_card( data: Optional[PackedRecord] = None, path: Optional[str] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ImageCard: """Create a card that displays a base64-encoded image. @@ -3303,6 +3397,7 @@ def image_card( data: Data for this card. path: The path or URL or data URL of the image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. path_popup: The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. + name: An optional identifying name for the image commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ImageCard` instance. @@ -3315,6 +3410,7 @@ def image_card( data, path, path_popup, + name, commands, ) @@ -3330,6 +3426,7 @@ def large_bar_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> LargeBarStatCard: """Create a large captioned card displaying a primary value, an auxiliary value and a progress bar, with captions for each value. @@ -3345,6 +3442,7 @@ def large_bar_stat_card( progress: The value of the progress bar, between 0 and 1. plot_color: The color of the progress bar. data: Data for this card. + name: An optional identifying name for this group. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.LargeBarStatCard` instance. @@ -3360,6 +3458,7 @@ def large_bar_stat_card( progress, plot_color, data, + name, commands, ) @@ -3371,6 +3470,7 @@ def large_stat_card( aux_value: str, caption: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> LargeStatCard: """Create a stat card displaying a primary value, an auxiliary value and a caption. @@ -3382,6 +3482,7 @@ def large_stat_card( aux_value: The auxiliary value displayed next to the primary value. caption: The caption displayed below the primary value. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.LargeStatCard` instance. @@ -3393,6 +3494,7 @@ def large_stat_card( aux_value, caption, data, + name, commands, ) @@ -3467,6 +3569,7 @@ def markdown_card( content: str, data: Optional[PackedRecord] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> MarkdownCard: """Create a card that renders Markdown content. @@ -3482,6 +3585,7 @@ def markdown_card( content: The markdown content. Supports Github Flavored Markdown (GFM): https://guides.github.com/features/mastering-markdown/ data: Additional data for the card. compact: Make spacing tighter. Defaults to True. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.MarkdownCard` instance. @@ -3492,6 +3596,7 @@ def markdown_card( content, data, compact, + name, commands, ) @@ -3501,6 +3606,7 @@ def markup_card( title: str, content: str, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> MarkupCard: """Render HTML content. @@ -3510,6 +3616,7 @@ def markup_card( title: The title for this card. content: The HTML content. compact: True if outer spacing should be removed. Defaults to False. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.MarkupCard` instance. @@ -3519,6 +3626,7 @@ def markup_card( title, content, compact, + name, commands, ) @@ -3803,18 +3911,21 @@ def inline_script( def inline_stylesheet( content: str, media: Optional[str] = None, + name: Optional[str] = None, ) -> InlineStylesheet: """Create an inline CSS to be injected into a page. Args: content: The CSS to be applied to this page. media: A valid media query to set conditions for when the style should be applied. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#attr-media. + name: An optional identifying name for this stylesheet. Returns: A `h2o_wave.types.InlineStylesheet` instance. """ return InlineStylesheet( content, media, + name, ) @@ -3822,6 +3933,7 @@ def stylesheet( path: str, media: Optional[str] = None, cross_origin: Optional[str] = None, + name: Optional[str] = None, ) -> Stylesheet: """Create a reference to an external CSS file to be included on a page. @@ -3829,6 +3941,7 @@ def stylesheet( path: The URI of an external stylesheet. media: A valid media query to set conditions for when the stylesheet should be loaded. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media. cross_origin: The CORS setting. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin + name: An optional identifying name for this stylesheet. Returns: A `h2o_wave.types.Stylesheet` instance. """ @@ -3836,6 +3949,7 @@ def stylesheet( path, media, cross_origin, + name, ) @@ -3857,6 +3971,7 @@ def meta_card( script: Optional[InlineScript] = None, stylesheet: Optional[InlineStylesheet] = None, stylesheets: Optional[List[Stylesheet]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ) -> MetaCard: @@ -3883,6 +3998,7 @@ def meta_card( script: Javascript code to execute on this page. stylesheet: CSS stylesheet to be applied to this page. stylesheets: External CSS files to load into the page. + name: An Optional identifying name for this page animate: EXPERIMENTAL: True to turn on the card animations. Defaults to False. commands: Contextual menu commands for this component. Returns: @@ -3906,6 +4022,7 @@ def meta_card( script, stylesheet, stylesheets, + name, animate, commands, ) @@ -3923,6 +4040,7 @@ def nav_card( persona: Optional[Component] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> NavCard: """Create a card containing a navigation pane. @@ -3939,6 +4057,7 @@ def nav_card( persona: The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. * secondary_items: Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle. color: Card background color. Defaults to 'card'. One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.NavCard` instance. @@ -3955,6 +4074,7 @@ def nav_card( persona, secondary_items, color, + name, commands, ) @@ -3963,6 +4083,7 @@ def pixel_art_card( box: str, title: str, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> PixelArtCard: """WARNING: Experimental and subject to change. @@ -3974,6 +4095,7 @@ def pixel_art_card( box: A string indicating how to place this component on the page. title: The title for this card. data: The data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.PixelArtCard` instance. @@ -3982,6 +4104,7 @@ def pixel_art_card( box, title, data, + name, commands, ) @@ -3993,6 +4116,7 @@ def plot_card( plot: Plot, events: Optional[List[str]] = None, interactions: Optional[List[str]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ) -> PlotCard: @@ -4005,6 +4129,7 @@ def plot_card( plot: The plot to be displayed in this card. events: The events to capture on this card. One of 'select_marks'. interactions: The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event. + name: An optional identifying name for this card animate: EXPERIMENTAL: True to turn on the chart animations. Defaults to False. commands: Contextual menu commands for this component. Returns: @@ -4017,6 +4142,7 @@ def plot_card( plot, events, interactions, + name, animate, commands, ) @@ -4029,6 +4155,7 @@ def post_card( aux_value: Optional[str] = None, caption: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> PostCard: """Create a postcard displaying a persona, image, caption and optional buttons. @@ -4040,6 +4167,7 @@ def post_card( aux_value: The card's aux_value, displayed on the right hand side of the image. caption: The card's caption, displayed below the image. items: The card's buttons, displayed at the bottom. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.PostCard` instance. @@ -4051,6 +4179,7 @@ def post_card( aux_value, caption, items, + name, commands, ) @@ -4097,6 +4226,7 @@ def profile_card( image: str, items: Optional[List[Component]] = None, height: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ProfileCard: """Create a profile card to display information about a user. @@ -4107,6 +4237,7 @@ def profile_card( image: The card’s image, either a base64-encoded image, a path to an image hosted externally (starting with `https://` or `http://`) or a path to an image hosted on the Wave daemon (starting with `/`). . items: Components in this card displayed below the image. height: The height of the bottom content (items), e.g. '400px'. Use sparingly, e.g. in grid views. + name: The name of the card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ProfileCard` instance. @@ -4117,6 +4248,7 @@ def profile_card( image, items, height, + name, commands, ) @@ -4154,6 +4286,7 @@ def section_card( title: str, subtitle: str, items: Optional[Union[List[Component], str]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SectionCard: """Render a card displaying a title, a subtitle, and optional components. @@ -4164,6 +4297,7 @@ def section_card( title: The title. subtitle: The subtitle, displayed below the title. Supports Markdown. items: The components to display in this card + name: An optional identifying name for this card commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SectionCard` instance. @@ -4173,6 +4307,7 @@ def section_card( title, subtitle, items, + name, commands, ) @@ -4189,6 +4324,7 @@ def small_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SmallSeriesStatCard: """Create a small stat card displaying a primary value and a series plot. @@ -4205,6 +4341,7 @@ def small_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.SmallSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SmallSeriesStatCard` instance. @@ -4221,6 +4358,7 @@ def small_series_stat_card( plot_curve, plot_color, data, + name, commands, ) @@ -4230,6 +4368,7 @@ def small_stat_card( title: str, value: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SmallStatCard: """Create a stat card displaying a single value. @@ -4239,6 +4378,7 @@ def small_stat_card( title: The card's title. value: The primary value displayed. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SmallStatCard` instance. @@ -4248,6 +4388,7 @@ def small_stat_card( title, value, data, + name, commands, ) @@ -4461,6 +4602,7 @@ def tall_gauge_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TallGaugeStatCard: """Create a tall stat card displaying a primary value, an auxiliary value and a progress gauge. @@ -4473,6 +4615,7 @@ def tall_gauge_stat_card( progress: The value of the progress gauge, between 0 and 1. plot_color: The color of the progress gauge. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TallGaugeStatCard` instance. @@ -4485,6 +4628,7 @@ def tall_gauge_stat_card( progress, plot_color, data, + name, commands, ) @@ -4544,6 +4688,7 @@ def tall_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TallSeriesStatCard: """Create a tall stat card displaying a primary value, an auxiliary value and a series plot. @@ -4561,6 +4706,7 @@ def tall_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.TallSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TallSeriesStatCard` instance. @@ -4578,6 +4724,7 @@ def tall_series_stat_card( plot_curve, plot_color, data, + name, commands, ) @@ -4611,6 +4758,7 @@ def template_card( title: str, content: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TemplateCard: """Render dynamic content using an HTML template. @@ -4620,6 +4768,7 @@ def template_card( title: The title for this card. content: The Handlebars template. https://handlebarsjs.com/guide/ data: Data for the Handlebars template. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TemplateCard` instance. @@ -4629,6 +4778,7 @@ def template_card( title, content, data, + name, commands, ) @@ -4638,6 +4788,7 @@ def toolbar_card( items: List[Command], secondary_items: Optional[List[Command]] = None, overflow_items: Optional[List[Command]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ToolbarCard: """Create a card containing a toolbar. @@ -4647,6 +4798,7 @@ def toolbar_card( items: Items to render. secondary_items: Items to render on the right side (or left, in RTL). overflow_items: Items to render in an overflow menu. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ToolbarCard` instance. @@ -4656,6 +4808,7 @@ def toolbar_card( items, secondary_items, overflow_items, + name, commands, ) @@ -4666,6 +4819,7 @@ def vega_card( specification: str, data: Optional[PackedRecord] = None, grammar: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> VegaCard: """Create a card containing a Vega-lite plot. @@ -4676,6 +4830,7 @@ def vega_card( specification: The Vega-lite specification. data: Data for the plot, if any. grammar: Vega grammar to use. Defaults to 'vega-lite'. One of 'vega-lite', 'vega'. See enum h2o_wave.ui.VegaCardGrammar. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.VegaCard` instance. @@ -4686,6 +4841,7 @@ def vega_card( specification, data, grammar, + name, commands, ) @@ -4737,6 +4893,7 @@ def wide_bar_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideBarStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a progress bar. @@ -4749,6 +4906,7 @@ def wide_bar_stat_card( progress: The value of the progress bar, between 0 and 1. plot_color: The color of the progress bar. data: Data for this card. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideBarStatCard` instance. @@ -4761,6 +4919,7 @@ def wide_bar_stat_card( progress, plot_color, data, + name, commands, ) @@ -4773,6 +4932,7 @@ def wide_gauge_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideGaugeStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a progress gauge. @@ -4785,6 +4945,7 @@ def wide_gauge_stat_card( progress: The value of the progress gauge, between 0 and 1. plot_color: The color of the progress gauge. data: Data for this card. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideGaugeStatCard` instance. @@ -4797,6 +4958,7 @@ def wide_gauge_stat_card( progress, plot_color, data, + name, commands, ) @@ -4852,6 +5014,7 @@ def pie( fraction: float, color: str, aux_value: Optional[str] = None, + name: Optional[str] = None, ) -> Pie: """Card's pie chart data to be displayed. @@ -4861,6 +5024,7 @@ def pie( fraction: A value between 0 and 1 indicating the size of the pie. color: The color of the pie. aux_value: The auxiliary value, displayed below the label. + name: An optional name, for this component. Returns: A `h2o_wave.types.Pie` instance. """ @@ -4870,6 +5034,7 @@ def pie( fraction, color, aux_value, + name, ) @@ -4877,6 +5042,7 @@ def wide_pie_stat_card( box: str, title: str, pies: List[Pie], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WidePieStatCard: """Create a wide pie stat card displaying a title and pie chart with legend. @@ -4885,6 +5051,7 @@ def wide_pie_stat_card( box: A string indicating how to place this component on the page. title: The card's title. pies: The pies to be included in the pie chart. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WidePieStatCard` instance. @@ -4893,6 +5060,7 @@ def wide_pie_stat_card( box, title, pies, + name, commands, ) @@ -4903,6 +5071,7 @@ def wide_plot_card( caption: str, plot: Plot, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WidePlotCard: """Create a wide plot card displaying a title, caption and a plot. @@ -4913,6 +5082,7 @@ def wide_plot_card( caption: The card's caption, displayed below the title. plot: The card's plot. data: The card's plot data. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WidePlotCard` instance. @@ -4923,6 +5093,7 @@ def wide_plot_card( caption, plot, data, + name, commands, ) @@ -4940,6 +5111,7 @@ def wide_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideSeriesStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a series plot. @@ -4957,6 +5129,7 @@ def wide_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.WideSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideSeriesStatCard` instance. @@ -4974,5 +5147,6 @@ def wide_series_stat_card( plot_curve, plot_color, data, + name, commands, ) diff --git a/py/h2o_wave/h2o_wave/types.py b/py/h2o_wave/h2o_wave/types.py index 75725e0c3b..69e4d0fd6d 100644 --- a/py/h2o_wave/h2o_wave/types.py +++ b/py/h2o_wave/h2o_wave/types.py @@ -3020,21 +3020,27 @@ def __init__( self, items: List['Component'], visible: Optional[bool] = None, + name: Optional[str] = None, ): _guard_vector('MiniButtons.items', items, (Component,), False, False, False) _guard_scalar('MiniButtons.visible', visible, (bool,), False, True, False) + _guard_scalar('MiniButtons.name', name, (str,), False, True, False) self.items = items """The buttons in this set.""" self.visible = visible """True if the component should be visible. Defaults to True.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_vector('MiniButtons.items', self.items, (Component,), False, False, False) _guard_scalar('MiniButtons.visible', self.visible, (bool,), False, True, False) + _guard_scalar('MiniButtons.name', self.name, (str,), False, True, False) return _dump( items=[__e.dump() for __e in self.items], visible=self.visible, + name=self.name, ) @staticmethod @@ -3044,11 +3050,15 @@ def load(__d: Dict) -> 'MiniButtons': _guard_vector('MiniButtons.items', __d_items, (dict,), False, False, False) __d_visible: Any = __d.get('visible') _guard_scalar('MiniButtons.visible', __d_visible, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MiniButtons.name', __d_name, (str,), False, True, False) items: List['Component'] = [Component.load(__e) for __e in __d_items] visible: Optional[bool] = __d_visible + name: Optional[str] = __d_name return MiniButtons( items, visible, + name, ) @@ -3280,26 +3290,32 @@ def __init__( label: str, color: str, label_color: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Tag.label', label, (str,), False, False, False) _guard_scalar('Tag.color', color, (str,), False, False, False) _guard_scalar('Tag.label_color', label_color, (str,), False, True, False) + _guard_scalar('Tag.name', name, (str,), False, True, False) self.label = label """The text displayed within the tag.""" self.color = color """Tag's background color.""" self.label_color = label_color """Tag's label color. If not specified, black or white will be picked based on correct contrast with background.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Tag.label', self.label, (str,), False, False, False) _guard_scalar('Tag.color', self.color, (str,), False, False, False) _guard_scalar('Tag.label_color', self.label_color, (str,), False, True, False) + _guard_scalar('Tag.name', self.name, (str,), False, True, False) return _dump( label=self.label, color=self.color, label_color=self.label_color, + name=self.name, ) @staticmethod @@ -3311,13 +3327,17 @@ def load(__d: Dict) -> 'Tag': _guard_scalar('Tag.color', __d_color, (str,), False, False, False) __d_label_color: Any = __d.get('label_color') _guard_scalar('Tag.label_color', __d_label_color, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Tag.name', __d_name, (str,), False, True, False) label: str = __d_label color: str = __d_color label_color: Optional[str] = __d_label_color + name: Optional[str] = __d_name return Tag( label, color, label_color, + name, ) @@ -3459,12 +3479,14 @@ def __init__( tag: Optional[TagTableCellType] = None, menu: Optional[MenuTableCellType] = None, markdown: Optional[MarkdownTableCellType] = None, + name: Optional[str] = None, ): _guard_scalar('TableCellType.progress', progress, (ProgressTableCellType,), False, True, False) _guard_scalar('TableCellType.icon', icon, (IconTableCellType,), False, True, False) _guard_scalar('TableCellType.tag', tag, (TagTableCellType,), False, True, False) _guard_scalar('TableCellType.menu', menu, (MenuTableCellType,), False, True, False) _guard_scalar('TableCellType.markdown', markdown, (MarkdownTableCellType,), False, True, False) + _guard_scalar('TableCellType.name', name, (str,), True, True, False) self.progress = progress """Renders a progress arc with a percentage value in the middle.""" self.icon = icon @@ -3475,6 +3497,8 @@ def __init__( """Renders a command menu.""" self.markdown = markdown """Renders text using markdown.""" + self.name = name + """An identifying name for this Component""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -3483,12 +3507,14 @@ def dump(self) -> Dict: _guard_scalar('TableCellType.tag', self.tag, (TagTableCellType,), False, True, False) _guard_scalar('TableCellType.menu', self.menu, (MenuTableCellType,), False, True, False) _guard_scalar('TableCellType.markdown', self.markdown, (MarkdownTableCellType,), False, True, False) + _guard_scalar('TableCellType.name', self.name, (str,), True, True, False) return _dump( progress=None if self.progress is None else self.progress.dump(), icon=None if self.icon is None else self.icon.dump(), tag=None if self.tag is None else self.tag.dump(), menu=None if self.menu is None else self.menu.dump(), markdown=None if self.markdown is None else self.markdown.dump(), + name=self.name, ) @staticmethod @@ -3504,17 +3530,21 @@ def load(__d: Dict) -> 'TableCellType': _guard_scalar('TableCellType.menu', __d_menu, (dict,), False, True, False) __d_markdown: Any = __d.get('markdown') _guard_scalar('TableCellType.markdown', __d_markdown, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TableCellType.name', __d_name, (str,), True, True, False) progress: Optional[ProgressTableCellType] = None if __d_progress is None else ProgressTableCellType.load(__d_progress) icon: Optional[IconTableCellType] = None if __d_icon is None else IconTableCellType.load(__d_icon) tag: Optional[TagTableCellType] = None if __d_tag is None else TagTableCellType.load(__d_tag) menu: Optional[MenuTableCellType] = None if __d_menu is None else MenuTableCellType.load(__d_menu) markdown: Optional[MarkdownTableCellType] = None if __d_markdown is None else MarkdownTableCellType.load(__d_markdown) + name: Optional[str] = __d_name return TableCellType( progress, icon, tag, menu, markdown, + name, ) @@ -3742,26 +3772,32 @@ def __init__( label: str, rows: List[TableRow], collapsed: Optional[bool] = None, + name: Optional[str] = None, ): _guard_scalar('TableGroup.label', label, (str,), False, False, False) _guard_vector('TableGroup.rows', rows, (TableRow,), False, False, False) _guard_scalar('TableGroup.collapsed', collapsed, (bool,), False, True, False) + _guard_scalar('TableGroup.name', name, (str,), True, True, False) self.label = label """The title of the group.""" self.rows = rows """The rows in this group.""" self.collapsed = collapsed """Indicates whether the table group should be collapsed by default. Defaults to True.""" + self.name = name + """An identifying name for this group.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TableGroup.label', self.label, (str,), False, False, False) _guard_vector('TableGroup.rows', self.rows, (TableRow,), False, False, False) _guard_scalar('TableGroup.collapsed', self.collapsed, (bool,), False, True, False) + _guard_scalar('TableGroup.name', self.name, (str,), True, True, False) return _dump( label=self.label, rows=[__e.dump() for __e in self.rows], collapsed=self.collapsed, + name=self.name, ) @staticmethod @@ -3773,13 +3809,17 @@ def load(__d: Dict) -> 'TableGroup': _guard_vector('TableGroup.rows', __d_rows, (dict,), False, False, False) __d_collapsed: Any = __d.get('collapsed') _guard_scalar('TableGroup.collapsed', __d_collapsed, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TableGroup.name', __d_name, (str,), True, True, False) label: str = __d_label rows: List[TableRow] = [TableRow.load(__e) for __e in __d_rows] collapsed: Optional[bool] = __d_collapsed + name: Optional[str] = __d_name return TableGroup( label, rows, collapsed, + name, ) @@ -3790,21 +3830,27 @@ def __init__( self, total_rows: int, rows_per_page: int, + name: Optional[str] = None, ): _guard_scalar('TablePagination.total_rows', total_rows, (int,), False, False, False) _guard_scalar('TablePagination.rows_per_page', rows_per_page, (int,), False, False, False) + _guard_scalar('TablePagination.name', name, (str,), False, True, False) self.total_rows = total_rows """Total count of all the rows in your dataset.""" self.rows_per_page = rows_per_page """The maximum amount of rows to be displayed in a single page.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TablePagination.total_rows', self.total_rows, (int,), False, False, False) _guard_scalar('TablePagination.rows_per_page', self.rows_per_page, (int,), False, False, False) + _guard_scalar('TablePagination.name', self.name, (str,), False, True, False) return _dump( total_rows=self.total_rows, rows_per_page=self.rows_per_page, + name=self.name, ) @staticmethod @@ -3814,11 +3860,15 @@ def load(__d: Dict) -> 'TablePagination': _guard_scalar('TablePagination.total_rows', __d_total_rows, (int,), False, False, False) __d_rows_per_page: Any = __d.get('rows_per_page') _guard_scalar('TablePagination.rows_per_page', __d_rows_per_page, (int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('TablePagination.name', __d_name, (str,), False, True, False) total_rows: int = __d_total_rows rows_per_page: int = __d_rows_per_page + name: Optional[str] = __d_name return TablePagination( total_rows, rows_per_page, + name, ) @@ -4180,11 +4230,13 @@ def __init__( label: Optional[str] = None, inline: Optional[bool] = None, width: Optional[str] = None, + name: Optional[str] = None, ): _guard_vector('Links.items', items, (Component,), False, False, False) _guard_scalar('Links.label', label, (str,), False, True, False) _guard_scalar('Links.inline', inline, (bool,), False, True, False) _guard_scalar('Links.width', width, (str,), False, True, False) + _guard_scalar('Links.name', name, (str,), False, True, False) self.items = items """The links contained in this group.""" self.label = label @@ -4193,6 +4245,8 @@ def __init__( """Render links horizontally. Defaults to False.""" self.width = width """The width of the links, e.g. '100px'.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -4200,11 +4254,13 @@ def dump(self) -> Dict: _guard_scalar('Links.label', self.label, (str,), False, True, False) _guard_scalar('Links.inline', self.inline, (bool,), False, True, False) _guard_scalar('Links.width', self.width, (str,), False, True, False) + _guard_scalar('Links.name', self.name, (str,), False, True, False) return _dump( items=[__e.dump() for __e in self.items], label=self.label, inline=self.inline, width=self.width, + name=self.name, ) @staticmethod @@ -4218,15 +4274,19 @@ def load(__d: Dict) -> 'Links': _guard_scalar('Links.inline', __d_inline, (bool,), False, True, False) __d_width: Any = __d.get('width') _guard_scalar('Links.width', __d_width, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Links.name', __d_name, (str,), False, True, False) items: List['Component'] = [Component.load(__e) for __e in __d_items] label: Optional[str] = __d_label inline: Optional[bool] = __d_inline width: Optional[str] = __d_width + name: Optional[str] = __d_name return Links( items, label, inline, width, + name, ) @@ -4925,26 +4985,32 @@ def __init__( label: str, icon: Optional[str] = None, done: Optional[bool] = None, + name: Optional[str] = None, ): _guard_scalar('Step.label', label, (str,), False, False, False) _guard_scalar('Step.icon', icon, (str,), False, True, False) _guard_scalar('Step.done', done, (bool,), False, True, False) + _guard_scalar('Step.name', name, (str,), False, True, False) self.label = label """Text displayed below icon.""" self.icon = icon """Icon to be displayed.""" self.done = done """Indicates whether this step has already been completed.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Step.label', self.label, (str,), False, False, False) _guard_scalar('Step.icon', self.icon, (str,), False, True, False) _guard_scalar('Step.done', self.done, (bool,), False, True, False) + _guard_scalar('Step.name', self.name, (str,), False, True, False) return _dump( label=self.label, icon=self.icon, done=self.done, + name=self.name, ) @staticmethod @@ -4956,13 +5022,17 @@ def load(__d: Dict) -> 'Step': _guard_scalar('Step.icon', __d_icon, (str,), False, True, False) __d_done: Any = __d.get('done') _guard_scalar('Step.done', __d_done, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Step.name', __d_name, (str,), False, True, False) label: str = __d_label icon: Optional[str] = __d_icon done: Optional[bool] = __d_done + name: Optional[str] = __d_name return Step( label, icon, done, + name, ) @@ -5202,6 +5272,7 @@ def __init__( label_font_weight: Optional[str] = None, label_line_height: Optional[float] = None, label_align: Optional[str] = None, + name: Optional[str] = None, ref_stroke_color: Optional[str] = None, ref_stroke_opacity: Optional[float] = None, ref_stroke_size: Optional[float] = None, @@ -5251,6 +5322,7 @@ def __init__( _guard_scalar('Mark.label_font_weight', label_font_weight, (str,), False, True, False) _guard_scalar('Mark.label_line_height', label_line_height, (float, int,), False, True, False) _guard_enum('Mark.label_align', label_align, _MarkLabelAlign, True) + _guard_scalar('Mark.name', name, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_color', ref_stroke_color, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_opacity', ref_stroke_opacity, (float, int,), False, True, False) _guard_scalar('Mark.ref_stroke_size', ref_stroke_size, (float, int,), False, True, False) @@ -5372,6 +5444,8 @@ def __init__( """Label line height.""" self.label_align = label_align """Label text alignment. One of 'left', 'right', 'center', 'start', 'end'. See enum h2o_wave.ui.MarkLabelAlign.""" + self.name = name + """An optional name""" self.ref_stroke_color = ref_stroke_color """Reference line stroke color.""" self.ref_stroke_opacity = ref_stroke_opacity @@ -5428,6 +5502,7 @@ def dump(self) -> Dict: _guard_scalar('Mark.label_font_weight', self.label_font_weight, (str,), False, True, False) _guard_scalar('Mark.label_line_height', self.label_line_height, (float, int,), False, True, False) _guard_enum('Mark.label_align', self.label_align, _MarkLabelAlign, True) + _guard_scalar('Mark.name', self.name, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_color', self.ref_stroke_color, (str,), False, True, False) _guard_scalar('Mark.ref_stroke_opacity', self.ref_stroke_opacity, (float, int,), False, True, False) _guard_scalar('Mark.ref_stroke_size', self.ref_stroke_size, (float, int,), False, True, False) @@ -5492,6 +5567,7 @@ def dump(self) -> Dict: label_font_weight=self.label_font_weight, label_line_height=self.label_line_height, label_align=self.label_align, + name=self.name, ref_stroke_color=self.ref_stroke_color, ref_stroke_opacity=self.ref_stroke_opacity, ref_stroke_size=self.ref_stroke_size, @@ -5603,6 +5679,8 @@ def load(__d: Dict) -> 'Mark': _guard_scalar('Mark.label_line_height', __d_label_line_height, (float, int,), False, True, False) __d_label_align: Any = __d.get('label_align') _guard_enum('Mark.label_align', __d_label_align, _MarkLabelAlign, True) + __d_name: Any = __d.get('name') + _guard_scalar('Mark.name', __d_name, (str,), False, True, False) __d_ref_stroke_color: Any = __d.get('ref_stroke_color') _guard_scalar('Mark.ref_stroke_color', __d_ref_stroke_color, (str,), False, True, False) __d_ref_stroke_opacity: Any = __d.get('ref_stroke_opacity') @@ -5671,6 +5749,7 @@ def load(__d: Dict) -> 'Mark': label_font_weight: Optional[str] = __d_label_font_weight label_line_height: Optional[float] = __d_label_line_height label_align: Optional[str] = __d_label_align + name: Optional[str] = __d_name ref_stroke_color: Optional[str] = __d_ref_stroke_color ref_stroke_opacity: Optional[float] = __d_ref_stroke_opacity ref_stroke_size: Optional[float] = __d_ref_stroke_size @@ -5735,6 +5814,7 @@ def load(__d: Dict) -> 'Mark': label_font_weight, label_line_height, label_align, + name, ref_stroke_color, ref_stroke_opacity, ref_stroke_size, @@ -6261,6 +6341,7 @@ def __init__( width: Optional[str] = None, visible: Optional[bool] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Image.title', title, (str,), False, False, False) _guard_scalar('Image.type', type, (str,), False, True, False) @@ -6269,6 +6350,7 @@ def __init__( _guard_scalar('Image.width', width, (str,), False, True, False) _guard_scalar('Image.visible', visible, (bool,), False, True, False) _guard_scalar('Image.path_popup', path_popup, (str,), False, True, False) + _guard_scalar('Image.name', name, (str,), False, True, False) self.title = title """The image title, typically displayed as a tooltip.""" self.type = type @@ -6283,6 +6365,8 @@ def __init__( """True if the component should be visible. Defaults to True.""" self.path_popup = path_popup """The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property.""" + self.name = name + """An optional identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -6293,6 +6377,7 @@ def dump(self) -> Dict: _guard_scalar('Image.width', self.width, (str,), False, True, False) _guard_scalar('Image.visible', self.visible, (bool,), False, True, False) _guard_scalar('Image.path_popup', self.path_popup, (str,), False, True, False) + _guard_scalar('Image.name', self.name, (str,), False, True, False) return _dump( title=self.title, type=self.type, @@ -6301,6 +6386,7 @@ def dump(self) -> Dict: width=self.width, visible=self.visible, path_popup=self.path_popup, + name=self.name, ) @staticmethod @@ -6320,6 +6406,8 @@ def load(__d: Dict) -> 'Image': _guard_scalar('Image.visible', __d_visible, (bool,), False, True, False) __d_path_popup: Any = __d.get('path_popup') _guard_scalar('Image.path_popup', __d_path_popup, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Image.name', __d_name, (str,), False, True, False) title: str = __d_title type: Optional[str] = __d_type image: Optional[str] = __d_image @@ -6327,6 +6415,7 @@ def load(__d: Dict) -> 'Image': width: Optional[str] = __d_width visible: Optional[bool] = __d_visible path_popup: Optional[str] = __d_path_popup + name: Optional[str] = __d_name return Image( title, type, @@ -6335,6 +6424,7 @@ def load(__d: Dict) -> 'Image': width, visible, path_popup, + name, ) @@ -6505,21 +6595,27 @@ def __init__( self, text: str, tag: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('TextAnnotatorItem.text', text, (str,), False, False, False) _guard_scalar('TextAnnotatorItem.tag', tag, (str,), False, True, False) + _guard_scalar('TextAnnotatorItem.name', name, (str,), False, True, False) self.text = text """Text to be highlighted.""" self.tag = tag """The `name` of the text annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An identifying name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('TextAnnotatorItem.text', self.text, (str,), False, False, False) _guard_scalar('TextAnnotatorItem.tag', self.tag, (str,), False, True, False) + _guard_scalar('TextAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( text=self.text, tag=self.tag, + name=self.name, ) @staticmethod @@ -6529,11 +6625,15 @@ def load(__d: Dict) -> 'TextAnnotatorItem': _guard_scalar('TextAnnotatorItem.text', __d_text, (str,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('TextAnnotatorItem.tag', __d_tag, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('TextAnnotatorItem.name', __d_name, (str,), False, True, False) text: str = __d_text tag: Optional[str] = __d_tag + name: Optional[str] = __d_name return TextAnnotatorItem( text, tag, + name, ) @@ -6676,11 +6776,13 @@ def __init__( y1: float, x2: float, y2: float, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorRect.x1', x1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y1', y1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.x2', x2, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y2', y2, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorRect.name', name, (str,), False, True, False) self.x1 = x1 """`x` coordinate of the rectangle's corner.""" self.y1 = y1 @@ -6689,6 +6791,8 @@ def __init__( """`x` coordinate of the diagonally opposite corner.""" self.y2 = y2 """`y` coordinate of the diagonally opposite corner.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -6696,11 +6800,13 @@ def dump(self) -> Dict: _guard_scalar('ImageAnnotatorRect.y1', self.y1, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.x2', self.x2, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorRect.y2', self.y2, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorRect.name', self.name, (str,), False, True, False) return _dump( x1=self.x1, y1=self.y1, x2=self.x2, y2=self.y2, + name=self.name, ) @staticmethod @@ -6714,15 +6820,19 @@ def load(__d: Dict) -> 'ImageAnnotatorRect': _guard_scalar('ImageAnnotatorRect.x2', __d_x2, (float, int,), False, False, False) __d_y2: Any = __d.get('y2') _guard_scalar('ImageAnnotatorRect.y2', __d_y2, (float, int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorRect.name', __d_name, (str,), False, True, False) x1: float = __d_x1 y1: float = __d_y1 x2: float = __d_x2 y2: float = __d_y2 + name: Optional[str] = __d_name return ImageAnnotatorRect( x1, y1, x2, y2, + name, ) @@ -6733,21 +6843,27 @@ def __init__( self, x: float, y: float, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorPoint.x', x, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorPoint.y', y, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorPoint.name', name, (str,), False, True, False) self.x = x """`x` coordinate of the point.""" self.y = y """`y` coordinate of the point.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('ImageAnnotatorPoint.x', self.x, (float, int,), False, False, False) _guard_scalar('ImageAnnotatorPoint.y', self.y, (float, int,), False, False, False) + _guard_scalar('ImageAnnotatorPoint.name', self.name, (str,), False, True, False) return _dump( x=self.x, y=self.y, + name=self.name, ) @staticmethod @@ -6757,11 +6873,15 @@ def load(__d: Dict) -> 'ImageAnnotatorPoint': _guard_scalar('ImageAnnotatorPoint.x', __d_x, (float, int,), False, False, False) __d_y: Any = __d.get('y') _guard_scalar('ImageAnnotatorPoint.y', __d_y, (float, int,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorPoint.name', __d_name, (str,), False, True, False) x: float = __d_x y: float = __d_y + name: Optional[str] = __d_name return ImageAnnotatorPoint( x, y, + name, ) @@ -6771,16 +6891,22 @@ class ImageAnnotatorPolygon: def __init__( self, vertices: List[ImageAnnotatorPoint], + name: Optional[str] = None, ): _guard_vector('ImageAnnotatorPolygon.vertices', vertices, (ImageAnnotatorPoint,), False, False, False) + _guard_scalar('ImageAnnotatorPolygon.name', name, (str,), False, True, False) self.vertices = vertices """List of polygon points.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_vector('ImageAnnotatorPolygon.vertices', self.vertices, (ImageAnnotatorPoint,), False, False, False) + _guard_scalar('ImageAnnotatorPolygon.name', self.name, (str,), False, True, False) return _dump( vertices=[__e.dump() for __e in self.vertices], + name=self.name, ) @staticmethod @@ -6788,9 +6914,13 @@ def load(__d: Dict) -> 'ImageAnnotatorPolygon': """Creates an instance of this class using the contents of a dict.""" __d_vertices: Any = __d.get('vertices') _guard_vector('ImageAnnotatorPolygon.vertices', __d_vertices, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorPolygon.name', __d_name, (str,), False, True, False) vertices: List[ImageAnnotatorPoint] = [ImageAnnotatorPoint.load(__e) for __e in __d_vertices] + name: Optional[str] = __d_name return ImageAnnotatorPolygon( vertices, + name, ) @@ -6840,21 +6970,27 @@ def __init__( self, shape: ImageAnnotatorShape, tag: str, + name: Optional[str] = None, ): _guard_scalar('ImageAnnotatorItem.shape', shape, (ImageAnnotatorShape,), False, False, False) _guard_scalar('ImageAnnotatorItem.tag', tag, (str,), False, False, False) + _guard_scalar('ImageAnnotatorItem.name', name, (str,), False, True, False) self.shape = shape """The annotation shape.""" self.tag = tag """The `name` of the image annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An optional name for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('ImageAnnotatorItem.shape', self.shape, (ImageAnnotatorShape,), False, False, False) _guard_scalar('ImageAnnotatorItem.tag', self.tag, (str,), False, False, False) + _guard_scalar('ImageAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( shape=self.shape.dump(), tag=self.tag, + name=self.name, ) @staticmethod @@ -6864,11 +7000,15 @@ def load(__d: Dict) -> 'ImageAnnotatorItem': _guard_scalar('ImageAnnotatorItem.shape', __d_shape, (dict,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('ImageAnnotatorItem.tag', __d_tag, (str,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageAnnotatorItem.name', __d_name, (str,), False, True, False) shape: ImageAnnotatorShape = ImageAnnotatorShape.load(__d_shape) tag: str = __d_tag + name: Optional[str] = __d_name return ImageAnnotatorItem( shape, tag, + name, ) @@ -7040,26 +7180,32 @@ def __init__( start: float, end: float, tag: str, + name: Optional[str] = None, ): _guard_scalar('AudioAnnotatorItem.start', start, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.end', end, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.tag', tag, (str,), False, False, False) + _guard_scalar('AudioAnnotatorItem.name', name, (str,), False, True, False) self.start = start """The start of the audio annotation in seconds.""" self.end = end """The end of the audio annotation in seconds.""" self.tag = tag """The `name` of the audio annotator tag to refer to for the `label` and `color` of this item.""" + self.name = name + """An identifying name for this component""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('AudioAnnotatorItem.start', self.start, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.end', self.end, (float, int,), False, False, False) _guard_scalar('AudioAnnotatorItem.tag', self.tag, (str,), False, False, False) + _guard_scalar('AudioAnnotatorItem.name', self.name, (str,), False, True, False) return _dump( start=self.start, end=self.end, tag=self.tag, + name=self.name, ) @staticmethod @@ -7071,13 +7217,17 @@ def load(__d: Dict) -> 'AudioAnnotatorItem': _guard_scalar('AudioAnnotatorItem.end', __d_end, (float, int,), False, False, False) __d_tag: Any = __d.get('tag') _guard_scalar('AudioAnnotatorItem.tag', __d_tag, (str,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('AudioAnnotatorItem.name', __d_name, (str,), False, True, False) start: float = __d_start end: float = __d_end tag: str = __d_tag + name: Optional[str] = __d_name return AudioAnnotatorItem( start, end, tag, + name, ) @@ -7441,7 +7591,7 @@ def __init__( self.placeholder = placeholder """A string that provides a brief hint to the user as to what kind of information is expected in the field.""" self.value = value - """The time value in hh:mm format. E.g. '10:30', '14:25', '23:59', '00:00'""" + """The time value in hh:mm:ss format. E.g. '10:30:45', '14:25:30', '23:59:59', '00:00:00'""" self.disabled = disabled """True if this field is disabled.""" self.width = width @@ -7455,9 +7605,9 @@ def __init__( self.hour_format = hour_format """Specifies 12-hour or 24-hour time format. One of `12` or `24`. Defaults to `12`.""" self.min = min - """The minimum allowed time value in hh:mm format. E.g.: '08:00', '13:30'""" + """The minimum allowed time value in hh:mm:ss format. E.g.: '08:00:00', '13:30:00'""" self.max = max - """The maximum allowed time value in hh:mm format. E.g.: '15:30', '00:00'""" + """The maximum allowed time value in hh:mm:ss format. E.g.: '15:30:00', '00:00:00'""" self.minutes_step = minutes_step """Limits the available minutes to select from. One of `1`, `5`, `10`, `15`, `20`, `30` or `60`. Defaults to `1`.""" @@ -8089,12 +8239,14 @@ def __init__( title: str, content: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ArticleCard.box', box, (str,), False, False, False) _guard_scalar('ArticleCard.title', title, (str,), False, False, False) _guard_scalar('ArticleCard.content', content, (str,), False, True, False) _guard_vector('ArticleCard.items', items, (Component,), False, True, False) + _guard_scalar('ArticleCard.name', name, (str,), False, True, False) _guard_vector('ArticleCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8104,6 +8256,8 @@ def __init__( """Markdown text.""" self.items = items """Collection of small buttons rendered under the title.""" + self.name = name + """An identifying name for this component""" self.commands = commands """Contextual menu commands for this component.""" @@ -8113,6 +8267,7 @@ def dump(self) -> Dict: _guard_scalar('ArticleCard.title', self.title, (str,), False, False, False) _guard_scalar('ArticleCard.content', self.content, (str,), False, True, False) _guard_vector('ArticleCard.items', self.items, (Component,), False, True, False) + _guard_scalar('ArticleCard.name', self.name, (str,), False, True, False) _guard_vector('ArticleCard.commands', self.commands, (Command,), False, True, False) return _dump( view='article', @@ -8120,6 +8275,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8134,18 +8290,22 @@ def load(__d: Dict) -> 'ArticleCard': _guard_scalar('ArticleCard.content', __d_content, (str,), False, True, False) __d_items: Any = __d.get('items') _guard_vector('ArticleCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ArticleCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ArticleCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: Optional[str] = __d_content items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ArticleCard( box, title, content, items, + name, commands, ) @@ -8202,15 +8362,19 @@ def __init__( self, box: str, items: List[Breadcrumb], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('BreadcrumbsCard.box', box, (str,), False, False, False) _guard_vector('BreadcrumbsCard.items', items, (Breadcrumb,), False, False, False) + _guard_scalar('BreadcrumbsCard.name', name, (str,), True, True, False) _guard_vector('BreadcrumbsCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" self.items = items """A list of `h2o_wave.types.Breadcrumb` instances to display. See `h2o_wave.ui.breadcrumb()`""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8218,11 +8382,13 @@ def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('BreadcrumbsCard.box', self.box, (str,), False, False, False) _guard_vector('BreadcrumbsCard.items', self.items, (Breadcrumb,), False, False, False) + _guard_scalar('BreadcrumbsCard.name', self.name, (str,), True, True, False) _guard_vector('BreadcrumbsCard.commands', self.commands, (Command,), False, True, False) return _dump( view='breadcrumbs', box=self.box, items=[__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8233,14 +8399,18 @@ def load(__d: Dict) -> 'BreadcrumbsCard': _guard_scalar('BreadcrumbsCard.box', __d_box, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('BreadcrumbsCard.items', __d_items, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('BreadcrumbsCard.name', __d_name, (str,), True, True, False) __d_commands: Any = __d.get('commands') _guard_vector('BreadcrumbsCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: List[Breadcrumb] = [Breadcrumb.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return BreadcrumbsCard( box, items, + name, commands, ) @@ -8789,11 +8959,13 @@ def __init__( box: str, caption: str, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FooterCard.box', box, (str,), False, False, False) _guard_scalar('FooterCard.caption', caption, (str,), False, False, False) _guard_vector('FooterCard.items', items, (Component,), False, True, False) + _guard_scalar('FooterCard.name', name, (str,), False, True, False) _guard_vector('FooterCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8801,6 +8973,8 @@ def __init__( """The caption. Supports markdown. *""" self.items = items """The components displayed to the right of the caption.""" + self.name = name + """An optional identifying name to the card""" self.commands = commands """Contextual menu commands for this component.""" @@ -8809,12 +8983,14 @@ def dump(self) -> Dict: _guard_scalar('FooterCard.box', self.box, (str,), False, False, False) _guard_scalar('FooterCard.caption', self.caption, (str,), False, False, False) _guard_vector('FooterCard.items', self.items, (Component,), False, True, False) + _guard_scalar('FooterCard.name', self.name, (str,), False, True, False) _guard_vector('FooterCard.commands', self.commands, (Command,), False, True, False) return _dump( view='footer', box=self.box, caption=self.caption, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8827,16 +9003,20 @@ def load(__d: Dict) -> 'FooterCard': _guard_scalar('FooterCard.caption', __d_caption, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('FooterCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FooterCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FooterCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box caption: str = __d_caption items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FooterCard( box, caption, items, + name, commands, ) @@ -8849,11 +9029,13 @@ def __init__( box: str, items: Union[List[Component], str], title: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FormCard.box', box, (str,), False, False, False) _guard_vector('FormCard.items', items, (Component,), False, False, True) _guard_scalar('FormCard.title', title, (str,), False, True, False) + _guard_scalar('FormCard.name', name, (str,), False, True, False) _guard_vector('FormCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8861,6 +9043,8 @@ def __init__( """The components in this form.""" self.title = title """The title for this card.""" + self.name = name + """An optional name for this form.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8869,12 +9053,14 @@ def dump(self) -> Dict: _guard_scalar('FormCard.box', self.box, (str,), False, False, False) _guard_vector('FormCard.items', self.items, (Component,), False, False, True) _guard_scalar('FormCard.title', self.title, (str,), False, True, False) + _guard_scalar('FormCard.name', self.name, (str,), False, True, False) _guard_vector('FormCard.commands', self.commands, (Command,), False, True, False) return _dump( view='form', box=self.box, items=self.items if isinstance(self.items, str) else [__e.dump() for __e in self.items], title=self.title, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8887,16 +9073,20 @@ def load(__d: Dict) -> 'FormCard': _guard_vector('FormCard.items', __d_items, (dict,), False, False, True) __d_title: Any = __d.get('title') _guard_scalar('FormCard.title', __d_title, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FormCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FormCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: Union[List[Component], str] = __d_items if isinstance(__d_items, str) else [Component.load(__e) for __e in __d_items] title: Optional[str] = __d_title + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FormCard( box, items, title, + name, commands, ) @@ -8913,6 +9103,7 @@ def __init__( path: Optional[str] = None, content: Optional[str] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('FrameCard.box', box, (str,), False, False, False) @@ -8920,6 +9111,7 @@ def __init__( _guard_scalar('FrameCard.path', path, (str,), False, True, False) _guard_scalar('FrameCard.content', content, (str,), False, True, False) _guard_scalar('FrameCard.compact', compact, (bool,), False, True, False) + _guard_scalar('FrameCard.name', name, (str,), False, True, False) _guard_vector('FrameCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -8931,6 +9123,8 @@ def __init__( """The HTML content of the page. A string containing `...`.""" self.compact = compact """True if title and padding should be removed. Defaults to False.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -8941,6 +9135,7 @@ def dump(self) -> Dict: _guard_scalar('FrameCard.path', self.path, (str,), False, True, False) _guard_scalar('FrameCard.content', self.content, (str,), False, True, False) _guard_scalar('FrameCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('FrameCard.name', self.name, (str,), False, True, False) _guard_vector('FrameCard.commands', self.commands, (Command,), False, True, False) return _dump( view='frame', @@ -8949,6 +9144,7 @@ def dump(self) -> Dict: path=self.path, content=self.content, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -8965,6 +9161,8 @@ def load(__d: Dict) -> 'FrameCard': _guard_scalar('FrameCard.content', __d_content, (str,), False, True, False) __d_compact: Any = __d.get('compact') _guard_scalar('FrameCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('FrameCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('FrameCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -8972,6 +9170,7 @@ def load(__d: Dict) -> 'FrameCard': path: Optional[str] = __d_path content: Optional[str] = __d_content compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return FrameCard( box, @@ -8979,6 +9178,7 @@ def load(__d: Dict) -> 'FrameCard': path, content, compact, + name, commands, ) @@ -8997,6 +9197,7 @@ def __init__( image: Optional[str] = None, image_path: Optional[str] = None, image_type: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('GraphicsCard.box', box, (str,), False, False, False) @@ -9006,6 +9207,7 @@ def __init__( _guard_scalar('GraphicsCard.image', image, (str,), False, True, False) _guard_scalar('GraphicsCard.image_path', image_path, (str,), False, True, False) _guard_scalar('GraphicsCard.image_type', image_type, (str,), False, True, False) + _guard_scalar('GraphicsCard.name', name, (str,), False, True, False) _guard_vector('GraphicsCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9025,6 +9227,8 @@ def __init__( """The path or URL or data URL of the background image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`.""" self.image_type = image_type """The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set.""" + self.name = name + """An optional identifying name for this Card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9037,6 +9241,7 @@ def dump(self) -> Dict: _guard_scalar('GraphicsCard.image', self.image, (str,), False, True, False) _guard_scalar('GraphicsCard.image_path', self.image_path, (str,), False, True, False) _guard_scalar('GraphicsCard.image_type', self.image_type, (str,), False, True, False) + _guard_scalar('GraphicsCard.name', self.name, (str,), False, True, False) _guard_vector('GraphicsCard.commands', self.commands, (Command,), False, True, False) return _dump( view='graphics', @@ -9049,6 +9254,7 @@ def dump(self) -> Dict: image=self.image, image_path=self.image_path, image_type=self.image_type, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9071,6 +9277,8 @@ def load(__d: Dict) -> 'GraphicsCard': _guard_scalar('GraphicsCard.image_path', __d_image_path, (str,), False, True, False) __d_image_type: Any = __d.get('image_type') _guard_scalar('GraphicsCard.image_type', __d_image_type, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('GraphicsCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('GraphicsCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9082,6 +9290,7 @@ def load(__d: Dict) -> 'GraphicsCard': image: Optional[str] = __d_image image_path: Optional[str] = __d_image_path image_type: Optional[str] = __d_image_type + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return GraphicsCard( box, @@ -9093,6 +9302,7 @@ def load(__d: Dict) -> 'GraphicsCard': image, image_path, image_type, + name, commands, ) @@ -9314,6 +9524,7 @@ def __init__( items: Optional[List[Component]] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('HeaderCard.box', box, (str,), False, False, False) @@ -9326,6 +9537,7 @@ def __init__( _guard_vector('HeaderCard.items', items, (Component,), False, True, False) _guard_vector('HeaderCard.secondary_items', secondary_items, (Component,), False, True, False) _guard_enum('HeaderCard.color', color, _HeaderCardColor, True) + _guard_scalar('HeaderCard.name', name, (str,), False, True, False) _guard_vector('HeaderCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9347,6 +9559,8 @@ def __init__( """Items that should be displayed in the center of the header.""" self.color = color """Header background color. Defaults to 'primary'. One of 'card', 'transparent', 'primary'. See enum h2o_wave.ui.HeaderCardColor.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9362,6 +9576,7 @@ def dump(self) -> Dict: _guard_vector('HeaderCard.items', self.items, (Component,), False, True, False) _guard_vector('HeaderCard.secondary_items', self.secondary_items, (Component,), False, True, False) _guard_enum('HeaderCard.color', self.color, _HeaderCardColor, True) + _guard_scalar('HeaderCard.name', self.name, (str,), False, True, False) _guard_vector('HeaderCard.commands', self.commands, (Command,), False, True, False) return _dump( view='header', @@ -9375,6 +9590,7 @@ def dump(self) -> Dict: items=None if self.items is None else [__e.dump() for __e in self.items], secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], color=self.color, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9401,6 +9617,8 @@ def load(__d: Dict) -> 'HeaderCard': _guard_vector('HeaderCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_color: Any = __d.get('color') _guard_enum('HeaderCard.color', __d_color, _HeaderCardColor, True) + __d_name: Any = __d.get('name') + _guard_scalar('HeaderCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('HeaderCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9413,6 +9631,7 @@ def load(__d: Dict) -> 'HeaderCard': items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] secondary_items: Optional[List[Component]] = None if __d_secondary_items is None else [Component.load(__e) for __e in __d_secondary_items] color: Optional[str] = __d_color + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return HeaderCard( box, @@ -9425,6 +9644,7 @@ def load(__d: Dict) -> 'HeaderCard': items, secondary_items, color, + name, commands, ) @@ -9441,6 +9661,7 @@ def __init__( data: Optional[PackedRecord] = None, path: Optional[str] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ImageCard.box', box, (str,), False, False, False) @@ -9449,6 +9670,7 @@ def __init__( _guard_scalar('ImageCard.image', image, (str,), False, True, False) _guard_scalar('ImageCard.path', path, (str,), False, True, False) _guard_scalar('ImageCard.path_popup', path_popup, (str,), False, True, False) + _guard_scalar('ImageCard.name', name, (str,), False, True, False) _guard_vector('ImageCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9464,6 +9686,8 @@ def __init__( """The path or URL or data URL of the image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`.""" self.path_popup = path_popup """The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property.""" + self.name = name + """An optional identifying name for the image""" self.commands = commands """Contextual menu commands for this component.""" @@ -9475,6 +9699,7 @@ def dump(self) -> Dict: _guard_scalar('ImageCard.image', self.image, (str,), False, True, False) _guard_scalar('ImageCard.path', self.path, (str,), False, True, False) _guard_scalar('ImageCard.path_popup', self.path_popup, (str,), False, True, False) + _guard_scalar('ImageCard.name', self.name, (str,), False, True, False) _guard_vector('ImageCard.commands', self.commands, (Command,), False, True, False) return _dump( view='image', @@ -9485,6 +9710,7 @@ def dump(self) -> Dict: data=self.data, path=self.path, path_popup=self.path_popup, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9504,6 +9730,8 @@ def load(__d: Dict) -> 'ImageCard': _guard_scalar('ImageCard.path', __d_path, (str,), False, True, False) __d_path_popup: Any = __d.get('path_popup') _guard_scalar('ImageCard.path_popup', __d_path_popup, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ImageCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ImageCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9513,6 +9741,7 @@ def load(__d: Dict) -> 'ImageCard': data: Optional[PackedRecord] = __d_data path: Optional[str] = __d_path path_popup: Optional[str] = __d_path_popup + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ImageCard( box, @@ -9522,6 +9751,7 @@ def load(__d: Dict) -> 'ImageCard': data, path, path_popup, + name, commands, ) @@ -9541,6 +9771,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('LargeBarStatCard.box', box, (str,), False, False, False) @@ -9552,6 +9783,7 @@ def __init__( _guard_scalar('LargeBarStatCard.aux_value_caption', aux_value_caption, (str,), False, False, False) _guard_scalar('LargeBarStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('LargeBarStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('LargeBarStatCard.name', name, (str,), False, True, False) _guard_vector('LargeBarStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9573,6 +9805,8 @@ def __init__( """The color of the progress bar.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this group.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9587,6 +9821,7 @@ def dump(self) -> Dict: _guard_scalar('LargeBarStatCard.aux_value_caption', self.aux_value_caption, (str,), False, False, False) _guard_scalar('LargeBarStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('LargeBarStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('LargeBarStatCard.name', self.name, (str,), False, True, False) _guard_vector('LargeBarStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='large_bar_stat', @@ -9600,6 +9835,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9625,6 +9861,8 @@ def load(__d: Dict) -> 'LargeBarStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('LargeBarStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('LargeBarStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('LargeBarStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9637,6 +9875,7 @@ def load(__d: Dict) -> 'LargeBarStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return LargeBarStatCard( box, @@ -9649,6 +9888,7 @@ def load(__d: Dict) -> 'LargeBarStatCard': progress, plot_color, data, + name, commands, ) @@ -9664,6 +9904,7 @@ def __init__( aux_value: str, caption: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('LargeStatCard.box', box, (str,), False, False, False) @@ -9671,6 +9912,7 @@ def __init__( _guard_scalar('LargeStatCard.value', value, (str,), False, False, False) _guard_scalar('LargeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('LargeStatCard.caption', caption, (str,), False, False, False) + _guard_scalar('LargeStatCard.name', name, (str,), False, True, False) _guard_vector('LargeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9684,6 +9926,8 @@ def __init__( """The caption displayed below the primary value.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9694,6 +9938,7 @@ def dump(self) -> Dict: _guard_scalar('LargeStatCard.value', self.value, (str,), False, False, False) _guard_scalar('LargeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('LargeStatCard.caption', self.caption, (str,), False, False, False) + _guard_scalar('LargeStatCard.name', self.name, (str,), False, True, False) _guard_vector('LargeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='large_stat', @@ -9703,6 +9948,7 @@ def dump(self) -> Dict: aux_value=self.aux_value, caption=self.caption, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9720,6 +9966,8 @@ def load(__d: Dict) -> 'LargeStatCard': __d_caption: Any = __d.get('caption') _guard_scalar('LargeStatCard.caption', __d_caption, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('LargeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('LargeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9728,6 +9976,7 @@ def load(__d: Dict) -> 'LargeStatCard': aux_value: str = __d_aux_value caption: str = __d_caption data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return LargeStatCard( box, @@ -9736,6 +9985,7 @@ def load(__d: Dict) -> 'LargeStatCard': aux_value, caption, data, + name, commands, ) @@ -9917,12 +10167,14 @@ def __init__( content: str, data: Optional[PackedRecord] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('MarkdownCard.box', box, (str,), False, False, False) _guard_scalar('MarkdownCard.title', title, (str,), False, False, False) _guard_scalar('MarkdownCard.content', content, (str,), False, False, False) _guard_scalar('MarkdownCard.compact', compact, (bool,), False, True, False) + _guard_scalar('MarkdownCard.name', name, (str,), False, True, False) _guard_vector('MarkdownCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -9934,6 +10186,8 @@ def __init__( """Additional data for the card.""" self.compact = compact """Make spacing tighter. Defaults to True.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -9943,6 +10197,7 @@ def dump(self) -> Dict: _guard_scalar('MarkdownCard.title', self.title, (str,), False, False, False) _guard_scalar('MarkdownCard.content', self.content, (str,), False, False, False) _guard_scalar('MarkdownCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('MarkdownCard.name', self.name, (str,), False, True, False) _guard_vector('MarkdownCard.commands', self.commands, (Command,), False, True, False) return _dump( view='markdown', @@ -9951,6 +10206,7 @@ def dump(self) -> Dict: content=self.content, data=self.data, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -9966,6 +10222,8 @@ def load(__d: Dict) -> 'MarkdownCard': __d_data: Any = __d.get('data') __d_compact: Any = __d.get('compact') _guard_scalar('MarkdownCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MarkdownCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('MarkdownCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -9973,6 +10231,7 @@ def load(__d: Dict) -> 'MarkdownCard': content: str = __d_content data: Optional[PackedRecord] = __d_data compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MarkdownCard( box, @@ -9980,6 +10239,7 @@ def load(__d: Dict) -> 'MarkdownCard': content, data, compact, + name, commands, ) @@ -9993,12 +10253,14 @@ def __init__( title: str, content: str, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('MarkupCard.box', box, (str,), False, False, False) _guard_scalar('MarkupCard.title', title, (str,), False, False, False) _guard_scalar('MarkupCard.content', content, (str,), False, False, False) _guard_scalar('MarkupCard.compact', compact, (bool,), False, True, False) + _guard_scalar('MarkupCard.name', name, (str,), False, True, False) _guard_vector('MarkupCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -10008,6 +10270,8 @@ def __init__( """The HTML content.""" self.compact = compact """True if outer spacing should be removed. Defaults to False.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -10017,6 +10281,7 @@ def dump(self) -> Dict: _guard_scalar('MarkupCard.title', self.title, (str,), False, False, False) _guard_scalar('MarkupCard.content', self.content, (str,), False, False, False) _guard_scalar('MarkupCard.compact', self.compact, (bool,), False, True, False) + _guard_scalar('MarkupCard.name', self.name, (str,), False, True, False) _guard_vector('MarkupCard.commands', self.commands, (Command,), False, True, False) return _dump( view='markup', @@ -10024,6 +10289,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, compact=self.compact, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -10038,18 +10304,22 @@ def load(__d: Dict) -> 'MarkupCard': _guard_scalar('MarkupCard.content', __d_content, (str,), False, False, False) __d_compact: Any = __d.get('compact') _guard_scalar('MarkupCard.compact', __d_compact, (bool,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MarkupCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('MarkupCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: str = __d_content compact: Optional[bool] = __d_compact + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MarkupCard( box, title, content, compact, + name, commands, ) @@ -10852,21 +11122,27 @@ def __init__( self, content: str, media: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('InlineStylesheet.content', content, (str,), False, False, False) _guard_scalar('InlineStylesheet.media', media, (str,), False, True, False) + _guard_scalar('InlineStylesheet.name', name, (str,), False, True, False) self.content = content """The CSS to be applied to this page.""" self.media = media """A valid media query to set conditions for when the style should be applied. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#attr-media.""" + self.name = name + """An optional identifying name for this stylesheet.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('InlineStylesheet.content', self.content, (str,), False, False, False) _guard_scalar('InlineStylesheet.media', self.media, (str,), False, True, False) + _guard_scalar('InlineStylesheet.name', self.name, (str,), False, True, False) return _dump( content=self.content, media=self.media, + name=self.name, ) @staticmethod @@ -10876,11 +11152,15 @@ def load(__d: Dict) -> 'InlineStylesheet': _guard_scalar('InlineStylesheet.content', __d_content, (str,), False, False, False) __d_media: Any = __d.get('media') _guard_scalar('InlineStylesheet.media', __d_media, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('InlineStylesheet.name', __d_name, (str,), False, True, False) content: str = __d_content media: Optional[str] = __d_media + name: Optional[str] = __d_name return InlineStylesheet( content, media, + name, ) @@ -10892,26 +11172,32 @@ def __init__( path: str, media: Optional[str] = None, cross_origin: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Stylesheet.path', path, (str,), False, False, False) _guard_scalar('Stylesheet.media', media, (str,), False, True, False) _guard_scalar('Stylesheet.cross_origin', cross_origin, (str,), False, True, False) + _guard_scalar('Stylesheet.name', name, (str,), False, True, False) self.path = path """The URI of an external stylesheet.""" self.media = media """A valid media query to set conditions for when the stylesheet should be loaded. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media.""" self.cross_origin = cross_origin """The CORS setting. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin""" + self.name = name + """An optional identifying name for this stylesheet.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('Stylesheet.path', self.path, (str,), False, False, False) _guard_scalar('Stylesheet.media', self.media, (str,), False, True, False) _guard_scalar('Stylesheet.cross_origin', self.cross_origin, (str,), False, True, False) + _guard_scalar('Stylesheet.name', self.name, (str,), False, True, False) return _dump( path=self.path, media=self.media, cross_origin=self.cross_origin, + name=self.name, ) @staticmethod @@ -10923,13 +11209,17 @@ def load(__d: Dict) -> 'Stylesheet': _guard_scalar('Stylesheet.media', __d_media, (str,), False, True, False) __d_cross_origin: Any = __d.get('cross_origin') _guard_scalar('Stylesheet.cross_origin', __d_cross_origin, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Stylesheet.name', __d_name, (str,), False, True, False) path: str = __d_path media: Optional[str] = __d_media cross_origin: Optional[str] = __d_cross_origin + name: Optional[str] = __d_name return Stylesheet( path, media, cross_origin, + name, ) @@ -10958,6 +11248,7 @@ def __init__( script: Optional[InlineScript] = None, stylesheet: Optional[InlineStylesheet] = None, stylesheets: Optional[List[Stylesheet]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ): @@ -10978,6 +11269,7 @@ def __init__( _guard_scalar('MetaCard.script', script, (InlineScript,), False, True, False) _guard_scalar('MetaCard.stylesheet', stylesheet, (InlineStylesheet,), False, True, False) _guard_vector('MetaCard.stylesheets', stylesheets, (Stylesheet,), False, True, False) + _guard_scalar('MetaCard.name', name, (str,), False, True, False) _guard_scalar('MetaCard.animate', animate, (bool,), False, True, False) _guard_vector('MetaCard.commands', commands, (Command,), False, True, False) self.box = box @@ -11014,6 +11306,8 @@ def __init__( """CSS stylesheet to be applied to this page.""" self.stylesheets = stylesheets """External CSS files to load into the page.""" + self.name = name + """An Optional identifying name for this page""" self.animate = animate """EXPERIMENTAL: True to turn on the card animations. Defaults to False.""" self.commands = commands @@ -11038,6 +11332,7 @@ def dump(self) -> Dict: _guard_scalar('MetaCard.script', self.script, (InlineScript,), False, True, False) _guard_scalar('MetaCard.stylesheet', self.stylesheet, (InlineStylesheet,), False, True, False) _guard_vector('MetaCard.stylesheets', self.stylesheets, (Stylesheet,), False, True, False) + _guard_scalar('MetaCard.name', self.name, (str,), False, True, False) _guard_scalar('MetaCard.animate', self.animate, (bool,), False, True, False) _guard_vector('MetaCard.commands', self.commands, (Command,), False, True, False) return _dump( @@ -11059,6 +11354,7 @@ def dump(self) -> Dict: script=None if self.script is None else self.script.dump(), stylesheet=None if self.stylesheet is None else self.stylesheet.dump(), stylesheets=None if self.stylesheets is None else [__e.dump() for __e in self.stylesheets], + name=self.name, animate=self.animate, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11100,6 +11396,8 @@ def load(__d: Dict) -> 'MetaCard': _guard_scalar('MetaCard.stylesheet', __d_stylesheet, (dict,), False, True, False) __d_stylesheets: Any = __d.get('stylesheets') _guard_vector('MetaCard.stylesheets', __d_stylesheets, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('MetaCard.name', __d_name, (str,), False, True, False) __d_animate: Any = __d.get('animate') _guard_scalar('MetaCard.animate', __d_animate, (bool,), False, True, False) __d_commands: Any = __d.get('commands') @@ -11121,6 +11419,7 @@ def load(__d: Dict) -> 'MetaCard': script: Optional[InlineScript] = None if __d_script is None else InlineScript.load(__d_script) stylesheet: Optional[InlineStylesheet] = None if __d_stylesheet is None else InlineStylesheet.load(__d_stylesheet) stylesheets: Optional[List[Stylesheet]] = None if __d_stylesheets is None else [Stylesheet.load(__e) for __e in __d_stylesheets] + name: Optional[str] = __d_name animate: Optional[bool] = __d_animate commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return MetaCard( @@ -11141,6 +11440,7 @@ def load(__d: Dict) -> 'MetaCard': script, stylesheet, stylesheets, + name, animate, commands, ) @@ -11170,6 +11470,7 @@ def __init__( persona: Optional[Component] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('NavCard.box', box, (str,), False, False, False) @@ -11183,6 +11484,7 @@ def __init__( _guard_scalar('NavCard.persona', persona, (Component,), False, True, False) _guard_vector('NavCard.secondary_items', secondary_items, (Component,), False, True, False) _guard_enum('NavCard.color', color, _NavCardColor, True) + _guard_scalar('NavCard.name', name, (str,), False, True, False) _guard_vector('NavCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11206,6 +11508,8 @@ def __init__( """Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle.""" self.color = color """Card background color. Defaults to 'card'. One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11222,6 +11526,7 @@ def dump(self) -> Dict: _guard_scalar('NavCard.persona', self.persona, (Component,), False, True, False) _guard_vector('NavCard.secondary_items', self.secondary_items, (Component,), False, True, False) _guard_enum('NavCard.color', self.color, _NavCardColor, True) + _guard_scalar('NavCard.name', self.name, (str,), False, True, False) _guard_vector('NavCard.commands', self.commands, (Command,), False, True, False) return _dump( view='nav', @@ -11236,6 +11541,7 @@ def dump(self) -> Dict: persona=None if self.persona is None else self.persona.dump(), secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], color=self.color, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11264,6 +11570,8 @@ def load(__d: Dict) -> 'NavCard': _guard_vector('NavCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_color: Any = __d.get('color') _guard_enum('NavCard.color', __d_color, _NavCardColor, True) + __d_name: Any = __d.get('name') + _guard_scalar('NavCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('NavCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11277,6 +11585,7 @@ def load(__d: Dict) -> 'NavCard': persona: Optional[Component] = None if __d_persona is None else Component.load(__d_persona) secondary_items: Optional[List[Component]] = None if __d_secondary_items is None else [Component.load(__e) for __e in __d_secondary_items] color: Optional[str] = __d_color + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return NavCard( box, @@ -11290,6 +11599,7 @@ def load(__d: Dict) -> 'NavCard': persona, secondary_items, color, + name, commands, ) @@ -11305,10 +11615,12 @@ def __init__( box: str, title: str, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('PixelArtCard.box', box, (str,), False, False, False) _guard_scalar('PixelArtCard.title', title, (str,), False, False, False) + _guard_scalar('PixelArtCard.name', name, (str,), False, True, False) _guard_vector('PixelArtCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11316,6 +11628,8 @@ def __init__( """The title for this card.""" self.data = data """The data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11323,12 +11637,14 @@ def dump(self) -> Dict: """Returns the contents of this object as a dict.""" _guard_scalar('PixelArtCard.box', self.box, (str,), False, False, False) _guard_scalar('PixelArtCard.title', self.title, (str,), False, False, False) + _guard_scalar('PixelArtCard.name', self.name, (str,), False, True, False) _guard_vector('PixelArtCard.commands', self.commands, (Command,), False, True, False) return _dump( view='pixel_art', box=self.box, title=self.title, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11340,16 +11656,20 @@ def load(__d: Dict) -> 'PixelArtCard': __d_title: Any = __d.get('title') _guard_scalar('PixelArtCard.title', __d_title, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('PixelArtCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('PixelArtCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title data: PackedRecord = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PixelArtCard( box, title, data, + name, commands, ) @@ -11365,6 +11685,7 @@ def __init__( plot: Plot, events: Optional[List[str]] = None, interactions: Optional[List[str]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ): @@ -11373,6 +11694,7 @@ def __init__( _guard_scalar('PlotCard.plot', plot, (Plot,), False, False, False) _guard_vector('PlotCard.events', events, (str,), False, True, False) _guard_vector('PlotCard.interactions', interactions, (str,), False, True, False) + _guard_scalar('PlotCard.name', name, (str,), False, True, False) _guard_scalar('PlotCard.animate', animate, (bool,), False, True, False) _guard_vector('PlotCard.commands', commands, (Command,), False, True, False) self.box = box @@ -11387,6 +11709,8 @@ def __init__( """The events to capture on this card. One of 'select_marks'.""" self.interactions = interactions """The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event.""" + self.name = name + """An optional identifying name for this card""" self.animate = animate """EXPERIMENTAL: True to turn on the chart animations. Defaults to False.""" self.commands = commands @@ -11399,6 +11723,7 @@ def dump(self) -> Dict: _guard_scalar('PlotCard.plot', self.plot, (Plot,), False, False, False) _guard_vector('PlotCard.events', self.events, (str,), False, True, False) _guard_vector('PlotCard.interactions', self.interactions, (str,), False, True, False) + _guard_scalar('PlotCard.name', self.name, (str,), False, True, False) _guard_scalar('PlotCard.animate', self.animate, (bool,), False, True, False) _guard_vector('PlotCard.commands', self.commands, (Command,), False, True, False) return _dump( @@ -11409,6 +11734,7 @@ def dump(self) -> Dict: plot=self.plot.dump(), events=self.events, interactions=self.interactions, + name=self.name, animate=self.animate, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11427,6 +11753,8 @@ def load(__d: Dict) -> 'PlotCard': _guard_vector('PlotCard.events', __d_events, (str,), False, True, False) __d_interactions: Any = __d.get('interactions') _guard_vector('PlotCard.interactions', __d_interactions, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('PlotCard.name', __d_name, (str,), False, True, False) __d_animate: Any = __d.get('animate') _guard_scalar('PlotCard.animate', __d_animate, (bool,), False, True, False) __d_commands: Any = __d.get('commands') @@ -11437,6 +11765,7 @@ def load(__d: Dict) -> 'PlotCard': plot: Plot = Plot.load(__d_plot) events: Optional[List[str]] = __d_events interactions: Optional[List[str]] = __d_interactions + name: Optional[str] = __d_name animate: Optional[bool] = __d_animate commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PlotCard( @@ -11446,6 +11775,7 @@ def load(__d: Dict) -> 'PlotCard': plot, events, interactions, + name, animate, commands, ) @@ -11462,6 +11792,7 @@ def __init__( aux_value: Optional[str] = None, caption: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('PostCard.box', box, (str,), False, False, False) @@ -11470,6 +11801,7 @@ def __init__( _guard_scalar('PostCard.aux_value', aux_value, (str,), False, True, False) _guard_scalar('PostCard.caption', caption, (str,), False, True, False) _guard_vector('PostCard.items', items, (Component,), False, True, False) + _guard_scalar('PostCard.name', name, (str,), False, True, False) _guard_vector('PostCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11483,6 +11815,8 @@ def __init__( """The card's caption, displayed below the image.""" self.items = items """The card's buttons, displayed at the bottom.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11494,6 +11828,7 @@ def dump(self) -> Dict: _guard_scalar('PostCard.aux_value', self.aux_value, (str,), False, True, False) _guard_scalar('PostCard.caption', self.caption, (str,), False, True, False) _guard_vector('PostCard.items', self.items, (Component,), False, True, False) + _guard_scalar('PostCard.name', self.name, (str,), False, True, False) _guard_vector('PostCard.commands', self.commands, (Command,), False, True, False) return _dump( view='post', @@ -11503,6 +11838,7 @@ def dump(self) -> Dict: aux_value=self.aux_value, caption=self.caption, items=None if self.items is None else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11521,6 +11857,8 @@ def load(__d: Dict) -> 'PostCard': _guard_scalar('PostCard.caption', __d_caption, (str,), False, True, False) __d_items: Any = __d.get('items') _guard_vector('PostCard.items', __d_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('PostCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('PostCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11529,6 +11867,7 @@ def load(__d: Dict) -> 'PostCard': aux_value: Optional[str] = __d_aux_value caption: Optional[str] = __d_caption items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return PostCard( box, @@ -11537,6 +11876,7 @@ def load(__d: Dict) -> 'PostCard': aux_value, caption, items, + name, commands, ) @@ -11651,6 +11991,7 @@ def __init__( image: str, items: Optional[List[Component]] = None, height: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ProfileCard.box', box, (str,), False, False, False) @@ -11658,6 +11999,7 @@ def __init__( _guard_scalar('ProfileCard.image', image, (str,), False, False, False) _guard_vector('ProfileCard.items', items, (Component,), False, True, False) _guard_scalar('ProfileCard.height', height, (str,), False, True, False) + _guard_scalar('ProfileCard.name', name, (str,), False, True, False) _guard_vector('ProfileCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11669,6 +12011,8 @@ def __init__( """Components in this card displayed below the image.""" self.height = height """The height of the bottom content (items), e.g. '400px'. Use sparingly, e.g. in grid views.""" + self.name = name + """The name of the card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11679,6 +12023,7 @@ def dump(self) -> Dict: _guard_scalar('ProfileCard.image', self.image, (str,), False, False, False) _guard_vector('ProfileCard.items', self.items, (Component,), False, True, False) _guard_scalar('ProfileCard.height', self.height, (str,), False, True, False) + _guard_scalar('ProfileCard.name', self.name, (str,), False, True, False) _guard_vector('ProfileCard.commands', self.commands, (Command,), False, True, False) return _dump( view='profile', @@ -11687,6 +12032,7 @@ def dump(self) -> Dict: image=self.image, items=None if self.items is None else [__e.dump() for __e in self.items], height=self.height, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11703,6 +12049,8 @@ def load(__d: Dict) -> 'ProfileCard': _guard_vector('ProfileCard.items', __d_items, (dict,), False, True, False) __d_height: Any = __d.get('height') _guard_scalar('ProfileCard.height', __d_height, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ProfileCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ProfileCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11710,6 +12058,7 @@ def load(__d: Dict) -> 'ProfileCard': image: str = __d_image items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items] height: Optional[str] = __d_height + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ProfileCard( box, @@ -11717,6 +12066,7 @@ def load(__d: Dict) -> 'ProfileCard': image, items, height, + name, commands, ) @@ -11796,12 +12146,14 @@ def __init__( title: str, subtitle: str, items: Optional[Union[List[Component], str]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SectionCard.box', box, (str,), False, False, False) _guard_scalar('SectionCard.title', title, (str,), False, False, False) _guard_scalar('SectionCard.subtitle', subtitle, (str,), False, False, False) _guard_vector('SectionCard.items', items, (Component,), False, True, True) + _guard_scalar('SectionCard.name', name, (str,), False, True, False) _guard_vector('SectionCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11811,6 +12163,8 @@ def __init__( """The subtitle, displayed below the title. Supports Markdown.""" self.items = items """The components to display in this card""" + self.name = name + """An optional identifying name for this card""" self.commands = commands """Contextual menu commands for this component.""" @@ -11820,6 +12174,7 @@ def dump(self) -> Dict: _guard_scalar('SectionCard.title', self.title, (str,), False, False, False) _guard_scalar('SectionCard.subtitle', self.subtitle, (str,), False, False, False) _guard_vector('SectionCard.items', self.items, (Component,), False, True, True) + _guard_scalar('SectionCard.name', self.name, (str,), False, True, False) _guard_vector('SectionCard.commands', self.commands, (Command,), False, True, False) return _dump( view='section', @@ -11827,6 +12182,7 @@ def dump(self) -> Dict: title=self.title, subtitle=self.subtitle, items=None if self.items is None else self.items if isinstance(self.items, str) else [__e.dump() for __e in self.items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11841,18 +12197,22 @@ def load(__d: Dict) -> 'SectionCard': _guard_scalar('SectionCard.subtitle', __d_subtitle, (str,), False, False, False) __d_items: Any = __d.get('items') _guard_vector('SectionCard.items', __d_items, (dict,), False, True, True) + __d_name: Any = __d.get('name') + _guard_scalar('SectionCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SectionCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title subtitle: str = __d_subtitle items: Optional[Union[List[Component], str]] = __d_items if isinstance(__d_items, str) else None if __d_items is None else [Component.load(__e) for __e in __d_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SectionCard( box, title, subtitle, items, + name, commands, ) @@ -11892,6 +12252,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SmallSeriesStatCard.box', box, (str,), False, False, False) @@ -11903,6 +12264,7 @@ def __init__( _guard_enum('SmallSeriesStatCard.plot_type', plot_type, _SmallSeriesStatCardPlotType, True) _guard_enum('SmallSeriesStatCard.plot_curve', plot_curve, _SmallSeriesStatCardPlotCurve, True) _guard_scalar('SmallSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('SmallSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('SmallSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -11926,6 +12288,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -11940,6 +12304,7 @@ def dump(self) -> Dict: _guard_enum('SmallSeriesStatCard.plot_type', self.plot_type, _SmallSeriesStatCardPlotType, True) _guard_enum('SmallSeriesStatCard.plot_curve', self.plot_curve, _SmallSeriesStatCardPlotCurve, True) _guard_scalar('SmallSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('SmallSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('SmallSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='small_series_stat', @@ -11954,6 +12319,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -11980,6 +12346,8 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('SmallSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('SmallSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SmallSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -11993,6 +12361,7 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SmallSeriesStatCard( box, @@ -12006,6 +12375,7 @@ def load(__d: Dict) -> 'SmallSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) @@ -12019,11 +12389,13 @@ def __init__( title: str, value: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('SmallStatCard.box', box, (str,), False, False, False) _guard_scalar('SmallStatCard.title', title, (str,), False, False, False) _guard_scalar('SmallStatCard.value', value, (str,), False, False, False) + _guard_scalar('SmallStatCard.name', name, (str,), False, True, False) _guard_vector('SmallStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12033,6 +12405,8 @@ def __init__( """The primary value displayed.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12041,6 +12415,7 @@ def dump(self) -> Dict: _guard_scalar('SmallStatCard.box', self.box, (str,), False, False, False) _guard_scalar('SmallStatCard.title', self.title, (str,), False, False, False) _guard_scalar('SmallStatCard.value', self.value, (str,), False, False, False) + _guard_scalar('SmallStatCard.name', self.name, (str,), False, True, False) _guard_vector('SmallStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='small_stat', @@ -12048,6 +12423,7 @@ def dump(self) -> Dict: title=self.title, value=self.value, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12061,18 +12437,22 @@ def load(__d: Dict) -> 'SmallStatCard': __d_value: Any = __d.get('value') _guard_scalar('SmallStatCard.value', __d_value, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('SmallStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('SmallStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title value: str = __d_value data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return SmallStatCard( box, title, value, data, + name, commands, ) @@ -12637,6 +13017,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TallGaugeStatCard.box', box, (str,), False, False, False) @@ -12645,6 +13026,7 @@ def __init__( _guard_scalar('TallGaugeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('TallGaugeStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('TallGaugeStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('TallGaugeStatCard.name', name, (str,), False, True, False) _guard_vector('TallGaugeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12660,6 +13042,8 @@ def __init__( """The color of the progress gauge.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12671,6 +13055,7 @@ def dump(self) -> Dict: _guard_scalar('TallGaugeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('TallGaugeStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('TallGaugeStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('TallGaugeStatCard.name', self.name, (str,), False, True, False) _guard_vector('TallGaugeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='tall_gauge_stat', @@ -12681,6 +13066,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12700,6 +13086,8 @@ def load(__d: Dict) -> 'TallGaugeStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('TallGaugeStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TallGaugeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TallGaugeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -12709,6 +13097,7 @@ def load(__d: Dict) -> 'TallGaugeStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TallGaugeStatCard( box, @@ -12718,6 +13107,7 @@ def load(__d: Dict) -> 'TallGaugeStatCard': progress, plot_color, data, + name, commands, ) @@ -12878,6 +13268,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TallSeriesStatCard.box', box, (str,), False, False, False) @@ -12890,6 +13281,7 @@ def __init__( _guard_enum('TallSeriesStatCard.plot_type', plot_type, _TallSeriesStatCardPlotType, True) _guard_enum('TallSeriesStatCard.plot_curve', plot_curve, _TallSeriesStatCardPlotCurve, True) _guard_scalar('TallSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('TallSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('TallSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -12915,6 +13307,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional identifying name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -12930,6 +13324,7 @@ def dump(self) -> Dict: _guard_enum('TallSeriesStatCard.plot_type', self.plot_type, _TallSeriesStatCardPlotType, True) _guard_enum('TallSeriesStatCard.plot_curve', self.plot_curve, _TallSeriesStatCardPlotCurve, True) _guard_scalar('TallSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('TallSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('TallSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='tall_series_stat', @@ -12945,6 +13340,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -12973,6 +13369,8 @@ def load(__d: Dict) -> 'TallSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('TallSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TallSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TallSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -12987,6 +13385,7 @@ def load(__d: Dict) -> 'TallSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TallSeriesStatCard( box, @@ -13001,6 +13400,7 @@ def load(__d: Dict) -> 'TallSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) @@ -13074,11 +13474,13 @@ def __init__( title: str, content: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('TemplateCard.box', box, (str,), False, False, False) _guard_scalar('TemplateCard.title', title, (str,), False, False, False) _guard_scalar('TemplateCard.content', content, (str,), False, False, False) + _guard_scalar('TemplateCard.name', name, (str,), False, True, False) _guard_vector('TemplateCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13088,6 +13490,8 @@ def __init__( """The Handlebars template. https://handlebarsjs.com/guide/""" self.data = data """Data for the Handlebars template.""" + self.name = name + """An optional identifying name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13096,6 +13500,7 @@ def dump(self) -> Dict: _guard_scalar('TemplateCard.box', self.box, (str,), False, False, False) _guard_scalar('TemplateCard.title', self.title, (str,), False, False, False) _guard_scalar('TemplateCard.content', self.content, (str,), False, False, False) + _guard_scalar('TemplateCard.name', self.name, (str,), False, True, False) _guard_vector('TemplateCard.commands', self.commands, (Command,), False, True, False) return _dump( view='template', @@ -13103,6 +13508,7 @@ def dump(self) -> Dict: title=self.title, content=self.content, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13116,18 +13522,22 @@ def load(__d: Dict) -> 'TemplateCard': __d_content: Any = __d.get('content') _guard_scalar('TemplateCard.content', __d_content, (str,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('TemplateCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('TemplateCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title content: str = __d_content data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return TemplateCard( box, title, content, data, + name, commands, ) @@ -13141,12 +13551,14 @@ def __init__( items: List[Command], secondary_items: Optional[List[Command]] = None, overflow_items: Optional[List[Command]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('ToolbarCard.box', box, (str,), False, False, False) _guard_vector('ToolbarCard.items', items, (Command,), False, False, False) _guard_vector('ToolbarCard.secondary_items', secondary_items, (Command,), False, True, False) _guard_vector('ToolbarCard.overflow_items', overflow_items, (Command,), False, True, False) + _guard_scalar('ToolbarCard.name', name, (str,), False, True, False) _guard_vector('ToolbarCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13156,6 +13568,8 @@ def __init__( """Items to render on the right side (or left, in RTL).""" self.overflow_items = overflow_items """Items to render in an overflow menu.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13165,6 +13579,7 @@ def dump(self) -> Dict: _guard_vector('ToolbarCard.items', self.items, (Command,), False, False, False) _guard_vector('ToolbarCard.secondary_items', self.secondary_items, (Command,), False, True, False) _guard_vector('ToolbarCard.overflow_items', self.overflow_items, (Command,), False, True, False) + _guard_scalar('ToolbarCard.name', self.name, (str,), False, True, False) _guard_vector('ToolbarCard.commands', self.commands, (Command,), False, True, False) return _dump( view='toolbar', @@ -13172,6 +13587,7 @@ def dump(self) -> Dict: items=[__e.dump() for __e in self.items], secondary_items=None if self.secondary_items is None else [__e.dump() for __e in self.secondary_items], overflow_items=None if self.overflow_items is None else [__e.dump() for __e in self.overflow_items], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13186,18 +13602,22 @@ def load(__d: Dict) -> 'ToolbarCard': _guard_vector('ToolbarCard.secondary_items', __d_secondary_items, (dict,), False, True, False) __d_overflow_items: Any = __d.get('overflow_items') _guard_vector('ToolbarCard.overflow_items', __d_overflow_items, (dict,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('ToolbarCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('ToolbarCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box items: List[Command] = [Command.load(__e) for __e in __d_items] secondary_items: Optional[List[Command]] = None if __d_secondary_items is None else [Command.load(__e) for __e in __d_secondary_items] overflow_items: Optional[List[Command]] = None if __d_overflow_items is None else [Command.load(__e) for __e in __d_overflow_items] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return ToolbarCard( box, items, secondary_items, overflow_items, + name, commands, ) @@ -13220,12 +13640,14 @@ def __init__( specification: str, data: Optional[PackedRecord] = None, grammar: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('VegaCard.box', box, (str,), False, False, False) _guard_scalar('VegaCard.title', title, (str,), False, False, False) _guard_scalar('VegaCard.specification', specification, (str,), False, False, False) _guard_enum('VegaCard.grammar', grammar, _VegaCardGrammar, True) + _guard_scalar('VegaCard.name', name, (str,), False, True, False) _guard_vector('VegaCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13237,6 +13659,8 @@ def __init__( """Data for the plot, if any.""" self.grammar = grammar """Vega grammar to use. Defaults to 'vega-lite'. One of 'vega-lite', 'vega'. See enum h2o_wave.ui.VegaCardGrammar.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13246,6 +13670,7 @@ def dump(self) -> Dict: _guard_scalar('VegaCard.title', self.title, (str,), False, False, False) _guard_scalar('VegaCard.specification', self.specification, (str,), False, False, False) _guard_enum('VegaCard.grammar', self.grammar, _VegaCardGrammar, True) + _guard_scalar('VegaCard.name', self.name, (str,), False, True, False) _guard_vector('VegaCard.commands', self.commands, (Command,), False, True, False) return _dump( view='vega', @@ -13254,6 +13679,7 @@ def dump(self) -> Dict: specification=self.specification, data=self.data, grammar=self.grammar, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13269,6 +13695,8 @@ def load(__d: Dict) -> 'VegaCard': __d_data: Any = __d.get('data') __d_grammar: Any = __d.get('grammar') _guard_enum('VegaCard.grammar', __d_grammar, _VegaCardGrammar, True) + __d_name: Any = __d.get('name') + _guard_scalar('VegaCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('VegaCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13276,6 +13704,7 @@ def load(__d: Dict) -> 'VegaCard': specification: str = __d_specification data: Optional[PackedRecord] = __d_data grammar: Optional[str] = __d_grammar + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return VegaCard( box, @@ -13283,6 +13712,7 @@ def load(__d: Dict) -> 'VegaCard': specification, data, grammar, + name, commands, ) @@ -13409,6 +13839,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideBarStatCard.box', box, (str,), False, False, False) @@ -13417,6 +13848,7 @@ def __init__( _guard_scalar('WideBarStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('WideBarStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('WideBarStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideBarStatCard.name', name, (str,), False, True, False) _guard_vector('WideBarStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13432,6 +13864,8 @@ def __init__( """The color of the progress bar.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13443,6 +13877,7 @@ def dump(self) -> Dict: _guard_scalar('WideBarStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('WideBarStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('WideBarStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideBarStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideBarStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_bar_stat', @@ -13453,6 +13888,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13472,6 +13908,8 @@ def load(__d: Dict) -> 'WideBarStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideBarStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideBarStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideBarStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13481,6 +13919,7 @@ def load(__d: Dict) -> 'WideBarStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideBarStatCard( box, @@ -13490,6 +13929,7 @@ def load(__d: Dict) -> 'WideBarStatCard': progress, plot_color, data, + name, commands, ) @@ -13506,6 +13946,7 @@ def __init__( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideGaugeStatCard.box', box, (str,), False, False, False) @@ -13514,6 +13955,7 @@ def __init__( _guard_scalar('WideGaugeStatCard.aux_value', aux_value, (str,), False, False, False) _guard_scalar('WideGaugeStatCard.progress', progress, (float, int,), False, False, False) _guard_scalar('WideGaugeStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideGaugeStatCard.name', name, (str,), False, True, False) _guard_vector('WideGaugeStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13529,6 +13971,8 @@ def __init__( """The color of the progress gauge.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13540,6 +13984,7 @@ def dump(self) -> Dict: _guard_scalar('WideGaugeStatCard.aux_value', self.aux_value, (str,), False, False, False) _guard_scalar('WideGaugeStatCard.progress', self.progress, (float, int,), False, False, False) _guard_scalar('WideGaugeStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideGaugeStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideGaugeStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_gauge_stat', @@ -13550,6 +13995,7 @@ def dump(self) -> Dict: progress=self.progress, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13569,6 +14015,8 @@ def load(__d: Dict) -> 'WideGaugeStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideGaugeStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideGaugeStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideGaugeStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13578,6 +14026,7 @@ def load(__d: Dict) -> 'WideGaugeStatCard': progress: float = __d_progress plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideGaugeStatCard( box, @@ -13587,6 +14036,7 @@ def load(__d: Dict) -> 'WideGaugeStatCard': progress, plot_color, data, + name, commands, ) @@ -13739,12 +14189,14 @@ def __init__( fraction: float, color: str, aux_value: Optional[str] = None, + name: Optional[str] = None, ): _guard_scalar('Pie.label', label, (str,), False, False, False) _guard_scalar('Pie.value', value, (str,), False, False, False) _guard_scalar('Pie.fraction', fraction, (float, int,), False, False, False) _guard_scalar('Pie.color', color, (str,), False, False, False) _guard_scalar('Pie.aux_value', aux_value, (str,), False, True, False) + _guard_scalar('Pie.name', name, (str,), False, True, False) self.label = label """The description for the pie, displayed in the legend.""" self.value = value @@ -13755,6 +14207,8 @@ def __init__( """The color of the pie.""" self.aux_value = aux_value """The auxiliary value, displayed below the label.""" + self.name = name + """An optional name, for this component.""" def dump(self) -> Dict: """Returns the contents of this object as a dict.""" @@ -13763,12 +14217,14 @@ def dump(self) -> Dict: _guard_scalar('Pie.fraction', self.fraction, (float, int,), False, False, False) _guard_scalar('Pie.color', self.color, (str,), False, False, False) _guard_scalar('Pie.aux_value', self.aux_value, (str,), False, True, False) + _guard_scalar('Pie.name', self.name, (str,), False, True, False) return _dump( label=self.label, value=self.value, fraction=self.fraction, color=self.color, aux_value=self.aux_value, + name=self.name, ) @staticmethod @@ -13784,17 +14240,21 @@ def load(__d: Dict) -> 'Pie': _guard_scalar('Pie.color', __d_color, (str,), False, False, False) __d_aux_value: Any = __d.get('aux_value') _guard_scalar('Pie.aux_value', __d_aux_value, (str,), False, True, False) + __d_name: Any = __d.get('name') + _guard_scalar('Pie.name', __d_name, (str,), False, True, False) label: str = __d_label value: str = __d_value fraction: float = __d_fraction color: str = __d_color aux_value: Optional[str] = __d_aux_value + name: Optional[str] = __d_name return Pie( label, value, fraction, color, aux_value, + name, ) @@ -13806,11 +14266,13 @@ def __init__( box: str, title: str, pies: List[Pie], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WidePieStatCard.box', box, (str,), False, False, False) _guard_scalar('WidePieStatCard.title', title, (str,), False, False, False) _guard_vector('WidePieStatCard.pies', pies, (Pie,), False, False, False) + _guard_scalar('WidePieStatCard.name', name, (str,), False, True, False) _guard_vector('WidePieStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13818,6 +14280,8 @@ def __init__( """The card's title.""" self.pies = pies """The pies to be included in the pie chart.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13826,12 +14290,14 @@ def dump(self) -> Dict: _guard_scalar('WidePieStatCard.box', self.box, (str,), False, False, False) _guard_scalar('WidePieStatCard.title', self.title, (str,), False, False, False) _guard_vector('WidePieStatCard.pies', self.pies, (Pie,), False, False, False) + _guard_scalar('WidePieStatCard.name', self.name, (str,), False, True, False) _guard_vector('WidePieStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_pie_stat', box=self.box, title=self.title, pies=[__e.dump() for __e in self.pies], + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13844,16 +14310,20 @@ def load(__d: Dict) -> 'WidePieStatCard': _guard_scalar('WidePieStatCard.title', __d_title, (str,), False, False, False) __d_pies: Any = __d.get('pies') _guard_vector('WidePieStatCard.pies', __d_pies, (dict,), False, False, False) + __d_name: Any = __d.get('name') + _guard_scalar('WidePieStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WidePieStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box title: str = __d_title pies: List[Pie] = [Pie.load(__e) for __e in __d_pies] + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WidePieStatCard( box, title, pies, + name, commands, ) @@ -13868,12 +14338,14 @@ def __init__( caption: str, plot: Plot, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WidePlotCard.box', box, (str,), False, False, False) _guard_scalar('WidePlotCard.title', title, (str,), False, False, False) _guard_scalar('WidePlotCard.caption', caption, (str,), False, False, False) _guard_scalar('WidePlotCard.plot', plot, (Plot,), False, False, False) + _guard_scalar('WidePlotCard.name', name, (str,), False, True, False) _guard_vector('WidePlotCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -13885,6 +14357,8 @@ def __init__( """The card's plot.""" self.data = data """The card's plot data.""" + self.name = name + """An optional name for this component.""" self.commands = commands """Contextual menu commands for this component.""" @@ -13894,6 +14368,7 @@ def dump(self) -> Dict: _guard_scalar('WidePlotCard.title', self.title, (str,), False, False, False) _guard_scalar('WidePlotCard.caption', self.caption, (str,), False, False, False) _guard_scalar('WidePlotCard.plot', self.plot, (Plot,), False, False, False) + _guard_scalar('WidePlotCard.name', self.name, (str,), False, True, False) _guard_vector('WidePlotCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_plot', @@ -13902,6 +14377,7 @@ def dump(self) -> Dict: caption=self.caption, plot=self.plot.dump(), data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -13917,6 +14393,8 @@ def load(__d: Dict) -> 'WidePlotCard': __d_plot: Any = __d.get('plot') _guard_scalar('WidePlotCard.plot', __d_plot, (dict,), False, False, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WidePlotCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WidePlotCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -13924,6 +14402,7 @@ def load(__d: Dict) -> 'WidePlotCard': caption: str = __d_caption plot: Plot = Plot.load(__d_plot) data: PackedRecord = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WidePlotCard( box, @@ -13931,6 +14410,7 @@ def load(__d: Dict) -> 'WidePlotCard': caption, plot, data, + name, commands, ) @@ -13971,6 +14451,7 @@ def __init__( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ): _guard_scalar('WideSeriesStatCard.box', box, (str,), False, False, False) @@ -13983,6 +14464,7 @@ def __init__( _guard_enum('WideSeriesStatCard.plot_type', plot_type, _WideSeriesStatCardPlotType, True) _guard_enum('WideSeriesStatCard.plot_curve', plot_curve, _WideSeriesStatCardPlotCurve, True) _guard_scalar('WideSeriesStatCard.plot_color', plot_color, (str,), False, True, False) + _guard_scalar('WideSeriesStatCard.name', name, (str,), False, True, False) _guard_vector('WideSeriesStatCard.commands', commands, (Command,), False, True, False) self.box = box """A string indicating how to place this component on the page.""" @@ -14008,6 +14490,8 @@ def __init__( """The plot's color.""" self.data = data """Data for this card.""" + self.name = name + """An optional name for this card.""" self.commands = commands """Contextual menu commands for this component.""" @@ -14023,6 +14507,7 @@ def dump(self) -> Dict: _guard_enum('WideSeriesStatCard.plot_type', self.plot_type, _WideSeriesStatCardPlotType, True) _guard_enum('WideSeriesStatCard.plot_curve', self.plot_curve, _WideSeriesStatCardPlotCurve, True) _guard_scalar('WideSeriesStatCard.plot_color', self.plot_color, (str,), False, True, False) + _guard_scalar('WideSeriesStatCard.name', self.name, (str,), False, True, False) _guard_vector('WideSeriesStatCard.commands', self.commands, (Command,), False, True, False) return _dump( view='wide_series_stat', @@ -14038,6 +14523,7 @@ def dump(self) -> Dict: plot_curve=self.plot_curve, plot_color=self.plot_color, data=self.data, + name=self.name, commands=None if self.commands is None else [__e.dump() for __e in self.commands], ) @@ -14066,6 +14552,8 @@ def load(__d: Dict) -> 'WideSeriesStatCard': __d_plot_color: Any = __d.get('plot_color') _guard_scalar('WideSeriesStatCard.plot_color', __d_plot_color, (str,), False, True, False) __d_data: Any = __d.get('data') + __d_name: Any = __d.get('name') + _guard_scalar('WideSeriesStatCard.name', __d_name, (str,), False, True, False) __d_commands: Any = __d.get('commands') _guard_vector('WideSeriesStatCard.commands', __d_commands, (dict,), False, True, False) box: str = __d_box @@ -14080,6 +14568,7 @@ def load(__d: Dict) -> 'WideSeriesStatCard': plot_curve: Optional[str] = __d_plot_curve plot_color: Optional[str] = __d_plot_color data: Optional[PackedRecord] = __d_data + name: Optional[str] = __d_name commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands] return WideSeriesStatCard( box, @@ -14094,5 +14583,6 @@ def load(__d: Dict) -> 'WideSeriesStatCard': plot_curve, plot_color, data, + name, commands, ) diff --git a/py/h2o_wave/h2o_wave/ui.py b/py/h2o_wave/h2o_wave/ui.py index c301fdd3a5..39e0bbd131 100644 --- a/py/h2o_wave/h2o_wave/ui.py +++ b/py/h2o_wave/h2o_wave/ui.py @@ -1124,18 +1124,21 @@ def mini_button( def mini_buttons( items: List[Component], visible: Optional[bool] = None, + name: Optional[str] = None, ) -> Component: """Create a set of mini buttons laid out horizontally. Args: items: The buttons in this set. visible: True if the component should be visible. Defaults to True. + name: An identifying name for this component. Returns: A `h2o_wave.types.MiniButtons` instance. """ return Component(mini_buttons=MiniButtons( items, visible, + name, )) @@ -1230,6 +1233,7 @@ def tag( label: str, color: str, label_color: Optional[str] = None, + name: Optional[str] = None, ) -> Tag: """Create a tag. @@ -1237,6 +1241,7 @@ def tag( label: The text displayed within the tag. color: Tag's background color. label_color: Tag's label color. If not specified, black or white will be picked based on correct contrast with background. + name: An identifying name for this component. Returns: A `h2o_wave.types.Tag` instance. """ @@ -1244,6 +1249,7 @@ def tag( label, color, label_color, + name, ) @@ -1312,6 +1318,36 @@ def markdown_table_cell_type( )) +def table_cell_type( + progress: Optional[ProgressTableCellType] = None, + icon: Optional[IconTableCellType] = None, + tag: Optional[TagTableCellType] = None, + menu: Optional[MenuTableCellType] = None, + markdown: Optional[MarkdownTableCellType] = None, + name: Optional[str] = None, +) -> TableCellType: + """Defines cell content to be rendered instead of a simple text. + + Args: + progress: Renders a progress arc with a percentage value in the middle. + icon: Renders an icon. + tag: Renders one or more tags. + menu: Renders a command menu. + markdown: Renders text using markdown. + name: An identifying name for this Component + Returns: + A `h2o_wave.types.TableCellType` instance. + """ + return TableCellType( + progress, + icon, + tag, + menu, + markdown, + name, + ) + + def table_column( name: str, label: str, @@ -1385,6 +1421,7 @@ def table_group( label: str, rows: List[TableRow], collapsed: Optional[bool] = None, + name: Optional[str] = None, ) -> TableGroup: """Make rows within the table collapsible/expandable. @@ -1394,6 +1431,7 @@ def table_group( label: The title of the group. rows: The rows in this group. collapsed: Indicates whether the table group should be collapsed by default. Defaults to True. + name: An identifying name for this group. Returns: A `h2o_wave.types.TableGroup` instance. """ @@ -1401,24 +1439,28 @@ def table_group( label, rows, collapsed, + name, ) def table_pagination( total_rows: int, rows_per_page: int, + name: Optional[str] = None, ) -> TablePagination: """Configure table pagination. Use as `pagination` parameter to `ui.table()` Args: total_rows: Total count of all the rows in your dataset. rows_per_page: The maximum amount of rows to be displayed in a single page. + name: An identifying name for this component. Returns: A `h2o_wave.types.TablePagination` instance. """ return TablePagination( total_rows, rows_per_page, + name, ) @@ -1557,6 +1599,7 @@ def links( label: Optional[str] = None, inline: Optional[bool] = None, width: Optional[str] = None, + name: Optional[str] = None, ) -> Component: """Create a collection of links. @@ -1565,6 +1608,7 @@ def links( label: The name of the link group. inline: Render links horizontally. Defaults to False. width: The width of the links, e.g. '100px'. + name: An identifying name for this component. Returns: A `h2o_wave.types.Links` instance. """ @@ -1573,6 +1617,7 @@ def links( label, inline, width, + name, )) @@ -1843,6 +1888,7 @@ def step( label: str, icon: Optional[str] = None, done: Optional[bool] = None, + name: Optional[str] = None, ) -> Step: """Create a step for a stepper. @@ -1850,6 +1896,7 @@ def step( label: Text displayed below icon. icon: Icon to be displayed. done: Indicates whether this step has already been completed. + name: An identifying name for this component. Returns: A `h2o_wave.types.Step` instance. """ @@ -1857,6 +1904,7 @@ def step( label, icon, done, + name, ) @@ -1947,6 +1995,7 @@ def mark( label_font_weight: Optional[str] = None, label_line_height: Optional[float] = None, label_align: Optional[str] = None, + name: Optional[str] = None, ref_stroke_color: Optional[str] = None, ref_stroke_opacity: Optional[float] = None, ref_stroke_size: Optional[float] = None, @@ -2015,6 +2064,7 @@ def mark( label_font_weight: Label font weight. label_line_height: Label line height. label_align: Label text alignment. One of 'left', 'right', 'center', 'start', 'end'. See enum h2o_wave.ui.MarkLabelAlign. + name: An optional name ref_stroke_color: Reference line stroke color. ref_stroke_opacity: Reference line stroke opacity. ref_stroke_size: Reference line stroke size (line width or pen thickness). @@ -2082,6 +2132,7 @@ def mark( label_font_weight, label_line_height, label_align, + name, ref_stroke_color, ref_stroke_opacity, ref_stroke_size, @@ -2275,6 +2326,7 @@ def image( width: Optional[str] = None, visible: Optional[bool] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, ) -> Component: """Create an image. @@ -2286,6 +2338,7 @@ def image( width: The width of the image, e.g. '100px'. visible: True if the component should be visible. Defaults to True. path_popup: The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. + name: An optional identifying name for this component. Returns: A `h2o_wave.types.Image` instance. """ @@ -2297,6 +2350,7 @@ def image( width, visible, path_popup, + name, )) @@ -2361,18 +2415,21 @@ def text_annotator_tag( def text_annotator_item( text: str, tag: Optional[str] = None, + name: Optional[str] = None, ) -> TextAnnotatorItem: """Create an annotator item with initial selected tags or no tag for plaintext. Args: text: Text to be highlighted. tag: The `name` of the text annotator tag to refer to for the `label` and `color` of this item. + name: An identifying name for this component. Returns: A `h2o_wave.types.TextAnnotatorItem` instance. """ return TextAnnotatorItem( text, tag, + name, ) @@ -2434,6 +2491,7 @@ def image_annotator_rect( y1: float, x2: float, y2: float, + name: Optional[str] = None, ) -> ImageAnnotatorShape: """Create a rectangular annotation shape. @@ -2442,6 +2500,7 @@ def image_annotator_rect( y1: `y` coordinate of the rectangle's corner. x2: `x` coordinate of the diagonally opposite corner. y2: `y` coordinate of the diagonally opposite corner. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorRect` instance. """ @@ -2450,57 +2509,67 @@ def image_annotator_rect( y1, x2, y2, + name, )) def image_annotator_point( x: float, y: float, + name: Optional[str] = None, ) -> ImageAnnotatorPoint: """Create a polygon annotation point with x and y coordinates.. Args: x: `x` coordinate of the point. y: `y` coordinate of the point. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorPoint` instance. """ return ImageAnnotatorPoint( x, y, + name, ) def image_annotator_polygon( vertices: List[ImageAnnotatorPoint], + name: Optional[str] = None, ) -> ImageAnnotatorShape: """Create a polygon annotation shape. Args: vertices: List of polygon points. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorPolygon` instance. """ return ImageAnnotatorShape(polygon=ImageAnnotatorPolygon( vertices, + name, )) def image_annotator_item( shape: ImageAnnotatorShape, tag: str, + name: Optional[str] = None, ) -> ImageAnnotatorItem: """Create an annotator item with initial selected tags or no tag for plaintext. Args: shape: The annotation shape. tag: The `name` of the image annotator tag to refer to for the `label` and `color` of this item. + name: An optional name for this component. Returns: A `h2o_wave.types.ImageAnnotatorItem` instance. """ return ImageAnnotatorItem( shape, tag, + name, ) @@ -2570,6 +2639,7 @@ def audio_annotator_item( start: float, end: float, tag: str, + name: Optional[str] = None, ) -> AudioAnnotatorItem: """Create an annotator item with initial selected tags or no tags. @@ -2577,6 +2647,7 @@ def audio_annotator_item( start: The start of the audio annotation in seconds. end: The end of the audio annotation in seconds. tag: The `name` of the audio annotator tag to refer to for the `label` and `color` of this item. + name: An identifying name for this component Returns: A `h2o_wave.types.AudioAnnotatorItem` instance. """ @@ -2584,6 +2655,7 @@ def audio_annotator_item( start, end, tag, + name, ) @@ -2740,15 +2812,15 @@ def time_picker( name: An identifying name for this component. label: Text to be displayed alongside the component. placeholder: A string that provides a brief hint to the user as to what kind of information is expected in the field. - value: The time value in hh:mm format. E.g. '10:30', '14:25', '23:59', '00:00' + value: The time value in hh:mm:ss format. E.g. '10:30:45', '14:25:30', '23:59:59', '00:00:00' disabled: True if this field is disabled. width: The width of the time picker, e.g. '100px'. Defaults to '100%'. visible: True if the component should be visible. Defaults to True. trigger: True if the form should be submitted when the time is selected. required: True if this is a required field. Defaults to False. hour_format: Specifies 12-hour or 24-hour time format. One of `12` or `24`. Defaults to `12`. - min: The minimum allowed time value in hh:mm format. E.g.: '08:00', '13:30' - max: The maximum allowed time value in hh:mm format. E.g.: '15:30', '00:00' + min: The minimum allowed time value in hh:mm:ss format. E.g.: '08:00:00', '13:30:00' + max: The maximum allowed time value in hh:mm:ss format. E.g.: '15:30:00', '00:00:00' minutes_step: Limits the available minutes to select from. One of `1`, `5`, `10`, `15`, `20`, `30` or `60`. Defaults to `1`. Returns: A `h2o_wave.types.TimePicker` instance. @@ -2775,6 +2847,7 @@ def article_card( title: str, content: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ArticleCard: """Create an article card for longer texts. @@ -2784,6 +2857,7 @@ def article_card( title: The card’s title, displayed at the top. content: Markdown text. items: Collection of small buttons rendered under the title. + name: An identifying name for this component commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ArticleCard` instance. @@ -2793,6 +2867,7 @@ def article_card( title, content, items, + name, commands, ) @@ -2818,6 +2893,7 @@ def breadcrumb( def breadcrumbs_card( box: str, items: List[Breadcrumb], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> BreadcrumbsCard: """Create a card containing breadcrumbs. @@ -2831,6 +2907,7 @@ def breadcrumbs_card( Args: box: A string indicating how to place this component on the page. items: A list of `h2o_wave.types.Breadcrumb` instances to display. See `h2o_wave.ui.breadcrumb()` + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.BreadcrumbsCard` instance. @@ -2838,6 +2915,7 @@ def breadcrumbs_card( return BreadcrumbsCard( box, items, + name, commands, ) @@ -3040,6 +3118,7 @@ def footer_card( box: str, caption: str, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FooterCard: """Render a page footer displaying a caption. @@ -3049,6 +3128,7 @@ def footer_card( box: A string indicating how to place this component on the page. caption: The caption. Supports markdown. * items: The components displayed to the right of the caption. + name: An optional identifying name to the card commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FooterCard` instance. @@ -3057,6 +3137,7 @@ def footer_card( box, caption, items, + name, commands, ) @@ -3065,6 +3146,7 @@ def form_card( box: str, items: Union[List[Component], str], title: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FormCard: """Create a form. @@ -3073,6 +3155,7 @@ def form_card( box: A string indicating how to place this component on the page. items: The components in this form. title: The title for this card. + name: An optional name for this form. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FormCard` instance. @@ -3081,6 +3164,7 @@ def form_card( box, items, title, + name, commands, ) @@ -3091,6 +3175,7 @@ def frame_card( path: Optional[str] = None, content: Optional[str] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> FrameCard: """Render a card containing a HTML page inside an inline frame (an `iframe`). @@ -3103,6 +3188,7 @@ def frame_card( path: The path or URL of the web page, e.g. `/foo.html` or `http://example.com/foo.html`. content: The HTML content of the page. A string containing `...`. compact: True if title and padding should be removed. Defaults to False. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.FrameCard` instance. @@ -3113,6 +3199,7 @@ def frame_card( path, content, compact, + name, commands, ) @@ -3127,6 +3214,7 @@ def graphics_card( image: Optional[str] = None, image_path: Optional[str] = None, image_type: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> GraphicsCard: """Create a card for displaying vector graphics. @@ -3141,6 +3229,7 @@ def graphics_card( image: Background image data, base64-encoded. image_path: The path or URL or data URL of the background image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. image_type: The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set. + name: An optional identifying name for this Card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.GraphicsCard` instance. @@ -3155,6 +3244,7 @@ def graphics_card( image, image_path, image_type, + name, commands, ) @@ -3248,6 +3338,7 @@ def header_card( items: Optional[List[Component]] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> HeaderCard: """Render a page header displaying a title, subtitle and an optional navigation menu. @@ -3264,6 +3355,7 @@ def header_card( items: Items that should be displayed on the right side of the header. secondary_items: Items that should be displayed in the center of the header. color: Header background color. Defaults to 'primary'. One of 'card', 'transparent', 'primary'. See enum h2o_wave.ui.HeaderCardColor. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.HeaderCard` instance. @@ -3279,6 +3371,7 @@ def header_card( items, secondary_items, color, + name, commands, ) @@ -3291,6 +3384,7 @@ def image_card( data: Optional[PackedRecord] = None, path: Optional[str] = None, path_popup: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ImageCard: """Create a card that displays a base64-encoded image. @@ -3303,6 +3397,7 @@ def image_card( data: Data for this card. path: The path or URL or data URL of the image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. path_popup: The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. + name: An optional identifying name for the image commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ImageCard` instance. @@ -3315,6 +3410,7 @@ def image_card( data, path, path_popup, + name, commands, ) @@ -3330,6 +3426,7 @@ def large_bar_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> LargeBarStatCard: """Create a large captioned card displaying a primary value, an auxiliary value and a progress bar, with captions for each value. @@ -3345,6 +3442,7 @@ def large_bar_stat_card( progress: The value of the progress bar, between 0 and 1. plot_color: The color of the progress bar. data: Data for this card. + name: An optional identifying name for this group. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.LargeBarStatCard` instance. @@ -3360,6 +3458,7 @@ def large_bar_stat_card( progress, plot_color, data, + name, commands, ) @@ -3371,6 +3470,7 @@ def large_stat_card( aux_value: str, caption: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> LargeStatCard: """Create a stat card displaying a primary value, an auxiliary value and a caption. @@ -3382,6 +3482,7 @@ def large_stat_card( aux_value: The auxiliary value displayed next to the primary value. caption: The caption displayed below the primary value. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.LargeStatCard` instance. @@ -3393,6 +3494,7 @@ def large_stat_card( aux_value, caption, data, + name, commands, ) @@ -3467,6 +3569,7 @@ def markdown_card( content: str, data: Optional[PackedRecord] = None, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> MarkdownCard: """Create a card that renders Markdown content. @@ -3482,6 +3585,7 @@ def markdown_card( content: The markdown content. Supports Github Flavored Markdown (GFM): https://guides.github.com/features/mastering-markdown/ data: Additional data for the card. compact: Make spacing tighter. Defaults to True. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.MarkdownCard` instance. @@ -3492,6 +3596,7 @@ def markdown_card( content, data, compact, + name, commands, ) @@ -3501,6 +3606,7 @@ def markup_card( title: str, content: str, compact: Optional[bool] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> MarkupCard: """Render HTML content. @@ -3510,6 +3616,7 @@ def markup_card( title: The title for this card. content: The HTML content. compact: True if outer spacing should be removed. Defaults to False. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.MarkupCard` instance. @@ -3519,6 +3626,7 @@ def markup_card( title, content, compact, + name, commands, ) @@ -3803,18 +3911,21 @@ def inline_script( def inline_stylesheet( content: str, media: Optional[str] = None, + name: Optional[str] = None, ) -> InlineStylesheet: """Create an inline CSS to be injected into a page. Args: content: The CSS to be applied to this page. media: A valid media query to set conditions for when the style should be applied. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#attr-media. + name: An optional identifying name for this stylesheet. Returns: A `h2o_wave.types.InlineStylesheet` instance. """ return InlineStylesheet( content, media, + name, ) @@ -3822,6 +3933,7 @@ def stylesheet( path: str, media: Optional[str] = None, cross_origin: Optional[str] = None, + name: Optional[str] = None, ) -> Stylesheet: """Create a reference to an external CSS file to be included on a page. @@ -3829,6 +3941,7 @@ def stylesheet( path: The URI of an external stylesheet. media: A valid media query to set conditions for when the stylesheet should be loaded. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media. cross_origin: The CORS setting. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin + name: An optional identifying name for this stylesheet. Returns: A `h2o_wave.types.Stylesheet` instance. """ @@ -3836,6 +3949,7 @@ def stylesheet( path, media, cross_origin, + name, ) @@ -3857,6 +3971,7 @@ def meta_card( script: Optional[InlineScript] = None, stylesheet: Optional[InlineStylesheet] = None, stylesheets: Optional[List[Stylesheet]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ) -> MetaCard: @@ -3883,6 +3998,7 @@ def meta_card( script: Javascript code to execute on this page. stylesheet: CSS stylesheet to be applied to this page. stylesheets: External CSS files to load into the page. + name: An Optional identifying name for this page animate: EXPERIMENTAL: True to turn on the card animations. Defaults to False. commands: Contextual menu commands for this component. Returns: @@ -3906,6 +4022,7 @@ def meta_card( script, stylesheet, stylesheets, + name, animate, commands, ) @@ -3923,6 +4040,7 @@ def nav_card( persona: Optional[Component] = None, secondary_items: Optional[List[Component]] = None, color: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> NavCard: """Create a card containing a navigation pane. @@ -3939,6 +4057,7 @@ def nav_card( persona: The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. * secondary_items: Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle. color: Card background color. Defaults to 'card'. One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.NavCard` instance. @@ -3955,6 +4074,7 @@ def nav_card( persona, secondary_items, color, + name, commands, ) @@ -3963,6 +4083,7 @@ def pixel_art_card( box: str, title: str, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> PixelArtCard: """WARNING: Experimental and subject to change. @@ -3974,6 +4095,7 @@ def pixel_art_card( box: A string indicating how to place this component on the page. title: The title for this card. data: The data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.PixelArtCard` instance. @@ -3982,6 +4104,7 @@ def pixel_art_card( box, title, data, + name, commands, ) @@ -3993,6 +4116,7 @@ def plot_card( plot: Plot, events: Optional[List[str]] = None, interactions: Optional[List[str]] = None, + name: Optional[str] = None, animate: Optional[bool] = None, commands: Optional[List[Command]] = None, ) -> PlotCard: @@ -4005,6 +4129,7 @@ def plot_card( plot: The plot to be displayed in this card. events: The events to capture on this card. One of 'select_marks'. interactions: The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event. + name: An optional identifying name for this card animate: EXPERIMENTAL: True to turn on the chart animations. Defaults to False. commands: Contextual menu commands for this component. Returns: @@ -4017,6 +4142,7 @@ def plot_card( plot, events, interactions, + name, animate, commands, ) @@ -4029,6 +4155,7 @@ def post_card( aux_value: Optional[str] = None, caption: Optional[str] = None, items: Optional[List[Component]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> PostCard: """Create a postcard displaying a persona, image, caption and optional buttons. @@ -4040,6 +4167,7 @@ def post_card( aux_value: The card's aux_value, displayed on the right hand side of the image. caption: The card's caption, displayed below the image. items: The card's buttons, displayed at the bottom. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.PostCard` instance. @@ -4051,6 +4179,7 @@ def post_card( aux_value, caption, items, + name, commands, ) @@ -4097,6 +4226,7 @@ def profile_card( image: str, items: Optional[List[Component]] = None, height: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ProfileCard: """Create a profile card to display information about a user. @@ -4107,6 +4237,7 @@ def profile_card( image: The card’s image, either a base64-encoded image, a path to an image hosted externally (starting with `https://` or `http://`) or a path to an image hosted on the Wave daemon (starting with `/`). . items: Components in this card displayed below the image. height: The height of the bottom content (items), e.g. '400px'. Use sparingly, e.g. in grid views. + name: The name of the card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ProfileCard` instance. @@ -4117,6 +4248,7 @@ def profile_card( image, items, height, + name, commands, ) @@ -4154,6 +4286,7 @@ def section_card( title: str, subtitle: str, items: Optional[Union[List[Component], str]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SectionCard: """Render a card displaying a title, a subtitle, and optional components. @@ -4164,6 +4297,7 @@ def section_card( title: The title. subtitle: The subtitle, displayed below the title. Supports Markdown. items: The components to display in this card + name: An optional identifying name for this card commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SectionCard` instance. @@ -4173,6 +4307,7 @@ def section_card( title, subtitle, items, + name, commands, ) @@ -4189,6 +4324,7 @@ def small_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SmallSeriesStatCard: """Create a small stat card displaying a primary value and a series plot. @@ -4205,6 +4341,7 @@ def small_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.SmallSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SmallSeriesStatCard` instance. @@ -4221,6 +4358,7 @@ def small_series_stat_card( plot_curve, plot_color, data, + name, commands, ) @@ -4230,6 +4368,7 @@ def small_stat_card( title: str, value: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> SmallStatCard: """Create a stat card displaying a single value. @@ -4239,6 +4378,7 @@ def small_stat_card( title: The card's title. value: The primary value displayed. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.SmallStatCard` instance. @@ -4248,6 +4388,7 @@ def small_stat_card( title, value, data, + name, commands, ) @@ -4461,6 +4602,7 @@ def tall_gauge_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TallGaugeStatCard: """Create a tall stat card displaying a primary value, an auxiliary value and a progress gauge. @@ -4473,6 +4615,7 @@ def tall_gauge_stat_card( progress: The value of the progress gauge, between 0 and 1. plot_color: The color of the progress gauge. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TallGaugeStatCard` instance. @@ -4485,6 +4628,7 @@ def tall_gauge_stat_card( progress, plot_color, data, + name, commands, ) @@ -4544,6 +4688,7 @@ def tall_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TallSeriesStatCard: """Create a tall stat card displaying a primary value, an auxiliary value and a series plot. @@ -4561,6 +4706,7 @@ def tall_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.TallSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional identifying name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TallSeriesStatCard` instance. @@ -4578,6 +4724,7 @@ def tall_series_stat_card( plot_curve, plot_color, data, + name, commands, ) @@ -4611,6 +4758,7 @@ def template_card( title: str, content: str, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> TemplateCard: """Render dynamic content using an HTML template. @@ -4620,6 +4768,7 @@ def template_card( title: The title for this card. content: The Handlebars template. https://handlebarsjs.com/guide/ data: Data for the Handlebars template. + name: An optional identifying name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.TemplateCard` instance. @@ -4629,6 +4778,7 @@ def template_card( title, content, data, + name, commands, ) @@ -4638,6 +4788,7 @@ def toolbar_card( items: List[Command], secondary_items: Optional[List[Command]] = None, overflow_items: Optional[List[Command]] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> ToolbarCard: """Create a card containing a toolbar. @@ -4647,6 +4798,7 @@ def toolbar_card( items: Items to render. secondary_items: Items to render on the right side (or left, in RTL). overflow_items: Items to render in an overflow menu. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.ToolbarCard` instance. @@ -4656,6 +4808,7 @@ def toolbar_card( items, secondary_items, overflow_items, + name, commands, ) @@ -4666,6 +4819,7 @@ def vega_card( specification: str, data: Optional[PackedRecord] = None, grammar: Optional[str] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> VegaCard: """Create a card containing a Vega-lite plot. @@ -4676,6 +4830,7 @@ def vega_card( specification: The Vega-lite specification. data: Data for the plot, if any. grammar: Vega grammar to use. Defaults to 'vega-lite'. One of 'vega-lite', 'vega'. See enum h2o_wave.ui.VegaCardGrammar. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.VegaCard` instance. @@ -4686,6 +4841,7 @@ def vega_card( specification, data, grammar, + name, commands, ) @@ -4737,6 +4893,7 @@ def wide_bar_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideBarStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a progress bar. @@ -4749,6 +4906,7 @@ def wide_bar_stat_card( progress: The value of the progress bar, between 0 and 1. plot_color: The color of the progress bar. data: Data for this card. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideBarStatCard` instance. @@ -4761,6 +4919,7 @@ def wide_bar_stat_card( progress, plot_color, data, + name, commands, ) @@ -4773,6 +4932,7 @@ def wide_gauge_stat_card( progress: float, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideGaugeStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a progress gauge. @@ -4785,6 +4945,7 @@ def wide_gauge_stat_card( progress: The value of the progress gauge, between 0 and 1. plot_color: The color of the progress gauge. data: Data for this card. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideGaugeStatCard` instance. @@ -4797,6 +4958,7 @@ def wide_gauge_stat_card( progress, plot_color, data, + name, commands, ) @@ -4852,6 +5014,7 @@ def pie( fraction: float, color: str, aux_value: Optional[str] = None, + name: Optional[str] = None, ) -> Pie: """Card's pie chart data to be displayed. @@ -4861,6 +5024,7 @@ def pie( fraction: A value between 0 and 1 indicating the size of the pie. color: The color of the pie. aux_value: The auxiliary value, displayed below the label. + name: An optional name, for this component. Returns: A `h2o_wave.types.Pie` instance. """ @@ -4870,6 +5034,7 @@ def pie( fraction, color, aux_value, + name, ) @@ -4877,6 +5042,7 @@ def wide_pie_stat_card( box: str, title: str, pies: List[Pie], + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WidePieStatCard: """Create a wide pie stat card displaying a title and pie chart with legend. @@ -4885,6 +5051,7 @@ def wide_pie_stat_card( box: A string indicating how to place this component on the page. title: The card's title. pies: The pies to be included in the pie chart. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WidePieStatCard` instance. @@ -4893,6 +5060,7 @@ def wide_pie_stat_card( box, title, pies, + name, commands, ) @@ -4903,6 +5071,7 @@ def wide_plot_card( caption: str, plot: Plot, data: PackedRecord, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WidePlotCard: """Create a wide plot card displaying a title, caption and a plot. @@ -4913,6 +5082,7 @@ def wide_plot_card( caption: The card's caption, displayed below the title. plot: The card's plot. data: The card's plot data. + name: An optional name for this component. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WidePlotCard` instance. @@ -4923,6 +5093,7 @@ def wide_plot_card( caption, plot, data, + name, commands, ) @@ -4940,6 +5111,7 @@ def wide_series_stat_card( plot_curve: Optional[str] = None, plot_color: Optional[str] = None, data: Optional[PackedRecord] = None, + name: Optional[str] = None, commands: Optional[List[Command]] = None, ) -> WideSeriesStatCard: """Create a wide stat card displaying a primary value, an auxiliary value and a series plot. @@ -4957,6 +5129,7 @@ def wide_series_stat_card( plot_curve: The plot's curve style. Defaults to `linear`. One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.WideSeriesStatCardPlotCurve. plot_color: The plot's color. data: Data for this card. + name: An optional name for this card. commands: Contextual menu commands for this component. Returns: A `h2o_wave.types.WideSeriesStatCard` instance. @@ -4974,5 +5147,6 @@ def wide_series_stat_card( plot_curve, plot_color, data, + name, commands, ) diff --git a/r/R/ui.R b/r/R/ui.R index 34d9c72c5d..aac85abba8 100644 --- a/r/R/ui.R +++ b/r/R/ui.R @@ -1344,16 +1344,20 @@ ui_mini_button <- function( #' #' @param items The buttons in this set. #' @param visible True if the component should be visible. Defaults to True. +#' @param name An identifying name for this component. #' @return A MiniButtons instance. #' @export ui_mini_buttons <- function( items, - visible = NULL) { + visible = NULL, + name = NULL) { .guard_vector("items", "WaveComponent", items) .guard_scalar("visible", "logical", visible) + .guard_scalar("name", "character", name) .o <- list(mini_buttons=list( items=items, - visible=visible)) + visible=visible, + name=name)) class(.o) <- append(class(.o), c(.wave_obj, "WaveComponent")) return(.o) } @@ -1460,19 +1464,23 @@ ui_icon_table_cell_type <- function( #' @param label The text displayed within the tag. #' @param color Tag's background color. #' @param label_color Tag's label color. If not specified, black or white will be picked based on correct contrast with background. +#' @param name An identifying name for this component. #' @return A Tag instance. #' @export ui_tag <- function( label, color, - label_color = NULL) { + label_color = NULL, + name = NULL) { .guard_scalar("label", "character", label) .guard_scalar("color", "character", color) .guard_scalar("label_color", "character", label_color) + .guard_scalar("name", "character", name) .o <- list( label=label, color=color, - label_color=label_color) + label_color=label_color, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveTag")) return(.o) } @@ -1542,6 +1550,40 @@ ui_markdown_table_cell_type <- function( return(.o) } +#' Defines cell content to be rendered instead of a simple text. +#' +#' @param progress Renders a progress arc with a percentage value in the middle. +#' @param icon Renders an icon. +#' @param tag Renders one or more tags. +#' @param menu Renders a command menu. +#' @param markdown Renders text using markdown. +#' @param name An identifying name for this Component +#' @return A TableCellType instance. +#' @export +ui_table_cell_type <- function( + progress = NULL, + icon = NULL, + tag = NULL, + menu = NULL, + markdown = NULL, + name = NULL) { + .guard_scalar("progress", "WaveProgressTableCellType", progress) + .guard_scalar("icon", "WaveIconTableCellType", icon) + .guard_scalar("tag", "WaveTagTableCellType", tag) + .guard_scalar("menu", "WaveMenuTableCellType", menu) + .guard_scalar("markdown", "WaveMarkdownTableCellType", markdown) + .guard_scalar("name", "character", name) + .o <- list( + progress=progress, + icon=icon, + tag=tag, + menu=menu, + markdown=markdown, + name=name) + class(.o) <- append(class(.o), c(.wave_obj, "WaveTableCellType")) + return(.o) +} + #' Create a table column. #' #' @param name An identifying name for this column. @@ -1632,19 +1674,23 @@ ui_table_row <- function( #' @param label The title of the group. #' @param rows The rows in this group. #' @param collapsed Indicates whether the table group should be collapsed by default. Defaults to True. +#' @param name An identifying name for this group. #' @return A TableGroup instance. #' @export ui_table_group <- function( label, rows, - collapsed = NULL) { + collapsed = NULL, + name = NULL) { .guard_scalar("label", "character", label) .guard_vector("rows", "WaveTableRow", rows) .guard_scalar("collapsed", "logical", collapsed) + .guard_scalar("name", "character", name) .o <- list( label=label, rows=rows, - collapsed=collapsed) + collapsed=collapsed, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveTableGroup")) return(.o) } @@ -1653,16 +1699,20 @@ ui_table_group <- function( #' #' @param total_rows Total count of all the rows in your dataset. #' @param rows_per_page The maximum amount of rows to be displayed in a single page. +#' @param name An identifying name for this component. #' @return A TablePagination instance. #' @export ui_table_pagination <- function( total_rows, - rows_per_page) { + rows_per_page, + name = NULL) { .guard_scalar("total_rows", "numeric", total_rows) .guard_scalar("rows_per_page", "numeric", rows_per_page) + .guard_scalar("name", "character", name) .o <- list( total_rows=total_rows, - rows_per_page=rows_per_page) + rows_per_page=rows_per_page, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveTablePagination")) return(.o) } @@ -1828,22 +1878,26 @@ ui_link <- function( #' @param label The name of the link group. #' @param inline Render links horizontally. Defaults to False. #' @param width The width of the links, e.g. '100px'. +#' @param name An identifying name for this component. #' @return A Links instance. #' @export ui_links <- function( items, label = NULL, inline = NULL, - width = NULL) { + width = NULL, + name = NULL) { .guard_vector("items", "WaveComponent", items) .guard_scalar("label", "character", label) .guard_scalar("inline", "logical", inline) .guard_scalar("width", "character", width) + .guard_scalar("name", "character", name) .o <- list(links=list( items=items, label=label, inline=inline, - width=width)) + width=width, + name=name)) class(.o) <- append(class(.o), c(.wave_obj, "WaveComponent")) return(.o) } @@ -2153,19 +2207,23 @@ ui_range_slider <- function( #' @param label Text displayed below icon. #' @param icon Icon to be displayed. #' @param done Indicates whether this step has already been completed. +#' @param name An identifying name for this component. #' @return A Step instance. #' @export ui_step <- function( label, icon = NULL, - done = NULL) { + done = NULL, + name = NULL) { .guard_scalar("label", "character", label) .guard_scalar("icon", "character", icon) .guard_scalar("done", "logical", done) + .guard_scalar("name", "character", name) .o <- list( label=label, icon=icon, - done=done) + done=done, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveStep")) return(.o) } @@ -2270,6 +2328,7 @@ ui_stepper <- function( #' @param label_line_height Label line height. #' @param label_align Label text alignment. #' One of 'left', 'right', 'center', 'start', 'end'. See enum h2o_wave.ui.MarkLabelAlign. +#' @param name An optional name #' @param ref_stroke_color Reference line stroke color. #' @param ref_stroke_opacity Reference line stroke opacity. #' @param ref_stroke_size Reference line stroke size (line width or pen thickness). @@ -2336,6 +2395,7 @@ ui_mark <- function( label_font_weight = NULL, label_line_height = NULL, label_align = NULL, + name = NULL, ref_stroke_color = NULL, ref_stroke_opacity = NULL, ref_stroke_size = NULL, @@ -2399,6 +2459,7 @@ ui_mark <- function( .guard_scalar("label_font_weight", "character", label_font_weight) .guard_scalar("label_line_height", "numeric", label_line_height) # TODO Validate label_align + .guard_scalar("name", "character", name) .guard_scalar("ref_stroke_color", "character", ref_stroke_color) .guard_scalar("ref_stroke_opacity", "numeric", ref_stroke_opacity) .guard_scalar("ref_stroke_size", "numeric", ref_stroke_size) @@ -2463,6 +2524,7 @@ ui_mark <- function( label_font_weight=label_font_weight, label_line_height=label_line_height, label_align=label_align, + name=name, ref_stroke_color=ref_stroke_color, ref_stroke_opacity=ref_stroke_opacity, ref_stroke_size=ref_stroke_size, @@ -2686,6 +2748,7 @@ ui_inline <- function( #' @param width The width of the image, e.g. '100px'. #' @param visible True if the component should be visible. Defaults to True. #' @param path_popup The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. +#' @param name An optional identifying name for this component. #' @return A Image instance. #' @export ui_image <- function( @@ -2695,7 +2758,8 @@ ui_image <- function( path = NULL, width = NULL, visible = NULL, - path_popup = NULL) { + path_popup = NULL, + name = NULL) { .guard_scalar("title", "character", title) .guard_scalar("type", "character", type) .guard_scalar("image", "character", image) @@ -2703,6 +2767,7 @@ ui_image <- function( .guard_scalar("width", "character", width) .guard_scalar("visible", "logical", visible) .guard_scalar("path_popup", "character", path_popup) + .guard_scalar("name", "character", name) .o <- list(image=list( title=title, type=type, @@ -2710,7 +2775,8 @@ ui_image <- function( path=path, width=width, visible=visible, - path_popup=path_popup)) + path_popup=path_popup, + name=name)) class(.o) <- append(class(.o), c(.wave_obj, "WaveComponent")) return(.o) } @@ -2785,16 +2851,20 @@ ui_text_annotator_tag <- function( #' #' @param text Text to be highlighted. #' @param tag The `name` of the text annotator tag to refer to for the `label` and `color` of this item. +#' @param name An identifying name for this component. #' @return A TextAnnotatorItem instance. #' @export ui_text_annotator_item <- function( text, - tag = NULL) { + tag = NULL, + name = NULL) { .guard_scalar("text", "character", text) .guard_scalar("tag", "character", tag) + .guard_scalar("name", "character", name) .o <- list( text=text, - tag=tag) + tag=tag, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveTextAnnotatorItem")) return(.o) } @@ -2863,22 +2933,26 @@ ui_image_annotator_tag <- function( #' @param y1 `y` coordinate of the rectangle's corner. #' @param x2 `x` coordinate of the diagonally opposite corner. #' @param y2 `y` coordinate of the diagonally opposite corner. +#' @param name An optional name for this component. #' @return A ImageAnnotatorRect instance. #' @export ui_image_annotator_rect <- function( x1, y1, x2, - y2) { + y2, + name = NULL) { .guard_scalar("x1", "numeric", x1) .guard_scalar("y1", "numeric", y1) .guard_scalar("x2", "numeric", x2) .guard_scalar("y2", "numeric", y2) + .guard_scalar("name", "character", name) .o <- list(rect=list( x1=x1, y1=y1, x2=x2, - y2=y2)) + y2=y2, + name=name)) class(.o) <- append(class(.o), c(.wave_obj, "WaveImageAnnotatorShape")) return(.o) } @@ -2887,16 +2961,20 @@ ui_image_annotator_rect <- function( #' #' @param x `x` coordinate of the point. #' @param y `y` coordinate of the point. +#' @param name An optional name for this component. #' @return A ImageAnnotatorPoint instance. #' @export ui_image_annotator_point <- function( x, - y) { + y, + name = NULL) { .guard_scalar("x", "numeric", x) .guard_scalar("y", "numeric", y) + .guard_scalar("name", "character", name) .o <- list( x=x, - y=y) + y=y, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveImageAnnotatorPoint")) return(.o) } @@ -2904,13 +2982,17 @@ ui_image_annotator_point <- function( #' Create a polygon annotation shape. #' #' @param vertices List of polygon points. +#' @param name An optional name for this component. #' @return A ImageAnnotatorPolygon instance. #' @export ui_image_annotator_polygon <- function( - vertices) { + vertices, + name = NULL) { .guard_vector("vertices", "WaveImageAnnotatorPoint", vertices) + .guard_scalar("name", "character", name) .o <- list(polygon=list( - vertices=vertices)) + vertices=vertices, + name=name)) class(.o) <- append(class(.o), c(.wave_obj, "WaveImageAnnotatorShape")) return(.o) } @@ -2919,16 +3001,20 @@ ui_image_annotator_polygon <- function( #' #' @param shape The annotation shape. #' @param tag The `name` of the image annotator tag to refer to for the `label` and `color` of this item. +#' @param name An optional name for this component. #' @return A ImageAnnotatorItem instance. #' @export ui_image_annotator_item <- function( shape, - tag) { + tag, + name = NULL) { .guard_scalar("shape", "WaveImageAnnotatorShape", shape) .guard_scalar("tag", "character", tag) + .guard_scalar("name", "character", name) .o <- list( shape=shape, - tag=tag) + tag=tag, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveImageAnnotatorItem")) return(.o) } @@ -3008,19 +3094,23 @@ ui_audio_annotator_tag <- function( #' @param start The start of the audio annotation in seconds. #' @param end The end of the audio annotation in seconds. #' @param tag The `name` of the audio annotator tag to refer to for the `label` and `color` of this item. +#' @param name An identifying name for this component #' @return A AudioAnnotatorItem instance. #' @export ui_audio_annotator_item <- function( start, end, - tag) { + tag, + name = NULL) { .guard_scalar("start", "numeric", start) .guard_scalar("end", "numeric", end) .guard_scalar("tag", "character", tag) + .guard_scalar("name", "character", name) .o <- list( start=start, end=end, - tag=tag) + tag=tag, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveAudioAnnotatorItem")) return(.o) } @@ -3174,15 +3264,15 @@ ui_tags <- function( #' @param name An identifying name for this component. #' @param label Text to be displayed alongside the component. #' @param placeholder A string that provides a brief hint to the user as to what kind of information is expected in the field. -#' @param value The time value in hh:mm format. E.g. '10:30', '14:25', '23:59', '00:00' +#' @param value The time value in hh:mm:ss format. E.g. '10:30:45', '14:25:30', '23:59:59', '00:00:00' #' @param disabled True if this field is disabled. #' @param width The width of the time picker, e.g. '100px'. Defaults to '100%'. #' @param visible True if the component should be visible. Defaults to True. #' @param trigger True if the form should be submitted when the time is selected. #' @param required True if this is a required field. Defaults to False. #' @param hour_format Specifies 12-hour or 24-hour time format. One of `12` or `24`. Defaults to `12`. -#' @param min The minimum allowed time value in hh:mm format. E.g.: '08:00', '13:30' -#' @param max The maximum allowed time value in hh:mm format. E.g.: '15:30', '00:00' +#' @param min The minimum allowed time value in hh:mm:ss format. E.g.: '08:00:00', '13:30:00' +#' @param max The maximum allowed time value in hh:mm:ss format. E.g.: '15:30:00', '00:00:00' #' @param minutes_step Limits the available minutes to select from. One of `1`, `5`, `10`, `15`, `20`, `30` or `60`. Defaults to `1`. #' @return A TimePicker instance. #' @export @@ -3237,6 +3327,7 @@ ui_time_picker <- function( #' @param title The card’s title, displayed at the top. #' @param content Markdown text. #' @param items Collection of small buttons rendered under the title. +#' @param name An identifying name for this component #' @param commands Contextual menu commands for this component. #' @return A ArticleCard instance. #' @export @@ -3245,17 +3336,20 @@ ui_article_card <- function( title, content = NULL, items = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("content", "character", content) .guard_vector("items", "WaveComponent", items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, content=content, items=items, + name=name, commands=commands, view='article') class(.o) <- append(class(.o), c(.wave_obj, "WaveArticleCard")) @@ -3290,19 +3384,23 @@ ui_breadcrumb <- function( #' #' @param box A string indicating how to place this component on the page. #' @param items A list of `h2o_wave.types.Breadcrumb` instances to display. See `h2o_wave.ui.breadcrumb()` +#' @param name An optional name for this card. #' @param commands Contextual menu commands for this component. #' @return A BreadcrumbsCard instance. #' @export ui_breadcrumbs_card <- function( box, items, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_vector("items", "WaveBreadcrumb", items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, items=items, + name=name, commands=commands, view='breadcrumbs') class(.o) <- append(class(.o), c(.wave_obj, "WaveBreadcrumbsCard")) @@ -3544,6 +3642,7 @@ ui_flex_card <- function( #' @param box A string indicating how to place this component on the page. #' @param caption The caption. Supports markdown. * #' @param items The components displayed to the right of the caption. +#' @param name An optional identifying name to the card #' @param commands Contextual menu commands for this component. #' @return A FooterCard instance. #' @export @@ -3551,15 +3650,18 @@ ui_footer_card <- function( box, caption, items = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("caption", "character", caption) .guard_vector("items", "WaveComponent", items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, caption=caption, items=items, + name=name, commands=commands, view='footer') class(.o) <- append(class(.o), c(.wave_obj, "WaveFooterCard")) @@ -3571,6 +3673,7 @@ ui_footer_card <- function( #' @param box A string indicating how to place this component on the page. #' @param items The components in this form. #' @param title The title for this card. +#' @param name An optional name for this form. #' @param commands Contextual menu commands for this component. #' @return A FormCard instance. #' @export @@ -3578,15 +3681,18 @@ ui_form_card <- function( box, items, title = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_vector("items", "WaveComponent", items) .guard_scalar("title", "character", title) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, items=items, title=title, + name=name, commands=commands, view='form') class(.o) <- append(class(.o), c(.wave_obj, "WaveFormCard")) @@ -3602,6 +3708,7 @@ ui_form_card <- function( #' @param path The path or URL of the web page, e.g. `/foo.html` or `http://example.com/foo.html`. #' @param content The HTML content of the page. A string containing `...`. #' @param compact True if title and padding should be removed. Defaults to False. +#' @param name An optional identifying name for this component. #' @param commands Contextual menu commands for this component. #' @return A FrameCard instance. #' @export @@ -3611,12 +3718,14 @@ ui_frame_card <- function( path = NULL, content = NULL, compact = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("path", "character", path) .guard_scalar("content", "character", content) .guard_scalar("compact", "logical", compact) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3624,6 +3733,7 @@ ui_frame_card <- function( path=path, content=content, compact=compact, + name=name, commands=commands, view='frame') class(.o) <- append(class(.o), c(.wave_obj, "WaveFrameCard")) @@ -3648,6 +3758,7 @@ ui_frame_card <- function( #' e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. #' @param image_type The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. #' Required only if `image` is set. +#' @param name An optional identifying name for this Card. #' @param commands Contextual menu commands for this component. #' @return A GraphicsCard instance. #' @export @@ -3661,6 +3772,7 @@ ui_graphics_card <- function( image = NULL, image_path = NULL, image_type = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("view_box", "character", view_box) @@ -3671,6 +3783,7 @@ ui_graphics_card <- function( .guard_scalar("image", "character", image) .guard_scalar("image_path", "character", image_path) .guard_scalar("image_type", "character", image_type) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3682,6 +3795,7 @@ ui_graphics_card <- function( image=image, image_path=image_path, image_type=image_type, + name=name, commands=commands, view='graphics') class(.o) <- append(class(.o), c(.wave_obj, "WaveGraphicsCard")) @@ -3789,6 +3903,7 @@ ui_nav_group <- function( #' @param secondary_items Items that should be displayed in the center of the header. #' @param color Header background color. Defaults to 'primary'. #' One of 'card', 'transparent', 'primary'. See enum h2o_wave.ui.HeaderCardColor. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A HeaderCard instance. #' @export @@ -3803,6 +3918,7 @@ ui_header_card <- function( items = NULL, secondary_items = NULL, color = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -3814,6 +3930,7 @@ ui_header_card <- function( .guard_vector("items", "WaveComponent", items) .guard_vector("secondary_items", "WaveComponent", secondary_items) # TODO Validate color + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3826,6 +3943,7 @@ ui_header_card <- function( items=items, secondary_items=secondary_items, color=color, + name=name, commands=commands, view='header') class(.o) <- append(class(.o), c(.wave_obj, "WaveHeaderCard")) @@ -3841,6 +3959,7 @@ ui_header_card <- function( #' @param data Data for this card. #' @param path The path or URL or data URL of the image, e.g. `/foo.png` or `http://example.com/foo.png` or `data:image/png;base64,???`. #' @param path_popup The path or URL or data URL of the image displayed in the popup after clicking the image. Does not replace the `path` property. +#' @param name An optional identifying name for the image #' @param commands Contextual menu commands for this component. #' @return A ImageCard instance. #' @export @@ -3852,6 +3971,7 @@ ui_image_card <- function( data = NULL, path = NULL, path_popup = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -3860,6 +3980,7 @@ ui_image_card <- function( # TODO Validate data: Rec .guard_scalar("path", "character", path) .guard_scalar("path_popup", "character", path_popup) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3869,6 +3990,7 @@ ui_image_card <- function( data=data, path=path, path_popup=path_popup, + name=name, commands=commands, view='image') class(.o) <- append(class(.o), c(.wave_obj, "WaveImageCard")) @@ -3887,6 +4009,7 @@ ui_image_card <- function( #' @param progress The value of the progress bar, between 0 and 1. #' @param plot_color The color of the progress bar. #' @param data Data for this card. +#' @param name An optional identifying name for this group. #' @param commands Contextual menu commands for this component. #' @return A LargeBarStatCard instance. #' @export @@ -3901,6 +4024,7 @@ ui_large_bar_stat_card <- function( progress, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -3912,6 +4036,7 @@ ui_large_bar_stat_card <- function( .guard_scalar("progress", "numeric", progress) .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3924,6 +4049,7 @@ ui_large_bar_stat_card <- function( progress=progress, plot_color=plot_color, data=data, + name=name, commands=commands, view='large_bar_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveLargeBarStatCard")) @@ -3938,6 +4064,7 @@ ui_large_bar_stat_card <- function( #' @param aux_value The auxiliary value displayed next to the primary value. #' @param caption The caption displayed below the primary value. #' @param data Data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A LargeStatCard instance. #' @export @@ -3948,6 +4075,7 @@ ui_large_stat_card <- function( aux_value, caption, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -3955,6 +4083,7 @@ ui_large_stat_card <- function( .guard_scalar("aux_value", "character", aux_value) .guard_scalar("caption", "character", caption) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -3963,6 +4092,7 @@ ui_large_stat_card <- function( aux_value=aux_value, caption=caption, data=data, + name=name, commands=commands, view='large_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveLargeStatCard")) @@ -4056,6 +4186,7 @@ ui_list_item1_card <- function( #' @param content The markdown content. Supports Github Flavored Markdown (GFM): https://guides.github.com/features/mastering-markdown/ #' @param data Additional data for the card. #' @param compact Make spacing tighter. Defaults to True. +#' @param name An optional identifying name for this component. #' @param commands Contextual menu commands for this component. #' @return A MarkdownCard instance. #' @export @@ -4065,12 +4196,14 @@ ui_markdown_card <- function( content, data = NULL, compact = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("content", "character", content) # TODO Validate data: Rec .guard_scalar("compact", "logical", compact) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -4078,6 +4211,7 @@ ui_markdown_card <- function( content=content, data=data, compact=compact, + name=name, commands=commands, view='markdown') class(.o) <- append(class(.o), c(.wave_obj, "WaveMarkdownCard")) @@ -4090,6 +4224,7 @@ ui_markdown_card <- function( #' @param title The title for this card. #' @param content The HTML content. #' @param compact True if outer spacing should be removed. Defaults to False. +#' @param name An optional identifying name for this component. #' @param commands Contextual menu commands for this component. #' @return A MarkupCard instance. #' @export @@ -4098,17 +4233,20 @@ ui_markup_card <- function( title, content, compact = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("content", "character", content) .guard_scalar("compact", "logical", compact) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, content=content, compact=compact, + name=name, commands=commands, view='markup') class(.o) <- append(class(.o), c(.wave_obj, "WaveMarkupCard")) @@ -4448,16 +4586,20 @@ ui_inline_script <- function( #' #' @param content The CSS to be applied to this page. #' @param media A valid media query to set conditions for when the style should be applied. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#attr-media. +#' @param name An optional identifying name for this stylesheet. #' @return A InlineStylesheet instance. #' @export ui_inline_stylesheet <- function( content, - media = NULL) { + media = NULL, + name = NULL) { .guard_scalar("content", "character", content) .guard_scalar("media", "character", media) + .guard_scalar("name", "character", name) .o <- list( content=content, - media=media) + media=media, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveInlineStylesheet")) return(.o) } @@ -4467,19 +4609,23 @@ ui_inline_stylesheet <- function( #' @param path The URI of an external stylesheet. #' @param media A valid media query to set conditions for when the stylesheet should be loaded. More info at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media. #' @param cross_origin The CORS setting. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin +#' @param name An optional identifying name for this stylesheet. #' @return A Stylesheet instance. #' @export ui_stylesheet <- function( path, media = NULL, - cross_origin = NULL) { + cross_origin = NULL, + name = NULL) { .guard_scalar("path", "character", path) .guard_scalar("media", "character", media) .guard_scalar("cross_origin", "character", cross_origin) + .guard_scalar("name", "character", name) .o <- list( path=path, media=media, - cross_origin=cross_origin) + cross_origin=cross_origin, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WaveStylesheet")) return(.o) } @@ -4507,6 +4653,7 @@ ui_stylesheet <- function( #' @param script Javascript code to execute on this page. #' @param stylesheet CSS stylesheet to be applied to this page. #' @param stylesheets External CSS files to load into the page. +#' @param name An Optional identifying name for this page #' @param animate EXPERIMENTAL: True to turn on the card animations. Defaults to False. #' @param commands Contextual menu commands for this component. #' @return A MetaCard instance. @@ -4529,6 +4676,7 @@ ui_meta_card <- function( script = NULL, stylesheet = NULL, stylesheets = NULL, + name = NULL, animate = NULL, commands = NULL) { .guard_scalar("box", "character", box) @@ -4548,6 +4696,7 @@ ui_meta_card <- function( .guard_scalar("script", "WaveInlineScript", script) .guard_scalar("stylesheet", "WaveInlineStylesheet", stylesheet) .guard_vector("stylesheets", "WaveStylesheet", stylesheets) + .guard_scalar("name", "character", name) .guard_scalar("animate", "logical", animate) .guard_vector("commands", "WaveCommand", commands) .o <- list( @@ -4568,6 +4717,7 @@ ui_meta_card <- function( script=script, stylesheet=stylesheet, stylesheets=stylesheets, + name=name, animate=animate, commands=commands, view='meta') @@ -4589,6 +4739,7 @@ ui_meta_card <- function( #' @param secondary_items Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle. #' @param color Card background color. Defaults to 'card'. #' One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor. +#' @param name An optional name for this card. #' @param commands Contextual menu commands for this component. #' @return A NavCard instance. #' @export @@ -4604,6 +4755,7 @@ ui_nav_card <- function( persona = NULL, secondary_items = NULL, color = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_vector("items", "WaveNavGroup", items) @@ -4616,6 +4768,7 @@ ui_nav_card <- function( .guard_scalar("persona", "WaveComponent", persona) .guard_vector("secondary_items", "WaveComponent", secondary_items) # TODO Validate color + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -4629,6 +4782,7 @@ ui_nav_card <- function( persona=persona, secondary_items=secondary_items, color=color, + name=name, commands=commands, view='nav') class(.o) <- append(class(.o), c(.wave_obj, "WaveNavCard")) @@ -4643,6 +4797,7 @@ ui_nav_card <- function( #' @param box A string indicating how to place this component on the page. #' @param title The title for this card. #' @param data The data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A PixelArtCard instance. #' @export @@ -4650,15 +4805,18 @@ ui_pixel_art_card <- function( box, title, data, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, data=data, + name=name, commands=commands, view='pixel_art') class(.o) <- append(class(.o), c(.wave_obj, "WavePixelArtCard")) @@ -4673,6 +4831,7 @@ ui_pixel_art_card <- function( #' @param plot The plot to be displayed in this card. #' @param events The events to capture on this card. One of 'select_marks'. #' @param interactions The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event. +#' @param name An optional identifying name for this card #' @param animate EXPERIMENTAL: True to turn on the chart animations. Defaults to False. #' @param commands Contextual menu commands for this component. #' @return A PlotCard instance. @@ -4684,6 +4843,7 @@ ui_plot_card <- function( plot, events = NULL, interactions = NULL, + name = NULL, animate = NULL, commands = NULL) { .guard_scalar("box", "character", box) @@ -4692,6 +4852,7 @@ ui_plot_card <- function( .guard_scalar("plot", "WavePlot", plot) .guard_vector("events", "character", events) .guard_vector("interactions", "character", interactions) + .guard_scalar("name", "character", name) .guard_scalar("animate", "logical", animate) .guard_vector("commands", "WaveCommand", commands) .o <- list( @@ -4701,6 +4862,7 @@ ui_plot_card <- function( plot=plot, events=events, interactions=interactions, + name=name, animate=animate, commands=commands, view='plot') @@ -4716,6 +4878,7 @@ ui_plot_card <- function( #' @param aux_value The card's aux_value, displayed on the right hand side of the image. #' @param caption The card's caption, displayed below the image. #' @param items The card's buttons, displayed at the bottom. +#' @param name An optional name for this card. #' @param commands Contextual menu commands for this component. #' @return A PostCard instance. #' @export @@ -4726,6 +4889,7 @@ ui_post_card <- function( aux_value = NULL, caption = NULL, items = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("persona", "WaveComponent", persona) @@ -4733,6 +4897,7 @@ ui_post_card <- function( .guard_scalar("aux_value", "character", aux_value) .guard_scalar("caption", "character", caption) .guard_vector("items", "WaveComponent", items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -4741,6 +4906,7 @@ ui_post_card <- function( aux_value=aux_value, caption=caption, items=items, + name=name, commands=commands, view='post') class(.o) <- append(class(.o), c(.wave_obj, "WavePostCard")) @@ -4799,6 +4965,7 @@ ui_preview_card <- function( #' . #' @param items Components in this card displayed below the image. #' @param height The height of the bottom content (items), e.g. '400px'. Use sparingly, e.g. in grid views. +#' @param name The name of the card. #' @param commands Contextual menu commands for this component. #' @return A ProfileCard instance. #' @export @@ -4808,12 +4975,14 @@ ui_profile_card <- function( image, items = NULL, height = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("persona", "WaveComponent", persona) .guard_scalar("image", "character", image) .guard_vector("items", "WaveComponent", items) .guard_scalar("height", "character", height) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -4821,6 +4990,7 @@ ui_profile_card <- function( image=image, items=items, height=height, + name=name, commands=commands, view='profile') class(.o) <- append(class(.o), c(.wave_obj, "WaveProfileCard")) @@ -4866,6 +5036,7 @@ ui_repeat_card <- function( #' @param title The title. #' @param subtitle The subtitle, displayed below the title. Supports Markdown. #' @param items The components to display in this card +#' @param name An optional identifying name for this card #' @param commands Contextual menu commands for this component. #' @return A SectionCard instance. #' @export @@ -4874,17 +5045,20 @@ ui_section_card <- function( title, subtitle, items = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("subtitle", "character", subtitle) .guard_vector("items", "WaveComponent", items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, subtitle=subtitle, items=items, + name=name, commands=commands, view='section') class(.o) <- append(class(.o), c(.wave_obj, "WaveSectionCard")) @@ -4906,6 +5080,7 @@ ui_section_card <- function( #' One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.SmallSeriesStatCardPlotCurve. #' @param plot_color The plot's color. #' @param data Data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A SmallSeriesStatCard instance. #' @export @@ -4921,6 +5096,7 @@ ui_small_series_stat_card <- function( plot_curve = NULL, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -4933,6 +5109,7 @@ ui_small_series_stat_card <- function( # TODO Validate plot_curve .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -4946,6 +5123,7 @@ ui_small_series_stat_card <- function( plot_curve=plot_curve, plot_color=plot_color, data=data, + name=name, commands=commands, view='small_series_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveSmallSeriesStatCard")) @@ -4958,6 +5136,7 @@ ui_small_series_stat_card <- function( #' @param title The card's title. #' @param value The primary value displayed. #' @param data Data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A SmallStatCard instance. #' @export @@ -4966,17 +5145,20 @@ ui_small_stat_card <- function( title, value, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("value", "character", value) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, value=value, data=data, + name=name, commands=commands, view='small_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveSmallStatCard")) @@ -5230,6 +5412,7 @@ ui_tall_article_preview_card <- function( #' @param progress The value of the progress gauge, between 0 and 1. #' @param plot_color The color of the progress gauge. #' @param data Data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A TallGaugeStatCard instance. #' @export @@ -5241,6 +5424,7 @@ ui_tall_gauge_stat_card <- function( progress, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -5249,6 +5433,7 @@ ui_tall_gauge_stat_card <- function( .guard_scalar("progress", "numeric", progress) .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5258,6 +5443,7 @@ ui_tall_gauge_stat_card <- function( progress=progress, plot_color=plot_color, data=data, + name=name, commands=commands, view='tall_gauge_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveTallGaugeStatCard")) @@ -5331,6 +5517,7 @@ ui_tall_info_card <- function( #' One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.TallSeriesStatCardPlotCurve. #' @param plot_color The plot's color. #' @param data Data for this card. +#' @param name An optional identifying name for this card. #' @param commands Contextual menu commands for this component. #' @return A TallSeriesStatCard instance. #' @export @@ -5347,6 +5534,7 @@ ui_tall_series_stat_card <- function( plot_curve = NULL, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -5360,6 +5548,7 @@ ui_tall_series_stat_card <- function( # TODO Validate plot_curve .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5374,6 +5563,7 @@ ui_tall_series_stat_card <- function( plot_curve=plot_curve, plot_color=plot_color, data=data, + name=name, commands=commands, view='tall_series_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveTallSeriesStatCard")) @@ -5413,6 +5603,7 @@ ui_tall_stats_card <- function( #' @param title The title for this card. #' @param content The Handlebars template. https://handlebarsjs.com/guide/ #' @param data Data for the Handlebars template. +#' @param name An optional identifying name for this component. #' @param commands Contextual menu commands for this component. #' @return A TemplateCard instance. #' @export @@ -5421,17 +5612,20 @@ ui_template_card <- function( title, content, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("content", "character", content) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, content=content, data=data, + name=name, commands=commands, view='template') class(.o) <- append(class(.o), c(.wave_obj, "WaveTemplateCard")) @@ -5444,6 +5638,7 @@ ui_template_card <- function( #' @param items Items to render. #' @param secondary_items Items to render on the right side (or left, in RTL). #' @param overflow_items Items to render in an overflow menu. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A ToolbarCard instance. #' @export @@ -5452,17 +5647,20 @@ ui_toolbar_card <- function( items, secondary_items = NULL, overflow_items = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_vector("items", "WaveCommand", items) .guard_vector("secondary_items", "WaveCommand", secondary_items) .guard_vector("overflow_items", "WaveCommand", overflow_items) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, items=items, secondary_items=secondary_items, overflow_items=overflow_items, + name=name, commands=commands, view='toolbar') class(.o) <- append(class(.o), c(.wave_obj, "WaveToolbarCard")) @@ -5477,6 +5675,7 @@ ui_toolbar_card <- function( #' @param data Data for the plot, if any. #' @param grammar Vega grammar to use. Defaults to 'vega-lite'. #' One of 'vega-lite', 'vega'. See enum h2o_wave.ui.VegaCardGrammar. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A VegaCard instance. #' @export @@ -5486,12 +5685,14 @@ ui_vega_card <- function( specification, data = NULL, grammar = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("specification", "character", specification) # TODO Validate data: Rec # TODO Validate grammar + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5499,6 +5700,7 @@ ui_vega_card <- function( specification=specification, data=data, grammar=grammar, + name=name, commands=commands, view='vega') class(.o) <- append(class(.o), c(.wave_obj, "WaveVegaCard")) @@ -5561,6 +5763,7 @@ ui_wide_article_preview_card <- function( #' @param progress The value of the progress bar, between 0 and 1. #' @param plot_color The color of the progress bar. #' @param data Data for this card. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A WideBarStatCard instance. #' @export @@ -5572,6 +5775,7 @@ ui_wide_bar_stat_card <- function( progress, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -5580,6 +5784,7 @@ ui_wide_bar_stat_card <- function( .guard_scalar("progress", "numeric", progress) .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5589,6 +5794,7 @@ ui_wide_bar_stat_card <- function( progress=progress, plot_color=plot_color, data=data, + name=name, commands=commands, view='wide_bar_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveWideBarStatCard")) @@ -5604,6 +5810,7 @@ ui_wide_bar_stat_card <- function( #' @param progress The value of the progress gauge, between 0 and 1. #' @param plot_color The color of the progress gauge. #' @param data Data for this card. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A WideGaugeStatCard instance. #' @export @@ -5615,6 +5822,7 @@ ui_wide_gauge_stat_card <- function( progress, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -5623,6 +5831,7 @@ ui_wide_gauge_stat_card <- function( .guard_scalar("progress", "numeric", progress) .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5632,6 +5841,7 @@ ui_wide_gauge_stat_card <- function( progress=progress, plot_color=plot_color, data=data, + name=name, commands=commands, view='wide_gauge_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveWideGaugeStatCard")) @@ -5701,6 +5911,7 @@ ui_wide_info_card <- function( #' @param fraction A value between 0 and 1 indicating the size of the pie. #' @param color The color of the pie. #' @param aux_value The auxiliary value, displayed below the label. +#' @param name An optional name, for this component. #' @return A Pie instance. #' @export ui_pie <- function( @@ -5708,18 +5919,21 @@ ui_pie <- function( value, fraction, color, - aux_value = NULL) { + aux_value = NULL, + name = NULL) { .guard_scalar("label", "character", label) .guard_scalar("value", "character", value) .guard_scalar("fraction", "numeric", fraction) .guard_scalar("color", "character", color) .guard_scalar("aux_value", "character", aux_value) + .guard_scalar("name", "character", name) .o <- list( label=label, value=value, fraction=fraction, color=color, - aux_value=aux_value) + aux_value=aux_value, + name=name) class(.o) <- append(class(.o), c(.wave_obj, "WavePie")) return(.o) } @@ -5729,6 +5943,7 @@ ui_pie <- function( #' @param box A string indicating how to place this component on the page. #' @param title The card's title. #' @param pies The pies to be included in the pie chart. +#' @param name An optional name for this card. #' @param commands Contextual menu commands for this component. #' @return A WidePieStatCard instance. #' @export @@ -5736,15 +5951,18 @@ ui_wide_pie_stat_card <- function( box, title, pies, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_vector("pies", "WavePie", pies) + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, title=title, pies=pies, + name=name, commands=commands, view='wide_pie_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveWidePieStatCard")) @@ -5758,6 +5976,7 @@ ui_wide_pie_stat_card <- function( #' @param caption The card's caption, displayed below the title. #' @param plot The card's plot. #' @param data The card's plot data. +#' @param name An optional name for this component. #' @param commands Contextual menu commands for this component. #' @return A WidePlotCard instance. #' @export @@ -5767,12 +5986,14 @@ ui_wide_plot_card <- function( caption, plot, data, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) .guard_scalar("caption", "character", caption) .guard_scalar("plot", "WavePlot", plot) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5780,6 +6001,7 @@ ui_wide_plot_card <- function( caption=caption, plot=plot, data=data, + name=name, commands=commands, view='wide_plot') class(.o) <- append(class(.o), c(.wave_obj, "WaveWidePlotCard")) @@ -5802,6 +6024,7 @@ ui_wide_plot_card <- function( #' One of 'linear', 'smooth', 'step', 'step-after', 'step-before'. See enum h2o_wave.ui.WideSeriesStatCardPlotCurve. #' @param plot_color The plot's color. #' @param data Data for this card. +#' @param name An optional name for this card. #' @param commands Contextual menu commands for this component. #' @return A WideSeriesStatCard instance. #' @export @@ -5818,6 +6041,7 @@ ui_wide_series_stat_card <- function( plot_curve = NULL, plot_color = NULL, data = NULL, + name = NULL, commands = NULL) { .guard_scalar("box", "character", box) .guard_scalar("title", "character", title) @@ -5831,6 +6055,7 @@ ui_wide_series_stat_card <- function( # TODO Validate plot_curve .guard_scalar("plot_color", "character", plot_color) # TODO Validate data: Rec + .guard_scalar("name", "character", name) .guard_vector("commands", "WaveCommand", commands) .o <- list( box=box, @@ -5845,6 +6070,7 @@ ui_wide_series_stat_card <- function( plot_curve=plot_curve, plot_color=plot_color, data=data, + name=name, commands=commands, view='wide_series_stat') class(.o) <- append(class(.o), c(.wave_obj, "WaveWideSeriesStatCard")) diff --git a/tools/intellij-plugin/src/main/resources/templates/wave-components.xml b/tools/intellij-plugin/src/main/resources/templates/wave-components.xml index 67a5ba7b55..ede7c24d3e 100644 --- a/tools/intellij-plugin/src/main/resources/templates/wave-components.xml +++ b/tools/intellij-plugin/src/main/resources/templates/wave-components.xml @@ -1006,10 +1006,11 @@