dara-core 1.21.16__py3-none-any.whl → 1.21.18__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/core/auth/base.py +5 -5
- dara/core/auth/basic.py +3 -3
- dara/core/auth/definitions.py +13 -14
- dara/core/auth/routes.py +7 -5
- dara/core/auth/utils.py +11 -10
- dara/core/base_definitions.py +30 -36
- dara/core/cli.py +7 -8
- dara/core/configuration.py +51 -58
- dara/core/css.py +2 -2
- dara/core/data_utils.py +12 -17
- dara/core/defaults.py +3 -3
- dara/core/definitions.py +58 -63
- dara/core/http.py +4 -4
- dara/core/interactivity/actions.py +34 -42
- dara/core/interactivity/any_data_variable.py +1 -1
- dara/core/interactivity/any_variable.py +6 -5
- dara/core/interactivity/client_variable.py +1 -2
- dara/core/interactivity/condition.py +2 -2
- dara/core/interactivity/data_variable.py +2 -4
- dara/core/interactivity/derived_data_variable.py +7 -10
- dara/core/interactivity/derived_variable.py +45 -51
- dara/core/interactivity/filtering.py +19 -19
- dara/core/interactivity/loop_variable.py +2 -4
- dara/core/interactivity/non_data_variable.py +1 -1
- dara/core/interactivity/plain_variable.py +22 -18
- dara/core/interactivity/server_variable.py +13 -15
- dara/core/interactivity/state_variable.py +4 -5
- dara/core/interactivity/switch_variable.py +16 -16
- dara/core/interactivity/tabular_variable.py +3 -3
- dara/core/interactivity/url_variable.py +3 -3
- dara/core/internal/cache_store/cache_store.py +6 -6
- dara/core/internal/cache_store/keep_all.py +3 -3
- dara/core/internal/cache_store/lru.py +8 -8
- dara/core/internal/cache_store/ttl.py +4 -4
- dara/core/internal/custom_response.py +3 -3
- dara/core/internal/dependency_resolution.py +6 -10
- dara/core/internal/devtools.py +2 -3
- dara/core/internal/download.py +5 -6
- dara/core/internal/encoder_registry.py +7 -11
- dara/core/internal/execute_action.py +5 -5
- dara/core/internal/hashing.py +1 -2
- dara/core/internal/import_discovery.py +7 -9
- dara/core/internal/normalization.py +12 -15
- dara/core/internal/pandas_utils.py +6 -6
- dara/core/internal/pool/channel.py +3 -4
- dara/core/internal/pool/definitions.py +9 -9
- dara/core/internal/pool/task_pool.py +8 -8
- dara/core/internal/pool/utils.py +4 -3
- dara/core/internal/pool/worker.py +3 -3
- dara/core/internal/registries.py +4 -4
- dara/core/internal/registry.py +3 -3
- dara/core/internal/registry_lookup.py +4 -4
- dara/core/internal/routing.py +34 -37
- dara/core/internal/scheduler.py +8 -8
- dara/core/internal/settings.py +1 -2
- dara/core/internal/store.py +9 -9
- dara/core/internal/tasks.py +30 -30
- dara/core/internal/utils.py +9 -15
- dara/core/internal/websocket.py +18 -18
- dara/core/js_tooling/js_utils.py +19 -19
- dara/core/logging.py +13 -13
- dara/core/main.py +11 -6
- dara/core/metrics/cache.py +2 -4
- dara/core/persistence.py +19 -25
- dara/core/router/compat.py +1 -3
- dara/core/router/components.py +10 -10
- dara/core/router/dependency_graph.py +2 -4
- dara/core/router/router.py +43 -42
- dara/core/umd/dara.core.umd.cjs +44 -197
- dara/core/visual/components/dynamic_component.py +1 -3
- dara/core/visual/components/fallback.py +3 -3
- dara/core/visual/components/for_cmp.py +5 -5
- dara/core/visual/components/menu.py +1 -3
- dara/core/visual/components/router_content.py +1 -3
- dara/core/visual/components/sidebar_frame.py +8 -10
- dara/core/visual/components/theme_provider.py +3 -3
- dara/core/visual/components/topbar_frame.py +8 -10
- dara/core/visual/css/__init__.py +277 -277
- dara/core/visual/dynamic_component.py +18 -22
- dara/core/visual/progress_updater.py +1 -1
- dara/core/visual/template.py +10 -12
- dara/core/visual/themes/definitions.py +46 -46
- {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/METADATA +13 -13
- dara_core-1.21.18.dist-info/RECORD +127 -0
- dara_core-1.21.16.dist-info/RECORD +0 -127
- {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/LICENSE +0 -0
- {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/WHEEL +0 -0
- {dara_core-1.21.16.dist-info → dara_core-1.21.18.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import Union
|
|
2
|
-
|
|
3
1
|
from dara.core.definitions import ComponentInstance, JsComponentDef
|
|
4
2
|
|
|
5
3
|
DynamicComponentDef = JsComponentDef(name='DynamicComponent', js_module='@darajs/core', py_module='dara.core')
|
|
@@ -14,4 +12,4 @@ class DynamicComponent(ComponentInstance):
|
|
|
14
12
|
:param component: A Dara component instance or a dictionary representing a Dara component.
|
|
15
13
|
"""
|
|
16
14
|
|
|
17
|
-
component:
|
|
15
|
+
component: ComponentInstance | dict
|
|
@@ -48,7 +48,7 @@ class Fallback:
|
|
|
48
48
|
but will suspend and show a fallback UI after the given timeout if the new state is not ready.
|
|
49
49
|
"""
|
|
50
50
|
|
|
51
|
-
py_component: ClassVar[
|
|
51
|
+
py_component: ClassVar[str | None] = 'DefaultFallback'
|
|
52
52
|
|
|
53
53
|
class Row(BaseFallback):
|
|
54
54
|
"""
|
|
@@ -73,7 +73,7 @@ class Fallback:
|
|
|
73
73
|
but will suspend and show a fallback UI after the given timeout if the new state is not ready.
|
|
74
74
|
"""
|
|
75
75
|
|
|
76
|
-
py_component: ClassVar[
|
|
76
|
+
py_component: ClassVar[str | None] = 'RowFallback'
|
|
77
77
|
|
|
78
78
|
class Custom(BaseFallback):
|
|
79
79
|
"""
|
|
@@ -97,5 +97,5 @@ class Fallback:
|
|
|
97
97
|
but will suspend and show a fallback UI after the given timeout if the new state is not ready.
|
|
98
98
|
"""
|
|
99
99
|
|
|
100
|
-
py_component: ClassVar[
|
|
100
|
+
py_component: ClassVar[str | None] = 'CustomFallback'
|
|
101
101
|
component: StyledComponentInstance
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Literal
|
|
1
|
+
from typing import Literal
|
|
2
2
|
|
|
3
3
|
from pydantic import Field
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ ForDef = JsComponentDef(name='For', js_module='@darajs/core', py_module='dara.co
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class VirtualizationConfig(DaraBaseModel):
|
|
13
|
-
size:
|
|
13
|
+
size: str | float | None = None
|
|
14
14
|
"""
|
|
15
15
|
The size of each element in the virtualized list.
|
|
16
16
|
If a number is provided, it will be treated as a fixed size.
|
|
@@ -148,6 +148,6 @@ class For(ComponentInstance):
|
|
|
148
148
|
|
|
149
149
|
items: AnyVariable
|
|
150
150
|
renderer: ComponentInstance
|
|
151
|
-
placeholder:
|
|
152
|
-
key_accessor:
|
|
153
|
-
virtualization:
|
|
151
|
+
placeholder: ComponentInstance | None = None
|
|
152
|
+
key_accessor: str | None = None
|
|
153
|
+
virtualization: VirtualizationConfig | None = None
|
|
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from typing import List
|
|
19
|
-
|
|
20
18
|
from pydantic import ConfigDict
|
|
21
19
|
from typing_extensions import deprecated
|
|
22
20
|
|
|
@@ -29,5 +27,5 @@ MenuDef = JsComponentDef(name='Menu', js_module='@darajs/core', py_module='dara.
|
|
|
29
27
|
'Legacy component used with templates and config.add_page API. Use dara.core.visual.components.MenuLink or NavLink instead.'
|
|
30
28
|
)
|
|
31
29
|
class Menu(ComponentInstance):
|
|
32
|
-
routes:
|
|
30
|
+
routes: list[TemplateRouterLink]
|
|
33
31
|
model_config = ConfigDict(extra='forbid')
|
|
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from typing import List
|
|
19
|
-
|
|
20
18
|
from pydantic import ConfigDict
|
|
21
19
|
|
|
22
20
|
from dara.core.definitions import (
|
|
@@ -29,5 +27,5 @@ RouterContentDef = JsComponentDef(name='RouterContent', js_module='@darajs/core'
|
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
class RouterContent(ComponentInstance):
|
|
32
|
-
routes:
|
|
30
|
+
routes: list[TemplateRouterContent]
|
|
33
31
|
model_config = ConfigDict(extra='forbid')
|
|
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from typing import Optional
|
|
19
|
-
|
|
20
18
|
from pydantic import ConfigDict
|
|
21
19
|
|
|
22
20
|
from dara.core.definitions import ComponentInstance, JsComponentDef
|
|
@@ -26,13 +24,13 @@ SideBarFrameDef = JsComponentDef(name='SideBarFrame', js_module='@darajs/core',
|
|
|
26
24
|
|
|
27
25
|
class SideBarFrame(ComponentInstance):
|
|
28
26
|
content: ComponentInstance
|
|
29
|
-
hide_logo:
|
|
30
|
-
logo_width:
|
|
31
|
-
logo_path:
|
|
32
|
-
logo_position:
|
|
27
|
+
hide_logo: bool | None = False
|
|
28
|
+
logo_width: str | None = '80%'
|
|
29
|
+
logo_path: str | None = None
|
|
30
|
+
logo_position: str | None = None
|
|
33
31
|
side_bar: ComponentInstance
|
|
34
|
-
side_bar_padding:
|
|
35
|
-
side_bar_position:
|
|
36
|
-
side_bar_width:
|
|
37
|
-
powered_by_causalens:
|
|
32
|
+
side_bar_padding: str | None = None
|
|
33
|
+
side_bar_position: str | None = None
|
|
34
|
+
side_bar_width: str | None = None
|
|
35
|
+
powered_by_causalens: bool | None = False
|
|
38
36
|
model_config = ConfigDict(extra='forbid')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Literal
|
|
1
|
+
from typing import Literal
|
|
2
2
|
|
|
3
3
|
from dara.core.definitions import ComponentInstance, JsComponentDef, StyledComponentInstance
|
|
4
4
|
from dara.core.interactivity.client_variable import ClientVariable
|
|
@@ -34,8 +34,8 @@ class ThemeProvider(StyledComponentInstance):
|
|
|
34
34
|
config.router.add_page(path='theme', content=ThemePage)
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
theme:
|
|
38
|
-
base:
|
|
37
|
+
theme: ThemeDef | ClientVariable | Literal['light', 'dark']
|
|
38
|
+
base: ClientVariable | Literal['light', 'dark'] = 'light'
|
|
39
39
|
|
|
40
40
|
def __init__(self, *children: ComponentInstance, **kwargs):
|
|
41
41
|
components = list(children)
|
|
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from typing import Optional
|
|
19
|
-
|
|
20
18
|
from pydantic import ConfigDict
|
|
21
19
|
|
|
22
20
|
from dara.core.definitions import ComponentInstance, JsComponentDef
|
|
@@ -26,12 +24,12 @@ TopBarFrameDef = JsComponentDef(name='TopBarFrame', js_module='@darajs/core', py
|
|
|
26
24
|
|
|
27
25
|
class TopBarFrame(ComponentInstance):
|
|
28
26
|
content: ComponentInstance
|
|
29
|
-
hide_logo:
|
|
30
|
-
logo_width:
|
|
31
|
-
logo_path:
|
|
32
|
-
logo_position:
|
|
33
|
-
top_bar:
|
|
34
|
-
top_bar_padding:
|
|
35
|
-
top_bar_position:
|
|
36
|
-
top_bar_height:
|
|
27
|
+
hide_logo: bool | None = False
|
|
28
|
+
logo_width: str | None = '10rem'
|
|
29
|
+
logo_path: str | None = None
|
|
30
|
+
logo_position: str | None = None
|
|
31
|
+
top_bar: ComponentInstance | None = None
|
|
32
|
+
top_bar_padding: str | None = None
|
|
33
|
+
top_bar_position: str | None = None
|
|
34
|
+
top_bar_height: str | None = None
|
|
37
35
|
model_config = ConfigDict(extra='forbid')
|