@functionalcms/svelte-components 4.10.29 → 4.10.32

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.
@@ -8,39 +8,41 @@
8
8
  import { addTransactionSupport } from 'ioredis/built/transaction.js';
9
9
  import Button from './Button.svelte';
10
10
 
11
- interface FormButton{
11
+ interface FormButton {
12
12
  label: string;
13
- type: "submit" | "reset" | "button";
13
+ type: 'submit' | 'reset' | 'button';
14
14
  click?: () => void;
15
15
  }
16
16
 
17
17
  interface Props {
18
- actions: Array<FormButton>;
18
+ buttons: Array<FormButton>;
19
+ action: string;
19
20
  schema: Array<Field>;
20
21
  buttonPosition: Placement;
21
22
  buttonsContainer: string;
22
23
  }
23
24
 
24
25
  let {
25
- actions = [],
26
+ buttons = [],
26
27
  schema,
28
+ action = '',
27
29
  buttonsContainer = '',
28
30
  buttonPosition = Placement.Bottom
29
31
  }: Partial<Props> = $props();
30
32
  </script>
31
33
 
32
- {#snippet buttons()}
34
+ {#snippet renderButtons()}
33
35
  <div class={buttonsContainer}>
34
- {#each actions as action}
36
+ {#each buttons as action}
35
37
  <Button type={action.type} click={action.click}>{action.label}</Button>
36
38
  {/each}
37
39
  </div>
38
40
  {/snippet}
39
41
 
40
- <form method="POST" {action}>
42
+ <form method="POST" action={action}>
41
43
  <fieldset>
42
44
  {#if buttonPosition === Placement.Top}
43
- {@render buttons()}
45
+ {@render renderButtons()}
44
46
  {/if}
45
47
 
46
48
  <div>
@@ -74,9 +76,9 @@
74
76
  {/if}
75
77
  {/each}
76
78
  </div>
77
-
79
+
78
80
  {#if buttonPosition !== Placement.Top}
79
- {@render buttons()}
81
+ {@render renderButtons()}
80
82
  {/if}
81
83
  </fieldset>
82
84
  </form>
@@ -1,11 +1,12 @@
1
1
  import { type Field } from './form.js';
2
2
  import { Placement } from '../Styling.ts';
3
3
  declare const Form: import("svelte").Component<Partial<{
4
- actions: Array<{
4
+ buttons: Array<{
5
5
  label: string;
6
6
  type: "submit" | "reset" | "button";
7
7
  click?: () => void;
8
8
  }>;
9
+ action: string;
9
10
  schema: Array<Field>;
10
11
  buttonPosition: Placement;
11
12
  buttonsContainer: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "4.10.29",
3
+ "version": "4.10.32",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [