ex4nicegui 0.8.10__tar.gz → 0.9.1__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.9.1/.gitignore +165 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/PKG-INFO +62 -21
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/README.md +51 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/__init__.py +3 -2
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/dataSource.py +1 -2
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_aggrid.py +1 -2
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/protocols.py +10 -20
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/rxFlex/index.py +0 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/EChartsComponent/ECharts.js +1 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/EChartsComponent/ECharts.py +1 -5
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/UseDraggable/UseDraggable.py +3 -3
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/__init__.py +2 -3
- ex4nicegui-0.9.1/ex4nicegui/reactive/_vmodel.py +150 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/base.py +2 -3
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/deferredTask.py +2 -5
- ex4nicegui-0.8.10/ex4nicegui/reactive/mermaid/mermaid.js → ex4nicegui-0.9.1/ex4nicegui/reactive/mermaid/ex4ng_mermaid.js +1 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mermaid/mermaid.py +1 -6
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mixins/flexLayout.py +4 -8
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mixins/value_element.py +1 -2
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/echarts.py +1 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/systems/object_system.py +2 -4
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/usePagination.py +2 -4
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/vfor.py +1 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/core/vue_use.py +1 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/apiEffect.py +1 -2
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/clientScope.py +5 -8
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/effect.py +1 -2
- ex4nicegui-0.9.1/ex4nicegui/utils/page_state.py +70 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/descriptor.py +0 -1
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/refComputed.py +1 -2
- ex4nicegui-0.9.1/ex4nicegui/utils/refreshable.py +122 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/signals.py +5 -88
- ex4nicegui-0.9.1/pyproject.toml +49 -0
- ex4nicegui-0.8.10/ex4nicegui/gsap/__init__.py +0 -23
- ex4nicegui-0.8.10/ex4nicegui/gsap/gsap.py +0 -145
- ex4nicegui-0.8.10/ex4nicegui/gsap/timeline.js +0 -56
- ex4nicegui-0.8.10/ex4nicegui/gsap/timeline.py +0 -78
- ex4nicegui-0.8.10/ex4nicegui/gsap/wrapGsap.js +0 -48
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/.DS_Store +0 -0
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/CSSPlugin.js +0 -1577
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/CSSRulePlugin.js +0 -134
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/CustomEase.js +0 -371
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/Draggable.js +0 -2699
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/EasePack.js +0 -212
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/EaselPlugin.js +0 -341
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/Flip.js +0 -1518
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/MotionPathPlugin.js +0 -368
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/Observer.js +0 -686
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/PixiPlugin.js +0 -461
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/ScrollToPlugin.js +0 -273
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/ScrollTrigger.js +0 -2658
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/TextPlugin.js +0 -166
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/all.js +0 -31
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/gsap-core.js +0 -4487
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/gsap.mjs +0 -6
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/utils/matrix.js +0 -420
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/utils/paths.js +0 -1487
- ex4nicegui-0.8.10/ex4nicegui/libs/gsap/utils/strings.js +0 -107
- ex4nicegui-0.8.10/ex4nicegui/reactive/local_file_picker.py +0 -208
- ex4nicegui-0.8.10/ex4nicegui/reactive/vmodel.py +0 -237
- ex4nicegui-0.8.10/ex4nicegui/tools/__init__.py +0 -0
- ex4nicegui-0.8.10/ex4nicegui/utils/__init__.py +0 -0
- ex4nicegui-0.8.10/pyproject.toml +0 -37
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/LICENSE +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/dataSourceFacade.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/containers.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/layouts.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/models.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/text.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_date_picker.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_date_picker.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_echarts.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_radio.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_range.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_select.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_slider.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/elements/ui_table.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/index.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/bi/types.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/experimental_/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/experimental_/gridLayout/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/experimental_/gridLayout/index.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/helper/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/helper/client_instance_locker.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/gridFlex/GridFlex.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/gridFlex/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/gridFlex/gridFlex.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/gridFlex/utils.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/rxFlex/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/layout/rxFlex/types.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-color.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-dispatch.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-drag.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-ease.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-interpolate.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-selection.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-timer.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-transition.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/libs/d3/d3-zoom.ems.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/EChartsComponent/events.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/EChartsComponent/types.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/EChartsComponent/utils.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/UseDraggable/UseDraggable.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/dropZone/dropZone.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/dropZone/dropZone.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/empty.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/empty.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/fileWatcher.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mixins/backgroundColor.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mixins/disableable.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/mixins/textColor.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/aggrid.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/avatar.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/badge.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/base.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/button.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/card.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/checkbox.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/chip.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/circular_progress.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/color_picker.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/column.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/date.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/dialog.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/drawer.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/element.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/expansion.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/grid.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/html.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/html.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/icon.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/image.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/input.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/knob.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/label.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/linear_progress.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/number.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/radio.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/range.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/row.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/select.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/slider.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/spinner.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/switch.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tab.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tab_panel.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tab_panels.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/table.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tabs.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/textarea.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/toggle.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tooltip.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/tree.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/officials/upload.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/q_pagination.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/rxui.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/scopedStyle.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/scopedStyle.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/services/pandas_service.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/services/reactive_service.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/systems/color_system.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/systems/reactive_system.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/transitionGroup.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/transitionGroup.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/useMouse/UseMouse.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/useMouse/UseMouse.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/vfor.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/reactive/view_model.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/core/VueUse.js +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/functions/breakpoint.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/functions/dark.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/toolbox/functions/qr_code.py +0 -0
- {ex4nicegui-0.8.10/ex4nicegui/libs/gsap → ex4nicegui-0.9.1/ex4nicegui/tools}/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/tools/debug.py +0 -0
- {ex4nicegui-0.8.10/ex4nicegui/libs/gsap → ex4nicegui-0.9.1/ex4nicegui}/utils/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/asyncComputed.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/common.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/__init__.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/base.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/bool.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/date.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/dict.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/float.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/int.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/list.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/string.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/proxy/utils.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/refWrapper.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/scheduler.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/utils/types.py +0 -0
- {ex4nicegui-0.8.10 → ex4nicegui-0.9.1}/ex4nicegui/version.py +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
|
|
2
|
+
.vscode
|
|
3
|
+
temp
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# poetry
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
106
|
+
#poetry.lock
|
|
107
|
+
|
|
108
|
+
# pdm
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
110
|
+
#pdm.lock
|
|
111
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
112
|
+
# in version control.
|
|
113
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
114
|
+
.pdm.toml
|
|
115
|
+
|
|
116
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
117
|
+
__pypackages__/
|
|
118
|
+
|
|
119
|
+
# Celery stuff
|
|
120
|
+
celerybeat-schedule
|
|
121
|
+
celerybeat.pid
|
|
122
|
+
|
|
123
|
+
# SageMath parsed files
|
|
124
|
+
*.sage.py
|
|
125
|
+
|
|
126
|
+
# Environments
|
|
127
|
+
.env
|
|
128
|
+
.venv
|
|
129
|
+
env/
|
|
130
|
+
venv/
|
|
131
|
+
ENV/
|
|
132
|
+
env.bak/
|
|
133
|
+
venv.bak/
|
|
134
|
+
|
|
135
|
+
# Spyder project settings
|
|
136
|
+
.spyderproject
|
|
137
|
+
.spyproject
|
|
138
|
+
|
|
139
|
+
# Rope project settings
|
|
140
|
+
.ropeproject
|
|
141
|
+
|
|
142
|
+
# mkdocs documentation
|
|
143
|
+
/site
|
|
144
|
+
|
|
145
|
+
# mypy
|
|
146
|
+
.mypy_cache/
|
|
147
|
+
.dmypy.json
|
|
148
|
+
dmypy.json
|
|
149
|
+
|
|
150
|
+
# Pyre type checker
|
|
151
|
+
.pyre/
|
|
152
|
+
|
|
153
|
+
# pytype static type analyzer
|
|
154
|
+
.pytype/
|
|
155
|
+
|
|
156
|
+
# Cython debug symbols
|
|
157
|
+
cython_debug/
|
|
158
|
+
|
|
159
|
+
# PyCharm
|
|
160
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
161
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
162
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
163
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
164
|
+
#.idea/
|
|
165
|
+
pyrightconfig.json
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: ex4nicegui
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Extension library based on nicegui, providing data responsive,BI functionality modules
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Requires-Python: >=3.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Requires-Dist: executing (>=2.0.1,<3.0.0)
|
|
19
|
-
Requires-Dist: nicegui (>=2.21.1,<3.0.0)
|
|
20
|
-
Requires-Dist: signe (>=0.4.22,<0.5.0)
|
|
21
|
-
Project-URL: Repository, https://github.com/CrystalWindSnake/ex4nicegui
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: Extension library based on nicegui, providing data responsive,BI functionality modules.
|
|
5
|
+
Author-email: CrystalWindSnake <568166495@qq.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: ex4nicegui,gui,nicegui,ui,web,webui
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Requires-Dist: executing~=2.0.1
|
|
11
|
+
Requires-Dist: nicegui~=3.5.0
|
|
12
|
+
Requires-Dist: signe~=0.4.22
|
|
22
13
|
Description-Content-Type: text/markdown
|
|
23
14
|
|
|
24
15
|
# ex4nicegui
|
|
@@ -462,6 +453,7 @@ class MyApp(rxui.ViewModel):
|
|
|
462
453
|
- [tab\_panels](#tab_panels)
|
|
463
454
|
- [lazy\_tab\_panels](#lazy_tab_panels)
|
|
464
455
|
- [scoped\_style](#scoped_style)
|
|
456
|
+
- [PageState](#pagestate)
|
|
465
457
|
- [BI 模块](#bi-模块)
|
|
466
458
|
- [`bi.data_source`](#bidata_source)
|
|
467
459
|
- [ui\_select](#ui_select)
|
|
@@ -1483,6 +1475,56 @@ with rxui.row().scoped_style(":self:hover *", "outline: 1px solid red;") as row:
|
|
|
1483
1475
|
ui.label("World")
|
|
1484
1476
|
```
|
|
1485
1477
|
|
|
1478
|
+
---
|
|
1479
|
+
|
|
1480
|
+
#### PageState
|
|
1481
|
+
|
|
1482
|
+
复杂的页面,可能需要在不同模块的函数中传递状态。`PageState` 类可以更方便管理页面范围的共享状态。
|
|
1483
|
+
|
|
1484
|
+
在 state.py 中定义页面状态
|
|
1485
|
+
```python
|
|
1486
|
+
from ex4nicegui import PageState, to_ref, on
|
|
1487
|
+
|
|
1488
|
+
class CounterState(PageState):
|
|
1489
|
+
|
|
1490
|
+
def __init__(self):
|
|
1491
|
+
self.count = to_ref(0)
|
|
1492
|
+
|
|
1493
|
+
@on(self.a)
|
|
1494
|
+
def on_a_change(a):
|
|
1495
|
+
print(f"a changed to {a}")
|
|
1496
|
+
|
|
1497
|
+
```
|
|
1498
|
+
|
|
1499
|
+
在 view.py 中封装各种视图
|
|
1500
|
+
```python
|
|
1501
|
+
from ex4nicegui import rxui
|
|
1502
|
+
from state import CounterState
|
|
1503
|
+
|
|
1504
|
+
def view1():
|
|
1505
|
+
state = CounterState.get() # 与 view2 函数的状态是共享的
|
|
1506
|
+
ui.label(f"count: {state.count.value} in view1")
|
|
1507
|
+
|
|
1508
|
+
def view2():
|
|
1509
|
+
state = CounterState.get()
|
|
1510
|
+
ui.label(f"count: {state.count.value} in view2")
|
|
1511
|
+
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1514
|
+
在 `main.py` 中正常导入并调用视图函数即可
|
|
1515
|
+
```python
|
|
1516
|
+
from ex4nicegui import ui
|
|
1517
|
+
from view import view1, view2
|
|
1518
|
+
|
|
1519
|
+
@ui.page("/")
|
|
1520
|
+
def index():
|
|
1521
|
+
view1()
|
|
1522
|
+
view2()
|
|
1523
|
+
|
|
1524
|
+
ui.run()
|
|
1525
|
+
|
|
1526
|
+
```
|
|
1527
|
+
|
|
1486
1528
|
|
|
1487
1529
|
---
|
|
1488
1530
|
|
|
@@ -1915,4 +1957,3 @@ rxui.input(value=text)
|
|
|
1915
1957
|
rxui.image(qr_code.code).classes("w-20 h-20").props("no-transition")
|
|
1916
1958
|
```
|
|
1917
1959
|
|
|
1918
|
-
|
|
@@ -439,6 +439,7 @@ class MyApp(rxui.ViewModel):
|
|
|
439
439
|
- [tab\_panels](#tab_panels)
|
|
440
440
|
- [lazy\_tab\_panels](#lazy_tab_panels)
|
|
441
441
|
- [scoped\_style](#scoped_style)
|
|
442
|
+
- [PageState](#pagestate)
|
|
442
443
|
- [BI 模块](#bi-模块)
|
|
443
444
|
- [`bi.data_source`](#bidata_source)
|
|
444
445
|
- [ui\_select](#ui_select)
|
|
@@ -1460,6 +1461,56 @@ with rxui.row().scoped_style(":self:hover *", "outline: 1px solid red;") as row:
|
|
|
1460
1461
|
ui.label("World")
|
|
1461
1462
|
```
|
|
1462
1463
|
|
|
1464
|
+
---
|
|
1465
|
+
|
|
1466
|
+
#### PageState
|
|
1467
|
+
|
|
1468
|
+
复杂的页面,可能需要在不同模块的函数中传递状态。`PageState` 类可以更方便管理页面范围的共享状态。
|
|
1469
|
+
|
|
1470
|
+
在 state.py 中定义页面状态
|
|
1471
|
+
```python
|
|
1472
|
+
from ex4nicegui import PageState, to_ref, on
|
|
1473
|
+
|
|
1474
|
+
class CounterState(PageState):
|
|
1475
|
+
|
|
1476
|
+
def __init__(self):
|
|
1477
|
+
self.count = to_ref(0)
|
|
1478
|
+
|
|
1479
|
+
@on(self.a)
|
|
1480
|
+
def on_a_change(a):
|
|
1481
|
+
print(f"a changed to {a}")
|
|
1482
|
+
|
|
1483
|
+
```
|
|
1484
|
+
|
|
1485
|
+
在 view.py 中封装各种视图
|
|
1486
|
+
```python
|
|
1487
|
+
from ex4nicegui import rxui
|
|
1488
|
+
from state import CounterState
|
|
1489
|
+
|
|
1490
|
+
def view1():
|
|
1491
|
+
state = CounterState.get() # 与 view2 函数的状态是共享的
|
|
1492
|
+
ui.label(f"count: {state.count.value} in view1")
|
|
1493
|
+
|
|
1494
|
+
def view2():
|
|
1495
|
+
state = CounterState.get()
|
|
1496
|
+
ui.label(f"count: {state.count.value} in view2")
|
|
1497
|
+
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1500
|
+
在 `main.py` 中正常导入并调用视图函数即可
|
|
1501
|
+
```python
|
|
1502
|
+
from ex4nicegui import ui
|
|
1503
|
+
from view import view1, view2
|
|
1504
|
+
|
|
1505
|
+
@ui.page("/")
|
|
1506
|
+
def index():
|
|
1507
|
+
view1()
|
|
1508
|
+
view2()
|
|
1509
|
+
|
|
1510
|
+
ui.run()
|
|
1511
|
+
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1463
1514
|
|
|
1464
1515
|
---
|
|
1465
1516
|
|
|
@@ -8,8 +8,6 @@ from ex4nicegui.utils.types import (
|
|
|
8
8
|
)
|
|
9
9
|
from ex4nicegui.utils.scheduler import next_tick
|
|
10
10
|
from ex4nicegui.utils.signals import (
|
|
11
|
-
effect,
|
|
12
|
-
effect_refreshable,
|
|
13
11
|
to_raw,
|
|
14
12
|
is_ref,
|
|
15
13
|
to_ref,
|
|
@@ -23,9 +21,11 @@ from ex4nicegui.utils.signals import (
|
|
|
23
21
|
batch,
|
|
24
22
|
is_reactive,
|
|
25
23
|
)
|
|
24
|
+
from ex4nicegui.utils.refreshable import effect, effect_refreshable
|
|
26
25
|
from ex4nicegui.utils.asyncComputed import async_computed
|
|
27
26
|
from ex4nicegui.utils.clientScope import new_scope
|
|
28
27
|
from ex4nicegui.reactive.EChartsComponent.ECharts import reset_echarts_dependencies
|
|
28
|
+
from ex4nicegui.utils.page_state import PageState
|
|
29
29
|
from .version import __version__
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
@@ -53,5 +53,6 @@ __all__ = [
|
|
|
53
53
|
"new_scope",
|
|
54
54
|
"next_tick",
|
|
55
55
|
"reset_echarts_dependencies",
|
|
56
|
+
"PageState",
|
|
56
57
|
"__version__",
|
|
57
58
|
]
|
|
@@ -182,8 +182,7 @@ class DataSource:
|
|
|
182
182
|
|
|
183
183
|
@ng_client.on_disconnect
|
|
184
184
|
def _(e: Client):
|
|
185
|
-
|
|
186
|
-
self._component_map.remove_client(e.id)
|
|
185
|
+
self._component_map.remove_client(e.id)
|
|
187
186
|
|
|
188
187
|
info = ComponentInfo(
|
|
189
188
|
ComponentInfoKey(client_id, element_id), update_callback, uiResult=ui_result
|
|
@@ -57,8 +57,7 @@ def ui_aggrid(
|
|
|
57
57
|
data = self._dataSource.get_filtered_data(cp)
|
|
58
58
|
new_opts = self._dataSource._idataSource.get_aggrid_options(data)
|
|
59
59
|
options = _merge_options(fixed_options, new_opts)
|
|
60
|
-
cp.
|
|
61
|
-
cp.update()
|
|
60
|
+
cp.options = {**options, "theme": kwargs.get("theme", "quartz")}
|
|
62
61
|
|
|
63
62
|
self._dataSource._register_component(cp.id, on_source_update)
|
|
64
63
|
|
|
@@ -9,14 +9,11 @@ from ex4nicegui.utils import common as utils_common
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class IDataSourceAble(Protocol):
|
|
12
|
-
def get_data(self) -> Any:
|
|
13
|
-
...
|
|
12
|
+
def get_data(self) -> Any: ...
|
|
14
13
|
|
|
15
|
-
def reload(self, data) -> None:
|
|
16
|
-
...
|
|
14
|
+
def reload(self, data) -> None: ...
|
|
17
15
|
|
|
18
|
-
def apply_filters(self, data, filters: List[_TFilterCallback]) -> Any:
|
|
19
|
-
...
|
|
16
|
+
def apply_filters(self, data, filters: List[_TFilterCallback]) -> Any: ...
|
|
20
17
|
|
|
21
18
|
def duplicates_column_values(
|
|
22
19
|
self,
|
|
@@ -25,30 +22,23 @@ class IDataSourceAble(Protocol):
|
|
|
25
22
|
*,
|
|
26
23
|
exclude_null_value=True,
|
|
27
24
|
sort_options: Optional[_TDuplicates_column_values_sort_options] = None,
|
|
28
|
-
) -> List:
|
|
29
|
-
...
|
|
25
|
+
) -> List: ...
|
|
30
26
|
|
|
31
|
-
def get_aggrid_options(self, data) -> Dict:
|
|
32
|
-
...
|
|
27
|
+
def get_aggrid_options(self, data) -> Dict: ...
|
|
33
28
|
|
|
34
|
-
def get_table_options(self, data) -> Dict:
|
|
35
|
-
...
|
|
29
|
+
def get_table_options(self, data) -> Dict: ...
|
|
36
30
|
|
|
37
|
-
def slider_check(self, data, column_name: str) -> None:
|
|
38
|
-
...
|
|
31
|
+
def slider_check(self, data, column_name: str) -> None: ...
|
|
39
32
|
|
|
40
33
|
def slider_min_max(
|
|
41
34
|
self, data, column_name: str
|
|
42
|
-
) -> Tuple[Optional[float], Optional[float]]:
|
|
43
|
-
...
|
|
35
|
+
) -> Tuple[Optional[float], Optional[float]]: ...
|
|
44
36
|
|
|
45
|
-
def range_check(self, data, column_name: str) -> None:
|
|
46
|
-
...
|
|
37
|
+
def range_check(self, data, column_name: str) -> None: ...
|
|
47
38
|
|
|
48
39
|
def range_min_max(
|
|
49
40
|
self, data, column_name: str
|
|
50
|
-
) -> Tuple[Optional[float], Optional[float]]:
|
|
51
|
-
...
|
|
41
|
+
) -> Tuple[Optional[float], Optional[float]]: ...
|
|
52
42
|
|
|
53
43
|
|
|
54
44
|
class CallableDataSourceAble(IDataSourceAble):
|
|
@@ -11,18 +11,14 @@ from nicegui.events import handle_event, UiEventArguments, GenericEventArguments
|
|
|
11
11
|
from nicegui.element import Element
|
|
12
12
|
from nicegui.awaitable_response import AwaitableResponse
|
|
13
13
|
from pathlib import Path
|
|
14
|
-
import nicegui
|
|
15
14
|
|
|
16
15
|
from .types import (
|
|
17
16
|
_T_event_name,
|
|
18
17
|
)
|
|
19
18
|
from .utils import get_bound_event_args, create_event_handler_args
|
|
20
19
|
|
|
21
|
-
NG_ROOT = Path(nicegui.__file__).parent / "elements"
|
|
22
|
-
libraries = [NG_ROOT / "lib/echarts/echarts.min.js"]
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
class echarts(Element, component="ECharts.js", dependencies=libraries): # type: ignore
|
|
21
|
+
class echarts(Element, component="ECharts.js"):
|
|
26
22
|
def __init__(
|
|
27
23
|
self,
|
|
28
24
|
options: Optional[dict] = None,
|
|
@@ -125,9 +125,9 @@ class UseDraggable(Element, component="UseDraggable.js"):
|
|
|
125
125
|
self.on("update", inner_handler, args=_Update_Args)
|
|
126
126
|
|
|
127
127
|
def apply(self, target: Element):
|
|
128
|
-
assert (
|
|
129
|
-
|
|
130
|
-
)
|
|
128
|
+
assert self.__target_id is None, (
|
|
129
|
+
"draggable can only be applied to one current element"
|
|
130
|
+
)
|
|
131
131
|
self.__target_id = target.id
|
|
132
132
|
self._props["elementId"] = self.__target_id
|
|
133
133
|
# self.run_method("applyTargetId", str(self.__target_id))
|
|
@@ -63,7 +63,7 @@ from .officials.range import LazyRangeBindableUi as lazy_range
|
|
|
63
63
|
from .officials.tree import TreeBindableUi as tree
|
|
64
64
|
from .officials.spinner import SpinnerBindableUi as spinner
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
from .UseDraggable.UseDraggable import use_draggable
|
|
68
68
|
from .useMouse.UseMouse import use_mouse
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ from .fileWatcher import FilesWatcher
|
|
|
73
73
|
from .mermaid.mermaid import Mermaid as mermaid
|
|
74
74
|
from .officials.dialog import DialogBindableUi as dialog
|
|
75
75
|
from .vfor import vfor, VforStore
|
|
76
|
-
from .
|
|
76
|
+
from ._vmodel import vmodel
|
|
77
77
|
from .view_model import ViewModel, var, cached_var, list_var, dict_var
|
|
78
78
|
|
|
79
79
|
pagination = q_pagination
|
|
@@ -89,7 +89,6 @@ __all__ = [
|
|
|
89
89
|
"circular_progress",
|
|
90
90
|
"knob",
|
|
91
91
|
"UploadResult",
|
|
92
|
-
"local_file_picker",
|
|
93
92
|
"use_draggable",
|
|
94
93
|
"use_mouse",
|
|
95
94
|
"use_pagination",
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import warnings
|
|
3
|
+
from ex4nicegui.utils.signals import (
|
|
4
|
+
RefWrapper,
|
|
5
|
+
TRef,
|
|
6
|
+
to_raw,
|
|
7
|
+
to_ref_wrapper,
|
|
8
|
+
to_value,
|
|
9
|
+
is_reactive,
|
|
10
|
+
is_ref,
|
|
11
|
+
)
|
|
12
|
+
from typing import (
|
|
13
|
+
Any,
|
|
14
|
+
Union,
|
|
15
|
+
cast,
|
|
16
|
+
Tuple,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
from ex4nicegui.reactive.systems.object_system import get_attribute, set_attribute
|
|
20
|
+
from ex4nicegui.utils.types import _TMaybeRef as TMaybeRef, Ref
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def create_writeable_wrapper(ref_obj: TRef, attrs: Tuple[Union[str, int], ...]):
|
|
24
|
+
if not attrs:
|
|
25
|
+
|
|
26
|
+
def maybe_ref_getter():
|
|
27
|
+
return to_value(ref_obj)
|
|
28
|
+
|
|
29
|
+
def reactive_getter():
|
|
30
|
+
return to_raw(ref_obj)
|
|
31
|
+
|
|
32
|
+
def setter(value):
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
wrapper = to_ref_wrapper(
|
|
36
|
+
reactive_getter if is_reactive(ref_obj) else maybe_ref_getter,
|
|
37
|
+
setter,
|
|
38
|
+
)
|
|
39
|
+
wrapper._is_readonly = False
|
|
40
|
+
return wrapper
|
|
41
|
+
|
|
42
|
+
def getter():
|
|
43
|
+
obj = get_attribute(to_value(ref_obj), attrs[0])
|
|
44
|
+
for attr in attrs[1:]:
|
|
45
|
+
obj = get_attribute(obj, attr)
|
|
46
|
+
|
|
47
|
+
return obj
|
|
48
|
+
|
|
49
|
+
def setter(value):
|
|
50
|
+
obj = to_value(ref_obj)
|
|
51
|
+
|
|
52
|
+
for attr in attrs[:-1]:
|
|
53
|
+
obj = get_attribute(obj, attr)
|
|
54
|
+
|
|
55
|
+
set_attribute(obj, attrs[-1], value)
|
|
56
|
+
|
|
57
|
+
wrapper = to_ref_wrapper(
|
|
58
|
+
getter,
|
|
59
|
+
setter,
|
|
60
|
+
)
|
|
61
|
+
wrapper._is_readonly = False
|
|
62
|
+
return wrapper
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def vmodel(ref_obj: Union[TRef[Any], Any], *attrs: Union[str, int]) -> Any:
|
|
66
|
+
"""Create a two-way binding on a form input element or a component.
|
|
67
|
+
|
|
68
|
+
@see - https://github.com/CrystalWindSnake/ex4nicegui/blob/main/README.en.md#vmodel
|
|
69
|
+
@中文文档 - https://gitee.com/carson_add/ex4nicegui/tree/main/#vmodel
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
expr (Any): _description_
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
.. code-block:: python
|
|
77
|
+
from ex4nicegui.reactive import rxui
|
|
78
|
+
from ex4nicegui import deep_ref
|
|
79
|
+
|
|
80
|
+
data = deep_ref({"a": 1, "b": [1, 2, 3, 4]})
|
|
81
|
+
|
|
82
|
+
rxui.label(lambda: f"{data.value=!s}")
|
|
83
|
+
|
|
84
|
+
# No binding effect
|
|
85
|
+
rxui.input(value=data.value["a"])
|
|
86
|
+
|
|
87
|
+
# readonly binding
|
|
88
|
+
rxui.input(value=lambda: data.value["a"])
|
|
89
|
+
|
|
90
|
+
# two-way binding
|
|
91
|
+
rxui.input(value=rxui.vmodel(data.value,'a'))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
if not is_ref(ref_obj):
|
|
97
|
+
result = cast(Any, ref_obj)
|
|
98
|
+
for attr in attrs:
|
|
99
|
+
result = result[attr]
|
|
100
|
+
|
|
101
|
+
return result
|
|
102
|
+
|
|
103
|
+
if isinstance(ref_obj, RefWrapper):
|
|
104
|
+
ref_obj._is_readonly = False
|
|
105
|
+
|
|
106
|
+
if attrs:
|
|
107
|
+
wrapper = create_writeable_wrapper(ref_obj, attrs)
|
|
108
|
+
|
|
109
|
+
return cast(
|
|
110
|
+
TRef,
|
|
111
|
+
wrapper,
|
|
112
|
+
)
|
|
113
|
+
else:
|
|
114
|
+
warnings.warn(
|
|
115
|
+
"""Maybe you don't need to use vmodel""",
|
|
116
|
+
stacklevel=2,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
return cast(
|
|
120
|
+
TRef,
|
|
121
|
+
ref_obj,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def vmodel_with_index(ref: Ref, index: TMaybeRef[int], *keys: Union[str, int]) -> Ref:
|
|
126
|
+
proxy = ref.value
|
|
127
|
+
|
|
128
|
+
def getter():
|
|
129
|
+
item = proxy[to_value(index)]
|
|
130
|
+
result = item
|
|
131
|
+
|
|
132
|
+
for k in keys:
|
|
133
|
+
result = get_attribute(result, k)
|
|
134
|
+
return result
|
|
135
|
+
|
|
136
|
+
def setter(value):
|
|
137
|
+
item = proxy[to_value(index)]
|
|
138
|
+
|
|
139
|
+
if len(keys) == 1:
|
|
140
|
+
set_attribute(item, keys[0], value)
|
|
141
|
+
return
|
|
142
|
+
|
|
143
|
+
obj = get_attribute(item, keys[0])
|
|
144
|
+
|
|
145
|
+
for k in keys[1:-1]:
|
|
146
|
+
set_attribute(obj, k, get_attribute(obj, k))
|
|
147
|
+
|
|
148
|
+
set_attribute(obj, keys[-1], value)
|
|
149
|
+
|
|
150
|
+
return RefWrapper(getter, setter) # type: ignore
|
|
@@ -25,7 +25,7 @@ from ex4nicegui.utils.signals import (
|
|
|
25
25
|
)
|
|
26
26
|
from ex4nicegui.utils.clientScope import new_scope
|
|
27
27
|
from ex4nicegui.utils.types import _TMaybeRef as TMaybeRef
|
|
28
|
-
from nicegui import
|
|
28
|
+
from nicegui import ui
|
|
29
29
|
from nicegui.elements.mixins.text_element import TextElement
|
|
30
30
|
from nicegui.elements.mixins.value_element import ValueElement
|
|
31
31
|
from ex4nicegui.reactive.services.reactive_service import inject_handle_delete
|
|
@@ -58,7 +58,6 @@ class BindableUi(Generic[TWidget]):
|
|
|
58
58
|
def __init__(self, element: TWidget) -> None:
|
|
59
59
|
self._element = element
|
|
60
60
|
inject_handle_delete(self.element, self._on_element_delete)
|
|
61
|
-
self.tailwind = Tailwind(cast(ui.element, self._element))
|
|
62
61
|
self._effect_scope = new_scope()
|
|
63
62
|
self.__used_scope_style = False
|
|
64
63
|
|
|
@@ -185,7 +184,7 @@ class BindableUi(Generic[TWidget]):
|
|
|
185
184
|
|
|
186
185
|
def props_str():
|
|
187
186
|
props_dict = (
|
|
188
|
-
f"""{name if isinstance(raw_value,bool) else f"{name}='{raw_value}'"}"""
|
|
187
|
+
f"""{name if isinstance(raw_value, bool) else f"{name}='{raw_value}'"}"""
|
|
189
188
|
for name, value in props.items()
|
|
190
189
|
if (raw_value := to_value(value))
|
|
191
190
|
)
|