@defra/forms-engine-plugin 0.1.10 → 0.1.11

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 (116) hide show
  1. package/.public/stylesheets/application.min.css +1 -1
  2. package/.public/stylesheets/application.min.css.map +1 -1
  3. package/.server/client/stylesheets/application.scss +10 -0
  4. package/.server/config/index.js +3 -14
  5. package/.server/config/index.js.map +1 -1
  6. package/.server/server/devserver/dxt-devtool-baselayout.html +71 -0
  7. package/.server/server/forms/register-as-a-unicorn-breeder.json +393 -0
  8. package/.server/server/forms/register-as-a-unicorn-breeder.yaml +251 -0
  9. package/.server/server/index.js +11 -16
  10. package/.server/server/index.js.map +1 -1
  11. package/.server/server/plugins/engine/configureEnginePlugin.js +16 -2
  12. package/.server/server/plugins/engine/configureEnginePlugin.js.map +1 -1
  13. package/.server/server/plugins/engine/plugin.js +27 -16
  14. package/.server/server/plugins/engine/plugin.js.map +1 -1
  15. package/.server/server/plugins/engine/services/formsService.js +15 -29
  16. package/.server/server/plugins/engine/services/formsService.js.map +1 -1
  17. package/.server/server/plugins/engine/services/localFormsService.js +52 -0
  18. package/.server/server/plugins/engine/services/localFormsService.js.map +1 -0
  19. package/.server/server/plugins/engine/views/confirmation.html +1 -1
  20. package/.server/server/plugins/engine/views/file-upload.html +1 -1
  21. package/.server/server/plugins/engine/views/index.html +1 -1
  22. package/.server/server/plugins/engine/views/item-delete.html +1 -1
  23. package/.server/server/plugins/engine/views/repeat-list-summary.html +1 -1
  24. package/.server/server/plugins/engine/views/summary.html +1 -1
  25. package/.server/server/plugins/errorPages.js +4 -26
  26. package/.server/server/plugins/errorPages.js.map +1 -1
  27. package/.server/server/plugins/nunjucks/context.js +37 -28
  28. package/.server/server/plugins/nunjucks/context.js.map +1 -1
  29. package/.server/server/plugins/nunjucks/context.test.js +23 -28
  30. package/.server/server/plugins/nunjucks/context.test.js.map +1 -1
  31. package/.server/server/plugins/nunjucks/types.js +3 -4
  32. package/.server/server/plugins/nunjucks/types.js.map +1 -1
  33. package/.server/server/routes/index.js +0 -1
  34. package/.server/server/routes/index.js.map +1 -1
  35. package/.server/typings/hapi/index.d.js.map +1 -1
  36. package/package.json +2 -1
  37. package/src/client/stylesheets/application.scss +10 -0
  38. package/src/config/index.ts +4 -17
  39. package/src/server/devserver/dxt-devtool-baselayout.html +71 -0
  40. package/src/server/forms/register-as-a-unicorn-breeder.json +393 -0
  41. package/src/server/forms/register-as-a-unicorn-breeder.yaml +251 -0
  42. package/src/server/index.test.ts +4 -37
  43. package/src/server/index.ts +13 -16
  44. package/src/server/plugins/engine/configureEnginePlugin.ts +19 -1
  45. package/src/server/plugins/engine/plugin.ts +43 -17
  46. package/src/server/plugins/engine/services/formsService.js +17 -35
  47. package/src/server/plugins/engine/services/localFormsService.js +49 -0
  48. package/src/server/plugins/engine/views/confirmation.html +1 -1
  49. package/src/server/plugins/engine/views/file-upload.html +1 -1
  50. package/src/server/plugins/engine/views/index.html +1 -1
  51. package/src/server/plugins/engine/views/item-delete.html +1 -1
  52. package/src/server/plugins/engine/views/repeat-list-summary.html +1 -1
  53. package/src/server/plugins/engine/views/summary.html +1 -1
  54. package/src/server/plugins/errorPages.ts +4 -26
  55. package/src/server/plugins/nunjucks/context.js +41 -31
  56. package/src/server/plugins/nunjucks/context.test.js +24 -27
  57. package/src/server/plugins/nunjucks/types.js +3 -4
  58. package/src/server/routes/index.ts +0 -1
  59. package/src/typings/hapi/index.d.ts +3 -9
  60. package/.server/common/cookies.js +0 -55
  61. package/.server/common/cookies.js.map +0 -1
  62. package/.server/common/cookies.test.js +0 -15
  63. package/.server/common/cookies.test.js.map +0 -1
  64. package/.server/common/types.js +0 -6
  65. package/.server/common/types.js.map +0 -1
  66. package/.server/server/forms/README.md +0 -10
  67. package/.server/server/forms/report-a-terrorist.json +0 -270
  68. package/.server/server/forms/runner-components-test.json +0 -365
  69. package/.server/server/forms/test.json +0 -581
  70. package/.server/server/forms/test.yaml +0 -363
  71. package/.server/server/plugins/blankie.js +0 -29
  72. package/.server/server/plugins/blankie.js.map +0 -1
  73. package/.server/server/plugins/engine/services/formsService.test.js +0 -71
  74. package/.server/server/plugins/engine/services/formsService.test.js.map +0 -1
  75. package/.server/server/plugins/engine/views/layout.html +0 -199
  76. package/.server/server/plugins/router.js +0 -169
  77. package/.server/server/plugins/router.js.map +0 -1
  78. package/.server/server/routes/health.js +0 -15
  79. package/.server/server/routes/health.js.map +0 -1
  80. package/.server/server/routes/health.test.js +0 -32
  81. package/.server/server/routes/health.test.js.map +0 -1
  82. package/.server/server/utils/file-form-service.test.js +0 -52
  83. package/.server/server/utils/file-form-service.test.js.map +0 -1
  84. package/.server/server/views/404.html +0 -16
  85. package/.server/server/views/500.html +0 -19
  86. package/.server/server/views/help/accessibility-statement.html +0 -58
  87. package/.server/server/views/help/cookie-preferences.html +0 -57
  88. package/.server/server/views/help/cookies.html +0 -71
  89. package/.server/server/views/help/get-support.html +0 -37
  90. package/.server/server/views/help/privacy-notice.html +0 -68
  91. package/.server/server/views/help/terms-and-conditions.html +0 -83
  92. package/src/common/cookies.js +0 -58
  93. package/src/common/cookies.test.js +0 -23
  94. package/src/common/types.js +0 -5
  95. package/src/server/forms/README.md +0 -10
  96. package/src/server/forms/report-a-terrorist.json +0 -270
  97. package/src/server/forms/runner-components-test.json +0 -365
  98. package/src/server/forms/test.json +0 -581
  99. package/src/server/forms/test.yaml +0 -363
  100. package/src/server/plugins/blankie.test.ts +0 -73
  101. package/src/server/plugins/blankie.ts +0 -48
  102. package/src/server/plugins/engine/services/formsService.test.js +0 -90
  103. package/src/server/plugins/engine/views/layout.html +0 -199
  104. package/src/server/plugins/router.ts +0 -201
  105. package/src/server/routes/health.js +0 -13
  106. package/src/server/routes/health.test.js +0 -35
  107. package/src/server/routes/index.test.ts +0 -125
  108. package/src/server/utils/file-form-service.test.js +0 -79
  109. package/src/server/views/404.html +0 -16
  110. package/src/server/views/500.html +0 -19
  111. package/src/server/views/help/accessibility-statement.html +0 -58
  112. package/src/server/views/help/cookie-preferences.html +0 -57
  113. package/src/server/views/help/cookies.html +0 -71
  114. package/src/server/views/help/get-support.html +0 -37
  115. package/src/server/views/help/privacy-notice.html +0 -68
  116. package/src/server/views/help/terms-and-conditions.html +0 -83
