mountain-ui 1.0.52 → 1.0.54

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/lib/registry/entityRegistry/components/EntityButton.svelte +1 -1
  3. package/src/lib/registry/entityRegistry/components/EntityCard.svelte +1 -1
  4. package/src/lib/registry/entityRegistry/components/EntityForm.svelte +1 -1
  5. package/src/lib/registry/entityRegistry/components/EntityPage.svelte +1 -1
  6. package/src/lib/registry/entityRegistry/components/FieldButton copy.svelte +1 -1
  7. package/src/lib/registry/entityRegistry/components/FieldButton.svelte +1 -1
  8. package/src/lib/registry/entityRegistry/components/FieldCard.svelte +1 -1
  9. package/src/lib/registry/entityRegistry/components/FieldInput.svelte +1 -1
  10. package/src/lib/registry/entityRegistry/components/FieldTableView.svelte +1 -1
  11. package/src/lib/registry/entityRegistry/components/FieldView.svelte +1 -1
  12. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeButton.svelte +1 -1
  13. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeCard.svelte +1 -1
  14. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeIcon.svelte +1 -1
  15. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeInput.svelte +1 -1
  16. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeTableView.svelte +1 -1
  17. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeView.svelte +1 -1
  18. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Lines/Input.svelte +1 -1
  19. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Lines/View.svelte +0 -3
  20. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/Input.svelte +2 -2
  21. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/Input.svelte +2 -2
  22. package/src/lib/registry/fieldTypeRegistry/fieldTypes/localisation/LocalisationLand/TableView.svelte +1 -1
  23. package/src/lib/registry/fieldTypeRegistry/fieldTypes/localisation/LocalisationLand/View.svelte +1 -1
  24. package/src/lib/registry/fieldTypeRegistry/fieldTypes/money/MoneyCurrency/Input.svelte +1 -1
  25. package/src/lib/registry/fieldTypeRegistry/fieldTypes/money/MoneyCurrency/TableView.svelte +1 -1
  26. package/src/lib/registry/fieldTypeRegistry/fieldTypes/money/MoneyCurrency/View.svelte +1 -1
  27. package/src/lib/registry/projectRegistry/components/ProjectButton.svelte +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mountain-ui",
3
3
  "private": false,
4
- "version": "1.0.52",
4
+ "version": "1.0.54",
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,7 +4,7 @@
4
4
 
5
5
  let { id, variant = 'ghost', ...props } = $props();
6
6
 
7
- const entity = entityRegistry.get(id);
7
+ const entity = $derived(entityRegistry.get(id));
8
8
  </script>
9
9
 
