@jsonforms/examples 3.1.0-alpha.1 → 3.1.0-alpha.2

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.
Files changed (110) hide show
  1. package/.eslintrc.js +29 -0
  2. package/.prettierrc.js +6 -0
  3. package/README.md +1 -1
  4. package/docs/assets/js/search.json +1 -1
  5. package/docs/globals.html +1860 -3124
  6. package/docs/index.html +0 -30
  7. package/lib/examples/1884.d.ts +8 -0
  8. package/lib/examples/additional-errors.d.ts +16 -1
  9. package/lib/examples/anyOf.d.ts +15 -2
  10. package/lib/examples/arraysI18n.d.ts +52 -0
  11. package/lib/examples/dates.d.ts +115 -1
  12. package/lib/examples/enum.d.ts +3 -0
  13. package/lib/examples/generate-dynamic.d.ts +15 -0
  14. package/lib/examples/list-with-detail-primitives.d.ts +36 -0
  15. package/lib/examples/list-with-detail-registered.d.ts +55 -1
  16. package/lib/examples/list-with-detail.d.ts +191 -1
  17. package/lib/examples/nestedCategorization.d.ts +57 -0
  18. package/lib/examples/radioGroup.d.ts +42 -1
  19. package/lib/index.d.ts +8 -19
  20. package/lib/jsonforms-examples.cjs.js +2279 -2873
  21. package/lib/jsonforms-examples.cjs.js.map +1 -1
  22. package/lib/jsonforms-examples.esm.js +2271 -2882
  23. package/lib/jsonforms-examples.esm.js.map +1 -1
  24. package/package.json +13 -6
  25. package/rollup.config.js +12 -12
  26. package/src/example.ts +3 -3
  27. package/src/examples/1884.ts +52 -48
  28. package/src/examples/1948.ts +19 -19
  29. package/src/examples/additional-errors.ts +28 -25
  30. package/src/examples/allOf.ts +18 -18
  31. package/src/examples/anyOf-oneOf-allOf-resolve.ts +21 -21
  32. package/src/examples/anyOf.ts +42 -24
  33. package/src/examples/arrays-with-custom-element-label.ts +21 -21
  34. package/src/examples/arrays-with-detail-and-rule.ts +28 -28
  35. package/src/examples/arrays-with-detail.ts +21 -21
  36. package/src/examples/arrays-with-sorting.ts +35 -35
  37. package/src/examples/arrays.ts +35 -35
  38. package/src/examples/arraysI18n.ts +107 -0
  39. package/src/examples/{steppershownav.ts → categorization-stepper-nav-buttons.ts} +6 -6
  40. package/src/examples/{stepper.ts → categorization-stepper.ts} +5 -5
  41. package/src/examples/categorization.ts +119 -119
  42. package/src/examples/conditional-schema-compositions.ts +20 -20
  43. package/src/examples/config.ts +15 -15
  44. package/src/examples/control-options.ts +81 -82
  45. package/src/examples/dates.ts +34 -34
  46. package/src/examples/default.ts +22 -22
  47. package/src/examples/{multi-enum.ts → enum-multi.ts} +14 -14
  48. package/src/examples/enum.ts +40 -33
  49. package/src/examples/enumInArray.ts +10 -10
  50. package/src/examples/{dynamic.ts → generate-dynamic.ts} +10 -10
  51. package/src/examples/generate.ts +2 -2
  52. package/src/examples/generateUI.ts +2 -2
  53. package/src/examples/huge.ts +381 -377
  54. package/src/examples/i18n.ts +37 -28
  55. package/src/examples/if_then_else.ts +4 -4
  56. package/src/examples/layout.ts +29 -29
  57. package/src/examples/{booleanToggle.ts → list-with-detail-primitives.ts} +46 -33
  58. package/src/examples/list-with-detail-registered.ts +26 -26
  59. package/src/examples/list-with-detail.ts +82 -82
  60. package/src/examples/nestedArrays.ts +40 -35
  61. package/src/examples/nestedCategorization.ts +175 -0
  62. package/src/examples/numbers.ts +17 -17
  63. package/src/examples/object.ts +24 -24
  64. package/src/examples/onChange.ts +28 -22
  65. package/src/examples/oneOf-recursive.ts +15 -15
  66. package/src/examples/oneOf.ts +99 -96
  67. package/src/examples/oneOfArray.ts +20 -20
  68. package/src/examples/person.ts +35 -35
  69. package/src/examples/radioGroup.ts +52 -53
  70. package/src/examples/readonly.ts +14 -14
  71. package/src/examples/rule.ts +26 -26
  72. package/src/examples/ruleInheritance.ts +37 -34
  73. package/src/examples/scope.ts +26 -26
  74. package/src/examples/stringArray.ts +10 -10
  75. package/src/examples/text.ts +19 -19
  76. package/src/index.ts +11 -33
  77. package/src/register.ts +6 -3
  78. package/stats.html +2462 -329
  79. package/tsconfig.json +2 -6
  80. package/lib/examples/1169.d.ts +0 -24
  81. package/lib/examples/1220.d.ts +0 -4
  82. package/lib/examples/1253.d.ts +0 -16
  83. package/lib/examples/1254.d.ts +0 -21
  84. package/lib/examples/1645.d.ts +0 -68
  85. package/lib/examples/1779.d.ts +0 -1
  86. package/lib/examples/1996.d.ts +0 -31
  87. package/lib/examples/booleanToggle.d.ts +0 -62
  88. package/lib/examples/day1.d.ts +0 -23
  89. package/lib/examples/day2.d.ts +0 -42
  90. package/lib/examples/day3.d.ts +0 -51
  91. package/lib/examples/day4.d.ts +0 -72
  92. package/lib/examples/day5.d.ts +0 -133
  93. package/lib/examples/day6.d.ts +0 -85
  94. package/lib/examples/dynamic.d.ts +0 -1
  95. package/src/examples/1169.ts +0 -62
  96. package/src/examples/1220.ts +0 -146
  97. package/src/examples/1253.ts +0 -212
  98. package/src/examples/1254.ts +0 -67
  99. package/src/examples/1645.ts +0 -66
  100. package/src/examples/1779.ts +0 -83
  101. package/src/examples/1996.ts +0 -102
  102. package/src/examples/day1.ts +0 -61
  103. package/src/examples/day2.ts +0 -62
  104. package/src/examples/day3.ts +0 -76
  105. package/src/examples/day4.ts +0 -83
  106. package/src/examples/day5.ts +0 -169
  107. package/src/examples/day6.ts +0 -44
  108. /package/lib/examples/{steppershownav.d.ts → categorization-stepper-nav-buttons.d.ts} +0 -0
  109. /package/lib/examples/{stepper.d.ts → categorization-stepper.d.ts} +0 -0
  110. /package/lib/examples/{multi-enum.d.ts → enum-multi.d.ts} +0 -0
