metadata_presenter 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 066133455b4cf94730e5bebe20ac439262cacd2128e3004d988035e822efc818
4
- data.tar.gz: c4513e4dc197c1730ba538b2fc50f1c5302ad70c5a31d3377cb0a23f581fae33
3
+ metadata.gz: 02defe01ddba9dd12933b6fbd7bc9d87dde76b844ad279fb904f30fef50d0631
4
+ data.tar.gz: 88b97e4610d868cc64040291d45bc0295f3a2345d52667b4ebd29f1efac742d2
5
5
  SHA512:
6
- metadata.gz: 6a83357fac7381b7191f9c46edf93f4090be55e40491e06427f108430e5ee4069cc5d797da46d32f289d7785e05a02ae2808059eb7bf470b113bdbf56caf4b91
7
- data.tar.gz: 31760a4dcedb66f45ac8be4bb93882d8278d58fcccf686f734dbf3dc0a762c09608cd54bf20718220ae2b8d0c7e3b47bd546a3f2edb9bf53aa30fe9e19703ca3
6
+ metadata.gz: ec1ae9e71d6a01265aab982505136f6a08ef614c0b90f72680ae80358bbb4af0819648990f16c16963c498784c93acec8e831a2cb6a92eff9fe07ff9fbcfbfcc
7
+ data.tar.gz: 96a35c0e8ed4bc4bcb4d69375ae3816174a71f1afacbce4797e2d8e18f484344484f7e6cded39d93efa35ba439b27a1949a4c738a2d57cbf6d13c3dfe0980d18
@@ -0,0 +1,10 @@
1
+ {
2
+ "_id": "component.radios",
3
+ "_type": "radios",
4
+ "errors": {},
5
+ "hint": "Component hint",
6
+ "label": "Component label",
7
+ "items": [],
8
+ "name": "component-name",
9
+ "legend": "Required legend"
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_id": "definition.radio",
3
+ "_type": "radio",
4
+ "label": "Required label",
5
+ "value": "radio-value"
6
+ }
@@ -165,6 +165,37 @@
165
165
  "heading": "Family Hobbies",
166
166
  "url": "/family-hobbies"
167
167
  },