@@ -12,16 +12,15 @@
12
12
  /**
13
13
  * @typedef {object} ViewContext - Nunjucks view context
14
14
  * @property {string} appVersion - Application version
15
- * @property {string} assetPath - Asset path
15
+ * @property {string} [baseLayoutPath] - Base layout path
16
16
  * @property {Partial<Config>} config - Application config properties
17
- * @property {CookieConsent} [cookieConsent] - Cookie consent preferences
18
17
  * @property {string} [crumb] - Cross-Site Request Forgery (CSRF) token
19
18
  * @property {string} [cspNonce] - Content Security Policy (CSP) nonce
20
19
  * @property {string} [currentPath] - Current path
21
20
  * @property {string} [previewMode] - Preview mode
22
21
  * @property {string} [slug] - Form slug
23
- * @property {(asset?: string) => string} getAssetPath - Asset path resolver
24
22
  * @property {FormContext} [context] - the current form context
23
+ * @property {PluginOptions['viewContext']} [injectedViewContext] - the current form context
25
24
  */
26
25
 
27
26
  /**
@@ -34,7 +33,7 @@
34
33
  */
35
34
 
36
35
  /**
37
- * @import { CookieConsent } from '~/src/common/types.js'
38
36
  * @import { config } from '~/src/config/index.js'
39
37
  * @import { FormContext } from '~/src/server/plugins/engine/types.js'
38
+ * @import { PluginOptions } from '~/src/server/plugins/engine/plugin.js'
40
39
  */
