ex4nicegui 0.3.2__py3-none-any.whl → 0.4.0__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/__init__.py +1 -1
- ex4nicegui/bi/dataSource.py +4 -4
- ex4nicegui/bi/elements/ui_aggrid.py +1 -7
- ex4nicegui/bi/elements/ui_echarts.py +5 -9
- ex4nicegui/reactive/EChartsComponent/ECharts.js +44 -43982
- ex4nicegui/reactive/EChartsComponent/ECharts.py +69 -30
- ex4nicegui/reactive/__index.py +1 -0
- ex4nicegui/reactive/libs/__init__.py +0 -0
- ex4nicegui/reactive/libs/d3/__init__.py +0 -0
- ex4nicegui/reactive/libs/d3/d3-color.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-dispatch.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-drag.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-ease.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-interpolate.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-selection.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-timer.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-transition.ems.js +7 -0
- ex4nicegui/reactive/libs/d3/d3-zoom.ems.js +7 -0
- ex4nicegui/reactive/mermaid/__init__.py +0 -0
- ex4nicegui/reactive/mermaid/mermaid.js +75 -0
- ex4nicegui/reactive/mermaid/mermaid.py +64 -0
- ex4nicegui/reactive/officials/base.py +2 -1
- ex4nicegui/reactive/officials/checkbox.py +2 -1
- ex4nicegui/reactive/officials/date.py +2 -1
- ex4nicegui/reactive/officials/echarts.py +102 -5
- ex4nicegui/reactive/officials/input.py +2 -1
- ex4nicegui/reactive/officials/label.py +2 -2
- ex4nicegui/reactive/officials/radio.py +2 -1
- ex4nicegui/reactive/officials/select.py +3 -10
- ex4nicegui/reactive/officials/slider.py +2 -1
- ex4nicegui/reactive/officials/switch.py +2 -1
- ex4nicegui/reactive/officials/table.py +7 -10
- ex4nicegui/reactive/officials/textarea.py +2 -1
- ex4nicegui/utils/clientScope.py +3 -3
- {ex4nicegui-0.3.2.dist-info → ex4nicegui-0.4.0.dist-info}/METADATA +2 -2
- {ex4nicegui-0.3.2.dist-info → ex4nicegui-0.4.0.dist-info}/RECORD +39 -25
- {ex4nicegui-0.3.2.dist-info → ex4nicegui-0.4.0.dist-info}/LICENSE +0 -0
- {ex4nicegui-0.3.2.dist-info → ex4nicegui-0.4.0.dist-info}/WHEEL +0 -0
- {ex4nicegui-0.3.2.dist-info → ex4nicegui-0.4.0.dist-info}/top_level.txt +0 -0
ex4nicegui/__init__.py
CHANGED
ex4nicegui/bi/dataSource.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Callable, Dict, List, Optional, Set, cast
|
|
2
2
|
from ex4nicegui import to_ref, ref_computed, on
|
|
3
|
-
from nicegui import
|
|
3
|
+
from nicegui import context as ng_context, Client, ui
|
|
4
4
|
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
6
|
from . import types
|
|
@@ -123,7 +123,7 @@ class DataSource:
|
|
|
123
123
|
return self.__id
|
|
124
124
|
|
|
125
125
|
def get_component_info_key(self, element_id: types._TElementID):
|
|
126
|
-
client_id =
|
|
126
|
+
client_id = ng_context.get_client().id
|
|
127
127
|
return ComponentInfoKey(client_id, element_id)
|
|
128
128
|
|
|
129
129
|
def get_filtered_data(self, element: ui.element):
|
|
@@ -148,7 +148,7 @@ class DataSource:
|
|
|
148
148
|
element_id: types._TElementID,
|
|
149
149
|
update_callback: Optional[_TComponentUpdateCallback] = None,
|
|
150
150
|
):
|
|
151
|
-
ng_client =
|
|
151
|
+
ng_client = ng_context.get_client()
|
|
152
152
|
client_id = ng_client.id
|
|
153
153
|
|
|
154
154
|
if not self._component_map.has_client_record(client_id):
|
|
@@ -164,7 +164,7 @@ class DataSource:
|
|
|
164
164
|
return info
|
|
165
165
|
|
|
166
166
|
def send_filter(self, element_id: types._TElementID, filter: Filter):
|
|
167
|
-
client_id =
|
|
167
|
+
client_id = ng_context.get_client().id
|
|
168
168
|
key = ComponentInfoKey(client_id, element_id)
|
|
169
169
|
|
|
170
170
|
if not self._component_map.has_record(key):
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
from typing import TYPE_CHECKING,
|
|
2
|
+
from typing import TYPE_CHECKING, Callable, Union
|
|
3
3
|
from nicegui import ui
|
|
4
|
-
from nicegui.events import UiEventArguments
|
|
5
|
-
from ex4nicegui.reactive import rxui
|
|
6
|
-
from ex4nicegui.reactive.EChartsComponent.ECharts import (
|
|
7
|
-
EChartsClickEventArguments,
|
|
8
|
-
echarts,
|
|
9
|
-
)
|
|
10
4
|
from ex4nicegui.bi.dataSource import DataSource
|
|
11
5
|
from .models import UiResult
|
|
12
6
|
|
|
@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, cast
|
|
|
3
3
|
from nicegui.events import UiEventArguments
|
|
4
4
|
from ex4nicegui.reactive import rxui
|
|
5
5
|
from ex4nicegui.reactive.EChartsComponent.ECharts import (
|
|
6
|
-
|
|
6
|
+
EChartsMouseEventArguments,
|
|
7
7
|
echarts,
|
|
8
8
|
)
|
|
9
9
|
from nicegui import ui
|
|
@@ -21,15 +21,11 @@ class EChartsResult(UiResult[echarts]):
|
|
|
21
21
|
super().__init__(element, dataSource)
|
|
22
22
|
self.chart_update = chart_update
|
|
23
23
|
|
|
24
|
-
def on_chart_click(
|
|
25
|
-
self, handler
|
|
26
|
-
):
|
|
27
|
-
return self.element.on_chart_click(handler)
|
|
24
|
+
def on_chart_click(self, handler: Callable[[EChartsMouseEventArguments], Any]):
|
|
25
|
+
return self.element.echarts_on("click", handler)
|
|
28
26
|
|
|
29
|
-
def on_chart_click_blank(
|
|
30
|
-
self
|
|
31
|
-
):
|
|
32
|
-
return self.element.on_chart_click_blank(handler)
|
|
27
|
+
def on_chart_click_blank(self, handler: Callable[[UiEventArguments], Any]):
|
|
28
|
+
return self.element.on_click_blank(handler)
|
|
33
29
|
|
|
34
30
|
def cancel_linkage(self, *source: Union[ui.element, "UiResult"]):
|
|
35
31
|
super().cancel_linkage(*source)
|