hof 22.9.0-beta.v1 → 22.9.0-beta.v3

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 (316) hide show
  1. package/config/hof-defaults.js +1 -0
  2. package/frontend/template-partials/views/cookies.html +6 -6
  3. package/frontend/template-partials/views/partials/cookie-banner.html +11 -6
  4. package/lib/settings.js +1 -0
  5. package/package.json +1 -1
  6. package/package/.eslintignore +0 -1
  7. package/package/CHANGELOG.md +0 -232
  8. package/package/LICENSE +0 -21
  9. package/package/README.md +0 -1887
  10. package/package/bin/hof-build +0 -10
  11. package/package/bin/hof-transpiler +0 -12
  12. package/package/build/helpers/importer.js +0 -29
  13. package/package/build/helpers/local.js +0 -35
  14. package/package/build/helpers/resolver/import.js +0 -32
  15. package/package/build/helpers/resolver/nearest-package-root.js +0 -33
  16. package/package/build/helpers/resolver/package.js +0 -29
  17. package/package/build/helpers/resolver.js +0 -16
  18. package/package/build/index.js +0 -49
  19. package/package/build/lib/env.js +0 -36
  20. package/package/build/lib/mkdir.js +0 -9
  21. package/package/build/lib/run.js +0 -17
  22. package/package/build/lib/spawn.js +0 -18
  23. package/package/build/tasks/browserify/compress.js +0 -15
  24. package/package/build/tasks/browserify/index.js +0 -48
  25. package/package/build/tasks/build/index.js +0 -6
  26. package/package/build/tasks/images/index.js +0 -27
  27. package/package/build/tasks/index.js +0 -8
  28. package/package/build/tasks/sass/index.js +0 -67
  29. package/package/build/tasks/translate/index.js +0 -20
  30. package/package/build/tasks/watch/index.js +0 -161
  31. package/package/components/address-lookup/default-model.js +0 -76
  32. package/package/components/address-lookup/defaults.js +0 -25
  33. package/package/components/address-lookup/index.js +0 -251
  34. package/package/components/address-lookup/templates/address-lookup.html +0 -14
  35. package/package/components/address-lookup/templates/address.html +0 -22
  36. package/package/components/address-lookup/templates/postcode.html +0 -9
  37. package/package/components/clear-session/Readme.md +0 -46
  38. package/package/components/clear-session/index.js +0 -26
  39. package/package/components/combine-and-loop-fields/Readme.md +0 -42
  40. package/package/components/combine-and-loop-fields/index.js +0 -156
  41. package/package/components/date/fields.js +0 -16
  42. package/package/components/date/index.js +0 -172
  43. package/package/components/date/templates/date.html +0 -20
  44. package/package/components/emailer/assets/images/govuk_logotype_email.png +0 -0
  45. package/package/components/emailer/assets/images/ho_crest_27px.png +0 -0
  46. package/package/components/emailer/assets/images/spacer.gif +0 -0
  47. package/package/components/emailer/email-service.js +0 -51
  48. package/package/components/emailer/emailer.js +0 -53
  49. package/package/components/emailer/index.js +0 -74
  50. package/package/components/emailer/transports/debug.js +0 -74
  51. package/package/components/emailer/transports/index.js +0 -8
  52. package/package/components/emailer/transports/ses.js +0 -36
  53. package/package/components/emailer/transports/smtp.js +0 -26
  54. package/package/components/emailer/transports/stub.js +0 -5
  55. package/package/components/emailer/views/layout.html +0 -63
  56. package/package/components/homeoffice-countries/index.js +0 -22
  57. package/package/components/index.js +0 -13
  58. package/package/components/notify/index.js +0 -62
  59. package/package/components/notify/notify.js +0 -51
  60. package/package/components/session-timeout-warning/index.js +0 -67
  61. package/package/components/summary/index.js +0 -237
  62. package/package/config/builder-defaults.js +0 -45
  63. package/package/config/component-defaults.js +0 -13
  64. package/package/config/hof-defaults.js +0 -65
  65. package/package/config/rate-limits.js +0 -20
  66. package/package/config/sanitisation-rules.js +0 -32
  67. package/package/controller/base-controller.js +0 -296
  68. package/package/controller/behaviour-hooks.js +0 -51
  69. package/package/controller/behaviour-session.js +0 -64
  70. package/package/controller/controller.js +0 -258
  71. package/package/controller/deprecate-error.js +0 -10
  72. package/package/controller/formatting/formatters.js +0 -70
  73. package/package/controller/formatting/index.js +0 -32
  74. package/package/controller/index.js +0 -17
  75. package/package/controller/validation/email.js +0 -30
  76. package/package/controller/validation/index.js +0 -101
  77. package/package/controller/validation/validators.js +0 -181
  78. package/package/controller/validation-error.js +0 -14
  79. package/package/frontend/govuk-template/build/config.js +0 -24
  80. package/package/frontend/govuk-template/build/govuk_template.html +0 -102
  81. package/package/frontend/govuk-template/build/index.js +0 -23
  82. package/package/frontend/govuk-template/govuk_template_generated.html +0 -102
  83. package/package/frontend/govuk-template/index.js +0 -29
  84. package/package/frontend/index.js +0 -9
  85. package/package/frontend/template-mixins/mixins/helpers.js +0 -103
  86. package/package/frontend/template-mixins/mixins/index.js +0 -37
  87. package/package/frontend/template-mixins/mixins/render.js +0 -12
  88. package/package/frontend/template-mixins/mixins/template-mixins.js +0 -520
  89. package/package/frontend/template-mixins/partials/forms/checkbox-group.html +0 -47
  90. package/package/frontend/template-mixins/partials/forms/checkbox.html +0 -16
  91. package/package/frontend/template-mixins/partials/forms/input-submit.html +0 -1
  92. package/package/frontend/template-mixins/partials/forms/input-text-date.html +0 -37
  93. package/package/frontend/template-mixins/partials/forms/input-text-group.html +0 -45
  94. package/package/frontend/template-mixins/partials/forms/option-group.html +0 -43
  95. package/package/frontend/template-mixins/partials/forms/select.html +0 -17
  96. package/package/frontend/template-mixins/partials/forms/textarea-group.html +0 -37
  97. package/package/frontend/template-mixins/partials/mixins/panel.html +0 -4
  98. package/package/frontend/template-partials/index.js +0 -9
  99. package/package/frontend/template-partials/translations/index.js +0 -26
  100. package/package/frontend/template-partials/translations/src/cy/base.json +0 -4
  101. package/package/frontend/template-partials/translations/src/cy/buttons.json +0 -6
  102. package/package/frontend/template-partials/translations/src/cy/cookies.json +0 -104
  103. package/package/frontend/template-partials/translations/src/cy/errorlist.json +0 -6
  104. package/package/frontend/template-partials/translations/src/cy/errors.json +0 -18
  105. package/package/frontend/template-partials/translations/src/cy/terms.json +0 -28
  106. package/package/frontend/template-partials/translations/src/en/accessibility.json +0 -43
  107. package/package/frontend/template-partials/translations/src/en/base.json +0 -5
  108. package/package/frontend/template-partials/translations/src/en/buttons.json +0 -10
  109. package/package/frontend/template-partials/translations/src/en/cookies.json +0 -116
  110. package/package/frontend/template-partials/translations/src/en/errorlist.json +0 -7
  111. package/package/frontend/template-partials/translations/src/en/errors.json +0 -35
  112. package/package/frontend/template-partials/translations/src/en/exit.json +0 -5
  113. package/package/frontend/template-partials/translations/src/en/fields.json +0 -5
  114. package/package/frontend/template-partials/translations/src/en/journey.json +0 -6
  115. package/package/frontend/template-partials/translations/src/en/save-and-exit.json +0 -4
  116. package/package/frontend/template-partials/translations/src/en/terms.json +0 -28
  117. package/package/frontend/template-partials/views/404.html +0 -9
  118. package/package/frontend/template-partials/views/accessibility.html +0 -55
  119. package/package/frontend/template-partials/views/confirm.html +0 -8
  120. package/package/frontend/template-partials/views/confirmation.html +0 -19
  121. package/package/frontend/template-partials/views/content/en/what-happens-next.md +0 -0
  122. package/package/frontend/template-partials/views/cookie-error.html +0 -1
  123. package/package/frontend/template-partials/views/cookies.html +0 -84
  124. package/package/frontend/template-partials/views/email/data-row.html +0 -4
  125. package/package/frontend/template-partials/views/email/formatted.html +0 -12
  126. package/package/frontend/template-partials/views/email/layout.html +0 -63
  127. package/package/frontend/template-partials/views/email/raw.html +0 -11
  128. package/package/frontend/template-partials/views/email/section-row.html +0 -3
  129. package/package/frontend/template-partials/views/error.html +0 -20
  130. package/package/frontend/template-partials/views/exit.html +0 -9
  131. package/package/frontend/template-partials/views/feedback-submitted.html +0 -11
  132. package/package/frontend/template-partials/views/layout.html +0 -55
  133. package/package/frontend/template-partials/views/partials/analytics-table.html +0 -25
  134. package/package/frontend/template-partials/views/partials/back.html +0 -5
  135. package/package/frontend/template-partials/views/partials/bullet-list.html +0 -7
  136. package/package/frontend/template-partials/views/partials/confirmation-alert.html +0 -6
  137. package/package/frontend/template-partials/views/partials/continue.html +0 -5
  138. package/package/frontend/template-partials/views/partials/cookie-banner.html +0 -29
  139. package/package/frontend/template-partials/views/partials/cookie-notification.html +0 -4
  140. package/package/frontend/template-partials/views/partials/cookie-settings-button.html +0 -1
  141. package/package/frontend/template-partials/views/partials/cookie-settings-radio.html +0 -8
  142. package/package/frontend/template-partials/views/partials/details-summary.html +0 -8
  143. package/package/frontend/template-partials/views/partials/external-link.html +0 -1
  144. package/package/frontend/template-partials/views/partials/form.html +0 -10
  145. package/package/frontend/template-partials/views/partials/gatag.html +0 -60
  146. package/package/frontend/template-partials/views/partials/head.html +0 -31
  147. package/package/frontend/template-partials/views/partials/heading.html +0 -11
  148. package/package/frontend/template-partials/views/partials/items-table.html +0 -32
  149. package/package/frontend/template-partials/views/partials/maincontent-left.html +0 -10
  150. package/package/frontend/template-partials/views/partials/navigation.html +0 -8
  151. package/package/frontend/template-partials/views/partials/page.html +0 -23
  152. package/package/frontend/template-partials/views/partials/panel-indent.html +0 -3
  153. package/package/frontend/template-partials/views/partials/session-cookies-table.html +0 -28
  154. package/package/frontend/template-partials/views/partials/session-timeout-warning.html +0 -38
  155. package/package/frontend/template-partials/views/partials/summary-table-row.html +0 -14
  156. package/package/frontend/template-partials/views/partials/summary-table.html +0 -8
  157. package/package/frontend/template-partials/views/partials/table.html +0 -18
  158. package/package/frontend/template-partials/views/partials/validation-list.html +0 -3
  159. package/package/frontend/template-partials/views/partials/validation-summary.html +0 -25
  160. package/package/frontend/template-partials/views/partials/warn.html +0 -7
  161. package/package/frontend/template-partials/views/rate-limit-error.html +0 -10
  162. package/package/frontend/template-partials/views/save-and-exit.html +0 -17
  163. package/package/frontend/template-partials/views/service-unavailable.html +0 -13
  164. package/package/frontend/template-partials/views/session-timeout.html +0 -7
  165. package/package/frontend/template-partials/views/step.html +0 -14
  166. package/package/frontend/template-partials/views/terms.html +0 -26
  167. package/package/frontend/themes/gov-uk/client-js/cookieSettings.js +0 -145
  168. package/package/frontend/themes/gov-uk/client-js/govuk-cookies.js +0 -121
  169. package/package/frontend/themes/gov-uk/client-js/index.js +0 -27
  170. package/package/frontend/themes/gov-uk/client-js/session-timeout-dialog.js +0 -348
  171. package/package/frontend/themes/gov-uk/client-js/skip-to-main.js +0 -19
  172. package/package/frontend/themes/gov-uk/index.js +0 -9
  173. package/package/frontend/themes/gov-uk/styles/_base.scss +0 -17
  174. package/package/frontend/themes/gov-uk/styles/_check_your_answers.scss +0 -155
  175. package/package/frontend/themes/gov-uk/styles/_cookie-banner.scss +0 -111
  176. package/package/frontend/themes/gov-uk/styles/_cookie-settings.scss +0 -33
  177. package/package/frontend/themes/gov-uk/styles/_govuk_frontend_toolkit.scss +0 -23
  178. package/package/frontend/themes/gov-uk/styles/_helpers.scss +0 -5
  179. package/package/frontend/themes/gov-uk/styles/_layout.scss +0 -125
  180. package/package/frontend/themes/gov-uk/styles/_panel-indent.scss +0 -27
  181. package/package/frontend/themes/gov-uk/styles/_pdf.scss +0 -42
  182. package/package/frontend/themes/gov-uk/styles/_session-timeout-dialog.scss +0 -121
  183. package/package/frontend/themes/gov-uk/styles/_typography.scss +0 -27
  184. package/package/frontend/themes/gov-uk/styles/_variables.scss +0 -11
  185. package/package/frontend/themes/gov-uk/styles/govuk.scss +0 -43
  186. package/package/frontend/themes/gov-uk/styles/mixins.scss +0 -16
  187. package/package/frontend/themes/gov-uk/styles/modules/_alerts.scss +0 -73
  188. package/package/frontend/themes/gov-uk/styles/modules/_buttons.scss +0 -5
  189. package/package/frontend/themes/gov-uk/styles/modules/_character-count.scss +0 -8
  190. package/package/frontend/themes/gov-uk/styles/modules/_confirm-page.scss +0 -20
  191. package/package/frontend/themes/gov-uk/styles/modules/_lists.scss +0 -5
  192. package/package/frontend/themes/gov-uk/styles/modules/_progressive-reveal.scss +0 -17
  193. package/package/frontend/themes/gov-uk/styles/modules/_validation.scss +0 -51
  194. package/package/frontend/themes/index.js +0 -5
  195. package/package/frontend/toolkit/assets/images/passports/new-window-link-blue.png +0 -0
  196. package/package/frontend/toolkit/assets/images/passports/new-window-link.png +0 -0
  197. package/package/frontend/toolkit/assets/images/spinner.gif +0 -0
  198. package/package/frontend/toolkit/assets/javascript/character-count.js +0 -99
  199. package/package/frontend/toolkit/assets/javascript/form-focus.js +0 -101
  200. package/package/frontend/toolkit/assets/javascript/helpers.js +0 -177
  201. package/package/frontend/toolkit/assets/javascript/progressive-reveal.js +0 -72
  202. package/package/frontend/toolkit/assets/javascript/validation.js +0 -71
  203. package/package/frontend/toolkit/assets/javascript/vendor/details.polyfill.js +0 -189
  204. package/package/frontend/toolkit/assets/javascript/vendor/indexof.polyfill.js +0 -39
  205. package/package/frontend/toolkit/assets/javascript/vendor/safari-cachebuster.js +0 -6
  206. package/package/frontend/toolkit/assets/stylesheets/_base.scss +0 -17
  207. package/package/frontend/toolkit/assets/stylesheets/_helpers.scss +0 -5
  208. package/package/frontend/toolkit/assets/stylesheets/_layout.scss +0 -118
  209. package/package/frontend/toolkit/assets/stylesheets/_typography.scss +0 -27
  210. package/package/frontend/toolkit/assets/stylesheets/_variables.scss +0 -11
  211. package/package/frontend/toolkit/assets/stylesheets/app.scss +0 -30
  212. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_buttons.scss +0 -47
  213. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_details.scss +0 -38
  214. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_elements-typography.scss +0 -175
  215. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_forms.scss +0 -167
  216. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_helpers.scss +0 -39
  217. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_layout.scss +0 -67
  218. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_lists.scss +0 -40
  219. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_panels.scss +0 -29
  220. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_reset.scss +0 -33
  221. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_tables.scss +0 -33
  222. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-block-labels.scss +0 -63
  223. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-date.scss +0 -39
  224. package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-validation.scss +0 -63
  225. package/package/frontend/toolkit/assets/stylesheets/mixins.scss +0 -16
  226. package/package/frontend/toolkit/assets/stylesheets/modules/_alerts.scss +0 -73
  227. package/package/frontend/toolkit/assets/stylesheets/modules/_buttons.scss +0 -5
  228. package/package/frontend/toolkit/assets/stylesheets/modules/_confirm-page.scss +0 -20
  229. package/package/frontend/toolkit/assets/stylesheets/modules/_lists.scss +0 -5
  230. package/package/frontend/toolkit/assets/stylesheets/modules/_progressive-reveal.scss +0 -17
  231. package/package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +0 -51
  232. package/package/frontend/toolkit/index.js +0 -10
  233. package/package/index.js +0 -351
  234. package/package/lib/deindex.js +0 -18
  235. package/package/lib/encryption.js +0 -23
  236. package/package/lib/ga-tag.js +0 -89
  237. package/package/lib/health.js +0 -26
  238. package/package/lib/helpers.js +0 -66
  239. package/package/lib/logger.js +0 -65
  240. package/package/lib/markdown.js +0 -46
  241. package/package/lib/router.js +0 -111
  242. package/package/lib/serve-static.js +0 -12
  243. package/package/lib/sessions.js +0 -82
  244. package/package/lib/settings.js +0 -74
  245. package/package/lib/which.js +0 -28
  246. package/package/middleware/cookies.js +0 -43
  247. package/package/middleware/deep-translate.js +0 -32
  248. package/package/middleware/errors.js +0 -119
  249. package/package/middleware/index.js +0 -10
  250. package/package/middleware/not-found.js +0 -38
  251. package/package/middleware/rate-limiter.js +0 -98
  252. package/package/middleware/service-unavailable.js +0 -64
  253. package/package/model/apis/axios-settings.js +0 -21
  254. package/package/model/apis/html-to-pdf-converter.js +0 -35
  255. package/package/model/apis/index.js +0 -5
  256. package/package/model/index.js +0 -348
  257. package/package/package.json +0 -147
  258. package/package/sandbox/README.md +0 -66
  259. package/package/sandbox/apps/sandbox/behaviours/clear-session.js +0 -8
  260. package/package/sandbox/apps/sandbox/behaviours/country-select.js +0 -10
  261. package/package/sandbox/apps/sandbox/behaviours/international-number.js +0 -22
  262. package/package/sandbox/apps/sandbox/fields.js +0 -128
  263. package/package/sandbox/apps/sandbox/index.js +0 -99
  264. package/package/sandbox/apps/sandbox/lib/staticAppealStages.js +0 -189
  265. package/package/sandbox/apps/sandbox/sections/summary-data-sections.js +0 -43
  266. package/package/sandbox/apps/sandbox/translations/src/en/errors.json +0 -5
  267. package/package/sandbox/apps/sandbox/translations/src/en/exit.json +0 -4
  268. package/package/sandbox/apps/sandbox/translations/src/en/fields.json +0 -101
  269. package/package/sandbox/apps/sandbox/translations/src/en/journey.json +0 -7
  270. package/package/sandbox/apps/sandbox/translations/src/en/pages.json +0 -72
  271. package/package/sandbox/apps/sandbox/translations/src/en/validation.json +0 -54
  272. package/package/sandbox/apps/sandbox/views/form-guidance-link.html +0 -8
  273. package/package/sandbox/apps/sandbox/views/save-and-exit.html +0 -19
  274. package/package/sandbox/assets/images/icons/icon-caret-left.png +0 -0
  275. package/package/sandbox/assets/images/icons/icon-complete.png +0 -0
  276. package/package/sandbox/assets/images/icons/icon-cross-remove-sign.png +0 -0
  277. package/package/sandbox/assets/js/index.js +0 -70
  278. package/package/sandbox/assets/scss/app.scss +0 -27
  279. package/package/sandbox/codecept.conf.js +0 -15
  280. package/package/sandbox/config.js +0 -17
  281. package/package/sandbox/package.json +0 -26
  282. package/package/sandbox/server.js +0 -23
  283. package/package/sandbox/yarn.lock +0 -262
  284. package/package/transpiler/index.js +0 -2
  285. package/package/transpiler/lib/aggregate.js +0 -32
  286. package/package/transpiler/lib/build.js +0 -15
  287. package/package/transpiler/lib/compile.js +0 -12
  288. package/package/transpiler/lib/expand-dirs.js +0 -14
  289. package/package/transpiler/lib/write-files.js +0 -24
  290. package/package/utilities/autofill/index.js +0 -189
  291. package/package/utilities/autofill/inputs.js +0 -60
  292. package/package/utilities/countries.js +0 -12
  293. package/package/utilities/helpers/index.js +0 -189
  294. package/package/utilities/index.js +0 -9
  295. package/package/utilities/reqres/index.js +0 -18
  296. package/package/utilities/test-data/data/domain.json +0 -7
  297. package/package/utilities/test-data/data/firstname.json +0 -16
  298. package/package/utilities/test-data/data/lastname.json +0 -10
  299. package/package/utilities/test-data/data/postcode.json +0 -12
  300. package/package/utilities/test-data/data/streetname.json +0 -8
  301. package/package/utilities/test-data/data/streetsuffix.json +0 -7
  302. package/package/utilities/test-data/data/town.json +0 -9
  303. package/package/utilities/test-data/index.js +0 -67
  304. package/package/wizard/behaviours/complete.js +0 -20
  305. package/package/wizard/behaviours/index.js +0 -5
  306. package/package/wizard/index.js +0 -124
  307. package/package/wizard/middleware/back-links.js +0 -68
  308. package/package/wizard/middleware/check-complete.js +0 -13
  309. package/package/wizard/middleware/check-progress.js +0 -139
  310. package/package/wizard/middleware/check-session.js +0 -17
  311. package/package/wizard/middleware/csrf.js +0 -47
  312. package/package/wizard/middleware/session-model.js +0 -11
  313. package/package/wizard/middleware/session.js +0 -9
  314. package/package/wizard/model.js +0 -29
  315. package/package/wizard/util/constants.js +0 -5
  316. package/package/wizard/util/helpers.js +0 -19
