mountain-ui 1.0.174 → 1.0.175

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.174",
4
+ "version": "1.0.175",
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",
@@ -6,6 +6,8 @@
6
6
 
7
7
  let { ctx = {}, entityId, onSubmit = () => {}, type = 'create' } = $props();
8
8
 
9
+
10
+
9
11
  let detailsCtx = $state({});
10
12
 
11
13
  const entity = $derived(entityRegistry.select(entityId));
@@ -20,14 +22,10 @@
20
22
  });
21
23
 
22
24
  function recalculateAll() {
23
- console.log("before calc");
24
- console.log(JSON.stringify(ctx));
25
25
 
26
26
  for (const calc of Object.values(calculations)) {
27
27
  calc.calculate(ctx);
28
28
  }
29
- console.log("after calc");
30
- console.log(JSON.stringify(ctx));
31
29
 
32
30
  ctx = { ...ctx };
33
31
  }
@@ -24,15 +24,17 @@
24
24
  ...props
25
25
  } = $props();
26
26
 
27
- let table = $state([createLine()]);
27
+ let table = $state(null);
28
28
 
29
29
  let isHidden = $state(false);
30
30
 
31
31
  onMount(() => {
32
- if (value === null) return;
32
+ if (value === null) {
33
+ table = [createLine()]
34
+ return
35
+ };
33
36
 
34
37
  const decodedValue = JSON.parse(value);
35
- console.log(value);
36
38
 
37
39
  let newLines = [];
38
40
 
@@ -43,8 +45,6 @@
43
45
  newLines.push(newLine);
44
46
  }
45
47
 
46
- console.log(JSON.stringify(newLines));
47
-
48
48
 
49
49
  table = [...newLines];
50
50
  });
@@ -220,7 +220,7 @@
220
220
  </div>
221
221
  {/if}
222
222
  <div class="body">
223
- {#if $entity}
223
+ {#if $entity && table}
224
224
  {#each table as line, lineIndex (line.id)}
225
225
  <div class="line">
226
226
  {#each columns as column, columnIndex}
@@ -13,6 +13,10 @@
13
13
  ...props
14
14
  } = $props();
15
15
 
16
+ console.log(value);
17
+
18
+ console.log(defaultValue);
19
+
16
20
  // si la valeur est pas set on verifie si il y a uen defaultValue
17
21
  if (!value && defaultValue) {
18
22
  value = defaultValue
@@ -40,7 +40,7 @@ function createWebComponentRegistry() {
40
40
  },
41
41
 
42
42
  setActive(webComponentId) {
43
- console.log(webComponentId);
43
+ // console.log(webComponentId);
44
44
 
45
45
  targetWebComponentId.set(webComponentId)
46
46
  },
@@ -65,7 +65,7 @@ function createWebPageRegistry() {
65
65
 
66
66
  addChildTo(path, id, newChild) {
67
67
  store.update((webPages) => {
68
- console.log(webPages[path]);
68
+ // console.log(webPages[path]);
69
69
 
70
70
  const el = webPages[path].children_index[id]
71
71