mountain-ui 1.0.34 → 1.0.36

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.34",
4
+ "version": "1.0.36",
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",
@@ -4,13 +4,15 @@
4
4
  import { page } from '$app/stores';
5
5
  import { entityRegistry } from '../../../entityRegistry/registry.svelte';
6
6
  import FieldView from '../../../entityRegistry/components/FieldView.svelte';
7
+ import Label from '../../components/Label.svelte';
7
8
 
8
9
  let { value, unique, secret, label, required, columns = [] } = $props();
9
10
 
10
- let entries = null;
11
+ let entries = $state([]);
11
12
 
12
13
  $effect(() => {
13
- entries = value?.formated?.entries ?? {};
14
+
15
+ entries = value?.formated?.entries ?? {};
14
16
  });
15
17
  </script>
16
18
 
@@ -34,10 +36,12 @@
34
36
  {#each columns as column, columnIndex}
35
37
  <ResponsiveTable.Cell {ctx}>
36
38
  {#each column.rows as row, rowIndex}
39
+ {@const field = entityRegistry.getField(row.fieldId)}
37
40
  <FieldView
38
41
  compact
39
42
  id={row.fieldId}
40
- value={line[row.fieldId] ?? null}
43
+ entityId={field.entity_id}
44
+ value={line[field.normalized_name] ?? "null"}
41
45
  ></FieldView>
42
46
  {/each}
43
47
  </ResponsiveTable.Cell>
@@ -1,11 +1,11 @@
1
1
  <script>
2
- let { name, value } = $props();
2
+ let { label, value } = $props();
3
3
  </script>
4
4
 
5
5
  <div class="total-container">
6
6
  <div class="total">
7
7
  <div class="total-content">
8
- <h4>{name}</h4>
8
+ <h4>{label}</h4>
9
9
  <h4>{value === null ? '-' : value.flat}</h4>
10
10
  </div>
11
11
  </div>
@@ -1,11 +1,11 @@
1
1
  <script>
2
- let { name, value } = $props();
2
+ let { label, value } = $props();
3
3
  </script>
4
4
 
5
5
  <div class="total-container">
6
6
  <div class="total">
7
7
  <div class="total-content">
8
- <h4>{name}</h4>
8
+ <h4>{label}</h4>
9
9
  <h4>{value === null ? '-' : value.flat}</h4>
10
10
  </div>
11
11
  </div>
@@ -29,7 +29,7 @@
29
29
  replayAfter401: true,
30
30
  addData: () => {
31
31
  return {
32
- __project_normalized_name: 'testsds'
32
+ __project_normalized_name: 'tuto'
33
33
  };
34
34
  }
35
35
  });
@@ -121,11 +121,11 @@
121
121
  <h3>Vues</h3>
122
122
  <div class="view">
123
123
  <h3>{tableView.name}</h3>
124
- <ViewTypeComponent type="table" entityId={51}></ViewTypeComponent>
124
+ <!-- <ViewTypeComponent type="table" entityId={82}></ViewTypeComponent> -->
125
125
  </div>
126
126
  <h3>Entré</h3>
127
127
  <div class="entry">
128
- <EntityPage entityId={51} entryId={1}></EntityPage>
128
+ <EntityPage entityId={82} entryId={2}></EntityPage>
129
129
  </div>
130
130
  <h3>Entité</h3>
131
131
  {#each $entities as entity}