fuma 0.3.27 → 0.3.29

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.
@@ -12,7 +12,7 @@ $:
12
12
 
13
13
  {#if Array.isArray(value)}
14
14
  <TableCellArray {value} />
15
- {:else if typeof value === 'number'}l
15
+ {:else if typeof value === 'number'}
16
16
  <TableCellNumber {value} />
17
17
  {:else if typeof value === 'boolean'}
18
18
  <TableCellBoolean {value} />
@@ -20,10 +20,22 @@ function initRange({ searchParams }) {
20
20
  }
21
21
  const udpateUrl = debounce(() => {
22
22
  if (isDefined(min) || isDefined(max)) {
23
- goto($urlParam.with({ [field.key]: JSON.stringify({ min, max }) }, "skip", "take"), {
24
- noScroll: true,
25
- keepFocus: true
26
- });
23
+ goto(
24
+ $urlParam.with(
25
+ {
26
+ [field.key]: JSON.stringify({
27
+ ...isDefined(min) ? { min } : {},
28
+ ...isDefined(max) ? { max } : {}
29
+ })
30
+ },
31
+ "skip",
32
+ "take"
33
+ ),
34
+ {
35
+ noScroll: true,
36
+ keepFocus: true
37
+ }
38
+ );
27
39
  return;
28
40
  }
29
41
  goto($urlParam.without(field.key, "skip", "take"), { noScroll: true, keepFocus: true });
@@ -63,8 +63,8 @@ const filter = {
63
63
  }).optional(),
64
64
  multiselect: array(zod.string()).optional(),
65
65
  range: json({
66
- start: zod.date().optional(),
67
- end: zod.date().optional()
66
+ start: zod.coerce.date().optional(),
67
+ end: zod.coerce.date().optional()
68
68
  }).optional(),
69
69
  boolean: zod
70
70
  .enum(['true', 'false'])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.27",
3
+ "version": "0.3.29",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",