ecodev-front 0.0.85__tar.gz → 0.0.87__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.
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/PKG-INFO +2 -3
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/card.py +1 -1
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/page_layout.py +7 -5
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/tables/data_table.py +30 -2
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/text.py +2 -2
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/pyproject.toml +1 -1
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/LICENSE.md +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/README.md +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/__init__.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/accordion.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/alert.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/app_header.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/app_layout.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/app_logo.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/app_name.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/app_title.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/aside_buttons.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/button.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/constants.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/container.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/display_utils.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/div.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/divider.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/download_button.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/drawer.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/footer.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/further_info.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/__init__.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/bar_chart.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/fig_helpers.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/fig_layout.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/graph.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/legend_position.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/pie_chart.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/plotly_tools.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/scatter.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/subplots.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/graphs/sunburst.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/group.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/icon.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/ids.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/loading_overlay.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/login.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/modal.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/module.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/monitoring.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/nav_items.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/navbar.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/navbar_page_icon.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/navlink.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/notifications.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/page.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/page_header.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/report_value.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/search_bar.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/segment_control.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/select.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/shadow_box.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/shadow_button.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/stack.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/stepper.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/tables/__init__.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/tables/column_def.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/tabs.py +0 -0
- {ecodev_front-0.0.85 → ecodev_front-0.0.87}/ecodev_front/upload_box.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: ecodev-front
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.87
|
|
4
4
|
Summary: Dash component helpers
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Amaury Salles
|
|
@@ -19,7 +19,6 @@ Classifier: Programming Language :: Python
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
23
22
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
23
|
Classifier: Topic :: Internet
|
|
25
24
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
@@ -41,7 +41,7 @@ def card_title(title: str,
|
|
|
41
41
|
optional additional component (e.g. select, slider, etc.) on its right hand side.
|
|
42
42
|
"""
|
|
43
43
|
content = [dmc.Text(title, fz=size, fw=900, c=color, ff=font, ta=align, id=title_id,
|
|
44
|
-
bg=background_color, p=10)]
|
|
44
|
+
bg=background_color, p=10, w='100%')]
|
|
45
45
|
|
|
46
46
|
content += component if isinstance(component, list) else [component]
|
|
47
47
|
return card_section(
|
|
@@ -19,11 +19,12 @@ def basic_layout(page: Page,
|
|
|
19
19
|
NOTE: If disabling the scroll area, ensure that your page content fits !
|
|
20
20
|
"""
|
|
21
21
|
return dmc.Stack([
|
|
22
|
-
(dmc.ScrollArea(id=page.id,
|
|
22
|
+
(dmc.ScrollArea(dmc.Stack(id=page.id, mb=100, w='100%'),
|
|
23
|
+
w='100%', h='85vh', pr=25, mb=0, offsetScrollbars='50px')
|
|
23
24
|
if enable_scroll else
|
|
24
|
-
dmc.Stack(id=page.id, w='
|
|
25
|
+
dmc.Stack(id=page.id, w='98%', h='90vh', m='auto', mt=0, pt=0)),
|
|
25
26
|
aside_buttons(aside_width) if aside_width else aside_buttons(),
|
|
26
|
-
], w='97%', m='auto', mt=5, style={'height': '
|
|
27
|
+
], w='97%', m='auto', mt=5, style={'height': '95vh'}, mb=0)
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
def header_layout(page: Page,
|
|
@@ -48,8 +49,9 @@ def header_layout(page: Page,
|
|
|
48
49
|
], w='35%', justify='flex-end')
|
|
49
50
|
], justify='space-between', align='center', w='100%'),
|
|
50
51
|
dmc.Divider(w='100%'),
|
|
51
|
-
(dmc.ScrollArea(id=page.id,
|
|
52
|
+
(dmc.ScrollArea(dmc.Stack(id=page.id, mb=100, w='100%'),
|
|
53
|
+
w='100%', h='81vh', pr=25, mb=0, offsetScrollbars='50px')
|
|
52
54
|
if enable_scroll else
|
|
53
55
|
dmc.Stack(id=page.id, w='98%', h='81vh', m='auto', mt=0, pt=0)),
|
|
54
56
|
aside_buttons(aside_width) if aside_width else aside_buttons(),
|
|
55
|
-
], w='97%', m='auto', mt=5, style={'height': '
|
|
57
|
+
], w='97%', m='auto', mt=5, style={'height': '96vh'}, mb=0)
|
|
@@ -44,13 +44,30 @@ def data_table(id: str | dict,
|
|
|
44
44
|
tree_table: bool = False,
|
|
45
45
|
floating_filter: bool = False,
|
|
46
46
|
wrap_text: bool = False,
|
|
47
|
-
theme: str = 'ag-theme-quartz'
|
|
47
|
+
theme: str = 'ag-theme-quartz',
|
|
48
|
+
side_filter: bool = False,
|
|
49
|
+
autogenerate_column_defs: bool = True,
|
|
50
|
+
selected_rows: List[Dict] | Any = None,
|
|
51
|
+
auto_height: bool = False,
|
|
48
52
|
) -> dag.AgGrid:
|
|
49
53
|
"""
|
|
50
54
|
Generic Dash AG Grid table
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
side_filter (bool) : if True, adds a side bar with filtering options. Filters \
|
|
58
|
+
will be generated for columns according to the config in column_defs. Overwrites
|
|
59
|
+
the sidebar key in dash_grid_options
|
|
60
|
+
autogenerate_column_defs (bool) : if True, creates column_defs from row_data if \
|
|
61
|
+
column_defs is not provided. Defaults to True.
|
|
62
|
+
selected_rows (list) : list of rows to select. Applies only to table with selectable \
|
|
63
|
+
columns
|
|
64
|
+
auto_height (list) : if True, the grid to auto-sizes its height to the number of rows \
|
|
65
|
+
displayed inside the grid. Overwrites the domLayout key in dash_grid_options and
|
|
66
|
+
height in style
|
|
51
67
|
"""
|
|
52
68
|
|
|
53
|
-
column_defs = column_defs or _create_default_column_definitions(
|
|
69
|
+
column_defs = column_defs or _create_default_column_definitions(
|
|
70
|
+
row_data) if autogenerate_column_defs else []
|
|
54
71
|
style = style
|
|
55
72
|
default_col_def = default_col_def or {
|
|
56
73
|
# enable floating filters by default
|
|
@@ -71,6 +88,9 @@ def data_table(id: str | dict,
|
|
|
71
88
|
'paginationPageSize': pagination_page_size,
|
|
72
89
|
}
|
|
73
90
|
|
|
91
|
+
if side_filter:
|
|
92
|
+
dash_grid_options['sideBar'] = 'filters'
|
|
93
|
+
|
|
74
94
|
if tree_table:
|
|
75
95
|
dash_grid_options |= {'autoGroupColumnDef': {
|
|
76
96
|
'cellRendererParams': {
|
|
@@ -81,12 +101,20 @@ def data_table(id: str | dict,
|
|
|
81
101
|
'rowSelection': 'single'
|
|
82
102
|
}}
|
|
83
103
|
|
|
104
|
+
if auto_height:
|
|
105
|
+
dash_grid_options['domLayout'] = 'autoHeight'
|
|
106
|
+
if isinstance(style, dict):
|
|
107
|
+
style['height'] = None
|
|
108
|
+
else:
|
|
109
|
+
style = {'height': None}
|
|
110
|
+
|
|
84
111
|
return dag.AgGrid(
|
|
85
112
|
id=id,
|
|
86
113
|
enableEnterpriseModules=True,
|
|
87
114
|
licenseKey='',
|
|
88
115
|
columnDefs=column_defs,
|
|
89
116
|
rowData=row_data if isinstance(row_data, list) else row_data.to_dict('records'),
|
|
117
|
+
selectedRows=selected_rows,
|
|
90
118
|
defaultColDef=default_col_def,
|
|
91
119
|
style=style,
|
|
92
120
|
getRowStyle=row_style,
|
|
@@ -11,11 +11,11 @@ def app_title(text: str, c: str = 'black', ta: str = 'left', mb: int = 10, **kwa
|
|
|
11
11
|
return dmc.Title(text, order=1, ta=ta, c=c, tt='capitalize', mb=mb, **kwargs)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
def page_title(text: str, c: str = '#0066a1', ta: str = 'left',
|
|
14
|
+
def page_title(text: str, c: str = '#0066a1', ta: str = 'left', **kwargs) -> dmc.Title:
|
|
15
15
|
"""
|
|
16
16
|
Renders a formatted title text for page headers
|
|
17
17
|
"""
|
|
18
|
-
return dmc.Title(text, order=2, ta=ta, c=c, tt='capitalize',
|
|
18
|
+
return dmc.Title(text, order=2, ta=ta, c=c, tt='capitalize', ff='Averta Bold', **kwargs)
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def section_title(text: str, c: str = '#424242', ta: str = 'left', **kwargs) -> dmc.Title:
|
|
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
|
|
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
|