mountain-ui 1.0.69 → 1.0.70

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mountain-ui",
3
3
  "private": false,
4
- "version": "1.0.69",
4
+ "version": "1.0.70",
5
5
  "description": "A comprehensive UI component library for ERP systems with field types, entities, and registry management built with Svelte",
6
6
  "type": "module",
7
7
  "module": "index.js",
@@ -10,10 +10,10 @@
10
10
  ...restProps
11
11
  } = $props();
12
12
 
13
- const entryAction = $derived(entryActionId ? entryActionRegistry.get(entryActionId) : null);
13
+ const entryAction = $derived(entryActionId ? entryActionRegistry.select(entryActionId) : null);
14
14
 
15
- let name = $derived(entryAction?.name ?? '');
16
- let props = $derived(entryAction?.props ?? null);
15
+ let name = $derived($entryAction?.name ?? '');
16
+ let props = $derived($entryAction?.props ?? null);
17
17
 
18
18
  function handleSubmit() {
19
19
  let data = {
@@ -27,9 +27,9 @@
27
27
  }
28
28
  </script>
29
29
 
30
- {#if entryAction}
31
- {#if props}
32
- <EntryActionProperties entryActionType={entryAction.type} bind:name bind:props {...restProps}
30
+ {#if entryActionId}
31
+ {#if $entryAction && name && props}
32
+ <EntryActionProperties entryActionType={$entryAction.type} bind:name bind:props {...restProps}
33
33
  ></EntryActionProperties>
34
34
  <Button onClick={handleSubmit}>
35
35
  <h5>éditer</h5>
@@ -21,6 +21,17 @@
21
21
  // }
22
22
  //]
23
23
  }),
24
+ // props = $bindable({
25
+ // fromEntityId: null,
26
+ // toEntityId: null,
27
+ // bindings: null //[
28
+ // // {
29
+ // // fromFieldId:null,
30
+ // // toFieldId:null,
31
+ // // bindings:[] // disponible lorsque il y a un type imbriquer comme line
32
+ // // }
33
+ // //]
34
+ // }),
24
35
  onChange = (props) => {}
25
36
  } = $props();
26
37
 
@@ -37,12 +48,16 @@
37
48
  })
38
49
 
39
50
  $effect(() => {
40
- props = getProps(fromEntityId, toEntityId);
51
+ const newProps = getProps(fromEntityId, toEntityId);
52
+
53
+ if (newProps === null) return
54
+
55
+ props = {...newProps}
41
56
  });
42
57
 
43
58
  function getProps() {
44
59
  if (!isMounted && props.bindings !== null) {
45
- return props
60
+ return null
46
61
  }
47
62
 
48
63
  let newProps = {