hof 19.14.8 → 20.0.0-beta.10

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