northants-design-system 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/build/index.js +239 -161
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +239 -161
- package/build/index.mjs.js.map +1 -1
- package/build/library/slices/GoogleMap/GoogleMap.storydata.d.ts +14 -0
- package/build/library/slices/InquestSchedule/InquestSchedule.types.d.ts +5 -0
- package/build/library/structure/NewsArticleFeaturedBlock/NewsArticleFeaturedBlock.storydata.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# 🎨 Northants Design Sytem
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
👉 **[You can view the design system here](https://northants-design-system.netlify.app)**
|
|
3
|
+
👉 **[You can view the design system here](https://design-system.westnorthants.gov.uk)**
|
|
6
4
|
|
|
7
5
|
The design system for North Northamptonshire & West Northamptonshire, two brand new unitary councils encompassing Wellingborough, Corby, Daventry, East Northants, Kettering, Northampton, Northamptonshire County and South Northants.
|
|
8
6
|
|
package/build/index.js
CHANGED
|
@@ -23204,17 +23204,17 @@ var GoogleMap = function (_a) {
|
|
|
23204
23204
|
var title = _a.title, description = _a.description, iframe_html = _a.iframe_html, link_title = _a.link_title, link_url = _a.link_url, allowCookies = _a.allowCookies;
|
|
23205
23205
|
var cookiesAccepted = wereCookiesAccepted(allowCookies);
|
|
23206
23206
|
var _b = React.useState(false), notServer = _b[0], setNotServer = _b[1];
|
|
23207
|
-
/* We extract the iframe source URL and check it actually goes to www.google.com/maps */
|
|
23207
|
+
/* We extract the iframe source URL and check it actually goes to www.google.com/maps or one.network*/
|
|
23208
23208
|
var src_matches = iframe_html.match(/src="([^"]+)"/gi);
|
|
23209
|
-
var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '') : '';
|
|
23209
|
+
var embed_url = (src_matches === null || src_matches === void 0 ? void 0 : src_matches.length) == 1 ? src_matches[0].replace('src="', '').replace('"', '') : '';
|
|
23210
23210
|
if (embed_url) {
|
|
23211
|
-
var
|
|
23212
|
-
embed_url = (
|
|
23211
|
+
var acceptable_embedded_url_matches = embed_url.match(/^https:\/\/www.google.com\/maps|https:\/\/api-gb\.one\.network\/embedded\//gi);
|
|
23212
|
+
embed_url = (acceptable_embedded_url_matches === null || acceptable_embedded_url_matches === void 0 ? void 0 : acceptable_embedded_url_matches.length) == 1 ? embed_url : '';
|
|
23213
23213
|
}
|
|
23214
|
-
/* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps */
|
|
23214
|
+
/* We also check the non-embed link goes to goo.gl/maps or www.google.com/maps or one.network*/
|
|
23215
23215
|
if (link_url) {
|
|
23216
|
-
var
|
|
23217
|
-
link_url = (
|
|
23216
|
+
var acceptable_non_embedded_url_matches = link_url.match(/^https:\/\/goo.gl\/maps|https:\/\/www.google.com\/maps|https:\/\/maps.app.goo.gl|https:\/\/one.network/gi);
|
|
23217
|
+
link_url = (acceptable_non_embedded_url_matches === null || acceptable_non_embedded_url_matches === void 0 ? void 0 : acceptable_non_embedded_url_matches.length) == 1 ? link_url : '';
|
|
23218
23218
|
}
|
|
23219
23219
|
React.useEffect(function () {
|
|
23220
23220
|
setNotServer(true);
|
|
@@ -23368,8 +23368,22 @@ var ImageAndText = function (_a) {
|
|
|
23368
23368
|
React__default.default.createElement(Content$6, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
23369
23369
|
};
|
|
23370
23370
|
|
|
23371
|
+
var CaseAppointmentType;
|
|
23372
|
+
(function (CaseAppointmentType) {
|
|
23373
|
+
CaseAppointmentType["Hearing"] = "AP Inquest Hearing";
|
|
23374
|
+
CaseAppointmentType["Opening"] = "AP Inquest Opening";
|
|
23375
|
+
CaseAppointmentType["Writing"] = "AP Inquest In Writing";
|
|
23376
|
+
})(CaseAppointmentType || (CaseAppointmentType = {}));
|
|
23377
|
+
|
|
23371
23378
|
const Container$Q = styled__default.default.div`
|
|
23372
23379
|
display: block;
|
|
23380
|
+
box-sizing: border-box;
|
|
23381
|
+
`;
|
|
23382
|
+
|
|
23383
|
+
const GroupContainer = styled__default.default.div`
|
|
23384
|
+
display: flex;
|
|
23385
|
+
flex-direction: column;
|
|
23386
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
23373
23387
|
`;
|
|
23374
23388
|
|
|
23375
23389
|
const InquestContainer = styled__default.default.div`
|
|
@@ -23401,15 +23415,29 @@ const InquestDetails = styled__default.default.div`
|
|
|
23401
23415
|
*/
|
|
23402
23416
|
var InquestSchedule = function (_a) {
|
|
23403
23417
|
var caseAppointments = _a.caseAppointments, title = _a.title, _b = _a.error, error = _b === void 0 ? false : _b;
|
|
23404
|
-
var
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
return
|
|
23412
|
-
}
|
|
23418
|
+
var hearings = caseAppointments.filter(function (appointment) {
|
|
23419
|
+
return appointment.appointmentType === CaseAppointmentType.Hearing;
|
|
23420
|
+
});
|
|
23421
|
+
var openings = caseAppointments.filter(function (appointment) {
|
|
23422
|
+
return appointment.appointmentType === CaseAppointmentType.Opening;
|
|
23423
|
+
});
|
|
23424
|
+
var writings = caseAppointments.filter(function (appointment) {
|
|
23425
|
+
return appointment.appointmentType === CaseAppointmentType.Writing;
|
|
23426
|
+
});
|
|
23427
|
+
var groupHearingsByDay = function (appointments) {
|
|
23428
|
+
return appointments.reduce(function (acc, inquest) {
|
|
23429
|
+
var inquestDate = new Date(inquest.startDateTime);
|
|
23430
|
+
var inquestISODay = inquestDate.toISOString().substring(0, 10);
|
|
23431
|
+
if (!acc[inquestISODay]) {
|
|
23432
|
+
acc[inquestISODay] = [];
|
|
23433
|
+
}
|
|
23434
|
+
acc[inquestISODay].push(inquest);
|
|
23435
|
+
return acc;
|
|
23436
|
+
}, {});
|
|
23437
|
+
};
|
|
23438
|
+
var hearingDayGrouped = groupHearingsByDay(hearings);
|
|
23439
|
+
var openingDayGrouped = groupHearingsByDay(openings);
|
|
23440
|
+
var writingDayGrouped = groupHearingsByDay(writings);
|
|
23413
23441
|
var formatDate = function (inquestDay) {
|
|
23414
23442
|
return inquestDay
|
|
23415
23443
|
.toLocaleDateString('en-GB', {
|
|
@@ -23423,13 +23451,12 @@ var InquestSchedule = function (_a) {
|
|
|
23423
23451
|
var formatTime = function (inquestDate) {
|
|
23424
23452
|
return inquestDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
23425
23453
|
};
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
Object.keys(inquestDayGrouped).map(function (day) {
|
|
23454
|
+
var transformToSections = function (groupedData) {
|
|
23455
|
+
return Object.keys(groupedData).map(function (day) {
|
|
23429
23456
|
var inquestDayDate = new Date(day);
|
|
23430
|
-
return
|
|
23431
|
-
|
|
23432
|
-
React__default.default.createElement(Row$1, null,
|
|
23457
|
+
return {
|
|
23458
|
+
title: formatDate(inquestDayDate),
|
|
23459
|
+
content: (React__default.default.createElement(Row$1, null, groupedData[day]
|
|
23433
23460
|
.sort(function (a, b) {
|
|
23434
23461
|
return new Date(a.startDateTime).getTime() - new Date(b.startDateTime).getTime();
|
|
23435
23462
|
})
|
|
@@ -23465,8 +23492,20 @@ var InquestSchedule = function (_a) {
|
|
|
23465
23492
|
" ",
|
|
23466
23493
|
inquest.coroner,
|
|
23467
23494
|
"."))));
|
|
23468
|
-
})))
|
|
23469
|
-
|
|
23495
|
+
}))),
|
|
23496
|
+
};
|
|
23497
|
+
});
|
|
23498
|
+
};
|
|
23499
|
+
return (React__default.default.createElement(Container$Q, { "data-testid": "InquestSchedule" },
|
|
23500
|
+
Object.keys(hearingDayGrouped).length > 0 && (React__default.default.createElement(GroupContainer, null,
|
|
23501
|
+
React__default.default.createElement(Heading$1, { level: 2, text: title }),
|
|
23502
|
+
React__default.default.createElement(Accordion$1, { sections: transformToSections(hearingDayGrouped) }))),
|
|
23503
|
+
Object.keys(openingDayGrouped).length > 0 && (React__default.default.createElement(GroupContainer, null,
|
|
23504
|
+
React__default.default.createElement(Heading$1, { level: 2, text: "Inquest Openings" }),
|
|
23505
|
+
React__default.default.createElement(Accordion$1, { sections: transformToSections(openingDayGrouped) }))),
|
|
23506
|
+
Object.keys(writingDayGrouped).length > 0 && (React__default.default.createElement(GroupContainer, null,
|
|
23507
|
+
React__default.default.createElement(Heading$1, { level: 2, text: "Inquests in Writing" }),
|
|
23508
|
+
React__default.default.createElement(Accordion$1, { sections: transformToSections(writingDayGrouped) }))),
|
|
23470
23509
|
caseAppointments.length === 0 && (React__default.default.createElement("div", null,
|
|
23471
23510
|
React__default.default.createElement("p", null, "We can't find any results at the moment."),
|
|
23472
23511
|
error ? (React__default.default.createElement("p", null, " The information is currently unavailable.")) : (React__default.default.createElement("p", null, "There are no inquests scheduled for next month."))))));
|
|
@@ -25095,7 +25134,27 @@ const Container$C = styled__default.default.div`
|
|
|
25095
25134
|
}
|
|
25096
25135
|
|
|
25097
25136
|
#google_translate_element {
|
|
25098
|
-
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.
|
|
25137
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
25138
|
+
|
|
25139
|
+
a {
|
|
25140
|
+
padding: 14px 0;
|
|
25141
|
+
display: inline-block;
|
|
25142
|
+
|
|
25143
|
+
&:hover {
|
|
25144
|
+
${(props) => props.theme.linkStyles};
|
|
25145
|
+
}
|
|
25146
|
+
&:active {
|
|
25147
|
+
${(props) => props.theme.linkStylesActive};
|
|
25148
|
+
}
|
|
25149
|
+
&:focus {
|
|
25150
|
+
${(props) => props.theme.linkStylesFocus};
|
|
25151
|
+
}
|
|
25152
|
+
}
|
|
25153
|
+
|
|
25154
|
+
a::after {
|
|
25155
|
+
content: ' (opens in new window)';
|
|
25156
|
+
font-weight: normal;
|
|
25157
|
+
}
|
|
25099
25158
|
}
|
|
25100
25159
|
`;
|
|
25101
25160
|
|
|
@@ -25112,6 +25171,10 @@ var GoogleTranslate = function (_a) {
|
|
|
25112
25171
|
pageLanguage: pageLanguage,
|
|
25113
25172
|
autoDisplay: false,
|
|
25114
25173
|
}, 'google_translate_element');
|
|
25174
|
+
var popupForm = document.getElementById('goog-gt-vt');
|
|
25175
|
+
if (popupForm) {
|
|
25176
|
+
popupForm.remove();
|
|
25177
|
+
}
|
|
25115
25178
|
};
|
|
25116
25179
|
React.useEffect(function () {
|
|
25117
25180
|
var addScript = document.createElement('script');
|
|
@@ -25289,15 +25352,10 @@ const HomeLink = styled__default.default.a`
|
|
|
25289
25352
|
}
|
|
25290
25353
|
}
|
|
25291
25354
|
&:focus {
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
props.theme.cardinal_name === 'north'
|
|
25297
|
-
? props.theme.theme_vars.colours.black
|
|
25298
|
-
: props.theme.theme_vars.colours.focus}
|
|
25299
|
-
0 0 0 4px;
|
|
25300
|
-
transition: box-shadow 0.3s ease 0s;
|
|
25355
|
+
${(props) => props.theme.linkStylesFocus}
|
|
25356
|
+
}
|
|
25357
|
+
&:active {
|
|
25358
|
+
${(props) => props.theme.linkStylesActive}
|
|
25301
25359
|
}
|
|
25302
25360
|
`;
|
|
25303
25361
|
|
|
@@ -27756,6 +27814,23 @@ const FormContainer$1 = styled__default.default(Container$o)`
|
|
|
27756
27814
|
}
|
|
27757
27815
|
`;
|
|
27758
27816
|
|
|
27817
|
+
const PanelWrapper = styled__default.default.div`
|
|
27818
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27819
|
+
`;
|
|
27820
|
+
|
|
27821
|
+
const FormWrapper = styled__default.default.div`
|
|
27822
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27823
|
+
`;
|
|
27824
|
+
|
|
27825
|
+
const ShowQuestion = styled__default.default.div`
|
|
27826
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27827
|
+
`;
|
|
27828
|
+
|
|
27829
|
+
const ShowFullForm = styled__default.default.div`
|
|
27830
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27831
|
+
flex-direction: column;
|
|
27832
|
+
`;
|
|
27833
|
+
|
|
27759
27834
|
const Legend$2 = styled__default.default.legend`
|
|
27760
27835
|
margin-bottom: 5px;
|
|
27761
27836
|
font-weight: bold;
|
|
@@ -28119,147 +28194,150 @@ var RateThisPage = function (_a) {
|
|
|
28119
28194
|
setShowSubmit(true);
|
|
28120
28195
|
};
|
|
28121
28196
|
return (React__default.default.createElement(FormContainer$1, { as: "section", "data-testid": "RateThisPage", "aria-label": "Rate This Page" },
|
|
28122
|
-
|
|
28123
|
-
React__default.default.createElement(
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28128
|
-
React__default.default.createElement(reactHookForm.Controller, { name: "IsHelpful", control: control, rules: { required: { value: true, message: 'The field is this information helpful is required.' } }, render: function (_a) {
|
|
28129
|
-
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28130
|
-
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28131
|
-
errors.IsHelpful && (React__default.default.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
28132
|
-
React__default.default.createElement(Hidden, null, "Error:"),
|
|
28133
|
-
" ",
|
|
28134
|
-
errors.IsHelpful.message)),
|
|
28135
|
-
Object.entries(HelpfulEnum).map(function (_a) {
|
|
28136
|
-
var key = _a[0], enumValue = _a[1];
|
|
28137
|
-
return (React__default.default.createElement(RadioCheckboxInput, { key: key, value: enumValue, label: HelpfulEnum[key], checked: String(value) == enumValue, name: "IsHelpful", singleSelection: true, onChange: onChange, isErrored: errors.IsHelpful ? true : false }));
|
|
28138
|
-
})));
|
|
28139
|
-
} }))),
|
|
28140
|
-
showQuestion && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28141
|
-
React__default.default.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28142
|
-
React__default.default.createElement(QuestionContainer, null,
|
|
28143
|
-
React__default.default.createElement(QuestionTitle, null, "Content"),
|
|
28144
|
-
React__default.default.createElement("p", null, "You may have comments about the content on the webpage. For example:"),
|
|
28145
|
-
React__default.default.createElement("ul", null,
|
|
28146
|
-
React__default.default.createElement("li", null, "The information on this page is difficult to understand"),
|
|
28147
|
-
React__default.default.createElement("li", null, "This page isn't giving me the information I need"),
|
|
28148
|
-
React__default.default.createElement("li", null, "This page contains information that is wrong or out of date"),
|
|
28149
|
-
React__default.default.createElement("li", null, "This page could have been written or presented better")),
|
|
28150
|
-
React__default.default.createElement("p", null, "Your feedback will help us improve our website and the content we include."),
|
|
28151
|
-
React__default.default.createElement(QuestionButton, null,
|
|
28152
|
-
React__default.default.createElement(FormButton, { text: "I have feedback about the information on this page", type: "button", size: "medium", onClick: handleQuestionButton })))),
|
|
28153
|
-
React__default.default.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28154
|
-
React__default.default.createElement(QuestionContainer, null,
|
|
28155
|
-
React__default.default.createElement(QuestionTitle, null, "Service"),
|
|
28156
|
-
React__default.default.createElement("p", null, "You may have comments about the quality of the service that's been provided. For example:"),
|
|
28157
|
-
React__default.default.createElement("ul", null,
|
|
28158
|
-
React__default.default.createElement("li", null, "I have waited too long for something to happen"),
|
|
28159
|
-
React__default.default.createElement("li", null, "I'm struggling to contact the service"),
|
|
28160
|
-
React__default.default.createElement("li", null, "I don't think I have been treated fairly"),
|
|
28161
|
-
React__default.default.createElement("li", null, "I feel as if I have been misled")),
|
|
28162
|
-
React__default.default.createElement(QuestionButton, null,
|
|
28163
|
-
React__default.default.createElement(Button$4, { url: complaintsFormLink }, "I have a comment or complaint about this service")))))),
|
|
28164
|
-
showFullForm && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28197
|
+
React__default.default.createElement(PanelWrapper, { "$show": isSuccessful },
|
|
28198
|
+
React__default.default.createElement(Panel, { heading: "Thank you for your feedback." }, String(watchIsHelpful) === 'No' && React__default.default.createElement("p", null, "Your comments will help us improve the website."))),
|
|
28199
|
+
React__default.default.createElement(FormWrapper, { "$show": !isSuccessful },
|
|
28200
|
+
React__default.default.createElement("form", { onSubmit: executeCaptcha, ref: fullFormRef },
|
|
28201
|
+
React__default.default.createElement(Row$1, null,
|
|
28202
|
+
errors && Object.keys(errors).length > 0 && React__default.default.createElement(ErrorSummary, { errors: errors }),
|
|
28165
28203
|
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28166
|
-
React__default.default.createElement("fieldset", { "aria-describedby":
|
|
28167
|
-
React__default.default.createElement(Legend$2, { id: "
|
|
28168
|
-
React__default.default.createElement(
|
|
28169
|
-
React__default.default.createElement(reactHookForm.Controller, { name: "HowEasyToFind", control: control, rules: {
|
|
28170
|
-
pattern: {
|
|
28171
|
-
value: /^[1-5]+$/i,
|
|
28172
|
-
message: 'The field how easy is it to find what you are looking for is invalid.',
|
|
28173
|
-
},
|
|
28174
|
-
required: {
|
|
28175
|
-
value: true,
|
|
28176
|
-
message: 'The field how easy is it to find what you are looking for is required.',
|
|
28177
|
-
},
|
|
28178
|
-
}, render: function (_a) {
|
|
28204
|
+
React__default.default.createElement("fieldset", { "aria-describedby": errors.IsHelpful ? 'IsHelpfulError' : 'IsHelpfulLegend' },
|
|
28205
|
+
React__default.default.createElement(Legend$2, { id: "IsHelpfulLegend" }, "Is this information helpful?"),
|
|
28206
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "IsHelpful", control: control, rules: { required: { value: true, message: 'The field is this information helpful is required.' } }, render: function (_a) {
|
|
28179
28207
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28180
28208
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28181
|
-
errors.
|
|
28209
|
+
errors.IsHelpful && (React__default.default.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
28182
28210
|
React__default.default.createElement(Hidden, null, "Error:"),
|
|
28183
28211
|
" ",
|
|
28184
|
-
errors.
|
|
28185
|
-
|
|
28212
|
+
errors.IsHelpful.message)),
|
|
28213
|
+
Object.entries(HelpfulEnum).map(function (_a) {
|
|
28214
|
+
var key = _a[0], enumValue = _a[1];
|
|
28215
|
+
return (React__default.default.createElement(RadioCheckboxInput, { key: key, value: enumValue, label: HelpfulEnum[key], checked: String(value) == enumValue, name: "IsHelpful", singleSelection: true, onChange: onChange, isErrored: errors.IsHelpful ? true : false }));
|
|
28216
|
+
})));
|
|
28186
28217
|
} }))),
|
|
28187
|
-
React__default.default.createElement(
|
|
28188
|
-
React__default.default.createElement("
|
|
28189
|
-
React__default.default.createElement(
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28218
|
+
React__default.default.createElement(ShowQuestion, { "$show": showQuestion },
|
|
28219
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28220
|
+
React__default.default.createElement(QuestionContainer, null,
|
|
28221
|
+
React__default.default.createElement(QuestionTitle, null, "Content"),
|
|
28222
|
+
React__default.default.createElement("p", null, "You may have comments about the content on the webpage. For example:"),
|
|
28223
|
+
React__default.default.createElement("ul", null,
|
|
28224
|
+
React__default.default.createElement("li", null, "The information on this page is difficult to understand"),
|
|
28225
|
+
React__default.default.createElement("li", null, "This page isn't giving me the information I need"),
|
|
28226
|
+
React__default.default.createElement("li", null, "This page contains information that is wrong or out of date"),
|
|
28227
|
+
React__default.default.createElement("li", null, "This page could have been written or presented better")),
|
|
28228
|
+
React__default.default.createElement("p", null, "Your feedback will help us improve our website and the content we include."),
|
|
28229
|
+
React__default.default.createElement(QuestionButton, null,
|
|
28230
|
+
React__default.default.createElement(FormButton, { text: "I have feedback about the information on this page", type: "button", size: "medium", onClick: handleQuestionButton })))),
|
|
28231
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28232
|
+
React__default.default.createElement(QuestionContainer, null,
|
|
28233
|
+
React__default.default.createElement(QuestionTitle, null, "Service"),
|
|
28234
|
+
React__default.default.createElement("p", null, "You may have comments about the quality of the service that's been provided. For example:"),
|
|
28235
|
+
React__default.default.createElement("ul", null,
|
|
28236
|
+
React__default.default.createElement("li", null, "I have waited too long for something to happen"),
|
|
28237
|
+
React__default.default.createElement("li", null, "I'm struggling to contact the service"),
|
|
28238
|
+
React__default.default.createElement("li", null, "I don't think I have been treated fairly"),
|
|
28239
|
+
React__default.default.createElement("li", null, "I feel as if I have been misled")),
|
|
28240
|
+
React__default.default.createElement(QuestionButton, null,
|
|
28241
|
+
React__default.default.createElement(Button$4, { url: complaintsFormLink }, "I have a comment or complaint about this service"))))),
|
|
28242
|
+
React__default.default.createElement(ShowFullForm, { "$show": showFullForm },
|
|
28243
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28244
|
+
React__default.default.createElement("fieldset", { "aria-describedby": "HowEasyToFindLegend" },
|
|
28245
|
+
React__default.default.createElement(Legend$2, { id: "HowEasyToFindLegend" }, "How easy was it to find what you were looking for?"),
|
|
28246
|
+
React__default.default.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
28247
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "HowEasyToFind", control: control, rules: {
|
|
28248
|
+
pattern: {
|
|
28249
|
+
value: /^[1-5]+$/i,
|
|
28250
|
+
message: 'The field how easy is it to find what you are looking for is invalid.',
|
|
28251
|
+
},
|
|
28252
|
+
required: {
|
|
28253
|
+
value: showFullForm,
|
|
28254
|
+
message: 'The field how easy is it to find what you are looking for is required.',
|
|
28255
|
+
},
|
|
28256
|
+
}, render: function (_a) {
|
|
28257
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28258
|
+
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28259
|
+
errors.HowEasyToFind && (React__default.default.createElement(FormErrorText, { id: "HowEasyToFindError" },
|
|
28260
|
+
React__default.default.createElement(Hidden, null, "Error:"),
|
|
28261
|
+
" ",
|
|
28262
|
+
errors.HowEasyToFind.message)),
|
|
28263
|
+
RatingValues.map(function (ratingValue, index) { return (React__default.default.createElement(RadioCheckboxInput, { key: index, value: ratingValue.value, label: ratingValue.label, checked: String(value) == ratingValue.value, name: "HowEasyToFind", singleSelection: true, onChange: onChange, isErrored: errors.HowEasyToFind ? true : false })); })));
|
|
28264
|
+
} }))),
|
|
28265
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28266
|
+
React__default.default.createElement("fieldset", { "aria-describedby": "HowEasyToUnderstandLegend" },
|
|
28267
|
+
React__default.default.createElement(Legend$2, { id: "HowEasyToUnderstandLegend" }, "How easy was this content to understand?"),
|
|
28268
|
+
React__default.default.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
28269
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "HowEasyToUnderstand", control: control, rules: {
|
|
28270
|
+
pattern: {
|
|
28271
|
+
value: /^[1-5]+$/i,
|
|
28272
|
+
message: 'The field how easy was this content to understand is invalid.',
|
|
28273
|
+
},
|
|
28274
|
+
required: {
|
|
28275
|
+
value: showFullForm,
|
|
28276
|
+
message: 'The field how easy was this content to understand is required.',
|
|
28277
|
+
},
|
|
28278
|
+
}, render: function (_a) {
|
|
28279
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28280
|
+
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28281
|
+
errors.HowEasyToUnderstand && (React__default.default.createElement(FormErrorText, { id: "HowEasyToUnderstandError" },
|
|
28282
|
+
React__default.default.createElement(Hidden, null, "Error:"),
|
|
28283
|
+
" ",
|
|
28284
|
+
errors.HowEasyToUnderstand.message)),
|
|
28285
|
+
RatingValues.map(function (ratingValue, index) { return (React__default.default.createElement(RadioCheckboxInput, { key: index, value: ratingValue.value, label: ratingValue.label, checked: String(value) == ratingValue.value, name: "HowEasyToUnderstand", singleSelection: true, onChange: onChange, isErrored: errors.HowEasyToUnderstand ? true : false })); })));
|
|
28286
|
+
} }))),
|
|
28287
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28288
|
+
React__default.default.createElement(Label$3, { htmlFor: "BarriersOrIssues" }, "Did you come across any barriers or issues with this webpage?"),
|
|
28289
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "BarriersOrIssues", control: control, rules: {
|
|
28290
|
+
maxLength: {
|
|
28291
|
+
value: 3000,
|
|
28292
|
+
message: 'The field did you come across any barriers or issues with this webpage must be less than 3000 characters.',
|
|
28195
28293
|
},
|
|
28196
28294
|
required: {
|
|
28197
|
-
value:
|
|
28198
|
-
message: 'The field
|
|
28295
|
+
value: showFullForm,
|
|
28296
|
+
message: 'The field did you come across any barriers or issues with this webpage is required.',
|
|
28199
28297
|
},
|
|
28200
28298
|
}, render: function (_a) {
|
|
28201
28299
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28202
28300
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
28203
|
-
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
28301
|
+
React__default.default.createElement(Textarea, { id: "BarriersOrIssues", name: "BarriersOrIssues", value: value, placeholder: "", onChange: onChange, isErrored: errors.BarriersOrIssues ? true : false, errorText: errors.BarriersOrIssues ? errors.BarriersOrIssues.message : null, isFullWidth: true })));
|
|
28302
|
+
} })),
|
|
28303
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28304
|
+
React__default.default.createElement(Label$3, { htmlFor: "HowCanWeImprove" }, "How could this page be improved? (optional)"),
|
|
28305
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "HowCanWeImprove", control: control, rules: {
|
|
28306
|
+
maxLength: {
|
|
28307
|
+
value: 3000,
|
|
28308
|
+
message: 'The field how could this page be improved must be less than 3000 characters.',
|
|
28309
|
+
},
|
|
28310
|
+
}, render: function (_a) {
|
|
28311
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28312
|
+
return (React__default.default.createElement(Textarea, { id: "HowCanWeImprove", name: "HowCanWeImprove", value: value, placeholder: "", onChange: onChange, isErrored: errors.HowCanWeImprove ? true : false, errorText: errors.HowCanWeImprove ? errors.HowCanWeImprove.message : null, isFullWidth: true }));
|
|
28313
|
+
} })),
|
|
28314
|
+
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28315
|
+
React__default.default.createElement(Label$3, { htmlFor: "Email" }, "Please leave your email below if you are happy for us to contact you further (optional)"),
|
|
28316
|
+
React__default.default.createElement(reactHookForm.Controller, { name: "Email", control: control, rules: {
|
|
28317
|
+
maxLength: { value: 150, message: 'The email address must be less than 150 characters.' },
|
|
28318
|
+
pattern: {
|
|
28319
|
+
value: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
28320
|
+
message: 'Invalid email address.',
|
|
28321
|
+
},
|
|
28322
|
+
}, render: function (_a) {
|
|
28323
|
+
var _b = _a.field, onChange = _b.onChange; _b.onBlur; var value = _b.value; _b.ref;
|
|
28324
|
+
return (React__default.default.createElement(Input$6, { id: "Email", name: "Email", value: value, placeholder: "", onChange: onChange, isErrored: errors.Email ? true : false, errorText: errors.Email ? errors.Email.message : null, isFullWidth: true }));
|
|
28208
28325
|
} }))),
|
|
28209
28326
|
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28210
|
-
React__default.default.createElement(
|
|
28211
|
-
React__default.default.createElement(
|
|
28212
|
-
|
|
28213
|
-
|
|
28214
|
-
|
|
28215
|
-
|
|
28216
|
-
|
|
28217
|
-
|
|
28218
|
-
|
|
28219
|
-
|
|
28220
|
-
|
|
28221
|
-
|
|
28222
|
-
|
|
28223
|
-
|
|
28224
|
-
} })),
|
|
28225
|
-
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28226
|
-
React__default.default.createElement(Label$3, { htmlFor: "HowCanWeImprove" }, "How could this page be improved? (optional)"),
|
|
28227
|
-
React__default.default.createElement(reactHookForm.Controller, { name: "HowCanWeImprove", control: control, rules: {
|
|
28228
|
-
maxLength: {
|
|
28229
|
-
value: 3000,
|
|
28230
|
-
message: 'The field how could this page be improved must be less than 3000 characters.',
|
|
28231
|
-
},
|
|
28232
|
-
}, render: function (_a) {
|
|
28233
|
-
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28234
|
-
return (React__default.default.createElement(Textarea, { id: "HowCanWeImprove", name: "HowCanWeImprove", value: value, placeholder: "", onChange: onChange, isErrored: errors.HowCanWeImprove ? true : false, errorText: errors.HowCanWeImprove ? errors.HowCanWeImprove.message : null, isFullWidth: true }));
|
|
28235
|
-
} })),
|
|
28236
|
-
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28237
|
-
React__default.default.createElement(Label$3, { htmlFor: "Email" }, "Please leave your email below if you are happy for us to contact you further (optional)"),
|
|
28238
|
-
React__default.default.createElement(reactHookForm.Controller, { name: "Email", control: control, rules: {
|
|
28239
|
-
maxLength: { value: 150, message: 'The email address must be less than 150 characters.' },
|
|
28240
|
-
pattern: {
|
|
28241
|
-
value: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
28242
|
-
message: 'Invalid email address.',
|
|
28243
|
-
},
|
|
28244
|
-
}, render: function (_a) {
|
|
28245
|
-
var _b = _a.field, onChange = _b.onChange; _b.onBlur; var value = _b.value; _b.ref;
|
|
28246
|
-
return (React__default.default.createElement(Input$6, { id: "Email", name: "Email", value: value, placeholder: "", onChange: onChange, isErrored: errors.Email ? true : false, errorText: errors.Email ? errors.Email.message : null, isFullWidth: true }));
|
|
28247
|
-
} })))),
|
|
28248
|
-
React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28249
|
-
React__default.default.createElement("input", __assign$2({ type: "hidden" }, register('ReCaptcha'))),
|
|
28250
|
-
React__default.default.createElement(Terms, null,
|
|
28251
|
-
"This site is protected by reCAPTCHA and the Google",
|
|
28252
|
-
' ',
|
|
28253
|
-
React__default.default.createElement("a", { href: "https://policies.google.com/privacy" }, "Privacy Policy"),
|
|
28254
|
-
" and",
|
|
28255
|
-
' ',
|
|
28256
|
-
React__default.default.createElement("a", { href: "https://policies.google.com/terms" }, "Terms of Service"),
|
|
28257
|
-
" apply.")),
|
|
28258
|
-
showSubmit && (React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28259
|
-
React__default.default.createElement(React__default.default.Fragment, null, isLoading ? (React__default.default.createElement(LoadingSpinner, null)) : (React__default.default.createElement(FormButton, { text: "Submit", type: "submit", size: "large", isDisabled: !recaptchaLoaded }))))),
|
|
28260
|
-
isError && (React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28261
|
-
React__default.default.createElement(AlertBannerService, null,
|
|
28262
|
-
React__default.default.createElement("p", null, "An error has occurred."))))))),
|
|
28327
|
+
React__default.default.createElement("input", __assign$2({ type: "hidden" }, register('ReCaptcha'))),
|
|
28328
|
+
React__default.default.createElement(Terms, null,
|
|
28329
|
+
"This site is protected by reCAPTCHA and the Google",
|
|
28330
|
+
' ',
|
|
28331
|
+
React__default.default.createElement("a", { href: "https://policies.google.com/privacy" }, "Privacy Policy"),
|
|
28332
|
+
" and",
|
|
28333
|
+
' ',
|
|
28334
|
+
React__default.default.createElement("a", { href: "https://policies.google.com/terms" }, "Terms of Service"),
|
|
28335
|
+
" apply.")),
|
|
28336
|
+
showSubmit && (React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28337
|
+
React__default.default.createElement(React__default.default.Fragment, null, isLoading ? (React__default.default.createElement(LoadingSpinner, null)) : (React__default.default.createElement(FormButton, { text: "Submit", type: "submit", size: "large", isDisabled: !recaptchaLoaded }))))),
|
|
28338
|
+
isError && (React__default.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28339
|
+
React__default.default.createElement(AlertBannerService, null,
|
|
28340
|
+
React__default.default.createElement("p", null, "An error has occurred."))))))),
|
|
28263
28341
|
React__default.default.createElement("div", { id: recaptchaContainerId, className: "g-recaptcha" })));
|
|
28264
28342
|
};
|
|
28265
28343
|
|