nova-trame 0.19.0.dev3__py3-none-any.whl → 0.19.0.dev4__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.
- nova/trame/model/data_selector.py +12 -1
- nova/trame/view/components/data_selector.py +4 -3
- {nova_trame-0.19.0.dev3.dist-info → nova_trame-0.19.0.dev4.dist-info}/METADATA +1 -1
- {nova_trame-0.19.0.dev3.dist-info → nova_trame-0.19.0.dev4.dist-info}/RECORD +7 -7
- {nova_trame-0.19.0.dev3.dist-info → nova_trame-0.19.0.dev4.dist-info}/LICENSE +0 -0
- {nova_trame-0.19.0.dev3.dist-info → nova_trame-0.19.0.dev4.dist-info}/WHEEL +0 -0
- {nova_trame-0.19.0.dev3.dist-info → nova_trame-0.19.0.dev4.dist-info}/entry_points.txt +0 -0
@@ -129,6 +129,17 @@ class DataSelectorModel:
|
|
129
129
|
|
130
130
|
return sorted(experiments)
|
131
131
|
|
132
|
+
def sort_directories(self, directories: List[Any]) -> List[Any]:
|
133
|
+
# Sort the current level of dictionaries
|
134
|
+
sorted_dirs = sorted(directories, key=lambda x: x["title"])
|
135
|
+
|
136
|
+
# Process each sorted item to sort their children
|
137
|
+
for item in sorted_dirs:
|
138
|
+
if "children" in item and isinstance(item["children"], list):
|
139
|
+
item["children"] = self.sort_directories(item["children"])
|
140
|
+
|
141
|
+
return sorted_dirs
|
142
|
+
|
132
143
|
def get_directories(self) -> List[Any]:
|
133
144
|
if not self.state.experiment:
|
134
145
|
return []
|
@@ -162,7 +173,7 @@ class DataSelectorModel:
|
|
162
173
|
except OSError:
|
163
174
|
pass
|
164
175
|
|
165
|
-
return directories
|
176
|
+
return self.sort_directories(directories)
|
166
177
|
|
167
178
|
def get_datafiles(self) -> List[str]:
|
168
179
|
datafiles = []
|
@@ -98,9 +98,9 @@ class DataSelector(vuetify.VDataTable):
|
|
98
98
|
type="autocomplete",
|
99
99
|
)
|
100
100
|
|
101
|
-
with GridLayout(columns=3, valign="start"):
|
101
|
+
with GridLayout(columns=3, height="500px", valign="start"):
|
102
102
|
if not self._prefix:
|
103
|
-
with html.Div():
|
103
|
+
with html.Div(classes="overflow-y-auto", style="max-height: 500px"):
|
104
104
|
vuetify.VListSubheader("Available Directories", classes="justify-center px-0")
|
105
105
|
vuetify.VTreeview(
|
106
106
|
v_if=(f"{self._directories_name}.length > 0",),
|
@@ -129,13 +129,14 @@ class DataSelector(vuetify.VDataTable):
|
|
129
129
|
with cast(
|
130
130
|
vuetify.VSelect,
|
131
131
|
InputField(
|
132
|
-
|
132
|
+
v_show=f"{self._v_model}.length > 0",
|
133
133
|
v_model=self._v_model,
|
134
134
|
classes="nova-readonly",
|
135
135
|
clearable=True,
|
136
136
|
label=self._label,
|
137
137
|
readonly=True,
|
138
138
|
type="select",
|
139
|
+
click_clear=f"{self._v_model} = []; flushState('{self._v_model.split('.')[0]}');",
|
139
140
|
),
|
140
141
|
):
|
141
142
|
with vuetify.Template(raw_attrs=['v-slot:selection="{ item, index }"']):
|
@@ -1,9 +1,9 @@
|
|
1
1
|
nova/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
|
2
2
|
nova/trame/__init__.py,sha256=gFrAg1qva5PIqR5TjvPzAxLx103IKipJLqp3XXvrQL8,59
|
3
|
-
nova/trame/model/data_selector.py,sha256=
|
3
|
+
nova/trame/model/data_selector.py,sha256=6tH5E7PmPMc6Cc7utFqe7MUpKsUP15_2jU0plygeqn0,7168
|
4
4
|
nova/trame/model/remote_file_input.py,sha256=9KAf31ZHzpsh_aXUrNcF81Q5jvUZDWCzW1QATKls-Jk,3675
|
5
5
|
nova/trame/view/components/__init__.py,sha256=u8yzshFp_TmuC1g9TRxKjy_BdGWMIzPQouI52hzcr2U,234
|
6
|
-
nova/trame/view/components/data_selector.py,sha256=
|
6
|
+
nova/trame/view/components/data_selector.py,sha256=L9AzHrg1IH_SwlOTjQiZNeN_mEVsCj0xgKIeYLVnFH4,8102
|
7
7
|
nova/trame/view/components/file_upload.py,sha256=XbiSx2txpdohwxGyP-ecTbIgMPv6siUARJ7nXhXaiAc,2827
|
8
8
|
nova/trame/view/components/input_field.py,sha256=ncVVSzdJwH_-KP24I2rCqcb6v3J2hPhNTXr8Lb1EZ_U,15931
|
9
9
|
nova/trame/view/components/remote_file_input.py,sha256=lFchhhoMo9EgSr7pSlh2LEm8NZO1XXrBcfh_BLGZBV0,9492
|
@@ -25,8 +25,8 @@ nova/trame/view/theme/theme.py,sha256=OFUtq1IWriFcDu-346J67ZrSES8IOI9PTY_4Vwg7bZ
|
|
25
25
|
nova/trame/view/utilities/local_storage.py,sha256=vD8f2VZIpxhIKjZwEaD7siiPCTZO4cw9AfhwdawwYLY,3218
|
26
26
|
nova/trame/view_model/data_selector.py,sha256=Bpkfjd78ZIkexHNF_aA9PfizRBzkeOuoSE7ZsBFcSOs,1749
|
27
27
|
nova/trame/view_model/remote_file_input.py,sha256=ojEOJ8ZPkajpbAaZi9VLj7g-uBjhb8BMrTdMmwf_J6A,3367
|
28
|
-
nova_trame-0.19.0.
|
29
|
-
nova_trame-0.19.0.
|
30
|
-
nova_trame-0.19.0.
|
31
|
-
nova_trame-0.19.0.
|
32
|
-
nova_trame-0.19.0.
|
28
|
+
nova_trame-0.19.0.dev4.dist-info/LICENSE,sha256=Iu5QiDbwNbREg75iYaxIJ_V-zppuv4QFuBhAW-qiAlM,1061
|
29
|
+
nova_trame-0.19.0.dev4.dist-info/METADATA,sha256=_hm3UBkHt6w5rNkzy_v089JWk_nn94RocwvVNtrsnys,1451
|
30
|
+
nova_trame-0.19.0.dev4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
31
|
+
nova_trame-0.19.0.dev4.dist-info/entry_points.txt,sha256=J2AmeSwiTYZ4ZqHHp9HO6v4MaYQTTBPbNh6WtoqOT58,42
|
32
|
+
nova_trame-0.19.0.dev4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|