svelte-json-schema-form 0.0.4-alpha2 → 0.0.4
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/components/Form.svelte +0 -19
- package/dist/components/formDefaultInputComponents.d.ts +6 -6
- package/dist/components/formDefaultInputComponents.js +6 -6
- package/dist/components/inputs/FormActionButton.svelte +1 -1
- package/dist/components/inputs/FormArrayInput.svelte +4 -4
- package/dist/components/inputs/FormTextInput.svelte +1 -1
- package/package.json +4 -4
|
@@ -68,25 +68,6 @@
|
|
|
68
68
|
|
|
69
69
|
setContext(context, formController); // make form controller available to all children
|
|
70
70
|
|
|
71
|
-
/*
|
|
72
|
-
// schema, fragments, value
|
|
73
|
-
// TODO subscribe to store as well to set value
|
|
74
|
-
// TODO can this be simpler?
|
|
75
|
-
$: { // values changed
|
|
76
|
-
console.log("SETTING VALUE");
|
|
77
|
-
store.set(['value'], value);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
$: { // schema changed
|
|
81
|
-
console.log("SETTING SCHEMA");
|
|
82
|
-
store.set(['schema'], schema ?? {});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
$: { // fragments changed
|
|
86
|
-
store.set(['fragments'], fragments ?? {});
|
|
87
|
-
}
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
71
|
onMount(() => {
|
|
91
72
|
const unsubscribeValue = formController.subscribeValue((storeValue) => {
|
|
92
73
|
value = storeValue;
|
|
@@ -7,9 +7,9 @@ declare namespace _default {
|
|
|
7
7
|
export { FormActionButton as actionButton };
|
|
8
8
|
}
|
|
9
9
|
export default _default;
|
|
10
|
-
import FormInputWrapper from "./
|
|
11
|
-
import FormArrayInput from "./
|
|
12
|
-
import FormObjectInput from "./
|
|
13
|
-
import FormTextInput from "./
|
|
14
|
-
import FormCheckboxInput from "./
|
|
15
|
-
import FormActionButton from "./
|
|
10
|
+
import FormInputWrapper from "./inputs/FormInputWrapper.svelte";
|
|
11
|
+
import FormArrayInput from "./inputs/FormArrayInput.svelte";
|
|
12
|
+
import FormObjectInput from "./inputs/FormObjectInput.svelte";
|
|
13
|
+
import FormTextInput from "./inputs/FormTextInput.svelte";
|
|
14
|
+
import FormCheckboxInput from "./inputs/FormCheckboxInput.svelte";
|
|
15
|
+
import FormActionButton from "./inputs/FormActionButton.svelte";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import FormInputWrapper from "./
|
|
2
|
-
import FormArrayInput from "./
|
|
3
|
-
import FormObjectInput from "./
|
|
4
|
-
import FormTextInput from "./
|
|
5
|
-
import FormCheckboxInput from "./
|
|
6
|
-
import FormActionButton from "./
|
|
1
|
+
import FormInputWrapper from "./inputs/FormInputWrapper.svelte";
|
|
2
|
+
import FormArrayInput from "./inputs/FormArrayInput.svelte";
|
|
3
|
+
import FormObjectInput from "./inputs/FormObjectInput.svelte";
|
|
4
|
+
import FormTextInput from "./inputs/FormTextInput.svelte";
|
|
5
|
+
import FormCheckboxInput from "./inputs/FormCheckboxInput.svelte";
|
|
6
|
+
import FormActionButton from "./inputs/FormActionButton.svelte";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
wrapper: FormInputWrapper,
|
|
@@ -81,15 +81,15 @@
|
|
|
81
81
|
valuePathParts={[...valuePathParts, itemIndex]}
|
|
82
82
|
/>
|
|
83
83
|
{#if itemIndex > 0}
|
|
84
|
-
<input type="button"
|
|
84
|
+
<input type="button" onclick={() => moveItem(itemIndex, itemIndex-1)} value="Move Up" />
|
|
85
85
|
{/if}
|
|
86
86
|
{#if itemIndex < value.length - 1}
|
|
87
|
-
<input type="button"
|
|
87
|
+
<input type="button" onclick={() => moveItem(itemIndex, itemIndex+1)} value="Move Down" />
|
|
88
88
|
{/if}
|
|
89
|
-
<input type="button"
|
|
89
|
+
<input type="button" onclick={() => deleteItem(itemIndex)} value="Remove Item" />
|
|
90
90
|
{/each}
|
|
91
91
|
|
|
92
92
|
<hr />
|
|
93
|
-
<input type="button"
|
|
93
|
+
<input type="button" onclick={addItem} value="Add Item" />
|
|
94
94
|
{/if}
|
|
95
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-json-schema-form",
|
|
3
|
-
"version": "0.0.4
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"svelte": "^5.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"json-form-core": "^0.0.
|
|
39
|
-
"svelte-utility-stores": "^1.0.
|
|
38
|
+
"json-form-core": "^0.0.9",
|
|
39
|
+
"svelte-utility-stores": "^1.0.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/compat": "^2.0.3",
|
|
43
43
|
"@eslint/js": "^10.0.1",
|
|
44
44
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
45
|
-
"@sveltejs/kit": "^2.
|
|
45
|
+
"@sveltejs/kit": "^2.70.3",
|
|
46
46
|
"@sveltejs/package": "^2.5.7",
|
|
47
47
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
48
48
|
"@types/node": "^22",
|