Skip to content

Commit 1fe5322

Browse files
committed
ci: create release for v1.0.12
1 parent 2950010 commit 1fe5322

25 files changed

Lines changed: 1536 additions & 1 deletion

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ dmypy.json
131131
node_modules
132132
/assets/
133133

134-
dash_extensions/*
135134
inst/*
136135
**/file_system_backend/*
137136
man/*

PKG-INFO

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Metadata-Version: 2.1
2+
Name: dash-extensions
3+
Version: 1.0.12
4+
Summary: Extensions for Plotly Dash.
5+
Home-page: https://dash-extensions.com
6+
License: MIT
7+
Author: emher
8+
Author-email: emil.h.eriksen@gmail.com
9+
Requires-Python: >=3.8,<4
10+
Classifier: License :: OSI Approved :: MIT License
11+
Classifier: Programming Language :: Python :: 3
12+
Classifier: Programming Language :: Python :: 3.8
13+
Classifier: Programming Language :: Python :: 3.9
14+
Classifier: Programming Language :: Python :: 3.10
15+
Classifier: Programming Language :: Python :: 3.11
16+
Provides-Extra: mantine
17+
Requires-Dist: Flask-Caching (>=2.1.0,<3.0.0)
18+
Requires-Dist: dash (>=2.15.0)
19+
Requires-Dist: dash-mantine-components (>=0.11.1,<0.12.0) ; extra == "mantine"
20+
Requires-Dist: dataclass-wizard (>=0.22.2,<0.23.0)
21+
Requires-Dist: jsbeautifier (>=1.14.3,<2.0.0)
22+
Requires-Dist: more-itertools (>=9.0.0,<10.0.0)
23+
Project-URL: Repository, https://github.com/thedirtyfew/dash-extensions
24+
Description-Content-Type: text/markdown
25+
26+
[![PyPI Latest Release](https://img.shields.io/pypi/v/dash-extensions.svg)](https://pypi.org/project/dash-extensions/)
27+
[![codecov](https://img.shields.io/codecov/c/github/thedirtyfew/dash-extensions?logo=codecov)](https://codecov.io/gh/thedirtyfew/dash-extensions)
28+
[![Testing](https://github.com/thedirtyfew/dash-extensions/actions/workflows/python-test.yml/badge.svg)](https://github.com/thedirtyfew/dash-extensions/actions/workflows/python-test.yml)
29+
[![CodeQL](https://github.com/thedirtyfew/dash-extensions/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/thedirtyfew/dash-extensions/actions/workflows/codeql-analysis.yml)
30+
31+
The `dash-extensions` package is a collection of utility functions, syntax extensions, and Dash components that aim to improve the Dash development experience. It can be divided in four main pillars,
32+
33+
* The `enrich` module, which contains various enriched versions of Dash components
34+
* A number of custom components, e.g. the `Websocket` component, which enables real-time communication and push notifications
35+
* The `javascript` module, which contains functionality to ease the interplay between Dash and JavaScript
36+
* The `snippets` module, which contains a collection of utility functions (documentation limited to source code comments)
37+
38+
The `enrich` module enables a number of _transforms_ that add functionality and/or syntactic sugar to Dash. Examples include
39+
40+
* Making it possible to avoid invoking a callback _if it is already running_ via the `BlockingCallbackTransform`
41+
* Enabling logging from within Dash callbacks via the `LogTransform`
42+
* Improving app performance via the `ServersideOutputTransform`
43+
44+
to name a few. To enable interactivity, the documentation has been moved to a [separate page](http://dash-extensions.com).
45+
46+
NB: The 1.0.0 version introduces a number of breaking changes, see documentation for details.
47+
48+
## Donation
49+
50+
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=Z9RXT5HVPK3B8&currency_code=DKK&source=url)
51+
52+
## Installing
53+
54+
* Only `release/{VERSION}` branches and `v{VERSION}` tags should be used for direct pip / poetry based install(s), installation(s) from branches that were not created by the `release` action will not work as they will be missing all the `webpack` generated files.
55+

dash_extensions/BeforeAfter.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class BeforeAfter(Component):
7+
"""A BeforeAfter component.
8+
Before After Image Slider based on https://github.com/sneas/img-comparison-slider
9+
10+
Keyword arguments:
11+
12+
- id (string; optional):
13+
The ID used to identify this component in Dash callbacks.
14+
15+
- after (dict; optional):
16+
Props for the `after` Img component. eg {\"src\":
17+
\"/assets/lena_color.png\"}.
18+
19+
- before (dict; optional):
20+
Props for the `before` Img component. eg {\"src\":
21+
\"/assets/lena_bw.png\"}.
22+
23+
- direction (a value equal to: 'horizontal', 'vertical'; default 'horizontal'):
24+
Set slider direction.
25+
26+
- height (string; default 'auto'):
27+
Image height - default \"auto\" for responsive images.
28+
29+
- hover (boolean; default True):
30+
Automatic slide on mouse over.
31+
32+
- keyboard (a value equal to: 'enabled', 'disabled'; default 'enabled'):
33+
Enable/disable slider position control with the keyboard.
34+
35+
- value (number; default 50):
36+
The divider position can be specified as a percentage, i.e. 0 to
37+
100.
38+
39+
- width (string; default '100%'):
40+
Image width - default \"100%\" for responsive images."""
41+
_children_props = []
42+
_base_nodes = ['children']
43+
_namespace = 'dash_extensions'
44+
_type = 'BeforeAfter'
45+
@_explicitize_args
46+
def __init__(self, id=Component.UNDEFINED, height=Component.UNDEFINED, width=Component.UNDEFINED, hover=Component.UNDEFINED, value=Component.UNDEFINED, direction=Component.UNDEFINED, keyboard=Component.UNDEFINED, before=Component.UNDEFINED, after=Component.UNDEFINED, **kwargs):
47+
self._prop_names = ['id', 'after', 'before', 'direction', 'height', 'hover', 'keyboard', 'value', 'width']
48+
self._valid_wildcard_attributes = []
49+
self.available_properties = ['id', 'after', 'before', 'direction', 'height', 'hover', 'keyboard', 'value', 'width']
50+
self.available_wildcard_properties = []
51+
_explicit_args = kwargs.pop('_explicit_args')
52+
_locals = locals()
53+
_locals.update(kwargs) # For wildcard attrs and excess named props
54+
args = {k: _locals[k] for k in _explicit_args}
55+
56+
super(BeforeAfter, self).__init__(**args)

dash_extensions/CycleBreaker.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class CycleBreaker(Component):
7+
"""A CycleBreaker component.
8+
Simple data store that automatically copies the current value of the src property into dst property. Can be used to break circular dependencies.
9+
10+
Keyword arguments:
11+
12+
- id (string; optional):
13+
The ID used to identify this component in Dash callbacks.
14+
15+
- dst (boolean | number | string | dict | list; optional):
16+
Read the forwarded value from this property.
17+
18+
- src (boolean | number | string | dict | list; optional):
19+
Set this property to value to be forwarded from ."""
20+
_children_props = []
21+
_base_nodes = ['children']
22+
_namespace = 'dash_extensions'
23+
_type = 'CycleBreaker'
24+
@_explicitize_args
25+
def __init__(self, id=Component.UNDEFINED, src=Component.UNDEFINED, dst=Component.UNDEFINED, **kwargs):
26+
self._prop_names = ['id', 'dst', 'src']
27+
self._valid_wildcard_attributes = []
28+
self.available_properties = ['id', 'dst', 'src']
29+
self.available_wildcard_properties = []
30+
_explicit_args = kwargs.pop('_explicit_args')
31+
_locals = locals()
32+
_locals.update(kwargs) # For wildcard attrs and excess named props
33+
args = {k: _locals[k] for k in _explicit_args}
34+
35+
super(CycleBreaker, self).__init__(**args)

dash_extensions/DeferScript.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class DeferScript(Component):
7+
"""A DeferScript component.
8+
Used to delay import of js resources until after React had been loaded. Typically used to apply js to dynamic
9+
content. Based on https://github.com/Grasia/grasia-dash-components/blob/master/src/components/Import.react.js
10+
11+
Keyword arguments:
12+
13+
- id (string; optional):
14+
The ID used to identify this component in Dash callbacks.
15+
16+
- src (string; optional):
17+
Local or external source of the javascript to import."""
18+
_children_props = []
19+
_base_nodes = ['children']
20+
_namespace = 'dash_extensions'
21+
_type = 'DeferScript'
22+
@_explicitize_args
23+
def __init__(self, id=Component.UNDEFINED, src=Component.UNDEFINED, **kwargs):
24+
self._prop_names = ['id', 'src']
25+
self._valid_wildcard_attributes = []
26+
self.available_properties = ['id', 'src']
27+
self.available_wildcard_properties = []
28+
_explicit_args = kwargs.pop('_explicit_args')
29+
_locals = locals()
30+
_locals.update(kwargs) # For wildcard attrs and excess named props
31+
args = {k: _locals[k] for k in _explicit_args}
32+
33+
super(DeferScript, self).__init__(**args)

dash_extensions/EventListener.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class EventListener(Component):
7+
"""An EventListener component.
8+
The EventListener component listens for events from the document object or children if provided.
9+
10+
Keyword arguments:
11+
12+
- children (a list of or a singular dash component, string or number; optional):
13+
The children of this component. If any children are provided, the
14+
component will listen for events from these components. If no
15+
children are specified, the component will listen for events from
16+
the document object.
17+
18+
- id (string; optional):
19+
The ID used to identify this component in Dash callbacks.
20+
21+
- className (string; optional):
22+
A custom class name.
23+
24+
- event (dict; optional):
25+
The latest event fired.
26+
27+
- events (list of dicts; default [{"event": "keydown", "props": ["key", "altKey", "ctrlKey", "shiftKey","metaKey", "repeat"]}]):
28+
The event entry specifies which event to listen to, e.g. \"click\"
29+
for click events. The \"props\" entry specifies what event
30+
properties to record, e.g. [\"x\", \"y\"] to get the cursor
31+
position.
32+
33+
`events` is a list of dicts with keys:
34+
35+
- event (string; optional)
36+
37+
- props (list of strings; optional)
38+
39+
- logging (boolean; default False):
40+
If True, event information is logged to the javascript console.
41+
Useful if you can't remember events props.
42+
43+
- n_events (number; default 0):
44+
The number of events fired.
45+
46+
- style (dict; optional):
47+
The CSS style of the component.
48+
49+
- useCapture (boolean; default False):
50+
Value of useCapture used when registering event listeners."""
51+
_children_props = []
52+
_base_nodes = ['children']
53+
_namespace = 'dash_extensions'
54+
_type = 'EventListener'
55+
@_explicitize_args
56+
def __init__(self, children=None, id=Component.UNDEFINED, events=Component.UNDEFINED, logging=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, event=Component.UNDEFINED, n_events=Component.UNDEFINED, useCapture=Component.UNDEFINED, **kwargs):
57+
self._prop_names = ['children', 'id', 'className', 'event', 'events', 'logging', 'n_events', 'style', 'useCapture']
58+
self._valid_wildcard_attributes = []
59+
self.available_properties = ['children', 'id', 'className', 'event', 'events', 'logging', 'n_events', 'style', 'useCapture']
60+
self.available_wildcard_properties = []
61+
_explicit_args = kwargs.pop('_explicit_args')
62+
_locals = locals()
63+
_locals.update(kwargs) # For wildcard attrs and excess named props
64+
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
65+
66+
super(EventListener, self).__init__(children=children, **args)

dash_extensions/EventSource.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class EventSource(Component):
7+
"""An EventSource component.
8+
An interface to server sent events in Dash
9+
10+
Keyword arguments:
11+
12+
- id (string; optional):
13+
The ID used to identify this component in Dash callbacks.
14+
15+
- close (boolean; optional):
16+
Close event source.
17+
18+
- error (string; optional):
19+
Error.
20+
21+
- message (string; optional):
22+
Received message.
23+
24+
- readyState (number; optional):
25+
A number representing the state of the connection. Possible values
26+
are CONNECTING (0), OPEN (1), or CLOSED (2).
27+
28+
- url (string; required):
29+
A DOMString representing the URL of the source.
30+
31+
- withCredentials (boolean; optional):
32+
A boolean value indicating whether the EventSource object was
33+
instantiated with cross-origin (CORS) credentials set (True), or
34+
not (False, the default)."""
35+
_children_props = []
36+
_base_nodes = ['children']
37+
_namespace = 'dash_extensions'
38+
_type = 'EventSource'
39+
@_explicitize_args
40+
def __init__(self, id=Component.UNDEFINED, close=Component.UNDEFINED, error=Component.UNDEFINED, message=Component.UNDEFINED, readyState=Component.UNDEFINED, withCredentials=Component.UNDEFINED, url=Component.REQUIRED, **kwargs):
41+
self._prop_names = ['id', 'close', 'error', 'message', 'readyState', 'url', 'withCredentials']
42+
self._valid_wildcard_attributes = []
43+
self.available_properties = ['id', 'close', 'error', 'message', 'readyState', 'url', 'withCredentials']
44+
self.available_wildcard_properties = []
45+
_explicit_args = kwargs.pop('_explicit_args')
46+
_locals = locals()
47+
_locals.update(kwargs) # For wildcard attrs and excess named props
48+
args = {k: _locals[k] for k in _explicit_args}
49+
50+
for k in ['url']:
51+
if k not in args:
52+
raise TypeError(
53+
'Required argument `' + k + '` was not specified.')
54+
55+
super(EventSource, self).__init__(**args)

dash_extensions/Keyboard.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class Keyboard(Component):
7+
"""A Keyboard component.
8+
The Keyboard component listens for keyboard events.
9+
10+
Keyword arguments:
11+
12+
- children (a list of or a singular dash component, string or number; optional):
13+
The children of this component. If any children are provided, the
14+
component will listen for events from these components. If no
15+
children are specified, the component will listen for events from
16+
the document object.
17+
18+
- id (string; optional):
19+
The ID used to identify this component in Dash callbacks.
20+
21+
- captureKeys (list of strings; optional):
22+
The keys to capture. Defaults to all keys.
23+
24+
- className (string; optional):
25+
A custom class name.
26+
27+
- eventProps (list of strings; default ["key", "altKey", "ctrlKey", "shiftKey","metaKey", "repeat"]):
28+
The event properties to forward to dash, see
29+
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.
30+
31+
- keydown (dict; optional):
32+
keydown (dict) the object that holds the result of the key down
33+
event. It is a dictionary with the following keys: \"key\",
34+
\"altKey\", \"ctrlKey\", \"shiftKey\",\"metaKey\", \"repeat\".
35+
Those keys have the following values: - key (str) which key is
36+
pressed - altKey (bool) whether the Alt key is pressed -
37+
ctrlKey (bool) Ctrl key is pressed - shiftKey (bool) Shift key
38+
is pressed - metaKey (bool) Meta key is pressed (Mac: Command
39+
key or PC: Windows key) - repeat (bool) whether the key is held
40+
down.
41+
42+
- keys_pressed (dict; optional):
43+
keys_pressed (dict) is a dict of objects like keydown for all keys
44+
currently pressed.
45+
46+
- keyup (dict; optional):
47+
keyup (dict) the object that holds the result of the key up event.
48+
Structure like keydown.
49+
50+
- n_keydowns (number; default 0):
51+
A counter, which is incremented on each key down event, similar to
52+
n_clicks for buttons.
53+
54+
- n_keyups (number; default 0):
55+
A counter, which is incremented on each key up event, similar to
56+
n_clicks for buttons.
57+
58+
- style (dict; optional):
59+
The CSS style of the component.
60+
61+
- useCapture (boolean; default False):
62+
Value of useCapture used when registering event listeners."""
63+
_children_props = []
64+
_base_nodes = ['children']
65+
_namespace = 'dash_extensions'
66+
_type = 'Keyboard'
67+
@_explicitize_args
68+
def __init__(self, children=None, style=Component.UNDEFINED, className=Component.UNDEFINED, id=Component.UNDEFINED, eventProps=Component.UNDEFINED, captureKeys=Component.UNDEFINED, keydown=Component.UNDEFINED, keyup=Component.UNDEFINED, keys_pressed=Component.UNDEFINED, n_keydowns=Component.UNDEFINED, n_keyups=Component.UNDEFINED, useCapture=Component.UNDEFINED, **kwargs):
69+
self._prop_names = ['children', 'id', 'captureKeys', 'className', 'eventProps', 'keydown', 'keys_pressed', 'keyup', 'n_keydowns', 'n_keyups', 'style', 'useCapture']
70+
self._valid_wildcard_attributes = []
71+
self.available_properties = ['children', 'id', 'captureKeys', 'className', 'eventProps', 'keydown', 'keys_pressed', 'keyup', 'n_keydowns', 'n_keyups', 'style', 'useCapture']
72+
self.available_wildcard_properties = []
73+
_explicit_args = kwargs.pop('_explicit_args')
74+
_locals = locals()
75+
_locals.update(kwargs) # For wildcard attrs and excess named props
76+
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
77+
78+
super(Keyboard, self).__init__(children=children, **args)

0 commit comments

Comments
 (0)