nova-trame 0.8.0__py3-none-any.whl → 0.9.0__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.
@@ -28,7 +28,7 @@ class InputField:
28
28
  field_name = ".".join(v_model.split(".")[1:])
29
29
  if "[" in field_name:
30
30
  index_field_name = re.sub(r"\[.*?\]", "[0]", field_name)
31
- field_info = get_field_info(index_field_name)
31
+ field_info = get_field_info(f"{object_name_in_state}.{index_field_name}")
32
32
  if "[" in field_name and "[index]" not in field_name:
33
33
  field_info = None
34
34
  logger.warning(
@@ -36,7 +36,7 @@ class InputField:
36
36
  f"support single loop with index variable that should be called 'index'"
37
37
  )
38
38
  else:
39
- field_info = get_field_info(field_name)
39
+ field_info = get_field_info(v_model)
40
40
  except Exception as _:
41
41
  pass
42
42
  label = ""
@@ -58,7 +58,7 @@ class InputField:
58
58
  }
59
59
  if field_info:
60
60
  args |= {
61
- "rules": (f"[(v) => trigger('validate_pydantic_field', ['{field_name}', v, index])]",),
61
+ "rules": (f"[(v) => trigger('validate_pydantic_field', ['{v_model}', v, index])]",),
62
62
  }
63
63
  return args
64
64
 
@@ -30,7 +30,6 @@ class RemoteFileInput:
30
30
  dialog_props: Optional[dict[str, Any]] = None,
31
31
  extensions: Optional[list[str]] = None,
32
32
  input_props: Optional[dict[str, Any]] = None,
33
- label: str = "",
34
33
  ) -> None:
