h2o-wave 1.1.1__py3-none-any.whl → 1.5.5__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/cli.py +2 -0
- h2o_wave/core.py +24 -0
- h2o_wave/server.py +24 -2
- h2o_wave/types.py +171 -1
- h2o_wave/ui.py +34 -1
- h2o_wave/version.py +1 -1
- {h2o_wave-1.1.1.dist-info → h2o_wave-1.5.5.dist-info}/METADATA +2 -2
- {h2o_wave-1.1.1.dist-info → h2o_wave-1.5.5.dist-info}/RECORD +11 -11
- {h2o_wave-1.1.1.dist-info → h2o_wave-1.5.5.dist-info}/WHEEL +1 -1
- {h2o_wave-1.1.1.dist-info → h2o_wave-1.5.5.dist-info}/entry_points.txt +0 -0
- {h2o_wave-1.1.1.dist-info → h2o_wave-1.5.5.dist-info}/licenses/LICENSE +0 -0
h2o_wave/cli.py
CHANGED
|
@@ -178,6 +178,8 @@ def run(app: str, no_reload: bool, no_autostart: bool):
|
|
|
178
178
|
|
|
179
179
|
if not os.environ.get('H2O_WAVE_WAVED_DIR') and is_auto_started:
|
|
180
180
|
os.environ['H2O_WAVE_WAVED_DIR'] = sys.exec_prefix
|
|
181
|
+
if not no_reload:
|
|
182
|
+
os.environ['__H2O_WAVE_DEV_MODE'] = '1'
|
|
181
183
|
reload_exclude = os.environ.get('H2O_WAVE_RELOAD_EXCLUDE', None)
|
|
182
184
|
if reload_exclude:
|
|
183
185
|
reload_exclude = reload_exclude.split(os.pathsep)
|
h2o_wave/core.py
CHANGED
|
@@ -43,6 +43,12 @@ BROADCAST = 'broadcast'
|
|
|
43
43
|
|
|
44
44
|
def _get_env(key: str, value: Any):
|
|
45
45
|
return os.environ.get(f'H2O_WAVE_{key}', value)
|
|
46
|
+
def _get_timeout(val: str) -> Optional[int]:
|
|
47
|
+
try:
|
|
48
|
+
num = int(val)
|
|
49
|
+
return num if num >= 0 else None
|
|
50
|
+
except ValueError:
|
|
51
|
+
raise ValueError(f'Timeout must be numeric, got {val}')
|
|
46
52
|
|
|
47
53
|
|
|
48
54
|
_base_url = _get_env('BASE_URL', '/')
|
|
@@ -60,6 +66,10 @@ class _Config:
|
|
|
60
66
|
self.hub_access_key_secret: str = _get_env('ACCESS_KEY_SECRET', 'access_key_secret')
|
|
61
67
|
self.app_access_key_id: str = _get_env('APP_ACCESS_KEY_ID', None) or secrets.token_urlsafe(16)
|
|
62
68
|
self.app_access_key_secret: str = _get_env('APP_ACCESS_KEY_SECRET', None) or secrets.token_urlsafe(16)
|
|
69
|
+
self.app_connect_timeout: Optional[int] = _get_timeout(_get_env('APP_CONNECT_TIMEOUT', '5'))
|
|
70
|
+
self.app_read_timeout: Optional[int] = _get_timeout(_get_env('APP_READ_TIMEOUT', '5'))
|
|
71
|
+
self.app_write_timeout: Optional[int] = _get_timeout(_get_env('APP_WRITE_TIMEOUT', '5'))
|
|
72
|
+
self.app_pool_timeout: Optional[int] = _get_timeout(_get_env('APP_POOL_TIMEOUT', '5'))
|
|
63
73
|
|
|
64
74
|
|
|
65
75
|
_config = _Config()
|
|
@@ -640,9 +650,16 @@ class Site:
|
|
|
640
650
|
"""
|
|
641
651
|
|
|
642
652
|
def __init__(self):
|
|
653
|
+
timeout = httpx.Timeout(
|
|
654
|
+
connect=_config.app_connect_timeout,
|
|
655
|
+
read=_config.app_read_timeout,
|
|
656
|
+
write=_config.app_write_timeout,
|
|
657
|
+
pool=_config.app_pool_timeout,
|
|
658
|
+
)
|
|
643
659
|
self._http = httpx.Client(
|
|
644
660
|
auth=(_config.hub_access_key_id, _config.hub_access_key_secret),
|
|
645
661
|
verify=False,
|
|
662
|
+
timeout=timeout,
|
|
646
663
|
)
|
|
647
664
|
self.cache = _ServerCache(self._http)
|
|
648
665
|
|
|
@@ -870,9 +887,16 @@ class AsyncSite:
|
|
|
870
887
|
"""
|
|
871
888
|
|
|
872
889
|
def __init__(self):
|
|
890
|
+
timeout = httpx.Timeout(
|
|
891
|
+
connect=_config.app_connect_timeout,
|
|
892
|
+
read=_config.app_read_timeout,
|
|
893
|
+
write=_config.app_write_timeout,
|
|
894
|
+
pool=_config.app_pool_timeout,
|
|
895
|
+
)
|
|
873
896
|
self._http = httpx.AsyncClient(
|
|
874
897
|
auth=(_config.hub_access_key_id, _config.hub_access_key_secret),
|
|
875
898
|
verify=False,
|
|
899
|
+
timeout=timeout,
|
|
876
900
|
)
|
|
877
901
|
self.cache = _AsyncServerCache(self._http)
|
|
878
902
|
|
h2o_wave/server.py
CHANGED
|
@@ -77,7 +77,13 @@ class Auth:
|
|
|
77
77
|
if not self.refresh_token:
|
|
78
78
|
return
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
timeout = httpx.Timeout(
|
|
81
|
+
connect=_config.app_connect_timeout,
|
|
82
|
+
read=_config.app_read_timeout,
|
|
83
|
+
write=_config.app_write_timeout,
|
|
84
|
+
pool=_config.app_pool_timeout,
|
|
85
|
+
)
|
|
86
|
+
async with httpx.AsyncClient(auth=(_config.hub_access_key_id, _config.hub_access_key_secret), verify=False, timeout=timeout) as http:
|
|
81
87
|
res = await http.get(_config.hub_address + '_auth/refresh', headers={'Wave-Session-ID': self._session_id})
|
|
82
88
|
return self.__extract_tokens(res.headers)
|
|
83
89
|
|
|
@@ -89,7 +95,13 @@ class Auth:
|
|
|
89
95
|
if not self.refresh_token:
|
|
90
96
|
return
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
timeout = httpx.Timeout(
|
|
99
|
+
connect=_config.app_connect_timeout,
|
|
100
|
+
read=_config.app_read_timeout,
|
|
101
|
+
write=_config.app_write_timeout,
|
|
102
|
+
pool=_config.app_pool_timeout,
|
|
103
|
+
)
|
|
104
|
+
with httpx.Client(auth=(_config.hub_access_key_id, _config.hub_access_key_secret), verify=False, timeout=timeout) as http:
|
|
93
105
|
res = http.get(_config.hub_address + '_auth/refresh', headers={'Wave-Session-ID': self._session_id})
|
|
94
106
|
return self.__extract_tokens(res.headers)
|
|
95
107
|
|
|
@@ -215,9 +227,16 @@ WebAppState = Tuple[Expando, Dict[str, Expando], Dict[str, Expando]]
|
|
|
215
227
|
|
|
216
228
|
class _Wave:
|
|
217
229
|
def __init__(self):
|
|
230
|
+
timeout = httpx.Timeout(
|
|
231
|
+
connect=_config.app_connect_timeout,
|
|
232
|
+
read=_config.app_read_timeout,
|
|
233
|
+
write=_config.app_write_timeout,
|
|
234
|
+
pool=_config.app_pool_timeout,
|
|
235
|
+
)
|
|
218
236
|
self._http = httpx.AsyncClient(
|
|
219
237
|
auth=(_config.hub_access_key_id, _config.hub_access_key_secret),
|
|
220
238
|
verify=False,
|
|
239
|
+
timeout=timeout,
|
|
221
240
|
)
|
|
222
241
|
|
|
223
242
|
async def call(self, method: str, **kwargs):
|
|
@@ -378,6 +397,9 @@ class _App:
|
|
|
378
397
|
|
|
379
398
|
|
|
380
399
|
def _is_req_authorized(req: Request) -> bool:
|
|
400
|
+
if os.environ.get('__H2O_WAVE_DEV_MODE') == '1':
|
|
401
|
+
return True
|
|
402
|
+
|
|
381
403
|
basic_auth = req.headers.get("Authorization")
|
|
382
404
|
if basic_auth is None:
|
|
383
405
|
return False
|
h2o_wave/types.py
CHANGED
|
@@ -68,6 +68,16 @@ class TextSize:
|
|
|
68
68
|
XS = 'xs'
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
_TextAlign = ['start', 'end', 'center', 'justify']
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class TextAlign:
|
|
75
|
+
START = 'start'
|
|
76
|
+
END = 'end'
|
|
77
|
+
CENTER = 'center'
|
|
78
|
+
JUSTIFY = 'justify'
|
|
79
|
+
|
|
80
|
+
|
|
71
81
|
class Text:
|
|
72
82
|
"""Create text content.
|
|
73
83
|
"""
|
|
@@ -77,6 +87,7 @@ class Text:
|
|
|
77
87
|
size: Optional[str] = None,
|
|
78
88
|
width: Optional[str] = None,
|
|
79
89
|
visible: Optional[bool] = None,
|
|
90
|
+
align: Optional[str] = None,
|
|
80
91
|
tooltip: Optional[str] = None,
|
|
81
92
|
name: Optional[str] = None,
|
|
82
93
|
):
|
|
@@ -84,6 +95,7 @@ class Text:
|
|
|
84
95
|
_guard_enum('Text.size', size, _TextSize, True)
|
|
85
96
|
_guard_scalar('Text.width', width, (str,), False, True, False)
|
|
86
97
|
_guard_scalar('Text.visible', visible, (bool,), False, True, False)
|
|
98
|
+
_guard_enum('Text.align', align, _TextAlign, True)
|
|
87
99
|
_guard_scalar('Text.tooltip', tooltip, (str,), False, True, False)
|
|
88
100
|
_guard_scalar('Text.name', name, (str,), False, True, False)
|
|
89
101
|
self.content = content
|
|
@@ -94,6 +106,8 @@ class Text:
|
|
|
94
106
|
"""The width of the text , e.g. '100px'."""
|
|
95
107
|
self.visible = visible
|
|
96
108
|
"""True if the component should be visible. Defaults to True."""
|
|
109
|
+
self.align = align
|
|
110
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextAlign."""
|
|
97
111
|
self.tooltip = tooltip
|
|
98
112
|
"""Tooltip message."""
|
|
99
113
|
self.name = name
|
|
@@ -105,6 +119,7 @@ class Text:
|
|
|
105
119
|
_guard_enum('Text.size', self.size, _TextSize, True)
|
|
106
120
|
_guard_scalar('Text.width', self.width, (str,), False, True, False)
|
|
107
121
|
_guard_scalar('Text.visible', self.visible, (bool,), False, True, False)
|
|
122
|
+
_guard_enum('Text.align', self.align, _TextAlign, True)
|
|
108
123
|
_guard_scalar('Text.tooltip', self.tooltip, (str,), False, True, False)
|
|
109
124
|
_guard_scalar('Text.name', self.name, (str,), False, True, False)
|
|
110
125
|
return _dump(
|
|
@@ -112,6 +127,7 @@ class Text:
|
|
|
112
127
|
size=self.size,
|
|
113
128
|
width=self.width,
|
|
114
129
|
visible=self.visible,
|
|
130
|
+
align=self.align,
|
|
115
131
|
tooltip=self.tooltip,
|
|
116
132
|
name=self.name,
|
|
117
133
|
)
|
|
@@ -127,6 +143,8 @@ class Text:
|
|
|
127
143
|
_guard_scalar('Text.width', __d_width, (str,), False, True, False)
|
|
128
144
|
__d_visible: Any = __d.get('visible')
|
|
129
145
|
_guard_scalar('Text.visible', __d_visible, (bool,), False, True, False)
|
|
146
|
+
__d_align: Any = __d.get('align')
|
|
147
|
+
_guard_enum('Text.align', __d_align, _TextAlign, True)
|
|
130
148
|
__d_tooltip: Any = __d.get('tooltip')
|
|
131
149
|
_guard_scalar('Text.tooltip', __d_tooltip, (str,), False, True, False)
|
|
132
150
|
__d_name: Any = __d.get('name')
|
|
@@ -135,6 +153,7 @@ class Text:
|
|
|
135
153
|
size: Optional[str] = __d_size
|
|
136
154
|
width: Optional[str] = __d_width
|
|
137
155
|
visible: Optional[bool] = __d_visible
|
|
156
|
+
align: Optional[str] = __d_align
|
|
138
157
|
tooltip: Optional[str] = __d_tooltip
|
|
139
158
|
name: Optional[str] = __d_name
|
|
140
159
|
return Text(
|
|
@@ -142,6 +161,7 @@ class Text:
|
|
|
142
161
|
size,
|
|
143
162
|
width,
|
|
144
163
|
visible,
|
|
164
|
+
align,
|
|
145
165
|
tooltip,
|
|
146
166
|
name,
|
|
147
167
|
)
|
|
@@ -248,6 +268,16 @@ class Command:
|
|
|
248
268
|
)
|
|
249
269
|
|
|
250
270
|
|
|
271
|
+
_TextXlAlign = ['start', 'end', 'center', 'justify']
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
class TextXlAlign:
|
|
275
|
+
START = 'start'
|
|
276
|
+
END = 'end'
|
|
277
|
+
CENTER = 'center'
|
|
278
|
+
JUSTIFY = 'justify'
|
|
279
|
+
|
|
280
|
+
|
|
251
281
|
class TextXl:
|
|
252
282
|
"""Create extra-large sized text content.
|
|
253
283
|
"""
|
|
@@ -256,6 +286,7 @@ class TextXl:
|
|
|
256
286
|
content: str,
|
|
257
287
|
width: Optional[str] = None,
|
|
258
288
|
visible: Optional[bool] = None,
|
|
289
|
+
align: Optional[str] = None,
|
|
259
290
|
tooltip: Optional[str] = None,
|
|
260
291
|
commands: Optional[List[Command]] = None,
|
|
261
292
|
name: Optional[str] = None,
|
|
@@ -263,6 +294,7 @@ class TextXl:
|
|
|
263
294
|
_guard_scalar('TextXl.content', content, (str,), False, False, False)
|
|
264
295
|
_guard_scalar('TextXl.width', width, (str,), False, True, False)
|
|
265
296
|
_guard_scalar('TextXl.visible', visible, (bool,), False, True, False)
|
|
297
|
+
_guard_enum('TextXl.align', align, _TextXlAlign, True)
|
|
266
298
|
_guard_scalar('TextXl.tooltip', tooltip, (str,), False, True, False)
|
|
267
299
|
_guard_vector('TextXl.commands', commands, (Command,), False, True, False)
|
|
268
300
|
_guard_scalar('TextXl.name', name, (str,), False, True, False)
|
|
@@ -272,6 +304,8 @@ class TextXl:
|
|
|
272
304
|
"""The width of the text , e.g. '100px'."""
|
|
273
305
|
self.visible = visible
|
|
274
306
|
"""True if the component should be visible. Defaults to True."""
|
|
307
|
+
self.align = align
|
|
308
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextXlAlign."""
|
|
275
309
|
self.tooltip = tooltip
|
|
276
310
|
"""Tooltip message."""
|
|
277
311
|
self.commands = commands
|
|
@@ -284,6 +318,7 @@ class TextXl:
|
|
|
284
318
|
_guard_scalar('TextXl.content', self.content, (str,), False, False, False)
|
|
285
319
|
_guard_scalar('TextXl.width', self.width, (str,), False, True, False)
|
|
286
320
|
_guard_scalar('TextXl.visible', self.visible, (bool,), False, True, False)
|
|
321
|
+
_guard_enum('TextXl.align', self.align, _TextXlAlign, True)
|
|
287
322
|
_guard_scalar('TextXl.tooltip', self.tooltip, (str,), False, True, False)
|
|
288
323
|
_guard_vector('TextXl.commands', self.commands, (Command,), False, True, False)
|
|
289
324
|
_guard_scalar('TextXl.name', self.name, (str,), False, True, False)
|
|
@@ -291,6 +326,7 @@ class TextXl:
|
|
|
291
326
|
content=self.content,
|
|
292
327
|
width=self.width,
|
|
293
328
|
visible=self.visible,
|
|
329
|
+
align=self.align,
|
|
294
330
|
tooltip=self.tooltip,
|
|
295
331
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
296
332
|
name=self.name,
|
|
@@ -305,6 +341,8 @@ class TextXl:
|
|
|
305
341
|
_guard_scalar('TextXl.width', __d_width, (str,), False, True, False)
|
|
306
342
|
__d_visible: Any = __d.get('visible')
|
|
307
343
|
_guard_scalar('TextXl.visible', __d_visible, (bool,), False, True, False)
|
|
344
|
+
__d_align: Any = __d.get('align')
|
|
345
|
+
_guard_enum('TextXl.align', __d_align, _TextXlAlign, True)
|
|
308
346
|
__d_tooltip: Any = __d.get('tooltip')
|
|
309
347
|
_guard_scalar('TextXl.tooltip', __d_tooltip, (str,), False, True, False)
|
|
310
348
|
__d_commands: Any = __d.get('commands')
|
|
@@ -314,6 +352,7 @@ class TextXl:
|
|
|
314
352
|
content: str = __d_content
|
|
315
353
|
width: Optional[str] = __d_width
|
|
316
354
|
visible: Optional[bool] = __d_visible
|
|
355
|
+
align: Optional[str] = __d_align
|
|
317
356
|
tooltip: Optional[str] = __d_tooltip
|
|
318
357
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
319
358
|
name: Optional[str] = __d_name
|
|
@@ -321,12 +360,23 @@ class TextXl:
|
|
|
321
360
|
content,
|
|
322
361
|
width,
|
|
323
362
|
visible,
|
|
363
|
+
align,
|
|
324
364
|
tooltip,
|
|
325
365
|
commands,
|
|
326
366
|
name,
|
|
327
367
|
)
|
|
328
368
|
|
|
329
369
|
|
|
370
|
+
_TextLAlign = ['start', 'end', 'center', 'justify']
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
class TextLAlign:
|
|
374
|
+
START = 'start'
|
|
375
|
+
END = 'end'
|
|
376
|
+
CENTER = 'center'
|
|
377
|
+
JUSTIFY = 'justify'
|
|
378
|
+
|
|
379
|
+
|
|
330
380
|
class TextL:
|
|
331
381
|
"""Create large sized text content.
|
|
332
382
|
"""
|
|
@@ -335,6 +385,7 @@ class TextL:
|
|
|
335
385
|
content: str,
|
|
336
386
|
width: Optional[str] = None,
|
|
337
387
|
visible: Optional[bool] = None,
|
|
388
|
+
align: Optional[str] = None,
|
|
338
389
|
tooltip: Optional[str] = None,
|
|
339
390
|
commands: Optional[List[Command]] = None,
|
|
340
391
|
name: Optional[str] = None,
|
|
@@ -342,6 +393,7 @@ class TextL:
|
|
|
342
393
|
_guard_scalar('TextL.content', content, (str,), False, False, False)
|
|
343
394
|
_guard_scalar('TextL.width', width, (str,), False, True, False)
|
|
344
395
|
_guard_scalar('TextL.visible', visible, (bool,), False, True, False)
|
|
396
|
+
_guard_enum('TextL.align', align, _TextLAlign, True)
|
|
345
397
|
_guard_scalar('TextL.tooltip', tooltip, (str,), False, True, False)
|
|
346
398
|
_guard_vector('TextL.commands', commands, (Command,), False, True, False)
|
|
347
399
|
_guard_scalar('TextL.name', name, (str,), False, True, False)
|
|
@@ -351,6 +403,8 @@ class TextL:
|
|
|
351
403
|
"""The width of the text , e.g. '100px'."""
|
|
352
404
|
self.visible = visible
|
|
353
405
|
"""True if the component should be visible. Defaults to True."""
|
|
406
|
+
self.align = align
|
|
407
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextLAlign."""
|
|
354
408
|
self.tooltip = tooltip
|
|
355
409
|
"""Tooltip message."""
|
|
356
410
|
self.commands = commands
|
|
@@ -363,6 +417,7 @@ class TextL:
|
|
|
363
417
|
_guard_scalar('TextL.content', self.content, (str,), False, False, False)
|
|
364
418
|
_guard_scalar('TextL.width', self.width, (str,), False, True, False)
|
|
365
419
|
_guard_scalar('TextL.visible', self.visible, (bool,), False, True, False)
|
|
420
|
+
_guard_enum('TextL.align', self.align, _TextLAlign, True)
|
|
366
421
|
_guard_scalar('TextL.tooltip', self.tooltip, (str,), False, True, False)
|
|
367
422
|
_guard_vector('TextL.commands', self.commands, (Command,), False, True, False)
|
|
368
423
|
_guard_scalar('TextL.name', self.name, (str,), False, True, False)
|
|
@@ -370,6 +425,7 @@ class TextL:
|
|
|
370
425
|
content=self.content,
|
|
371
426
|
width=self.width,
|
|
372
427
|
visible=self.visible,
|
|
428
|
+
align=self.align,
|
|
373
429
|
tooltip=self.tooltip,
|
|
374
430
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
375
431
|
name=self.name,
|
|
@@ -384,6 +440,8 @@ class TextL:
|
|
|
384
440
|
_guard_scalar('TextL.width', __d_width, (str,), False, True, False)
|
|
385
441
|
__d_visible: Any = __d.get('visible')
|
|
386
442
|
_guard_scalar('TextL.visible', __d_visible, (bool,), False, True, False)
|
|
443
|
+
__d_align: Any = __d.get('align')
|
|
444
|
+
_guard_enum('TextL.align', __d_align, _TextLAlign, True)
|
|
387
445
|
__d_tooltip: Any = __d.get('tooltip')
|
|
388
446
|
_guard_scalar('TextL.tooltip', __d_tooltip, (str,), False, True, False)
|
|
389
447
|
__d_commands: Any = __d.get('commands')
|
|
@@ -393,6 +451,7 @@ class TextL:
|
|
|
393
451
|
content: str = __d_content
|
|
394
452
|
width: Optional[str] = __d_width
|
|
395
453
|
visible: Optional[bool] = __d_visible
|
|
454
|
+
align: Optional[str] = __d_align
|
|
396
455
|
tooltip: Optional[str] = __d_tooltip
|
|
397
456
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
398
457
|
name: Optional[str] = __d_name
|
|
@@ -400,12 +459,23 @@ class TextL:
|
|
|
400
459
|
content,
|
|
401
460
|
width,
|
|
402
461
|
visible,
|
|
462
|
+
align,
|
|
403
463
|
tooltip,
|
|
404
464
|
commands,
|
|
405
465
|
name,
|
|
406
466
|
)
|
|
407
467
|
|
|
408
468
|
|
|
469
|
+
_TextMAlign = ['start', 'end', 'center', 'justify']
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class TextMAlign:
|
|
473
|
+
START = 'start'
|
|
474
|
+
END = 'end'
|
|
475
|
+
CENTER = 'center'
|
|
476
|
+
JUSTIFY = 'justify'
|
|
477
|
+
|
|
478
|
+
|
|
409
479
|
class TextM:
|
|
410
480
|
"""Create medium sized text content.
|
|
411
481
|
"""
|
|
@@ -414,12 +484,14 @@ class TextM:
|
|
|
414
484
|
content: str,
|
|
415
485
|
width: Optional[str] = None,
|
|
416
486
|
visible: Optional[bool] = None,
|
|
487
|
+
align: Optional[str] = None,
|
|
417
488
|
tooltip: Optional[str] = None,
|
|
418
489
|
name: Optional[str] = None,
|
|
419
490
|
):
|
|
420
491
|
_guard_scalar('TextM.content', content, (str,), False, False, False)
|
|
421
492
|
_guard_scalar('TextM.width', width, (str,), False, True, False)
|
|
422
493
|
_guard_scalar('TextM.visible', visible, (bool,), False, True, False)
|
|
494
|
+
_guard_enum('TextM.align', align, _TextMAlign, True)
|
|
423
495
|
_guard_scalar('TextM.tooltip', tooltip, (str,), False, True, False)
|
|
424
496
|
_guard_scalar('TextM.name', name, (str,), False, True, False)
|
|
425
497
|
self.content = content
|
|
@@ -428,6 +500,8 @@ class TextM:
|
|
|
428
500
|
"""The width of the text , e.g. '100px'."""
|
|
429
501
|
self.visible = visible
|
|
430
502
|
"""True if the component should be visible. Defaults to True."""
|
|
503
|
+
self.align = align
|
|
504
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextMAlign."""
|
|
431
505
|
self.tooltip = tooltip
|
|
432
506
|
"""Tooltip message."""
|
|
433
507
|
self.name = name
|
|
@@ -438,12 +512,14 @@ class TextM:
|
|
|
438
512
|
_guard_scalar('TextM.content', self.content, (str,), False, False, False)
|
|
439
513
|
_guard_scalar('TextM.width', self.width, (str,), False, True, False)
|
|
440
514
|
_guard_scalar('TextM.visible', self.visible, (bool,), False, True, False)
|
|
515
|
+
_guard_enum('TextM.align', self.align, _TextMAlign, True)
|
|
441
516
|
_guard_scalar('TextM.tooltip', self.tooltip, (str,), False, True, False)
|
|
442
517
|
_guard_scalar('TextM.name', self.name, (str,), False, True, False)
|
|
443
518
|
return _dump(
|
|
444
519
|
content=self.content,
|
|
445
520
|
width=self.width,
|
|
446
521
|
visible=self.visible,
|
|
522
|
+
align=self.align,
|
|
447
523
|
tooltip=self.tooltip,
|
|
448
524
|
name=self.name,
|
|
449
525
|
)
|
|
@@ -457,6 +533,8 @@ class TextM:
|
|
|
457
533
|
_guard_scalar('TextM.width', __d_width, (str,), False, True, False)
|
|
458
534
|
__d_visible: Any = __d.get('visible')
|
|
459
535
|
_guard_scalar('TextM.visible', __d_visible, (bool,), False, True, False)
|
|
536
|
+
__d_align: Any = __d.get('align')
|
|
537
|
+
_guard_enum('TextM.align', __d_align, _TextMAlign, True)
|
|
460
538
|
__d_tooltip: Any = __d.get('tooltip')
|
|
461
539
|
_guard_scalar('TextM.tooltip', __d_tooltip, (str,), False, True, False)
|
|
462
540
|
__d_name: Any = __d.get('name')
|
|
@@ -464,17 +542,29 @@ class TextM:
|
|
|
464
542
|
content: str = __d_content
|
|
465
543
|
width: Optional[str] = __d_width
|
|
466
544
|
visible: Optional[bool] = __d_visible
|
|
545
|
+
align: Optional[str] = __d_align
|
|
467
546
|
tooltip: Optional[str] = __d_tooltip
|
|
468
547
|
name: Optional[str] = __d_name
|
|
469
548
|
return TextM(
|
|
470
549
|
content,
|
|
471
550
|
width,
|
|
472
551
|
visible,
|
|
552
|
+
align,
|
|
473
553
|
tooltip,
|
|
474
554
|
name,
|
|
475
555
|
)
|
|
476
556
|
|
|
477
557
|
|
|
558
|
+
_TextSAlign = ['start', 'end', 'center', 'justify']
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
class TextSAlign:
|
|
562
|
+
START = 'start'
|
|
563
|
+
END = 'end'
|
|
564
|
+
CENTER = 'center'
|
|
565
|
+
JUSTIFY = 'justify'
|
|
566
|
+
|
|
567
|
+
|
|
478
568
|
class TextS:
|
|
479
569
|
"""Create small sized text content.
|
|
480
570
|
"""
|
|
@@ -483,12 +573,14 @@ class TextS:
|
|
|
483
573
|
content: str,
|
|
484
574
|
width: Optional[str] = None,
|
|
485
575
|
visible: Optional[bool] = None,
|
|
576
|
+
align: Optional[str] = None,
|
|
486
577
|
tooltip: Optional[str] = None,
|
|
487
578
|
name: Optional[str] = None,
|
|
488
579
|
):
|
|
489
580
|
_guard_scalar('TextS.content', content, (str,), False, False, False)
|
|
490
581
|
_guard_scalar('TextS.width', width, (str,), False, True, False)
|
|
491
582
|
_guard_scalar('TextS.visible', visible, (bool,), False, True, False)
|
|
583
|
+
_guard_enum('TextS.align', align, _TextSAlign, True)
|
|
492
584
|
_guard_scalar('TextS.tooltip', tooltip, (str,), False, True, False)
|
|
493
585
|
_guard_scalar('TextS.name', name, (str,), False, True, False)
|
|
494
586
|
self.content = content
|
|
@@ -497,6 +589,8 @@ class TextS:
|
|
|
497
589
|
"""The width of the text , e.g. '100px'."""
|
|
498
590
|
self.visible = visible
|
|
499
591
|
"""True if the component should be visible. Defaults to True."""
|
|
592
|
+
self.align = align
|
|
593
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextSAlign."""
|
|
500
594
|
self.tooltip = tooltip
|
|
501
595
|
"""Tooltip message."""
|
|
502
596
|
self.name = name
|
|
@@ -507,12 +601,14 @@ class TextS:
|
|
|
507
601
|
_guard_scalar('TextS.content', self.content, (str,), False, False, False)
|
|
508
602
|
_guard_scalar('TextS.width', self.width, (str,), False, True, False)
|
|
509
603
|
_guard_scalar('TextS.visible', self.visible, (bool,), False, True, False)
|
|
604
|
+
_guard_enum('TextS.align', self.align, _TextSAlign, True)
|
|
510
605
|
_guard_scalar('TextS.tooltip', self.tooltip, (str,), False, True, False)
|
|
511
606
|
_guard_scalar('TextS.name', self.name, (str,), False, True, False)
|
|
512
607
|
return _dump(
|
|
513
608
|
content=self.content,
|
|
514
609
|
width=self.width,
|
|
515
610
|
visible=self.visible,
|
|
611
|
+
align=self.align,
|
|
516
612
|
tooltip=self.tooltip,
|
|
517
613
|
name=self.name,
|
|
518
614
|
)
|
|
@@ -526,6 +622,8 @@ class TextS:
|
|
|
526
622
|
_guard_scalar('TextS.width', __d_width, (str,), False, True, False)
|
|
527
623
|
__d_visible: Any = __d.get('visible')
|
|
528
624
|
_guard_scalar('TextS.visible', __d_visible, (bool,), False, True, False)
|
|
625
|
+
__d_align: Any = __d.get('align')
|
|
626
|
+
_guard_enum('TextS.align', __d_align, _TextSAlign, True)
|
|
529
627
|
__d_tooltip: Any = __d.get('tooltip')
|
|
530
628
|
_guard_scalar('TextS.tooltip', __d_tooltip, (str,), False, True, False)
|
|
531
629
|
__d_name: Any = __d.get('name')
|
|
@@ -533,17 +631,29 @@ class TextS:
|
|
|
533
631
|
content: str = __d_content
|
|
534
632
|
width: Optional[str] = __d_width
|
|
535
633
|
visible: Optional[bool] = __d_visible
|
|
634
|
+
align: Optional[str] = __d_align
|
|
536
635
|
tooltip: Optional[str] = __d_tooltip
|
|
537
636
|
name: Optional[str] = __d_name
|
|
538
637
|
return TextS(
|
|
539
638
|
content,
|
|
540
639
|
width,
|
|
541
640
|
visible,
|
|
641
|
+
align,
|
|
542
642
|
tooltip,
|
|
543
643
|
name,
|
|
544
644
|
)
|
|
545
645
|
|
|
546
646
|
|
|
647
|
+
_TextXsAlign = ['start', 'end', 'center', 'justify']
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
class TextXsAlign:
|
|
651
|
+
START = 'start'
|
|
652
|
+
END = 'end'
|
|
653
|
+
CENTER = 'center'
|
|
654
|
+
JUSTIFY = 'justify'
|
|
655
|
+
|
|
656
|
+
|
|
547
657
|
class TextXs:
|
|
548
658
|
"""Create extra-small sized text content.
|
|
549
659
|
"""
|
|
@@ -552,12 +662,14 @@ class TextXs:
|
|
|
552
662
|
content: str,
|
|
553
663
|
width: Optional[str] = None,
|
|
554
664
|
visible: Optional[bool] = None,
|
|
665
|
+
align: Optional[str] = None,
|
|
555
666
|
tooltip: Optional[str] = None,
|
|
556
667
|
name: Optional[str] = None,
|
|
557
668
|
):
|
|
558
669
|
_guard_scalar('TextXs.content', content, (str,), False, False, False)
|
|
559
670
|
_guard_scalar('TextXs.width', width, (str,), False, True, False)
|
|
560
671
|
_guard_scalar('TextXs.visible', visible, (bool,), False, True, False)
|
|
672
|
+
_guard_enum('TextXs.align', align, _TextXsAlign, True)
|
|
561
673
|
_guard_scalar('TextXs.tooltip', tooltip, (str,), False, True, False)
|
|
562
674
|
_guard_scalar('TextXs.name', name, (str,), False, True, False)
|
|
563
675
|
self.content = content
|
|
@@ -566,6 +678,8 @@ class TextXs:
|
|
|
566
678
|
"""The width of the text , e.g. '100px'."""
|
|
567
679
|
self.visible = visible
|
|
568
680
|
"""True if the component should be visible. Defaults to True."""
|
|
681
|
+
self.align = align
|
|
682
|
+
"""The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextXsAlign."""
|
|
569
683
|
self.tooltip = tooltip
|
|
570
684
|
"""Tooltip message."""
|
|
571
685
|
self.name = name
|
|
@@ -576,12 +690,14 @@ class TextXs:
|
|
|
576
690
|
_guard_scalar('TextXs.content', self.content, (str,), False, False, False)
|
|
577
691
|
_guard_scalar('TextXs.width', self.width, (str,), False, True, False)
|
|
578
692
|
_guard_scalar('TextXs.visible', self.visible, (bool,), False, True, False)
|
|
693
|
+
_guard_enum('TextXs.align', self.align, _TextXsAlign, True)
|
|
579
694
|
_guard_scalar('TextXs.tooltip', self.tooltip, (str,), False, True, False)
|
|
580
695
|
_guard_scalar('TextXs.name', self.name, (str,), False, True, False)
|
|
581
696
|
return _dump(
|
|
582
697
|
content=self.content,
|
|
583
698
|
width=self.width,
|
|
584
699
|
visible=self.visible,
|
|
700
|
+
align=self.align,
|
|
585
701
|
tooltip=self.tooltip,
|
|
586
702
|
name=self.name,
|
|
587
703
|
)
|
|
@@ -595,6 +711,8 @@ class TextXs:
|
|
|
595
711
|
_guard_scalar('TextXs.width', __d_width, (str,), False, True, False)
|
|
596
712
|
__d_visible: Any = __d.get('visible')
|
|
597
713
|
_guard_scalar('TextXs.visible', __d_visible, (bool,), False, True, False)
|
|
714
|
+
__d_align: Any = __d.get('align')
|
|
715
|
+
_guard_enum('TextXs.align', __d_align, _TextXsAlign, True)
|
|
598
716
|
__d_tooltip: Any = __d.get('tooltip')
|
|
599
717
|
_guard_scalar('TextXs.tooltip', __d_tooltip, (str,), False, True, False)
|
|
600
718
|
__d_name: Any = __d.get('name')
|
|
@@ -602,12 +720,14 @@ class TextXs:
|
|
|
602
720
|
content: str = __d_content
|
|
603
721
|
width: Optional[str] = __d_width
|
|
604
722
|
visible: Optional[bool] = __d_visible
|
|
723
|
+
align: Optional[str] = __d_align
|
|
605
724
|
tooltip: Optional[str] = __d_tooltip
|
|
606
725
|
name: Optional[str] = __d_name
|
|
607
726
|
return TextXs(
|
|
608
727
|
content,
|
|
609
728
|
width,
|
|
610
729
|
visible,
|
|
730
|
+
align,
|
|
611
731
|
tooltip,
|
|
612
732
|
name,
|
|
613
733
|
)
|
|
@@ -3802,7 +3922,7 @@ class Table:
|
|
|
3802
3922
|
self.pagination = pagination
|
|
3803
3923
|
"""Display a pagination control at the bottom of the table. Set this value using `ui.table_pagination()`."""
|
|
3804
3924
|
self.events = events
|
|
3805
|
-
"""The events to capture on this table
|
|
3925
|
+
"""The events to capture on this table. When pagination is set, one of 'search' | 'sort' | 'filter' | 'download' | 'page_change' | 'reset'. These events are available regardless of pagination: 'select' | 'group_change'."""
|
|
3806
3926
|
self.single = single
|
|
3807
3927
|
"""True to allow only one row to be selected at time. Mutually exclusive with `multiple` attr."""
|
|
3808
3928
|
self.value = value
|
|
@@ -8347,6 +8467,7 @@ class ChatbotCard:
|
|
|
8347
8467
|
generating: Optional[bool] = None,
|
|
8348
8468
|
suggestions: Optional[List[ChatSuggestion]] = None,
|
|
8349
8469
|
disabled: Optional[bool] = None,
|
|
8470
|
+
value: Optional[str] = None,
|
|
8350
8471
|
commands: Optional[List[Command]] = None,
|
|
8351
8472
|
):
|
|
8352
8473
|
_guard_scalar('ChatbotCard.box', box, (str,), False, False, False)
|
|
@@ -8356,6 +8477,7 @@ class ChatbotCard:
|
|
|
8356
8477
|
_guard_scalar('ChatbotCard.generating', generating, (bool,), False, True, False)
|
|
8357
8478
|
_guard_vector('ChatbotCard.suggestions', suggestions, (ChatSuggestion,), False, True, False)
|
|
8358
8479
|
_guard_scalar('ChatbotCard.disabled', disabled, (bool,), False, True, False)
|
|
8480
|
+
_guard_scalar('ChatbotCard.value', value, (str,), False, True, False)
|
|
8359
8481
|
_guard_vector('ChatbotCard.commands', commands, (Command,), False, True, False)
|
|
8360
8482
|
self.box = box
|
|
8361
8483
|
"""A string indicating how to place this component on the page."""
|
|
@@ -8373,6 +8495,8 @@ class ChatbotCard:
|
|
|
8373
8495
|
"""Clickable prompt suggestions shown below the last response."""
|
|
8374
8496
|
self.disabled = disabled
|
|
8375
8497
|
"""True if the user input should be disabled."""
|
|
8498
|
+
self.value = value
|
|
8499
|
+
"""Value of the user input."""
|
|
8376
8500
|
self.commands = commands
|
|
8377
8501
|
"""Contextual menu commands for this component."""
|
|
8378
8502
|
|
|
@@ -8385,6 +8509,7 @@ class ChatbotCard:
|
|
|
8385
8509
|
_guard_scalar('ChatbotCard.generating', self.generating, (bool,), False, True, False)
|
|
8386
8510
|
_guard_vector('ChatbotCard.suggestions', self.suggestions, (ChatSuggestion,), False, True, False)
|
|
8387
8511
|
_guard_scalar('ChatbotCard.disabled', self.disabled, (bool,), False, True, False)
|
|
8512
|
+
_guard_scalar('ChatbotCard.value', self.value, (str,), False, True, False)
|
|
8388
8513
|
_guard_vector('ChatbotCard.commands', self.commands, (Command,), False, True, False)
|
|
8389
8514
|
return _dump(
|
|
8390
8515
|
view='chatbot',
|
|
@@ -8396,6 +8521,7 @@ class ChatbotCard:
|
|
|
8396
8521
|
generating=self.generating,
|
|
8397
8522
|
suggestions=None if self.suggestions is None else [__e.dump() for __e in self.suggestions],
|
|
8398
8523
|
disabled=self.disabled,
|
|
8524
|
+
value=self.value,
|
|
8399
8525
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
8400
8526
|
)
|
|
8401
8527
|
|
|
@@ -8417,6 +8543,8 @@ class ChatbotCard:
|
|
|
8417
8543
|
_guard_vector('ChatbotCard.suggestions', __d_suggestions, (dict,), False, True, False)
|
|
8418
8544
|
__d_disabled: Any = __d.get('disabled')
|
|
8419
8545
|
_guard_scalar('ChatbotCard.disabled', __d_disabled, (bool,), False, True, False)
|
|
8546
|
+
__d_value: Any = __d.get('value')
|
|
8547
|
+
_guard_scalar('ChatbotCard.value', __d_value, (str,), False, True, False)
|
|
8420
8548
|
__d_commands: Any = __d.get('commands')
|
|
8421
8549
|
_guard_vector('ChatbotCard.commands', __d_commands, (dict,), False, True, False)
|
|
8422
8550
|
box: str = __d_box
|
|
@@ -8427,6 +8555,7 @@ class ChatbotCard:
|
|
|
8427
8555
|
generating: Optional[bool] = __d_generating
|
|
8428
8556
|
suggestions: Optional[List[ChatSuggestion]] = None if __d_suggestions is None else [ChatSuggestion.load(__e) for __e in __d_suggestions]
|
|
8429
8557
|
disabled: Optional[bool] = __d_disabled
|
|
8558
|
+
value: Optional[str] = __d_value
|
|
8430
8559
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
8431
8560
|
return ChatbotCard(
|
|
8432
8561
|
box,
|
|
@@ -8437,6 +8566,7 @@ class ChatbotCard:
|
|
|
8437
8566
|
generating,
|
|
8438
8567
|
suggestions,
|
|
8439
8568
|
disabled,
|
|
8569
|
+
value,
|
|
8440
8570
|
commands,
|
|
8441
8571
|
)
|
|
8442
8572
|
|
|
@@ -8864,12 +8994,18 @@ class GraphicsCard:
|
|
|
8864
8994
|
scene: Optional[PackedData] = None,
|
|
8865
8995
|
width: Optional[str] = None,
|
|
8866
8996
|
height: Optional[str] = None,
|
|
8997
|
+
image: Optional[str] = None,
|
|
8998
|
+
image_path: Optional[str] = None,
|
|
8999
|
+
image_type: Optional[str] = None,
|
|
8867
9000
|
commands: Optional[List[Command]] = None,
|
|
8868
9001
|
):
|
|
8869
9002
|
_guard_scalar('GraphicsCard.box', box, (str,), False, False, False)
|
|
8870
9003
|
_guard_scalar('GraphicsCard.view_box', view_box, (str,), False, False, False)
|
|
8871
9004
|
_guard_scalar('GraphicsCard.width', width, (str,), False, True, False)
|
|
8872
9005
|
_guard_scalar('GraphicsCard.height', height, (str,), False, True, False)
|
|
9006
|
+
_guard_scalar('GraphicsCard.image', image, (str,), False, True, False)
|
|
9007
|
+
_guard_scalar('GraphicsCard.image_path', image_path, (str,), False, True, False)
|
|
9008
|
+
_guard_scalar('GraphicsCard.image_type', image_type, (str,), False, True, False)
|
|
8873
9009
|
_guard_vector('GraphicsCard.commands', commands, (Command,), False, True, False)
|
|
8874
9010
|
self.box = box
|
|
8875
9011
|
"""A string indicating how to place this component on the page."""
|
|
@@ -8883,6 +9019,12 @@ class GraphicsCard:
|
|
|
8883
9019
|
"""The displayed width of the rectangular viewport. (Not the width of its coordinate system.)"""
|
|
8884
9020
|
self.height = height
|
|
8885
9021
|
"""The displayed height of the rectangular viewport. (Not the height of its coordinate system.)"""
|
|
9022
|
+
self.image = image
|
|
9023
|
+
"""Background image data, base64-encoded."""
|
|
9024
|
+
self.image_path = image_path
|
|
9025
|
+
"""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,???`."""
|
|
9026
|
+
self.image_type = image_type
|
|
9027
|
+
"""The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set."""
|
|
8886
9028
|
self.commands = commands
|
|
8887
9029
|
"""Contextual menu commands for this component."""
|
|
8888
9030
|
|
|
@@ -8892,6 +9034,9 @@ class GraphicsCard:
|
|
|
8892
9034
|
_guard_scalar('GraphicsCard.view_box', self.view_box, (str,), False, False, False)
|
|
8893
9035
|
_guard_scalar('GraphicsCard.width', self.width, (str,), False, True, False)
|
|
8894
9036
|
_guard_scalar('GraphicsCard.height', self.height, (str,), False, True, False)
|
|
9037
|
+
_guard_scalar('GraphicsCard.image', self.image, (str,), False, True, False)
|
|
9038
|
+
_guard_scalar('GraphicsCard.image_path', self.image_path, (str,), False, True, False)
|
|
9039
|
+
_guard_scalar('GraphicsCard.image_type', self.image_type, (str,), False, True, False)
|
|
8895
9040
|
_guard_vector('GraphicsCard.commands', self.commands, (Command,), False, True, False)
|
|
8896
9041
|
return _dump(
|
|
8897
9042
|
view='graphics',
|
|
@@ -8901,6 +9046,9 @@ class GraphicsCard:
|
|
|
8901
9046
|
scene=self.scene,
|
|
8902
9047
|
width=self.width,
|
|
8903
9048
|
height=self.height,
|
|
9049
|
+
image=self.image,
|
|
9050
|
+
image_path=self.image_path,
|
|
9051
|
+
image_type=self.image_type,
|
|
8904
9052
|
commands=None if self.commands is None else [__e.dump() for __e in self.commands],
|
|
8905
9053
|
)
|
|
8906
9054
|
|
|
@@ -8917,6 +9065,12 @@ class GraphicsCard:
|
|
|
8917
9065
|
_guard_scalar('GraphicsCard.width', __d_width, (str,), False, True, False)
|
|
8918
9066
|
__d_height: Any = __d.get('height')
|
|
8919
9067
|
_guard_scalar('GraphicsCard.height', __d_height, (str,), False, True, False)
|
|
9068
|
+
__d_image: Any = __d.get('image')
|
|
9069
|
+
_guard_scalar('GraphicsCard.image', __d_image, (str,), False, True, False)
|
|
9070
|
+
__d_image_path: Any = __d.get('image_path')
|
|
9071
|
+
_guard_scalar('GraphicsCard.image_path', __d_image_path, (str,), False, True, False)
|
|
9072
|
+
__d_image_type: Any = __d.get('image_type')
|
|
9073
|
+
_guard_scalar('GraphicsCard.image_type', __d_image_type, (str,), False, True, False)
|
|
8920
9074
|
__d_commands: Any = __d.get('commands')
|
|
8921
9075
|
_guard_vector('GraphicsCard.commands', __d_commands, (dict,), False, True, False)
|
|
8922
9076
|
box: str = __d_box
|
|
@@ -8925,6 +9079,9 @@ class GraphicsCard:
|
|
|
8925
9079
|
scene: Optional[PackedData] = __d_scene
|
|
8926
9080
|
width: Optional[str] = __d_width
|
|
8927
9081
|
height: Optional[str] = __d_height
|
|
9082
|
+
image: Optional[str] = __d_image
|
|
9083
|
+
image_path: Optional[str] = __d_image_path
|
|
9084
|
+
image_type: Optional[str] = __d_image_type
|
|
8928
9085
|
commands: Optional[List[Command]] = None if __d_commands is None else [Command.load(__e) for __e in __d_commands]
|
|
8929
9086
|
return GraphicsCard(
|
|
8930
9087
|
box,
|
|
@@ -8933,6 +9090,9 @@ class GraphicsCard:
|
|
|
8933
9090
|
scene,
|
|
8934
9091
|
width,
|
|
8935
9092
|
height,
|
|
9093
|
+
image,
|
|
9094
|
+
image_path,
|
|
9095
|
+
image_type,
|
|
8936
9096
|
commands,
|
|
8937
9097
|
)
|
|
8938
9098
|
|
|
@@ -10567,12 +10727,14 @@ class Script:
|
|
|
10567
10727
|
cross_origin: Optional[str] = None,
|
|
10568
10728
|
referrer_policy: Optional[str] = None,
|
|
10569
10729
|
integrity: Optional[str] = None,
|
|
10730
|
+
type: Optional[str] = None,
|
|
10570
10731
|
):
|
|
10571
10732
|
_guard_scalar('Script.path', path, (str,), False, False, False)
|
|
10572
10733
|
_guard_scalar('Script.asynchronous', asynchronous, (bool,), False, True, False)
|
|
10573
10734
|
_guard_scalar('Script.cross_origin', cross_origin, (str,), False, True, False)
|
|
10574
10735
|
_guard_scalar('Script.referrer_policy', referrer_policy, (str,), False, True, False)
|
|
10575
10736
|
_guard_scalar('Script.integrity', integrity, (str,), False, True, False)
|
|
10737
|
+
_guard_scalar('Script.type', type, (str,), False, True, False)
|
|
10576
10738
|
self.path = path
|
|
10577
10739
|
"""The URI of an external script."""
|
|
10578
10740
|
self.asynchronous = asynchronous
|
|
@@ -10583,6 +10745,8 @@ class Script:
|
|
|
10583
10745
|
"""Indicates which referrer to send when fetching the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script"""
|
|
10584
10746
|
self.integrity = integrity
|
|
10585
10747
|
"""The cryptographic hash to verify the script's integrity. See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity"""
|
|
10748
|
+
self.type = type
|
|
10749
|
+
"""Type of the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type"""
|
|
10586
10750
|
|
|
10587
10751
|
def dump(self) -> Dict:
|
|
10588
10752
|
"""Returns the contents of this object as a dict."""
|
|
@@ -10591,12 +10755,14 @@ class Script:
|
|
|
10591
10755
|
_guard_scalar('Script.cross_origin', self.cross_origin, (str,), False, True, False)
|
|
10592
10756
|
_guard_scalar('Script.referrer_policy', self.referrer_policy, (str,), False, True, False)
|
|
10593
10757
|
_guard_scalar('Script.integrity', self.integrity, (str,), False, True, False)
|
|
10758
|
+
_guard_scalar('Script.type', self.type, (str,), False, True, False)
|
|
10594
10759
|
return _dump(
|
|
10595
10760
|
path=self.path,
|
|
10596
10761
|
asynchronous=self.asynchronous,
|
|
10597
10762
|
cross_origin=self.cross_origin,
|
|
10598
10763
|
referrer_policy=self.referrer_policy,
|
|
10599
10764
|
integrity=self.integrity,
|
|
10765
|
+
type=self.type,
|
|
10600
10766
|
)
|
|
10601
10767
|
|
|
10602
10768
|
@staticmethod
|
|
@@ -10612,17 +10778,21 @@ class Script:
|
|
|
10612
10778
|
_guard_scalar('Script.referrer_policy', __d_referrer_policy, (str,), False, True, False)
|
|
10613
10779
|
__d_integrity: Any = __d.get('integrity')
|
|
10614
10780
|
_guard_scalar('Script.integrity', __d_integrity, (str,), False, True, False)
|
|
10781
|
+
__d_type: Any = __d.get('type')
|
|
10782
|
+
_guard_scalar('Script.type', __d_type, (str,), False, True, False)
|
|
10615
10783
|
path: str = __d_path
|
|
10616
10784
|
asynchronous: Optional[bool] = __d_asynchronous
|
|
10617
10785
|
cross_origin: Optional[str] = __d_cross_origin
|
|
10618
10786
|
referrer_policy: Optional[str] = __d_referrer_policy
|
|
10619
10787
|
integrity: Optional[str] = __d_integrity
|
|
10788
|
+
type: Optional[str] = __d_type
|
|
10620
10789
|
return Script(
|
|
10621
10790
|
path,
|
|
10622
10791
|
asynchronous,
|
|
10623
10792
|
cross_origin,
|
|
10624
10793
|
referrer_policy,
|
|
10625
10794
|
integrity,
|
|
10795
|
+
type,
|
|
10626
10796
|
)
|
|
10627
10797
|
|
|
10628
10798
|
|
h2o_wave/ui.py
CHANGED
|
@@ -26,6 +26,7 @@ def text(
|
|
|
26
26
|
size: Optional[str] = None,
|
|
27
27
|
width: Optional[str] = None,
|
|
28
28
|
visible: Optional[bool] = None,
|
|
29
|
+
align: Optional[str] = None,
|
|
29
30
|
tooltip: Optional[str] = None,
|
|
30
31
|
name: Optional[str] = None,
|
|
31
32
|
) -> Component:
|
|
@@ -36,6 +37,7 @@ def text(
|
|
|
36
37
|
size: The font size of the text content. One of 'xl', 'l', 'm', 's', 'xs'. See enum h2o_wave.ui.TextSize.
|
|
37
38
|
width: The width of the text , e.g. '100px'.
|
|
38
39
|
visible: True if the component should be visible. Defaults to True.
|
|
40
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextAlign.
|
|
39
41
|
tooltip: Tooltip message.
|
|
40
42
|
name: An identifying name for this component.
|
|
41
43
|
Returns:
|
|
@@ -46,6 +48,7 @@ def text(
|
|
|
46
48
|
size,
|
|
47
49
|
width,
|
|
48
50
|
visible,
|
|
51
|
+
align,
|
|
49
52
|
tooltip,
|
|
50
53
|
name,
|
|
51
54
|
))
|
|
@@ -93,6 +96,7 @@ def text_xl(
|
|
|
93
96
|
content: str,
|
|
94
97
|
width: Optional[str] = None,
|
|
95
98
|
visible: Optional[bool] = None,
|
|
99
|
+
align: Optional[str] = None,
|
|
96
100
|
tooltip: Optional[str] = None,
|
|
97
101
|
commands: Optional[List[Command]] = None,
|
|
98
102
|
name: Optional[str] = None,
|
|
@@ -103,6 +107,7 @@ def text_xl(
|
|
|
103
107
|
content: The text content.
|
|
104
108
|
width: The width of the text , e.g. '100px'.
|
|
105
109
|
visible: True if the component should be visible. Defaults to True.
|
|
110
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextXlAlign.
|
|
106
111
|
tooltip: Tooltip message.
|
|
107
112
|
commands: Contextual menu commands for this component.
|
|
108
113
|
name: An identifying name for this component.
|
|
@@ -113,6 +118,7 @@ def text_xl(
|
|
|
113
118
|
content,
|
|
114
119
|
width,
|
|
115
120
|
visible,
|
|
121
|
+
align,
|
|
116
122
|
tooltip,
|
|
117
123
|
commands,
|
|
118
124
|
name,
|
|
@@ -123,6 +129,7 @@ def text_l(
|
|
|
123
129
|
content: str,
|
|
124
130
|
width: Optional[str] = None,
|
|
125
131
|
visible: Optional[bool] = None,
|
|
132
|
+
align: Optional[str] = None,
|
|
126
133
|
tooltip: Optional[str] = None,
|
|
127
134
|
commands: Optional[List[Command]] = None,
|
|
128
135
|
name: Optional[str] = None,
|
|
@@ -133,6 +140,7 @@ def text_l(
|
|
|
133
140
|
content: The text content.
|
|
134
141
|
width: The width of the text , e.g. '100px'.
|
|
135
142
|
visible: True if the component should be visible. Defaults to True.
|
|
143
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextLAlign.
|
|
136
144
|
tooltip: Tooltip message.
|
|
137
145
|
commands: Contextual menu commands for this component.
|
|
138
146
|
name: An identifying name for this component.
|
|
@@ -143,6 +151,7 @@ def text_l(
|
|
|
143
151
|
content,
|
|
144
152
|
width,
|
|
145
153
|
visible,
|
|
154
|
+
align,
|
|
146
155
|
tooltip,
|
|
147
156
|
commands,
|
|
148
157
|
name,
|
|
@@ -153,6 +162,7 @@ def text_m(
|
|
|
153
162
|
content: str,
|
|
154
163
|
width: Optional[str] = None,
|
|
155
164
|
visible: Optional[bool] = None,
|
|
165
|
+
align: Optional[str] = None,
|
|
156
166
|
tooltip: Optional[str] = None,
|
|
157
167
|
name: Optional[str] = None,
|
|
158
168
|
) -> Component:
|
|
@@ -162,6 +172,7 @@ def text_m(
|
|
|
162
172
|
content: The text content.
|
|
163
173
|
width: The width of the text , e.g. '100px'.
|
|
164
174
|
visible: True if the component should be visible. Defaults to True.
|
|
175
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextMAlign.
|
|
165
176
|
tooltip: Tooltip message.
|
|
166
177
|
name: An identifying name for this component.
|
|
167
178
|
Returns:
|
|
@@ -171,6 +182,7 @@ def text_m(
|
|
|
171
182
|
content,
|
|
172
183
|
width,
|
|
173
184
|
visible,
|
|
185
|
+
align,
|
|
174
186
|
tooltip,
|
|
175
187
|
name,
|
|
176
188
|
))
|
|
@@ -180,6 +192,7 @@ def text_s(
|
|
|
180
192
|
content: str,
|
|
181
193
|
width: Optional[str] = None,
|
|
182
194
|
visible: Optional[bool] = None,
|
|
195
|
+
align: Optional[str] = None,
|
|
183
196
|
tooltip: Optional[str] = None,
|
|
184
197
|
name: Optional[str] = None,
|
|
185
198
|
) -> Component:
|
|
@@ -189,6 +202,7 @@ def text_s(
|
|
|
189
202
|
content: The text content.
|
|
190
203
|
width: The width of the text , e.g. '100px'.
|
|
191
204
|
visible: True if the component should be visible. Defaults to True.
|
|
205
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextSAlign.
|
|
192
206
|
tooltip: Tooltip message.
|
|
193
207
|
name: An identifying name for this component.
|
|
194
208
|
Returns:
|
|
@@ -198,6 +212,7 @@ def text_s(
|
|
|
198
212
|
content,
|
|
199
213
|
width,
|
|
200
214
|
visible,
|
|
215
|
+
align,
|
|
201
216
|
tooltip,
|
|
202
217
|
name,
|
|
203
218
|
))
|
|
@@ -207,6 +222,7 @@ def text_xs(
|
|
|
207
222
|
content: str,
|
|
208
223
|
width: Optional[str] = None,
|
|
209
224
|
visible: Optional[bool] = None,
|
|
225
|
+
align: Optional[str] = None,
|
|
210
226
|
tooltip: Optional[str] = None,
|
|
211
227
|
name: Optional[str] = None,
|
|
212
228
|
) -> Component:
|
|
@@ -216,6 +232,7 @@ def text_xs(
|
|
|
216
232
|
content: The text content.
|
|
217
233
|
width: The width of the text , e.g. '100px'.
|
|
218
234
|
visible: True if the component should be visible. Defaults to True.
|
|
235
|
+
align: The alignment of the text content. Defaults to 'start'. One of 'start', 'end', 'center', 'justify'. See enum h2o_wave.ui.TextXsAlign.
|
|
219
236
|
tooltip: Tooltip message.
|
|
220
237
|
name: An identifying name for this component.
|
|
221
238
|
Returns:
|
|
@@ -225,6 +242,7 @@ def text_xs(
|
|
|
225
242
|
content,
|
|
226
243
|
width,
|
|
227
244
|
visible,
|
|
245
|
+
align,
|
|
228
246
|
tooltip,
|
|
229
247
|
name,
|
|
230
248
|
))
|
|
@@ -1460,7 +1478,7 @@ def table(
|
|
|
1460
1478
|
tooltip: An optional tooltip message displayed when a user clicks the help icon to the right of the component.
|
|
1461
1479
|
groups: Creates collapsible / expandable groups of data rows. Mutually exclusive with `rows` attr.
|
|
1462
1480
|
pagination: Display a pagination control at the bottom of the table. Set this value using `ui.table_pagination()`.
|
|
1463
|
-
events: The events to capture on this table
|
|
1481
|
+
events: The events to capture on this table. When pagination is set, one of 'search' | 'sort' | 'filter' | 'download' | 'page_change' | 'reset'. These events are available regardless of pagination: 'select' | 'group_change'.
|
|
1464
1482
|
single: True to allow only one row to be selected at time. Mutually exclusive with `multiple` attr.
|
|
1465
1483
|
value: The name of the selected row. If this parameter is set, single selection will be allowed (`single` is assumed to be `True`).
|
|
1466
1484
|
Returns:
|
|
@@ -2920,6 +2938,7 @@ def chatbot_card(
|
|
|
2920
2938
|
generating: Optional[bool] = None,
|
|
2921
2939
|
suggestions: Optional[List[ChatSuggestion]] = None,
|
|
2922
2940
|
disabled: Optional[bool] = None,
|
|
2941
|
+
value: Optional[str] = None,
|
|
2923
2942
|
commands: Optional[List[Command]] = None,
|
|
2924
2943
|
) -> ChatbotCard:
|
|
2925
2944
|
"""Create a chatbot card to allow getting prompts from users and providing them with LLM generated answers.
|
|
@@ -2933,6 +2952,7 @@ def chatbot_card(
|
|
|
2933
2952
|
generating: True to show a button to stop the text generation. Defaults to False.
|
|
2934
2953
|
suggestions: Clickable prompt suggestions shown below the last response.
|
|
2935
2954
|
disabled: True if the user input should be disabled.
|
|
2955
|
+
value: Value of the user input.
|
|
2936
2956
|
commands: Contextual menu commands for this component.
|
|
2937
2957
|
Returns:
|
|
2938
2958
|
A `h2o_wave.types.ChatbotCard` instance.
|
|
@@ -2946,6 +2966,7 @@ def chatbot_card(
|
|
|
2946
2966
|
generating,
|
|
2947
2967
|
suggestions,
|
|
2948
2968
|
disabled,
|
|
2969
|
+
value,
|
|
2949
2970
|
commands,
|
|
2950
2971
|
)
|
|
2951
2972
|
|
|
@@ -3103,6 +3124,9 @@ def graphics_card(
|
|
|
3103
3124
|
scene: Optional[PackedData] = None,
|
|
3104
3125
|
width: Optional[str] = None,
|
|
3105
3126
|
height: Optional[str] = None,
|
|
3127
|
+
image: Optional[str] = None,
|
|
3128
|
+
image_path: Optional[str] = None,
|
|
3129
|
+
image_type: Optional[str] = None,
|
|
3106
3130
|
commands: Optional[List[Command]] = None,
|
|
3107
3131
|
) -> GraphicsCard:
|
|
3108
3132
|
"""Create a card for displaying vector graphics.
|
|
@@ -3114,6 +3138,9 @@ def graphics_card(
|
|
|
3114
3138
|
scene: Foreground layer for rendering dynamic SVG elements.
|
|
3115
3139
|
width: The displayed width of the rectangular viewport. (Not the width of its coordinate system.)
|
|
3116
3140
|
height: The displayed height of the rectangular viewport. (Not the height of its coordinate system.)
|
|
3141
|
+
image: Background image data, base64-encoded.
|
|
3142
|
+
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,???`.
|
|
3143
|
+
image_type: The background image MIME subtype. One of `apng`, `bmp`, `gif`, `x-icon`, `jpeg`, `png`, `webp`. Required only if `image` is set.
|
|
3117
3144
|
commands: Contextual menu commands for this component.
|
|
3118
3145
|
Returns:
|
|
3119
3146
|
A `h2o_wave.types.GraphicsCard` instance.
|
|
@@ -3125,6 +3152,9 @@ def graphics_card(
|
|
|
3125
3152
|
scene,
|
|
3126
3153
|
width,
|
|
3127
3154
|
height,
|
|
3155
|
+
image,
|
|
3156
|
+
image_path,
|
|
3157
|
+
image_type,
|
|
3128
3158
|
commands,
|
|
3129
3159
|
)
|
|
3130
3160
|
|
|
@@ -3725,6 +3755,7 @@ def script(
|
|
|
3725
3755
|
cross_origin: Optional[str] = None,
|
|
3726
3756
|
referrer_policy: Optional[str] = None,
|
|
3727
3757
|
integrity: Optional[str] = None,
|
|
3758
|
+
type: Optional[str] = None,
|
|
3728
3759
|
) -> Script:
|
|
3729
3760
|
"""Create a reference to an external Javascript file to be included on a page.
|
|
3730
3761
|
|
|
@@ -3734,6 +3765,7 @@ def script(
|
|
|
3734
3765
|
cross_origin: The CORS setting for this script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
|
|
3735
3766
|
referrer_policy: Indicates which referrer to send when fetching the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
|
|
3736
3767
|
integrity: The cryptographic hash to verify the script's integrity. See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
|
3768
|
+
type: Type of the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type
|
|
3737
3769
|
Returns:
|
|
3738
3770
|
A `h2o_wave.types.Script` instance.
|
|
3739
3771
|
"""
|
|
@@ -3743,6 +3775,7 @@ def script(
|
|
|
3743
3775
|
cross_origin,
|
|
3744
3776
|
referrer_policy,
|
|
3745
3777
|
integrity,
|
|
3778
|
+
type,
|
|
3746
3779
|
)
|
|
3747
3780
|
|
|
3748
3781
|
|
h2o_wave/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.
|
|
1
|
+
__version__ = '1.5.5'
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
h2o_wave/__init__.py,sha256=XIclw-HLtXgr0wNf5eQpkh6ZiqD9QAoiS-vZhp3IR5k,1674
|
|
2
2
|
h2o_wave/__main__.py,sha256=MoNOW43ppIqCdY3iq0n25Q3SKLyk8Igg5fD_sSROK4c,638
|
|
3
|
-
h2o_wave/cli.py,sha256=
|
|
4
|
-
h2o_wave/core.py,sha256=
|
|
3
|
+
h2o_wave/cli.py,sha256=5pIWZe-lRNmE1QUc94mk4XLLaQquvnCWwSs4qMgO3p4,13681
|
|
4
|
+
h2o_wave/core.py,sha256=dKUZOPDL8W-MCDLtC3A1TTuGNGO9cjAtbaQ8dfjceUA,40184
|
|
5
5
|
h2o_wave/db.py,sha256=H3W_EyMfnwr4UjqPVoAsE19O2QzY1ptIYGMOqU0YUQo,7489
|
|
6
6
|
h2o_wave/graphics.py,sha256=HLYrX-lwsMKbyLmy2ClG5L46DA2_hSCEPTsv0gPVoyg,25866
|
|
7
7
|
h2o_wave/ide.py,sha256=wAJjfEI1ekQrL455FGRVeNi3KiH6ELgsG3qm31Q-kRs,6810
|
|
8
8
|
h2o_wave/metadata.py,sha256=d8FrJ-nQhBIvntA2W9VVZ0-lxEE_uy85ShxCC_FFDEs,82
|
|
9
9
|
h2o_wave/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
h2o_wave/routing.py,sha256=de8GVfUAb6bwFXtsWj6NXmjMVGELknlZb03F-R4ManY,10592
|
|
11
|
-
h2o_wave/server.py,sha256=
|
|
11
|
+
h2o_wave/server.py,sha256=eAVP8E_fqpeAwYtZjk9cGKSy7cLwGbh0Zj_WBrB1j5M,18706
|
|
12
12
|
h2o_wave/share.py,sha256=2zgywet8540O6xM-JD3po1glyP2PBJ3lIxaWBJbQvtQ,1164
|
|
13
13
|
h2o_wave/test.py,sha256=hF_fS5e25bACnzENjpDrikv7nPOs0iENh4MuXX9BaVA,2738
|
|
14
|
-
h2o_wave/types.py,sha256=
|
|
15
|
-
h2o_wave/ui.py,sha256=
|
|
14
|
+
h2o_wave/types.py,sha256=oEmWG7pl0EyXCSIQQRLOebPTe6oI_nm2HkjGi6Ry5OM,660213
|
|
15
|
+
h2o_wave/ui.py,sha256=d9woXqoqJLARvgTsrL1hJ5-iLlwW6HmR7NWriSzK2CA,172443
|
|
16
16
|
h2o_wave/ui_ext.py,sha256=zx_2Ec2-p_ztm8brfVaVF0fTQWVDrb_YxcGfVb-wA10,2325
|
|
17
|
-
h2o_wave/version.py,sha256=
|
|
18
|
-
h2o_wave-1.
|
|
19
|
-
h2o_wave-1.
|
|
20
|
-
h2o_wave-1.
|
|
21
|
-
h2o_wave-1.
|
|
22
|
-
h2o_wave-1.
|
|
17
|
+
h2o_wave/version.py,sha256=Zzj2nCH-pedLXQfcBxIuFgiJXSAz9GGJSJ96GFPKLJE,22
|
|
18
|
+
h2o_wave-1.5.5.dist-info/METADATA,sha256=tHf3q3mixWMigvgE99z9VMG1SCUo7lGyDdtimtc5zOM,2907
|
|
19
|
+
h2o_wave-1.5.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
20
|
+
h2o_wave-1.5.5.dist-info/entry_points.txt,sha256=kFeXNqSZlW1_H7YcRdSOhz5V00F4vhDQ0NuDuvRwLGw,43
|
|
21
|
+
h2o_wave-1.5.5.dist-info/licenses/LICENSE,sha256=hpuFayniDwysSKD0tHGELH2KJDVyhUrKS29torRIpqY,53
|
|
22
|
+
h2o_wave-1.5.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|