@@ -29,29 +29,32 @@ export const schema = {
29
29
  properties: {
30
30
  plainEnum: {
31
31
  type: 'string',
32
- enum: ['foo', 'bar']
32
+ enum: ['foo', 'bar'],
33
33
  },
34
34
  plainEnumSet: {
35
35
  type: 'string',
36
- enum: ['foo', 'bar']
36
+ enum: ['foo', 'bar'],
37
37
  },
38
38
  oneOfEnum: {
39
- type: 'string',
40
- oneOf: [
41
- {const: 'foo', title: 'Foo'},
42
- {const: 'bar', title: 'Bar'},
43
- {const: 'foobar', title: 'FooBar'}
44
- ]
39
+ type: 'string',
40
+ oneOf: [
41
+ { const: 'foo', title: 'Foo' },
42
+ { const: 'bar', title: 'Bar' },
43
+ { const: 'foobar', title: 'FooBar' },
44
+ ],
45
45
  },
46
46
  oneOfEnumSet: {
47
47
  type: 'string',
48
48
  oneOf: [
49
- {const: 'foo', title: 'Foo'},
50
- {const: 'bar', title: 'Bar'},
51
- {const: 'foobar', title: 'FooBar'}
52
- ]
53
- }
54
- }
49
+ { const: 'foo', title: 'Foo' },
50
+ { const: 'bar', title: 'Bar' },
51
+ { const: 'foobar', title: 'FooBar' },
52
+ ],
53
+ },
54
+ constEnum: {
55
+ const: 'Const Value',
56
+ },
57
+ },
55
58
  };
56
59
 
57
60
  export const uischema = {
@@ -63,27 +66,31 @@ export const uischema = {
63
66
  elements: [
64
67
  {
65
68
  type: 'Control',
66
- scope: '#/properties/plainEnum'
69
+ scope: '#/properties/constEnum',
70
+ },
71
+ {
72
+ type: 'Control',
73
+ scope: '#/properties/plainEnum',
67
74
  },
68
75
  {
69
76
  type: 'Control',
70
- scope: '#/properties/plainEnumSet'
77
+ scope: '#/properties/plainEnumSet',
71
78
  },
72
79
  {
73
80
  type: 'Control',
74
81
  scope: '#/properties/plainEnum',
75
82
  options: {
76
- autocomplete: false
77
- }
83
+ autocomplete: false,
84
+ },
78
85
  },
79
86
  {
80
87
  type: 'Control',
81
88
  scope: '#/properties/plainEnumSet',
82
89
  options: {
83
- autocomplete: false
84
- }
90
+ autocomplete: false,
91
+ },
85
92
  },
86
- ]
93
+ ],
87
94
  },
