hof 21.0.0-instrumentation-beta.0 → 21.0.2-axios-beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/.github/workflows/automate-publish.yml +1 -1
  2. package/.github/workflows/automate-tag.yml +4 -4
  3. package/.nyc_output/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
  4. package/.nyc_output/processinfo/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -1
  6. package/README.md +340 -256
  7. package/build/tasks/sass/index.js +3 -1
  8. package/build/tasks/watch/index.js +1 -1
  9. package/components/combine-and-loop-fields/Readme.md +42 -0
  10. package/components/combine-and-loop-fields/index.js +156 -0
  11. package/components/date/index.js +3 -1
  12. package/components/date/templates/date.html +15 -12
  13. package/components/homeoffice-countries/index.js +22 -0
  14. package/components/index.js +2 -0
  15. package/components/notify/notify.js +2 -2
  16. package/components/summary/index.js +3 -2
  17. package/config/builder-defaults.js +3 -1
  18. package/config/component-defaults.js +13 -0
  19. package/controller/controller.js +57 -1
  20. package/controller/formatting/formatters.js +12 -0
  21. package/controller/validation/index.js +2 -1
  22. package/controller/validation/validators.js +4 -0
  23. package/frontend/govuk-template/build/config.js +2 -2
  24. package/frontend/govuk-template/build/govuk_template.html +104 -0
  25. package/frontend/govuk-template/build/index.js +2 -2
  26. package/frontend/govuk-template/index.js +4 -4
  27. package/frontend/template-mixins/mixins/template-mixins.js +39 -11
  28. package/frontend/template-mixins/partials/forms/checkbox-group.html +47 -0
  29. package/frontend/template-mixins/partials/forms/checkbox.html +4 -4
  30. package/frontend/template-mixins/partials/forms/input-submit.html +1 -1
  31. package/frontend/template-mixins/partials/forms/input-text-date.html +37 -0
  32. package/frontend/template-mixins/partials/forms/input-text-group.html +15 -10
  33. package/frontend/template-mixins/partials/forms/option-group.html +42 -26
  34. package/frontend/template-mixins/partials/forms/select.html +10 -5
  35. package/frontend/template-mixins/partials/forms/textarea-group.html +37 -23
  36. package/frontend/template-mixins/partials/mixins/panel.html +3 -4
  37. package/frontend/template-partials/views/accessibility.html +4 -4
  38. package/frontend/template-partials/views/cookies.html +1 -1
  39. package/frontend/template-partials/views/layout.html +24 -17
  40. package/frontend/template-partials/views/partials/back.html +1 -1
  41. package/frontend/template-partials/views/partials/bullet-list.html +1 -1
  42. package/frontend/template-partials/views/partials/confirmation-alert.html +4 -3
  43. package/frontend/template-partials/views/partials/continue.html +1 -1
  44. package/frontend/template-partials/views/partials/cookie-banner.html +27 -24
  45. package/frontend/template-partials/views/partials/cookie-settings-radio.html +6 -6
  46. package/frontend/template-partials/views/partials/external-link.html +1 -1
  47. package/frontend/template-partials/views/partials/form.html +2 -1
  48. package/frontend/template-partials/views/partials/maincontent-left.html +4 -4
  49. package/frontend/template-partials/views/partials/navigation.html +7 -6
  50. package/frontend/template-partials/views/partials/session-cookies-table.html +6 -6
  51. package/frontend/template-partials/views/partials/summary-table-row.html +2 -2
  52. package/frontend/template-partials/views/partials/table.html +7 -7
  53. package/frontend/template-partials/views/partials/validation-list.html +2 -2
  54. package/frontend/template-partials/views/partials/validation-summary.html +14 -13
  55. package/frontend/template-partials/views/partials/warn.html +7 -0
  56. package/frontend/template-partials/views/session-timeout.html +3 -2
  57. package/frontend/themes/gov-uk/client-js/cookieSettings.js +1 -1
  58. package/frontend/themes/gov-uk/client-js/govuk-cookies.js +121 -0
  59. package/frontend/themes/gov-uk/client-js/index.js +6 -1
  60. package/frontend/themes/gov-uk/client-js/skip-to-main.js +19 -0
  61. package/frontend/themes/gov-uk/styles/_cookie-banner.scss +51 -1
  62. package/frontend/themes/gov-uk/styles/govuk.scss +4 -0
  63. package/frontend/themes/gov-uk/styles/modules/_validation.scss +5 -5
  64. package/frontend/toolkit/assets/javascript/character-count.js +4 -4
  65. package/frontend/toolkit/assets/javascript/progressive-reveal.js +3 -1
  66. package/frontend/toolkit/assets/javascript/validation.js +5 -1
  67. package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +3 -3
  68. package/index.js +15 -2
  69. package/lib/ga-tag.js +1 -1
  70. package/lib/settings.js +18 -2
  71. package/middleware/errors.js +2 -3
  72. package/middleware/not-found.js +0 -3
  73. package/middleware/rate-limiter.js +1 -0
  74. package/model/apis/axios-settings.js +9 -0
  75. package/model/apis/html-to-pdf-converter.js +9 -8
  76. package/model/index.js +29 -28
  77. package/package.json +17 -14
  78. package/sandbox/README.md +3 -3
  79. package/sandbox/apps/sandbox/fields.js +33 -11
  80. package/sandbox/apps/sandbox/index.js +4 -0
  81. package/sandbox/apps/sandbox/sections/summary-data-sections.js +3 -0
  82. package/sandbox/apps/sandbox/translations/en/default.json +224 -0
  83. package/sandbox/apps/sandbox/translations/src/en/fields.json +11 -4
  84. package/sandbox/apps/sandbox/translations/src/en/journey.json +4 -1
  85. package/sandbox/apps/sandbox/translations/src/en/pages.json +7 -25
  86. package/sandbox/apps/sandbox/translations/src/en/validation.json +5 -1
  87. package/sandbox/assets/js/index.js +1 -1
  88. package/sandbox/assets/scss/app.scss +16 -16
  89. package/sandbox/package.json +6 -1
  90. package/sandbox/public/css/app.css +2793 -0
  91. package/sandbox/public/images/icons/icon-caret-left.png +0 -0
  92. package/sandbox/public/images/icons/icon-complete.png +0 -0
  93. package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
  94. package/sandbox/public/js/bundle.js +32888 -0
  95. package/sandbox/server.js +2 -1
  96. package/sandbox/yarn.lock +243 -1
  97. package/wizard/index.js +0 -13
  98. package/wizard/middleware/check-progress.js +36 -1
  99. package/.nyc_output/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
  100. package/.nyc_output/processinfo/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
  101. package/frontend/govuk-template/govuk_template.html +0 -109
  102. package/frontend/themes/gov-uk/views/partials/form.html +0 -9
  103. package/frontend/themes/gov-uk/views/partials/forms/option-group.html +0 -28
  104. package/frontend/themes/gov-uk/views/partials/mixins/panel.html +0 -3
  105. package/frontend/themes/gov-uk/views/partials/validation-summary.html +0 -24
  106. package/middleware/monitor.js +0 -20
  107. package/sandbox/apps/sandbox/views/confirmation.html +0 -15
