pgwidgets-python 0.3.4__tar.gz → 0.3.5__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_python-0.3.4 → pgwidgets_python-0.3.5}/PKG-INFO +1 -1
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/async_/application.py +8 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/method_types.py +28 -1
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/sync/application.py +8 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/PKG-INFO +1 -1
- pgwidgets_python-0.3.5/pgwidgets_python.egg-info/scm_version.json +8 -0
- pgwidgets_python-0.3.4/pgwidgets_python.egg-info/scm_version.json +0 -8
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/.flake8 +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/.github/workflows/tests.yml +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/.gitignore +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/.readthedocs.yaml +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/LICENSE.md +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/README.md +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/Makefile +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/WhatsNew.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/api/async.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/api/index.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/api/sync.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/architecture.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/async.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/callbacks.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/conf.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/extras.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/getting-started.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/index.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/subclassing.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/sync.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/utilities.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/web-servers.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/docs/widgets.rst +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/README.md +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/all_widgets.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/all_widgets_async.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/demo_async.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/demo_sync.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/demo_treeview.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/README.md +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/gunicorn.conf.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/nginx.conf +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/server.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/user_app.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/__init__.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/_json.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/async_/Widgets.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/async_/__init__.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/async_/widget.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/buffer.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/callbacks.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/defs.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/extras/__init__.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/extras/file_browser.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/icons/pgw-python-logo.png +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/sync/Widgets.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/sync/__init__.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/sync/text_source.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/sync/widget.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets/text_model.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/SOURCES.txt +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/dependency_links.txt +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/requires.txt +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/scm_file_list.json +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/top_level.txt +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pyproject.toml +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/setup.cfg +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/test_pg2.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/__init__.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_async_session.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_defs.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_extras.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_fonts.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_protocol.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_reconstruct.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_resolve_kwargs.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_session.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_stateful.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_text_source.py +0 -0
- {pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/tests/test_widget_classes.py +0 -0
|
@@ -434,6 +434,14 @@ class Session:
|
|
|
434
434
|
widget._state[spec[0]] = tuple(args)
|
|
435
435
|
else:
|
|
436
436
|
widget._state[spec] = args[0]
|
|
437
|
+
# ComboBox: a value committed with Enter in the browser may be
|
|
438
|
+
# a new entry the browser appended to its list; mirror that
|
|
439
|
+
# append so our _items (and thus get_index) stays consistent.
|
|
440
|
+
if (widget._js_class == "ComboBox" and action == "activated"
|
|
441
|
+
and len(args) >= 2):
|
|
442
|
+
items = widget._state.setdefault("_items", [])
|
|
443
|
+
if args[1] not in items:
|
|
444
|
+
items.append(args[1])
|
|
437
445
|
|
|
438
446
|
# Dialog autoclose: the JS side auto-hides when a button is
|
|
439
447
|
# clicked. Sync that to Python so reconstruction doesn't
|
|
@@ -108,7 +108,7 @@ ACTION_METHODS = {
|
|
|
108
108
|
# Timer
|
|
109
109
|
"start", "cancel", "set", "cond_set",
|
|
110
110
|
# Table/Tree row-level modifications (tracked via bulk set_data)
|
|
111
|
-
"add_item", "remove_item", "update_tree", "remove_items",
|
|
111
|
+
"add_item", "remove_item", "update_tree", "remove_items", "delete_tree",
|
|
112
112
|
"insert_row", "append_row", "delete_row",
|
|
113
113
|
"insert_column", "append_column", "delete_column",
|
|
114
114
|
"set_cell",
|
|
@@ -419,7 +419,34 @@ BINARY_STATE_KEYS = {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
|
|
422
|
+
def _combobox_get_index(self):
|
|
423
|
+
"""Index of the item matching the current text, or -1 when the text is
|
|
424
|
+
not one of the offerings (e.g. a value typed into an editable combo box
|
|
425
|
+
but not yet committed with Enter). Mirrors the JS get_index(), which
|
|
426
|
+
is items.indexOf(input value), and stays consistent with get_text()
|
|
427
|
+
(the cached entry text, kept live by the 'modified' callback)."""
|
|
428
|
+
items = self._state.get("_items", [])
|
|
429
|
+
try:
|
|
430
|
+
return items.index(self._state.get("text", ""))
|
|
431
|
+
except ValueError:
|
|
432
|
+
return -1
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
def _combobox_set_index(self, idx):
|
|
436
|
+
"""Select the item at *idx*, keeping the cached text consistent with
|
|
437
|
+
the index so get_text() agrees with get_index() after a programmatic
|
|
438
|
+
change (the generic setter would leave 'text' stale)."""
|
|
439
|
+
items = self._state.get("_items", [])
|
|
440
|
+
if 0 <= idx < len(items):
|
|
441
|
+
self._state["text"] = items[idx]
|
|
442
|
+
self._state["index"] = idx
|
|
443
|
+
self._user_set_state.add("index")
|
|
444
|
+
return self._call("set_index", idx)
|
|
445
|
+
|
|
446
|
+
|
|
422
447
|
CUSTOM_METHODS = {
|
|
448
|
+
("ComboBox", "get_index"): _combobox_get_index,
|
|
449
|
+
("ComboBox", "set_index"): _combobox_set_index,
|
|
423
450
|
("TabWidget", "index_to_widget"): _index_to_widget,
|
|
424
451
|
("TabWidget", "index_of"): _index_of,
|
|
425
452
|
("StackWidget", "index_to_widget"): _index_to_widget,
|
|
@@ -524,6 +524,14 @@ class Session:
|
|
|
524
524
|
widget._state[spec[0]] = tuple(args)
|
|
525
525
|
else:
|
|
526
526
|
widget._state[spec] = args[0]
|
|
527
|
+
# ComboBox: a value committed with Enter in the browser may be
|
|
528
|
+
# a new entry the browser appended to its list; mirror that
|
|
529
|
+
# append so our _items (and thus get_index) stays consistent.
|
|
530
|
+
if (widget._js_class == "ComboBox" and action == "activated"
|
|
531
|
+
and len(args) >= 2):
|
|
532
|
+
items = widget._state.setdefault("_items", [])
|
|
533
|
+
if args[1] not in items:
|
|
534
|
+
items.append(args[1])
|
|
527
535
|
# Dialog autoclose: the JS side auto-hides when a button is
|
|
528
536
|
# clicked. Sync that to Python so reconstruction doesn't
|
|
529
537
|
# re-show a dialog that was autoclosed.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/examples/flask-multi-process/gunicorn.conf.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pgwidgets_python-0.3.4 → pgwidgets_python-0.3.5}/pgwidgets_python.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|