mountain-ui 1.0.29 → 1.0.31

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 (100) hide show
  1. package/index.d.ts +18 -1
  2. package/index.js +17 -0
  3. package/package.json +1 -1
  4. package/src/lib/registry/entityRegistry/components/EntityPage.svelte +158 -0
  5. package/src/lib/registry/entityRegistry/components/FieldTableView.svelte +23 -0
  6. package/src/lib/registry/entityRegistry/components/FieldView.svelte +24 -0
  7. package/src/lib/registry/entityRegistry/createEntity.js +2 -0
  8. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeTableView.svelte +11 -0
  9. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeView.svelte +11 -0
  10. package/src/lib/registry/fieldTypeRegistry/components/LineView.svelte +33 -0
  11. package/src/lib/registry/fieldTypeRegistry/components/ViewText.svelte +5 -0
  12. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Lines/View.svelte +61 -0
  13. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/TableView.svelte +8 -0
  14. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/View.svelte +19 -0
  15. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/index.js +4 -1
  16. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/TableView.svelte +8 -0
  17. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/View.svelte +15 -0
  18. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/index.js +4 -1
  19. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/TableView.svelte +8 -0
  20. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/View.svelte +52 -0
  21. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/index.js +4 -1
  22. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/TableView.svelte +8 -0
  23. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/View.svelte +52 -0
  24. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/index.js +6 -2
  25. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/TableView.svelte +28 -0
  26. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/View.svelte +31 -0
  27. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/index.js +4 -1
  28. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/TableView.svelte +13 -0
  29. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/View.svelte +18 -0
  30. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/index.js +4 -1
  31. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/TableView.svelte +8 -0
  32. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/View.svelte +12 -0
  33. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/index.js +4 -1
  34. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/TableView.svelte +8 -0
  35. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/View.svelte +12 -0
  36. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/index.js +4 -1
  37. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/TableView.svelte +8 -0
  38. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/View.svelte +12 -0
  39. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/index.js +4 -1
  40. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/TableView.svelte +8 -0
  41. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/View.svelte +12 -0
  42. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/index.js +4 -1
  43. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/TableView.svelte +8 -0
  44. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/View.svelte +12 -0
  45. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/index.js +4 -1
  46. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/TableView.svelte +8 -0
  47. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/View.svelte +12 -0
  48. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/index.js +4 -1
  49. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/TableView.svelte +8 -0
  50. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/View.svelte +13 -0
  51. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/index.js +4 -1
  52. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/TableView.svelte +8 -0
  53. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/View.svelte +12 -0
  54. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/index.js +4 -1
  55. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/TableView.svelte +8 -0
  56. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/View.svelte +13 -0
  57. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/index.js +4 -1
  58. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/TableView.svelte +8 -0
  59. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/View.svelte +24 -0
  60. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/index.js +4 -1
  61. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/TableView.svelte +9 -0
  62. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/View.svelte +13 -0
  63. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/index.js +4 -1
  64. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/TableView.svelte +9 -0
  65. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/View.svelte +13 -0
  66. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/index.js +4 -1
  67. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/TableView.svelte +9 -0
  68. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/View.svelte +13 -0
  69. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/index.js +4 -1
  70. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/TableView.svelte +8 -0
  71. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/View.svelte +12 -0
  72. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/index.js +4 -1
  73. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/TableView.svelte +8 -0
  74. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/View.svelte +12 -0
  75. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/index.js +4 -1
  76. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/TableView.svelte +8 -0
  77. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/View.svelte +12 -0
  78. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/index.js +4 -1
  79. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/TableView.svelte +8 -0
  80. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/View.svelte +12 -0
  81. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/index.js +4 -1
  82. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/TableView.svelte +9 -0
  83. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/View.svelte +13 -0
  84. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/index.js +4 -1
  85. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/TableView.svelte +8 -0
  86. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/View.svelte +12 -0
  87. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/index.js +4 -1
  88. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/formatDate.js +155 -0
  89. package/src/lib/registry/viewTypeRegistry/components/ViewTypeButton.svelte +27 -0
  90. package/src/lib/registry/viewTypeRegistry/components/ViewTypeComponent.svelte +30 -0
  91. package/src/lib/registry/viewTypeRegistry/createViewType.js +17 -0
  92. package/src/lib/registry/viewTypeRegistry/registerDefaultViewTypes.js +7 -0
  93. package/src/lib/registry/viewTypeRegistry/registry.svelte.js +44 -0
  94. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/Icon.svelte +16 -0
  95. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/Component copy.svelte +11 -0
  96. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/Component.svelte +12 -0
  97. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/StructureTable.svelte +287 -0
  98. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/index.js +14 -0
  99. package/src/routes/+layout.svelte +13 -1
  100. package/src/routes/+page.svelte +22 -1
