ex4nicegui 0.6.1__tar.gz → 0.6.3__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.6.1 → ex4nicegui-0.6.3}/PKG-INFO +1 -1
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/__init__.py +1 -1
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/__init__.py +10 -2
- ex4nicegui-0.6.3/ex4nicegui/reactive/empty.js +3 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/empty.py +6 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/aggrid.py +12 -9
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/base.py +6 -2
- ex4nicegui-0.6.3/ex4nicegui/reactive/officials/tab.py +57 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/officials/tab_panel.py +23 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/officials/tab_panels.py +46 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/table.py +29 -13
- ex4nicegui-0.6.3/ex4nicegui/reactive/officials/tabs.py +43 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/transitionGroup.js +39 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/transitionGroup.py +25 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/utils.py +32 -0
- ex4nicegui-0.6.3/ex4nicegui/reactive/vfor.js +13 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/vfor.py +71 -59
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/signals.py +6 -4
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/PKG-INFO +1 -1
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/SOURCES.txt +8 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/requires.txt +1 -1
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/setup.py +1 -1
- ex4nicegui-0.6.1/ex4nicegui/reactive/vfor.js +0 -3
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/LICENSE +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/README.md +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/dataSource.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/dataSourceFacade.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/containers.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/layouts.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/models.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/text.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_aggrid.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_date_picker.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_date_picker.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_echarts.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_radio.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_range.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_select.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_slider.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/elements/ui_table.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/index.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/protocols.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/bi/types.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/experimental_/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/experimental_/gridLayout/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/experimental_/gridLayout/index.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/gsap/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/gsap/gsap.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/gsap/timeline.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/gsap/timeline.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/gsap/wrapGsap.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/gridFlex/GridFlex.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/gridFlex/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/gridFlex/gridFlex.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/gridFlex/utils.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/rxFlex/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/rxFlex/index.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/layout/rxFlex/types.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-color.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-dispatch.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-drag.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-ease.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-interpolate.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-selection.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-timer.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-transition.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/d3/d3-zoom.ems.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/CSSPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/CSSRulePlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/CustomEase.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/Draggable.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/EasePack.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/EaselPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/Flip.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/MotionPathPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/Observer.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/PixiPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/ScrollToPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/ScrollTrigger.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/TextPlugin.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/all.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/gsap-core.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/utils/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/utils/matrix.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/utils/paths.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/libs/gsap/utils/strings.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/EChartsComponent/ECharts.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/EChartsComponent/ECharts.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/EChartsComponent/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/UseDraggable/UseDraggable.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/UseDraggable/UseDraggable.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/UseDraggable/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/dropZone/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/dropZone/dropZone.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/dropZone/dropZone.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/fileWatcher.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/local_file_picker.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/mermaid/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/mermaid/mermaid.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/mermaid/mermaid.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/button.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/card.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/checkbox.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/circular_progress.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/color_picker.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/column.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/date.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/drawer.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/echarts.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/expansion.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/grid.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/html.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/html.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/icon.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/image.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/input.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/knob.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/label.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/linear_progress.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/number.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/radio.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/row.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/select.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/slider.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/switch.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/textarea.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/upload.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/officials/utils.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/q_pagination.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/rxui.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/useMouse/UseMouse.js +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/useMouse/UseMouse.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/useMouse/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/usePagination.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/reactive/vmodel.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/tools/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/tools/debug.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/__init__.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/apiEffect.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/asyncComputed.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/clientScope.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/common.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/effect.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui/utils/scheduler.py +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/dependency_links.txt +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/not-zip-safe +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/ex4nicegui.egg-info/top_level.txt +0 -0
- {ex4nicegui-0.6.1 → ex4nicegui-0.6.3}/setup.cfg +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .officials.aggrid import AggridBindableUi as
|
|
1
|
+
from .officials.aggrid import AggridBindableUi as aggrid
|
|
2
2
|
from .officials.button import ButtonBindableUi as button
|
|
3
3
|
from .officials.card import (
|
|
4
4
|
CardBindableUi as card,
|
|
@@ -46,6 +46,10 @@ from .officials.expansion import ExpansionBindableUi as expansion
|
|
|
46
46
|
from .officials.linear_progress import LinearProgressBindableUi as linear_progress
|
|
47
47
|
from .officials.knob import KnobBindableUi as knob
|
|
48
48
|
from .officials.circular_progress import CircularProgressBindableUi as circular_progress
|
|
49
|
+
from .officials.tabs import TabsBindableUi as tabs
|
|
50
|
+
from .officials.tab import TabBindableUi as tab
|
|
51
|
+
from .officials.tab_panels import TabPanelsBindableUi as tab_panels
|
|
52
|
+
from .officials.tab_panel import TabPanelBindableUi as tab_panel
|
|
49
53
|
from .q_pagination import PaginationBindableUi as q_pagination
|
|
50
54
|
|
|
51
55
|
from .local_file_picker import local_file_picker
|
|
@@ -63,6 +67,10 @@ pagination = q_pagination
|
|
|
63
67
|
|
|
64
68
|
|
|
65
69
|
__all__ = [
|
|
70
|
+
"tab_panels",
|
|
71
|
+
"tab_panel",
|
|
72
|
+
"tabs",
|
|
73
|
+
"tab",
|
|
66
74
|
"circular_progress",
|
|
67
75
|
"knob",
|
|
68
76
|
"UploadResult",
|
|
@@ -76,7 +84,7 @@ __all__ = [
|
|
|
76
84
|
"VforStore",
|
|
77
85
|
"vmodel",
|
|
78
86
|
"html",
|
|
79
|
-
"
|
|
87
|
+
"aggrid",
|
|
80
88
|
"button",
|
|
81
89
|
"card",
|
|
82
90
|
"card_actions",
|
|
@@ -15,7 +15,7 @@ from ex4nicegui.utils.signals import (
|
|
|
15
15
|
from ex4nicegui.utils.apiEffect import ui_effect
|
|
16
16
|
from nicegui import ui
|
|
17
17
|
from .base import BindableUi
|
|
18
|
-
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
18
|
+
from ex4nicegui.reactive.utils import ParameterClassifier, dataframe2col_str
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class AggridBindableUi(BindableUi[ui.aggrid]):
|
|
@@ -48,32 +48,35 @@ class AggridBindableUi(BindableUi[ui.aggrid]):
|
|
|
48
48
|
for col in df.columns # type: ignore
|
|
49
49
|
]
|
|
50
50
|
|
|
51
|
-
@
|
|
51
|
+
@classmethod
|
|
52
52
|
def from_pandas(
|
|
53
|
+
cls,
|
|
53
54
|
df: TMaybeRef,
|
|
54
55
|
columns_define_fn: Optional[Callable[[str], Dict]] = None,
|
|
55
56
|
**org_kws,
|
|
56
57
|
):
|
|
57
58
|
columns_define_fn = columns_define_fn or (lambda x: {})
|
|
58
|
-
if is_ref(df):
|
|
59
|
+
if is_ref(df) or isinstance(df, Callable):
|
|
59
60
|
|
|
60
61
|
@ref_computed
|
|
61
62
|
def cp_options():
|
|
63
|
+
copy_df = dataframe2col_str(to_value(df))
|
|
62
64
|
columnDefs = AggridBindableUi._get_columnDefs_from_dataframe(
|
|
63
|
-
|
|
65
|
+
copy_df, columns_define_fn
|
|
64
66
|
)
|
|
65
|
-
rowData =
|
|
67
|
+
rowData = copy_df.to_dict("records")
|
|
66
68
|
data = {"columnDefs": columnDefs, "rowData": rowData}
|
|
67
69
|
return data
|
|
68
70
|
|
|
69
|
-
return
|
|
71
|
+
return cls(cp_options, **org_kws)
|
|
70
72
|
|
|
73
|
+
copy_df = dataframe2col_str(df)
|
|
71
74
|
columnDefs = AggridBindableUi._get_columnDefs_from_dataframe(
|
|
72
|
-
|
|
75
|
+
copy_df, columns_define_fn
|
|
73
76
|
)
|
|
74
|
-
rowData =
|
|
77
|
+
rowData = copy_df.to_dict("records") # type: ignore
|
|
75
78
|
options = {"columnDefs": columnDefs, "rowData": rowData}
|
|
76
|
-
return
|
|
79
|
+
return cls(options, **org_kws)
|
|
77
80
|
|
|
78
81
|
def bind_prop(self, prop: str, ref_ui: ReadonlyRef[Any]):
|
|
79
82
|
if prop == "options":
|
|
@@ -224,7 +224,7 @@ class BindableUi(Generic[TWidget]):
|
|
|
224
224
|
|
|
225
225
|
return self
|
|
226
226
|
|
|
227
|
-
def bind_style(self, style: Dict[str, TGetterOrReadonlyRef[
|
|
227
|
+
def bind_style(self, style: Dict[str, TGetterOrReadonlyRef[Any]]):
|
|
228
228
|
"""data binding is manipulating an element's style
|
|
229
229
|
|
|
230
230
|
@see - https://github.com/CrystalWindSnake/ex4nicegui/blob/main/README.en.md#bind-style
|
|
@@ -239,11 +239,15 @@ class BindableUi(Generic[TWidget]):
|
|
|
239
239
|
|
|
240
240
|
@self._ui_effect
|
|
241
241
|
def _(name=name, ref_obj=ref_obj):
|
|
242
|
-
self.element._style[name] = to_value(ref_obj)
|
|
242
|
+
self.element._style[name] = str(to_value(ref_obj))
|
|
243
243
|
self.element.update()
|
|
244
244
|
|
|
245
245
|
return self
|
|
246
246
|
|
|
247
|
+
def update(self):
|
|
248
|
+
"""Update the element on the client side."""
|
|
249
|
+
self.element.update()
|
|
250
|
+
|
|
247
251
|
|
|
248
252
|
# class SingleValueBindableUi(BindableUi[TWidget], Generic[T, TWidget]):
|
|
249
253
|
# def __init__(self, value: TMaybeRef[T], element: TWidget) -> None:
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from typing import Dict, Optional
|
|
2
|
+
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
3
|
+
from ex4nicegui.utils.signals import (
|
|
4
|
+
to_value,
|
|
5
|
+
_TMaybeRef as TMaybeRef,
|
|
6
|
+
)
|
|
7
|
+
from nicegui import ui
|
|
8
|
+
from .base import BindableUi
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TabBindableUi(BindableUi[ui.tab]):
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
name: TMaybeRef[str],
|
|
15
|
+
label: Optional[TMaybeRef[str]] = None,
|
|
16
|
+
icon: Optional[TMaybeRef[str]] = None,
|
|
17
|
+
) -> None:
|
|
18
|
+
pc = ParameterClassifier(
|
|
19
|
+
locals(),
|
|
20
|
+
maybeRefs=["name", "label", "icon"],
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
value_kws = pc.get_values_kws()
|
|
24
|
+
element = ui.tab(**value_kws)
|
|
25
|
+
super().__init__(element)
|
|
26
|
+
|
|
27
|
+
bindings_kws = pc.get_bindings()
|
|
28
|
+
self.__bind_label(bindings_kws, value_kws)
|
|
29
|
+
|
|
30
|
+
if "label" in bindings_kws:
|
|
31
|
+
bindings_kws.pop("label")
|
|
32
|
+
|
|
33
|
+
for key, value in bindings_kws.items():
|
|
34
|
+
self.bind_prop(key, value) # type: ignore
|
|
35
|
+
|
|
36
|
+
# def bind_prop(self, prop: str, ref_ui: TMaybeRef):
|
|
37
|
+
# if prop == "name":
|
|
38
|
+
# return self.bind_name(ref_ui)
|
|
39
|
+
|
|
40
|
+
# return super().bind_prop(prop, ref_ui)
|
|
41
|
+
|
|
42
|
+
def __bind_label(self, binding_kws: Dict, value_kws: Dict):
|
|
43
|
+
name_ref = binding_kws.get("name") or value_kws.get("name")
|
|
44
|
+
label_ref = binding_kws.get("label") or value_kws.get("label")
|
|
45
|
+
|
|
46
|
+
@self._ui_effect
|
|
47
|
+
def _():
|
|
48
|
+
self.element._props["label"] = (
|
|
49
|
+
to_value(label_ref) if label_ref is not None else to_value(name_ref)
|
|
50
|
+
)
|
|
51
|
+
self.element.update()
|
|
52
|
+
|
|
53
|
+
# def bind_name(self, ref_ui: TMaybeRef):
|
|
54
|
+
# @self._ui_effect
|
|
55
|
+
# def _():
|
|
56
|
+
# self.element._props["name"] = to_value(ref_ui)
|
|
57
|
+
# self.element.update()
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
2
|
+
from ex4nicegui.utils.signals import (
|
|
3
|
+
_TMaybeRef as TMaybeRef,
|
|
4
|
+
)
|
|
5
|
+
from nicegui import ui
|
|
6
|
+
from .base import BindableUi
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TabPanelBindableUi(BindableUi[ui.tab_panel]):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
name: TMaybeRef[str],
|
|
13
|
+
) -> None:
|
|
14
|
+
pc = ParameterClassifier(
|
|
15
|
+
locals(),
|
|
16
|
+
maybeRefs=["name"],
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
element = ui.tab_panel(**pc.get_values_kws())
|
|
20
|
+
super().__init__(element)
|
|
21
|
+
|
|
22
|
+
for key, value in pc.get_bindings().items():
|
|
23
|
+
self.bind_prop(key, value) # type: ignore
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from typing import Any, Callable, Optional
|
|
2
|
+
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
3
|
+
from ex4nicegui.utils.signals import (
|
|
4
|
+
to_value,
|
|
5
|
+
_TMaybeRef as TMaybeRef,
|
|
6
|
+
)
|
|
7
|
+
from nicegui import ui
|
|
8
|
+
from .base import BindableUi
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TabPanelsBindableUi(BindableUi[ui.tab_panels]):
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
value: Optional[TMaybeRef[str]] = None,
|
|
15
|
+
*,
|
|
16
|
+
on_change: Optional[Callable[..., Any]] = None,
|
|
17
|
+
animated: TMaybeRef[bool] = True,
|
|
18
|
+
keep_alive: TMaybeRef[bool] = True,
|
|
19
|
+
) -> None:
|
|
20
|
+
pc = ParameterClassifier(
|
|
21
|
+
locals(),
|
|
22
|
+
maybeRefs=["value", "animated", "keep_alive"],
|
|
23
|
+
v_model=("value", "on_change"),
|
|
24
|
+
events=["on_change"],
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
element = ui.tab_panels(**pc.get_values_kws())
|
|
28
|
+
super().__init__(element)
|
|
29
|
+
|
|
30
|
+
for key, value in pc.get_bindings().items():
|
|
31
|
+
self.bind_prop(key, value) # type: ignore
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def value(self):
|
|
35
|
+
return self.element.value
|
|
36
|
+
|
|
37
|
+
def bind_prop(self, prop: str, ref_ui: TMaybeRef):
|
|
38
|
+
if prop == "value":
|
|
39
|
+
return self.bind_value(ref_ui)
|
|
40
|
+
|
|
41
|
+
return super().bind_prop(prop, ref_ui)
|
|
42
|
+
|
|
43
|
+
def bind_value(self, ref_ui: TMaybeRef):
|
|
44
|
+
@self._ui_effect
|
|
45
|
+
def _():
|
|
46
|
+
self.element.set_value(to_value(ref_ui))
|
|
@@ -6,7 +6,7 @@ from typing import (
|
|
|
6
6
|
Dict,
|
|
7
7
|
)
|
|
8
8
|
from typing_extensions import Literal
|
|
9
|
-
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
9
|
+
from ex4nicegui.reactive.utils import ParameterClassifier, dataframe2col_str
|
|
10
10
|
import ex4nicegui.utils.common as utils_common
|
|
11
11
|
from ex4nicegui.utils.signals import (
|
|
12
12
|
ReadonlyRef,
|
|
@@ -17,6 +17,7 @@ from ex4nicegui.utils.signals import (
|
|
|
17
17
|
to_value,
|
|
18
18
|
to_raw,
|
|
19
19
|
on,
|
|
20
|
+
RefWrapper,
|
|
20
21
|
)
|
|
21
22
|
from nicegui import ui
|
|
22
23
|
from .base import BindableUi
|
|
@@ -34,8 +35,16 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
34
35
|
on_select: Optional[Callable[..., Any]] = None,
|
|
35
36
|
on_pagination_change: Optional[Callable[..., Any]] = None,
|
|
36
37
|
) -> None:
|
|
38
|
+
local_args = locals()
|
|
39
|
+
rows_data = local_args.get("rows")
|
|
40
|
+
if isinstance(rows_data, RefWrapper):
|
|
41
|
+
local_args.update(rows=lambda: rows_data.value)
|
|
42
|
+
columns_data = local_args.get("columns") # type: ignore
|
|
43
|
+
if isinstance(columns_data, RefWrapper):
|
|
44
|
+
local_args.update(columns=lambda: columns_data.value)
|
|
45
|
+
|
|
37
46
|
pc = ParameterClassifier(
|
|
38
|
-
|
|
47
|
+
local_args,
|
|
39
48
|
maybeRefs=[
|
|
40
49
|
"columns",
|
|
41
50
|
"rows",
|
|
@@ -57,7 +66,7 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
57
66
|
|
|
58
67
|
self._arg_selection = selection
|
|
59
68
|
self._arg_row_key = row_key
|
|
60
|
-
self._selection_ref: ReadonlyRef[List[Any]] = to_ref([])
|
|
69
|
+
self._selection_ref: ReadonlyRef[List[Any]] = to_ref([]) # type: ignore
|
|
61
70
|
|
|
62
71
|
def on_selection(_):
|
|
63
72
|
self._selection_ref.value = self.element.selected # type: ignore
|
|
@@ -68,8 +77,9 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
68
77
|
def selection_ref(self):
|
|
69
78
|
return self._selection_ref
|
|
70
79
|
|
|
71
|
-
@
|
|
80
|
+
@classmethod
|
|
72
81
|
def from_pandas(
|
|
82
|
+
cls,
|
|
73
83
|
df: TMaybeRef,
|
|
74
84
|
*,
|
|
75
85
|
columns_define_fn: Optional[Callable[[str], Dict]] = None,
|
|
@@ -90,15 +100,14 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
90
100
|
"on_pagination_change": on_pagination_change,
|
|
91
101
|
}
|
|
92
102
|
|
|
93
|
-
if is_ref(df):
|
|
103
|
+
if is_ref(df) or isinstance(df, Callable):
|
|
94
104
|
|
|
95
105
|
@ref_computed
|
|
96
|
-
def
|
|
97
|
-
|
|
106
|
+
def cp_rows_columns():
|
|
107
|
+
copy_df = dataframe2col_str(to_value(df))
|
|
108
|
+
rows = copy_df.to_dict("records")
|
|
98
109
|
|
|
99
|
-
|
|
100
|
-
def cp_cols():
|
|
101
|
-
return [
|
|
110
|
+
columns = [
|
|
102
111
|
{
|
|
103
112
|
**{
|
|
104
113
|
"name": col,
|
|
@@ -107,11 +116,18 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
107
116
|
},
|
|
108
117
|
**columns_define_fn(col), # type: ignore
|
|
109
118
|
}
|
|
110
|
-
for col in
|
|
119
|
+
for col in copy_df.columns
|
|
111
120
|
]
|
|
112
121
|
|
|
113
|
-
|
|
122
|
+
return rows, columns
|
|
123
|
+
|
|
124
|
+
return cls(
|
|
125
|
+
lambda: cp_rows_columns.value[1],
|
|
126
|
+
lambda: cp_rows_columns.value[0],
|
|
127
|
+
**other_kws,
|
|
128
|
+
)
|
|
114
129
|
|
|
130
|
+
df = dataframe2col_str(df)
|
|
115
131
|
rows = df.to_dict("records") # type: ignore
|
|
116
132
|
|
|
117
133
|
cols = [
|
|
@@ -125,7 +141,7 @@ class TableBindableUi(BindableUi[ui.table]):
|
|
|
125
141
|
}
|
|
126
142
|
for col in df.columns # type: ignore
|
|
127
143
|
]
|
|
128
|
-
return
|
|
144
|
+
return cls(cols, rows, **other_kws)
|
|
129
145
|
|
|
130
146
|
def bind_prop(self, prop: str, ref_ui: ReadonlyRef):
|
|
131
147
|
if prop == "dataframe":
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from typing import Any, Callable, Optional
|
|
2
|
+
from ex4nicegui.reactive.utils import ParameterClassifier
|
|
3
|
+
from ex4nicegui.utils.signals import (
|
|
4
|
+
to_value,
|
|
5
|
+
_TMaybeRef as TMaybeRef,
|
|
6
|
+
)
|
|
7
|
+
from nicegui import ui
|
|
8
|
+
from .base import BindableUi
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TabsBindableUi(BindableUi[ui.tabs]):
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
value: Optional[TMaybeRef[str]] = None,
|
|
15
|
+
on_change: Optional[Callable[..., Any]] = None,
|
|
16
|
+
) -> None:
|
|
17
|
+
pc = ParameterClassifier(
|
|
18
|
+
locals(),
|
|
19
|
+
maybeRefs=["value"],
|
|
20
|
+
v_model=("value", "on_change"),
|
|
21
|
+
events=["on_change"],
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
element = ui.tabs(**pc.get_values_kws())
|
|
25
|
+
super().__init__(element)
|
|
26
|
+
|
|
27
|
+
for key, value in pc.get_bindings().items():
|
|
28
|
+
self.bind_prop(key, value) # type: ignore
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def value(self):
|
|
32
|
+
return self.element.value
|
|
33
|
+
|
|
34
|
+
def bind_prop(self, prop: str, ref_ui: TMaybeRef):
|
|
35
|
+
if prop == "value":
|
|
36
|
+
return self.bind_value(ref_ui)
|
|
37
|
+
|
|
38
|
+
return super().bind_prop(prop, ref_ui)
|
|
39
|
+
|
|
40
|
+
def bind_value(self, ref_ui: TMaybeRef):
|
|
41
|
+
@self._ui_effect
|
|
42
|
+
def _():
|
|
43
|
+
self.element.set_value(to_value(ref_ui))
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// childOrderKey: Array,
|
|
4
|
+
// transitionGroupArgs: Array,
|
|
5
|
+
},
|
|
6
|
+
data() {
|
|
7
|
+
return {
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
mounted() {
|
|
11
|
+
},
|
|
12
|
+
render() {
|
|
13
|
+
// debugger
|
|
14
|
+
const h = Vue.h
|
|
15
|
+
const vfgt = Vue.Fragment
|
|
16
|
+
const slotBox = this.$slots.default()
|
|
17
|
+
console.log('tg:', slotBox);
|
|
18
|
+
const wrap = () => [h(vfgt, slotBox)]
|
|
19
|
+
// const wrap = slotBox
|
|
20
|
+
console.log(wrap);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// slotBox[0].children = this.childOrderKey.map(idx => {
|
|
24
|
+
// return slotBox[0].children[idx]
|
|
25
|
+
// })
|
|
26
|
+
// console.log(slots);
|
|
27
|
+
|
|
28
|
+
return h(
|
|
29
|
+
Vue.TransitionGroup,
|
|
30
|
+
{
|
|
31
|
+
tag: 'span',
|
|
32
|
+
name: 'list',
|
|
33
|
+
// css: false,
|
|
34
|
+
// ...this.transitionGroupArgs
|
|
35
|
+
}, wrap
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from nicegui.element import Element
|
|
3
|
+
from typing import (
|
|
4
|
+
Any,
|
|
5
|
+
Dict,
|
|
6
|
+
List,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TransitionGroup(Element, component="transitionGroup.js"):
|
|
11
|
+
def __init__(self) -> None:
|
|
12
|
+
super().__init__()
|
|
13
|
+
|
|
14
|
+
def apply_transition_group(self, args: Dict[str, Any]):
|
|
15
|
+
self._props["transitionGroupArgs"] = args
|
|
16
|
+
self.update()
|
|
17
|
+
|
|
18
|
+
def update_child_order_keys(self, keys: List[Any]):
|
|
19
|
+
print(f"keys:{keys=}")
|
|
20
|
+
self._props["childOrderKey"] = keys
|
|
21
|
+
self.update()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def transition_group(fn):
|
|
25
|
+
pass
|
|
@@ -15,6 +15,11 @@ from typing import (
|
|
|
15
15
|
from ex4nicegui.utils.signals import is_ref, to_value, is_setter_ref
|
|
16
16
|
from nicegui.events import handle_event
|
|
17
17
|
|
|
18
|
+
try:
|
|
19
|
+
import pandas as pd
|
|
20
|
+
except ImportError:
|
|
21
|
+
pass
|
|
22
|
+
|
|
18
23
|
|
|
19
24
|
@runtime_checkable
|
|
20
25
|
class GetItemProtocol(Protocol):
|
|
@@ -113,3 +118,30 @@ def set_attribute(
|
|
|
113
118
|
obj[name] = value
|
|
114
119
|
else:
|
|
115
120
|
setattr(obj, name, value) # type: ignore
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def dataframe2col_str(df, copy=True):
|
|
124
|
+
if isinstance(df.columns, pd.MultiIndex):
|
|
125
|
+
raise ValueError(
|
|
126
|
+
"MultiIndex columns are not supported. "
|
|
127
|
+
"You can convert them to strings using something like "
|
|
128
|
+
'`df.columns = ["_".join(col) for col in df.columns.values]`.'
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
date_cols = df.columns[df.dtypes == "datetime64[ns]"]
|
|
132
|
+
time_cols = df.columns[df.dtypes == "timedelta64[ns]"]
|
|
133
|
+
complex_cols = df.columns[df.dtypes == "complex128"]
|
|
134
|
+
period_cols = df.columns[df.dtypes == "period[M]"]
|
|
135
|
+
if (
|
|
136
|
+
len(date_cols) != 0
|
|
137
|
+
or len(time_cols) != 0
|
|
138
|
+
or len(complex_cols) != 0
|
|
139
|
+
or len(period_cols) != 0
|
|
140
|
+
):
|
|
141
|
+
df = df.copy() if copy else df
|
|
142
|
+
df[date_cols] = df[date_cols].astype(str)
|
|
143
|
+
df[time_cols] = df[time_cols].astype(str)
|
|
144
|
+
df[complex_cols] = df[complex_cols].astype(str)
|
|
145
|
+
df[period_cols] = df[period_cols].astype(str)
|
|
146
|
+
|
|
147
|
+
return df
|