10
10
  {#if entity}
@@ -6,7 +6,7 @@
6
6
 
7
7
  let { id, variant = 'ghost', ...props } = $props();
8
8
 
9
- const entity = entityRegistry.get(id);
9
+ const entity = $derived(entityRegistry.get(id));
10
10
  </script>
11
11
 
12
12
  {#if entity}
@@ -8,7 +8,7 @@
8
8
 
9
9
  let detailsCtx = $state({});
10
10
 
11
- const entity = entityRegistry.select(entityId);
11
+ const entity = $derived(entityRegistry.select(entityId));
12
12
 
13
13
  function handleSubmit() {
14
14
  onSubmit({ ...ctx });
@@ -10,7 +10,7 @@
10
10
 
11
11
  let mounted = false;
12
12
 
13
- const entity = entityRegistry.select(entityId);
13
+ const entity = $derived(entityRegistry.select(entityId));
14
14
 
15
15
  $effect(() => {
16
16
  getData(entityId, entryId);
@@ -9,7 +9,7 @@
9
9
 
10
10
  let { id, variant = 'ghost', entityId = null, ...props } = $props();
11
11
 
12
- const field = entityRegistry.selectField(id, entityId);
12
+ const field = $derived(entityRegistry.selectField(id, entityId));
13
13
  </script>
14
14
 
15
15
  {#if $field}
@@ -9,7 +9,7 @@
9
9
 
10
10
  let { id, variant = 'ghost', entityId = null, ...props } = $props();
11
11
 
12
- const field = entityRegistry.selectField(id, entityId);
12
+ const field = $derived(entityRegistry.selectField(id, entityId));
13
13
  </script>
14
14
 
15
15
  {#if $field}
@@ -9,7 +9,7 @@
9
9
 
10
10
  let { id, variant = 'ghost', entityId = null, ...props } = $props();
11
11
 
12
- const field = entityRegistry.selectField(id, entityId);
12
+ const field = $derived(entityRegistry.selectField(id, entityId));
13
13
  </script>
14
14
 
15
15
  {#if $field}
@@ -4,7 +4,7 @@
4
4
 
5
5
  let { id, entityId = null, onChange = () => {}, onChangeDetails = () => {}, ...props } = $props();
6
6
 
7
- const field = entityRegistry.selectField(id, entityId);
7
+ const field = $derived(entityRegistry.selectField(id, entityId));
8
8
 
9
9
  let value = $state('');
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  let { id, value, entityId = null, onChange = () => {}, onChangeDetails = () => {}, ...props } = $props();
6
6
 
7
- const field = entityRegistry.selectField(id, entityId);
7
+ const field = $derived(entityRegistry.selectField(id, entityId));
8
8
  </script>
9
9
 
10
10
  {#if $field}
@@ -4,7 +4,7 @@
4
4
 
5
5
  let { id, value, entityId = null, onChange = () => {}, onChangeDetails = () => {}, ...props } = $props();
6
6
 
7
- const field = entityRegistry.selectField(id, entityId);
7
+ const field = $derived(entityRegistry.selectField(id, entityId));
8
8
 
9
9
  </script>
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  let { type, variant = 'ghost', ...props } = $props();
6
6
 
7
- const field = fieldTypeRegistry.select(type);
7
+ const field = $derived(fieldTypeRegistry.select(type));
8
8
  </script>
9
9
 
10
10
  {#if $field}
@@ -3,7 +3,7 @@
3
3
 
4
4
  let { type, variant = 'ghost', ...props } = $props();
5
5
 
6
- const field = fieldTypeRegistry.select(type);
6
+ const field = $derived(fieldTypeRegistry.select(type));
7
7
  </script>
8
8
 
9
9
  {#if $field}
@@ -3,7 +3,7 @@
3
3
 
4
4
  let { type, ...props } = $props();
5
5
 
6
- const field = fieldTypeRegistry.select(type);
6
+ const field = $derived(fieldTypeRegistry.select(type));
7
7
  </script>
8
8
 
9
9
  {#if $field && $field?.components?.icon}
@@ -3,7 +3,7 @@
3
3
 
4
4
  let { type, ...props } = $props();
5
5
 
6
- const field = fieldTypeRegistry.select(type);
6
+ const field = $derived(fieldTypeRegistry.select(type));
7
7
  </script>
8
8
 
9
9
  {#if $field}
@@ -3,7 +3,7 @@
3
3
 
4
4
  let { type, value, ...props } = $props();
5
5
 
6
- const field = fieldTypeRegistry.select(type);
6
+ const field = $derived(fieldTypeRegistry.select(type));
7
7
  </script>
8
8
 
9
9
  {#if $field}
@@ -3,7 +3,7 @@
3
3
 
4
4
  let { type, value, ...props } = $props();
5
5
 
6
- const field = fieldTypeRegistry.select(type);
6
+ const field = $derived(fieldTypeRegistry.select(type));
7
7
  </script>
8
8
 
9
9
  {#if $field}
@@ -51,7 +51,7 @@
51
51
  table = [...table, createLine()];
52
52
  }
53
53
 
54
- const entity = entityRegistry.select(linkId);
54
+ const entity = $derived(entityRegistry.select(linkId));
55
55
 
56
56
  function handleDeleteLine(lineIndex) {
57
57
  table = table.filter((_, i) => i !== lineIndex);
@@ -52,9 +52,6 @@
52
52
  </ResponsiveTable.Root>
53
53
 
54
54
  <style>
55
- .cell {
56
- position: relative;
57
- }
58
55
  .title {
59
56
  display: flex;
60
57
  align-items: center;
@@ -27,8 +27,8 @@
27
27
 
28
28
  let isMounted = false;
29
29
 
30
- const field1 = entityRegistry.selectField(column1);
31
- const field2 = entityRegistry.selectField(column2);
30
+ const field1 = $derived(entityRegistry.selectField(column1));
31
+ const field2 = $derived(entityRegistry.selectField(column2));
32
32
 
33
33
  let previousValue1 = Symbol();
34
34
  let previousValue2 = Symbol();
@@ -26,8 +26,8 @@
26
26
 
27
27
  let isMounted = false;
28
28
 
29
- const field = entityRegistry.selectField(fieldId); // champ de type ligne
30
- const lineField = entityRegistry.selectField(lineFieldId); // champ dans la ligne
29
+ const field = $derived(entityRegistry.selectField(fieldId)); // champ de type ligne
30
+ const lineField = $derived(entityRegistry.selectField(lineFieldId)); // champ dans la ligne
31
31
 
32
32
  let previousValue1 = Symbol();
33
33
  let previousValue2 = Symbol();
@@ -7,5 +7,5 @@
7
7
 
8
8
  </script>
9
9
 
10
- <ViewText>{value === null || value.formated === null ? '-' : value.formated.land_data.name ?? "-"}</ViewText>
10
+ <ViewText>{value === null || value.formated === null || value.formated.land_data === null ? '-' : value.formated.land_data.name ?? "-"}</ViewText>
11
11
 
@@ -10,5 +10,5 @@
10
10
 
11
11
  <LineView {compact}>
12
12
  <Label {unique} {secret} {label} {required}></Label>
13
- <ViewText>{value === null || value.formated === null ? '-' : value.formated.land_data.name ?? "-"}</ViewText>
13
+ <ViewText>{value === null || value.formated === null || value.formated.land_data === null ? '-' : value.formated.land_data.name ?? "-"}</ViewText>
14
14
  </LineView>
@@ -64,7 +64,7 @@
64
64
  {/if}
65
65
  {#each Object.entries(currencies) as [code, currency]}
66
66
  <Button
67
- variant="{value === code ? 'secondary' : 'ghost'}"
67
+ variant={value === code ? 'secondary' : 'ghost'}
68
68
  style="width:100%;"
69
69
  onClick={() => handleClick(code)}
70
70
  >
@@ -8,4 +8,4 @@
8
8
  </script>
9
9
 
10
10
 
11
- <ViewText>{value === null || value.formated === null ? '-' : value.formated.currency_data.name ?? "-"}</ViewText>
11
+ <ViewText>{value === null || value.formated === null || value.formated.currency_data === null ? '-' : value.formated.currency_data.name ?? "-"}</ViewText>
@@ -11,6 +11,6 @@
11
11
 
12
12
  <LineView {compact}>
13
13
  <Label {unique} {secret} {label} {required}></Label>
14
- <ViewText>{value === null || value.formated === null ? '-' : value.formated.currency_data.name ?? "-"}</ViewText>
14
+ <ViewText>{value === null || value.formated === null || value.formated.currency_data === null ? '-' : value.formated.currency_data.name ?? "-"}</ViewText>
15
15
 
16
16
  </LineView>
@@ -4,7 +4,7 @@
4
4
 
5
5
  let { id, variant = 'ghost', ...props } = $props();
6
6
 
7
- const project = projectRegistry.get(id);
7
+ const project = $derived(projectRegistry.get(id));
8
8
  </script>
9
9
 
10
10
  {#if project}