@earthranger/react-native-jsonforms-formatter 0.1.0

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.
@@ -0,0 +1,250 @@
1
+ {
2
+ "auto-generate": true,
3
+ "description": "This schema will be used for regression testing in the mobile app",
4
+ "schema": {
5
+ "$schema": "http://json-schema.org/draft-04/schema#",
6
+ "title": "Schema All Types - Non required",
7
+ "type": "object",
8
+ "required": [
9
+ "string",
10
+ "number_no_min_max",
11
+ "number_with_min",
12
+ "number_with_max",
13
+ "number_with_min_and_max",
14
+ "paragraph",
15
+ "checkbox_static_choice",
16
+ "checkbox_query",
17
+ "calendar",
18
+ "calendar_clock",
19
+ "single_select",
20
+ "single_select_choices",
21
+ "collection"
22
+ ],
23
+ "properties": {
24
+ "string": {
25
+ "type": "string",
26
+ "title": "I'm a string"
27
+ },
28
+ "number_no_min_max": {
29
+ "type": "number",
30
+ "title": "I'm a number without min-max"
31
+ },
32
+ "number_with_min": {
33
+ "type": "number",
34
+ "title": "I'm a number with a min (10)",
35
+ "minimum": 10
36
+ },
37
+ "number_with_max": {
38
+ "type": "number",
39
+ "title": "I'm a number with a max (100)",
40
+ "maximum": 100
41
+ },
42
+ "number_with_min_and_max": {
43
+ "type": "number",
44
+ "title": "I'm a number with a min (80) and max (1000)",
45
+ "minimum": 80,
46
+ "maximum": 1000
47
+ },
48
+ "paragraph": {
49
+ "type": "string",
50
+ "title": "I'm a text area"
51
+ },
52
+ "checkbox_static_choice": {
53
+ "type": "checkboxes",
54
+ "title": "I'm a checkbox with static choices"
55
+ },
56
+ "checkbox_query": {
57
+ "title": "I'm a checkbox with query",
58
+ "type": "checkboxes"
59
+ },
60
+ "calendar_clock": {
61
+ "type": "string",
62
+ "htmlClass": "col-lg-6",
63
+ "readonly": false,
64
+ "title": "I'm a calendar with clock"
65
+ },
66
+ "calendar": {
67
+ "type": "string",
68
+ "title": "I'm a calendar",
69
+ "format": "date"
70
+ },
71
+ "single_select": {
72
+ "type": "string",
73
+ "title": "I'm a single select query",
74
+ "enum": [
75
+ "new",
76
+ "impeded",
77
+ "old"
78
+ ],
79
+ "enumNames": {
80
+ "new": "New/Fresh",
81
+ "impeded": "Impeded",
82
+ "old": "Old"
83
+ }
84
+ },
85
+ "single_select_choices": {
86
+ "type": "string",
87
+ "title": "I'm a single select choices",
88
+ "enum": [
89
+ "Option 1",
90
+ "Option 2",
91
+ "Option 3"
92
+ ]
93
+ },
94
+ "collection": {
95
+ "type": "array",
96
+ "title": "I'm a collection",
97
+ "items": {
98
+ "type": "object",
99
+ "title": "String inside a collection",
100
+ "properties": {
101
+ "ItemConfiscated": {
102
+ "type": "string",
103
+ "title": "Item Type",
104
+ "enum": [
105
+ "trophies",
106
+ "weapons",
107
+ "bushmeat",
108
+ "other"
109
+ ],
110
+ "enumNames": {
111
+ "trophies": "Trophies",
112
+ "weapons": "Weapons",
113
+ "bushmeat": "Bush Beat",
114
+ "other": "Other"
115
+ }
116
+ },
117
+ "ItemNumber": {
118
+ "type": "number",
119
+ "title": "Number of Items",
120
+ "minimum": 0
121
+ }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "id": "https://develop.pamdas.org/api/v1.0/activity/events/schema/eventtype/all_types_required_point",
127
+ "icon_id": "hippo_rep",
128
+ "image_url": "https://develop.pamdas.org/static/sprite-src/hippo_rep.svg"
129
+ },
130
+ "definition": [
131
+ "string",
132
+ {
133
+ "key": "paragraph",
134
+ "type": "textarea"
135
+ },
136
+ "number_no_min_max",
137
+ "number_with_min",
138
+ "number_with_max",
139
+ "number_with_min_and_max",
140
+ "single_select",
141
+ "single_select_choices",
142
+ {
143
+ "helpvalue": "<h2>Collection header</h2>",
144
+ "type": "help"
145
+ },
146
+ {
147
+ "key": "collection",
148
+ "add": "New",
149
+ "style": {
150
+ "add": "btn-success"
151
+ }
152
+ },
153
+ {
154
+ "key": "calendar_clock",
155
+ "type": "datetime"
156
+ },
157
+ {
158
+ "key": "calendar",
159
+ "type": "",
160
+ "fieldHtmlClass": "date-picker json-schema",
161
+ "readonly": false
162
+ },
163
+ {
164
+ "key": "checkbox_static_choice",
165
+ "type": "checkboxes",
166
+ "titleMap": [
167
+ {
168
+ "value": "coffee",
169
+ "name": "Coffee"
170
+ },
171
+ {
172
+ "value": "water",
173
+ "name": "Water"
174
+ },
175
+ {
176
+ "value": "juice",
177
+ "name": "Juice"
178
+ },
179
+ {
180
+ "value": "beer",
181
+ "name": "Beer"
182
+ },
183
+ {
184
+ "value": "flavor_water",
185
+ "name": "Flavor Water"
186
+ },
187
+ {
188
+ "value": "milk",
189
+ "name": "Milk"
190
+ },
191
+ {
192
+ "value": "mix_drink",
193
+ "name": "Mixed Drink"
194
+ },
195
+ {
196
+ "value": "other",
197
+ "name": "Other"
198
+ },
199
+ {
200
+ "value": "rompope",
201
+ "name": "Rompope"
202
+ },
203
+ {
204
+ "value": "ron",
205
+ "name": "Ron"
206
+ },
207
+ {
208
+ "value": "rum",
209
+ "name": "Rum"
210
+ },
211
+ {
212
+ "value": "soda",
213
+ "name": "Soda"
214
+ },
215
+ {
216
+ "value": "spark_water",
217
+ "name": "Spark Water"
218
+ },
219
+ {
220
+ "value": "tequila",
221
+ "name": "Tequila"
222
+ },
223
+ {
224
+ "value": "whisky",
225
+ "name": "Whisky"
226
+ }
227
+ ],
228
+ "htmlClass": "json-schema-checkbox-wrapper"
229
+ },
230
+ {
231
+ "htmlClass": "json-schema-checkbox-wrapper",
232
+ "key": "checkbox_query",
233
+ "titleMap": [
234
+ {
235
+ "name": "Rhino",
236
+ "value": "rhino_value"
237
+ },
238
+ {
239
+ "name": "Black Rhino",
240
+ "value": "blackrhino_value"
241
+ },
242
+ {
243
+ "name": "White Rhino",
244
+ "value": "whiterhino"
245
+ }
246
+ ],
247
+ "type": "checkboxes"
248
+ }
249
+ ]
250
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "type": "Category",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/string",
7
+ "label": "I'm a string",
8
+ "options": {}
9
+ },
10
+ {
11
+ "type": "Control",
12
+ "scope": "#/properties/paragraph",
13
+ "label": "I'm a text area",
14
+ "options": {}
15
+ },
16
+ {
17
+ "type": "Control",
18
+ "scope": "#/properties/number_no_min_max",
19
+ "label": "I'm a number without min-max",
20
+ "options": {}
21
+ },
22
+ {
23
+ "type": "Control",
24
+ "scope": "#/properties/number_with_min",
25
+ "label": "I'm a number with a min (10)",
26
+ "options": {}
27
+ },
28
+ {
29
+ "type": "Control",
30
+ "scope": "#/properties/number_with_max",
31
+ "label": "I'm a number with a max (100)",
32
+ "options": {}
33
+ },
34
+ {
35
+ "type": "Control",
36
+ "scope": "#/properties/number_with_min_and_max",
37
+ "label": "I'm a number with a min (80) and max (1000)",
38
+ "options": {}
39
+ },
40
+ {
41
+ "type": "Control",
42
+ "scope": "#/properties/single_select",
43
+ "label": "I'm a single select query",
44
+ "options": {}
45
+ },
46
+ {
47
+ "type": "Control",
48
+ "scope": "#/properties/single_select_choices",
49
+ "label": "I'm a single select choices",
50
+ "options": {}
51
+ },
52
+ {
53
+ "type": "Control",
54
+ "scope": "#/properties/help_value_0",
55
+ "label": "Collection header",
56
+ "options": {
57
+ "format": "form-label"
58
+ }
59
+ },
60
+ {
61
+ "type": "Control",
62
+ "scope": "#/properties/collection",
63
+ "label": "I'm a collection",
64
+ "options": {
65
+ "format": "repeatable-field"
66
+ }
67
+ },
68
+ {
69
+ "type": "Control",
70
+ "scope": "#/properties/calendar_clock",
71
+ "label": "I'm a calendar with clock",
72
+ "options": {
73
+ "format": "date-time",
74
+ "display": "date-time"
75
+ }
76
+ },
77
+ {
78
+ "type": "Control",
79
+ "scope": "#/properties/calendar",
80
+ "label": "I'm a calendar",
81
+ "options": {
82
+ "format": "date-time",
83
+ "display": "date"
84
+ }
85
+ },
86
+ {
87
+ "type": "Control",
88
+ "scope": "#/properties/checkbox_static_choice",
89
+ "label": "I'm a checkbox with static choices",
90
+ "options": {
91
+ "format": "multiselect"
92
+ }
93
+ },
94
+ {
95
+ "type": "Control",
96
+ "scope": "#/properties/checkbox_query",
97
+ "label": "I'm a checkbox with query",
98
+ "options": {
99
+ "format": "multiselect"
100
+ }
101
+ }
102
+ ]
103
+ }
@@ -0,0 +1,297 @@
1
+ {
2
+ "type": "Category",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/fieldset__title_trail_information_location",
7
+ "label": "Trail Information_Location",
8
+ "options": {
9
+ "format": "form-label"
10
+ }
11
+ },
12
+ {
13
+ "type": "Control",
14
+ "scope": "#/properties/trail_number",
15
+ "label": "Trail Number",
16
+ "options": {}
17
+ },
18
+ {
19
+ "type": "Control",
20
+ "scope": "#/properties/trail_name",
21
+ "label": "Trail Name",
22
+ "options": {}
23
+ },
24
+ {
25
+ "type": "Control",
26
+ "scope": "#/properties/trail_class",
27
+ "label": "Trail Class",
28
+ "options": {}
29
+ },
30
+ {
31
+ "type": "Control",
32
+ "scope": "#/properties/trail_assessor",
33
+ "label": "Assessor",
34
+ "options": {}
35
+ },
36
+ {
37
+ "type": "Control",
38
+ "scope": "#/properties/general_info",
39
+ "label": "General Information",
40
+ "options": {}
41
+ },
42
+ {
43
+ "type": "Control",
44
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_trailhead(s)",
45
+ "label": "Identified Problems to be Addressed: TRAILHEAD(S)",
46
+ "options": {
47
+ "format": "form-label"
48
+ }
49
+ },
50
+ {
51
+ "type": "Control",
52
+ "scope": "#/properties/access_roads",
53
+ "label": "1. Access Roads",
54
+ "options": {
55
+ "format": "repeatable-field"
56
+ }
57
+ },
58
+ {
59
+ "type": "Control",
60
+ "scope": "#/properties/parking_lot",
61
+ "label": "2. Parking Lot",
62
+ "options": {
63
+ "format": "repeatable-field"
64
+ }
65
+ },
66
+ {
67
+ "type": "Control",
68
+ "scope": "#/properties/fences",
69
+ "label": "3. Fences",
70
+ "options": {
71
+ "format": "repeatable-field"
72
+ }
73
+ },
74
+ {
75
+ "type": "Control",
76
+ "scope": "#/properties/bulletin_board_sign",
77
+ "label": "4. Bulletin board/Information Sign(s)",
78
+ "options": {
79
+ "format": "repeatable-field"
80
+ }
81
+ },
82
+ {
83
+ "type": "Control",
84
+ "scope": "#/properties/benches",
85
+ "label": "5. Benches",
86
+ "options": {
87
+ "format": "repeatable-field"
88
+ }
89
+ },
90
+ {
91
+ "type": "Control",
92
+ "scope": "#/properties/picnic_tables",
93
+ "label": "6. Picnic Tables",
94
+ "options": {
95
+ "format": "repeatable-field"
96
+ }
97
+ },
98
+ {
99
+ "type": "Control",
100
+ "scope": "#/properties/trash",
101
+ "label": "7. Trash Cans/Screened Sheds",
102
+ "options": {
103
+ "format": "repeatable-field"
104
+ }
105
+ },
106
+ {
107
+ "type": "Control",
108
+ "scope": "#/properties/restrooms",
109
+ "label": "8. Restrooms/Portable toilets",
110
+ "options": {
111
+ "format": "repeatable-field"
112
+ }
113
+ },
114
+ {
115
+ "type": "Control",
116
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_signs_and_wayside_exhibits",
117
+ "label": "Identified Problems to be Addressed: SIGNS AND WAYSIDE EXHIBITS",
118
+ "options": {
119
+ "format": "form-label"
120
+ }
121
+ },
122
+ {
123
+ "type": "Control",
124
+ "scope": "#/properties/signs_waypoints",
125
+ "label": "1. Signs/Wayside Exhibits",
126
+ "options": {
127
+ "format": "repeatable-field"
128
+ }
129
+ },
130
+ {
131
+ "type": "Control",
132
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_litter",
133
+ "label": "Identified Problems to be Addressed: LITTER",
134
+ "options": {
135
+ "format": "form-label"
136
+ }
137
+ },
138
+ {
139
+ "type": "Control",
140
+ "scope": "#/properties/litter",
141
+ "label": "1. Litter",
142
+ "options": {
143
+ "format": "repeatable-field"
144
+ }
145
+ },
146
+ {
147
+ "type": "Control",
148
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_structures",
149
+ "label": "Identified Problems to be Addressed: STRUCTURES",
150
+ "options": {
151
+ "format": "form-label"
152
+ }
153
+ },
154
+ {
155
+ "type": "Control",
156
+ "scope": "#/properties/structures",
157
+ "label": "1. Structures",
158
+ "options": {
159
+ "format": "repeatable-field"
160
+ }
161
+ },
162
+ {
163
+ "type": "Control",
164
+ "scope": "#/properties/bridges",
165
+ "label": "2. Bridges",
166
+ "options": {
167
+ "format": "repeatable-field"
168
+ }
169
+ },
170
+ {
171
+ "type": "Control",
172
+ "scope": "#/properties/boardwalks",
173
+ "label": "3. Boardwalks",
174
+ "options": {
175
+ "format": "repeatable-field"
176
+ }
177
+ },
178
+ {
179
+ "type": "Control",
180
+ "scope": "#/properties/turnpikes",
181
+ "label": "4. Turnpikes (Raised trail-bed with supported edges)",
182
+ "options": {
183
+ "format": "repeatable-field"
184
+ }
185
+ },
186
+ {
187
+ "type": "Control",
188
+ "scope": "#/properties/steps",
189
+ "label": "5. Steps",
190
+ "options": {
191
+ "format": "repeatable-field"
192
+ }
193
+ },
194
+ {
195
+ "type": "Control",
196
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_trail_surface_tread",
197
+ "label": "Identified Problems to be Addressed: TRAIL SURFACE/TREAD",
198
+ "options": {
199
+ "format": "form-label"
200
+ }
201
+ },
202
+ {
203
+ "type": "Control",
204
+ "scope": "#/properties/surface",
205
+ "label": "6. Trail Surface/Tread",
206
+ "options": {
207
+ "format": "repeatable-field"
208
+ }
209
+ },
210
+ {
211
+ "type": "Control",
212
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_corridor_clearance",
213
+ "label": "Identified Problems to be Addressed: CORRIDOR CLEARANCE",
214
+ "options": {
215
+ "format": "form-label"
216
+ }
217
+ },
218
+ {
219
+ "type": "Control",
220
+ "scope": "#/properties/corridor_clearance",
221
+ "label": "1. Corridor Clearance (note: Height & Width Min Standards: 2.5m high x 1.5m)",
222
+ "options": {
223
+ "format": "repeatable-field"
224
+ }
225
+ },
226
+ {
227
+ "type": "Control",
228
+ "scope": "#/properties/fieldset__title_identified_problems_to_be_addressed:_drainage",
229
+ "label": "Identified Problems to be Addressed: DRAINAGE",
230
+ "options": {
231
+ "format": "form-label"
232
+ }
233
+ },
234
+ {
235
+ "type": "Control",
236
+ "scope": "#/properties/drainage_channels",
237
+ "label": "1. Ditches",
238
+ "options": {
239
+ "format": "repeatable-field"
240
+ }
241
+ },
242
+ {
243
+ "type": "Control",
244
+ "scope": "#/properties/drainage_culverts",
245
+ "label": "2. Culverts",
246
+ "options": {
247
+ "format": "repeatable-field"
248
+ }
249
+ },
250
+ {
251
+ "type": "Control",
252
+ "scope": "#/properties/drain_dips",
253
+ "label": "3. Drain dips and Water-bars",
254
+ "options": {
255
+ "format": "repeatable-field"
256
+ }
257
+ },
258
+ {
259
+ "type": "Control",
260
+ "scope": "#/properties/fieldset__title_information_about_the_trail",
261
+ "label": "Information about the Trail",
262
+ "options": {
263
+ "format": "form-label"
264
+ }
265
+ },
266
+ {
267
+ "type": "Control",
268
+ "scope": "#/properties/trail_use",
269
+ "label": "1. Trail Use",
270
+ "options": {
271
+ "format": "repeatable-field"
272
+ }
273
+ },
274
+ {
275
+ "type": "Control",
276
+ "scope": "#/properties/trail_purpose",
277
+ "label": "2. Trail Purpose",
278
+ "options": {
279
+ "format": "repeatable-field"
280
+ }
281
+ },
282
+ {
283
+ "type": "Control",
284
+ "scope": "#/properties/fieldset__title_additional_information",
285
+ "label": "Additional Information",
286
+ "options": {
287
+ "format": "form-label"
288
+ }
289
+ },
290
+ {
291
+ "type": "Control",
292
+ "scope": "#/properties/additional_info",
293
+ "label": "Additional Comments/Observations/Recommendations",
294
+ "options": {}
295
+ }
296
+ ]
297
+ }