ccs-digitalmarketplace-frameworks 4.4.33 → 4.4.34
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/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Digital Marketplace content
|
|
|
4
4
|
[](https://badge.fury.io/js/ccs-digitalmarketplace-frameworks)
|
|
5
5
|
|
|
6
6
|
YAML definitions of the Digital Marketplace’s procurement frameworks.
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
The content here is pulled in to the frontend applications to display forms, and is also used to generate the JSON
|
|
9
9
|
schemas used by the API for validation (by running the `scripts/generate-validation-schemas.py` script).
|
|
10
10
|
|
|
@@ -35,7 +35,7 @@ Question keys
|
|
|
35
35
|
* `type` type of the question input, used to find the related toolkit form template (required)
|
|
36
36
|
* `name` short question name to use in summary tables instead of the full question. Also used to
|
|
37
37
|
generate the URL slug for addressable questions. This field is a [TemplateField](https://github.com/alphagov/digitalmarketplace-content-loader/blob/474d9adce0f422700cbf2dfc8815a7503ab368bc/dmcontent/utils.py#L8).
|
|
38
|
-
* `filter_label` for boolean questions, a text label to use for filtering services where the question was answered 'yes'. If not present `name` or `question` will be used instead.
|
|
38
|
+
* `filter_label` for boolean questions, a text label to use for filtering services where the question was answered 'yes'. If not present, `name` or `question` will be used instead.
|
|
39
39
|
* `slug` can be used to manually override the slug used for this question.
|
|
40
40
|
* `empty_message` a message to display instead of "Answer required" if question wasn't answered
|
|
41
41
|
* `hint` hint text to display after the question, eg advice about how to best format you answer. This field is a [TemplateField](https://github.com/alphagov/digitalmarketplace-content-loader/blob/474d9adce0f422700cbf2dfc8815a7503ab368bc/dmcontent/utils.py#L8).
|
|
@@ -53,7 +53,7 @@ Question keys
|
|
|
53
53
|
* `validations` a list of validation errors related to the field. Each validation consists of:
|
|
54
54
|
* `name` the error message key that should match the validation error returned by the API (required)
|
|
55
55
|
* `message` text of the message that will be displayed by the frontend app (required)
|
|
56
|
-
* `depends` describes the service conditions that must be met for question to be displayed. Right now, only used to list the
|
|
56
|
+
* `depends` describes the service conditions that must be met for a question to be displayed. Right now, only used to list the
|
|
57
57
|
lots the question applies to. Each depend rule consists of:
|
|
58
58
|
* `"on"` service data key name to use for comparison (e.g. "lot" for lots)
|
|
59
59
|
* `being` a list of acceptable values for the key. If service data key value matches one of the values in the `being` the
|
|
@@ -107,7 +107,7 @@ Manifest files define a tree-like structure for content. A manifest is a list o
|
|
|
107
107
|
Each section contains:
|
|
108
108
|
|
|
109
109
|
* `name` name of the section (required). This field is a [TemplateField](https://github.com/alphagov/digitalmarketplace-content-loader/blob/474d9adce0f422700cbf2dfc8815a7503ab368bc/dmcontent/utils.py#L8).
|
|
110
|
-
* `slug` can be used to manually override the slug used for this section.
|
|
110
|
+
* `slug` can be used to manually override the slug used for this section.
|
|
111
111
|
* `editable` controls whether section allows updates for the questions, boolean value
|
|
112
112
|
* `edit_questions` controls whether individual questions can be edited separately (only supported by `multiquestion` questions)
|
|
113
113
|
* `removable` controls whether individual questions can be removed separately (only supported by `multiquestion` questions and is the same as `edit_questions` by default)
|
|
@@ -156,7 +156,7 @@ mapping from `<doc_type>_search_filters` based on this template.
|
|
|
156
156
|
|
|
157
157
|
For each field (question) that needs to be used in (e.g. facet) filtering, there must be a corresponding
|
|
158
158
|
`dmfilter_` property added to the `mappings` key. Note that if a question's `id` has been overridden (i.e. the
|
|
159
|
-
`id` is no longer the same as the filename,
|
|
159
|
+
`id` is no longer the same as the filename, so the _overridden_ `id` should be used here. (Compare with the manifest,
|
|
160
160
|
where in all cases the filename should be used to specify the question.)
|
|
161
161
|
|
|
162
162
|
For each field (question) that should have an aggregation available for it, there must similarly be a corresponding
|
|
@@ -184,7 +184,7 @@ Development
|
|
|
184
184
|
A local checkout of the frameworks repo can be shared with locally-running services (i.e. frontend applications). There are two ways of doing this:
|
|
185
185
|
|
|
186
186
|
1. From this repo, run `npm link`
|
|
187
|
-
2. From each app, run `npm link ccs-digitalmarketplace-frameworks`.
|
|
187
|
+
2. From each app, run `npm link ccs-digitalmarketplace-frameworks`.
|
|
188
188
|
3. You can then run `npx gulp frameworks` to automatically rebuild the framework content whenever a framework YML file changes. Restart the app in dmrunner to pick up changes.
|
|
189
189
|
|
|
190
190
|
Or
|
|
@@ -245,6 +245,3 @@ of the [Open Government 3.0][ogl] licence.
|
|
|
245
245
|
[mit]: LICENCE
|
|
246
246
|
[copyright]: http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/
|
|
247
247
|
[ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|