@@ -0,0 +1,52 @@
1
+ <script>
2
+ let { name, value } = $props();
3
+ </script>
4
+
5
+ <div class="total-container">
6
+ <div class="total">
7
+ <div class="total-content">
8
+ <h4>{name}</h4>
9
+ <h4>{value === null ? '-' : value.flat}</h4>
10
+ </div>
11
+ </div>
12
+ </div>
13
+
14
+ <style>
15
+ .total-container {
16
+ width: min(100%, 1000px);
17
+ display: flex;
18
+ justify-content: end;
19
+ }
20
+
21
+ .total {
22
+ width: min(100%, 350px);
23
+ border-left: 1px solid var(--stroke);
24
+ border-right: 1px solid var(--stroke);
25
+ padding: var(--pad-m);
26
+ row-gap: var(--pad-m);
27
+ }
28
+
29
+ /* Premier d'une suite (ou élément seul) */
30
+ .total-container:not(.total-container + .total-container) .total {
31
+ border-top-left-radius: var(--radius-xxl);
32
+ border-top-right-radius: var(--radius-xxl);
33
+ border-top: 1px solid var(--stroke);
34
+ }
35
+
36
+ /* Dernier d'une suite (ou élément seul) */
37
+ .total-container:not(:has(+ .total-container)) .total {
38
+ border-bottom-left-radius: var(--radius-xxl);
39
+ border-bottom-right-radius: var(--radius-xxl);
40
+ border-bottom: 1px solid var(--stroke);
41
+ }
42
+
43
+ .total-content {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: space-between;
47
+ width: 100%;
48
+ padding: var(--pad-m) var(--pad-xxl);
49
+ border-radius: var(--radius-l);
50
+ background-color: var(--bg-2);
51
+ }
52
+ </style>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import View from './View.svelte';
8
+ import TableView from './TableView.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'calculation-line',
@@ -20,12 +22,14 @@ export default createFieldType({
20
22
  can_be_required: false,
21
23
  can_be_unique: false,
22
24
 
23
- components: {
25
+
26
+ components: {
24
27
  icon: Icon,
25
28
  button: Button,
26
29
  card: Card,
27
30
  input: Input,
28
- cell: null,
31
+ view: View,
32
+ tableView: TableView,
29
33
  filter: null,
30
34
  properties: null
31
35
  },
@@ -0,0 +1,28 @@
1
+ <script>
2
+
3
+ import { Tag } from 'hamzus-ui';
4
+
5
+ let { value, choices } = $props();
6
+
7
+ $effect(() => {
8
+ decodedValue = value.formated ?? [];
9
+ });
10
+ </script>
11
+
12
+
13
+ <div class="tags">
14
+ {#each decodedValue as tagValue}
15
+ {@const data = choices.find((el) => el.value === tagValue)}
16
+ {#if data}
17
+ <Tag label={tagValue} color={data.color.replace('--', '')}></Tag>
18
+ {/if}
19
+ {/each}
20
+ </div>
21
+
22
+ <style>
23
+ .tags {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ gap: var(--pad-s);
27
+ }
28
+ </style>
@@ -0,0 +1,31 @@
1
+ <script>
2
+ import Label from '../../../components/Label.svelte';
3
+ import LineView from '../../../components/LineView.svelte';
4
+ import { Tag } from 'hamzus-ui';
5
+
6
+ let { value, choices, compact, unique, secret, label, required } = $props();
7
+
8
+ $effect(() => {
9
+ decodedValue = value.formated ?? [];
10
+ });
11
+ </script>
12
+
13
+ <LineView {compact}>
14
+ <Label {unique} {secret} {label} {required}></Label>
15
+ <div class="tags">
16
+ {#each decodedValue as tagValue}
17
+ {@const data = choices.find((el) => el.value === tagValue)}
18
+ {#if data}
19
+ <Tag label={tagValue} color={data.color.replace('--', '')}></Tag>
20
+ {/if}
21
+ {/each}
22
+ </div>
23
+ </LineView>
24
+
25
+ <style>
26
+ .tags {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ gap: var(--pad-s);
30
+ }
31
+ </style>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'list-checkbox',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,13 @@
1
+ <script>
2
+ import ViewText from '../../../components/ViewText.svelte';
3
+ import { Tag } from 'hamzus-ui';
4
+
5
+ let {value, choices} = $props()
6
+ </script>
7
+
8
+ {#if value && value.formated}
9
+ {@const data = choices.filter((el) => el.value === value.formated)[0]}
10
+ <Tag label={value.formated} color={data.color.replace('--', '')}></Tag>
11
+ {:else}
12
+ <ViewText>-</ViewText>
13
+ {/if}
@@ -0,0 +1,18 @@
1
+ <script>
2
+ import Label from '../../../components/Label.svelte';
3
+ import LineView from '../../../components/LineView.svelte';
4
+ import ViewText from '../../../components/ViewText.svelte';
5
+ import { Tag } from 'hamzus-ui';
6
+
7
+ let {value, choices, compact, unique, secret, label, required } = $props()
8
+ </script>
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ {#if value && value.formated}
12
+ {@const data = choices.filter((el) => el.value === value.formated)[0]}
13
+ <Tag label={value.formated} color={data.color.replace('--', '')}></Tag>
14
+ {:else}
15
+ <ViewText>-</ViewText>
16
+ {/if}
17
+
18
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'list-radio',
@@ -32,7 +34,8 @@ export default createFieldType({
32
34
  button: Button,
33
35
  card: Card,
34
36
  input: Input,
35
- cell: null,
37
+ tableView: TableView,
38
+ view: View,
36
39
  filter: null,
37
40
  properties: null
38
41
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../components/Label.svelte';
3
+ import LineView from '../../../components/LineView.svelte';
4
+ import ViewText from '../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'number-int',
@@ -29,7 +31,8 @@ export default createFieldType({
29
31
  button: Button,
30
32
  card: Card,
31
33
  input: Input,
32
- cell: null,
34
+ tableView: TableView,
35
+ view: View,
33
36
  filter: null,
34
37
  properties: null
35
38
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'number-float-default',
@@ -29,7 +31,8 @@ export default createFieldType({
29
31
  button: Button,
30
32
  card: Card,
31
33
  input: Input,
32
- cell: null,
34
+ tableView: TableView,
35
+ view: View,
33
36
  filter: null,
34
37
  properties: null
35
38
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'number-float-percent',
@@ -29,7 +31,8 @@ export default createFieldType({
29
31
  button: Button,
30
32
  card: Card,
31
33
  input: Input,
32
- cell: null,
34
+ tableView: TableView,
35
+ view: View,
33
36
  filter: null,
34
37
  properties: null
35
38
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'number-float-price',
@@ -29,7 +31,8 @@ export default createFieldType({
29
31
  button: Button,
30
32
  card: Card,
31
33
  input: Input,
32
- cell: null,
34
+ tableView: TableView,
35
+ view: View,
33
36
  filter: null,
34
37
  properties: null
35
38
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../components/Label.svelte';
3
+ import LineView from '../../../components/LineView.svelte';
4
+ import ViewText from '../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <p style="white-space: pre-wrap;">{value === null ? '-' : value.flat}</p>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-textarea',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-varchar-default',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,13 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+ import { Link } from 'hamzus-ui';
6
+
7
+ let { value, compact, unique, secret, label, required } = $props();
8
+ </script>
9
+
10
+ <LineView {compact}>
11
+ <Label {unique} {secret} {label} {required}></Label>
12
+ <Link href="mailto:{value?.flat ?? ""}" label={value?.flat ?? ""}/>
13
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-varchar-email',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+
6
+ let { value, compact, unique, secret, label, required } = $props();
7
+ </script>
8
+
9
+ <LineView {compact}>
10
+ <Label {unique} {secret} {label} {required}></Label>
11
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
12
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-varchar-password',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,13 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+ import { Link } from 'hamzus-ui';
6
+
7
+ let { value, compact, unique, secret, label, required } = $props();
8
+ </script>
9
+
10
+ <LineView {compact}>
11
+ <Label {unique} {secret} {label} {required}></Label>
12
+ <Link href="mailto:{value?.flat ?? ""}" label={value?.flat ?? ""}/>
13
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-varchar-phone',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../../components/ViewText.svelte";
3
+
4
+ let { value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -0,0 +1,24 @@
1
+ <script>
2
+ import Label from '../../../../components/Label.svelte';
3
+ import LineView from '../../../../components/LineView.svelte';
4
+ import ViewText from '../../../../components/ViewText.svelte';
5
+ import { AlertCard, Button, Dialog } from 'hamzus-ui';
6
+
7
+ let { value, compact, unique, secret, label, required } = $props();
8
+
9
+ let confirmationIsOpen = $state(false)
10
+ </script>
11
+
12
+ <Dialog bind:isOpen={confirmationIsOpen}>
13
+ <div style="display:flex;row-gap:var(--pad-m);flex-direction:column;">
14
+ <h3>Aller a l'adresse</h3>
15
+ <p>Etes vous sure de vouloir suivre ce lien ?</p>
16
+ <p>{value?.flat ?? ""}</p>
17
+ <AlertCard>Le lien peut être potentiellement dangereux et n'est pas verifié !</AlertCard>
18
+ <Button href={value?.flat ?? ""} target="_blank">confirmer</Button>
19
+ </div>
20
+ </Dialog>
21
+ <LineView {compact}>
22
+ <Label {unique} {secret} {label} {required}></Label>
23
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
24
+ </LineView>
@@ -4,6 +4,8 @@ import Icon from './Icon.svelte';
4
4
  import Button from './Button.svelte';
5
5
  import Card from './Card.svelte';
6
6
  import Input from './Input.svelte';
7
+ import TableView from './TableView.svelte';
8
+ import View from './View.svelte';
7
9
 
8
10
  export default createFieldType({
9
11
  type: 'text-varchar-url',
@@ -25,7 +27,8 @@ export default createFieldType({
25
27
  button: Button,
26
28
  card: Card,
27
29
  input: Input,
28
- cell: null,
30
+ tableView: TableView,
31
+ view: View,
29
32
  filter: null,
30
33
  properties: null
31
34
  },