ex4nicegui 0.1.8__tar.gz → 0.1.9__tar.gz
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-0.1.8 → ex4nicegui-0.1.9}/PKG-INFO +1 -1
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/__init__.py +1 -1
- {ex4nicegui-0.1.8/ex4nicegui/reactive/echarts → ex4nicegui-0.1.9/ex4nicegui/reactive/ECharts}/ECharts.py +1 -1
- {ex4nicegui-0.1.8/ex4nicegui/reactive/draggable → ex4nicegui-0.1.9/ex4nicegui/reactive/UseDraggable}/UseDraggable.js +1 -1
- {ex4nicegui-0.1.8/ex4nicegui/reactive/draggable → ex4nicegui-0.1.9/ex4nicegui/reactive/UseDraggable}/UseDraggable.py +1 -1
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/__index.py +1 -1
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/officials.py +6 -4
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/useMouse/UseMouse.py +20 -9
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/PKG-INFO +1 -1
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/SOURCES.txt +6 -6
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/LICENSE +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/README.md +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/layout/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/layout/gridbox.py +0 -0
- {ex4nicegui-0.1.8/ex4nicegui/reactive/echarts → ex4nicegui-0.1.9/ex4nicegui/reactive/ECharts}/ECharts.js +0 -0
- {ex4nicegui-0.1.8/ex4nicegui/reactive/draggable → ex4nicegui-0.1.9/ex4nicegui/reactive/ECharts}/__init__.py +0 -0
- {ex4nicegui-0.1.8/ex4nicegui/reactive/echarts → ex4nicegui-0.1.9/ex4nicegui/reactive/UseDraggable}/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/drawer.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/local_file_picker.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/q_pagination.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/rxui.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/useMouse/UseMouse.js +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/useMouse/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/reactive/usePagination.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/tools/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/tools/debug.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/utils/__init__.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/utils/common.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui/utils/signals.py +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/dependency_links.txt +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/not-zip-safe +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/requires.txt +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/ex4nicegui.egg-info/top_level.txt +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/setup.cfg +0 -0
- {ex4nicegui-0.1.8 → ex4nicegui-0.1.9}/setup.py +0 -0
|
@@ -35,7 +35,7 @@ class EChartsClickEventArguments(EventArguments):
|
|
|
35
35
|
|
|
36
36
|
class echarts(Element, component="ECharts.js"):
|
|
37
37
|
def __init__(self, options: dict) -> None:
|
|
38
|
-
super().__init__(
|
|
38
|
+
super().__init__()
|
|
39
39
|
self._props["options"] = options
|
|
40
40
|
|
|
41
41
|
def update_options(self, options: dict, opts: Optional[dict] = None):
|
|
@@ -139,7 +139,7 @@ const pe = /* @__PURE__ */ H({
|
|
|
139
139
|
setup(e, { emit: r }) {
|
|
140
140
|
const t = e;
|
|
141
141
|
return q(() => {
|
|
142
|
-
const o = document.getElementById(t.elementId), { x: a, y: c, style: g, isDragging: _ } = le(o, t.options);
|
|
142
|
+
const o = document.getElementById(`c${t.elementId}`), { x: a, y: c, style: g, isDragging: _ } = le(o, t.options);
|
|
143
143
|
h([a, c, g], ([l, f, i]) => {
|
|
144
144
|
r("update", { x: l, y: f, style: i });
|
|
145
145
|
}), h(_, (l) => {
|
|
@@ -31,7 +31,7 @@ def use_draggable(element: Element, init_x=0.0, init_y=0.0, auto_bind_style=True
|
|
|
31
31
|
|
|
32
32
|
class UseDraggable(Element, component="UseDraggable.js"):
|
|
33
33
|
def __init__(self, element: Element, init_x=0.0, init_y=0.0) -> None:
|
|
34
|
-
super().__init__(
|
|
34
|
+
super().__init__()
|
|
35
35
|
self._props["elementId"] = str(element.id)
|
|
36
36
|
self._props["options"] = {"initialValue": {"x": init_x, "y": init_y}}
|
|
37
37
|
|
|
@@ -30,7 +30,7 @@ from .q_pagination import QPagination as q_pagination
|
|
|
30
30
|
from .local_file_picker import local_file_picker
|
|
31
31
|
from ex4nicegui.utils.signals import ref_computed
|
|
32
32
|
from signe import effect
|
|
33
|
-
from .
|
|
33
|
+
from .UseDraggable.UseDraggable import use_draggable
|
|
34
34
|
from .useMouse.UseMouse import use_mouse
|
|
35
35
|
from .drawer import drawer
|
|
36
36
|
from .usePagination import PaginationRef as use_pagination
|
|
@@ -35,7 +35,7 @@ from nicegui.elements.mixins.color_elements import (
|
|
|
35
35
|
TAILWIND_COLORS,
|
|
36
36
|
)
|
|
37
37
|
from nicegui.page_layout import Drawer
|
|
38
|
-
from ex4nicegui.reactive.
|
|
38
|
+
from ex4nicegui.reactive.ECharts.ECharts import echarts
|
|
39
39
|
|
|
40
40
|
T = TypeVar("T")
|
|
41
41
|
|
|
@@ -576,7 +576,7 @@ class LazySliderBindableUi(SliderBindableUi):
|
|
|
576
576
|
def onValueChanged():
|
|
577
577
|
self._ref.value = ele.value
|
|
578
578
|
|
|
579
|
-
ele.on("change
|
|
579
|
+
ele.on("change", onValueChanged)
|
|
580
580
|
|
|
581
581
|
|
|
582
582
|
class TextareaBindableUi(SingleValueBindableUi[str, ui.textarea]):
|
|
@@ -1346,8 +1346,10 @@ class ImageBindableUi(SingleValueBindableUi[Union[str, Path], ui.image]):
|
|
|
1346
1346
|
|
|
1347
1347
|
|
|
1348
1348
|
class UploadResult:
|
|
1349
|
-
def __init__(self, content: bytes = bytes()):
|
|
1349
|
+
def __init__(self, content: bytes = bytes(), name="", type=""):
|
|
1350
1350
|
self.content = content
|
|
1351
|
+
self.name = name
|
|
1352
|
+
self.type = type
|
|
1351
1353
|
|
|
1352
1354
|
def get_bytes(self):
|
|
1353
1355
|
return self.content
|
|
@@ -1361,7 +1363,7 @@ class UploadBindableUi(SingleValueBindableUi[UploadResult, ui.upload]):
|
|
|
1361
1363
|
@staticmethod
|
|
1362
1364
|
def _setup_(binder: "UploadBindableUi"):
|
|
1363
1365
|
def on_upload(e: ng_events.UploadEventArguments):
|
|
1364
|
-
binder._ref.value = UploadResult(e.content.read())
|
|
1366
|
+
binder._ref.value = UploadResult(e.content.read(), e.name, e.type)
|
|
1365
1367
|
|
|
1366
1368
|
binder._on_upload_callbacks.append(on_upload)
|
|
1367
1369
|
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
from typing import Any, Callable, Optional
|
|
1
|
+
from typing import Any, Callable, Optional, cast
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from nicegui.helpers import KWONLY_SLOTS
|
|
4
4
|
from nicegui.events import handle_event, EventArguments
|
|
5
5
|
from nicegui.element import Element
|
|
6
6
|
from signe import createSignal, effect, batch
|
|
7
|
+
from ex4nicegui.utils.signals import ref_from_signal
|
|
7
8
|
|
|
9
|
+
# from nicegui.dependencies import register_library
|
|
10
|
+
# from pathlib import Path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# register_library(Path(__file__).parent / "index-6543384e.js")
|
|
8
14
|
|
|
9
15
|
_Update_Args = [
|
|
10
16
|
"x",
|
|
@@ -22,14 +28,19 @@ class UseMouseUpdateEventArguments(EventArguments):
|
|
|
22
28
|
|
|
23
29
|
class UseMouse(Element, component="UseMouse.js"):
|
|
24
30
|
def __init__(self, options: Optional[dict] = None) -> None:
|
|
25
|
-
super().__init__(
|
|
31
|
+
super().__init__()
|
|
26
32
|
|
|
27
33
|
if options:
|
|
28
34
|
self._props["options"] = options
|
|
29
35
|
|
|
30
36
|
self.__x_getter, self.__x_setter = createSignal(0.0)
|
|
37
|
+
self.__x_readonly_ref = ref_from_signal(self.__x_getter)
|
|
38
|
+
|
|
31
39
|
self.__y_getter, self.__y_setter = createSignal(0.0)
|
|
40
|
+
self.__y_readonly_ref = ref_from_signal(self.__y_getter)
|
|
41
|
+
|
|
32
42
|
self.__sourceType_getter, self.__sourceType_setter = createSignal("sourceType")
|
|
43
|
+
self.__sourceType_readonly_ref = ref_from_signal(self.__sourceType_getter)
|
|
33
44
|
|
|
34
45
|
def update(args: UseMouseUpdateEventArguments):
|
|
35
46
|
@batch
|
|
@@ -42,15 +53,15 @@ class UseMouse(Element, component="UseMouse.js"):
|
|
|
42
53
|
|
|
43
54
|
@property
|
|
44
55
|
def x(self):
|
|
45
|
-
return self.
|
|
56
|
+
return self.__x_readonly_ref
|
|
46
57
|
|
|
47
58
|
@property
|
|
48
59
|
def y(self):
|
|
49
|
-
return self.
|
|
60
|
+
return self.__y_readonly_ref
|
|
50
61
|
|
|
51
62
|
@property
|
|
52
63
|
def sourceType(self):
|
|
53
|
-
return self.
|
|
64
|
+
return self.__sourceType_readonly_ref
|
|
54
65
|
|
|
55
66
|
def on_update(self, handler: Optional[Callable[..., Any]]):
|
|
56
67
|
def inner_handler(e):
|
|
@@ -69,12 +80,12 @@ class UseMouse(Element, component="UseMouse.js"):
|
|
|
69
80
|
self.on("update", inner_handler, args=_Update_Args)
|
|
70
81
|
|
|
71
82
|
|
|
72
|
-
_Use_Mouse_Ins =
|
|
83
|
+
_Use_Mouse_Ins = None
|
|
73
84
|
|
|
74
85
|
|
|
75
86
|
def use_mouse(options: Optional[dict] = None):
|
|
76
87
|
global _Use_Mouse_Ins
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
if _Use_Mouse_Ins is None:
|
|
89
|
+
_Use_Mouse_Ins = UseMouse(options)
|
|
79
90
|
|
|
80
|
-
return _Use_Mouse_Ins
|
|
91
|
+
return cast(UseMouse, _Use_Mouse_Ins)
|
|
@@ -18,12 +18,12 @@ ex4nicegui/reactive/officials.py
|
|
|
18
18
|
ex4nicegui/reactive/q_pagination.py
|
|
19
19
|
ex4nicegui/reactive/rxui.py
|
|
20
20
|
ex4nicegui/reactive/usePagination.py
|
|
21
|
-
ex4nicegui/reactive/
|
|
22
|
-
ex4nicegui/reactive/
|
|
23
|
-
ex4nicegui/reactive/
|
|
24
|
-
ex4nicegui/reactive/
|
|
25
|
-
ex4nicegui/reactive/
|
|
26
|
-
ex4nicegui/reactive/
|
|
21
|
+
ex4nicegui/reactive/ECharts/ECharts.js
|
|
22
|
+
ex4nicegui/reactive/ECharts/ECharts.py
|
|
23
|
+
ex4nicegui/reactive/ECharts/__init__.py
|
|
24
|
+
ex4nicegui/reactive/UseDraggable/UseDraggable.js
|
|
25
|
+
ex4nicegui/reactive/UseDraggable/UseDraggable.py
|
|
26
|
+
ex4nicegui/reactive/UseDraggable/__init__.py
|
|
27
27
|
ex4nicegui/reactive/useMouse/UseMouse.js
|
|
28
28
|
ex4nicegui/reactive/useMouse/UseMouse.py
|
|
29
29
|
ex4nicegui/reactive/useMouse/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|