168
+ {
169
+ "_uuid": "4251b25e-08de-4dcb-8f2f-dd9848dcdca6",
170
+ "_id": "page.radio-buttons",
171
+ "_type": "page.singlequestion",
172
+ "components": [
173
+ {
174
+ "_id": "radio-buttons_radios_1",
175
+ "_type": "radios",
176
+ "errors": {},
177
+ "hint": "Component hint",
178
+ "label": "Component label",
179
+ "items": [
180
+ {
181
+ "_id": "radio-buttons_radio_1",
182
+ "_type": "radio",
183
+ "label": "Yes",
184
+ "value": "radio_value_1"
185
+ },
186
+ {
187
+ "_id": "radio-buttons_radio_2",
188
+ "_type": "radio",
189
+ "label": "No",
190
+ "value": "radio_value_2"
191
+ }
192
+ ],
193
+ "name": "radio-buttons_radios_1"
194
+ }
195
+ ],
196
+ "heading": "Parent name",
197
+ "url": "/radio-buttons"
198
+ },
168
199
  {
169
200
  "_uuid": "e819d0c2-7062-4997-89cf-44d26d098404",
170
201
  "_id": "page._check-answers",
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.8.0'
2
+ VERSION = '0.8.1'
3
3
  end
@@ -0,0 +1,37 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/radios",
3
+ "_name": "component.radios",
4
+ "title": "Radios",
5
+ "description": "Let users select one option from a list",
6
+ "type": "object",
7
+ "properties": {
8
+ "_type": {
9
+ "const": "radios"
10
+ },
11
+ "items": {
12
+ "title": "Options",
13
+ "description": "Items that users can select",
14
+ "type": "array",
15
+ "items": {
16
+ "$ref": "definition.radio"
17
+ }
18
+ }
19
+ },
20
+ "allOf": [
21
+ {
22
+ "$ref": "definition.fieldset"
23
+ },
24
+ {
25
+ "$ref": "definition.name"
26
+ }
27
+ ],
28
+ "transforms": {
29
+ "namespace": {
30
+ "propagation": "items[*].conditional_component"
31
+ }
32
+ },
33
+ "required": [
34
+ "name",
35
+ "items"
36
+ ]
37
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/conditionalcomponent",
3
+ "_name": "definition.conditionalcomponent",
4
+ "nestable": true,
5
+ "title": "Conditional component",
6
+ "description": "Component revealed when user chooses option",
7
+ "allOf": [
8
+ {
9
+ "$ref": "definition.component"
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/fieldset",
3
+ "_name": "definition.fieldset",
4
+ "title": "Fieldset",
5
+ "description": "Group related form inputs",
6
+ "type": "object",
7
+ "category": [
8
+ "control",
9
+ "fieldset"
10
+ ],
11
+ "properties": {
12
+ "_type": {
13
+ "const": "fieldset"
14
+ },
15
+ "legend": {
16
+ "title": "Legend",
17
+ "description": "Text to use in fieldset legend",
18
+ "type": "string"
19
+ },
20
+ "hint": {
21
+ "title": "Hint",
22
+ "description": "Text to help users answer a question - appears in grey under the legend",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "allOf": [
27
+ {
28
+ "$ref": "definition.repeatable"
29
+ },
30
+ {
31
+ "$ref": "definition.grouping"
32
+ }
33
+ ],
34
+ "required": [
35
+ "legend"
36
+ ]
37
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/grouping",
3
+ "_name": "definition.grouping",
4
+ "title": "Grouping definition",
5
+ "allOf": [
6
+ {
7
+ "$ref": "definition.component"
8
+ },
9
+ {
10
+ "$ref": "definition.components"
11
+ },
12
+ {
13
+ "$ref": "definition.namespace"
14
+ },
15
+ {
16
+ "$ref": "definition.html_attributes"
17
+ }
18
+ ],
19
+ "category": [
20
+ "grouping"
21
+ ],
22
+ "transforms": {
23
+ "namespace": {
24
+ "propagation": "components[?(@.$control || @.$grouping)]"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/option",
3
+ "_name": "definition.option",
4
+ "title": "Option definition",
5
+ "properties": {
6
+ "value": {
7
+ "title": "Option value",
8
+ "description": "Value captured by system when users choose this option",
9
+ "type": "string"
10
+ },
11
+ "hasDivider": {
12
+ "title": "Option divider",
13
+ "description": "Whether to display a textual divider before the option - defaults to ‘or’",
14
+ "type": "boolean"
15
+ }
16
+ },
17
+ "allOf": [
18
+ {
19
+ "$ref": "definition.block"
20
+ },
21
+ {
22
+ "$ref": "definition.label"
23
+ },
24
+ {
25
+ "$ref": "definition.namespace"
26
+ }
27
+ ],
28
+ "required": [
29
+ "value"
30
+ ],
31
+ "category": [
32
+ "component",
33
+ "option"
34
+ ]
35
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/radio",
3
+ "_name": "definition.radio",
4
+ "idSeed": "value",
5
+ "title": "Radio option",
6
+ "description": "Component that provides a radio option",
7
+ "type": "object",
8
+ "properties": {
9
+ "_type": {
10
+ "const": "radio"
11
+ },
12
+ "hint": {
13
+ "title": "Hint text",
14
+ "description": "Text to help users understand an option - appears in grey under the label",
15
+ "type": "string",
16
+ "content": true
17
+ },
18
+ "conditional_component": {
19
+ "$ref": "definition.conditionalcomponent"
20
+ }
21
+ },
22
+ "allOf": [
23
+ {
24
+ "$ref": "definition.option"
25
+ }
26
+ ],
27
+ "required": [
28
+ "label"
29
+ ]
30
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
@@ -259,10 +259,12 @@ files:
259
259
  - config/initializers/schemas.rb
260
260
  - config/routes.rb
261
261
  - default_metadata/component/number.json
262
+ - default_metadata/component/radios.json
262
263
  - default_metadata/component/text.json
263
264
  - default_metadata/component/textarea.json
264
265
  - default_metadata/config/meta.json
265
266
  - default_metadata/config/service.json
267
+ - default_metadata/definition/radio.json
266
268
  - default_metadata/page/checkanswers.json
267
269
  - default_metadata/page/confirmation.json
268
270
  - default_metadata/page/singlequestion.json
@@ -281,6 +283,7 @@ files:
281
283
  - lib/metadata_presenter/version.rb
282
284
  - lib/tasks/metadata_presenter_tasks.rake
283
285
  - schemas/component/number.json
286
+ - schemas/component/radios.json
284
287
  - schemas/component/text.json
285
288
  - schemas/component/textarea.json
286
289
  - schemas/condition/condition.json
@@ -297,21 +300,26 @@ files:
297
300
  - schemas/definition/condition.text.json
298
301
  - schemas/definition/condition.value_type.json
299
302
  - schemas/definition/conditional.boolean.json
303
+ - schemas/definition/conditionalcomponent.json
300
304
  - schemas/definition/conditions.all.json
301
305
  - schemas/definition/conditions.any.json
302
306
  - schemas/definition/conditions.exactly.json
303
307
  - schemas/definition/control.json
304
308
  - schemas/definition/data.json
305
309
  - schemas/definition/field.json
310
+ - schemas/definition/fieldset.json
311
+ - schemas/definition/grouping.json
306
312
  - schemas/definition/html_attributes.json
307
313
  - schemas/definition/label.json
308
314
  - schemas/definition/link_list.json
309
315
  - schemas/definition/name.json
310
316
  - schemas/definition/namespace.json
311
317
  - schemas/definition/next_page.json
318
+ - schemas/definition/option.json
312
319
  - schemas/definition/page.content.json
313
320
  - schemas/definition/page.form.json
314
321
  - schemas/definition/page.json
322
+ - schemas/definition/radio.json
315
323
  - schemas/definition/repeatable.json
316
324
  - schemas/definition/width_class.input.json
317
325
  - schemas/definition/width_class.json