svelte-json-schema-form 0.0.1-alpha4 → 0.0.1-alpha6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-json-schema-form",
3
3
  "private": false,
4
- "version": "0.0.1-alpha4",
4
+ "version": "0.0.1-alpha6",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "check": "svelte-check --tsconfig ./tsconfig.json",
@@ -33,6 +33,6 @@
33
33
  "vite": "^5.1.0"
34
34
  },
35
35
  "dependencies": {
36
- "json-form-core": "0.0.1-alpha5"
36
+ "json-form-core": "0.0.1-alpha11"
37
37
  }
38
38
  }
@@ -87,7 +87,27 @@
87
87
  "properties": {
88
88
  "f1": {
89
89
  "title": "Array Obj Field 1",
90
- "component": "textInput"
90
+ "component": "textInput",
91
+ "automations": [
92
+ {
93
+ "condition":{
94
+ "and": {
95
+ "$[node_value]": {
96
+ "eq": "val"
97
+ }
98
+ }
99
+ },
100
+ "actions":[
101
+ {
102
+ "action":"set",
103
+ "args":[
104
+ "$[node_value]../f2",
105
+ "xxx"
106
+ ]
107
+ }
108
+ ]
109
+ }
110
+ ]
91
111
  },
92
112
  "f2": {
93
113
  "title": "Array Obj Field 2",
package/src/Form.svelte CHANGED
@@ -21,10 +21,6 @@
21
21
 
22
22
  export let paths = {};
23
23
 
24
- $: {
25
- console.log("PATHS!", paths);
26
- }
27
-
28
24
  export let components = {}; // svelte input components
29
25
 
30
26
  // TODO set in store, not here
@@ -91,6 +87,7 @@
91
87
  */
92
88
 
93
89
  onMount(() => {
90
+ window.formController = formController;
94
91
  const unsubscribeValue = formController.subscribeValue((storeValue) => {
95
92
  value = storeValue;
96
93
  });
@@ -99,8 +96,6 @@
99
96
  unsubscribeValue();
100
97
  }
101
98
  });
102
-
103
-
104
99
  </script>
105
100
 
106
101
  <svelte:component