mountain-ui 1.0.28 → 1.0.30

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 (103) hide show
  1. package/package.json +1 -1
  2. package/src/lib/registry/entityRegistry/components/EntityPage.svelte +158 -0
  3. package/src/lib/registry/entityRegistry/components/FieldTableView.svelte +23 -0
  4. package/src/lib/registry/entityRegistry/components/FieldView.svelte +24 -0
  5. package/src/lib/registry/entityRegistry/createEntity.js +2 -0
  6. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeTableView.svelte +11 -0
  7. package/src/lib/registry/fieldTypeRegistry/components/FieldTypeView.svelte +11 -0
  8. package/src/lib/registry/fieldTypeRegistry/components/LineView.svelte +33 -0
  9. package/src/lib/registry/fieldTypeRegistry/components/ViewText.svelte +5 -0
  10. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Lines/View.svelte +61 -0
  11. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/TableView.svelte +8 -0
  12. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/View.svelte +19 -0
  13. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Link/index.js +4 -1
  14. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/TableView.svelte +8 -0
  15. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/View.svelte +15 -0
  16. package/src/lib/registry/fieldTypeRegistry/fieldTypes/Primary/index.js +4 -1
  17. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/TableView.svelte +8 -0
  18. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/View.svelte +52 -0
  19. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationColumn/index.js +4 -1
  20. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/Button.svelte +8 -0
  21. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/Card.svelte +6 -0
  22. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/Icon.svelte +30 -0
  23. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/Input.svelte +153 -0
  24. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/TableView.svelte +8 -0
  25. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/View.svelte +52 -0
  26. package/src/lib/registry/fieldTypeRegistry/fieldTypes/calculation/CalculationLine/index.js +41 -0
  27. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/TableView.svelte +28 -0
  28. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/View.svelte +31 -0
  29. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListCheckbox/index.js +4 -1
  30. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/TableView.svelte +13 -0
  31. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/View.svelte +18 -0
  32. package/src/lib/registry/fieldTypeRegistry/fieldTypes/list/ListRadio/index.js +4 -1
  33. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/TableView.svelte +8 -0
  34. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/View.svelte +12 -0
  35. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/index.js +4 -1
  36. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/TableView.svelte +8 -0
  37. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/View.svelte +12 -0
  38. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatDefault/index.js +4 -1
  39. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/TableView.svelte +8 -0
  40. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/View.svelte +12 -0
  41. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPercent/index.js +4 -1
  42. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/TableView.svelte +8 -0
  43. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/View.svelte +12 -0
  44. package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/NumberFloatPrice/index.js +4 -1
  45. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/TableView.svelte +8 -0
  46. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/View.svelte +12 -0
  47. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/index.js +4 -1
  48. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/TableView.svelte +8 -0
  49. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/View.svelte +12 -0
  50. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharDefault/index.js +4 -1
  51. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/TableView.svelte +8 -0
  52. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/View.svelte +13 -0
  53. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharEmail/index.js +4 -1
  54. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/TableView.svelte +8 -0
  55. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/View.svelte +12 -0
  56. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPassword/index.js +4 -1
  57. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/TableView.svelte +8 -0
  58. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/View.svelte +13 -0
  59. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharPhone/index.js +4 -1
  60. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/TableView.svelte +8 -0
  61. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/View.svelte +24 -0
  62. package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/TextVarcharUrl/index.js +4 -1
  63. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/TableView.svelte +9 -0
  64. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/View.svelte +13 -0
  65. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeCreatedAt/index.js +4 -1
  66. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/TableView.svelte +9 -0
  67. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/View.svelte +13 -0
  68. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDate/index.js +4 -1
  69. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/TableView.svelte +9 -0
  70. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/View.svelte +13 -0
  71. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDatetime/index.js +4 -1
  72. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/TableView.svelte +8 -0
  73. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/View.svelte +12 -0
  74. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeDay/index.js +4 -1
  75. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/TableView.svelte +8 -0
  76. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/View.svelte +12 -0
  77. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeHour/index.js +4 -1
  78. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/TableView.svelte +8 -0
  79. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/View.svelte +12 -0
  80. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonth/index.js +4 -1
  81. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/TableView.svelte +8 -0
  82. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/View.svelte +12 -0
  83. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeMonthOfYear/index.js +4 -1
  84. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/TableView.svelte +9 -0
  85. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/View.svelte +13 -0
  86. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeUpdatedAt/index.js +4 -1
  87. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/TableView.svelte +8 -0
  88. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/View.svelte +12 -0
  89. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/TimeYear/index.js +4 -1
  90. package/src/lib/registry/fieldTypeRegistry/fieldTypes/time/formatDate.js +155 -0
  91. package/src/lib/registry/fieldTypeRegistry/registerDefaultFieldTypes.js +2 -0
  92. package/src/lib/registry/viewTypeRegistry/components/ViewTypeButton.svelte +27 -0
  93. package/src/lib/registry/viewTypeRegistry/components/ViewTypeComponent.svelte +30 -0
  94. package/src/lib/registry/viewTypeRegistry/createViewType.js +17 -0
  95. package/src/lib/registry/viewTypeRegistry/registerDefaultViewTypes.js +7 -0
  96. package/src/lib/registry/viewTypeRegistry/registry.svelte.js +44 -0
  97. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/Icon.svelte +16 -0
  98. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/Component copy.svelte +11 -0
  99. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/Component.svelte +12 -0
  100. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/component/StructureTable.svelte +287 -0
  101. package/src/lib/registry/viewTypeRegistry/viewTypes/Table/index.js +14 -0
  102. package/src/routes/+layout.svelte +31 -1
  103. package/src/routes/+page.svelte +22 -1
