h2o-wave 1.2.0__py3-none-any.whl → 1.3.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/types.py +130 -0
- h2o_wave/ui.py +21 -0
- h2o_wave/version.py +1 -1
- {h2o_wave-1.2.0.dist-info → h2o_wave-1.3.1.dist-info}/METADATA +1 -1
- {h2o_wave-1.2.0.dist-info → h2o_wave-1.3.1.dist-info}/RECORD +8 -8
- {h2o_wave-1.2.0.dist-info → h2o_wave-1.3.1.dist-info}/WHEEL +0 -0
- {h2o_wave-1.2.0.dist-info → h2o_wave-1.3.1.dist-info}/entry_points.txt +0 -0
- {h2o_wave-1.2.0.dist-info → h2o_wave-1.3.1.dist-info}/licenses/LICENSE +0 -0
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
|
)
|
|
@@ -10567,12 +10687,14 @@ class Script:
|
|
|
10567
10687
|
cross_origin: Optional[str] = None,
|
|
10568
10688
|
referrer_policy: Optional[str] = None,
|
|
10569
10689
|
integrity: Optional[str] = None,
|
|
10690
|
+
type: Optional[str] = None,
|
|
10570
10691
|
):
|
|
10571
10692
|
_guard_scalar('Script.path', path, (str,), False, False, False)
|
|
10572
10693
|
_guard_scalar('Script.asynchronous', asynchronous, (bool,), False, True, False)
|
|
10573
10694
|
_guard_scalar('Script.cross_origin', cross_origin, (str,), False, True, False)
|
|
10574
10695
|
_guard_scalar('Script.referrer_policy', referrer_policy, (str,), False, True, False)
|
|
10575
10696
|
_guard_scalar('Script.integrity', integrity, (str,), False, True, False)
|
|
10697
|
+
_guard_scalar('Script.type', type, (str,), False, True, False)
|
|
10576
10698
|
self.path = path
|
|
10577
10699
|
"""The URI of an external script."""
|
|
10578
10700
|
self.asynchronous = asynchronous
|
|
@@ -10583,6 +10705,8 @@ class Script:
|
|
|
10583
10705
|
"""Indicates which referrer to send when fetching the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script"""
|
|
10584
10706
|
self.integrity = integrity
|
|
10585
10707
|
"""The cryptographic hash to verify the script's integrity. See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity"""
|
|
10708
|
+
self.type = type
|
|
10709
|
+
"""Type of the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type"""
|
|
10586
10710
|
|
|
10587
10711
|
def dump(self) -> Dict:
|
|
10588
10712
|
"""Returns the contents of this object as a dict."""
|
|
@@ -10591,12 +10715,14 @@ class Script:
|
|
|
10591
10715
|
_guard_scalar('Script.cross_origin', self.cross_origin, (str,), False, True, False)
|
|
10592
10716
|
_guard_scalar('Script.referrer_policy', self.referrer_policy, (str,), False, True, False)
|
|
10593
10717
|
_guard_scalar('Script.integrity', self.integrity, (str,), False, True, False)
|
|
10718
|
+
_guard_scalar('Script.type', self.type, (str,), False, True, False)
|
|
10594
10719
|
return _dump(
|
|
10595
10720
|
path=self.path,
|
|
10596
10721
|
asynchronous=self.asynchronous,
|
|
10597
10722
|
cross_origin=self.cross_origin,
|
|
10598
10723
|
referrer_policy=self.referrer_policy,
|
|
10599
10724
|
integrity=self.integrity,
|
|
10725
|
+
type=self.type,
|
|
10600
10726
|
)
|
|
10601
10727
|
|
|
10602
10728
|
@staticmethod
|
|
@@ -10612,17 +10738,21 @@ class Script:
|
|
|
10612
10738
|
_guard_scalar('Script.referrer_policy', __d_referrer_policy, (str,), False, True, False)
|
|
10613
10739
|
__d_integrity: Any = __d.get('integrity')
|
|
10614
10740
|
_guard_scalar('Script.integrity', __d_integrity, (str,), False, True, False)
|
|
10741
|
+
__d_type: Any = __d.get('type')
|
|
10742
|
+
_guard_scalar('Script.type', __d_type, (str,), False, True, False)
|
|
10615
10743
|
path: str = __d_path
|
|
10616
10744
|
asynchronous: Optional[bool] = __d_asynchronous
|
|
10617
10745
|
cross_origin: Optional[str] = __d_cross_origin
|
|
10618
10746
|
referrer_policy: Optional[str] = __d_referrer_policy
|
|
10619
10747
|
integrity: Optional[str] = __d_integrity
|
|
10748
|
+
type: Optional[str] = __d_type
|
|
10620
10749
|
return Script(
|
|
10621
10750
|
path,
|
|
10622
10751
|
asynchronous,
|
|
10623
10752
|
cross_origin,
|
|
10624
10753
|
referrer_policy,
|
|
10625
10754
|
integrity,
|
|
10755
|
+
type,
|
|
10626
10756
|
)
|
|
10627
10757
|
|
|
10628
10758
|
|
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
|
))
|
|
@@ -3725,6 +3743,7 @@ def script(
|
|
|
3725
3743
|
cross_origin: Optional[str] = None,
|
|
3726
3744
|
referrer_policy: Optional[str] = None,
|
|
3727
3745
|
integrity: Optional[str] = None,
|
|
3746
|
+
type: Optional[str] = None,
|
|
3728
3747
|
) -> Script:
|
|
3729
3748
|
"""Create a reference to an external Javascript file to be included on a page.
|
|
3730
3749
|
|
|
@@ -3734,6 +3753,7 @@ def script(
|
|
|
3734
3753
|
cross_origin: The CORS setting for this script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
|
|
3735
3754
|
referrer_policy: Indicates which referrer to send when fetching the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
|
|
3736
3755
|
integrity: The cryptographic hash to verify the script's integrity. See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
|
3756
|
+
type: Type of the script. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type
|
|
3737
3757
|
Returns:
|
|
3738
3758
|
A `h2o_wave.types.Script` instance.
|
|
3739
3759
|
"""
|
|
@@ -3743,6 +3763,7 @@ def script(
|
|
|
3743
3763
|
cross_origin,
|
|
3744
3764
|
referrer_policy,
|
|
3745
3765
|
integrity,
|
|
3766
|
+
type,
|
|
3746
3767
|
)
|
|
3747
3768
|
|
|
3748
3769
|
|
h2o_wave/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.
|
|
1
|
+
__version__ = '1.3.1'
|
|
@@ -11,12 +11,12 @@ h2o_wave/routing.py,sha256=de8GVfUAb6bwFXtsWj6NXmjMVGELknlZb03F-R4ManY,10592
|
|
|
11
11
|
h2o_wave/server.py,sha256=u80Jma83mMKqmTitVDFO703SrcC4Y29DQM2letSVNyA,17900
|
|
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=8VCKbNBGmEQRc_dZjY73LUl416CEqEteq1jkmRuptZo,657819
|
|
15
|
+
h2o_wave/ui.py,sha256=d4ndxFHdm37lIYqcy_8KZ_p-e7FhPN-iD_4e9ck-Nwo,171748
|
|
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=P2DFKJQEJRlJhF0IW0Lwt4G4uMYyJJ5ymhv-XrCcPGo,22
|
|
18
|
+
h2o_wave-1.3.1.dist-info/METADATA,sha256=tT3M4sEv7C3J-0985J3rKFEqWTCYd0hECJHlsV9zRMM,2907
|
|
19
|
+
h2o_wave-1.3.1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
20
|
+
h2o_wave-1.3.1.dist-info/entry_points.txt,sha256=kFeXNqSZlW1_H7YcRdSOhz5V00F4vhDQ0NuDuvRwLGw,43
|
|
21
|
+
h2o_wave-1.3.1.dist-info/licenses/LICENSE,sha256=hpuFayniDwysSKD0tHGELH2KJDVyhUrKS29torRIpqY,53
|
|
22
|
+
h2o_wave-1.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|