ex4nicegui 0.8.2__py3-none-any.whl → 0.8.4__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.
- ex4nicegui/reactive/__init__.py +3 -0
- ex4nicegui/reactive/base.py +13 -0
- ex4nicegui/reactive/officials/radio.py +1 -0
- ex4nicegui/reactive/officials/range.py +45 -0
- ex4nicegui/reactive/officials/select.py +1 -0
- ex4nicegui/reactive/officials/tab_panel.py +52 -1
- ex4nicegui/reactive/officials/tab_panels.py +20 -54
- ex4nicegui/reactive/officials/toggle.py +1 -0
- ex4nicegui/reactive/services/reactive_service.py +23 -1
- {ex4nicegui-0.8.2.dist-info → ex4nicegui-0.8.4.dist-info}/METADATA +72 -1
- {ex4nicegui-0.8.2.dist-info → ex4nicegui-0.8.4.dist-info}/RECORD +13 -12
- {ex4nicegui-0.8.2.dist-info → ex4nicegui-0.8.4.dist-info}/LICENSE +0 -0
- {ex4nicegui-0.8.2.dist-info → ex4nicegui-0.8.4.dist-info}/WHEEL +0 -0
ex4nicegui/reactive/__init__.py
CHANGED
|
@@ -58,6 +58,8 @@ from .officials.tooltip import TooltipBindableUi as tooltip
|
|
|
58
58
|
from .officials.toggle import ToggleBindableUi as toggle
|
|
59
59
|
from .officials.avatar import AvatarBindableUi as avatar
|
|
60
60
|
from .officials.badge import BadgeBindableUi as badge
|
|
61
|
+
from .officials.range import RangeBindableUi as range
|
|
62
|
+
|
|
61
63
|
|
|
62
64
|
from .local_file_picker import local_file_picker
|
|
63
65
|
from .UseDraggable.UseDraggable import use_draggable
|
|
@@ -139,4 +141,5 @@ __all__ = [
|
|
|
139
141
|
"toggle",
|
|
140
142
|
"avatar",
|
|
141
143
|
"badge",
|
|
144
|
+
"range",
|
|
142
145
|
]
|
ex4nicegui/reactive/base.py
CHANGED
|
@@ -27,6 +27,7 @@ from ex4nicegui.utils.clientScope import new_scope
|
|
|
27
27
|
from ex4nicegui.utils.types import _TMaybeRef as TMaybeRef
|
|
28
28
|
from nicegui import Tailwind, ui
|
|
29
29
|
from nicegui.elements.mixins.text_element import TextElement
|
|
30
|
+
from nicegui.elements.mixins.value_element import ValueElement
|
|
30
31
|
from ex4nicegui.reactive.services.reactive_service import inject_handle_delete
|
|
31
32
|
from ex4nicegui.reactive.scopedStyle import ScopedStyle
|
|
32
33
|
from ex4nicegui.reactive.mixins.disableable import DisableableMixin
|
|
@@ -223,6 +224,18 @@ class BindableUi(Generic[TWidget]):
|
|
|
223
224
|
cast(TextElement, self.element).set_text(to_value(value))
|
|
224
225
|
self.element.update()
|
|
225
226
|
|
|
227
|
+
return self
|
|
228
|
+
|
|
229
|
+
if prop == "value" and isinstance(self.element, ValueElement):
|
|
230
|
+
|
|
231
|
+
@self._ui_effect
|
|
232
|
+
def _():
|
|
233
|
+
element = cast(ValueElement, self.element)
|
|
234
|
+
element.set_value(to_value(value))
|
|
235
|
+
self.element.update()
|
|
236
|
+
|
|
237
|
+
return self
|
|
238
|
+
|
|
226
239
|
@self._ui_effect
|
|
227
240
|
def _():
|
|
228
241
|
element = cast(ui.element, self.element)
|
|
@@ -62,6 +62,7 @@ class RadioBindableUi(BindableUi[ui.radio], ValueElementMixin[Any]):
|
|
|
62
62
|
def bind_options(self, options: TGetterOrReadonlyRef):
|
|
63
63
|
@self._ui_signal_on(options, deep=True)
|
|
64
64
|
def _():
|
|
65
|
+
ParameterClassifier.mark_event_source_as_internal(self.element)
|
|
65
66
|
self.element.set_options(to_value(options))
|
|
66
67
|
|
|
67
68
|
return self
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Any, Callable, Optional, Dict, cast
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from ex4nicegui.utils.signals import (
|
|
5
|
+
_TMaybeRef as TMaybeRef,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
from nicegui import ui
|
|
9
|
+
from ex4nicegui.reactive.base import BindableUi, DisableableMixin
|
|
10
|
+
from ex4nicegui.reactive.services.reactive_service import ParameterClassifier
|
|
11
|
+
from ex4nicegui.reactive.mixins.value_element import ValueElementMixin
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RangeBindableUi(
|
|
15
|
+
BindableUi[ui.range],
|
|
16
|
+
DisableableMixin,
|
|
17
|
+
ValueElementMixin[Dict[str, int]],
|
|
18
|
+
):
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
*,
|
|
22
|
+
min: TMaybeRef[float], # pylint: disable=redefined-builtin
|
|
23
|
+
max: TMaybeRef[float], # pylint: disable=redefined-builtin
|
|
24
|
+
step: TMaybeRef[float] = 1.0,
|
|
25
|
+
value: Optional[TMaybeRef[Dict[str, int]]] = None,
|
|
26
|
+
on_change: Optional[Callable[..., Any]] = None,
|
|
27
|
+
) -> None:
|
|
28
|
+
pc = ParameterClassifier(
|
|
29
|
+
locals(),
|
|
30
|
+
maybeRefs=["min", "max", "step", "value"],
|
|
31
|
+
v_model=("value", "on_change"),
|
|
32
|
+
events=["on_change"],
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
value_kws = pc.get_values_kws()
|
|
36
|
+
|
|
37
|
+
element = ui.range(**value_kws)
|
|
38
|
+
super().__init__(element) # type: ignore
|
|
39
|
+
|
|
40
|
+
for key, value in pc.get_bindings().items():
|
|
41
|
+
self.bind_prop(key, value) # type: ignore
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def value(self):
|
|
45
|
+
return cast(Dict[str, int], self.element.value)
|
|
@@ -93,6 +93,7 @@ class SelectBindableUi(BindableUi[ui.select]):
|
|
|
93
93
|
def bind_value(self, value: TGetterOrReadonlyRef):
|
|
94
94
|
@self._ui_signal_on(value, deep=True)
|
|
95
95
|
def _():
|
|
96
|
+
ParameterClassifier.mark_event_source_as_internal(self.element)
|
|
96
97
|
cast(ValueElement, self.element).set_value(to_raw(to_value(value)) or None)
|
|
97
98
|
|
|
98
99
|
return self
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import inspect
|
|
2
|
+
from typing import Awaitable, Callable, Union
|
|
1
3
|
from ex4nicegui.reactive.services.reactive_service import ParameterClassifier
|
|
2
4
|
from ex4nicegui.utils.signals import (
|
|
3
5
|
_TMaybeRef as TMaybeRef,
|
|
4
6
|
)
|
|
5
|
-
from nicegui import ui
|
|
7
|
+
from nicegui import ui, background_tasks, core
|
|
6
8
|
from .base import BindableUi
|
|
7
9
|
|
|
8
10
|
|
|
@@ -21,3 +23,52 @@ class TabPanelBindableUi(BindableUi[ui.tab_panel]):
|
|
|
21
23
|
|
|
22
24
|
for key, value in pc.get_bindings().items():
|
|
23
25
|
self.bind_prop(key, value) # type: ignore
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class lazy_tab_panel(TabPanelBindableUi):
|
|
29
|
+
def __init__(self, name: str) -> None:
|
|
30
|
+
super().__init__(name)
|
|
31
|
+
self._build_fn = None
|
|
32
|
+
|
|
33
|
+
def try_run_build_fn(self):
|
|
34
|
+
if self._build_fn:
|
|
35
|
+
_helper.run_build_fn(self, self.element._props["name"])
|
|
36
|
+
self._build_fn = None
|
|
37
|
+
|
|
38
|
+
def build_fn(self, fn: Callable[..., Union[None, Awaitable]]):
|
|
39
|
+
self._build_fn = fn
|
|
40
|
+
return fn
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _helper:
|
|
44
|
+
@staticmethod
|
|
45
|
+
def run_build_fn(panel: lazy_tab_panel, name: str) -> None:
|
|
46
|
+
""" """
|
|
47
|
+
fn = panel._build_fn
|
|
48
|
+
if fn is None:
|
|
49
|
+
return
|
|
50
|
+
try:
|
|
51
|
+
expects_arguments = any(
|
|
52
|
+
p.default is inspect.Parameter.empty
|
|
53
|
+
and p.kind is not inspect.Parameter.VAR_POSITIONAL
|
|
54
|
+
and p.kind is not inspect.Parameter.VAR_KEYWORD
|
|
55
|
+
for p in inspect.signature(fn).parameters.values()
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
with panel:
|
|
59
|
+
result = fn(name) if expects_arguments else fn()
|
|
60
|
+
if isinstance(result, Awaitable):
|
|
61
|
+
# NOTE: await an awaitable result even if the handler is not a coroutine (like a lambda statement)
|
|
62
|
+
async def wait_for_result():
|
|
63
|
+
with panel:
|
|
64
|
+
try:
|
|
65
|
+
await result
|
|
66
|
+
except Exception as e:
|
|
67
|
+
core.app.handle_exception(e)
|
|
68
|
+
|
|
69
|
+
if core.loop and core.loop.is_running():
|
|
70
|
+
background_tasks.create(wait_for_result(), name=str(fn))
|
|
71
|
+
else:
|
|
72
|
+
core.app.on_startup(wait_for_result())
|
|
73
|
+
except Exception as e:
|
|
74
|
+
core.app.handle_exception(e)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import inspect
|
|
2
1
|
from typing import Any, Awaitable, Callable, Optional, Union
|
|
3
2
|
from weakref import WeakValueDictionary
|
|
4
3
|
from ex4nicegui.reactive.services.reactive_service import ParameterClassifier
|
|
@@ -8,9 +7,10 @@ from ex4nicegui.utils.signals import (
|
|
|
8
7
|
_TMaybeRef as TMaybeRef,
|
|
9
8
|
)
|
|
10
9
|
from ex4nicegui.utils.scheduler import next_tick
|
|
11
|
-
from nicegui import ui
|
|
10
|
+
from nicegui import ui
|
|
12
11
|
from .base import BindableUi
|
|
13
12
|
from ex4nicegui.reactive.mixins.value_element import ValueElementMixin
|
|
13
|
+
from .tab_panel import lazy_tab_panel
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class TabPanelsBindableUi(BindableUi[ui.tab_panels], ValueElementMixin[bool]):
|
|
@@ -57,21 +57,6 @@ class TabPanelsBindableUi(BindableUi[ui.tab_panels], ValueElementMixin[bool]):
|
|
|
57
57
|
return super().bind_prop(prop, value)
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
class lazy_tab_panel(ui.tab_panel):
|
|
61
|
-
def __init__(self, name: str) -> None:
|
|
62
|
-
super().__init__(name)
|
|
63
|
-
self._build_fn = None
|
|
64
|
-
|
|
65
|
-
def try_run_build_fn(self):
|
|
66
|
-
if self._build_fn:
|
|
67
|
-
_helper.run_build_fn(self, self._props["name"])
|
|
68
|
-
self._build_fn = None
|
|
69
|
-
|
|
70
|
-
def build_fn(self, fn: Callable[..., Union[None, Awaitable]]):
|
|
71
|
-
self._build_fn = fn
|
|
72
|
-
return fn
|
|
73
|
-
|
|
74
|
-
|
|
75
60
|
class LazyTabPanelsBindableUi(TabPanelsBindableUi):
|
|
76
61
|
def __init__(
|
|
77
62
|
self,
|
|
@@ -96,26 +81,32 @@ class LazyTabPanelsBindableUi(TabPanelsBindableUi):
|
|
|
96
81
|
value, on_change=on_change, animated=animated, keep_alive=keep_alive
|
|
97
82
|
)
|
|
98
83
|
|
|
99
|
-
self.
|
|
84
|
+
self._panels: WeakValueDictionary[str, lazy_tab_panel] = WeakValueDictionary()
|
|
100
85
|
|
|
101
86
|
if value:
|
|
102
87
|
|
|
103
88
|
@self._ui_effect
|
|
104
89
|
def _():
|
|
105
90
|
current_value = to_value(value)
|
|
106
|
-
if current_value in self.
|
|
107
|
-
panel = self.
|
|
91
|
+
if current_value in self._panels:
|
|
92
|
+
panel = self._panels[current_value]
|
|
108
93
|
|
|
109
94
|
@next_tick
|
|
110
95
|
def _():
|
|
111
96
|
panel.try_run_build_fn()
|
|
112
97
|
|
|
113
98
|
def add_tab_panel(self, name: str):
|
|
99
|
+
"""Add a tab panel.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
name (str): The name of the tab panel.
|
|
103
|
+
"""
|
|
104
|
+
|
|
114
105
|
def decorator(fn: Callable[..., Union[None, Awaitable]]):
|
|
115
106
|
with self:
|
|
116
107
|
panel = lazy_tab_panel(name)
|
|
117
|
-
str_name = panel._props["name"]
|
|
118
|
-
self.
|
|
108
|
+
str_name = panel.element._props["name"]
|
|
109
|
+
self._panels[str_name] = panel
|
|
119
110
|
panel.build_fn(fn)
|
|
120
111
|
|
|
121
112
|
if self.value == name:
|
|
@@ -125,36 +116,11 @@ class LazyTabPanelsBindableUi(TabPanelsBindableUi):
|
|
|
125
116
|
|
|
126
117
|
return decorator
|
|
127
118
|
|
|
119
|
+
def get_panel(self, name: str) -> lazy_tab_panel:
|
|
120
|
+
"""Get a tab panel by name.
|
|
128
121
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"""
|
|
133
|
-
|
|
134
|
-
if fn is None:
|
|
135
|
-
return
|
|
136
|
-
try:
|
|
137
|
-
expects_arguments = any(
|
|
138
|
-
p.default is inspect.Parameter.empty
|
|
139
|
-
and p.kind is not inspect.Parameter.VAR_POSITIONAL
|
|
140
|
-
and p.kind is not inspect.Parameter.VAR_KEYWORD
|
|
141
|
-
for p in inspect.signature(fn).parameters.values()
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
with panel:
|
|
145
|
-
result = fn(name) if expects_arguments else fn()
|
|
146
|
-
if isinstance(result, Awaitable):
|
|
147
|
-
# NOTE: await an awaitable result even if the handler is not a coroutine (like a lambda statement)
|
|
148
|
-
async def wait_for_result():
|
|
149
|
-
with panel:
|
|
150
|
-
try:
|
|
151
|
-
await result
|
|
152
|
-
except Exception as e:
|
|
153
|
-
core.app.handle_exception(e)
|
|
154
|
-
|
|
155
|
-
if core.loop and core.loop.is_running():
|
|
156
|
-
background_tasks.create(wait_for_result(), name=str(fn))
|
|
157
|
-
else:
|
|
158
|
-
core.app.on_startup(wait_for_result())
|
|
159
|
-
except Exception as e:
|
|
160
|
-
core.app.handle_exception(e)
|
|
122
|
+
Args:
|
|
123
|
+
name (str): The name of the tab panel.
|
|
124
|
+
|
|
125
|
+
"""
|
|
126
|
+
return self._panels[name]
|
|
@@ -83,6 +83,7 @@ class ToggleBindableUi(BindableUi[ui.toggle]):
|
|
|
83
83
|
def bind_value(self, value: TGetterOrReadonlyRef):
|
|
84
84
|
@self._ui_signal_on(value, deep=True)
|
|
85
85
|
def _():
|
|
86
|
+
ParameterClassifier.mark_event_source_as_internal(self.element)
|
|
86
87
|
self.element.set_value(to_raw(to_value(value)) or None)
|
|
87
88
|
|
|
88
89
|
return self
|
|
@@ -18,6 +18,9 @@ from ex4nicegui.reactive.systems.reactive_system import (
|
|
|
18
18
|
from ex4nicegui.utils.proxy import is_base_type_proxy
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
_EVENT_SOURCE_INTERNAL_FLAG = "__ex4ng_set_value_from_signal_"
|
|
22
|
+
|
|
23
|
+
|
|
21
24
|
class ParameterClassifier:
|
|
22
25
|
def __init__(
|
|
23
26
|
self,
|
|
@@ -71,7 +74,14 @@ class ParameterClassifier:
|
|
|
71
74
|
if is_setter_ref(model_value):
|
|
72
75
|
|
|
73
76
|
def inject_on_change(e):
|
|
74
|
-
|
|
77
|
+
change_from_inner_signal = (
|
|
78
|
+
ParameterClassifier.get_event_source_internal_flag(e.sender)
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
if not change_from_inner_signal:
|
|
82
|
+
model_value.value = self.v_model_arg_getter(e) # type: ignore
|
|
83
|
+
|
|
84
|
+
ParameterClassifier.remove_event_source_internal_flag(e.sender)
|
|
75
85
|
handle_event(event, e)
|
|
76
86
|
|
|
77
87
|
value_kws.update({event_name: inject_on_change})
|
|
@@ -85,6 +95,18 @@ class ParameterClassifier:
|
|
|
85
95
|
if (k in self.maybeRefs and (is_ref(v) or isinstance(v, Callable)))
|
|
86
96
|
}
|
|
87
97
|
|
|
98
|
+
@staticmethod
|
|
99
|
+
def mark_event_source_as_internal(element: ui.element):
|
|
100
|
+
element.__dict__[_EVENT_SOURCE_INTERNAL_FLAG] = True
|
|
101
|
+
|
|
102
|
+
@staticmethod
|
|
103
|
+
def get_event_source_internal_flag(element: ui.element):
|
|
104
|
+
return element.__dict__.get(_EVENT_SOURCE_INTERNAL_FLAG, False)
|
|
105
|
+
|
|
106
|
+
@staticmethod
|
|
107
|
+
def remove_event_source_internal_flag(element: ui.element):
|
|
108
|
+
element.__dict__.pop(_EVENT_SOURCE_INTERNAL_FLAG, None)
|
|
109
|
+
|
|
88
110
|
|
|
89
111
|
def inject_handle_delete(element: ui.element, on_delete: Callable[[], None]):
|
|
90
112
|
inject_method(element, "_handle_delete", on_delete)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ex4nicegui
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.4
|
|
4
4
|
Summary: Extension library based on nicegui, providing data responsive,BI functionality modules
|
|
5
5
|
Home-page: https://github.com/CrystalWindSnake/ex4nicegui
|
|
6
6
|
License: MIT
|
|
@@ -358,6 +358,71 @@ def _():
|
|
|
358
358
|
|
|
359
359
|
> 建议总是通过 `.on` 指定依赖关系,避免预料之外的刷新
|
|
360
360
|
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
### 数据持久化
|
|
364
|
+
|
|
365
|
+
`ViewModel` 使用代理对象创建响应式数据,当需要保存数据时,可以使用 `rxui.ViewModel.to_value` 转换成普通数据.
|
|
366
|
+
|
|
367
|
+
下面的例子,点击按钮将显示 my_app 的状态数据字典。
|
|
368
|
+
```python
|
|
369
|
+
from nicegui import ui
|
|
370
|
+
from ex4nicegui import rxui
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
class MyApp(rxui.ViewModel):
|
|
374
|
+
a = 0
|
|
375
|
+
sign = "+"
|
|
376
|
+
b = 0
|
|
377
|
+
|
|
378
|
+
def show_data(self):
|
|
379
|
+
# >> {"a": 0, "sign": '+, "b": 0}
|
|
380
|
+
return rxui.ViewModel.to_value(self)
|
|
381
|
+
|
|
382
|
+
def show_a(self):
|
|
383
|
+
# >> 0
|
|
384
|
+
return rxui.ViewModel.to_value(self.a)
|
|
385
|
+
|
|
386
|
+
my_app = MyApp()
|
|
387
|
+
|
|
388
|
+
rxui.number(value=my_app.a, min=0, max=10)
|
|
389
|
+
rxui.radio(["+", "-", "*", "/"], value=my_app.sign)
|
|
390
|
+
rxui.number(value=my_app.b, min=0, max=10)
|
|
391
|
+
|
|
392
|
+
ui.button("show data", on_click=lambda: ui.notify(my_app.show_data()))
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
结合 `rxui.ViewModel.on_refs_changed` ,可以在数据变化时,自动保存数据到本地。
|
|
397
|
+
|
|
398
|
+
```python
|
|
399
|
+
from nicegui import ui
|
|
400
|
+
from ex4nicegui import rxui
|
|
401
|
+
from pathlib import Path
|
|
402
|
+
import json
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
class MyApp(rxui.ViewModel):
|
|
406
|
+
a = 0
|
|
407
|
+
sign = "+"
|
|
408
|
+
b = 0
|
|
409
|
+
|
|
410
|
+
_json_path = Path(__file__).parent / "data.json"
|
|
411
|
+
|
|
412
|
+
def __init__(self):
|
|
413
|
+
super().__init__()
|
|
414
|
+
|
|
415
|
+
@rxui.ViewModel.on_refs_changed(self)
|
|
416
|
+
def _():
|
|
417
|
+
# a, sign, b 任意一个值变化时,自动保存到本地
|
|
418
|
+
self._json_path.write_text(json.dumps(self.show_data()))
|
|
419
|
+
|
|
420
|
+
def show_data(self):
|
|
421
|
+
return rxui.ViewModel.to_value(self)
|
|
422
|
+
...
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
|
|
361
426
|
|
|
362
427
|
---
|
|
363
428
|
|
|
@@ -371,6 +436,7 @@ def _():
|
|
|
371
436
|
- [二次计算缓存](#二次计算缓存)
|
|
372
437
|
- [列表](#列表)
|
|
373
438
|
- [列表循环](#列表循环)
|
|
439
|
+
- [数据持久化](#数据持久化)
|
|
374
440
|
- [apis](#apis)
|
|
375
441
|
- [ViewModel](#viewmodel)
|
|
376
442
|
- [使用列表](#使用列表)
|
|
@@ -1339,11 +1405,16 @@ with rxui.lazy_tab_panels(current_tab) as panels:
|
|
|
1339
1405
|
|
|
1340
1406
|
@panels.add_tab_panel("t1")
|
|
1341
1407
|
def _():
|
|
1408
|
+
# 通过 `panels.get_panel` 获取当前激活的 panel 组件
|
|
1409
|
+
panels.get_panel("t1").classes("bg-green")
|
|
1342
1410
|
ui.notify("Hello from t1")
|
|
1411
|
+
ui.label("This is t1")
|
|
1343
1412
|
|
|
1344
1413
|
@panels.add_tab_panel("t2")
|
|
1345
1414
|
def _():
|
|
1415
|
+
panels.get_panel("t2").style("background-color : red")
|
|
1346
1416
|
ui.notify("Hello from t2")
|
|
1417
|
+
ui.label("This is t2")
|
|
1347
1418
|
|
|
1348
1419
|
```
|
|
1349
1420
|
|
|
@@ -70,8 +70,8 @@ ex4nicegui/libs/gsap/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
70
70
|
ex4nicegui/libs/gsap/utils/matrix.js,sha256=77scrxbQZXx4ex5HkvnT9IkhMG1rQoDNp4TSYgUeYVk,15235
|
|
71
71
|
ex4nicegui/libs/gsap/utils/paths.js,sha256=2SPaRHQ7zgba9cH8hGhkTYPCZdrrEhE2qhh6ECAEvSA,49314
|
|
72
72
|
ex4nicegui/libs/gsap/utils/strings.js,sha256=47G9slz5ltG9mDSwrfQDtWzzdV5QJ-AIMLRMNK0VSiM,10472
|
|
73
|
-
ex4nicegui/reactive/__init__.py,sha256=
|
|
74
|
-
ex4nicegui/reactive/base.py,sha256=
|
|
73
|
+
ex4nicegui/reactive/__init__.py,sha256=8o_kpKvzjfLtHNAzmDYcmHRbfBbnBNdAH6D1O5cCaag,4445
|
|
74
|
+
ex4nicegui/reactive/base.py,sha256=CQmWhrKHNMF2ql7O6VOKEOBdEcc3-yagOcERpnUPYus,16323
|
|
75
75
|
ex4nicegui/reactive/deferredTask.py,sha256=g78TTG1EIkBxjPih01xmrCZw9OxQG93veSVSELWKfcU,987
|
|
76
76
|
ex4nicegui/reactive/dropZone/dropZone.js,sha256=7rSpFJX-Fk_W_NGZhOTyuEw0bzR-YUc8ZYPzQG9KzE0,2713
|
|
77
77
|
ex4nicegui/reactive/dropZone/dropZone.py,sha256=hg9UKTayff8v8Ek-n38h_3wX1Qmiotvdyv1Hsqilh5Y,2590
|
|
@@ -118,18 +118,19 @@ ex4nicegui/reactive/officials/knob.py,sha256=TPKrquOBD9fBI9aBipE0qYy22dQJCcX9wNZ
|
|
|
118
118
|
ex4nicegui/reactive/officials/label.py,sha256=kCair4NpFB7bvsPukMFcDBqDXk2BxOLzBQXSNx5EWuw,1428
|
|
119
119
|
ex4nicegui/reactive/officials/linear_progress.py,sha256=T-z8_68FxSwdFH0hBFMA2X0JEeLoVFpJyya5RHlf7U8,2045
|
|
120
120
|
ex4nicegui/reactive/officials/number.py,sha256=L_uMY-t5SONENI3b44DjSi7JwcdfYAldGZCvqX1h6Dw,2796
|
|
121
|
-
ex4nicegui/reactive/officials/radio.py,sha256=
|
|
121
|
+
ex4nicegui/reactive/officials/radio.py,sha256=l_PnmnirZ1_CYA0_jxbDfSVgM7m4NHzNOnCrNRyAmfI,1889
|
|
122
|
+
ex4nicegui/reactive/officials/range.py,sha256=48EgNJc-vBZwAqewPtLjr4oQwEiAsEl6e0-AGpr0u0s,1405
|
|
122
123
|
ex4nicegui/reactive/officials/row.py,sha256=ZWJnb6nC9XMfmRmzeVKnHwUnxrCpbxaEBJ3lSVj5m5s,1384
|
|
123
|
-
ex4nicegui/reactive/officials/select.py,sha256=
|
|
124
|
+
ex4nicegui/reactive/officials/select.py,sha256=pS9feUPcePIMxOTw4cZSKEIPAHf8G_CrkfNVSLkYY-Q,3130
|
|
124
125
|
ex4nicegui/reactive/officials/slider.py,sha256=9pA7CHlfkKY-kLQGWn4VOnMa2-tXHI04R1YA4xENIWI,2871
|
|
125
126
|
ex4nicegui/reactive/officials/switch.py,sha256=XMUdOVP357gGVNU_tjrBtxw5Xuk5MyhLhHI-6sTtCcc,1456
|
|
126
127
|
ex4nicegui/reactive/officials/tab.py,sha256=nyB7Ksc_tWG-RaAXiu3TTIJvkNeSa9AZdwHXuL2SsOE,1433
|
|
127
|
-
ex4nicegui/reactive/officials/tab_panel.py,sha256=
|
|
128
|
-
ex4nicegui/reactive/officials/tab_panels.py,sha256=
|
|
128
|
+
ex4nicegui/reactive/officials/tab_panel.py,sha256=yRgQBSCbrkcw59M8HlIWc2GaXhqC4awRQlYug0AkBtE,2501
|
|
129
|
+
ex4nicegui/reactive/officials/tab_panels.py,sha256=dN5anN03DlpDvkUP_QiY047i4mO7KQP3KUHAmMMVnOY,4592
|
|
129
130
|
ex4nicegui/reactive/officials/table.py,sha256=B_nX19UxwyxGKsxLuu2x4UNwxsapjTBw70RMBWDI8w0,6206
|
|
130
131
|
ex4nicegui/reactive/officials/tabs.py,sha256=kvAXeZkgi8USCyxislvjPmmWofZ31DMfiHqEObANpYU,1247
|
|
131
132
|
ex4nicegui/reactive/officials/textarea.py,sha256=_N6eDW_Cbn4Z4OEcjC4koHt0kEEaFEjDrLZ9Ju2NpsQ,3000
|
|
132
|
-
ex4nicegui/reactive/officials/toggle.py,sha256=
|
|
133
|
+
ex4nicegui/reactive/officials/toggle.py,sha256=7Dc6IIYzgsTwThE0pZegOaVe9x_GgL7a2E6Hsiuc1lg,2740
|
|
133
134
|
ex4nicegui/reactive/officials/tooltip.py,sha256=lkDOf5Z6vpDsO9Y-nsRRwdhmYVFb9YrWv7lQUNY4_Ho,1136
|
|
134
135
|
ex4nicegui/reactive/officials/upload.py,sha256=5SX2CFkf3s_4bPcnx0bmKRA4eYVlm0S8RBeQ7qHnqck,2395
|
|
135
136
|
ex4nicegui/reactive/q_pagination.py,sha256=nUszZ4fvCf4leQ1DpS70laCDf40RprbOex7SISbAEek,1555
|
|
@@ -137,7 +138,7 @@ ex4nicegui/reactive/rxui.py,sha256=gZ8ZEjGuJFKcedEZhcm4PIZguNkY-Wv5yQx80QnsBKI,3
|
|
|
137
138
|
ex4nicegui/reactive/scopedStyle.js,sha256=RtpfUwkpjMv_cbplkr2UtydKAxB5Dz7Sm6jRgPHRhow,1569
|
|
138
139
|
ex4nicegui/reactive/scopedStyle.py,sha256=aYP4sIFzAmPaLyZV8m9jqyuGmOcJnC-5s07UQnoNSag,738
|
|
139
140
|
ex4nicegui/reactive/services/pandas_service.py,sha256=XOoy6tZr4TpTyhewAH59eiSwVFxqwOipdM_j-mkGpdM,1043
|
|
140
|
-
ex4nicegui/reactive/services/reactive_service.py,sha256=
|
|
141
|
+
ex4nicegui/reactive/services/reactive_service.py,sha256=FT8tWCC_aMD1YK6V4jQreyGmQAbcWzKbaGGZ4ME-bKw,3659
|
|
141
142
|
ex4nicegui/reactive/systems/color_system.py,sha256=qXRTczxfILduHAVlNJqLSed-0x-LN6TyBSegYwW9vfk,4352
|
|
142
143
|
ex4nicegui/reactive/systems/object_system.py,sha256=bja9YNb4v5fVZl5gJvVA4HbwRssRp-2yFy3JBzNeKxA,752
|
|
143
144
|
ex4nicegui/reactive/systems/reactive_system.py,sha256=wyCSPdGuH1jOOkb2mXWRYVpdebjSm0qi9fuiVAkw5tA,701
|
|
@@ -177,7 +178,7 @@ ex4nicegui/utils/scheduler.py,sha256=1gyq7Y2BkbwmPK_Q9kpRpc1MOC9H7xcpxuix-RZhN9k
|
|
|
177
178
|
ex4nicegui/utils/signals.py,sha256=Jz0jKFPrJIRV0Gye62Bgk2kGgod1KBvDhnF-W3lRm04,7373
|
|
178
179
|
ex4nicegui/utils/types.py,sha256=pE5WOSbcTHxaAhnT24FaZEd1B2Z_lTcsd46w0OKiMyc,359
|
|
179
180
|
ex4nicegui/version.py,sha256=NE7u1piESstg3xCtf5hhV4iedGs2qJQw9SiC3ZSpiio,90
|
|
180
|
-
ex4nicegui-0.8.
|
|
181
|
-
ex4nicegui-0.8.
|
|
182
|
-
ex4nicegui-0.8.
|
|
183
|
-
ex4nicegui-0.8.
|
|
181
|
+
ex4nicegui-0.8.4.dist-info/LICENSE,sha256=0KDDElS2dl-HIsWvbpy8ywbLzJMBFzXLev57LnMIZXs,1094
|
|
182
|
+
ex4nicegui-0.8.4.dist-info/METADATA,sha256=cBVnP2mHqRcq4eY9VLw6NL5F_8xk9bpk3vUllBnjfkc,44094
|
|
183
|
+
ex4nicegui-0.8.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
184
|
+
ex4nicegui-0.8.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|