|
1 | 1 | {
|
2 |
| - "schema": { |
| 2 | + "schema": { |
| 3 | + "type": "object", |
| 4 | + "required": [ |
| 5 | + "name", |
| 6 | + "shoesize" |
| 7 | + ], |
| 8 | + "properties": { |
| 9 | + "name": { |
| 10 | + "title": "Name", |
| 11 | + "description": "Gimme yea name lad", |
| 12 | + "type": "string", |
| 13 | + "pattern": "^[^/]*$", |
| 14 | + "minLength": 2 |
| 15 | + }, |
| 16 | + "favorite": { |
| 17 | + "title": "Favorite", |
| 18 | + "type": "string", |
| 19 | + "enum": [ |
| 20 | + "undefined", |
| 21 | + "null", |
| 22 | + "NaN" |
| 23 | + ] |
| 24 | + }, |
| 25 | + "shoesize": { |
| 26 | + "title": "Shoe size", |
| 27 | + "default": 42, |
| 28 | + "type": "number" |
| 29 | + }, |
| 30 | + "attributes": { |
3 | 31 | "type": "object",
|
| 32 | + "title": "Attributes", |
4 | 33 | "required": [
|
5 |
| - "name", |
6 |
| - "shoesize" |
| 34 | + "eyecolor" |
7 | 35 | ],
|
8 | 36 | "properties": {
|
9 |
| - "name": { |
10 |
| - "title": "Name", |
11 |
| - "description": "Gimme yea name lad", |
| 37 | + "eyecolor": { |
| 38 | + "type": "string", |
| 39 | + "title": "Eye color" |
| 40 | + }, |
| 41 | + "haircolor": { |
| 42 | + "type": "string", |
| 43 | + "title": "Hair color" |
| 44 | + }, |
| 45 | + "shoulders": { |
| 46 | + "type": "object", |
| 47 | + "title": "Shoulders", |
| 48 | + "properties": { |
| 49 | + "left": { |
12 | 50 | "type": "string",
|
13 |
| - "pattern": "^[^/]*$", |
14 |
| - "minLength": 2 |
15 |
| - }, |
16 |
| - "favorite": { |
17 |
| - "title": "Favorite", |
18 |
| - "type": "string", |
19 |
| - "enum": [ |
20 |
| - "undefined", |
21 |
| - "null", |
22 |
| - "NaN" |
23 |
| - ] |
24 |
| - }, |
25 |
| - "shoesize": { |
26 |
| - "title": "Shoe size", |
27 |
| - "default": 42, |
28 |
| - "type": "number" |
29 |
| - }, |
30 |
| - "attributes": { |
31 |
| - "type": "object", |
32 |
| - "title": "Attributes", |
33 |
| - "required": [ |
34 |
| - "eyecolor" |
35 |
| - ], |
36 |
| - "properties": { |
37 |
| - "eyecolor": { |
38 |
| - "type": "string", |
39 |
| - "title": "Eye color" |
40 |
| - }, |
41 |
| - "haircolor": { |
42 |
| - "type": "string", |
43 |
| - "title": "Hair color" |
44 |
| - }, |
45 |
| - "shoulders": { |
46 |
| - "type": "object", |
47 |
| - "title": "Shoulders", |
48 |
| - "properties": { |
49 |
| - "left": { |
50 |
| - "type": "string", |
51 |
| - "title": "Left" |
52 |
| - }, |
53 |
| - "right": { |
54 |
| - "type": "string", |
55 |
| - "title": "Right" |
56 |
| - } |
57 |
| - } |
58 |
| - } |
59 |
| - } |
60 |
| - }, |
61 |
| - "things": { |
62 |
| - "type": "array", |
63 |
| - "title": "I like...", |
64 |
| - "items": { |
65 |
| - "type": "string", |
66 |
| - "enum": [ |
67 |
| - "clowns", |
68 |
| - "compiling", |
69 |
| - "sleeping" |
70 |
| - ] |
71 |
| - } |
72 |
| - }, |
73 |
| - "dislike": { |
74 |
| - "type": "array", |
75 |
| - "title": "I dislike...", |
76 |
| - "items": { |
77 |
| - "type": "string", |
78 |
| - "title": "I hate" |
79 |
| - } |
80 |
| - }, |
81 |
| - "soul": { |
82 |
| - "title": "Terms Of Service", |
83 |
| - "description": "I agree to sell my undying <a href='https://www.youtube.com/watch?v=dQw4w9WgXcQ'>soul</a>", |
84 |
| - "type": "boolean", |
85 |
| - "default": true |
86 |
| - }, |
87 |
| - "soulserial": { |
88 |
| - "title": "Soul Serial No", |
89 |
| - "type": "string" |
90 |
| - }, |
91 |
| - "date": { |
92 |
| - "title": "Date of party", |
| 51 | + "title": "Left" |
| 52 | + }, |
| 53 | + "right": { |
93 | 54 | "type": "string",
|
94 |
| - "format": "date" |
95 |
| - }, |
96 |
| - "radio": { |
97 |
| - "type": "string", |
98 |
| - "enum": [ |
99 |
| - "Transistor", |
100 |
| - "Tube" |
101 |
| - ] |
102 |
| - }, |
103 |
| - "radiobuttons": { |
104 |
| - "type": "string", |
105 |
| - "enum": [ |
106 |
| - "Select me!", |
107 |
| - "No me!" |
108 |
| - ] |
| 55 | + "title": "Right" |
| 56 | + } |
109 | 57 | }
|
| 58 | + } |
110 | 59 | }
|
111 |
| - }, |
112 |
| - |
113 |
| - |
114 |
| - |
115 |
| - |
116 |
| - |
117 |
| - "form": [ |
| 60 | + }, |
| 61 | + "things": { |
| 62 | + "type": "array", |
| 63 | + "title": "I like...", |
| 64 | + "items": { |
| 65 | + "type": "string", |
| 66 | + "enum": [ |
| 67 | + "clowns", |
| 68 | + "compiling", |
| 69 | + "sleeping" |
| 70 | + ] |
| 71 | + } |
| 72 | + }, |
| 73 | + "dislike": { |
| 74 | + "type": "array", |
| 75 | + "title": "I dislike...", |
| 76 | + "items": { |
| 77 | + "type": "string", |
| 78 | + "title": "I hate" |
| 79 | + } |
| 80 | + }, |
| 81 | + "soul": { |
| 82 | + "title": "Terms Of Service", |
| 83 | + "description": "I agree to sell my undying <a href='https://www.youtube.com/watch?v=dQw4w9WgXcQ'>soul</a>", |
| 84 | + "type": "boolean", |
| 85 | + "default": true |
| 86 | + }, |
| 87 | + "soulserial": { |
| 88 | + "title": "Soul Serial No", |
| 89 | + "type": "string" |
| 90 | + }, |
| 91 | + "date": { |
| 92 | + "title": "Date of party", |
| 93 | + "type": "string", |
| 94 | + "format": "date" |
| 95 | + }, |
| 96 | + "radio": { |
| 97 | + "title": "Radio type", |
| 98 | + "type": "string", |
| 99 | + "enum": [ |
| 100 | + "Transistor", |
| 101 | + "Tube" |
| 102 | + ] |
| 103 | + }, |
| 104 | + "radiobuttons": { |
| 105 | + "type": "string", |
| 106 | + "enum": [ |
| 107 | + "Select me!", |
| 108 | + "No me!" |
| 109 | + ] |
| 110 | + } |
| 111 | + } |
| 112 | + }, |
| 113 | + "form": [ |
| 114 | + { |
| 115 | + "type": "fieldset", |
| 116 | + "title": "Stuff", |
| 117 | + "items": [ |
118 | 118 | {
|
119 |
| - "type": "fieldset", |
120 |
| - "title": "Stuff", |
121 |
| - "items": [ |
| 119 | + "type": "tabs", |
| 120 | + "tabs": [ |
| 121 | + { |
| 122 | + "title": "Simple stuff", |
| 123 | + "items": [ |
122 | 124 | {
|
123 |
| - "type": "tabs", |
124 |
| - "tabs": [ |
125 |
| - { |
126 |
| - "title": "Simple stuff", |
127 |
| - "items": [ |
128 |
| - { |
129 |
| - "key": "name", |
130 |
| - "placeholder": "Check the console", |
131 |
| - "onChange": "log(modelValue)", |
132 |
| - "feedback": "{'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-star': !hasSuccess() }" |
133 |
| - }, |
134 |
| - { |
135 |
| - "key": "favorite", |
136 |
| - "feedback": false |
137 |
| - } |
138 |
| - ] |
139 |
| - }, |
140 |
| - { |
141 |
| - "title": "More stuff", |
142 |
| - "items": [ |
143 |
| - "attributes", |
144 |
| - { |
145 |
| - "key": "shoesize", |
146 |
| - "feedback": false |
147 |
| - }, |
148 |
| - "things", |
149 |
| - "dislike" |
150 |
| - ] |
151 |
| - } |
152 |
| - ] |
153 |
| - } |
154 |
| - ] |
155 |
| - }, |
156 |
| - { |
157 |
| - "type": "help", |
158 |
| - "helpvalue": "<hr>" |
159 |
| - }, |
160 |
| - "soul", |
161 |
| - { |
162 |
| - "type": "conditional", |
163 |
| - "condition": "modelData.soul", |
164 |
| - "items": [ |
| 125 | + "key": "name", |
| 126 | + "placeholder": "Check the console", |
| 127 | + "onChange": "log(modelValue)", |
| 128 | + "feedback": "{'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-star': !hasSuccess() }" |
| 129 | + }, |
165 | 130 | {
|
166 |
| - "key": "soulserial", |
167 |
| - "placeholder": "ex. 666" |
| 131 | + "key": "favorite", |
| 132 | + "feedback": false |
168 | 133 | }
|
169 |
| - ] |
170 |
| - }, |
| 134 | + ] |
| 135 | + }, |
| 136 | + { |
| 137 | + "title": "More stuff", |
| 138 | + "items": [ |
| 139 | + "attributes", |
| 140 | + { |
| 141 | + "key": "shoesize", |
| 142 | + "feedback": false |
| 143 | + }, |
| 144 | + "things", |
| 145 | + "dislike" |
| 146 | + ] |
| 147 | + } |
| 148 | + ] |
| 149 | + } |
| 150 | + ] |
| 151 | + }, |
| 152 | + { |
| 153 | + "type": "help", |
| 154 | + "helpvalue": "<hr>" |
| 155 | + }, |
| 156 | + "soul", |
| 157 | + { |
| 158 | + "type": "conditional", |
| 159 | + "condition": "modelData.soul", |
| 160 | + "items": [ |
171 | 161 | {
|
172 |
| - "key": "date", |
173 |
| - "minDate": "2014-06-20" |
174 |
| - }, |
| 162 | + "key": "soulserial", |
| 163 | + "placeholder": "ex. 666" |
| 164 | + } |
| 165 | + ] |
| 166 | + }, |
| 167 | + { |
| 168 | + "key": "date", |
| 169 | + "minDate": "2014-06-20" |
| 170 | + }, |
| 171 | + { |
| 172 | + "key": "radio", |
| 173 | + "type": "radios", |
| 174 | + "titleMap": [ |
175 | 175 | {
|
176 |
| - "key": "radio", |
177 |
| - "type": "radios", |
178 |
| - "titleMap": [ |
179 |
| - { "value": "Transistor", "name": "Transistor <br> Not the tube kind." }, |
180 |
| - { "value": "Tube", "name": "Tube <br> The tube kind."} |
181 |
| - ] |
| 176 | + "value": "Transistor", |
| 177 | + "name": "Transistor <br> Not the tube kind." |
182 | 178 | },
|
183 | 179 | {
|
184 |
| - "key": "radiobuttons", |
185 |
| - "style": { |
186 |
| - "selected": "btn-success", |
187 |
| - "unselected": "btn-default" |
188 |
| - }, |
189 |
| - "type": "radiobuttons" |
| 180 | + "value": "Tube", |
| 181 | + "name": "Tube <br> The tube kind." |
| 182 | + } |
| 183 | + ] |
| 184 | + }, |
| 185 | + { |
| 186 | + "key": "radiobuttons", |
| 187 | + "style": { |
| 188 | + "selected": "btn-success", |
| 189 | + "unselected": "btn-default" |
| 190 | + }, |
| 191 | + "type": "radiobuttons", |
| 192 | + "notitle": true |
| 193 | + }, |
| 194 | + { |
| 195 | + "type": "actions", |
| 196 | + "items": [ |
| 197 | + { |
| 198 | + "type": "submit", |
| 199 | + "style": "btn-info", |
| 200 | + "title": "Do It!" |
190 | 201 | },
|
191 | 202 | {
|
192 |
| - "type": "actions", |
193 |
| - "items": [ |
194 |
| - { |
195 |
| - "type": "submit", |
196 |
| - "style": "btn-info", |
197 |
| - "title": "Do It!" |
198 |
| - }, |
199 |
| - { |
200 |
| - "type": "button", |
201 |
| - "style": "btn-danger", |
202 |
| - "title": "Noooooooooooo", |
203 |
| - "onClick": "sayNo()" |
204 |
| - } |
205 |
| - ] |
| 203 | + "type": "button", |
| 204 | + "style": "btn-danger", |
| 205 | + "title": "Noooooooooooo", |
| 206 | + "onClick": "sayNo()" |
206 | 207 | }
|
207 |
| - ] |
| 208 | + ] |
| 209 | + } |
| 210 | + ] |
208 | 211 | }
|
0 commit comments