fuma 0.3.23 → 0.3.24

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.
@@ -96,7 +96,7 @@ const getBoolean = (bool) => (_data) => typeof bool === "boolean" || bool === vo
96
96
  >
97
97
  <slot />
98
98
 
99
- {#if data.id}
99
+ {#if data?.id}
100
100
  <input type="hidden" name="id" value={data.id} />
101
101
  {/if}
102
102
 
@@ -137,7 +137,10 @@ const getBoolean = (bool) => (_data) => typeof bool === "boolean" || bool === vo
137
137
  <button class="btn btn-primary"> Valider </button>
138
138
  <div class="grow" />
139
139
  {#if data.id && actionDelete}
140
- <ButtonDelete formaction="{action}{actionDelete}">Supprimer</ButtonDelete>
140
+ {@const formaction = `${action}${actionDelete}`}
141
+ <slot name="delete" {formaction}>
142
+ <ButtonDelete {formaction}>Supprimer</ButtonDelete>
143
+ </slot>
141
144
  {/if}
142
145
  </div>
143
146
  </form>
@@ -33,6 +33,9 @@ declare class __sveltets_Render<Shape extends z.ZodRawShape, ReturnData extends
33
33
  };
34
34
  slots(): {
35
35
  default: {};
36
+ delete: {
37
+ formaction: any;
38
+ };
36
39
  };
37
40
  }
38
41
  export type FormProps<Shape extends z.ZodRawShape, ReturnData extends Record<string, unknown> = FormDataInput<Shape>, Data extends FormDataInput<Shape> = FormDataInput<Shape>> = ReturnType<__sveltets_Render<Shape, ReturnData, Data>['props']>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",