@@ -0,0 +1,224 @@
1
+ {
2
+ "fields": {
3
+ "landing-page-radio": {
4
+ "legend": "Which form would you like to explore?",
5
+ "options": {
6
+ "basic-form": {
7
+ "label": "Basic form"
8
+ },
9
+ "complex-form": {
10
+ "label": "Complex form"
11
+ },
12
+ "build-your-own-form": {
13
+ "label": "Build your own form"
14
+ }
15
+ }
16
+ },
17
+ "name": {
18
+ "label": "Full name"
19
+ },
20
+ "dateOfBirth": {
21
+ "legend": "Date of birth",
22
+ "hint": "For example, 31 10 1990"
23
+ },
24
+ "building": {
25
+ "label": "Building and street"
26
+ },
27
+ "street": {
28
+ "label": "Address line 2"
29
+ },
30
+ "townOrCity": {
31
+ "label": "Town or city"
32
+ },
33
+ "postcode": {
34
+ "label": "Postcode"
35
+ },
36
+ "incomeTypes": {
37
+ "label": "Sources of income",
38
+ "legend": "Select the options where you receive income from",
39
+ "hint": "Select all options that apply to you.",
40
+ "options": {
41
+ "salary": {
42
+ "label": "Salary"
43
+ },
44
+ "universal_credit": {
45
+ "label": "Universal Credit"
46
+ },
47
+ "child_benefit": {
48
+ "label": "Child Benefit"
49
+ },
50
+ "housing_benefit": {
51
+ "label": "Housing Benefit"
52
+ },
53
+ "other": {
54
+ "label": "Other"
55
+ }
56
+ }
57
+ },
58
+ "countryOfHearing": {
59
+ "label": "Country of hearing",
60
+ "options": {
61
+ "englandAndWales": {
62
+ "label": "England and Wales"
63
+ },
64
+ "scotland": {
65
+ "label": "Scotland"
66
+ },
67
+ "northernIreland": {
68
+ "label": "Northern Ireland"
69
+ }
70
+ }
71
+ },
72
+ "email": {
73
+ "label": "Email address"
74
+ },
75
+ "phone": {
76
+ "label": "Phone number",
77
+ "hint": "International phone numbers require the international dialling code, for example +33235066182"
78
+ },
79
+ "int-phone-number": {
80
+ "legend": "International phone number"
81
+ },
82
+ "complaintDetails": {
83
+ "label": "Complaint details"
84
+ },
85
+ "countrySelect": {
86
+ "label": "Select a country",
87
+ "hint": "Start to type the country name and options will appear"
88
+ },
89
+ "appealStages": {
90
+ "label": "Appeal stage",
91
+ "options": {
92
+ "null": "Select..."
93
+ }
94
+ }
95
+ },
96
+ "journey": {
97
+ "header": "HOF Bootstrap Sandbox Form"
98
+ },
99
+ "pages": {
100
+ "landing-page": {
101
+ "header": "Landing page",
102
+ "intro": "Choose one of the options below and press continue."
103
+ },
104
+ "build-your-own-form": {
105
+ "title": "Build your own form",
106
+ "subheader": "Access the build your own form guidance link"
107
+ },
108
+ "name": {
109
+ "header": "What is your full name?"
110
+ },
111
+ "dob": {
112
+ "header": "What is your date of birth?"
113
+ },
114
+ "address": {
115
+ "header": "What is your address in the UK?",
116
+ "intro": "If you have no fixed address, enter an address where we can contact you."
117
+ },
118
+ "checkboxes": {
119
+ "header": "Where does your money come from each month?"
120
+ },
121
+ "radio": {
122
+ "header": "What country was the appeal lodged?"
123
+ },
124
+ "country-select": {
125
+ "header": "What country is your address located?"
126
+ },
127
+ "email": {
128
+ "header": "Enter your email address"
129
+ },
130
+ "phone-number": {
131
+ "header": "Enter your phone number"
132
+ },
133
+ "text-input-area": {
134
+ "header": "What are the details of your complaint?",
135
+ "intro": "Briefly summarise your complaint. Include anything that can help our investigation."
136
+ },
137
+ "select": {
138
+ "header": "What is the appeal stage?",
139
+ "intro": "Choose an appeal stage from the drop down menu"
140
+ },
141
+ "confirm": {
142
+ "header": "Check your answers before submitting your application.",
143
+ "sections": {
144
+ "applicantsDetails": {
145
+ "header": "Applicant's details"
146
+ },
147
+ "address": {
148
+ "header": "Address"
149
+ },
150
+ "income": {
151
+ "header": "Income"
152
+ },
153
+ "appealDetails": {
154
+ "header": "Appeal details"
155
+ },
156
+ "countrySelect": {
157
+ "header": "Country of residence"
158
+ },
159
+ "contactDetails": {
160
+ "header": "Contact details"
161
+ },
162
+ "complaintDetails": {
163
+ "header": "Complaint details"
164
+ }
165
+ }
166
+ },
167
+ "confirmation": {
168
+ "title": "Application sent",
169
+ "alert": "Application sent",
170
+ "subheader": "What happens next",
171
+ "content": "We’ll contact you with the decision of your application or if we need more information from you."
172
+ }
173
+ },
174
+ "validation": {
175
+ "landing-page-radio": {
176
+ "required": "Select an option below and press continue"
177
+ },
178
+ "name": {
179
+ "default": "Enter your full name"
180
+ },
181
+ "dateOfBirth": {
182
+ "default": "Enter your date of birth in the correct format; for example, 31 10 1990",
183
+ "after": "Enter a date after 1 1 1900",
184
+ "before": "Enter a date that is in the past"
185
+ },
186
+ "building": {
187
+ "default": "Enter details of your building and street"
188
+ },
189
+ "townOrCity": {
190
+ "default": "Enter a town or city",
191
+ "regex": "Enter a town or city without including digits"
192
+ },
193
+ "postcode": {
194
+ "default": "Enter your postcode"
195
+ },
196
+ "incomeTypes": {
197
+ "default": "Select all options that apply to you."
198
+ },
199
+ "countryOfHearing": {
200
+ "default": "Select where the appeal hearing is to be held"
201
+ },
202
+ "countrySelect": {
203
+ "default": "Enter a valid country of residence",
204
+ "required": "Enter your country of residence"
205
+ },
206
+ "email": {
207
+ "default": "Enter your email address in the correct format"
208
+ },
209
+ "phone": {
210
+ "default": "Enter your phone number"
211
+ },
212
+ "int-phone-number": {
213
+ "required": "Enter an international phone number",
214
+ "internationalPhoneNumber": "Enter a valid international phone number"
215
+ },
216
+ "complaintDetails": {
217
+ "default": "Enter details about why you are making a complaint",
218
+ "maxlength": "Keep to the 5000 character limit"
219
+ },
220
+ "appealStages": {
221
+ "required": "Select an appeal stage from the list"
222
+ }
223
+ }
224
+ }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "landing-page-radio": {
3
3
  "legend": "Which form would you like to explore?",
4
+ "hint": "Choose one of the options below and press continue.",
4
5
  "options": {
5
6
  "basic-form": {
6
7
  "label": "Basic form"
@@ -17,7 +18,7 @@
17
18
  "label": "Full name"
18
19
  },
19
20
  "dateOfBirth": {
20
- "legend": "Date of birth",
21
+ "legend": "What is your date of birth?",
21
22
  "hint": "For example, 31 10 1990"
22
23
  },
23
24
  "building": {
@@ -55,7 +56,7 @@
55
56
  }
56
57
  },
57
58
  "countryOfHearing": {
58
- "label": "Country of hearing",
59
+ "legend": "What country was the appeal lodged?",
59
60
  "options": {
60
61
  "englandAndWales": {
61
62
  "label": "England and Wales"
@@ -79,14 +80,20 @@
79
80
  "legend": "International phone number"
80
81
  },
81
82
  "complaintDetails": {
82
- "label": "Complaint details"
83
+ "label": "Complaint details",
84
+ "hint": "Briefly summarise your complaint. Include anything that can help our investigation."
85
+ },
86
+ "whatHappened": {
87
+ "label": "What happened",
88
+ "hint": "Briefly summarise what happened."
83
89
  },
84
90
  "countrySelect": {
85
- "label": "Select a country",
91
+ "label": "Which country are you based in?",
86
92
  "hint": "Start to type the country name and options will appear"
87
93
  },
88
94
  "appealStages": {
89
95
  "label": "Appeal stage",
96
+ "hint": "Choose an appeal stage from the drop down menu",
90
97
  "options": {
91
98
  "null": "Select..."
92
99
  }
@@ -1,3 +1,6 @@
1
1
  {
2
- "header": "HOF Bootstrap Sandbox Form"
2
+ "header": "HOF Bootstrap Sandbox Form",
3
+ "confirmation": {
4
+ "details": "Your reference number <br><strong>HDJ2123F</strong>"
5
+ }
3
6
  }
@@ -1,30 +1,17 @@
1
1
  {
2
2
  "landing-page": {
3
- "header": "Landing page",
4
- "intro": "Choose one of the options below and press continue."
3
+ "header": "Landing page"
5
4
  },
6
5
  "build-your-own-form": {
7
6
  "title": "Build your own form",
8
7
  "subheader": "Access the build your own form guidance link"
9
8
  },
10
- "name": {
11
- "header": "What is your full name?"
12
- },
13
- "dob": {
14
- "header": "What is your date of birth?"
15
- },
16
9
  "address": {
17
10
  "header": "What is your address in the UK?",
18
11
  "intro": "If you have no fixed address, enter an address where we can contact you."
19
12
  },
20
- "checkboxes": {
21
- "header": "Where does your money come from each month?"
22
- },
23
- "radio": {
24
- "header": "What country was the appeal lodged?"
25
- },
26
- "country-select": {
27
- "header": "What country is your address located?"
13
+ "name": {
14
+ "header": "What is your full name?"
28
15
  },
29
16
  "email": {
30
17
  "header": "Enter your email address"
@@ -32,14 +19,6 @@
32
19
  "phone-number": {
33
20
  "header": "Enter your phone number"
34
21
  },
35
- "text-input-area": {
36
- "header": "What are the details of your complaint?",
37
- "intro": "Briefly summarise your complaint. Include anything that can help our investigation."
38
- },
39
- "select":{
40
- "header": "What is the appeal stage?",
41
- "intro": "Choose an appeal stage from the drop down menu"
42
- },
43
22
  "confirm": {
44
23
  "header": "Check your answers before submitting your application.",
45
24
  "sections": {
@@ -63,6 +42,9 @@
63
42
  },
64
43
  "complaintDetails": {
65
44
  "header": "Complaint details"
45
+ },
46
+ "whatHappened": {
47
+ "header": "What happened"
66
48
  }
67
49
  }
68
50
  },
@@ -72,4 +54,4 @@
72
54
  "subheader": "What happens next",
73
55
  "content": "We’ll contact you with the decision of your application or if we need more information from you."
74
56
  }
75
- }
57
+ }
@@ -42,7 +42,11 @@
42
42
  },
43
43
  "complaintDetails": {
44
44
  "default": "Enter details about why you are making a complaint",
45
- "maxlength": "Keep to the 5000 character limit"
45
+ "maxlength": "Keep to the {{maxlength}} character limit"
46
+ },
47
+ "whatHappened": {
48
+ "default": "Enter details about what happened",
49
+ "maxword": "Keep to the {{maxword}} word limit"
46
50
  },
47
51
  "appealStages": {
48
52
  "required": "Select an appeal stage from the list"
@@ -67,4 +67,4 @@ $('.typeahead').each(function applyTypeahead() {
67
67
  }),
68
68
  limit: 100
69
69
  });
70
- });
70
+ });
@@ -8,20 +8,20 @@
8
8
  width: 65%;