35
34
  """Constructor for RemoteFileInput.
36
35
 
@@ -51,9 +50,7 @@ class RemoteFileInput:
51
50
  extensions : list[str], optional
52
51
  Only files with these extensions will be shown by default. The user can still choose to view all files.
53
52
  input_props : dict[str, typing.Any], optional
54
- Props to be passed to InputField. Must not include label prop, use the top-level label parameter instead.
55
- label : str
56
- Label shown in the input field and the dialog title.
53
+ Props to be passed to InputField.
57
54
 
58
55
  Raises
59
56
  ------
@@ -75,7 +72,6 @@ class RemoteFileInput:
75
72
  self.dialog_props = dict(dialog_props) if dialog_props else {}
76
73
  self.extensions = extensions if extensions else []
77
74
  self.input_props = dict(input_props) if input_props else {}
78
- self.label = label
79
75
 
80
76
  if "__events" not in self.input_props:
81
77
  self.input_props["__events"] = []
@@ -93,11 +89,10 @@ class RemoteFileInput:
93
89
  AbstractElement,
94
90
  InputField(
95
91
  v_model=self.v_model,
96
- label=self.label,
97
92
  change=(self.vm.select_file, "[$event.target.value]"),
98
93
  **self.input_props,
99
94
  ),
100
- ):
95
+ ) as input:
101
96
  self.vm.init_view()
102
97
 
103
98
  with vuetify.Template(v_slot_append=True):
@@ -111,7 +106,7 @@ class RemoteFileInput:
111
106
  **self.dialog_props,
112
107
  ):
113
108
  with vuetify.VCard(classes="pa-4"):
114
- vuetify.VCardTitle(self.label)
109
+ vuetify.VCardTitle(input.label)
115
110
  vuetify.VTextField(
116
111
  v_model=self.v_model,
117
112
  classes="mb-4 px-4",
@@ -257,6 +257,6 @@ class ThemedApp:
257
257
  def validate_pydantic_field(name: str, value: str, index: int) -> bool:
258
258
  if "[index]" in name:
259
259
  name = name.replace("[index]", f"[{str(index)}]")
260
- return validate_pydantic_parameter(name, value, index)
260
+ return validate_pydantic_parameter(name, value)
261
261
 
262
262
  return layout
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nova-trame
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: A Python Package for injecting curated themes and custom components into Trame applications
5
5
  License: MIT
6
6
  Keywords: NDIP,Python,Trame,Vuetify
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Dist: libsass (>=0.23.0,<0.24.0)
17
17
  Requires-Dist: mergedeep (>=1.3.4,<2.0.0)
18
- Requires-Dist: mvvm-lib (>=0.4.0)
18
+ Requires-Dist: mvvm-lib (>=0.5.0)
19
19
  Requires-Dist: pydantic (>=2.10.1,<3.0.0)
20
20
  Requires-Dist: tomli (>=2.0.2,<3.0.0)
21
21
  Requires-Dist: trame (>=3.6.3,<4.0.0)
@@ -2,8 +2,8 @@ nova/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  nova/trame/__init__.py,sha256=gFrAg1qva5PIqR5TjvPzAxLx103IKipJLqp3XXvrQL8,59
3
3
  nova/trame/model/remote_file_input.py,sha256=GRvWepYcFPjyrMOCI-mgr8GvDSYNag2oGqG-QY1Jfbw,3280
4
4
  nova/trame/view/components/__init__.py,sha256=fopr6mVqcpDcVYK9ue7SLUHyswgvRPcFESTq86mu1R8,128
5
- nova/trame/view/components/input_field.py,sha256=kAjFrB5q8uGhaO-hXcKz9eJEGZgzXS0rqD3eHiY5TXY,11125
6
- nova/trame/view/components/remote_file_input.py,sha256=RkQ6vO6HoLIWTqglPcf0DBK55F3svv_mYa8l2yexo-A,8465
5
+ nova/trame/view/components/input_field.py,sha256=yY7rYIUWCdfhG5edn7gFusPnmc2M1mUg2rnbvWBbuyY,11147
6
+ nova/trame/view/components/remote_file_input.py,sha256=SNy-SMiO_N9zwW6Lfo_WvpAt_jWANNh-9P5xd75AhtI,8232
7
7
  nova/trame/view/components/visualization/__init__.py,sha256=kDX1fkbtAgXSGlqhlMNhYYoYrq-hfS636smjgLsh6gg,84
8
8
  nova/trame/view/components/visualization/interactive_2d_plot.py,sha256=foZCMoqbuahT5dtqIQvm8C4ZJcY9P211eJEcpQJltmM,3421
9
9
  nova/trame/view/layouts/__init__.py,sha256=cMrlB5YMUoK8EGB83b34UU0kPTVrH8AxsYvKRtpUNEc,141
@@ -14,11 +14,11 @@ nova/trame/view/theme/__init__.py,sha256=70_marDlTigIcPEOGiJb2JTs-8b2sGM5SlY7XBP
14
14
  nova/trame/view/theme/assets/core_style.scss,sha256=AktysiiCYLeiTzCTtYwkksiUVmqb4S23RlDcW8L1ebI,518
15
15
  nova/trame/view/theme/assets/favicon.png,sha256=Xbp1nUmhcBDeObjsebEbEAraPDZ_M163M_ZLtm5AbQc,1927
16
16
  nova/trame/view/theme/assets/vuetify_config.json,sha256=1EwlDUHZiM45MWgnHSQKgLH_d0IZ1iaXjl3eXxGc2EI,4832
17
- nova/trame/view/theme/theme.py,sha256=ow91Zwq3w_hGCRb5a28RX4gFlEhDHjW6NZTpuLGqi-8,11408
17
+ nova/trame/view/theme/theme.py,sha256=k2dmhZ21Q5QSnCTFvegHTd0qsWPjn2OvBerxyX5eJVE,11401
18
18
  nova/trame/view/utilities/local_storage.py,sha256=vD8f2VZIpxhIKjZwEaD7siiPCTZO4cw9AfhwdawwYLY,3218
19
19
  nova/trame/view_model/remote_file_input.py,sha256=tXBw9M1ZKXwm-deHdoRB9uz8CEX9ym7qGtlZUpcZeFw,2986
20
- nova_trame-0.8.0.dist-info/LICENSE,sha256=MOqZ8tPMKy8ZETJ2-HEvFTZ7dYNlg3gXmBkV-Y9i8bw,1061
21
- nova_trame-0.8.0.dist-info/METADATA,sha256=j4W4tnLR-wLVgQ4XoMZVvt2NOBbw78UJYCPppsBRkwo,1370
22
- nova_trame-0.8.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
23
- nova_trame-0.8.0.dist-info/entry_points.txt,sha256=J2AmeSwiTYZ4ZqHHp9HO6v4MaYQTTBPbNh6WtoqOT58,42
24
- nova_trame-0.8.0.dist-info/RECORD,,
20
+ nova_trame-0.9.0.dist-info/LICENSE,sha256=MOqZ8tPMKy8ZETJ2-HEvFTZ7dYNlg3gXmBkV-Y9i8bw,1061
21
+ nova_trame-0.9.0.dist-info/METADATA,sha256=3MzeLpEzhpdiE1EFM43aRyKn1F8FgMSq43PSDizgFCU,1370
22
+ nova_trame-0.9.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
23
+ nova_trame-0.9.0.dist-info/entry_points.txt,sha256=J2AmeSwiTYZ4ZqHHp9HO6v4MaYQTTBPbNh6WtoqOT58,42
24
+ nova_trame-0.9.0.dist-info/RECORD,,