@@ -0,0 +1,153 @@
1
+ <script>
2
+ import { entityRegistry } from '../../../../entityRegistry/registry.svelte.js';
3
+ import { Tooltip } from 'hamzus-ui';
4
+ import { onMount } from 'svelte';
5
+
6
+ let {
7
+ id = null,
8
+ entity_id = null,
9
+ value = $bindable(null),
10
+ name = '',
11
+ label = '',
12
+ required = false,
13
+ unique = false,
14
+ secret = false,
15
+ compact = false,
16
+ ctx = {},
17
+ detailsCtx = {},
18
+ onChange = () => {},
19
+ onChangeDetails = () => {},
20
+ registerCalculation = () => {},
21
+ operator = '',
22
+ fieldId = '',
23
+ lineFieldId = '',
24
+ ...props
25
+ } = $props();
26
+
27
+ let isMounted = false;
28
+
29
+ const field = entityRegistry.selectField(fieldId); // champ de type ligne
30
+ const lineField = entityRegistry.selectField(lineFieldId); // champ dans la ligne
31
+
32
+ let previousValue1 = Symbol();
33
+ let previousValue2 = Symbol();
34
+
35
+ function getFieldValue(field, ctx) {
36
+ if (!field) return 0;
37
+
38
+ if (!ctx[field.id]) return 0;
39
+
40
+ // retourne les lignes
41
+ return JSON.parse(ctx[field.id]);
42
+ }
43
+
44
+ function calculate(ctx) {
45
+ if (!$field || !$lineField) return;
46
+
47
+ const lines = getFieldValue($field, ctx);
48
+
49
+ let values = lines.map((line) => Number(getFieldValue($lineField, line)) || 0);
50
+
51
+ let total;
52
+
53
+ switch (operator) {
54
+ case '+':
55
+ total = values.reduce((a, b) => a + b, 0);
56
+ break;
57
+
58
+ case '-':
59
+ total = values.reduce((a, b) => a - b);
60
+ break;
61
+
62
+ case '*':
63
+ total = values.reduce((a, b) => a * b, 1);
64
+ break;
65
+
66
+ case '/':
67
+ total = values.reduce((a, b) => (b === 0 ? null : a / b));
68
+ break;
69
+ }
70
+
71
+ if (total !== value) {
72
+ value = total;
73
+ onChange(total);
74
+ }
75
+ }
76
+
77
+ onMount(() => {
78
+ isMounted = true;
79
+
80
+ // On donne notre calcul au parent
81
+ registerCalculation({
82
+ id,
83
+ calculate,
84
+ dependsOn: [fieldId]
85
+ });
86
+ });
87
+ </script>
88
+
89
+ <div class="total-container">
90
+ <input type="hidden" {name} {value} />
91
+ <div class="total">
92
+ <div class="total-content">
93
+ <Tooltip.Root direction="bottom">
94
+ <Tooltip.Trigger slot="trigger">
95
+ <h4>{label}</h4>
96
+ </Tooltip.Trigger>
97
+ <Tooltip.Content slot="content" style="background-color:var(--bg-2)">
98
+ <h6 style="color: var(--font-2);">
99
+ {#if fieldId}
100
+ {$field.name}
101
+ {/if}
102
+ >
103
+ {#if lineFieldId}
104
+ {$lineField.name}
105
+ {/if}
106
+ {operator}
107
+ </h6>
108
+ </Tooltip.Content>
109
+ </Tooltip.Root>
110
+ <h4>{value === null ? '-' : value}</h4>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ <style>
116
+ .total-container {
117
+ width: 100%;
118
+ display: flex;
119
+ justify-content: end;
120
+ }
121
+
122
+ .total {
123
+ width: min(100%, 350px);
124
+ border-left: 1px solid var(--stroke);
125
+ border-right: 1px solid var(--stroke);
126
+ padding: var(--pad-m);
127
+ row-gap: var(--pad-m);
128
+ }
129
+
130
+ /* Premier d'une suite (ou élément seul) */
131
+ .total-container:not(.total-container + .total-container) .total {
132
+ border-top-left-radius: var(--radius-xxl);
133
+ border-top-right-radius: var(--radius-xxl);
134
+ border-top: 1px solid var(--stroke);
135
+ }
136
+
137
+ /* Dernier d'une suite (ou élément seul) */
138
+ .total-container:not(:has(+ .total-container)) .total {
139
+ border-bottom-left-radius: var(--radius-xxl);
140
+ border-bottom-right-radius: var(--radius-xxl);
141
+ border-bottom: 1px solid var(--stroke);
142
+ }
143
+
144
+ .total-content {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: space-between;
148
+ width: 100%;
149
+ padding: var(--pad-m) var(--pad-xxl);
150
+ border-radius: var(--radius-l);
151
+ background-color: var(--bg-2);
152
+ }
153
+ </style>
@@ -0,0 +1,8 @@
1
+ <script>
2
+ import ViewText from "../../../components/ViewText.svelte";
3
+
4
+ let { name, value } = $props();
5
+ </script>
6
+
7
+
8
+ <ViewText>{value === null ? '-' : value.flat}</ViewText>
@@ -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>
@@ -0,0 +1,41 @@
1
+ import { createFieldType } from '../../../createFieldType.js';
2
+
3
+ import Icon from './Icon.svelte';
4
+ import Button from './Button.svelte';
5
+ import Card from './Card.svelte';
6
+ import Input from './Input.svelte';
7
+ import View from './View.svelte';
8
+ import TableView from './TableView.svelte';
9
+
10
+ export default createFieldType({
11
+ type: 'calculation-line',
12
+
13
+ category_path: 'calculation',
14
+
15
+ label: 'Calcul de ligne',
16
+ description: 'Calcul automatique sur les lignes.',
17
+
18
+ is_hidden: false,
19
+
20
+ defaultProps: {},
21
+
22
+ can_be_required: false,
23
+ can_be_unique: false,
24
+
25
+
26
+ components: {
27
+ icon: Icon,
28
+ button: Button,
29
+ card: Card,
30
+ input: Input,
31
+ view: View,
32
+ tableView: TableView,
33
+ filter: null,
34
+ properties: null
35
+ },
36
+
37
+ formatter: (value) => value,
38
+ parser: (value) => value,
39
+
40
+ validate: () => true
41
+ });
@@ -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>