dash-flows 0.0.2__py3-none-any.whl

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.
@@ -0,0 +1,37 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ from dash.development.base_component import Component, _explicitize_args
4
+
5
+
6
+ class AnimatedCircleNode(Component):
7
+ """An AnimatedCircleNode component.
8
+
9
+
10
+ Keyword arguments:
11
+
12
+ - data (dict; required)
13
+
14
+ `data` is a dict with keys:
15
+
16
+ - label (boolean | number | string | dict | list; optional)"""
17
+ _children_props = []
18
+ _base_nodes = ['children']
19
+ _namespace = 'dash_flow'
20
+ _type = 'AnimatedCircleNode'
21
+ @_explicitize_args
22
+ def __init__(self, data=Component.REQUIRED, **kwargs):
23
+ self._prop_names = ['data']
24
+ self._valid_wildcard_attributes = []
25
+ self.available_properties = ['data']
26
+ self.available_wildcard_properties = []
27
+ _explicit_args = kwargs.pop('_explicit_args')
28
+ _locals = locals()
29
+ _locals.update(kwargs) # For wildcard attrs and excess named props
30
+ args = {k: _locals[k] for k in _explicit_args}
31
+
32
+ for k in ['data']:
33
+ if k not in args:
34
+ raise TypeError(
35
+ 'Required argument `' + k + '` was not specified.')
36
+
37
+ super(AnimatedCircleNode, self).__init__(**args)
@@ -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 AnimatedNodeEdge(Component):
7
+ """An AnimatedNodeEdge component.
8
+ AnimatedNodeEdge is a custom edge component that animates a node along its path.
9
+
10
+ Keyword arguments:
11
+
12
+ - id (string; optional):
13
+ The ID of the edge.
14
+
15
+ - data (dict; default { animatedNode: '' }):
16
+ Edge data containing the ID of the node to animate.
17
+
18
+ `data` is a dict with keys:
19
+
20
+ - animatedNode (string; optional):
21
+ ID of the node to animate along this edge.
22
+
23
+ - sourcePosition (string; optional):
24
+ Position of the source handle.
25
+
26
+ - sourceX (number; optional):
27
+ X coordinate of the source node.
28
+
29
+ - sourceY (number; optional):
30
+ Y coordinate of the source node.
31
+
32
+ - targetPosition (string; optional):
33
+ Position of the target handle.
34
+
35
+ - targetX (number; optional):
36
+ X coordinate of the target node.
37
+
38
+ - targetY (number; optional):
39
+ Y coordinate of the target node."""
40
+ _children_props = []
41
+ _base_nodes = ['children']
42
+ _namespace = 'dash_flow'
43
+ _type = 'AnimatedNodeEdge'
44
+ @_explicitize_args
45
+ def __init__(self, id=Component.UNDEFINED, data=Component.UNDEFINED, sourceX=Component.UNDEFINED, sourceY=Component.UNDEFINED, targetX=Component.UNDEFINED, targetY=Component.UNDEFINED, sourcePosition=Component.UNDEFINED, targetPosition=Component.UNDEFINED, **kwargs):
46
+ self._prop_names = ['id', 'data', 'sourcePosition', 'sourceX', 'sourceY', 'targetPosition', 'targetX', 'targetY']
47
+ self._valid_wildcard_attributes = []
48
+ self.available_properties = ['id', 'data', 'sourcePosition', 'sourceX', 'sourceY', 'targetPosition', 'targetX', 'targetY']
49
+ self.available_wildcard_properties = []
50
+ _explicit_args = kwargs.pop('_explicit_args')
51
+ _locals = locals()
52
+ _locals.update(kwargs) # For wildcard attrs and excess named props
53
+ args = {k: _locals[k] for k in _explicit_args}
54
+
55
+ super(AnimatedNodeEdge, self).__init__(**args)
dash_flow/DashFlow.py ADDED
@@ -0,0 +1,97 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ from dash.development.base_component import Component, _explicitize_args
4
+
5
+
6
+ class DashFlow(Component):
7
+ """A DashFlow component.
8
+
9
+
10
+ Keyword arguments:
11
+
12
+ - id (string; optional):
13
+ The ID used to identify this component in Dash callbacks.
14
+
15
+ - className (string; default ''):
16
+ CSS class name for the container div.
17
+
18
+ - edges (list of dicts; optional):
19
+ Array of edges defining connections between nodes.
20
+
21
+ `edges` is a list of dicts with keys:
22
+
23
+ - id (string; required)
24
+
25
+ - source (string; required)
26
+
27
+ - target (string; required)
28
+
29
+ - type (string; optional)
30
+
31
+ - data (dict; optional)
32
+
33
+ - style (dict; optional)
34
+
35
+ - elementsSelectable (boolean; default True):
36
+ Enable/disable the ability to select elements.
37
+
38
+ - layoutOptions (string; optional):
39
+ Layout options for arranging nodes using the ELK layout engine.
40
+
41
+ - nodes (list of dicts; optional):
42
+ Array of nodes to display in the flow.
43
+
44
+ `nodes` is a list of dicts with keys:
45
+
46
+ - id (string; required)
47
+
48
+ - type (string; optional)
49
+
50
+ - data (dict; required)
51
+
52
+ - position (dict; required)
53
+
54
+ `position` is a dict with keys:
55
+
56
+ - x (number; required)
57
+
58
+ - y (number; required)
59
+
60
+ - style (dict; optional)
61
+
62
+ - nodesConnectable (boolean; default True):
63
+ Enable/disable the ability to make new connections between nodes.
64
+
65
+ - nodesDraggable (boolean; default True):
66
+ Enable/disable node dragging behavior.
67
+
68
+ - showBackground (boolean; default True):
69
+ Show/hide the background pattern.
70
+
71
+ - showControls (boolean; default True):
72
+ Show/hide the control panel.
73
+
74
+ - showDevTools (boolean; default False):
75
+ Show/hide the developer tools panel.
76
+
77
+ - showMiniMap (boolean; default True):
78
+ Show/hide the minimap navigation component.
79
+
80
+ - style (dict; optional):
81
+ Custom CSS styles for the container div."""
82
+ _children_props = []
83
+ _base_nodes = ['children']
84
+ _namespace = 'dash_flow'
85
+ _type = 'DashFlow'
86
+ @_explicitize_args
87
+ def __init__(self, id=Component.UNDEFINED, nodesDraggable=Component.UNDEFINED, nodesConnectable=Component.UNDEFINED, elementsSelectable=Component.UNDEFINED, showMiniMap=Component.UNDEFINED, showControls=Component.UNDEFINED, showBackground=Component.UNDEFINED, nodes=Component.UNDEFINED, edges=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, showDevTools=Component.UNDEFINED, layoutOptions=Component.UNDEFINED, **kwargs):
88
+ self._prop_names = ['id', 'className', 'edges', 'elementsSelectable', 'layoutOptions', 'nodes', 'nodesConnectable', 'nodesDraggable', 'showBackground', 'showControls', 'showDevTools', 'showMiniMap', 'style']
89
+ self._valid_wildcard_attributes = []
90
+ self.available_properties = ['id', 'className', 'edges', 'elementsSelectable', 'layoutOptions', 'nodes', 'nodesConnectable', 'nodesDraggable', 'showBackground', 'showControls', 'showDevTools', 'showMiniMap', 'style']
91
+ self.available_wildcard_properties = []
92
+ _explicit_args = kwargs.pop('_explicit_args')
93
+ _locals = locals()
94
+ _locals.update(kwargs) # For wildcard attrs and excess named props
95
+ args = {k: _locals[k] for k in _explicit_args}
96
+
97
+ super(DashFlow, self).__init__(**args)
dash_flow/DevTools.py ADDED
@@ -0,0 +1,51 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ from dash.development.base_component import Component, _explicitize_args
4
+
5
+
6
+ class DevTools(Component):
7
+ """A DevTools component.
8
+ DevTools component for displaying debug information about the flow
9
+
10
+ Keyword arguments:
11
+
12
+ - nodes (list of dicts; required):
13
+ Array of nodes to display information about.
14
+
15
+ `nodes` is a list of dicts with keys:
16
+
17
+ - id (string; required)
18
+
19
+ - type (string; optional)
20
+
21
+ - viewport (dict; required):
22
+ Current viewport information including position and zoom level.
23
+
24
+ `viewport` is a dict with keys:
25
+
26
+ - x (number; required)
27
+
28
+ - y (number; required)
29
+
30
+ - zoom (number; required)"""
31
+ _children_props = []
32
+ _base_nodes = ['children']
33
+ _namespace = 'dash_flow'
34
+ _type = 'DevTools'
35
+ @_explicitize_args
36
+ def __init__(self, viewport=Component.REQUIRED, nodes=Component.REQUIRED, **kwargs):
37
+ self._prop_names = ['nodes', 'viewport']
38
+ self._valid_wildcard_attributes = []
39
+ self.available_properties = ['nodes', 'viewport']
40
+ self.available_wildcard_properties = []
41
+ _explicit_args = kwargs.pop('_explicit_args')
42
+ _locals = locals()
43
+ _locals.update(kwargs) # For wildcard attrs and excess named props
44
+ args = {k: _locals[k] for k in _explicit_args}
45
+
46
+ for k in ['nodes', 'viewport']:
47
+ if k not in args:
48
+ raise TypeError(
49
+ 'Required argument `' + k + '` was not specified.')
50
+
51
+ super(DevTools, self).__init__(**args)
@@ -0,0 +1,43 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ from dash.development.base_component import Component, _explicitize_args
4
+
5
+
6
+ class ResizableNode(Component):
7
+ """A ResizableNode component.
8
+ ResizableNode is a custom node component that supports resizing and Dash components.
9
+
10
+ Keyword arguments:
11
+
12
+ - data (dict; required):
13
+ The node data containing the content to display.
14
+
15
+ `data` is a dict with keys:
16
+
17
+ - label (boolean | number | string | dict | list; optional):
18
+ The content to display in the node. Can be a string or Dash
19
+ component.
20
+
21
+ - selected (boolean; default False):
22
+ Whether the node is currently selected."""
23
+ _children_props = []
24
+ _base_nodes = ['children']
25
+ _namespace = 'dash_flow'
26
+ _type = 'ResizableNode'
27
+ @_explicitize_args
28
+ def __init__(self, data=Component.REQUIRED, selected=Component.UNDEFINED, **kwargs):
29
+ self._prop_names = ['data', 'selected']
30
+ self._valid_wildcard_attributes = []
31
+ self.available_properties = ['data', 'selected']
32
+ self.available_wildcard_properties = []
33
+ _explicit_args = kwargs.pop('_explicit_args')
34
+ _locals = locals()
35
+ _locals.update(kwargs) # For wildcard attrs and excess named props
36
+ args = {k: _locals[k] for k in _explicit_args}
37
+
38
+ for k in ['data']:
39
+ if k not in args:
40
+ raise TypeError(
41
+ 'Required argument `' + k + '` was not specified.')
42
+
43
+ super(ResizableNode, self).__init__(**args)
dash_flow/__init__.py ADDED
@@ -0,0 +1,87 @@
1
+ from __future__ import print_function as _
2
+
3
+ import os as _os
4
+ import sys as _sys
5
+ import json
6
+
7
+ import dash as _dash
8
+
9
+ # noinspection PyUnresolvedReferences
10
+ from ._imports_ import *
11
+ from ._imports_ import __all__
12
+
13
+ if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'):
14
+ print('Dash was not successfully imported. '
15
+ 'Make sure you don\'t have a file '
16
+ 'named \n"dash.py" in your current directory.', file=_sys.stderr)
17
+ _sys.exit(1)
18
+
19
+ _basepath = _os.path.dirname(__file__)
20
+ _filepath = _os.path.abspath(_os.path.join(_basepath, 'package-info.json'))
21
+ with open(_filepath) as f:
22
+ package = json.load(f)
23
+
24
+ package_name = package['name'].replace(' ', '_').replace('-', '_')
25
+ __version__ = package['version']
26
+
27
+ _current_path = _os.path.dirname(_os.path.abspath(__file__))
28
+
29
+ _this_module = _sys.modules[__name__]
30
+
31
+ async_resources = []
32
+
33
+ _js_dist = []
34
+
35
+ _js_dist.extend(
36
+ [
37
+ {
38
+ "relative_package_path": "async-{}.js".format(async_resource),
39
+ "external_url": (
40
+ "https://unpkg.com/{0}@{2}"
41
+ "/{1}/async-{3}.js"
42
+ ).format(package_name, __name__, __version__, async_resource),
43
+ "namespace": package_name,
44
+ "async": True,
45
+ }
46
+ for async_resource in async_resources
47
+ ]
48
+ )
49
+
50
+ # TODO: Figure out if unpkg link works
51
+ _js_dist.extend(
52
+ [
53
+ {
54
+ "relative_package_path": "async-{}.js.map".format(async_resource),
55
+ "external_url": (
56
+ "https://unpkg.com/{0}@{2}"
57
+ "/{1}/async-{3}.js.map"
58
+ ).format(package_name, __name__, __version__, async_resource),
59
+ "namespace": package_name,
60
+ "dynamic": True,
61
+ }
62
+ for async_resource in async_resources
63
+ ]
64
+ )
65
+
66
+ _js_dist.extend(
67
+ [
68
+ {
69
+ 'relative_package_path': 'dash_flow.min.js',
70
+
71
+ 'namespace': package_name
72
+ },
73
+ {
74
+ 'relative_package_path': 'dash_flow.min.js.map',
75
+
76
+ 'namespace': package_name,
77
+ 'dynamic': True
78
+ }
79
+ ]
80
+ )
81
+
82
+ _css_dist = []
83
+
84
+
85
+ for _component in __all__:
86
+ setattr(locals()[_component], '_js_dist', _js_dist)
87
+ setattr(locals()[_component], '_css_dist', _css_dist)
dash_flow/_imports_.py ADDED
@@ -0,0 +1,13 @@
1
+ from .AnimatedCircleNode import AnimatedCircleNode
2
+ from .AnimatedNodeEdge import AnimatedNodeEdge
3
+ from .DashFlow import DashFlow
4
+ from .DevTools import DevTools
5
+ from .ResizableNode import ResizableNode
6
+
7
+ __all__ = [
8
+ "AnimatedCircleNode",
9
+ "AnimatedNodeEdge",
10
+ "DashFlow",
11
+ "DevTools",
12
+ "ResizableNode"
13
+ ]