dara-components 1.8.5__py3-none-any.whl → 1.22.1__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.
- dara/components/__init__.py +18 -0
- dara/components/_assets/__init__.py +30 -0
- dara/components/_assets/auto_js/.gitkeep +0 -0
- dara/components/_assets/auto_js/dara.components.css +1494 -0
- dara/components/_assets/auto_js/dara.components.umd.js +182837 -0
- dara/components/_assets/common/bokeh-3.1.1.min.js +690 -0
- dara/components/_assets/common/bokeh-api-3.1.1.min.js +60 -0
- dara/components/_assets/common/bokeh-gl-3.1.1.min.js +67 -0
- dara/components/_assets/common/bokeh-mathjax-3.1.1.min.js +329 -0
- dara/components/_assets/common/bokeh-tables-3.1.1.min.js +132 -0
- dara/components/_assets/common/bokeh-widgets-3.1.1.min.js +129 -0
- dara/components/_assets/common/pixi-filters.min.js +17 -0
- dara/components/_assets/common/pixi.min.js +2214 -0
- dara/components/_assets/common/pixi_viewport.js +1 -0
- dara/components/_assets/common/plotly.min.js +8 -0
- dara/components/common/__init__.py +11 -2
- dara/components/common/accordion.py +20 -26
- dara/components/common/anchor.py +9 -10
- dara/components/common/base_component.py +23 -36
- dara/components/common/bullet_list.py +1 -3
- dara/components/common/button.py +35 -26
- dara/components/common/button_bar.py +25 -20
- dara/components/common/card.py +4 -5
- dara/components/common/carousel.py +9 -9
- dara/components/common/checkbox_group.py +26 -19
- dara/components/common/code.py +8 -5
- dara/components/common/component_select_list.py +9 -13
- dara/components/common/datepicker.py +16 -16
- dara/components/common/dropdown_menu.py +161 -0
- dara/components/common/dropzone.py +42 -33
- dara/components/common/form.py +5 -7
- dara/components/common/form_page.py +4 -6
- dara/components/common/grid.py +21 -18
- dara/components/common/heading.py +5 -4
- dara/components/common/icon.py +1 -3
- dara/components/common/if_cmp.py +23 -17
- dara/components/common/image.py +2 -2
- dara/components/common/input.py +9 -11
- dara/components/common/label.py +13 -14
- dara/components/common/markdown.py +3 -5
- dara/components/common/modal.py +2 -2
- dara/components/common/overlay.py +8 -14
- dara/components/common/paragraph.py +2 -2
- dara/components/common/progress_bar.py +6 -8
- dara/components/common/radio_group.py +38 -21
- dara/components/common/select.py +33 -30
- dara/components/common/slider.py +74 -29
- dara/components/common/spacer.py +4 -6
- dara/components/common/stack.py +7 -4
- dara/components/common/switch.py +6 -8
- dara/components/common/tabbed_card.py +8 -11
- dara/components/common/table.py +224 -73
- dara/components/common/text.py +7 -9
- dara/components/common/textarea.py +7 -7
- dara/components/common/time_utils.py +2 -5
- dara/components/common/tooltip.py +4 -6
- dara/components/common/utils.py +29 -35
- dara/components/graphs/__init__.py +1 -0
- dara/components/graphs/components/base_graph_component.py +34 -22
- dara/components/graphs/components/causal_graph_viewer.py +13 -15
- dara/components/graphs/components/edge_encoder.py +49 -26
- dara/components/graphs/components/node_hierarchy_builder.py +17 -16
- dara/components/graphs/definitions.py +27 -20
- dara/components/graphs/graph_layout.py +90 -53
- dara/components/plotting/__init__.py +2 -1
- dara/components/plotting/bokeh/bokeh.py +7 -10
- dara/components/plotting/bokeh/utils.py +5 -3
- dara/components/plotting/plotly/plotly.py +24 -19
- dara/components/plotting/plotly/themes.py +7 -5
- dara/components/smart/__init__.py +7 -1
- dara/components/smart/chat/chat.py +7 -8
- dara/components/smart/chat/config.py +1 -1
- dara/components/smart/chat/types.py +4 -6
- dara/components/smart/code_editor/code_editor.py +18 -4
- dara/components/smart/code_editor/util.py +11 -11
- dara/components/smart/data_slicer/__init__.py +4 -0
- dara/components/smart/data_slicer/data_slicer.py +14 -18
- dara/components/smart/data_slicer/data_slicer_modal.py +4 -6
- dara/components/smart/data_slicer/extension/data_slicer_filter.py +3 -4
- dara/components/smart/data_slicer/extension/filter_status_button.py +1 -3
- dara/components/smart/data_slicer/utils/core.py +23 -23
- dara/components/smart/data_slicer/utils/data_preview.py +1 -3
- dara/components/smart/data_slicer/utils/plotting.py +8 -6
- dara/components/smart/hierarchy.py +9 -10
- {dara_components-1.8.5.dist-info → dara_components-1.22.1.dist-info}/METADATA +7 -7
- dara_components-1.22.1.dist-info/RECORD +100 -0
- {dara_components-1.8.5.dist-info → dara_components-1.22.1.dist-info}/WHEEL +1 -1
- dara_components-1.22.1.dist-info/entry_points.txt +3 -0
- dara/components/umd/dara.components.umd.js +0 -396288
- dara/components/umd/style.css +0 -745
- dara_components-1.8.5.dist-info/RECORD +0 -86
- {dara_components-1.8.5.dist-info → dara_components-1.22.1.dist-info}/LICENSE +0 -0
dara/components/__init__.py
CHANGED
|
@@ -14,11 +14,29 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
14
14
|
See the License for the specific language governing permissions and
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
|
+
# ruff: noqa: F401, F403
|
|
18
|
+
|
|
17
19
|
from importlib.metadata import version
|
|
20
|
+
from inspect import isclass
|
|
21
|
+
|
|
22
|
+
from pydantic import BaseModel
|
|
18
23
|
|
|
19
24
|
from dara.components.common import *
|
|
20
25
|
from dara.components.graphs import *
|
|
21
26
|
from dara.components.plotting import *
|
|
22
27
|
from dara.components.smart import *
|
|
23
28
|
|
|
29
|
+
# NOTE: apparently this is required for model_rebuild to work, otherwise
|
|
30
|
+
# the rebuild silently fails and the components only accept ComponentInstance fields
|
|
31
|
+
from dara.core.interactivity import Variable
|
|
32
|
+
|
|
24
33
|
__version__ = version('dara-components')
|
|
34
|
+
|
|
35
|
+
for symbol in list(globals().values()):
|
|
36
|
+
try:
|
|
37
|
+
if isclass(symbol) and issubclass(symbol, BaseModel) and symbol is not BaseModel:
|
|
38
|
+
symbol.model_rebuild()
|
|
39
|
+
except Exception as e:
|
|
40
|
+
from dara.core.logging import dev_logger
|
|
41
|
+
|
|
42
|
+
dev_logger.warning(f'Error rebuilding model "{symbol}": {e}')
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from dara.core.base_definitions import AssetManifest
|
|
4
|
+
|
|
5
|
+
AUTOJS_ASSETS = [
|
|
6
|
+
'./auto_js/dara.components.umd.js',
|
|
7
|
+
'./auto_js/dara.components.css',
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
COMMON_ASSETS = [
|
|
11
|
+
'./common/bokeh-3.1.1.min.js',
|
|
12
|
+
'./common/bokeh-api-3.1.1.min.js',
|
|
13
|
+
'./common/bokeh-gl-3.1.1.min.js',
|
|
14
|
+
'./common/bokeh-mathjax-3.1.1.min.js',
|
|
15
|
+
'./common/bokeh-tables-3.1.1.min.js',
|
|
16
|
+
'./common/bokeh-widgets-3.1.1.min.js',
|
|
17
|
+
'./common/pixi.min.js',
|
|
18
|
+
'./common/pixi_viewport.js',
|
|
19
|
+
'./common/pixi-filters.min.js',
|
|
20
|
+
'./common/plotly.min.js',
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
asset_manifest = AssetManifest(
|
|
24
|
+
base_path=Path(__file__).parent.absolute().as_posix(),
|
|
25
|
+
autojs_assets=AUTOJS_ASSETS,
|
|
26
|
+
common_assets=COMMON_ASSETS,
|
|
27
|
+
# NOTE: explicitly excludes bokeh/pixi/plotly, they are loaded dynamically
|
|
28
|
+
tag_order=AUTOJS_ASSETS,
|
|
29
|
+
depends_on=['dara.core'],
|
|
30
|
+
)
|
|
File without changes
|