88
95
  {
89
96
  type: 'Group',
@@ -91,32 +98,32 @@ export const uischema = {
91
98
  elements: [
92
99
  {
93
100
  type: 'Control',
94
- scope: '#/properties/oneOfEnum'
101
+ scope: '#/properties/oneOfEnum',
95
102
  },
96
103
  {
97
104
  type: 'Control',
98
- scope: '#/properties/oneOfEnumSet'
105
+ scope: '#/properties/oneOfEnumSet',
99
106
  },
100
107
  {
101
108
  type: 'Control',
102
109
  scope: '#/properties/oneOfEnum',
103
110
  options: {
104
- autocomplete: false
105
- }
111
+ autocomplete: false,
112
+ },
106
113
  },
107
114
  {
108
115
  type: 'Control',
109
116
  scope: '#/properties/oneOfEnumSet',
110
117
  options: {
111
- autocomplete: false
112
- }
118
+ autocomplete: false,
119
+ },
113
120
  },
114
- ]
115
- }
116
- ]
121
+ ],
122
+ },
123
+ ],
117
124
  };
118
125
 
119
- export const data = {plainEnumSet: 'foo', oneOfEnumSet: 'bar'};
126
+ export const data = { plainEnumSet: 'foo', oneOfEnumSet: 'bar' };
120
127
 
121
128
  registerExamples([
122
129
  {
@@ -124,6 +131,6 @@ registerExamples([
124
131
  label: 'Enums',
125
132
  data,
126
133
  schema,
127
- uischema
128
- }
134
+ uischema,
135
+ },
129
136
  ]);
@@ -7,18 +7,18 @@ export const schema = {
7
7
  properties: {
8
8
  plainEnum: {
9
9
  type: 'string',
10
- enum: ['foo', 'bar']
10
+ enum: ['foo', 'bar'],
11
11
  },
12
12
  oneOfEnum: {
13
13
  type: 'string',
14
14
  oneOf: [
15
15
  { const: 'foo', title: 'Foo' },
16
16
  { const: 'bar', title: 'Bar' },
17
- { const: 'foobar', title: 'FooBar' }
18
- ]
17
+ { const: 'foobar', title: 'FooBar' },
18
+ ],
19
19
  },
20
- }
21
- }
20
+ },
21
+ },
22
22
  };
23
23
 
24
24
  export const uischema = {
@@ -26,9 +26,9 @@ export const uischema = {
26
26
  elements: [
27
27
  {
28
28
  type: 'Control',
29
- scope: '#'
30
- }
31
- ]
29
+ scope: '#',
30
+ },
31
+ ],
32
32
  };
33
33
 
34
34
  export const data: any[] = [];
@@ -39,6 +39,6 @@ registerExamples([
39
39
  label: 'Array containing enums',
40
40
  data,
41
41
  schema,
42
- uischema
43
- }
42
+ uischema,
43
+ },
44
44
  ]);
@@ -25,25 +25,25 @@
25
25
  import { StateProps } from '../example';
26
26
  import { registerExamples } from '../register';
27
27
 
28
- const actions = [
28
+ export const actions = [
29
29
  {
30
- 'label': 'Change data',
31
- 'apply': (props: StateProps) => {
30
+ label: 'Change data',
31
+ apply: (props: StateProps) => {
32
32
  return {
33
33
  ...props,
34
- data: { id: 'aaa' }
35
- }
36
- }
34
+ data: { id: 'aaa' },
35
+ };
36
+ },
37
37
  },
38
- ]
38
+ ];
39
39
 
40
40
  registerExamples([
41
41
  {
42
42
  name: 'dynamic',
43
- label: 'Dynamic Change',
43
+ label: 'Generate both schemas - Dynamic data change',
44
44
  schema: undefined,
45
45
  uischema: undefined,
46
46
  data: { name: 'bla' },
47
- actions
48
- }
47
+ actions,
48
+ },
49
49
  ]);
@@ -36,6 +36,6 @@ registerExamples([
36
36
  label: 'Generate both Schemas',
37
37
  data,
38
38
  schema,
39
- uischema
40
- }
39
+ uischema,
40
+ },
41
41
  ]);
@@ -36,6 +36,6 @@ registerExamples([
36
36
  label: 'Generate UI Schema',
37
37
  data,
38
38
  schema,
39
- uischema
40
- }
39
+ uischema,
40
+ },
41
41
  ]);