ex4nicegui 0.8.5__py3-none-any.whl → 0.8.6__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/EChartsComponent/utils.py +0 -1
- ex4nicegui/reactive/officials/grid.py +43 -3
- ex4nicegui/utils/asyncComputed.py +3 -0
- ex4nicegui/utils/proxy/dict.py +0 -1
- {ex4nicegui-0.8.5.dist-info → ex4nicegui-0.8.6.dist-info}/METADATA +2 -2
- {ex4nicegui-0.8.5.dist-info → ex4nicegui-0.8.6.dist-info}/RECORD +8 -8
- {ex4nicegui-0.8.5.dist-info → ex4nicegui-0.8.6.dist-info}/LICENSE +0 -0
- {ex4nicegui-0.8.5.dist-info → ex4nicegui-0.8.6.dist-info}/WHEEL +0 -0
|
@@ -26,7 +26,6 @@ def create_event_handler_args(
|
|
|
26
26
|
event_name: _T_event_name, e: GenericEventArguments
|
|
27
27
|
) -> UiEventArguments:
|
|
28
28
|
if is_mouse_event(event_name):
|
|
29
|
-
print(e.args)
|
|
30
29
|
return EChartsMouseEventArguments(sender=e.sender, client=e.client, **e.args)
|
|
31
30
|
|
|
32
31
|
return GenericEventArguments(sender=e.sender, client=e.client, args=e.args)
|
|
@@ -8,14 +8,21 @@ from ex4nicegui.reactive.services.reactive_service import ParameterClassifier
|
|
|
8
8
|
|
|
9
9
|
from nicegui import ui
|
|
10
10
|
from .base import BindableUi
|
|
11
|
-
from ex4nicegui.utils.signals import
|
|
11
|
+
from ex4nicegui.utils.signals import (
|
|
12
|
+
_TMaybeRef as TMaybeRef,
|
|
13
|
+
TGetterOrReadonlyRef,
|
|
14
|
+
to_value,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
_T_Template = Union[TMaybeRef[str], TMaybeRef[int]]
|
|
12
19
|
|
|
13
20
|
|
|
14
21
|
class GridBindableUi(BindableUi[ui.grid]):
|
|
15
22
|
def __init__(
|
|
16
23
|
self,
|
|
17
|
-
rows: Optional[
|
|
18
|
-
columns: Optional[
|
|
24
|
+
rows: Optional[_T_Template] = None,
|
|
25
|
+
columns: Optional[_T_Template] = None,
|
|
19
26
|
) -> None:
|
|
20
27
|
pc = ParameterClassifier(locals(), maybeRefs=["rows", "columns"], events=[])
|
|
21
28
|
|
|
@@ -25,6 +32,39 @@ class GridBindableUi(BindableUi[ui.grid]):
|
|
|
25
32
|
for key, value in pc.get_bindings().items():
|
|
26
33
|
self.bind_prop(key, value) # type: ignore
|
|
27
34
|
|
|
35
|
+
def bind_prop(self, prop: str, value: TGetterOrReadonlyRef):
|
|
36
|
+
if prop == "rows":
|
|
37
|
+
return self.bind_rows(value)
|
|
38
|
+
|
|
39
|
+
if prop == "columns":
|
|
40
|
+
return self.bind_columns(value)
|
|
41
|
+
|
|
42
|
+
return super().bind_prop(prop, value)
|
|
43
|
+
|
|
44
|
+
def bind_rows(self, rows: TGetterOrReadonlyRef[Union[int, str]]):
|
|
45
|
+
def template():
|
|
46
|
+
_rows = to_value(rows)
|
|
47
|
+
return (
|
|
48
|
+
f"repeat({_rows}, minmax(0, 1fr))" if isinstance(_rows, int) else _rows
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
self.bind_style({"grid-template-rows": template})
|
|
52
|
+
|
|
53
|
+
return self
|
|
54
|
+
|
|
55
|
+
def bind_columns(self, columns: TGetterOrReadonlyRef[Union[int, str]]):
|
|
56
|
+
def template():
|
|
57
|
+
_columns = to_value(columns)
|
|
58
|
+
return (
|
|
59
|
+
f"repeat({_columns}, minmax(0, 1fr))"
|
|
60
|
+
if isinstance(_columns, int)
|
|
61
|
+
else _columns
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
self.bind_style({"grid-template-columns": template})
|
|
65
|
+
|
|
66
|
+
return self
|
|
67
|
+
|
|
28
68
|
def __enter__(self):
|
|
29
69
|
self.element.__enter__()
|
|
30
70
|
return self
|
|
@@ -21,6 +21,7 @@ def async_computed(
|
|
|
21
21
|
*,
|
|
22
22
|
init: Optional[_T] = None,
|
|
23
23
|
evaluating: Optional[TRef[bool]] = None,
|
|
24
|
+
onchanges=True,
|
|
24
25
|
debug_trigger: Optional[Callable] = None,
|
|
25
26
|
debug_name: Optional[str] = None,
|
|
26
27
|
):
|
|
@@ -34,12 +35,14 @@ def async_computed(
|
|
|
34
35
|
refs (Union[TGetterOrReadonlyRef, Sequence[TGetterOrReadonlyRef]]): _description_
|
|
35
36
|
init (Optional[_T], optional): The initial state, used until the first evaluation finishes. Defaults to None.
|
|
36
37
|
evaluating (Optional[TRef[bool]], optional): Ref passed to receive the updated of async evaluation. Defaults to None.
|
|
38
|
+
onchanges (bool, optional): If set to `False`, it will trigger an immediate computation. Defaults to True.
|
|
37
39
|
|
|
38
40
|
"""
|
|
39
41
|
return signe.async_computed(
|
|
40
42
|
refs,
|
|
41
43
|
init=init,
|
|
42
44
|
evaluating=evaluating,
|
|
45
|
+
onchanges=onchanges,
|
|
43
46
|
debug_name=debug_name,
|
|
44
47
|
debug_trigger=debug_trigger,
|
|
45
48
|
scope=_CLIENT_SCOPE_MANAGER.get_current_scope(),
|
ex4nicegui/utils/proxy/dict.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ex4nicegui
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.6
|
|
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
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Requires-Dist: executing (>=2.0.1,<3.0.0)
|
|
19
19
|
Requires-Dist: nicegui (>=2.0.0,<3.0.0)
|
|
20
|
-
Requires-Dist: signe (>=0.4.
|
|
20
|
+
Requires-Dist: signe (>=0.4.22,<0.5.0)
|
|
21
21
|
Project-URL: Repository, https://github.com/CrystalWindSnake/ex4nicegui
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
|
|
@@ -79,7 +79,7 @@ ex4nicegui/reactive/EChartsComponent/ECharts.js,sha256=K9sX34SMnghwDMCkl-IA7Wsnt
|
|
|
79
79
|
ex4nicegui/reactive/EChartsComponent/ECharts.py,sha256=jLRdKqJWCtKHzNlFAX9ePAmzP1WSXRzBQAO0KHHkfBA,4258
|
|
80
80
|
ex4nicegui/reactive/EChartsComponent/events.py,sha256=ln10cNw5ODiSmdKVi6KBZ6JMR3YIZ6itYZcMgNAlKhA,741
|
|
81
81
|
ex4nicegui/reactive/EChartsComponent/types.py,sha256=_7AekG0IyzRpDEBZMtKRiZ3o3dUCcn6btegBk8c9Fig,1001
|
|
82
|
-
ex4nicegui/reactive/EChartsComponent/utils.py,sha256=
|
|
82
|
+
ex4nicegui/reactive/EChartsComponent/utils.py,sha256=YqxodbGD_lk_Bp-K8s8XvgqSXRf_CIHmzeubrqFRuVM,1013
|
|
83
83
|
ex4nicegui/reactive/empty.js,sha256=Y-caS4CN8jUq59LgGgcvgfkndze-RgWF_ZMmAcxOrbw,50
|
|
84
84
|
ex4nicegui/reactive/empty.py,sha256=kB851B12V1_VCNsFKW6OmjcdIiuZqGEGjLgA6k6yug8,132
|
|
85
85
|
ex4nicegui/reactive/fileWatcher.py,sha256=gjeZhgar02f-qGQa47Tj5SMaCP_ftRtSU898XUmXl1U,1472
|
|
@@ -108,7 +108,7 @@ ex4nicegui/reactive/officials/drawer.py,sha256=_Ro6stOh8U3igYMeDwI4omBgi1nld5ber
|
|
|
108
108
|
ex4nicegui/reactive/officials/echarts.py,sha256=xRBKVbcCUwUGA8n7bw2eJj9FBQIayL4t_rzXZrjD3Pc,10895
|
|
109
109
|
ex4nicegui/reactive/officials/element.py,sha256=-qsHcxfF3fMfU0sJlKtTksX_wYPMIPJ_AgFcZbbI754,412
|
|
110
110
|
ex4nicegui/reactive/officials/expansion.py,sha256=8xwJa0SpsVhFxbYwYRZtf1ul9m4oYTjgmtrRI_lqF_0,1822
|
|
111
|
-
ex4nicegui/reactive/officials/grid.py,sha256=
|
|
111
|
+
ex4nicegui/reactive/officials/grid.py,sha256=0vLLJOe7t_b351TsYOWpnrPsWKaqV_bG_010Xp-_BfY,2012
|
|
112
112
|
ex4nicegui/reactive/officials/html.js,sha256=lyvRAdMKZGOc7MPEapeU6WbOzq_MVzqzUJEhKuC8zWc,119
|
|
113
113
|
ex4nicegui/reactive/officials/html.py,sha256=XrOpGoAJDo8dtTnZVLSmi7H5iHffmYpeZ94lXxHjBwI,629
|
|
114
114
|
ex4nicegui/reactive/officials/icon.py,sha256=Um1yS681pcbsZ4o7GU_2w1NCfwFVXNu1a4asB2hzYUg,1374
|
|
@@ -165,7 +165,7 @@ ex4nicegui/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
165
165
|
ex4nicegui/tools/debug.py,sha256=h9iYHxw7jWWvmiExSpGi2hQl1PfhPZgC2KNS_GTuHSw,4868
|
|
166
166
|
ex4nicegui/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
167
|
ex4nicegui/utils/apiEffect.py,sha256=uwIi-R4Q0MaGSVmvhEFIL0O8pjBWobB_8brGAe19Qm4,2645
|
|
168
|
-
ex4nicegui/utils/asyncComputed.py,sha256
|
|
168
|
+
ex4nicegui/utils/asyncComputed.py,sha256=LPb4ytvzsUEV4sKQ9bQASJn2VPB_pjZzeKcHVwcvb_c,1672
|
|
169
169
|
ex4nicegui/utils/clientScope.py,sha256=AM5GQLXSIrLALnzz72ZmplykhKVhRjRxQdHdAeR7g7k,1719
|
|
170
170
|
ex4nicegui/utils/common.py,sha256=7P0vboDadLun6EMxNi3br9rKJgKt0QT4sy_66cHEwb4,994
|
|
171
171
|
ex4nicegui/utils/effect.py,sha256=LTtPTxx8-sP4VtZaFQjERB-ef3L2y5hu95GvTdj-nLo,2400
|
|
@@ -174,7 +174,7 @@ ex4nicegui/utils/proxy/base.py,sha256=g_7308xGAB3bB3EiEf_-0JKfUzImwt5_T9XVyT7zJJ
|
|
|
174
174
|
ex4nicegui/utils/proxy/bool.py,sha256=KQ2Sp2r4nLScif9DhupDmkpRhbsuXdpXTkxSrtFYtDE,1774
|
|
175
175
|
ex4nicegui/utils/proxy/date.py,sha256=wS0M4nfGVQ7A1u9tJkPqilEhDwcMKBjtTC9VjUsOqac,2356
|
|
176
176
|
ex4nicegui/utils/proxy/descriptor.py,sha256=VuPBXAE7mHbJ3EUAsftr3mettDvju79bR-SlwczRrAs,4594
|
|
177
|
-
ex4nicegui/utils/proxy/dict.py,sha256=
|
|
177
|
+
ex4nicegui/utils/proxy/dict.py,sha256=MPtx-09ylf_bHXnkr1c7PmJeaq2KpDp-_Shyw5YjOLU,3046
|
|
178
178
|
ex4nicegui/utils/proxy/float.py,sha256=fdMUS7_xwypdDNscuZaUn3NA0vx8LGswAOc9kw0jK0c,5271
|
|
179
179
|
ex4nicegui/utils/proxy/int.py,sha256=0Y7L924Zzq6LWRZEmaTmoXf0J6kC0o5EtW--2Lk7SNw,7381
|
|
180
180
|
ex4nicegui/utils/proxy/list.py,sha256=bmjBMlO8UfJekL1nfGypMO21RKraIj1jw46-8QwfptE,4913
|
|
@@ -186,7 +186,7 @@ ex4nicegui/utils/scheduler.py,sha256=1gyq7Y2BkbwmPK_Q9kpRpc1MOC9H7xcpxuix-RZhN9k
|
|
|
186
186
|
ex4nicegui/utils/signals.py,sha256=Jz0jKFPrJIRV0Gye62Bgk2kGgod1KBvDhnF-W3lRm04,7373
|
|
187
187
|
ex4nicegui/utils/types.py,sha256=pE5WOSbcTHxaAhnT24FaZEd1B2Z_lTcsd46w0OKiMyc,359
|
|
188
188
|
ex4nicegui/version.py,sha256=NE7u1piESstg3xCtf5hhV4iedGs2qJQw9SiC3ZSpiio,90
|
|
189
|
-
ex4nicegui-0.8.
|
|
190
|
-
ex4nicegui-0.8.
|
|
191
|
-
ex4nicegui-0.8.
|
|
192
|
-
ex4nicegui-0.8.
|
|
189
|
+
ex4nicegui-0.8.6.dist-info/LICENSE,sha256=0KDDElS2dl-HIsWvbpy8ywbLzJMBFzXLev57LnMIZXs,1094
|
|
190
|
+
ex4nicegui-0.8.6.dist-info/METADATA,sha256=_cFoYls_MNIYvzX1RQEo_95byNPo0WgBbj7hKZiG3c8,46125
|
|
191
|
+
ex4nicegui-0.8.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
192
|
+
ex4nicegui-0.8.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|