@jsonforms/examples 3.0.0-alpha.2 → 3.0.0-alpha.3
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/docs/assets/js/search.json +1 -1
- package/docs/globals.html +1926 -2158
- package/docs/index.html +5 -26
- package/docs/interfaces/exampledescription.html +34 -6
- package/docs/interfaces/stateprops.html +229 -0
- package/lib/example.d.ts +14 -6
- package/lib/example.js +0 -7
- package/lib/example.js.map +1 -1
- package/lib/{1169.d.ts → examples/1169.d.ts} +0 -0
- package/lib/{1169.js → examples/1169.js} +1 -1
- package/lib/examples/1169.js.map +1 -0
- package/lib/examples/1220.d.ts +4 -0
- package/lib/{1220.js → examples/1220.js} +51 -38
- package/lib/examples/1220.js.map +1 -0
- package/lib/{1253.d.ts → examples/1253.d.ts} +0 -0
- package/lib/{1253.js → examples/1253.js} +1 -1
- package/lib/examples/1253.js.map +1 -0
- package/lib/{1254.d.ts → examples/1254.d.ts} +0 -0
- package/lib/{1254.js → examples/1254.js} +1 -1
- package/lib/examples/1254.js.map +1 -0
- package/lib/{1645.d.ts → examples/1645.d.ts} +0 -0
- package/lib/{1645.js → examples/1645.js} +1 -1
- package/lib/examples/1645.js.map +1 -0
- package/lib/{1779.d.ts → examples/1779.d.ts} +0 -0
- package/lib/{1779.js → examples/1779.js} +1 -1
- package/lib/examples/1779.js.map +1 -0
- package/lib/{allOf.d.ts → examples/allOf.d.ts} +0 -0
- package/lib/{allOf.js → examples/allOf.js} +1 -1
- package/lib/examples/allOf.js.map +1 -0
- package/lib/{anyOf-oneOf-allOf-resolve.d.ts → examples/anyOf-oneOf-allOf-resolve.d.ts} +0 -0
- package/lib/{anyOf-oneOf-allOf-resolve.js → examples/anyOf-oneOf-allOf-resolve.js} +1 -1
- package/lib/examples/anyOf-oneOf-allOf-resolve.js.map +1 -0
- package/lib/{anyOf.d.ts → examples/anyOf.d.ts} +0 -0
- package/lib/{anyOf.js → examples/anyOf.js} +1 -1
- package/lib/examples/anyOf.js.map +1 -0
- package/lib/{arrays-with-custom-element-label.d.ts → examples/arrays-with-custom-element-label.d.ts} +0 -0
- package/lib/{arrays-with-custom-element-label.js → examples/arrays-with-custom-element-label.js} +1 -1
- package/lib/examples/arrays-with-custom-element-label.js.map +1 -0
- package/lib/{arrays-with-detail-and-rule.d.ts → examples/arrays-with-detail-and-rule.d.ts} +0 -0
- package/lib/{arrays-with-detail-and-rule.js → examples/arrays-with-detail-and-rule.js} +1 -1
- package/lib/examples/arrays-with-detail-and-rule.js.map +1 -0
- package/lib/{arrays-with-detail.d.ts → examples/arrays-with-detail.d.ts} +0 -0
- package/lib/{arrays-with-detail.js → examples/arrays-with-detail.js} +1 -1
- package/lib/examples/arrays-with-detail.js.map +1 -0
- package/lib/{arrays.d.ts → examples/arrays.d.ts} +10 -0
- package/lib/{arrays.js → examples/arrays.js} +25 -9
- package/lib/examples/arrays.js.map +1 -0
- package/lib/{booleanToggle.d.ts → examples/booleanToggle.d.ts} +0 -0
- package/lib/{booleanToggle.js → examples/booleanToggle.js} +1 -1
- package/lib/examples/booleanToggle.js.map +1 -0
- package/lib/{categorization.d.ts → examples/categorization.d.ts} +0 -0
- package/lib/{categorization.js → examples/categorization.js} +1 -1
- package/lib/examples/categorization.js.map +1 -0
- package/lib/{config.d.ts → examples/config.d.ts} +0 -0
- package/lib/{config.js → examples/config.js} +1 -1
- package/lib/examples/config.js.map +1 -0
- package/lib/{control-options.d.ts → examples/control-options.d.ts} +0 -0
- package/lib/{control-options.js → examples/control-options.js} +1 -1
- package/lib/examples/control-options.js.map +1 -0
- package/lib/{dates.d.ts → examples/dates.d.ts} +0 -0
- package/lib/{dates.js → examples/dates.js} +1 -1
- package/lib/examples/dates.js.map +1 -0
- package/lib/{day1.d.ts → examples/day1.d.ts} +0 -0
- package/lib/{day1.js → examples/day1.js} +1 -1
- package/lib/examples/day1.js.map +1 -0
- package/lib/{day2.d.ts → examples/day2.d.ts} +0 -0
- package/lib/{day2.js → examples/day2.js} +5 -5
- package/lib/examples/day2.js.map +1 -0
- package/lib/{day3.d.ts → examples/day3.d.ts} +0 -0
- package/lib/{day3.js → examples/day3.js} +1 -1
- package/lib/examples/day3.js.map +1 -0
- package/lib/{day4.d.ts → examples/day4.d.ts} +0 -0
- package/lib/{day4.js → examples/day4.js} +1 -1
- package/lib/examples/day4.js.map +1 -0
- package/lib/{day5.d.ts → examples/day5.d.ts} +0 -0
- package/lib/{day5.js → examples/day5.js} +1 -1
- package/lib/examples/day5.js.map +1 -0
- package/lib/{day6.d.ts → examples/day6.d.ts} +0 -0
- package/lib/{day6.js → examples/day6.js} +1 -1
- package/lib/examples/day6.js.map +1 -0
- package/lib/{default.d.ts → examples/default.d.ts} +0 -0
- package/lib/{default.js → examples/default.js} +1 -1
- package/lib/examples/default.js.map +1 -0
- package/lib/{dynamic.d.ts → examples/dynamic.d.ts} +0 -0
- package/lib/examples/dynamic.js +23 -0
- package/lib/examples/dynamic.js.map +1 -0
- package/lib/{enum.d.ts → examples/enum.d.ts} +0 -0
- package/lib/{enum.js → examples/enum.js} +1 -1
- package/lib/examples/enum.js.map +1 -0
- package/lib/{enumInArray.d.ts → examples/enumInArray.d.ts} +0 -0
- package/lib/{enumInArray.js → examples/enumInArray.js} +1 -1
- package/lib/examples/enumInArray.js.map +1 -0
- package/lib/{generate.d.ts → examples/generate.d.ts} +0 -0
- package/lib/{generate.js → examples/generate.js} +1 -1
- package/lib/examples/generate.js.map +1 -0
- package/lib/{generateUI.d.ts → examples/generateUI.d.ts} +0 -0
- package/lib/{generateUI.js → examples/generateUI.js} +1 -1
- package/lib/examples/generateUI.js.map +1 -0
- package/lib/{huge.d.ts → examples/huge.d.ts} +0 -0
- package/lib/{huge.js → examples/huge.js} +1 -1
- package/lib/examples/huge.js.map +1 -0
- package/lib/{i18n.d.ts → examples/i18n.d.ts} +0 -0
- package/lib/{i18n.js → examples/i18n.js} +1 -1
- package/lib/examples/i18n.js.map +1 -0
- package/lib/{if_then_else.d.ts → examples/if_then_else.d.ts} +0 -0
- package/lib/{if_then_else.js → examples/if_then_else.js} +1 -1
- package/lib/examples/if_then_else.js.map +1 -0
- package/lib/{layout.d.ts → examples/layout.d.ts} +0 -0
- package/lib/{layout.js → examples/layout.js} +1 -1
- package/lib/examples/layout.js.map +1 -0
- package/lib/{list-with-detail-registered.d.ts → examples/list-with-detail-registered.d.ts} +0 -0
- package/lib/{list-with-detail-registered.js → examples/list-with-detail-registered.js} +1 -1
- package/lib/examples/list-with-detail-registered.js.map +1 -0
- package/lib/{list-with-detail.d.ts → examples/list-with-detail.d.ts} +0 -0
- package/lib/{list-with-detail.js → examples/list-with-detail.js} +1 -1
- package/lib/examples/list-with-detail.js.map +1 -0
- package/lib/{multi-enum.d.ts → examples/multi-enum.d.ts} +0 -0
- package/lib/{multi-enum.js → examples/multi-enum.js} +1 -1
- package/lib/examples/multi-enum.js.map +1 -0
- package/lib/examples/nestedArrays.d.ts +11 -0
- package/lib/{nestedArrays.js → examples/nestedArrays.js} +40 -27
- package/lib/examples/nestedArrays.js.map +1 -0
- package/lib/{numbers.d.ts → examples/numbers.d.ts} +0 -0
- package/lib/{numbers.js → examples/numbers.js} +1 -1
- package/lib/examples/numbers.js.map +1 -0
- package/lib/{object.d.ts → examples/object.d.ts} +0 -0
- package/lib/{object.js → examples/object.js} +1 -1
- package/lib/examples/object.js.map +1 -0
- package/lib/{onChange.d.ts → examples/onChange.d.ts} +0 -0
- package/lib/{onChange.js → examples/onChange.js} +1 -1
- package/lib/examples/onChange.js.map +1 -0
- package/lib/{oneOf-recursive.d.ts → examples/oneOf-recursive.d.ts} +0 -0
- package/lib/{oneOf-recursive.js → examples/oneOf-recursive.js} +1 -1
- package/lib/examples/oneOf-recursive.js.map +1 -0
- package/lib/{oneOf.d.ts → examples/oneOf.d.ts} +0 -0
- package/lib/{oneOf.js → examples/oneOf.js} +1 -1
- package/lib/examples/oneOf.js.map +1 -0
- package/lib/{oneOfArray.d.ts → examples/oneOfArray.d.ts} +0 -0
- package/lib/{oneOfArray.js → examples/oneOfArray.js} +1 -1
- package/lib/examples/oneOfArray.js.map +1 -0
- package/lib/{person.d.ts → examples/person.d.ts} +0 -0
- package/lib/{person.js → examples/person.js} +1 -1
- package/lib/examples/person.js.map +1 -0
- package/lib/{radioGroup.d.ts → examples/radioGroup.d.ts} +0 -0
- package/lib/{radioGroup.js → examples/radioGroup.js} +1 -1
- package/lib/examples/radioGroup.js.map +1 -0
- package/lib/{readonly.d.ts → examples/readonly.d.ts} +0 -0
- package/lib/{readonly.js → examples/readonly.js} +1 -1
- package/lib/examples/readonly.js.map +1 -0
- package/lib/{resolve.d.ts → examples/resolve.d.ts} +0 -0
- package/lib/{resolve.js → examples/resolve.js} +1 -1
- package/lib/examples/resolve.js.map +1 -0
- package/lib/{rule.d.ts → examples/rule.d.ts} +0 -0
- package/lib/{rule.js → examples/rule.js} +1 -1
- package/lib/examples/rule.js.map +1 -0
- package/lib/{ruleInheritance.d.ts → examples/ruleInheritance.d.ts} +0 -0
- package/lib/{ruleInheritance.js → examples/ruleInheritance.js} +18 -26
- package/lib/examples/ruleInheritance.js.map +1 -0
- package/lib/{scope.d.ts → examples/scope.d.ts} +0 -0
- package/lib/{scope.js → examples/scope.js} +1 -1
- package/lib/examples/scope.js.map +1 -0
- package/lib/{stepper.d.ts → examples/stepper.d.ts} +0 -0
- package/lib/{stepper.js → examples/stepper.js} +1 -1
- package/lib/examples/stepper.js.map +1 -0
- package/lib/{steppershownav.d.ts → examples/steppershownav.d.ts} +0 -0
- package/lib/{steppershownav.js → examples/steppershownav.js} +1 -1
- package/lib/examples/steppershownav.js.map +1 -0
- package/lib/{stringArray.d.ts → examples/stringArray.d.ts} +0 -0
- package/lib/{stringArray.js → examples/stringArray.js} +1 -1
- package/lib/examples/stringArray.js.map +1 -0
- package/lib/{text.d.ts → examples/text.d.ts} +0 -0
- package/lib/{text.js → examples/text.js} +1 -1
- package/lib/examples/text.js.map +1 -0
- package/lib/index.d.ts +55 -55
- package/lib/index.js +55 -55
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/example.ts +18 -12
- package/src/{1169.ts → examples/1169.ts} +1 -1
- package/src/{1220.ts → examples/1220.ts} +58 -36
- package/src/{1253.ts → examples/1253.ts} +1 -1
- package/src/{1254.ts → examples/1254.ts} +1 -1
- package/src/{1645.ts → examples/1645.ts} +1 -1
- package/src/{1779.ts → examples/1779.ts} +1 -1
- package/src/{allOf.ts → examples/allOf.ts} +1 -1
- package/src/{anyOf-oneOf-allOf-resolve.ts → examples/anyOf-oneOf-allOf-resolve.ts} +1 -1
- package/src/{anyOf.ts → examples/anyOf.ts} +1 -1
- package/src/{arrays-with-custom-element-label.ts → examples/arrays-with-custom-element-label.ts} +1 -1
- package/src/{arrays-with-detail-and-rule.ts → examples/arrays-with-detail-and-rule.ts} +1 -1
- package/src/{arrays-with-detail.ts → examples/arrays-with-detail.ts} +1 -1
- package/src/{arrays.ts → examples/arrays.ts} +30 -7
- package/src/{booleanToggle.ts → examples/booleanToggle.ts} +1 -1
- package/src/{categorization.ts → examples/categorization.ts} +1 -1
- package/src/{config.ts → examples/config.ts} +1 -1
- package/src/{control-options.ts → examples/control-options.ts} +1 -1
- package/src/{dates.ts → examples/dates.ts} +1 -1
- package/src/{day1.ts → examples/day1.ts} +1 -1
- package/src/{day2.ts → examples/day2.ts} +5 -5
- package/src/{day3.ts → examples/day3.ts} +1 -1
- package/src/{day4.ts → examples/day4.ts} +1 -1
- package/src/{day5.ts → examples/day5.ts} +1 -1
- package/src/{day6.ts → examples/day6.ts} +1 -1
- package/src/{default.ts → examples/default.ts} +1 -1
- package/src/{dynamic.ts → examples/dynamic.ts} +17 -2
- package/src/{enum.ts → examples/enum.ts} +1 -1
- package/src/{enumInArray.ts → examples/enumInArray.ts} +1 -1
- package/src/{generate.ts → examples/generate.ts} +1 -1
- package/src/{generateUI.ts → examples/generateUI.ts} +1 -1
- package/src/{huge.ts → examples/huge.ts} +1 -1
- package/src/{i18n.ts → examples/i18n.ts} +1 -1
- package/src/{if_then_else.ts → examples/if_then_else.ts} +1 -1
- package/src/{layout.ts → examples/layout.ts} +1 -1
- package/src/{list-with-detail-registered.ts → examples/list-with-detail-registered.ts} +1 -1
- package/src/{list-with-detail.ts → examples/list-with-detail.ts} +1 -1
- package/src/{multi-enum.ts → examples/multi-enum.ts} +1 -1
- package/src/{nestedArrays.ts → examples/nestedArrays.ts} +49 -36
- package/src/{numbers.ts → examples/numbers.ts} +1 -1
- package/src/{object.ts → examples/object.ts} +1 -1
- package/src/{onChange.ts → examples/onChange.ts} +1 -1
- package/src/{oneOf-recursive.ts → examples/oneOf-recursive.ts} +1 -1
- package/src/{oneOf.ts → examples/oneOf.ts} +1 -1
- package/src/{oneOfArray.ts → examples/oneOfArray.ts} +1 -1
- package/src/{person.ts → examples/person.ts} +1 -1
- package/src/{radioGroup.ts → examples/radioGroup.ts} +1 -1
- package/src/{readonly.ts → examples/readonly.ts} +1 -1
- package/src/{resolve.ts → examples/resolve.ts} +1 -1
- package/src/{rule.ts → examples/rule.ts} +1 -1
- package/src/{ruleInheritance.ts → examples/ruleInheritance.ts} +25 -2
- package/src/{scope.ts → examples/scope.ts} +1 -1
- package/src/{stepper.ts → examples/stepper.ts} +1 -1
- package/src/{steppershownav.ts → examples/steppershownav.ts} +1 -1
- package/src/{stringArray.ts → examples/stringArray.ts} +1 -1
- package/src/{text.ts → examples/text.ts} +1 -1
- package/src/index.ts +55 -55
- package/docs/interfaces/changeexampleaction.html +0 -159
- package/lib/1169.js.map +0 -1
- package/lib/1220.d.ts +0 -3
- package/lib/1220.js.map +0 -1
- package/lib/1253.js.map +0 -1
- package/lib/1254.js.map +0 -1
- package/lib/1645.js.map +0 -1
- package/lib/1779.js.map +0 -1
- package/lib/allOf.js.map +0 -1
- package/lib/anyOf-oneOf-allOf-resolve.js.map +0 -1
- package/lib/anyOf.js.map +0 -1
- package/lib/arrays-with-custom-element-label.js.map +0 -1
- package/lib/arrays-with-detail-and-rule.js.map +0 -1
- package/lib/arrays-with-detail.js.map +0 -1
- package/lib/arrays.js.map +0 -1
- package/lib/booleanToggle.js.map +0 -1
- package/lib/categorization.js.map +0 -1
- package/lib/config.js.map +0 -1
- package/lib/control-options.js.map +0 -1
- package/lib/dates.js.map +0 -1
- package/lib/day1.js.map +0 -1
- package/lib/day2.js.map +0 -1
- package/lib/day3.js.map +0 -1
- package/lib/day4.js.map +0 -1
- package/lib/day5.js.map +0 -1
- package/lib/day6.js.map +0 -1
- package/lib/default.js.map +0 -1
- package/lib/dynamic.js +0 -37
- package/lib/dynamic.js.map +0 -1
- package/lib/enum.js.map +0 -1
- package/lib/enumInArray.js.map +0 -1
- package/lib/generate.js.map +0 -1
- package/lib/generateUI.js.map +0 -1
- package/lib/huge.js.map +0 -1
- package/lib/i18n.js.map +0 -1
- package/lib/if_then_else.js.map +0 -1
- package/lib/layout.js.map +0 -1
- package/lib/list-with-detail-registered.js.map +0 -1
- package/lib/list-with-detail.js.map +0 -1
- package/lib/multi-enum.js.map +0 -1
- package/lib/nestedArrays.d.ts +0 -4
- package/lib/nestedArrays.js.map +0 -1
- package/lib/numbers.js.map +0 -1
- package/lib/object.js.map +0 -1
- package/lib/onChange.js.map +0 -1
- package/lib/oneOf-recursive.js.map +0 -1
- package/lib/oneOf.js.map +0 -1
- package/lib/oneOfArray.js.map +0 -1
- package/lib/person.js.map +0 -1
- package/lib/radioGroup.js.map +0 -1
- package/lib/readonly.js.map +0 -1
- package/lib/resolve.js.map +0 -1
- package/lib/rule.js.map +0 -1
- package/lib/ruleInheritance.js.map +0 -1
- package/lib/scope.js.map +0 -1
- package/lib/stepper.js.map +0 -1
- package/lib/steppershownav.js.map +0 -1
- package/lib/stringArray.js.map +0 -1
- package/lib/text.js.map +0 -1
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { personCoreSchema } from './person';
|
|
27
27
|
|
|
28
28
|
export const schema = {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { personCoreSchema } from './person';
|
|
27
27
|
|
|
28
28
|
export const schema = {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
2
|
The MIT License
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
Copyright (c) 2017-2019 EclipseSource Munich
|
|
5
5
|
https://github.com/eclipsesource/jsonforms
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
|
9
9
|
in the Software without restriction, including without limitation the rights
|
|
10
10
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
11
|
copies of the Software, and to permit persons to whom the Software is
|
|
12
12
|
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
The above copyright notice and this permission notice shall be included in
|
|
15
15
|
all copies or substantial portions of the Software.
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
18
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
19
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
|
+
import { StateProps } from '../example';
|
|
26
27
|
|
|
27
28
|
export const schema = {
|
|
28
29
|
type: 'object',
|
|
@@ -65,7 +66,7 @@ export const uischema = {
|
|
|
65
66
|
]
|
|
66
67
|
};
|
|
67
68
|
|
|
68
|
-
const uischemaWithSorting = {
|
|
69
|
+
export const uischemaWithSorting = {
|
|
69
70
|
type: 'VerticalLayout',
|
|
70
71
|
elements: [
|
|
71
72
|
{
|
|
@@ -91,6 +92,27 @@ export const data = {
|
|
|
91
92
|
]
|
|
92
93
|
};
|
|
93
94
|
|
|
95
|
+
const actions = [
|
|
96
|
+
{
|
|
97
|
+
'label': 'Enable Sorting',
|
|
98
|
+
'apply': (props: StateProps) => {
|
|
99
|
+
return {
|
|
100
|
+
...props,
|
|
101
|
+
uischema: uischemaWithSorting
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
'label': 'Disable Sorting',
|
|
107
|
+
'apply': (props: StateProps) => {
|
|
108
|
+
return {
|
|
109
|
+
...props,
|
|
110
|
+
uischema: uischema
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
|
|
94
116
|
registerExamples([
|
|
95
117
|
{
|
|
96
118
|
name: 'array',
|
|
@@ -100,6 +122,7 @@ registerExamples([
|
|
|
100
122
|
uischema,
|
|
101
123
|
config: {
|
|
102
124
|
withSort: uischemaWithSorting
|
|
103
|
-
}
|
|
125
|
+
},
|
|
126
|
+
actions
|
|
104
127
|
}
|
|
105
128
|
]);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { UISchemaElement } from '@jsonforms/core';
|
|
27
27
|
|
|
28
28
|
export const schema = {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
2
|
The MIT License
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
Copyright (c) 2017-2019 EclipseSource Munich
|
|
5
5
|
https://github.com/eclipsesource/jsonforms
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
|
9
9
|
in the Software without restriction, including without limitation the rights
|
|
10
10
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
11
|
copies of the Software, and to permit persons to whom the Software is
|
|
12
12
|
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
The above copyright notice and this permission notice shall be included in
|
|
15
15
|
all copies or substantial portions of the Software.
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
18
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
19
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { data as day1Data, schema as day1Schema } from './day1';
|
|
27
27
|
|
|
28
28
|
export const schema = day1Schema;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { data as day4Data, schema as day4Schema } from './day4';
|
|
27
27
|
|
|
28
28
|
export const schema = day4Schema;
|
|
@@ -22,13 +22,28 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
25
|
+
import { StateProps } from '../example';
|
|
26
|
+
import { registerExamples } from '../register';
|
|
27
|
+
|
|
28
|
+
const actions = [
|
|
29
|
+
{
|
|
30
|
+
'label': 'Change data',
|
|
31
|
+
'apply': (props: StateProps) => {
|
|
32
|
+
return {
|
|
33
|
+
...props,
|
|
34
|
+
data: { id: 'aaa' }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
]
|
|
39
|
+
|
|
26
40
|
registerExamples([
|
|
27
41
|
{
|
|
28
42
|
name: 'dynamic',
|
|
29
43
|
label: 'Dynamic Change',
|
|
30
44
|
schema: undefined,
|
|
31
45
|
uischema: undefined,
|
|
32
|
-
data: { name: 'bla' }
|
|
46
|
+
data: { name: 'bla' },
|
|
47
|
+
actions
|
|
33
48
|
}
|
|
34
49
|
]);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { data as personData } from './person';
|
|
27
27
|
import { JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
28
28
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { data as personData, personCoreSchema } from './person';
|
|
27
27
|
import { UISchemaElement } from '@jsonforms/core';
|
|
28
28
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { personCoreSchema } from './person';
|
|
27
27
|
import { JsonFormsCore, updateErrors, AnyAction, Dispatch } from '@jsonforms/core';
|
|
28
28
|
const localize = require('ajv-i18n');
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { UISchemaElement } from '@jsonforms/core';
|
|
27
27
|
|
|
28
28
|
export const schema = {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { data as personData, schema as personSchema } from './person';
|
|
27
27
|
|
|
28
28
|
export const schema = personSchema;
|
|
@@ -22,16 +22,9 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
ControlElement,
|
|
29
|
-
JsonSchema,
|
|
30
|
-
NOT_APPLICABLE,
|
|
31
|
-
VerticalLayout,
|
|
32
|
-
AnyAction,
|
|
33
|
-
Dispatch
|
|
34
|
-
} from '@jsonforms/core';
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
|
+
import { ControlElement, JsonFormsUISchemaRegistryEntry, JsonSchema, NOT_APPLICABLE } from '@jsonforms/core';
|
|
27
|
+
import { StateProps } from '..';
|
|
35
28
|
|
|
36
29
|
const schema = {
|
|
37
30
|
type: 'object',
|
|
@@ -54,7 +47,7 @@ const schema = {
|
|
|
54
47
|
}
|
|
55
48
|
};
|
|
56
49
|
|
|
57
|
-
const uischema = {
|
|
50
|
+
export const uischema = {
|
|
58
51
|
type: 'HorizontalLayout',
|
|
59
52
|
elements: [
|
|
60
53
|
{
|
|
@@ -77,19 +70,6 @@ const data = {
|
|
|
77
70
|
]
|
|
78
71
|
};
|
|
79
72
|
|
|
80
|
-
registerExamples([
|
|
81
|
-
{
|
|
82
|
-
name: 'nestedArray',
|
|
83
|
-
label: 'Nested Array',
|
|
84
|
-
data,
|
|
85
|
-
schema,
|
|
86
|
-
uischema
|
|
87
|
-
}
|
|
88
|
-
]);
|
|
89
|
-
|
|
90
|
-
const nestedArrayTester = (_jsonSchema: JsonSchema, schemaPath: string) => {
|
|
91
|
-
return schemaPath === '#/properties/exampleArray' ? 2 : NOT_APPLICABLE;
|
|
92
|
-
};
|
|
93
73
|
const control1: ControlElement = {
|
|
94
74
|
type: 'Control',
|
|
95
75
|
scope: '#/properties/name'
|
|
@@ -99,15 +79,48 @@ const control2: ControlElement = {
|
|
|
99
79
|
type: 'Control',
|
|
100
80
|
scope: '#/properties/choices'
|
|
101
81
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
82
|
+
|
|
83
|
+
const uischemas = [
|
|
84
|
+
{
|
|
85
|
+
tester: (_jsonSchema: JsonSchema, schemaPath: string) => {
|
|
86
|
+
return schemaPath === '#/properties/exampleArray' ? 2 : NOT_APPLICABLE;
|
|
87
|
+
},
|
|
88
|
+
uischema: {
|
|
89
|
+
type: 'VerticalLayout',
|
|
90
|
+
elements: [control1, control2]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
const actions = [
|
|
96
|
+
{
|
|
97
|
+
'label': 'Register NestedArray UISchema',
|
|
98
|
+
'apply': (props: StateProps) => {
|
|
99
|
+
return {
|
|
100
|
+
...props,
|
|
101
|
+
uischemas: uischemas
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
'label': 'Unregister NestedArray UISchema',
|
|
107
|
+
'apply': (props: StateProps) => {
|
|
108
|
+
const uischemas: JsonFormsUISchemaRegistryEntry[] = undefined;
|
|
109
|
+
return {
|
|
110
|
+
...props,
|
|
111
|
+
uischemas: uischemas
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
registerExamples([
|
|
118
|
+
{
|
|
119
|
+
name: 'nestedArray',
|
|
120
|
+
label: 'Nested Array',
|
|
121
|
+
data,
|
|
122
|
+
schema,
|
|
123
|
+
uischema,
|
|
124
|
+
actions
|
|
125
|
+
}
|
|
126
|
+
]);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
import { UISchemaElement, updateErrors, JsonFormsCore, AnyAction, Dispatch } from '@jsonforms/core';
|
|
27
27
|
|
|
28
28
|
let touchedProperties: any = {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import { registerExamples } from '
|
|
25
|
+
import { registerExamples } from '../register';
|
|
26
26
|
|
|
27
27
|
export const schema = {
|
|
28
28
|
$schema: 'http://json-schema.org/draft-07/schema#',
|