hamzus-ui 0.0.73 → 0.0.74
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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// recuperer les données par defaut de l'element ou des element selectionner
|
|
3
|
+
export let getDefault = (value)=>{}
|
|
4
|
+
|
|
5
|
+
// recuperer la liste en fonction de la recherche
|
|
6
|
+
export let getData = (search, limit, offset) => {}
|
|
7
|
+
|
|
8
|
+
// composant a charger avec les donnees
|
|
9
|
+
export let component = {
|
|
10
|
+
component:null,
|
|
11
|
+
props:{},
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// valeur selectionner
|
|
15
|
+
export let value = null
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
</script>
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
import { onMount } from 'svelte';
|
|
34
34
|
|
|
35
35
|
// local var
|
|
36
|
-
|
|
36
|
+
let isMounted = false;
|
|
37
37
|
|
|
38
|
-
$:if(value) {
|
|
38
|
+
$: if (value) {
|
|
39
39
|
let newValue = formatInput(value);
|
|
40
40
|
|
|
41
41
|
if (newValue !== value) {
|
|
42
42
|
value = newValue;
|
|
43
43
|
hasChanged = value != initialValue;
|
|
44
|
-
}else if (onChange && isMounted) {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
} else if (onChange && isMounted) {
|
|
45
|
+
onChange(value);
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// fnctions
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
onMount(() => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
isMounted = false;
|
|
92
|
+
|
|
93
|
+
isMounted = true;
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
function handleDisplay() {
|
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
disabled={isLoading ? true : disabled}
|
|
140
140
|
{step}
|
|
141
141
|
/>
|
|
142
|
+
<slot name="endContent" />
|
|
142
143
|
{#if type == 'password'}
|
|
143
144
|
<IconButton size="24px" variant="ghost" onClick={handleDisplay}>
|
|
144
145
|
{#if isVisible}
|
|
@@ -192,8 +193,6 @@
|
|
|
192
193
|
</svg>
|
|
193
194
|
{/if}
|
|
194
195
|
</IconButton>
|
|
195
|
-
{:else}
|
|
196
|
-
<slot name="endContent" />
|
|
197
196
|
{/if}
|
|
198
197
|
</div>
|
|
199
198
|
</label>
|