@@ -32,6 +32,7 @@ const defaults = {
32
32
  Boolean(process.env.GA_TAG || process.env.GA_4_TAG),
33
33
  'SHOW_COOKIES_BANNER'
34
34
  ),
35
+ hasGoogleAnalytics: Boolean(process.env.GA_TAG || process.env.GA_4_TAG),
35
36
  // added to allow support for multiple HOF forms using GTM to customize how they track page views
36
37
  gtm: {
37
38
  tagId: process.env.GTM_TAG || false,
@@ -3,9 +3,9 @@
3
3
  {{$propositionHeader}}{{/propositionHeader}}
4
4
 
5
5
  {{$validationSummary}}
6
- {{#gaTagId}}
6
+ {{#hasGoogleAnalytics}}
7
7
  {{> partials-cookie-notification}}
8
- {{/gaTagId}}
8
+ {{/hasGoogleAnalytics}}
9
9
  {{/validationSummary}}
10
10
 
11
11
  {{$header}}
@@ -14,7 +14,7 @@
14
14
 
15
15
  {{$content}}
16
16
  <p>{{intro}}</p>
17
- {{^gaTagId}}
17
+ {{^hasGoogleAnalytics}}
18
18
  {{#intro-list}}
19
19
  {{> partials-bullet-list}}
20
20
  {{/intro-list}}
@@ -31,9 +31,9 @@
31
31
  {{#session-cookies-table}}
32
32
  {{> partials-session-cookies-table}}
33
33
  {{/session-cookies-table}}
34
- {{/gaTagId}}
34
+ {{/hasGoogleAnalytics}}
35
35
 
36
- {{#gaTagId}}
36
+ {{#hasGoogleAnalytics}}
37
37
  <div id="cookie-settings">
38
38
  {{#intro-list-ga-tag}}
39
39
  {{> partials-bullet-list}}
@@ -78,7 +78,7 @@
78
78
  </form>
79
79
  </div>
80
80
  </div>
81
- {{/gaTagId}}
81
+ {{/hasGoogleAnalytics}}
82
82
 
83
83
  {{/content}}
84
84
  {{/layout}}
@@ -5,23 +5,28 @@
5
5
  <h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on {{#appName}}{{appName}}{{/appName}}{{^appName}}this service{{/appName}}</h2>
6
6
  <div class="govuk-cookie-banner__content">
7
7
  <p class="govuk-body">We use some essential cookies to make this website work.</p>
8
- <p class="govuk-body">We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.</p>
9
- <p class="govuk-body">We also use cookies set by other sites to help us deliver content from their services.</p>
8
+ {{#hasGoogleAnalytics}}
9
+ <p class="govuk-body">We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.</p>
10
+ <p class="govuk-body">We also use cookies set by other sites to help us deliver content from their services.</p>
11
+ {{/hasGoogleAnalytics}}
10
12
  </div>
11
13
  </div>
12
14
  </div>
15
+
13
16
  <div id="cookie-banner-actions" class="govuk-button-group">
17
+ {{#hasGoogleAnalytics}}
14
18
  <button id="accept-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-accept-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner accepted" data-cookie-types="all">Accept additional cookies</button>
15
19
 
16
20
  <button id="reject-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-reject-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner rejected">Reject additional cookies</button>
17
-
18
- <a class="govuk-link" href="/cookies">View cookies</a>
21
+ {{/hasGoogleAnalytics}}
22
+ <a class="govuk-link" href="/cookies">View cookies</a>
19
23
  </div>
20
24
  </div>
25
+
21
26
  <div class="gem-c-cookie-banner__confirmation govuk-width-container" hidden="" id="cookie-banner-submitted" >
22
27
  <p class="gem-c-cookie-banner__confirmation-message" role="alert">
23
- Your cookie preferences have been saved. You can <a class="govuk-link" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation" href="/cookies">change your cookie settings</a> at any time.
24
- </p>
28
+ Your cookie preferences have been saved. You can <a class="govuk-link" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation" href="/cookies">change your cookie settings</a> at any time.
29
+ </p>
25
30
  <div class="govuk-button-group">
26
31
  <button class="gem-c-cookie-banner__hide-button govuk-button" id="hide-cookie-banner">Hide this message</button>
27
32
  </div>
package/lib/settings.js CHANGED
@@ -64,6 +64,7 @@ module.exports = async (app, config) => {
64
64
  app.use((req, res, next) => {
65
65
  res.locals.baseUrl = req.baseUrl;
66
66
  res.locals.showCookiesBanner = config.showCookiesBanner;
67
+ res.locals.hasGoogleAnalytics = config.hasGoogleAnalytics;
67
68
  next();
68
69
  });
69
70
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "22.9.0-beta.v1",
4
+ "version": "22.9.0-beta.v3",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -1 +0,0 @@
1
- sandbox/public/*
@@ -1,232 +0,0 @@
1
- ## 2025-08-14, Version 22.9.1 (Stable), @dk4g
2
-
3
- ### Added
4
- - Added `showCookiesBanner` configuration flag to control cookie banner display
5
- - Automatically shows banner when `GA_TAG` or `GA_4_TAG` environment variables are present
6
- - Defaults to `false` when no Google Analytics is configured
7
- - Can be explicitly controlled via `SHOW_COOKIES_BANNER` environment variable
8
-
9
- ### Changed
10
- - Cookie banner now intelligently displays based on GA configuration
11
- - Improved cookie consent UX by hiding banner when GA is not enabled
12
- - **Layout template updated**: Projects that override the default `layout` template should update their custom templates to include the new `showCookiesBanner` logic. If you inherit from HOF's layout template, no action is required.
13
-
14
- ### Migration Notes
15
- - **Custom Layout Templates**: If your project overrides the default HOF layout template, ensure your custom template includes the cookie banner conditional logic using the new `showCookiesBanner` configuration flag. Check the updated HOF layout template for reference implementation.
16
-
17
- ## 2025-07-24, Version 22.8.4 (Stable), @vivekkumar-ho
18
- ### Security
19
- - Upgraded axios version to address a security vulnerability
20
-
21
- ## 2025-07-16, Version 22.8.3 (Stable), @vivekkumar-ho
22
- ### Changed
23
- - Updated the cookies page to include the GA container ID, which corresponds to the Measurement ID.
24
-
25
- ## 2025-07-04, Version 22.8.1 (Stable), @gregaustinHO
26
- ### Added
27
- - Add support for source maps while debugging
28
-
29
- ## 2025-07-09, Version 22.7.6 (Stable), @robertdeniszczyc2 @sulthan-ahmed
30
- ### Changed
31
- - Updated SVG handling and related dependencies to address issues and improve compatibility.
32
-
33
- ## 2025-05-29, Version 22.7.2 (Stable), @Rhodine-orleans-lindsay
34
- ### Fixed
35
- - Service unavailable text can now use html
36
-
37
- ## 2025-05-28, Version 22.7.0 (Stable), @Rhodine-orleans-lindsay @sulthan-ahmed
38
- ### Added
39
- - 'Service Unavailable' functionality added which allows for services to redirect to a 'Service Unavailable' page when there is a need to pause a service for things like maintenance:
40
- - Adds 'service unavailable' error middleware
41
- - Includes default service unavailable html view
42
- - Includes flag to set `SERVICE_UNAVAILABLE` config to true to enable the functionality
43
- ### Changed
44
- - Error pages can now show the service name in the title and journey header
45
- ### Security
46
- - Updates patch and minor dependencies
47
-
48
- ## 2025-05-09, Version 22.6.0 (Stable), @vivekkumar-ho
49
- ### Changed
50
- - Support for passing `maxlengthAttribute` property for input-text field. The HTML maxlength attribute is applied when `maxlengthAttribute: true` and the `maxlength` validator are specified in the field config
51
-
52
- ## 2025-05-06, Version 22.5.2 (Stable), @Rhodine-orleans-lindsay
53
- ### Fixed
54
- - Hints for radio button options are now aligned correctly
55
- ### Security
56
- - Updates patch and minor dependencies
57
-
58
- ## 2025-04-15, Version 22.5.0 (Stable), @shamiluwais
59
- ### Changed
60
- - Refactors notify component to enable email attachments
61
-
62
- ## 2025-04-15, Version 22.4.0 (Stable), @Rhodine-orleans-lindsay
63
- ### Changed
64
- - Amends page title format to follow the govuk design system so that the service name is now included in the the title by setting the `header` or `serviceName` in journey.json.
65
- - Where page titles need to be different from page headings, if `title` is set pages.json, it can be used in the page title instead of `header`.
66
- ### Security
67
- - Updates patch and minor dependencies
68
-
69
- ## 2025-03-17, Version 22.3.2 (Stable), @Rhodine-orleans-lindsay
70
- ### Fixed
71
- - Error message now shows above textarea field if label is hidden
72
- ### Security
73
- - Updates patch and minor dependencies
74
-
75
- ## 2025-03-07, Version 22.3.0 (Stable), @robertdeniszczyc2 @sulthan-ahmed
76
- ### Fixed
77
- - the validator `ukmobilephone` now accepts `+447 and 07`
78
- ### Security
79
- - Updates minor dependencies for `axios`
80
-
81
- ## 2025-03-07, Version 22.2.0 (Stable), @Rhodine-orleans-lindsay
82
- ### Changed
83
- - Amends cookie config to allow limited changes to sameSite property during safe cross-origin navigations.
84
- ### Security
85
- - Updates patch and minor dependencies
86
-
87
- ## 2025-01-24, Version 22.1.0 (Stable), @robertdeniszczyc2 @sulthan-ahmed
88
- * ⛓️‍💥 **BREAKING CHANGE** : removed `nodemailer-smtp-transport` replaced with `nodemailer`.
89
- - The nodemailer-smtp-transport package has been removed due to a critical vulnerability, and its functionality has been consolidated under nodemailer.
90
- - 👊 Impact : Any functions or configurations relying on nodemailer-smtp-transport must be updated to use nodemailer.
91
- - 🎬 Action: Rewrite code to utilize nodemailer as the replacement, ensuring compatibility and security.
92
-
93
- ## 2025-01-17, Version 22.0.0 (Stable), @Rhodine-orleans-lindsay
94
- * Adds session timeout warning
95
- - user can stay on page or exit form
96
- - adds exit html
97
- - user can stay signed in or save and exit the form if the form is a save and exit form
98
- - adds default save-and-exit html
99
- - updates confirmation html to a static page
100
- - allows for customisation of session timeout warning dialog content, exit and save-and-exit page content, and exit and save-and-exit steps
101
- - Potential **_breaking change_**: Static pages should use the `{{<layout}}...{{/layout}}` tags instead of the `{{<partials-page}}...{{/partials-page}}` tags if the timeout warning should not be displayed.
102
- * Fixes accessibility issues
103
- * Sandbox area for testing hof changes
104
- * Updates patch and minor dependency versions
105
-
106
- ## 2024-07-22, Version 21.0.0 (Stable), @Rhodine-orleans-lindsay
107
- * Replaces deprecated request module with axios
108
- - refactors the hof model and apis to use axios instead of request
109
- * Updates patch and minor dependency versions
110
-
111
- ## 2024-04-24, Version 20.5.0 (Stable), @mislam987
112
- * Add hint property to checkboxes to align with govuk design guidelines
113
-
114
- ## 2024-02-29, Version 20.4.0 (Stable), @sulthan-ahmed
115
- * Update version of govuk-frontend to 3.15
116
- - this adds the new crown for the King
117
- - this supports a lot of changes from the govuk design system
118
- * Adds support for Google tag manager
119
- * Fixes accessibility issues
120
- * Sandbox area for testing hof changes
121
- * Updates patch and minor versions including
122
- - libphonenumber to 1.9.44
123
- - nodemailer to 6.9.9
124
- - ip to 1.1.9
125
- - es5-ext to 0.10.63
126
-
127
- ## 2020-06-02, Version 16.0.0 (Stable), @andymoody
128
- * Update version of helmet to 3.22.0
129
- * Update version of i18n-future to 2.0.0
130
-
131
- ## 2020-06-01, Version 15.1.1
132
- * Update hof-form-wizard to 5.1.1
133
-
134
- ## 2020-05-16, Version 15.1.0
135
- * Add support for configuring multiple views folders at the root level
136
-
137
- ## 2020-04-29, Version 15.0.0 (Stable), @andymoody
138
- * Update version of hof-template-mixins to 5.2.1
139
- * Now supports hints on options for checkbox and radio groups
140
- * Includes a breaking change to older-style 'grey-label' option groups
141
-
142
- ## 2017-04-21, Version 12.0.0 (Stable), @lennym
143
- * Renames to `hof`!
144
- * Includes refactor of `hof-form-controller` to move error messaging to a render-time concern.
145
- * Depecrates `Controller#Error` in favour of `Controller#ValidationError`
146
-
147
- ## 2017-04-21, Version 11.0.0 (Stable), @lennym
148
- * Adds themes. Ships with `hof-theme-govuk` as default.
149
-
150
- ## 2017-03-14, Version 10.3.1 (Stable), @lennym
151
- * Uses `_.merge` instead of `Object.assign` to combine default config with user-provided config.
152
-
153
- ## 2017-03-02, Version 10.3.0 (Stable), @lennym
154
- * Fixes i18n language settings. Now offers complete multi-language support
155
- * Adding `--shared ./node_modules/hof-template-partials/translations` to hof-transpiler is no longer necessary. This is handled automatically within bootstrap.
156
-
157
- ## 2017-02-22, Version 10.2.0 (Stable), @lennym
158
- * Makes `views` directory on a route not throw if undefined and default directory does not exist
159
-
160
- ## 2017-02-20, Version 10.1.0 (Stable), @lennym
161
- * Adds behaviours option to global config and app config to support defining common behaviours
162
- * Restores `baseController` option with deprecation warning
163
-
164
- ## 2017-02-17, Version 10.0.0 (Stable), @joefitter
165
- * _BREAKING_ - `clearSession` option on steps is removed
166
- * _BREAKING_ - `mixin` option for fields defaults to `input-text` this means that fields that previously skipped rendering will now be rendered
167
- * _BREAKING_ - `baseController` option removed
168
-
169
- ## 2017-02-10, Version 9.3.1 (Stable), @josephchapman
170
- * Allow GA script to load js and images form any path
171
-
172
- ## 2017-02-10, Version 9.3.0 (Stable), @josephchapman
173
- * CSP directives auto-amended with google url when gaTagId set
174
-
175
- ## 2017-02-09, Version 9.2.0 (Stable), @josephchapman
176
- * CSP directives can be extended with `csp` config
177
- * Documentation reorganised
178
- * Test fixtures reorganised
179
-
180
- ## 2017-01-27, Version 9.1.0 (Stable), @lennym
181
- * Allow CSP to be disabled to enable acceptance test to run
182
-
183
- ## 2017-01-27, Version 9.0.1 (Stable), @lennym
184
- * Major version update of hof-template-mixins
185
-
186
- ## 2017-01-27, Version 9.0.0 (Stable), @lennym
187
- * Major version updates of hof-form-wizard and hof-controllers
188
-
189
- ## 2017-01-16, Version 8.1.0 (Stable), @josephchapman
190
- * Add basic Content Security Policy (CSP) middleware
191
- * Throw error if session.secret is not set in production
192
-
193
- ## 2017-01-06, Version 8.0.1 (Stable), @josephchapman
194
- * Fixes issue causing an error to be thrown when mounting middleware.
195
-
196
- ## 2017-01-05, Version 8.0.0 (Stable), @josephchapman
197
- * Add router in middleware stack for insertion of user middleware (#100)
198
- * Potential **breaking change**: Prevent overwriting initialisation config with custom start config.
199
- * Allow custom protocol, port and host to start method.
200
- * Do not allow this configuration to override the global config
201
- * Fix broken paths to views and translations
202
-
203
- ## 2016-12-13, Version 7.0.0 (~~Stable~~), @josephchapman
204
- * Pass `appConfig` through to **hof-wizard**
205
- * Update to latest **hof-wizard** v1.1.0 so `appConfig` is passed to each `controller`
206
- * Make `views` use **hof-template-partials** as default
207
- * Remove `views` and `fields` from `defaults.js`
208
- * **BREAKING CHANGE**: Throw if no base `fields` or route `fields` option is specified
209
- * Breaks all instances of bootstrap overriding `views` and `fields` with boolean `false`
210
- * Update documentation, typos
211
- * Update tests, specifically where optional controller provided
212
-
213
- ## 2016-07-20, Version 3.0.0 (Stable), @josephchapman
214
- * Use hof-middleware.deepTranslate
215
- * Use hof-middleware.notFound
216
- * Remove assetPath option (Breaking)
217
-
218
- ## 2016-07-18, Version 2.0.0 (Stable), @josephchapman
219
- * Make async tests run and not fail on travis
220
- * Use cookie middleware
221
- * Hard-code local assetPath (`/public`)
222
- * Replace `assets` option with `assetpath` (breaking change)
223
-
224
- ## 2016-07-12, Version 1.0.1 (Stable), @josephchapman
225
- * **hof-template-partials** 1.0.1 for common views and translations
226
- * Fix i18n usage
227
- * Invoke i18n
228
- * Wait for i18n to become ready
229
- * Fix router's optional paths
230
- * Set the app to trust proxy
231
- * Update cookies settings
232
-
package/package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2016
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.