pgwidgets-js 0.4.1__tar.gz → 0.4.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.
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/.github/workflows/tests.yml +2 -2
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/PKG-INFO +1 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/WhatsNew.rst +47 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/display.rst +18 -5
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/all_widgets_pyodide.py +6 -5
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/all_widgets_pyscript.py +6 -5
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/package.json +1 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/pyodide/widget.py +1 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TreeView.css +7 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TreeView.js +78 -19
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/PKG-INFO +1 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/SOURCES.txt +7 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/scm_file_list.json +7 -1
- pgwidgets_js-0.4.3/pgwidgets_js.egg-info/scm_version.json +8 -0
- pgwidgets_js-0.4.3/tests/__init__.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/test_defs.py +2 -2
- pgwidgets_js-0.4.3/tests/test_treeview_resize.py +34 -0
- pgwidgets_js-0.4.3/tests/test_treeview_select.py +32 -0
- pgwidgets_js-0.4.3/tests/test_treeview_sort.py +27 -0
- pgwidgets_js-0.4.3/tests/treeview_resize.mjs +199 -0
- pgwidgets_js-0.4.3/tests/treeview_select.mjs +92 -0
- pgwidgets_js-0.4.3/tests/treeview_sort.mjs +139 -0
- pgwidgets_js-0.4.1/pgwidgets_js.egg-info/scm_version.json +0 -8
- pgwidgets_js-0.4.1/tests/__init__.py +0 -1
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/.flake8 +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/.gitignore +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/.readthedocs.yaml +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/LICENSE.md +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/MANIFEST.in +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/README.md +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/Widgets.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/Widgets.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/Makefile +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/callbacks.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/conf.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/electron.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/external-widgets.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/for-developers.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/frameworks.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/getting-started.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/index.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/pyodide.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/remote.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/styling.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/controls.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/dialogs.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/index.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/layout.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/menus.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/nonvisual.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/docs/widgets/text.rst +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/all_widgets.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/all_widgets_pyodide.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/all_widgets_pyscript.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/box.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/button.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/canvas.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/checkbox.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/colordialog.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/combobox.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/debug_spinbox.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/dial.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/dialog.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/electron/.gitignore +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/electron/.npmrc +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/electron/index.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/electron/main.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/electron/package.json +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/expander.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/external_widgets.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/fixedlayout.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/frame.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/gridbox.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/htmlview.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/image.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/label.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/mdi_widget.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/menu.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/progressbar.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/pyodide_demo.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/pyscript.toml +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/radiobutton.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/remote.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/remote_demo.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/remote_demo_async.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/scroll_area.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/scrollable.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/scrollbar.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/slider.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/spinbox.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/splitter.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/tab_widget.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/tableview.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/text_entry.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/textarea.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/textentryset.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/textsource.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/togglebutton.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/toolbar.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/treeview.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/examples/videowidget.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/__init__.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/defs.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/pyodide/__init__.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/pyodide/log.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/Widgets.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/Widgets.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/AbstractScrollArea.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Box.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Button.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/CheckBox.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ColorDialog.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ComboBox.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Dial.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Dialog.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Expander.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ExternalWidget.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/FixedLayout.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Frame.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/GridBox.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/HtmlView.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Image.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Label.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/MDIWidget.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Menu.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ProgressBar.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/RadioButton.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ScrollArea.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ScrollBar.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Slider.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/SpinBox.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Splitter.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/StatusBar.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TabWidget.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Text.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TextArea.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TextEntrySet.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TextSource.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ToggleButton.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/ToolBar.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/TopLevel.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/VideoWidget.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/Widget.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/css/WindowMenu.css +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/file.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/folder.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/hdots.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/pgicon.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/pgwidgets-logo.png +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/pgwidgets-logo.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/icons/vdots.svg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/AbstractScrollArea.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Box.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Button.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Callback.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Canvas.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/CheckBox.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ColorDialog.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ColorWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ComboBox.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ComboBoxNative.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Dial.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Dialog.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Expander.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ExternalWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/FileDialog.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/FixedLayout.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Frame.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/GridBox.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/HtmlView.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Image.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Label.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/MDIWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Menu.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/MenuAction.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/MenuBar.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Page.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ProgressBar.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/RadioButton.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/RemoteInterface.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ScrollArea.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ScrollBar.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Separator.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Slider.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/SpinBox.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Splitter.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/StatusBar.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TabWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TableView.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TextArea.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TextEntry.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TextEntrySet.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TextSource.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TextWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Timer.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ToggleButton.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ToolBar.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/ToolBarAction.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/TopLevel.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/VideoWidget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/Widget.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/modules/WindowMenu.js +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js/static/remote.html +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/dependency_links.txt +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/requires.txt +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pgwidgets_js.egg-info/top_level.txt +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/pyproject.toml +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/setup.cfg +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/setup.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/test_consistency.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/test_recent_additions.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/test_static_assets.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/test_treeview_diff.py +0 -0
- {pgwidgets_js-0.4.1 → pgwidgets_js-0.4.3}/tests/treeview_diff.mjs +0 -0
|
@@ -14,10 +14,10 @@ jobs:
|
|
|
14
14
|
python-version: ["3.12", "3.13", "3.14"]
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
18
|
|
|
19
19
|
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
-
uses: actions/setup-python@
|
|
20
|
+
uses: actions/setup-python@v6
|
|
21
21
|
with:
|
|
22
22
|
python-version: ${{ matrix.python-version }}
|
|
23
23
|
|
|
@@ -1,9 +1,56 @@
|
|
|
1
1
|
What's New
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
+
Recent changes — since ``v0.4.2``
|
|
5
|
+
---------------------------------
|
|
6
|
+
|
|
7
|
+
* TreeView / TableView: a column descriptor can now carry
|
|
8
|
+
``sortable: false`` to take that column out of the header-click
|
|
9
|
+
sort. Clicking its header does nothing (in cell-selection mode it
|
|
10
|
+
selects the column instead), and the header drops the pointer cursor
|
|
11
|
+
that advertises a sort. This guards against an accidental sort on a
|
|
12
|
+
column whose values are all equal: it leaves nothing on screen to show
|
|
13
|
+
it happened, and the next edit in that column re-sorts the rows and
|
|
14
|
+
makes the edited row jump.
|
|
15
|
+
* The per-column flag only narrows: ``sortable: true`` on a table built
|
|
16
|
+
with ``sortable=False`` still does not sort. It gates the user's
|
|
17
|
+
gesture only, so ``sort_by_column()`` still works on an opted-out
|
|
18
|
+
column. Columns without the flag behave as before.
|
|
19
|
+
|
|
4
20
|
Recent changes — since ``v0.4.0``
|
|
5
21
|
---------------------------------
|
|
6
22
|
|
|
23
|
+
TreeView: a header drag resizes one column, qt-style
|
|
24
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
25
|
+
|
|
26
|
+
Dragging a header divider now resizes the column to its left and
|
|
27
|
+
nothing else. The columns after it keep their widths and slide along,
|
|
28
|
+
and the table grows past the viewport into the horizontal scrollbar --
|
|
29
|
+
what a qt ``QHeaderView`` does in its default Interactive mode. A drag
|
|
30
|
+
first pins every column to the width it is rendering at, so a column
|
|
31
|
+
still on ``"1fr"`` stops re-dividing the leftover space and drifting
|
|
32
|
+
while an unrelated boundary is dragged.
|
|
33
|
+
|
|
34
|
+
Previously a drag behaved like a splitter: every pixel the column
|
|
35
|
+
gained came out of the next one, so widening a column ate its
|
|
36
|
+
neighbour down to the 5 px floor before anything to the right would
|
|
37
|
+
move. For the same reason the last column had no divider -- it has no
|
|
38
|
+
neighbour to take width from. It has one now.
|
|
39
|
+
|
|
40
|
+
TreeView: ``select_path()`` and friends default ``state`` to true
|
|
41
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
42
|
+
|
|
43
|
+
``select_path(path, state = true)``, ``select_paths()`` and
|
|
44
|
+
``select_all()`` now default ``state``, matching ``select_cell()`` /
|
|
45
|
+
``select_cells()`` and the Python API, where a caller writes
|
|
46
|
+
``select_path(path)`` to select a row.
|
|
47
|
+
|
|
48
|
+
A bridge that forwards only the arguments it was given -- as the Python
|
|
49
|
+
proxy does, being generated from the ``defs.py`` parameter lists --
|
|
50
|
+
passed ``undefined`` otherwise, and the call quietly did nothing.
|
|
51
|
+
``select_all()`` was worse than a no-op: it took the ``else`` branch
|
|
52
|
+
and cleared the selection instead of filling it.
|
|
53
|
+
|
|
7
54
|
TreeView / TableView: selecting from code no longer fires ``selected``
|
|
8
55
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9
56
|
|
|
@@ -390,10 +390,11 @@ supplies no value for it, so most interiors need no
|
|
|
390
390
|
* - ``clear_selection()``
|
|
391
391
|
- Drop all selection. Silent, like the other selection
|
|
392
392
|
setters.
|
|
393
|
-
* - ``select_path(path, state)`` / ``select_paths(paths, state)``
|
|
394
|
-
- Select or deselect by key path(s).
|
|
395
|
-
|
|
396
|
-
|
|
393
|
+
* - ``select_path(path, state=true)`` / ``select_paths(paths, state=true)``
|
|
394
|
+
- Select or deselect by key path(s). ``state`` defaults to
|
|
395
|
+
true, so ``select_path(path)`` selects.
|
|
396
|
+
* - ``select_all(state=true)``
|
|
397
|
+
- Select or deselect all nodes. ``state`` defaults to true.
|
|
397
398
|
* - ``get_subtree(status='all')``
|
|
398
399
|
- Return a dict-tree containing a subset. ``status`` is
|
|
399
400
|
``"all"``, ``"selected"``, ``"expanded"``, or ``"collapsed"``.
|
|
@@ -422,7 +423,7 @@ supplies no value for it, so most interiors need no
|
|
|
422
423
|
(``"1fr"``) column reports a real number; falls back to the
|
|
423
424
|
widths that were set when the view is not on screen yet.
|
|
424
425
|
* - ``set_optimal_column_widths()``
|
|
425
|
-
- Auto-size all columns.
|
|
426
|
+
- Auto-size all columns to their header and cell content.
|
|
426
427
|
* - ``set_row_spacing(px)`` / ``set_column_spacing(px)``
|
|
427
428
|
- Set the vertical (row) / horizontal (column) cell padding in
|
|
428
429
|
pixels. ``set_row_spacing(0)`` also relaxes the row min-height
|
|
@@ -510,6 +511,18 @@ gate the per-row widget. An empty row value of ``null`` /
|
|
|
510
511
|
``false`` on a button column suppresses that row's button if
|
|
511
512
|
``visible_key`` is also unset.
|
|
512
513
|
|
|
514
|
+
**Resizing columns.** Every header cell carries a divider on its right
|
|
515
|
+
edge, the last column included. Dragging one resizes *that* column and
|
|
516
|
+
leaves the rest alone: the columns after it keep their widths and slide
|
|
517
|
+
along, and the table grows past the viewport into the horizontal
|
|
518
|
+
scrollbar. This is what a qt ``QHeaderView`` does in its default
|
|
519
|
+
Interactive mode. A drag pins every column to the width it is
|
|
520
|
+
rendering at, so a column still on ``"1fr"`` stops re-dividing the
|
|
521
|
+
leftover space and drifting. (Before v0.4.2 a drag behaved like a
|
|
522
|
+
splitter, taking the width it gained out of the next column, and the
|
|
523
|
+
last column had no divider at all because it has no neighbour to take
|
|
524
|
+
from.)
|
|
525
|
+
|
|
513
526
|
**Selecting from code.** ``set_selected``, ``select_path``,
|
|
514
527
|
``select_paths``, ``select_all``, ``clear_selection`` and their
|
|
515
528
|
cell-mode counterparts ``select_cell`` / ``select_cells`` /
|
|
@@ -90,7 +90,7 @@ def make_demo(name):
|
|
|
90
90
|
btn_icon.set_icon("../pgwidgets_js/static/icons/pgicon.svg",
|
|
91
91
|
[16, 16])
|
|
92
92
|
btn_icon.on("activated",
|
|
93
|
-
|
|
93
|
+
lambda: lbl.set_text("Icon button clicked"))
|
|
94
94
|
hbox.add_widget(btn_a, 0)
|
|
95
95
|
hbox.add_widget(btn_b, 0)
|
|
96
96
|
hbox.add_widget(btn_icon, 0)
|
|
@@ -137,7 +137,7 @@ def make_demo(name):
|
|
|
137
137
|
content.add_widget(Widgets.Label("Editable:"), 0)
|
|
138
138
|
combo2 = Widgets.ComboBox(editable=True, dropdown_limit=5)
|
|
139
139
|
for f in ["Red", "Orange", "Yellow", "Green", "Blue",
|
|
140
|
-
|
|
140
|
+
"Indigo", "Violet"]:
|
|
141
141
|
combo2.append_text(f)
|
|
142
142
|
combo2.on("activated",
|
|
143
143
|
lambda idx, text: lbl.set_text(f"Entered: {text}"))
|
|
@@ -313,7 +313,7 @@ def make_demo(name):
|
|
|
313
313
|
sl1.on("activated",
|
|
314
314
|
lambda val: lbl.set_text(f"Integer: {val}"))
|
|
315
315
|
sl2 = Widgets.Slider(min=0, max=1, step=0.01, value=0.5,
|
|
316
|
-
|
|
316
|
+
dtype="float", track=True)
|
|
317
317
|
sl2.on("activated",
|
|
318
318
|
lambda val: lbl.set_text(f"Float: {val}"))
|
|
319
319
|
content.add_widget(Widgets.Label("Integer (0-100):"), 0)
|
|
@@ -367,8 +367,8 @@ def make_demo(name):
|
|
|
367
367
|
|
|
368
368
|
elif name == "TextArea":
|
|
369
369
|
ta = Widgets.TextArea("This is a multi-line text area.\n\n"
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
"You can type freely here.\n"
|
|
371
|
+
"Resize the window to see it adapt.")
|
|
372
372
|
subwin = mdi.add_widget(ta,
|
|
373
373
|
{"title": "TextArea",
|
|
374
374
|
"width": 320, "height": 200})
|
|
@@ -390,6 +390,7 @@ def make_demo(name):
|
|
|
390
390
|
src.create_tag("keyword", {"foreground": "#0066cc", "bold": True})
|
|
391
391
|
src.create_tag("string", {"foreground": "#a31515"})
|
|
392
392
|
text = src.get_text()
|
|
393
|
+
|
|
393
394
|
# apply_tag now takes TextBufferRefs; build a small helper.
|
|
394
395
|
def tag_range(name, start, end):
|
|
395
396
|
src.apply_tag(name,
|
|
@@ -99,7 +99,7 @@ def make_demo(name):
|
|
|
99
99
|
btn_icon.set_icon("../pgwidgets_js/static/icons/pgicon.svg",
|
|
100
100
|
[16, 16])
|
|
101
101
|
btn_icon.on("activated",
|
|
102
|
-
|
|
102
|
+
lambda: lbl.set_text("Icon button clicked"))
|
|
103
103
|
hbox.add_widget(btn_a, 0)
|
|
104
104
|
hbox.add_widget(btn_b, 0)
|
|
105
105
|
hbox.add_widget(btn_icon, 0)
|
|
@@ -146,7 +146,7 @@ def make_demo(name):
|
|
|
146
146
|
content.add_widget(Widgets.Label("Editable:"), 0)
|
|
147
147
|
combo2 = Widgets.ComboBox(editable=True, dropdown_limit=5)
|
|
148
148
|
for f in ["Red", "Orange", "Yellow", "Green", "Blue",
|
|
149
|
-
|
|
149
|
+
"Indigo", "Violet"]:
|
|
150
150
|
combo2.append_text(f)
|
|
151
151
|
combo2.on("activated",
|
|
152
152
|
lambda idx, text: lbl.set_text(f"Entered: {text}"))
|
|
@@ -322,7 +322,7 @@ def make_demo(name):
|
|
|
322
322
|
sl1.on("activated",
|
|
323
323
|
lambda val: lbl.set_text(f"Integer: {val}"))
|
|
324
324
|
sl2 = Widgets.Slider(min=0, max=1, step=0.01, value=0.5,
|
|
325
|
-
|
|
325
|
+
dtype="float", track=True)
|
|
326
326
|
sl2.on("activated",
|
|
327
327
|
lambda val: lbl.set_text(f"Float: {val}"))
|
|
328
328
|
content.add_widget(Widgets.Label("Integer (0-100):"), 0)
|
|
@@ -376,8 +376,8 @@ def make_demo(name):
|
|
|
376
376
|
|
|
377
377
|
elif name == "TextArea":
|
|
378
378
|
ta = Widgets.TextArea("This is a multi-line text area.\n\n"
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
"You can type freely here.\n"
|
|
380
|
+
"Resize the window to see it adapt.")
|
|
381
381
|
subwin = mdi.add_widget(ta,
|
|
382
382
|
{"title": "TextArea",
|
|
383
383
|
"width": 320, "height": 200})
|
|
@@ -399,6 +399,7 @@ def make_demo(name):
|
|
|
399
399
|
src.create_tag("keyword", {"foreground": "#0066cc", "bold": True})
|
|
400
400
|
src.create_tag("string", {"foreground": "#a31515"})
|
|
401
401
|
text = src.get_text()
|
|
402
|
+
|
|
402
403
|
# apply_tag now takes TextBufferRefs; build a small helper.
|
|
403
404
|
def tag_range(name, start, end):
|
|
404
405
|
src.apply_tag(name,
|
|
@@ -7,7 +7,7 @@ from pyodide.ffi import create_proxy, to_js
|
|
|
7
7
|
from js import Object, Widgets
|
|
8
8
|
|
|
9
9
|
from pgwidgets_js.defs import (WIDGETS, WIDGET_METHODS, CONTAINER_METHODS,
|
|
10
|
-
|
|
10
|
+
CALLBACK_METHODS)
|
|
11
11
|
|
|
12
12
|
# Registry of built widget subclasses, keyed by JS class name. Populated
|
|
13
13
|
# by build_widget_class(). Used by _from_js_val() so that a widget
|
|
@@ -63,6 +63,13 @@
|
|
|
63
63
|
background: #e4e4e4;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/* A column that has opted out of the header-click sort
|
|
67
|
+
(`sortable: false`) on an otherwise sortable table: clicking it does
|
|
68
|
+
nothing, so don't offer the pointer that says it will. */
|
|
69
|
+
.treeview-header-nosort {
|
|
70
|
+
cursor: default;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
.treeview-header-cell:last-child {
|
|
67
74
|
border-right: none;
|
|
68
75
|
}
|
|
@@ -244,7 +244,7 @@ class TreeView extends Widget {
|
|
|
244
244
|
if (typeof c === 'string') {
|
|
245
245
|
return { label: c, type: 'string', editable: false,
|
|
246
246
|
key: '_col' + (autoIdx++), halign: 'left',
|
|
247
|
-
colwidth: null, widget: null };
|
|
247
|
+
colwidth: null, widget: null, sortable: null };
|
|
248
248
|
}
|
|
249
249
|
let type = TreeView._normalizeType(c.type);
|
|
250
250
|
let key = c.key;
|
|
@@ -268,6 +268,11 @@ class TreeView extends Widget {
|
|
|
268
268
|
? String(c.enabled_key) : null),
|
|
269
269
|
visible_key: (c.visible_key != null
|
|
270
270
|
? String(c.visible_key) : null),
|
|
271
|
+
// null = follow the widget's own `sortable`; false
|
|
272
|
+
// takes this column out of the header-click sort even
|
|
273
|
+
// on a sortable table. A column flag can only narrow:
|
|
274
|
+
// sortable: true on a non-sortable table does nothing.
|
|
275
|
+
sortable: (c.sortable == null ? null : !!c.sortable),
|
|
271
276
|
};
|
|
272
277
|
});
|
|
273
278
|
}
|
|
@@ -327,6 +332,18 @@ class TreeView extends Widget {
|
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
/** Find the column descriptor for a key. Returns null if unknown. */
|
|
335
|
+
/**
|
|
336
|
+
* Can the user sort by clicking this column's header? The table
|
|
337
|
+
* has to be sortable, and the column must not have opted out with
|
|
338
|
+
* ``sortable: false``. A per-column flag only ever narrows: it
|
|
339
|
+
* cannot make a column sortable on a table that is not.
|
|
340
|
+
* @private
|
|
341
|
+
*/
|
|
342
|
+
_columnIsSortable(col) {
|
|
343
|
+
if (!this._sortable) return false;
|
|
344
|
+
return !(col && col.sortable === false);
|
|
345
|
+
}
|
|
346
|
+
|
|
330
347
|
_columnByKey(key) {
|
|
331
348
|
for (let col of this._columns) {
|
|
332
349
|
if (col.key === key) return col;
|
|
@@ -650,6 +667,9 @@ class TreeView extends Widget {
|
|
|
650
667
|
// left otherwise). CSS handles the per-halign layout.
|
|
651
668
|
let halign = this._columns[i].halign || 'left';
|
|
652
669
|
cell.classList.add('treeview-halign-' + halign);
|
|
670
|
+
if (this._sortable && !this._columnIsSortable(this._columns[i])) {
|
|
671
|
+
cell.classList.add('treeview-header-nosort');
|
|
672
|
+
}
|
|
653
673
|
|
|
654
674
|
let labelSpan = document.createElement('span');
|
|
655
675
|
labelSpan.className = 'treeview-header-label';
|
|
@@ -668,7 +688,8 @@ class TreeView extends Widget {
|
|
|
668
688
|
// When not sortable, plain click selects too.
|
|
669
689
|
if (this._isCellMode()) {
|
|
670
690
|
let usingModifier = e.shiftKey || e.ctrlKey || e.metaKey;
|
|
671
|
-
if (usingModifier
|
|
691
|
+
if (usingModifier
|
|
692
|
+
|| !this._columnIsSortable(this._columns[i])) {
|
|
672
693
|
this._onHeaderColumnSelect(e, i);
|
|
673
694
|
return;
|
|
674
695
|
}
|
|
@@ -676,12 +697,16 @@ class TreeView extends Widget {
|
|
|
676
697
|
this._onHeaderClick(this._columns[i].key);
|
|
677
698
|
});
|
|
678
699
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
700
|
+
// Every column gets a divider, the last one included -- qt
|
|
701
|
+
// lets you drag the final section's right edge too. (The
|
|
702
|
+
// last one used to be skipped because resizing worked like a
|
|
703
|
+
// splitter, and the last column has no neighbour to take the
|
|
704
|
+
// width from; now that a drag only resizes its own column,
|
|
705
|
+
// there is nothing special about it.)
|
|
706
|
+
let handle = document.createElement('div');
|
|
707
|
+
handle.className = 'treeview-resize-handle';
|
|
708
|
+
cell.appendChild(handle);
|
|
709
|
+
this._setupColumnResize(handle, i);
|
|
685
710
|
|
|
686
711
|
this._header.appendChild(cell);
|
|
687
712
|
}
|
|
@@ -714,8 +739,22 @@ class TreeView extends Widget {
|
|
|
714
739
|
}
|
|
715
740
|
}
|
|
716
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Wire up one header divider.
|
|
744
|
+
*
|
|
745
|
+
* Dragging resizes only the column to the divider's left: the
|
|
746
|
+
* columns after it keep their widths and slide along, the table
|
|
747
|
+
* grows past the viewport and the horizontal scrollbar takes up the
|
|
748
|
+
* difference. That is what a qt ``QHeaderView`` does in its default
|
|
749
|
+
* Interactive mode, and what makes a too-narrow column widenable
|
|
750
|
+
* without robbing its neighbour.
|
|
751
|
+
*
|
|
752
|
+
* (It used to behave like a splitter -- every pixel the dragged
|
|
753
|
+
* column gained came out of the next one, so widening a column ate
|
|
754
|
+
* the one beside it down to the 5 px floor before anything moved.)
|
|
755
|
+
*/
|
|
717
756
|
_setupColumnResize(handle, colIndex) {
|
|
718
|
-
let startX,
|
|
757
|
+
let startX, startWidth;
|
|
719
758
|
const onMouseMove = (e) => {
|
|
720
759
|
let dx = e.clientX - startX;
|
|
721
760
|
// 5 px floor matches the width of ``.treeview-resize-handle``
|
|
@@ -726,11 +765,11 @@ class TreeView extends Widget {
|
|
|
726
765
|
// *inflate* any column whose declared ``colwidth`` was
|
|
727
766
|
// below 30 the moment a drag started, making columns
|
|
728
767
|
// like a 10 px Mute / checkbox column un-resizable.
|
|
729
|
-
|
|
730
|
-
let newB = Math.max(5, startWidthB - dx);
|
|
731
|
-
this._colWidths[colIndex] = newA + 'px';
|
|
732
|
-
this._colWidths[colIndex + 1] = newB + 'px';
|
|
768
|
+
this._colWidths[colIndex] = Math.max(5, startWidth + dx) + 'px';
|
|
733
769
|
this._applyGridTemplate();
|
|
770
|
+
// the table's total width changes now (it did not when this
|
|
771
|
+
// stole from the neighbour), so the scrollbar has to follow
|
|
772
|
+
this._syncScrollbars();
|
|
734
773
|
};
|
|
735
774
|
const onMouseUp = () => {
|
|
736
775
|
document.removeEventListener('mousemove', onMouseMove);
|
|
@@ -741,15 +780,28 @@ class TreeView extends Widget {
|
|
|
741
780
|
e.stopPropagation();
|
|
742
781
|
startX = e.clientX;
|
|
743
782
|
let cells = this._header.querySelectorAll('.treeview-header-cell');
|
|
744
|
-
|
|
745
|
-
|
|
783
|
+
// Pin every column to the width it is rendering at before
|
|
784
|
+
// the drag starts. Any track still on an ``fr`` unit would
|
|
785
|
+
// otherwise re-divide the leftover space on each move, so
|
|
786
|
+
// columns the user never touched would drift as a side
|
|
787
|
+
// effect of dragging one boundary.
|
|
788
|
+
for (let i = 0; i < this._colWidths.length; i++) {
|
|
789
|
+
if (cells[i]) {
|
|
790
|
+
this._colWidths[i] =
|
|
791
|
+
cells[i].getBoundingClientRect().width + 'px';
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
startWidth = parseFloat(this._colWidths[colIndex]);
|
|
746
795
|
document.addEventListener('mousemove', onMouseMove);
|
|
747
796
|
document.addEventListener('mouseup', onMouseUp);
|
|
748
797
|
});
|
|
749
798
|
}
|
|
750
799
|
|
|
751
800
|
_onHeaderClick(colKey) {
|
|
752
|
-
|
|
801
|
+
// The user's gesture only. sort_by_column() stays permissive,
|
|
802
|
+
// so an application can still sort on a column it has taken out
|
|
803
|
+
// of the header's reach.
|
|
804
|
+
if (!this._columnIsSortable(this._columnByKey(colKey))) return;
|
|
753
805
|
let ascending = (this._sortColKey === colKey) ? !this._sortAscending : true;
|
|
754
806
|
this.sort_by_column(colKey, ascending);
|
|
755
807
|
this.make_callback('sorted', colKey, ascending);
|
|
@@ -1403,6 +1455,13 @@ class TreeView extends Widget {
|
|
|
1403
1455
|
* and a pair of views that clear each other's selection would
|
|
1404
1456
|
* otherwise ping-pong. Only pointer and keyboard interaction
|
|
1405
1457
|
* reports a selection.
|
|
1458
|
+
*
|
|
1459
|
+
* NOTE: the ``state`` argument of the select_* methods defaults to
|
|
1460
|
+
* true, matching select_cell()/select_cells() and the Python side
|
|
1461
|
+
* (whose callers write ``select_path(path)`` to select a row). A
|
|
1462
|
+
* bridge that forwards only the arguments it was given would
|
|
1463
|
+
* otherwise pass ``undefined`` here, and the call would silently do
|
|
1464
|
+
* nothing -- or, for select_all(), clear the selection instead.
|
|
1406
1465
|
*/
|
|
1407
1466
|
clear_selection() {
|
|
1408
1467
|
this._selection = [];
|
|
@@ -1430,7 +1489,7 @@ class TreeView extends Widget {
|
|
|
1430
1489
|
this._updateSelectionDisplay();
|
|
1431
1490
|
}
|
|
1432
1491
|
|
|
1433
|
-
select_path(path, state) {
|
|
1492
|
+
select_path(path, state = true) {
|
|
1434
1493
|
let node = this._nodeAtPath(path);
|
|
1435
1494
|
if (!node) return;
|
|
1436
1495
|
let idx = this._selection.indexOf(node);
|
|
@@ -1442,7 +1501,7 @@ class TreeView extends Widget {
|
|
|
1442
1501
|
this._updateSelectionDisplay();
|
|
1443
1502
|
}
|
|
1444
1503
|
|
|
1445
|
-
select_paths(paths, state) {
|
|
1504
|
+
select_paths(paths, state = true) {
|
|
1446
1505
|
for (let path of paths) {
|
|
1447
1506
|
let node = this._nodeAtPath(path);
|
|
1448
1507
|
if (!node) continue;
|
|
@@ -1456,7 +1515,7 @@ class TreeView extends Widget {
|
|
|
1456
1515
|
this._updateSelectionDisplay();
|
|
1457
1516
|
}
|
|
1458
1517
|
|
|
1459
|
-
select_all(state) {
|
|
1518
|
+
select_all(state = true) {
|
|
1460
1519
|
if (state) {
|
|
1461
1520
|
this._selection = [];
|
|
1462
1521
|
this._walkNodes(this._root, (n) => this._selection.push(n));
|
|
@@ -201,4 +201,10 @@ tests/test_defs.py
|
|
|
201
201
|
tests/test_recent_additions.py
|
|
202
202
|
tests/test_static_assets.py
|
|
203
203
|
tests/test_treeview_diff.py
|
|
204
|
-
tests/
|
|
204
|
+
tests/test_treeview_resize.py
|
|
205
|
+
tests/test_treeview_select.py
|
|
206
|
+
tests/test_treeview_sort.py
|
|
207
|
+
tests/treeview_diff.mjs
|
|
208
|
+
tests/treeview_resize.mjs
|
|
209
|
+
tests/treeview_select.mjs
|
|
210
|
+
tests/treeview_sort.mjs
|
|
@@ -196,6 +196,12 @@
|
|
|
196
196
|
"tests/test_recent_additions.py",
|
|
197
197
|
"tests/test_static_assets.py",
|
|
198
198
|
"tests/test_treeview_diff.py",
|
|
199
|
-
"tests/
|
|
199
|
+
"tests/test_treeview_resize.py",
|
|
200
|
+
"tests/test_treeview_select.py",
|
|
201
|
+
"tests/test_treeview_sort.py",
|
|
202
|
+
"tests/treeview_diff.mjs",
|
|
203
|
+
"tests/treeview_resize.mjs",
|
|
204
|
+
"tests/treeview_select.mjs",
|
|
205
|
+
"tests/treeview_sort.mjs"
|
|
200
206
|
]
|
|
201
207
|
}
|
|
File without changes
|
|
@@ -75,8 +75,8 @@ def test_base_methods_have_valid_params():
|
|
|
75
75
|
"""WIDGET_METHODS, CALLBACK_METHODS, and CONTAINER_METHODS should
|
|
76
76
|
all have list values."""
|
|
77
77
|
for source_name, methods in [("WIDGET_METHODS", WIDGET_METHODS),
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
("CALLBACK_METHODS", CALLBACK_METHODS),
|
|
79
|
+
("CONTAINER_METHODS", CONTAINER_METHODS)]:
|
|
80
80
|
for mname, params in methods.items():
|
|
81
81
|
assert isinstance(params, list), (
|
|
82
82
|
f"{source_name}.{mname} params is "
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Run the JS-side TreeView column-resize tests under node.
|
|
2
|
+
|
|
3
|
+
Dragging a header divider resizes the column to its left and nothing
|
|
4
|
+
else, the way a qt ``QHeaderView`` does in its default Interactive mode:
|
|
5
|
+
the columns after it keep their widths and slide along, and the table
|
|
6
|
+
grows past the viewport into the horizontal scrollbar. It used to work
|
|
7
|
+
like a splitter, taking every gained pixel out of the next column, so
|
|
8
|
+
widening a column ate its neighbour down to the 5px floor before
|
|
9
|
+
anything to the right would move.
|
|
10
|
+
|
|
11
|
+
The drag handler only reads the header cells' rendered widths and writes
|
|
12
|
+
``_colWidths``, so it runs in node with a stub header and a small
|
|
13
|
+
document shim (see tests/treeview_resize.mjs).
|
|
14
|
+
|
|
15
|
+
Skipped when node isn't installed.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import shutil
|
|
19
|
+
import subprocess
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
|
|
22
|
+
import pytest
|
|
23
|
+
|
|
24
|
+
SCRIPT = Path(__file__).parent / "treeview_resize.mjs"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.skipif(shutil.which("node") is None,
|
|
28
|
+
reason="node is not installed")
|
|
29
|
+
def test_treeview_resize():
|
|
30
|
+
proc = subprocess.run(["node", str(SCRIPT)], capture_output=True,
|
|
31
|
+
text=True)
|
|
32
|
+
assert proc.returncode == 0, (
|
|
33
|
+
f"JS resize tests failed:\n{proc.stdout}\n{proc.stderr}")
|
|
34
|
+
assert "ALL JS RESIZE TESTS PASSED" in proc.stdout
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Run the JS-side TreeView selection tests under node.
|
|
2
|
+
|
|
3
|
+
``select_path`` / ``select_paths`` / ``select_all`` default ``state`` to
|
|
4
|
+
true, matching ``select_cell``/``select_cells`` and the Python API (whose
|
|
5
|
+
callers write ``select_path(path)`` to select a row). The bridge forwards
|
|
6
|
+
only the arguments it was given, so without those defaults the JS side
|
|
7
|
+
receives ``undefined`` and the call silently does nothing -- or, for
|
|
8
|
+
``select_all()``, clears the selection instead of filling it.
|
|
9
|
+
|
|
10
|
+
The selection setters only touch ``_selection`` and the node tree, so they
|
|
11
|
+
can be exercised in node without a DOM (see tests/treeview_select.mjs).
|
|
12
|
+
|
|
13
|
+
Skipped when node isn't installed.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import shutil
|
|
17
|
+
import subprocess
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
import pytest
|
|
21
|
+
|
|
22
|
+
SCRIPT = Path(__file__).parent / "treeview_select.mjs"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@pytest.mark.skipif(shutil.which("node") is None,
|
|
26
|
+
reason="node is not installed")
|
|
27
|
+
def test_treeview_select():
|
|
28
|
+
proc = subprocess.run(["node", str(SCRIPT)], capture_output=True,
|
|
29
|
+
text=True)
|
|
30
|
+
assert proc.returncode == 0, (
|
|
31
|
+
f"JS select tests failed:\n{proc.stdout}\n{proc.stderr}")
|
|
32
|
+
assert "ALL JS SELECT TESTS PASSED" in proc.stdout
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Run the JS-side TreeView sort-gate tests under node.
|
|
2
|
+
|
|
3
|
+
A column can opt out of the header-click sort with ``sortable: false``.
|
|
4
|
+
The gate (``_columnIsSortable``) and the sort itself are pure -- they
|
|
5
|
+
only touch plain objects and Maps -- so they can be exercised in node
|
|
6
|
+
without a DOM (see tests/treeview_sort.mjs).
|
|
7
|
+
|
|
8
|
+
Skipped when node isn't installed.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import shutil
|
|
12
|
+
import subprocess
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
import pytest
|
|
16
|
+
|
|
17
|
+
SCRIPT = Path(__file__).parent / "treeview_sort.mjs"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@pytest.mark.skipif(shutil.which("node") is None,
|
|
21
|
+
reason="node is not installed")
|
|
22
|
+
def test_treeview_sort():
|
|
23
|
+
proc = subprocess.run(["node", str(SCRIPT)], capture_output=True,
|
|
24
|
+
text=True)
|
|
25
|
+
assert proc.returncode == 0, (
|
|
26
|
+
f"JS sort tests failed:\n{proc.stdout}\n{proc.stderr}")
|
|
27
|
+
assert "ALL JS SORT TESTS PASSED" in proc.stdout
|