hamzus-ui 0.0.84 → 0.0.86
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
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
// local var
|
|
36
36
|
let isMounted = false;
|
|
37
37
|
|
|
38
|
+
$: handleChange(value)
|
|
39
|
+
|
|
38
40
|
// fnctions
|
|
39
41
|
function formatInput(inputValue) {
|
|
40
42
|
// verifier que c est un nombre
|
|
@@ -75,17 +77,18 @@
|
|
|
75
77
|
|
|
76
78
|
return formattedValue;
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
function handleChange() {
|
|
80
|
+
function handleChange(val) {
|
|
80
81
|
if (!isMounted) {
|
|
81
82
|
return
|
|
82
83
|
}
|
|
84
|
+
|
|
83
85
|
let newValue = formatInput(value);
|
|
84
86
|
|
|
85
87
|
// si la valeur formater est pas egal alors on update
|
|
86
88
|
if (newValue !== value) {
|
|
87
89
|
value = newValue;
|
|
88
90
|
}
|
|
91
|
+
|
|
89
92
|
|
|
90
93
|
onChange(value)
|
|
91
94
|
}
|
|
@@ -140,7 +143,6 @@
|
|
|
140
143
|
<input
|
|
141
144
|
on:focus={onFocus}
|
|
142
145
|
on:blur={onBlur}
|
|
143
|
-
on:input={handleChange}
|
|
144
146
|
class="h4"
|
|
145
147
|
{placeholder}
|
|
146
148
|
type={(isVisible && type == 'password') || type === 'number' ? 'text' : type}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export let config = {
|
|
2
|
-
url: "http://localhost:8000",// default url for api request
|
|
3
|
-
sessionTokenName: "token", // cookie name where your token is stored
|
|
2
|
+
url: import.meta.env.VITE_API_URL || "http://localhost:8000",// default url for api request
|
|
3
|
+
sessionTokenName: import.meta.env.VITE_TOKEN_NAME || "token", // cookie name where your token is stored
|
|
4
4
|
}
|