h2o-wave 0.26.3__py3-none-any.whl → 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of h2o-wave might be problematic. Click here for more details.
- h2o_wave/__init__.py +2 -2
- h2o_wave/cli.py +69 -49
- h2o_wave/core.py +35 -34
- h2o_wave/metadata.py +4 -3
- h2o_wave/routing.py +79 -11
- h2o_wave/server.py +7 -38
- h2o_wave/share.py +13 -4
- h2o_wave/types.py +222 -23
- h2o_wave/ui.py +86 -13
- h2o_wave/version.py +1 -1
- {h2o_wave-0.26.3.dist-info → h2o_wave-1.0.1.dist-info}/METADATA +33 -32
- h2o_wave-1.0.1.dist-info/RECORD +22 -0
- {h2o_wave-0.26.3.dist-info → h2o_wave-1.0.1.dist-info}/WHEEL +1 -2
- {h2o_wave-0.26.3.dist-info → h2o_wave-1.0.1.dist-info}/entry_points.txt +0 -1
- h2o_wave-0.26.3.data/data/project_templates/README.md +0 -41
- h2o_wave-0.26.3.data/data/project_templates/header.py +0 -85
- h2o_wave-0.26.3.data/data/project_templates/header_nav.py +0 -218
- h2o_wave-0.26.3.data/data/project_templates/header_sidebar_nav.py +0 -232
- h2o_wave-0.26.3.data/data/project_templates/hello_world.py +0 -69
- h2o_wave-0.26.3.data/data/project_templates/sidebar_nav.py +0 -227
- h2o_wave-0.26.3.dist-info/RECORD +0 -29
- h2o_wave-0.26.3.dist-info/top_level.txt +0 -1
- {h2o_wave-0.26.3.dist-info → h2o_wave-1.0.1.dist-info/licenses}/LICENSE +0 -0
h2o_wave/types.py
CHANGED
|
@@ -160,7 +160,6 @@ class Command:
|
|
|
160
160
|
icon: Optional[str] = None,
|
|
161
161
|
items: Optional[List['Command']] = None,
|
|
162
162
|
value: Optional[str] = None,
|
|
163
|
-
data: Optional[str] = None,
|
|
164
163
|
):
|
|
165
164
|
_guard_scalar('Command.name', name, (str,), True, False, False)
|
|
166
165
|
_guard_scalar('Command.label', label, (str,), False, True, False)
|
|
@@ -168,7 +167,6 @@ class Command:
|
|
|
168
167
|
_guard_scalar('Command.icon', icon, (str,), False, True, False)
|
|
169
168
|
_guard_vector('Command.items', items, (Command,), False, True, False)
|
|
170
169
|
_guard_scalar('Command.value', value, (str,), False, True, False)
|
|
171
|
-
_guard_scalar('Command.data', data, (str,), False, True, False)
|
|
172
170
|
self.name = name
|
|
173
171
|
"""An identifying name for this component. If the name is prefixed with a '#', the command sets the location hash to the name when executed."""
|
|
174
172
|
self.label = label
|
|
@@ -181,8 +179,6 @@ class Command:
|
|
|
181
179
|
"""Sub-commands, if any"""
|
|
182
180
|
self.value = value
|
|
183
181
|
"""Data associated with this command, if any."""
|
|
184
|
-
self.data = data
|
|
185
|
-
"""DEPRECATED. Use `value` instead. Data associated with this command, if any."""
|
|
186
182
|
|
|
187
183
|
def dump(self) -> Dict:
|
|
188
184
|
"""Returns the contents of this object as a dict."""
|
|
@@ -192,7 +188,6 @@ class Command:
|
|
|
192
188
|
_guard_scalar('Command.icon', self.icon, (str,), False, True, False)
|
|
193
189
|
_guard_vector('Command.items', self.items, (Command,), False, True, False)
|
|
194
190
|
_guard_scalar('Command.value', self.value, (str,), False, True, False)
|
|
195
|
-
_guard_scalar('Command.data', self.data, (str,), False, True, False)
|
|
196
191
|
return _dump(
|
|
197
192
|
name=self.name,
|
|
198
193
|
label=self.label,
|
|
@@ -200,7 +195,6 @@ class Command:
|
|
|
200
195
|
icon=self.icon,
|
|
201
196
|
items=None if self.items is None else [__e.dump() for __e in self.items],
|
|
202
197
|
value=self.value,
|
|
203
|
-
data=self.data,
|
|
204
198
|
)
|
|
205
199
|
|
|
206
200
|
@staticmethod
|
|
@@ -218,15 +212,12 @@ class Command:
|
|
|
218
212
|
_guard_vector('Command.items', __d_items, (dict,), False, True, False)
|
|
219
213
|
__d_value: Any = __d.get('value')
|
|
220
214
|
_guard_scalar('Command.value', __d_value, (str,), False, True, False)
|
|
221
|
-
__d_data: Any = __d.get('data')
|
|
222
|
-
_guard_scalar('Command.data', __d_data, (str,), False, True, False)
|
|
223
215
|
name: str = __d_name
|
|
224
216
|
label: Optional[str] = __d_label
|
|
225
217
|
caption: Optional[str] = __d_caption
|
|
226
218
|
icon: Optional[str] = __d_icon
|
|
227
219
|
items: Optional[List['Command']] = None if __d_items is None else [Command.load(__e) for __e in __d_items]
|
|
228
220
|
value: Optional[str] = __d_value
|
|
229
|
-
data: Optional[str] = __d_data
|
|
230
221
|
return Command(
|
|
231
222
|
name,
|
|
232
223
|
label,
|
|
@@ -234,7 +225,6 @@ class Command:
|
|
|
234
225
|
icon,
|
|
235
226
|
items,
|
|
236
227
|
value,
|
|
237
|
-
data,
|
|
238
228
|
)
|
|
239
229
|
|
|
240
230
|
|
|
@@ -3274,7 +3264,7 @@ class MarkdownTableCellType:
|
|
|
3274
3264
|
self.name = name
|
|
3275
3265
|
"""An identifying name for this component."""
|
|
3276
3266
|
self.target = target
|
|
3277
|
-
"""Where to display the link.
|
|
3267
|
+
"""Where to display the link. An empty string or `'_blank'` opens the link in a new tab. `_self` opens in the current tab."""
|
|
3278
3268
|
|
|
3279
3269
|
def dump(self) -> Dict:
|
|
3280
3270
|
"""Returns the contents of this object as a dict."""
|
|
@@ -3944,7 +3934,7 @@ class Link:
|
|
|
3944
3934
|
self.visible = visible
|
|
3945
3935
|
"""True if the component should be visible. Defaults to True."""
|
|
3946
3936
|
self.target = target
|
|
3947
|
-
"""Where to display the link.
|
|
3937
|
+
"""Where to display the link. An empty string or `'_blank'` opens the link in a new tab. `_self` opens in the current tab."""
|
|
3948
3938
|
self.tooltip = tooltip
|
|
3949
3939
|
"""An optional tooltip message displayed when a user clicks the help icon to the right of the component."""
|
|
3950
3940
|
self.name = name
|
|
@@ -5636,6 +5626,7 @@ class Visualization:
|
|
|
5636
5626
|
visible: Optional[bool] = None,
|
|
5637
5627
|
events: Optional[List[str]] = None,
|
|
5638
5628
|
interactions: Optional[List[str]] = None,
|
|
5629
|
+
animate: Optional[bool] = None,
|
|
5639
5630
|
):
|
|
5640
5631
|
_guard_scalar('Visualization.plot', plot, (Plot,), False, False, False)
|
|
5641
5632
|
_guard_scalar('Visualization.width', width, (str,), False, True, False)
|
|
@@ -5644,6 +5635,7 @@ class Visualization:
|
|
|
5644
5635
|
_guard_scalar('Visualization.visible', visible, (bool,), False, True, False)
|
|
5645
5636
|
_guard_vector('Visualization.events', events, (str,), False, True, False)
|
|
5646
5637
|
_guard_vector('Visualization.interactions', interactions, (str,), False, True, False)
|
|
5638
|
+
_guard_scalar('Visualization.animate', animate, (bool,), False, True, False)
|
|
5647
5639
|
self.plot = plot
|
|
5648
5640
|
"""The plot to be rendered in this visualization."""
|
|
5649
5641
|
self.data = data
|
|
@@ -5660,6 +5652,8 @@ class Visualization:
|
|
|
5660
5652
|
"""The events to capture on this visualization. One of 'select_marks'."""
|
|
5661
5653
|
self.interactions = interactions
|
|
5662
5654
|
"""The interactions to be allowed for this plot. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event."""
|
|
5655
|
+
self.animate = animate
|
|
5656
|
+
"""EXPERIMENTAL: True to turn on the chart animations. Defaults to False."""
|
|
5663
5657
|
|
|
5664
5658
|
def dump(self) -> Dict:
|
|
5665
5659
|
"""Returns the contents of this object as a dict."""
|
|
@@ -5670,6 +5664,7 @@ class Visualization:
|
|
|
5670
5664
|
_guard_scalar('Visualization.visible', self.visible, (bool,), False, True, False)
|
|
5671
5665
|
_guard_vector('Visualization.events', self.events, (str,), False, True, False)
|
|
5672
5666
|
_guard_vector('Visualization.interactions', self.interactions, (str,), False, True, False)
|
|
5667
|
+
_guard_scalar('Visualization.animate', self.animate, (bool,), False, True, False)
|
|
5673
5668
|
return _dump(
|
|
5674
5669
|
plot=self.plot.dump(),
|
|
5675
5670
|
data=self.data,
|
|
@@ -5679,6 +5674,7 @@ class Visualization:
|
|
|
5679
5674
|
visible=self.visible,
|
|
5680
5675
|
events=self.events,
|
|
5681
5676
|
interactions=self.interactions,
|
|
5677
|
+
animate=self.animate,
|
|
5682
5678
|
)
|
|
5683
5679
|
|
|
5684
5680
|
@staticmethod
|
|
@@ -5699,6 +5695,8 @@ class Visualization:
|
|
|
5699
5695
|
_guard_vector('Visualization.events', __d_events, (str,), False, True, False)
|
|
5700
5696
|
__d_interactions: Any = __d.get('interactions')
|
|
5701
5697
|
_guard_vector('Visualization.interactions', __d_interactions, (str,), False, True, False)
|
|
5698
|
+
__d_animate: Any = __d.get('animate')
|
|
5699
|
+
_guard_scalar('Visualization.animate', __d_animate, (bool,), False, True, False)
|
|
5702
5700
|
plot: Plot = Plot.load(__d_plot)
|
|
5703
5701
|
data: PackedRecord = __d_data
|
|
5704
5702
|
width: Optional[str] = __d_width
|
|
@@ -5707,6 +5705,7 @@ class Visualization:
|
|
|
5707
5705
|
visible: Optional[bool] = __d_visible
|
|
5708
5706
|
events: Optional[List[str]] = __d_events
|
|
5709
5707
|
interactions: Optional[List[str]] = __d_interactions
|
|
5708
|
+
animate: Optional[bool] = __d_animate
|
|
5710
5709
|
return Visualization(
|
|
5711
5710
|
plot,
|
|
5712
5711
|
data,
|
|
@@ -5716,6 +5715,7 @@ class Visualization:
|
|
|
5716
5715
|
visible,
|
|
5717
5716
|
events,
|
|
5718
5717
|
interactions,
|
|
5718
|
+
animate,
|
|
5719
5719
|
)
|
|
5720
5720
|
|
|
5721
5721
|
|
|
@@ -6736,7 +6736,7 @@ class ImageAnnotator:
|
|
|
6736
6736
|
self.allowed_shapes = allowed_shapes
|
|
6737
6737
|
"""List of allowed shapes. Available values are 'rect' and 'polygon'. If not set, all shapes are available by default."""
|
|
6738
6738
|
self.events = events
|
|
6739
|
-
"""The events to capture on this image annotator. One of `click`
|
|
6739
|
+
"""The events to capture on this image annotator. One of `click` | `tool_change`."""
|
|
6740
6740
|
|
|
6741
6741
|
def dump(self) -> Dict:
|
|
6742
6742
|
"""Returns the contents of this object as a dict."""
|
|
@@ -6804,6 +6804,185 @@ class ImageAnnotator:
|
|
|
6804
6804
|
)
|
|
6805
6805
|
|
|
6806
6806
|
|
|
6807
|
+
class AudioAnnotatorTag:
|
|
6808
|
+
"""Create a unique tag type for use in an audio annotator.
|
|
6809
|
+
"""
|
|
6810
|
+
def __init__(
|
|
6811
|
+
self,
|
|
6812
|
+
name: str,
|
|
6813
|
+
label: str,
|
|
6814
|
+
color: str,
|
|
6815
|
+
):
|
|
6816
|
+
_guard_scalar('AudioAnnotatorTag.name', name, (str,), True, False, False)
|
|
6817
|
+
_guard_scalar('AudioAnnotatorTag.label', label, (str,), False, False, False)
|
|
6818
|
+
_guard_scalar('AudioAnnotatorTag.color', color, (str,), False, False, False)
|
|
6819
|
+
self.name = name
|
|
6820
|
+
"""An identifying name for this tag."""
|
|
6821
|
+
self.label = label
|
|
6822
|
+
"""Text to be displayed for the annotation."""
|
|
6823
|
+
self.color = color
|
|
6824
|
+
"""Hex or RGB color string to be used as the background color."""
|
|
6825
|
+
|
|
6826
|
+
def dump(self) -> Dict:
|
|
6827
|
+
"""Returns the contents of this object as a dict."""
|
|
6828
|
+
_guard_scalar('AudioAnnotatorTag.name', self.name, (str,), True, False, False)
|
|
6829
|
+
_guard_scalar('AudioAnnotatorTag.label', self.label, (str,), False, False, False)
|
|
6830
|
+
_guard_scalar('AudioAnnotatorTag.color', self.color, (str,), False, False, False)
|
|
6831
|
+
return _dump(
|
|
6832
|
+
name=self.name,
|
|
6833
|
+
label=self.label,
|
|
6834
|
+
color=self.color,
|
|
6835
|
+
)
|
|
6836
|
+
|
|
6837
|
+
@staticmethod
|
|
6838
|
+
def load(__d: Dict) -> 'AudioAnnotatorTag':
|
|
6839
|
+
"""Creates an instance of this class using the contents of a dict."""
|
|
6840
|
+
__d_name: Any = __d.get('name')
|
|
6841
|
+
_guard_scalar('AudioAnnotatorTag.name', __d_name, (str,), True, False, False)
|
|
6842
|
+
__d_label: Any = __d.get('label')
|
|
6843
|
+
_guard_scalar('AudioAnnotatorTag.label', __d_label, (str,), False, False, False)
|
|
6844
|
+
__d_color: Any = __d.get('color')
|
|
6845
|
+
_guard_scalar('AudioAnnotatorTag.color', __d_color, (str,), False, False, False)
|
|
6846
|
+
name: str = __d_name
|
|
6847
|
+
label: str = __d_label
|
|
6848
|
+
color: str = __d_color
|
|
6849
|
+
return AudioAnnotatorTag(
|
|
6850
|
+
name,
|
|
6851
|
+
label,
|
|
6852
|
+
color,
|
|
6853
|
+
)
|
|
6854
|
+
|
|
6855
|
+
|
|
6856
|
+
class AudioAnnotatorItem:
|
|
6857
|
+
"""Create an annotator item with initial selected tags or no tags.
|
|
6858
|
+
"""
|
|
6859
|
+
def __init__(
|
|
6860
|
+
self,
|
|
6861
|
+
start: float,
|
|
6862
|
+
end: float,
|
|
6863
|
+
tag: str,
|
|
6864
|
+
):
|
|
6865
|
+
_guard_scalar('AudioAnnotatorItem.start', start, (float, int,), False, False, False)
|
|
6866
|
+
_guard_scalar('AudioAnnotatorItem.end', end, (float, int,), False, False, False)
|
|
6867
|
+
_guard_scalar('AudioAnnotatorItem.tag', tag, (str,), False, False, False)
|
|
6868
|
+
self.start = start
|
|
6869
|
+
"""The start of the audio annotation in seconds."""
|
|
6870
|
+
self.end = end
|
|
6871
|
+
"""The end of the audio annotation in seconds."""
|
|
6872
|
+
self.tag = tag
|
|
6873
|
+
"""The `name` of the audio annotator tag to refer to for the `label` and `color` of this item."""
|
|
6874
|
+
|
|
6875
|
+
def dump(self) -> Dict:
|
|
6876
|
+
"""Returns the contents of this object as a dict."""
|
|
6877
|
+
_guard_scalar('AudioAnnotatorItem.start', self.start, (float, int,), False, False, False)
|
|
6878
|
+
_guard_scalar('AudioAnnotatorItem.end', self.end, (float, int,), False, False, False)
|
|
6879
|
+
_guard_scalar('AudioAnnotatorItem.tag', self.tag, (str,), False, False, False)
|
|
6880
|
+
return _dump(
|
|
6881
|
+
start=self.start,
|
|
6882
|
+
end=self.end,
|
|
6883
|
+
tag=self.tag,
|
|
6884
|
+
)
|
|
6885
|
+
|
|
6886
|
+
@staticmethod
|
|
6887
|
+
def load(__d: Dict) -> 'AudioAnnotatorItem':
|
|
6888
|
+
"""Creates an instance of this class using the contents of a dict."""
|
|
6889
|
+
__d_start: Any = __d.get('start')
|
|
6890
|
+
_guard_scalar('AudioAnnotatorItem.start', __d_start, (float, int,), False, False, False)
|
|
6891
|
+
__d_end: Any = __d.get('end')
|
|
6892
|
+
_guard_scalar('AudioAnnotatorItem.end', __d_end, (float, int,), False, False, False)
|
|
6893
|
+
__d_tag: Any = __d.get('tag')
|
|
6894
|
+
_guard_scalar('AudioAnnotatorItem.tag', __d_tag, (str,), False, False, False)
|
|
6895
|
+
start: float = __d_start
|
|
6896
|
+
end: float = __d_end
|
|
6897
|
+
tag: str = __d_tag
|
|
6898
|
+
return AudioAnnotatorItem(
|
|
6899
|
+
start,
|
|
6900
|
+
end,
|
|
6901
|
+
tag,
|
|
6902
|
+
)
|
|
6903
|
+
|
|
6904
|
+
|
|
6905
|
+
class AudioAnnotator:
|
|
6906
|
+
"""Create an audio annotator component.
|
|
6907
|
+
|
|
6908
|
+
This component allows annotating and labeling parts of audio file.
|
|
6909
|
+
"""
|
|
6910
|
+
def __init__(
|
|
6911
|
+
self,
|
|
6912
|
+
name: str,
|
|
6913
|
+
title: str,
|
|
6914
|
+
path: str,
|
|
6915
|
+
tags: List[AudioAnnotatorTag],
|
|
6916
|
+
items: Optional[List[AudioAnnotatorItem]] = None,
|
|
6917
|
+
trigger: Optional[bool] = None,
|
|
6918
|
+
):
|
|
6919
|
+
_guard_scalar('AudioAnnotator.name', name, (str,), True, False, False)
|
|
6920
|
+
_guard_scalar('AudioAnnotator.title', title, (str,), False, False, False)
|
|
6921
|
+
_guard_scalar('AudioAnnotator.path', path, (str,), False, False, False)
|
|
6922
|
+
_guard_vector('AudioAnnotator.tags', tags, (AudioAnnotatorTag,), False, False, False)
|
|
6923
|
+
_guard_vector('AudioAnnotator.items', items, (AudioAnnotatorItem,), False, True, False)
|
|
6924
|
+
_guard_scalar('AudioAnnotator.trigger', trigger, (bool,), False, True, False)
|
|
6925
|
+
self.name = name
|
|
6926
|
+
"""An identifying name for this component."""
|
|
6927
|
+
self.title = title
|
|
6928
|
+
"""The audio annotator's title."""
|
|
6929
|
+
self.path = path
|
|
6930
|
+
"""The path to the audio file. Use mp3 or wav formats to achieve the best cross-browser support. See https://caniuse.com/?search=audio%20format for other formats."""
|
|
6931
|
+
self.tags = tags
|
|
6932
|
+
"""The master list of tags that can be used for annotations."""
|
|
6933
|
+
self.items = items
|
|
6934
|
+
"""Annotations to display on the image, if any."""
|
|
6935
|
+
self.trigger = trigger
|
|
6936
|
+
"""True if the form should be submitted as soon as an annotation is made."""
|
|
6937
|
+
|
|
6938
|
+
def dump(self) -> Dict:
|
|
6939
|
+
"""Returns the contents of this object as a dict."""
|
|
6940
|
+
_guard_scalar('AudioAnnotator.name', self.name, (str,), True, False, False)
|
|
6941
|
+
_guard_scalar('AudioAnnotator.title', self.title, (str,), False, False, False)
|
|
6942
|
+
_guard_scalar('AudioAnnotator.path', self.path, (str,), False, False, False)
|
|
6943
|
+
_guard_vector('AudioAnnotator.tags', self.tags, (AudioAnnotatorTag,), False, False, False)
|
|
6944
|
+
_guard_vector('AudioAnnotator.items', self.items, (AudioAnnotatorItem,), False, True, False)
|
|
6945
|
+
_guard_scalar('AudioAnnotator.trigger', self.trigger, (bool,), False, True, False)
|
|
6946
|
+
return _dump(
|
|
6947
|
+
name=self.name,
|
|
6948
|
+
title=self.title,
|
|
6949
|
+
path=self.path,
|
|
6950
|
+
tags=[__e.dump() for __e in self.tags],
|
|
6951
|
+
items=None if self.items is None else [__e.dump() for __e in self.items],
|
|
6952
|
+
trigger=self.trigger,
|
|
6953
|
+
)
|
|
6954
|
+
|
|
6955
|
+
@staticmethod
|
|
6956
|
+
def load(__d: Dict) -> 'AudioAnnotator':
|
|
6957
|
+
"""Creates an instance of this class using the contents of a dict."""
|
|
6958
|
+
__d_name: Any = __d.get('name')
|
|
6959
|
+
_guard_scalar('AudioAnnotator.name', __d_name, (str,), True, False, False)
|
|
6960
|
+
__d_title: Any = __d.get('title')
|
|
6961
|
+
_guard_scalar('AudioAnnotator.title', __d_title, (str,), False, False, False)
|
|
6962
|
+
__d_path: Any = __d.get('path')
|
|
6963
|
+
_guard_scalar('AudioAnnotator.path', __d_path, (str,), False, False, False)
|
|
6964
|
+
__d_tags: Any = __d.get('tags')
|
|
6965
|
+
_guard_vector('AudioAnnotator.tags', __d_tags, (dict,), False, False, False)
|
|
6966
|
+
__d_items: Any = __d.get('items')
|
|
6967
|
+
_guard_vector('AudioAnnotator.items', __d_items, (dict,), False, True, False)
|
|
6968
|
+
__d_trigger: Any = __d.get('trigger')
|
|
6969
|
+
_guard_scalar('AudioAnnotator.trigger', __d_trigger, (bool,), False, True, False)
|
|
6970
|
+
name: str = __d_name
|
|
6971
|
+
title: str = __d_title
|
|
6972
|
+
path: str = __d_path
|
|
6973
|
+
tags: List[AudioAnnotatorTag] = [AudioAnnotatorTag.load(__e) for __e in __d_tags]
|
|
6974
|
+
items: Optional[List[AudioAnnotatorItem]] = None if __d_items is None else [AudioAnnotatorItem.load(__e) for __e in __d_items]
|
|
6975
|
+
trigger: Optional[bool] = __d_trigger
|
|
6976
|
+
return AudioAnnotator(
|
|
6977
|
+
name,
|
|
6978
|
+
title,
|
|
6979
|
+
path,
|
|
6980
|
+
tags,
|
|
6981
|
+
items,
|
|
6982
|
+
trigger,
|
|
6983
|
+
)
|
|
6984
|
+
|
|
6985
|
+
|
|
6807
6986
|
class Facepile:
|
|
6808
6987
|
"""A face pile displays a list of personas. Each circle represents a person and contains their image or initials.
|
|
6809
6988
|
Often this control is used when sharing who has access to a specific view or file.
|
|
@@ -7233,6 +7412,7 @@ class Component:
|
|
|
7233
7412
|
persona: Optional[Persona] = None,
|
|
7234
7413
|
text_annotator: Optional[TextAnnotator] = None,
|
|
7235
7414
|
image_annotator: Optional[ImageAnnotator] = None,
|
|
7415
|
+
audio_annotator: Optional[AudioAnnotator] = None,
|
|
7236
7416
|
facepile: Optional[Facepile] = None,
|
|
7237
7417
|
copyable_text: Optional[CopyableText] = None,
|
|
7238
7418
|
menu: Optional[Menu] = None,
|
|
@@ -7284,6 +7464,7 @@ class Component:
|
|
|
7284
7464
|
_guard_scalar('Component.persona', persona, (Persona,), False, True, False)
|
|
7285
7465
|
_guard_scalar('Component.text_annotator', text_annotator, (TextAnnotator,), False, True, False)
|
|
7286
7466
|
_guard_scalar('Component.image_annotator', image_annotator, (ImageAnnotator,), False, True, False)
|
|
7467
|
+
_guard_scalar('Component.audio_annotator', audio_annotator, (AudioAnnotator,), False, True, False)
|
|
7287
7468
|
_guard_scalar('Component.facepile', facepile, (Facepile,), False, True, False)
|
|
7288
7469
|
_guard_scalar('Component.copyable_text', copyable_text, (CopyableText,), False, True, False)
|
|
7289
7470
|
_guard_scalar('Component.menu', menu, (Menu,), False, True, False)
|
|
@@ -7379,6 +7560,8 @@ class Component:
|
|
|
7379
7560
|
"""Text annotator."""
|
|
7380
7561
|
self.image_annotator = image_annotator
|
|
7381
7562
|
"""Image annotator."""
|
|
7563
|
+
self.audio_annotator = audio_annotator
|
|
7564
|
+
"""Audio annotator."""
|
|
7382
7565
|
self.facepile = facepile
|
|
7383
7566
|
"""Facepile."""
|
|
7384
7567
|
self.copyable_text = copyable_text
|
|
@@ -7437,6 +7620,7 @@ class Component:
|
|
|
7437
7620
|
_guard_scalar('Component.persona', self.persona, (Persona,), False, True, False)
|
|
7438
7621
|
_guard_scalar('Component.text_annotator', self.text_annotator, (TextAnnotator,), False, True, False)
|
|
7439
7622
|
_guard_scalar('Component.image_annotator', self.image_annotator, (ImageAnnotator,), False, True, False)
|
|
7623
|
+
_guard_scalar('Component.audio_annotator', self.audio_annotator, (AudioAnnotator,), False, True, False)
|
|
7440
7624
|
_guard_scalar('Component.facepile', self.facepile, (Facepile,), False, True, False)
|
|
7441
7625
|
_guard_scalar('Component.copyable_text', self.copyable_text, (CopyableText,), False, True, False)
|
|
7442
7626
|
_guard_scalar('Component.menu', self.menu, (Menu,), False, True, False)
|
|
@@ -7488,6 +7672,7 @@ class Component:
|
|
|
7488
7672
|
persona=None if self.persona is None else self.persona.dump(),
|
|
7489
7673
|
text_annotator=None if self.text_annotator is None else self.text_annotator.dump(),
|
|
7490
7674
|
image_annotator=None if self.image_annotator is None else self.image_annotator.dump(),
|
|
7675
|
+
audio_annotator=None if self.audio_annotator is None else self.audio_annotator.dump(),
|
|
7491
7676
|
facepile=None if self.facepile is None else self.facepile.dump(),
|
|
7492
7677
|
copyable_text=None if self.copyable_text is None else self.copyable_text.dump(),
|
|
7493
7678
|
menu=None if self.menu is None else self.menu.dump(),
|
|
@@ -7588,6 +7773,8 @@ class Component:
|
|
|
7588
7773
|
_guard_scalar('Component.text_annotator', __d_text_annotator, (dict,), False, True, False)
|
|
7589
7774
|
__d_image_annotator: Any = __d.get('image_annotator')
|
|
7590
7775
|
_guard_scalar('Component.image_annotator', __d_image_annotator, (dict,), False, True, False)
|
|
7776
|
+
__d_audio_annotator: Any = __d.get('audio_annotator')
|
|
7777
|
+
_guard_scalar('Component.audio_annotator', __d_audio_annotator, (dict,), False, True, False)
|
|
7591
7778
|
__d_facepile: Any = __d.get('facepile')
|
|
7592
7779
|
_guard_scalar('Component.facepile', __d_facepile, (dict,), False, True, False)
|
|
7593
7780
|
__d_copyable_text: Any = __d.get('copyable_text')
|
|
@@ -7643,6 +7830,7 @@ class Component:
|
|
|
7643
7830
|
persona: Optional[Persona] = None if __d_persona is None else Persona.load(__d_persona)
|
|
7644
7831
|
text_annotator: Optional[TextAnnotator] = None if __d_text_annotator is None else TextAnnotator.load(__d_text_annotator)
|
|
7645
7832
|
image_annotator: Optional[ImageAnnotator] = None if __d_image_annotator is None else ImageAnnotator.load(__d_image_annotator)
|
|
7833
|
+
audio_annotator: Optional[AudioAnnotator] = None if __d_audio_annotator is None else AudioAnnotator.load(__d_audio_annotator)
|
|
7646
7834
|
facepile: Optional[Facepile] = None if __d_facepile is None else Facepile.load(__d_facepile)
|
|
7647
7835
|
copyable_text: Optional[CopyableText] = None if __d_copyable_text is None else CopyableText.load(__d_copyable_text)
|
|
7648
7836
|
menu: Optional[Menu] = None if __d_menu is None else Menu.load(__d_menu)
|
|
@@ -7694,6 +7882,7 @@ class Component:
|
|
|
7694
7882
|
persona,
|
|
7695
7883
|
text_annotator,
|
|
7696
7884
|
image_annotator,
|
|
7885
|
+
audio_annotator,
|
|
7697
7886
|
facepile,
|
|
7698
7887
|
copyable_text,
|
|
7699
7888
|
menu,
|
|
@@ -10441,6 +10630,7 @@ class MetaCard:
|
|
|
10441
10630
|
script: Optional[InlineScript] = None,
|
|
10442
10631
|
stylesheet: Optional[InlineStylesheet] = None,
|
|
10443
10632
|
stylesheets: Optional[List[Stylesheet]] = None,
|
|
10633
|
+
animate: Optional[bool] = None,
|
|
10444
10634
|
commands: Optional[List[Command]] = None,
|
|
10445
10635
|
):
|
|
10446
10636
|
_guard_scalar('MetaCard.box', box, (str,), False, False, False)
|
|
@@ -10460,6 +10650,7 @@ class MetaCard:
|
|
|
10460
10650
|
_guard_scalar('MetaCard.script', script, (InlineScript,), False, True, False)
|
|
10461
10651
|
_guard_scalar('MetaCard.stylesheet', stylesheet, (InlineStylesheet,), False, True, False)
|
|
10462
10652
|
_guard_vector('MetaCard.stylesheets', stylesheets, (Stylesheet,), False, True, False)
|
|
10653
|
+
_guard_scalar('MetaCard.animate', animate, (bool,), False, True, False)
|
|
10463
10654
|
_guard_vector('MetaCard.commands', commands, (Command,), False, True, False)
|
|
10464
10655
|
self.box = box
|
|
10465
10656
|
"""A string indicating how to place this component on the page."""
|
|
@@ -10495,6 +10686,8 @@ class MetaCard:
|
|
|
10495
10686
|
"""CSS stylesheet to be applied to this page."""
|
|
10496
10687
|
self.stylesheets = stylesheets
|
|
10497
10688
|
"""External CSS files to load into the page."""
|
|
10689
|
+
self.animate = animate
|
|
10690
|
+
"""EXPERIMENTAL: True to turn on the card animations. Defaults to False."""
|
|
10498
10691
|
self.commands = commands
|
|
10499
10692
|
"""Contextual menu commands for this component."""
|
|
10500
10693
|
|
|
@@ -10517,6 +10710,7 @@ class MetaCard:
|
|
|
10517
10710
|
_guard_scalar('MetaCard.script', self.script, (InlineScript,), False, True, False)
|
|
10518
10711
|
_guard_scalar('MetaCard.stylesheet', self.stylesheet, (InlineStylesheet,), False, True, False)
|
|
10519
10712
|
_guard_vector('MetaCard.stylesheets', self.stylesheets, (Stylesheet,), False, True, False)
|
|
10713
|
+
_guard_scalar('MetaCard.animate', self.animate, (bool,), False, True, False)
|
|
10520
10714
|
_guard_vector('MetaCard.commands', self.commands, (Command,), False, True, False)
|
|
10521
10715
|
return _dump(
|
|
10522
10716
|
view='meta',
|
|
@@ -10537,6 +10731,7 @@ class MetaCard:
|
|
|
10537
10731
|
script=None if self.script is None else self.script.dump(),
|
|
10538
10732
|
stylesheet=None if self.stylesheet is None else self.stylesheet.dump(),
|
|
10539
10733
|
stylesheets=None if self.stylesheets is None else [__e.dump() for __e in self.stylesheets],
|
|
10734
|
+
animate=self.animate,
|
|
10540
10735
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
10541
10736
|
)
|
|
10542
10737
|
|
|
@@ -10577,6 +10772,8 @@ class MetaCard:
|
|
|
10577
10772
|
_guard_scalar('MetaCard.stylesheet', __d_stylesheet, (dict,), False, True, False)
|
|
10578
10773
|
__d_stylesheets: Any = __d.get('stylesheets')
|
|
10579
10774
|
_guard_vector('MetaCard.stylesheets', __d_stylesheets, (dict,), False, True, False)
|
|
10775
|
+
__d_animate: Any = __d.get('animate')
|
|
10776
|
+
_guard_scalar('MetaCard.animate', __d_animate, (bool,), False, True, False)
|
|
10580
10777
|
__d_commands: Any = __d.get('commands')
|
|
10581
10778
|
_guard_vector('MetaCard.commands', __d_commands, (dict,), False, True, False)
|
|
10582
10779
|
box: str = __d_box
|
|
@@ -10596,6 +10793,7 @@ class MetaCard:
|
|
|
10596
10793
|
script: Optional[InlineScript] = None if __d_script is None else InlineScript.load(__d_script)
|
|
10597
10794
|
stylesheet: Optional[InlineStylesheet] = None if __d_stylesheet is None else InlineStylesheet.load(__d_stylesheet)
|
|
10598
10795
|
stylesheets: Optional[List[Stylesheet]] = None if __d_stylesheets is None else [Stylesheet.load(__e) for __e in __d_stylesheets]
|
|
10796
|
+
animate: Optional[bool] = __d_animate
|
|
10599
10797
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
10600
10798
|
return MetaCard(
|
|
10601
10799
|
box,
|
|
@@ -10615,6 +10813,7 @@ class MetaCard:
|
|
|
10615
10813
|
script,
|
|
10616
10814
|
stylesheet,
|
|
10617
10815
|
stylesheets,
|
|
10816
|
+
animate,
|
|
10618
10817
|
commands,
|
|
10619
10818
|
)
|
|
10620
10819
|
|
|
@@ -10838,6 +11037,7 @@ class PlotCard:
|
|
|
10838
11037
|
plot: Plot,
|
|
10839
11038
|
events: Optional[List[str]] = None,
|
|
10840
11039
|
interactions: Optional[List[str]] = None,
|
|
11040
|
+
animate: Optional[bool] = None,
|
|
10841
11041
|
commands: Optional[List[Command]] = None,
|
|
10842
11042
|
):
|
|
10843
11043
|
_guard_scalar('PlotCard.box', box, (str,), False, False, False)
|
|
@@ -10845,6 +11045,7 @@ class PlotCard:
|
|
|
10845
11045
|
_guard_scalar('PlotCard.plot', plot, (Plot,), False, False, False)
|
|
10846
11046
|
_guard_vector('PlotCard.events', events, (str,), False, True, False)
|
|
10847
11047
|
_guard_vector('PlotCard.interactions', interactions, (str,), False, True, False)
|
|
11048
|
+
_guard_scalar('PlotCard.animate', animate, (bool,), False, True, False)
|
|
10848
11049
|
_guard_vector('PlotCard.commands', commands, (Command,), False, True, False)
|
|
10849
11050
|
self.box = box
|
|
10850
11051
|
"""A string indicating how to place this component on the page."""
|
|
@@ -10858,6 +11059,8 @@ class PlotCard:
|
|
|
10858
11059
|
"""The events to capture on this card. One of 'select_marks'."""
|
|
10859
11060
|
self.interactions = interactions
|
|
10860
11061
|
"""The interactions to be allowed for this card. One of 'drag_move' | 'scale_zoom' | 'brush'. Note: `brush` does not raise `select_marks` event."""
|
|
11062
|
+
self.animate = animate
|
|
11063
|
+
"""EXPERIMENTAL: True to turn on the chart animations. Defaults to False."""
|
|
10861
11064
|
self.commands = commands
|
|
10862
11065
|
"""Contextual menu commands for this component."""
|
|
10863
11066
|
|
|
@@ -10868,6 +11071,7 @@ class PlotCard:
|
|
|
10868
11071
|
_guard_scalar('PlotCard.plot', self.plot, (Plot,), False, False, False)
|
|
10869
11072
|
_guard_vector('PlotCard.events', self.events, (str,), False, True, False)
|
|
10870
11073
|
_guard_vector('PlotCard.interactions', self.interactions, (str,), False, True, False)
|
|
11074
|
+
_guard_scalar('PlotCard.animate', self.animate, (bool,), False, True, False)
|
|
10871
11075
|
_guard_vector('PlotCard.commands', self.commands, (Command,), False, True, False)
|
|
10872
11076
|
return _dump(
|
|
10873
11077
|
view='plot',
|
|
@@ -10877,6 +11081,7 @@ class PlotCard:
|
|
|
10877
11081
|
plot=self.plot.dump(),
|
|
10878
11082
|
events=self.events,
|
|
10879
11083
|
interactions=self.interactions,
|
|
11084
|
+
animate=self.animate,
|
|
10880
11085
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
10881
11086
|
)
|
|
10882
11087
|
|
|
@@ -10894,6 +11099,8 @@ class PlotCard:
|
|
|
10894
11099
|
_guard_vector('PlotCard.events', __d_events, (str,), False, True, False)
|
|
10895
11100
|
__d_interactions: Any = __d.get('interactions')
|
|
10896
11101
|
_guard_vector('PlotCard.interactions', __d_interactions, (str,), False, True, False)
|
|
11102
|
+
__d_animate: Any = __d.get('animate')
|
|
11103
|
+
_guard_scalar('PlotCard.animate', __d_animate, (bool,), False, True, False)
|
|
10897
11104
|
__d_commands: Any = __d.get('commands')
|
|
10898
11105
|
_guard_vector('PlotCard.commands', __d_commands, (dict,), False, True, False)
|
|
10899
11106
|
box: str = __d_box
|
|
@@ -10902,6 +11109,7 @@ class PlotCard:
|
|
|
10902
11109
|
plot: Plot = Plot.load(__d_plot)
|
|
10903
11110
|
events: Optional[List[str]] = __d_events
|
|
10904
11111
|
interactions: Optional[List[str]] = __d_interactions
|
|
11112
|
+
animate: Optional[bool] = __d_animate
|
|
10905
11113
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
10906
11114
|
return PlotCard(
|
|
10907
11115
|
box,
|
|
@@ -10910,6 +11118,7 @@ class PlotCard:
|
|
|
10910
11118
|
plot,
|
|
10911
11119
|
events,
|
|
10912
11120
|
interactions,
|
|
11121
|
+
animate,
|
|
10913
11122
|
commands,
|
|
10914
11123
|
)
|
|
10915
11124
|
|
|
@@ -12751,7 +12960,6 @@ class WideArticlePreviewCard:
|
|
|
12751
12960
|
title: str,
|
|
12752
12961
|
name: Optional[str] = None,
|
|
12753
12962
|
aux_value: Optional[str] = None,
|
|
12754
|
-
caption: Optional[str] = None,
|
|
12755
12963
|
items: Optional[List[Component]] = None,
|
|
12756
12964
|
content: Optional[str] = None,
|
|
12757
12965
|
commands: Optional[List[Command]] = None,
|
|
@@ -12762,7 +12970,6 @@ class WideArticlePreviewCard:
|
|
|
12762
12970
|
_guard_scalar('WideArticlePreviewCard.title', title, (str,), False, False, False)
|
|
12763
12971
|
_guard_scalar('WideArticlePreviewCard.name', name, (str,), False, True, False)
|
|
12764
12972
|
_guard_scalar('WideArticlePreviewCard.aux_value', aux_value, (str,), False, True, False)
|
|
12765
|
-
_guard_scalar('WideArticlePreviewCard.caption', caption, (str,), False, True, False)
|
|
12766
12973
|
_guard_vector('WideArticlePreviewCard.items', items, (Component,), False, True, False)
|
|
12767
12974
|
_guard_scalar('WideArticlePreviewCard.content', content, (str,), False, True, False)
|
|
12768
12975
|
_guard_vector('WideArticlePreviewCard.commands', commands, (Command,), False, True, False)
|
|
@@ -12778,8 +12985,6 @@ class WideArticlePreviewCard:
|
|
|
12778
12985
|
"""An identifying name for this card. Makes the card clickable, similar to a button."""
|
|
12779
12986
|
self.aux_value = aux_value
|
|
12780
12987
|
"""The card's auxiliary text, displayed on the right-hand side of the header."""
|
|
12781
|
-
self.caption = caption
|
|
12782
|
-
"""DEPRECATED. Use `content` instead. The card's caption, displayed below the title on the right-hand side."""
|
|
12783
12988
|
self.items = items
|
|
12784
12989
|
"""The card's buttons, displayed under the caption."""
|
|
12785
12990
|
self.content = content
|
|
@@ -12795,7 +13000,6 @@ class WideArticlePreviewCard:
|
|
|
12795
13000
|
_guard_scalar('WideArticlePreviewCard.title', self.title, (str,), False, False, False)
|
|
12796
13001
|
_guard_scalar('WideArticlePreviewCard.name', self.name, (str,), False, True, False)
|
|
12797
13002
|
_guard_scalar('WideArticlePreviewCard.aux_value', self.aux_value, (str,), False, True, False)
|
|
12798
|
-
_guard_scalar('WideArticlePreviewCard.caption', self.caption, (str,), False, True, False)
|
|
12799
13003
|
_guard_vector('WideArticlePreviewCard.items', self.items, (Component,), False, True, False)
|
|
12800
13004
|
_guard_scalar('WideArticlePreviewCard.content', self.content, (str,), False, True, False)
|
|
12801
13005
|
_guard_vector('WideArticlePreviewCard.commands', self.commands, (Command,), False, True, False)
|
|
@@ -12807,7 +13011,6 @@ class WideArticlePreviewCard:
|
|
|
12807
13011
|
title=self.title,
|
|
12808
13012
|
name=self.name,
|
|
12809
13013
|
aux_value=self.aux_value,
|
|
12810
|
-
caption=self.caption,
|
|
12811
13014
|
items=None if self.items is None else [__e.dump() for __e in self.items],
|
|
12812
13015
|
content=self.content,
|
|
12813
13016
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
@@ -12828,8 +13031,6 @@ class WideArticlePreviewCard:
|
|
|
12828
13031
|
_guard_scalar('WideArticlePreviewCard.name', __d_name, (str,), False, True, False)
|
|
12829
13032
|
__d_aux_value: Any = __d.get('aux_value')
|
|
12830
13033
|
_guard_scalar('WideArticlePreviewCard.aux_value', __d_aux_value, (str,), False, True, False)
|
|
12831
|
-
__d_caption: Any = __d.get('caption')
|
|
12832
|
-
_guard_scalar('WideArticlePreviewCard.caption', __d_caption, (str,), False, True, False)
|
|
12833
13034
|
__d_items: Any = __d.get('items')
|
|
12834
13035
|
_guard_vector('WideArticlePreviewCard.items', __d_items, (dict,), False, True, False)
|
|
12835
13036
|
__d_content: Any = __d.get('content')
|
|
@@ -12842,7 +13043,6 @@ class WideArticlePreviewCard:
|
|
|
12842
13043
|
title: str = __d_title
|
|
12843
13044
|
name: Optional[str] = __d_name
|
|
12844
13045
|
aux_value: Optional[str] = __d_aux_value
|
|
12845
|
-
caption: Optional[str] = __d_caption
|
|
12846
13046
|
items: Optional[List[Component]] = None if __d_items is None else [Component.load(__e) for __e in __d_items]
|
|
12847
13047
|
content: Optional[str] = __d_content
|
|
12848
13048
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
@@ -12853,7 +13053,6 @@ class WideArticlePreviewCard:
|
|
|
12853
13053
|
title,
|
|
12854
13054
|
name,
|
|
12855
13055
|
aux_value,
|
|
12856
|
-
caption,
|
|
12857
13056
|
items,
|
|
12858
13057
|
content,
|
|
12859
13058
|
commands,
|