@axium/client 0.4.5 → 0.4.6
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/dist/user.js +2 -2
- package/lib/Popover.svelte +10 -10
- package/package.json +1 -1
package/dist/user.js
CHANGED
|
@@ -75,7 +75,7 @@ function _checkId(userId) {
|
|
|
75
75
|
z.uuid().parse(userId);
|
|
76
76
|
}
|
|
77
77
|
catch (e) {
|
|
78
|
-
throw z.prettifyError(e);
|
|
78
|
+
throw e instanceof z.core.$ZodError ? z.prettifyError(e) : e;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
export async function userInfo(userId) {
|
|
@@ -88,7 +88,7 @@ export async function userInfo(userId) {
|
|
|
88
88
|
export async function updateUser(userId, data) {
|
|
89
89
|
_checkId(userId);
|
|
90
90
|
const body = await UserChangeable.parseAsync(data).catch(e => {
|
|
91
|
-
throw z.prettifyError(e);
|
|
91
|
+
throw e instanceof z.core.$ZodError ? z.prettifyError(e) : e;
|
|
92
92
|
});
|
|
93
93
|
const result = await fetchAPI('PATCH', 'users/:id', body, userId);
|
|
94
94
|
result.registeredAt = new Date(result.registeredAt);
|
package/lib/Popover.svelte
CHANGED
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
}
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
14
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
15
|
+
<div {onclick}>
|
|
16
|
+
{#if toggle}
|
|
17
|
+
{@render toggle()}
|
|
18
|
+
{:else}
|
|
19
|
+
<span class="popover-toggle">
|
|
20
|
+
<Icon i="ellipsis" />
|
|
21
|
+
</span>
|
|
22
|
+
{/if}
|
|
23
23
|
|
|
24
24
|
<div popover bind:this={popover}>
|
|
25
25
|
{@render children()}
|