mountain-ui 1.0.169 → 1.0.171
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 +1 -1
- package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/NumberInt/Input.svelte +10 -1
- package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/FieldTypeInputFloat.svelte +6 -4
- package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/TextTextarea/Input.svelte +16 -2
- package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/FieldTypeInputText.svelte +21 -2
- package/src/lib/registry/projectRegistry/createProject.js +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mountain-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.171",
|
|
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",
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { onMount } from 'svelte';
|
|
2
3
|
import Label from '../../../components/Label.svelte';
|
|
3
4
|
import Line from '../../../components/Line.svelte';
|
|
4
5
|
import { Input } from 'hamzus-ui';
|
|
5
6
|
|
|
6
|
-
let { label, unique = false, secret = false, compact = false, required, placeholder="un nombre entier", ...props } = $props();
|
|
7
|
+
let { label, unique = false, secret = false, compact = false, required, placeholder="un nombre entier", value="", defaultValue = "", ...props } = $props();
|
|
8
|
+
|
|
9
|
+
onMount(()=>{
|
|
10
|
+
// si la valeur est pas set on verifie si il y a uen defaultValue
|
|
11
|
+
if (!value && defaultValue) {
|
|
12
|
+
value = defaultValue
|
|
13
|
+
onChange(value);
|
|
14
|
+
}
|
|
15
|
+
})
|
|
7
16
|
</script>
|
|
8
17
|
|
|
9
18
|
<Line {compact}>
|
package/src/lib/registry/fieldTypeRegistry/fieldTypes/number/float/FieldTypeInputFloat.svelte
CHANGED
|
@@ -9,14 +9,16 @@
|
|
|
9
9
|
symbol = '',
|
|
10
10
|
|
|
11
11
|
onChange = (val) => {},
|
|
12
|
-
value =
|
|
12
|
+
value = "",
|
|
13
13
|
...props
|
|
14
14
|
} = $props();
|
|
15
15
|
|
|
16
16
|
onMount(() => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
// si la valeur est pas set on verifie si il y a uen defaultValue
|
|
18
|
+
if (!value && defaultValue) {
|
|
19
|
+
value = defaultValue
|
|
20
|
+
onChange(value);
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
function handleCheckMinMax() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { onMount } from 'svelte';
|
|
2
3
|
import Label from '../../../components/Label.svelte';
|
|
3
4
|
import Line from '../../../components/Line.svelte';
|
|
4
5
|
import { TextArea } from 'hamzus-ui';
|
|
@@ -10,15 +11,28 @@
|
|
|
10
11
|
compact = false,
|
|
11
12
|
required,
|
|
12
13
|
defaultValue = '',
|
|
13
|
-
value =
|
|
14
|
+
value = "",
|
|
14
15
|
placeholder = "votre texte",
|
|
16
|
+
onChange=(val)=>{},
|
|
15
17
|
...props
|
|
16
18
|
} = $props();
|
|
19
|
+
|
|
20
|
+
onMount(() => {
|
|
21
|
+
// si la valeur est pas set on verifie si il y a uen defaultValue
|
|
22
|
+
if (!value && defaultValue) {
|
|
23
|
+
value = defaultValue;
|
|
24
|
+
handleChange();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
function handleChange() {
|
|
29
|
+
onChange(value)
|
|
30
|
+
}
|
|
17
31
|
</script>
|
|
18
32
|
|
|
19
33
|
<Line {compact}>
|
|
20
34
|
{#if label}
|
|
21
35
|
<Label {unique} {secret} {label} {required}></Label>
|
|
22
36
|
{/if}
|
|
23
|
-
<TextArea {...props} {placeholder} bind:value {required}></TextArea>
|
|
37
|
+
<TextArea onChange={handleChange} {...props} {placeholder} bind:value {required}></TextArea>
|
|
24
38
|
</Line>
|
package/src/lib/registry/fieldTypeRegistry/fieldTypes/text/varchar/FieldTypeInputText.svelte
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Input } from 'hamzus-ui';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
3
4
|
|
|
4
|
-
let {
|
|
5
|
+
let {
|
|
6
|
+
defaultValue = '',
|
|
7
|
+
symbol = '',
|
|
8
|
+
value = '',
|
|
9
|
+
onChange = (val) => {},
|
|
10
|
+
...props
|
|
11
|
+
} = $props();
|
|
12
|
+
|
|
13
|
+
onMount(() => {
|
|
14
|
+
// si la valeur est pas set on verifie si il y a uen defaultValue
|
|
15
|
+
if (!value && defaultValue) {
|
|
16
|
+
value = defaultValue;
|
|
17
|
+
handleChange();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
function handleChange() {
|
|
22
|
+
onChange(value)
|
|
23
|
+
}
|
|
5
24
|
</script>
|
|
6
25
|
|
|
7
|
-
<Input {...props} bind:value>
|
|
26
|
+
<Input {...props} onChange={handleChange} bind:value>
|
|
8
27
|
<div slot="endContent">
|
|
9
28
|
{#if symbol}
|
|
10
29
|
<h4>{symbol}</h4>
|
|
@@ -14,6 +14,7 @@ export function createProject(config = {}) {
|
|
|
14
14
|
name: "",
|
|
15
15
|
normalized_name: "",
|
|
16
16
|
description: '',
|
|
17
|
+
trial_is_finish: false,
|
|
17
18
|
active_subscription: {
|
|
18
19
|
name: ""
|
|
19
20
|
},
|
|
@@ -85,6 +86,7 @@ export function createProject(config = {}) {
|
|
|
85
86
|
name: project.name,
|
|
86
87
|
normalized_name: project.normalized_name,
|
|
87
88
|
description: project.description,
|
|
89
|
+
trial_is_finish: project.trial_is_finish,
|
|
88
90
|
active_subscription: {
|
|
89
91
|
name: project.active_subscription.name
|
|
90
92
|
},
|