Skip to content

Commit f7b64b3

Browse files
committed
Merge branch 'main' into file-renderer
2 parents 829fd83 + 8b98ec0 commit f7b64b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6192
-2523
lines changed

example/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"clean": "rimraf dist"
99
},
1010
"dependencies": {
11-
"@jsonforms/core": "3.0.0-rc.1",
12-
"@jsonforms/vue2": "3.0.0-rc.1",
13-
"@jsonforms/vue2-vuetify": "3.0.0-rc.1",
11+
"@jsonforms/core": "3.0.0",
12+
"@jsonforms/vue2": "3.0.0",
13+
"@jsonforms/vue2-vuetify": "3.0.0",
1414
"core-js": "^3.9.1",
1515
"json-refs": "^3.0.15",
16+
"ajv-keywords": "^5.1.0",
1617
"monaco-editor": "^0.26.0",
1718
"vue": "^2.7.0",
1819
"vue-router": "^3.2.0",

example/src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
<script lang="ts">
88
export default { name: 'App' };
99
</script>
10+
11+
<style scoped>
12+
@import '~@jsonforms/vue2-vuetify/lib/jsonforms-vue2-vuetify.esm.css';
13+
</style>

example/src/core/jsonschema/specification/uischema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
"scope": {
299299
"type": "string",
300300
"$id": "#scope",
301-
"pattern": "^#\\/properties\\/{1}"
301+
"pattern": "^#$|^#\\/$|^#\\/properties\\/{1}"
302302
},
303303
"options": {
304304
"type": "object",

example/src/core/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type Example = {
1010
input: {
1111
schema?: JsonSchema;
1212
uischema?: UISchemaElement;
13-
data: Record<string, any>;
13+
data: string | number | boolean | any[] | Record<string, any>;
1414
i18n?: Record<string, any>;
1515
renderers?: JsonFormsRendererRegistryEntry[];
1616
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"propertiesString": "data",
3+
"string": "string value",
4+
"number": 10.2,
5+
"integer": 11,
6+
"object": {
7+
"prop1": "prop 1 value"
8+
},
9+
"boolean": true,
10+
"stringArray": ["value1", "value2"],
11+
"numberArray": [12.2],
12+
"integerArray": [33],
13+
"objectArray": [{ "prop1": "prop1 val" }, {}],
14+
"booleanArray": [false, true]
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"en": {
3+
"root": {
4+
"additionalProperties": {
5+
"title": "Additional Properties",
6+
"newProperty": {
7+
"placeholder": "New Property"
8+
},
9+
"btn": {
10+
"add": "Add to ${additionalProperties.title}",
11+
"delete": "Delete from ${additionalProperties.title}"
12+
}
13+
}
14+
}
15+
}
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import schema from './schema.json';
2+
import uischema from './uischema.json';
3+
import data from './data.json';
4+
import i18n from './i18n.json';
5+
import { UISchemaElement, JsonSchema } from '@jsonforms/core';
6+
7+
export const input: {
8+
schema: JsonSchema;
9+
uischema: UISchemaElement;
10+
data: any;
11+
i18n: any;
12+
} = { schema, uischema, data, i18n };
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"propertiesString": {
6+
"type": "string"
7+
}
8+
},
9+
"propertyNames": {
10+
"minLength": 2
11+
},
12+
"patternProperties": {
13+
"^string$": {
14+
"type": "string"
15+
},
16+
"^number$": {
17+
"type": "number"
18+
},
19+
"^integer$": {
20+
"type": "integer"
21+
},
22+
"^object$": {
23+
"type": "object",
24+
"properties": {
25+
"prop1": {
26+
"type": "string"
27+
}
28+
}
29+
},
30+
"^boolean$": {
31+
"type": "boolean"
32+
},
33+
"^stringArray$": {
34+
"type": "array",
35+
"items": {
36+
"type": "string"
37+
}
38+
},
39+
"^numberArray$": {
40+
"type": "array",
41+
"items": {
42+
"type": "number"
43+
}
44+
},
45+
"^integerArray$": {
46+
"type": "array",
47+
"items": {
48+
"type": "integer"
49+
}
50+
},
51+
"^objectArray$": {
52+
"type": "array",
53+
"items": {
54+
"type": "object",
55+
"properties": {
56+
"prop1": {
57+
"type": "string"
58+
}
59+
}
60+
}
61+
},
62+
"^booleanArray$": {
63+
"type": "array",
64+
"items": {
65+
"type": "boolean"
66+
}
67+
}
68+
},
69+
"additionalProperties": {
70+
"type": "string",
71+
"title": "Additional Properties"
72+
},
73+
"maxProperties": 15
74+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Control",
3+
"scope": "#/"
4+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"addressOrUser": {
3+
"street_address": "1600 Pennsylvania Avenue NW",
4+
"city": "Washington",
5+
"state": "DC"
6+
}
7+
}

0 commit comments

Comments
 (0)