9
9
  }
10
10
 
11
- .tt-suggestion {
12
- padding: 0.5em;
13
-
14
- &:hover,
15
- &.tt-cursor {
16
- color: #fff;
17
- background-color: #0097cf;
18
- }
19
-
20
- &:hover {
21
- cursor: pointer;
22
- }
11
+ .tt-suggestion {
12
+ padding: 0.5em;
13
+
14
+ &:hover,
15
+ &.tt-cursor {
16
+ color: #fff;
17
+ background-color: #0097cf;
23
18
  }
24
-
25
- .twitter-typeahead {
26
- width: 100%;
27
- }
19
+
20
+ &:hover {
21
+ cursor: pointer;
22
+ }
23
+ }
24
+
25
+ .twitter-typeahead {
26
+ width: 100%;
27
+ }
@@ -9,13 +9,18 @@
9
9
  "scripts": {
10
10
  "start": "node server.js",
11
11
  "start:dev": "HOF_SANDBOX=true ../bin/hof-build watch",
12
+ "dev": "yarn && GA_TAG=test nodemon server",
12
13
  "build": "HOF_SANDBOX=true ../bin/hof-build",
13
14
  "postinstall": "yarn run build"
14
15
  },
15
16
  "author": "",
16
17
  "dependencies": {
18
+ "govuk-frontend": "3.14",
17
19
  "jquery": "^3.6.0",
20
+ "sass": "^1.53.0",
18
21
  "typeahead-aria": "^1.0.4"
19
22
  },
20
- "devDependencies": {}
23
+ "devDependencies": {
24
+ "nodemon": "^2.0.15"
25
+ }
21
26
  }