@@ -1,2 +1 @@
1
1
  export { default as publicRoutes } from '~/src/server/routes/public.js'
2
- export { default as healthRoute } from '~/src/server/routes/health.js'
@@ -5,6 +5,7 @@ import { type ServerYar, type Yar } from '@hapi/yar'
5
5
  import { type Logger } from 'pino'
6
6
 
7
7
  import { type FormModel } from '~/src/server/plugins/engine/models/index.js'
8
+ import { type context } from '~/src/server/plugins/engine/nunjucks.js'
8
9
  import {
9
10
  type FormRequest,
10
11
  type FormRequestPayload
@@ -19,16 +20,9 @@ declare module '@hapi/hapi' {
19
20
  generate?: (request: Request | FormRequest | FormRequestPayload) => string
20
21
  }
21
22
  'forms-engine-plugin': {
23
+ baseLayoutPath: string
22
24
  cacheService: CacheService
23
- }
24
- }
25
-
26
- interface PluginsStates {
27
- blankie?: {
28
- nonces?: {
29
- script?: string
30
- style?: string
31
- }
25
+ viewContext: context
32
26
  }
33
27
  }
34
28
 
@@ -1,55 +0,0 @@
1
- /**
2
- @type {CookieConsent}
3
- */
4
- export const defaultConsent = {
5
- analytics: null,
6
- dismissed: false
7
- };
8
-
9
- /**
10
- * Parses the cookie consent policy
11
- * @param {string} value
12
- */
13
- export function parseCookieConsent(value) {
14
- /** @type {CookieConsent} */
15
- let cookieConsent;
16
- try {
17
- const encodedValue = decodeURIComponent(value);
18
-
19
- // eslint-disable-next-line -- Allow JSON type 'any'
20
- const decodedValue = JSON.parse(encodedValue);
21
- if (isValidConsent(decodedValue)) {
22
- cookieConsent = decodedValue;
23
- } else {
24
- cookieConsent = defaultConsent;
25
- }
26
- } catch {
27
- cookieConsent = defaultConsent;
28
- }
29
- return cookieConsent;
30
- }
31
-
32
- /**
33
- * Serialises the cookie consent policy
34
- * @param {CookieConsent} consent
35
- * @returns {string} cookie value
36
- */
37
- export function serialiseCookieConsent(consent) {
38
- return encodeURIComponent(JSON.stringify(consent));
39
- }
40
-
41
- /**
42
- * @param {unknown} consent
43
- * @returns {consent is CookieConsent}
44
- */
45
- function isValidConsent(consent) {
46
- if (consent === null || Array.isArray(consent)) {
47
- return false;
48
- }
49
- return typeof consent === 'object' && 'analytics' in consent;
50
- }
51
-
52
- /**
53
- * @import {CookieConsent} from '~/src/common/types.js'
54
- */
55
- //# sourceMappingURL=cookies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.js","names":["defaultConsent","analytics","dismissed","parseCookieConsent","value","cookieConsent","encodedValue","decodeURIComponent","decodedValue","JSON","parse","isValidConsent","serialiseCookieConsent","consent","encodeURIComponent","stringify","Array","isArray"],"sources":["../../src/common/cookies.js"],"sourcesContent":["/**\n @type {CookieConsent}\n */\nexport const defaultConsent = {\n analytics: null,\n dismissed: false\n}\n\n/**\n * Parses the cookie consent policy\n * @param {string} value\n */\nexport function parseCookieConsent(value) {\n /** @type {CookieConsent} */\n let cookieConsent\n\n try {\n const encodedValue = decodeURIComponent(value)\n\n // eslint-disable-next-line -- Allow JSON type 'any'\n const decodedValue = JSON.parse(encodedValue)\n\n if (isValidConsent(decodedValue)) {\n cookieConsent = decodedValue\n } else {\n cookieConsent = defaultConsent\n }\n } catch {\n cookieConsent = defaultConsent\n }\n\n return cookieConsent\n}\n\n/**\n * Serialises the cookie consent policy\n * @param {CookieConsent} consent\n * @returns {string} cookie value\n */\nexport function serialiseCookieConsent(consent) {\n return encodeURIComponent(JSON.stringify(consent))\n}\n\n/**\n * @param {unknown} consent\n * @returns {consent is CookieConsent}\n */\nfunction isValidConsent(consent) {\n if (consent === null || Array.isArray(consent)) {\n return false\n }\n\n return typeof consent === 'object' && 'analytics' in consent\n}\n\n/**\n * @import {CookieConsent} from '~/src/common/types.js'\n */\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG;EAC5BC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAK,EAAE;EACxC;EACA,IAAIC,aAAa;EAEjB,IAAI;IACF,MAAMC,YAAY,GAAGC,kBAAkB,CAACH,KAAK,CAAC;;IAE9C;IACA,MAAMI,YAAY,GAAGC,IAAI,CAACC,KAAK,CAACJ,YAAY,CAAC;IAE7C,IAAIK,cAAc,CAACH,YAAY,CAAC,EAAE;MAChCH,aAAa,GAAGG,YAAY;IAC9B,CAAC,MAAM;MACLH,aAAa,GAAGL,cAAc;IAChC;EACF,CAAC,CAAC,MAAM;IACNK,aAAa,GAAGL,cAAc;EAChC;EAEA,OAAOK,aAAa;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,sBAAsBA,CAACC,OAAO,EAAE;EAC9C,OAAOC,kBAAkB,CAACL,IAAI,CAACM,SAAS,CAACF,OAAO,CAAC,CAAC;AACpD;;AAEA;AACA;AACA;AACA;AACA,SAASF,cAAcA,CAACE,OAAO,EAAE;EAC/B,IAAIA,OAAO,KAAK,IAAI,IAAIG,KAAK,CAACC,OAAO,CAACJ,OAAO,CAAC,EAAE;IAC9C,OAAO,KAAK;EACd;EAEA,OAAO,OAAOA,OAAO,KAAK,QAAQ,IAAI,WAAW,IAAIA,OAAO;AAC9D;;AAEA;AACA;AACA","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- import { parseCookieConsent } from "./cookies.js";
2
- describe('cookies', () => {
3
- it('parses a valid policy', () => {
4
- expect(parseCookieConsent('{"analytics":true}')).toEqual({
5
- analytics: true
6
- });
7
- });
8
- it.each(["['not', 'an', 'object']", '{{ not: "an object" }}', '{ additional: AAA }', '{ marketing: 100 }', '', 'null'])('converts a malformed policy to the default', value => {
9
- expect(parseCookieConsent(value)).toEqual({
10
- analytics: null,
11
- dismissed: false
12
- });
13
- });
14
- });
15
- //# sourceMappingURL=cookies.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.test.js","names":["parseCookieConsent","describe","it","expect","toEqual","analytics","each","value","dismissed"],"sources":["../../src/common/cookies.test.js"],"sourcesContent":["import { parseCookieConsent } from '~/src/common/cookies.js'\n\ndescribe('cookies', () => {\n it('parses a valid policy', () => {\n expect(parseCookieConsent('{\"analytics\":true}')).toEqual({\n analytics: true\n })\n })\n\n it.each([\n \"['not', 'an', 'object']\",\n '{{ not: \"an object\" }}',\n '{ additional: AAA }',\n '{ marketing: 100 }',\n '',\n 'null'\n ])('converts a malformed policy to the default', (value) => {\n expect(parseCookieConsent(value)).toEqual({\n analytics: null,\n dismissed: false\n })\n })\n})\n"],"mappings":"AAAA,SAASA,kBAAkB;AAE3BC,QAAQ,CAAC,SAAS,EAAE,MAAM;EACxBC,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChCC,MAAM,CAACH,kBAAkB,CAAC,oBAAoB,CAAC,CAAC,CAACI,OAAO,CAAC;MACvDC,SAAS,EAAE;IACb,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFH,EAAE,CAACI,IAAI,CAAC,CACN,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,EAAE,EACF,MAAM,CACP,CAAC,CAAC,4CAA4C,EAAGC,KAAK,IAAK;IAC1DJ,MAAM,CAACH,kBAAkB,CAACO,KAAK,CAAC,CAAC,CAACH,OAAO,CAAC;MACxCC,SAAS,EAAE,IAAI;MACfG,SAAS,EAAE;IACb,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- /**
2
- * @typedef CookieConsent
3
- * @property {boolean | null} analytics - whether analytics cookies are allowed
4
- * @property {boolean} dismissed - whether cookie banner has been dismissed
5
- */
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/common/types.js"],"sourcesContent":["/**\n * @typedef CookieConsent\n * @property {boolean | null} analytics - whether analytics cookies are allowed\n * @property {boolean} dismissed - whether cookie banner has been dismissed\n */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- # Pre-configured Forms
2
-
3
- This folder holds pre-configured form definitions that can be loaded by the runner:
4
-
5
- ```js
6
- const server = await createServer({
7
- formFileName: 'example.js',
8
- formFilePath: join(cwd(), 'server/forms'),
9
- })
10
- ```
@@ -1,270 +0,0 @@
1
- {
2
- "startPage": "/do-you-have-a-link-to-the-evidence",
3
- "pages": [
4
- {
5
- "title": "Do you have a link to the evidence?",
6
- "path": "/do-you-have-a-link-to-the-evidence",
7
- "components": [
8
- {
9
- "name": "UjidZI",
10
- "title": "Html",
11
- "options": {},
12
- "type": "Html",
13
- "content": "<p class=\"govuk-body\">It’s helpful if you can send us links to the relevant pages, or posts if it was posted on social media.</p>",
14
- "schema": {}
15
- },
16
- {
17
- "name": "rfUYC",
18
- "options": {},
19
- "type": "Details",
20
- "title": "Help me find the link",
21
- "content": "If you’re on a website, the link appears in the bar at the top of the page. An example of a link is, www.gov.uk/page/1234/content#.",
22
- "schema": {}
23
- },
24
- {
25
- "type": "RadiosField",
26
- "title": "Do you have a link to the material?",
27
- "options": {},
28
- "name": "doyouhavealink",
29
- "schema": {},
30
- "list": "HTbt4V"
31
- }
32
- ],
33
- "next": [
34
- {
35
- "path": "/do-you-have-any-evidence"
36
- },
37
- {
38
- "path": "/yes-i-have-a-link-to-the-material",
39
- "condition": "b-NGgWvGISkJJLuzsJIjv"
40
- }
41
- ],
42
- "section": "PMXq1s"
43
- },
44
- {
45
- "path": "/do-you-have-any-evidence",
46
- "title": "Do you have any evidence?",
47
- "components": [
48
- {
49
- "name": "OQrrkG",
50
- "title": "Html",
51
- "options": {},
52
- "type": "Html",
53
- "content": "<p class=\"govuk-body\">This could be an image or video, for example. Evidence is helpful should the material be deleted before we can find it.It’s safe to save evidence to your device for the purpose of reporting it to us. We recommend deleting it afterwards.</p>",
54
- "schema": {}
55
- },
56
- {
57
- "name": "ajdOpV",
58
- "options": {},
59
- "type": "Details",
60
- "title": "Help me take a screenshot",
61
- "content": "Try this:Press the Shift key (⇧), command (or Cmd), and 3The screenshot will be saved to your DesktopYou can now upload it to the formTry this:Press the Ctrl key and the switch window keyThe screenshot will be saved to your DownloadsYou can now upload it to the formIf that doesn’t work, try pressing Ctrl and F5.When viewing the material:Press the Prt Scr key (or similar) to take a copy of your screenPaste the image into Microsoft Paint or a similar applicationSave the file to your computerUpload the file to the formIf that doesn’t work, you may need to search for how to take screenshots on your particular computer model.",
62
- "schema": {}
63
- },
64
- {
65
- "name": "LUBRMD",
66
- "options": {},
67
- "type": "RadiosField",
68
- "title": "Do you have any evidence?",
69
- "schema": {},
70
- "list": "mdmRq9"
71
- }
72
- ],
73
- "next": [
74
- {
75
- "path": "/is-there-anything-else-you-can-tell-us"
76
- },
77
- {
78
- "path": "/yes-i-have-evidence",
79
- "condition": "On5IOaSRDSyLs1G7-Dmdy"
80
- }
81
- ],
82
- "section": "PMXq1s"
83
- },
84
- {
85
- "title": "summary",
86
- "path": "/summary",
87
- "controller": "SummaryPageController",
88
- "components": []
89
- },
90
- {
91
- "path": "/is-there-anything-else-you-can-tell-us",
92
- "title": "Is there anything else you can tell us?",
93
- "components": [
94
- {
95
- "name": "HETMBo",
96
- "title": "Html",
97
- "options": {},
98
- "type": "Html",
99
- "content": "<p class=\"govuk-body\">Details may include:who shared the materialwhen it was shareda description, if you haven’t provided a link or evidence</p>",
100
- "schema": {}
101
- },
102
- {
103
- "name": "evZxIJ",
104
- "options": {
105
- "required": false
106
- },
107
- "type": "MultilineTextField",
108
- "title": "Additional Info",
109
- "schema": {}
110
- }
111
- ],
112
- "next": [
113
- {
114
- "path": "/summary"
115
- }
116
- ],
117
- "section": "PMXq1s"
118
- },
119
- {
120
- "path": "/yes-i-have-a-link-to-the-material",
121
- "title": "Yes I have a link to the material",
122
- "components": [
123
- {
124
- "type": "MultilineTextField",
125
- "title": "Link to the material",
126
- "hint": "Please put in the link to the material here",
127
- "name": "blarGGH",
128
- "options": {},
129
- "schema": {}
130
- }
131
- ],
132
- "next": [
133
- {
134
- "path": "/do-you-have-any-evidence"
135
- }
136
- ],
137
- "section": "PMXq1s"
138
- },
139
- {
140
- "path": "/yes-i-have-evidence",
141
- "title": "Yes I have evidence",
142
- "components": [
143
- {
144
- "name": "koExae",
145
- "options": {
146
- "required": false
147
- },
148
- "type": "MultilineTextField",
149
- "title": "Evidence",
150
- "hint": "Please enter your evidence here",
151
- "schema": {}
152
- }
153
- ],
154
- "next": [
155
- {
156
- "path": "/is-there-anything-else-you-can-tell-us"
157
- }
158
- ],
159
- "section": "PMXq1s"
160
- }
161
- ],
162
- "lists": [
163
- {
164
- "title": "linktomateriallist",
165
- "name": "HTbt4V",
166
- "type": "string",
167
- "items": [
168
- {
169
- "text": "Yes, I do have a link",
170
- "value": "yes"
171
- },
172
- {
173
- "text": "No, I don't have a link",
174
- "value": "no"
175
- }
176
- ]
177
- },
178
- {
179
- "title": "evidencelist",
180
- "name": "mdmRq9",
181
- "type": "string",
182
- "items": [
183
- {
184
- "text": "Yes, I have evidence",
185
- "value": "yes"
186
- },
187
- {
188
- "text": "No, I don't have evidence",
189
- "value": "no"
190
- }
191
- ]
192
- }
193
- ],
194
- "sections": [
195
- {
196
- "name": "PMXq1s",
197
- "title": "Evidence"
198
- }
199
- ],
200
- "phaseBanner": {},
201
- "metadata": {},
202
- "conditions": [
203
- {
204
- "name": "b-NGgWvGISkJJLuzsJIjv",
205
- "displayName": "hasLink",
206
- "value": {
207
- "name": "hasLink",
208
- "conditions": [
209
- {
210
- "field": {
211
- "name": "PMXq1s.doyouhavealink",
212
- "type": "RadiosField",
213
- "display": "Do you have a link to the material? in PMXq1s"
214
- },
215
- "operator": "is",
216
- "value": {
217
- "type": "Value",
218
- "value": "yes",
219
- "display": "Yes, I do have a link"
220
- }
221
- }
222
- ]
223
- }
224
- },
225
- {
226
- "name": "xY51EDbc4lPr6kHZl1umG",
227
- "displayName": "noEvidence",
228
- "value": {
229
- "name": "noEvidence",
230
- "conditions": [
231
- {
232
- "field": {
233
- "name": "PMXq1s.LUBRMD",
234
- "type": "RadiosField",
235
- "display": "Do you have any evidence? in PMXq1s"
236
- },
237
- "operator": "is",
238
- "value": {
239
- "type": "Value",
240
- "value": "no",
241
- "display": "No, I don't have evidence"
242
- }
243
- }
244
- ]
245
- }
246
- },
247
- {
248
- "name": "On5IOaSRDSyLs1G7-Dmdy",
249
- "displayName": "hasEvidence",
250
- "value": {
251
- "name": "hasEvidence",
252
- "conditions": [
253
- {
254
- "field": {
255
- "name": "PMXq1s.LUBRMD",
256
- "type": "RadiosField",
257
- "display": "Do you have any evidence? in PMXq1s"
258
- },
259
- "operator": "is",
260
- "value": {
261
- "type": "Value",
262
- "value": "yes",
263
- "display": "Yes, I have evidence"
264
- }
265
- }
266
- ]
267
- }
268
- }
269
- ]
270
- }