northants-design-system 1.3.0 → 1.3.2
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 +278 -208
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +278 -208
- package/build/index.mjs.js.map +1 -1
- package/build/library/components/DropDownFilter/DropDownFilter.d.ts +3 -3
- package/build/library/components/DropDownFilter/DropDownFilter.types.d.ts +14 -6
- 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/build/index.mjs.js
CHANGED
|
@@ -3624,7 +3624,7 @@ var Autocomplete = function (_a) {
|
|
|
3624
3624
|
})));
|
|
3625
3625
|
};
|
|
3626
3626
|
|
|
3627
|
-
const Container$
|
|
3627
|
+
const Container$1k = styled.div`
|
|
3628
3628
|
display: block;
|
|
3629
3629
|
`;
|
|
3630
3630
|
|
|
@@ -3709,7 +3709,7 @@ var BackToTop = function (_a) {
|
|
|
3709
3709
|
useEffect(function () {
|
|
3710
3710
|
window.addEventListener('scroll', toggleVisible);
|
|
3711
3711
|
});
|
|
3712
|
-
return (React.createElement(Container$
|
|
3712
|
+
return (React.createElement(Container$1k, { "data-testid": "BackToTop" }, isActive && (React.createElement(BackToTopButton, { onClick: scrollToTop, "$visible": visible, "data-testid": "BackToTopButton", type: "button", "aria-label": "Go to the top of the page" },
|
|
3713
3713
|
React.createElement(ChevronIcon, { colourFill: themeContext.theme_vars.colours.white, direction: "up" })))));
|
|
3714
3714
|
};
|
|
3715
3715
|
|
|
@@ -6148,7 +6148,7 @@ var HeadingWithIcon = function (_a) {
|
|
|
6148
6148
|
subHeading && React.createElement(SubHeading, null, subHeading))));
|
|
6149
6149
|
};
|
|
6150
6150
|
|
|
6151
|
-
const Container$
|
|
6151
|
+
const Container$1j = styled.div`
|
|
6152
6152
|
display: flex;
|
|
6153
6153
|
width: 100%;
|
|
6154
6154
|
min-height: 400px;
|
|
@@ -6172,7 +6172,7 @@ var Map$1 = function (_a) {
|
|
|
6172
6172
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
6173
6173
|
}
|
|
6174
6174
|
}, [ref, map]);
|
|
6175
|
-
return (React.createElement(Container$
|
|
6175
|
+
return (React.createElement(Container$1j, { "data-testid": "Map" },
|
|
6176
6176
|
React.createElement("div", { ref: ref }),
|
|
6177
6177
|
React.Children.map(children, function (child) {
|
|
6178
6178
|
if (React.isValidElement(child)) {
|
|
@@ -6229,7 +6229,7 @@ var MapMarker = function (options) {
|
|
|
6229
6229
|
return null;
|
|
6230
6230
|
};
|
|
6231
6231
|
|
|
6232
|
-
const Container$
|
|
6232
|
+
const Container$1i = styled.div`
|
|
6233
6233
|
${(props) => props.theme.fontStyles};
|
|
6234
6234
|
display: block;
|
|
6235
6235
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -7007,7 +7007,7 @@ var Pagination = function (_a) {
|
|
|
7007
7007
|
}
|
|
7008
7008
|
};
|
|
7009
7009
|
if (numbers.length > 1) {
|
|
7010
|
-
return (React.createElement(Container$
|
|
7010
|
+
return (React.createElement(Container$1i, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
7011
7011
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
7012
7012
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
7013
7013
|
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
@@ -7019,7 +7019,7 @@ var Pagination = function (_a) {
|
|
|
7019
7019
|
return null;
|
|
7020
7020
|
};
|
|
7021
7021
|
|
|
7022
|
-
const Container$
|
|
7022
|
+
const Container$1h = styled.div`
|
|
7023
7023
|
${(props) => props.theme.fontStyles};
|
|
7024
7024
|
margin-bottom: 30px;
|
|
7025
7025
|
`;
|
|
@@ -7145,24 +7145,32 @@ const CheckboxLabel = styled.label`
|
|
|
7145
7145
|
`;
|
|
7146
7146
|
|
|
7147
7147
|
const NewsArticleFilterFields = {
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7148
|
+
search: {
|
|
7149
|
+
title: 'Search articles',
|
|
7150
|
+
queryParamKey: 'searchTerm',
|
|
7151
|
+
},
|
|
7152
|
+
services: {
|
|
7153
|
+
title: 'Services',
|
|
7154
|
+
queryParamKey: 'services',
|
|
7155
|
+
},
|
|
7156
|
+
articleType: {
|
|
7157
|
+
title: 'Type of Article',
|
|
7158
|
+
queryParamKey: 'articleType',
|
|
7159
|
+
},
|
|
7160
|
+
year: {
|
|
7161
|
+
title: 'Date',
|
|
7162
|
+
queryParamKey: 'year',
|
|
7163
|
+
},
|
|
7164
|
+
month: {
|
|
7165
|
+
title: 'Date',
|
|
7166
|
+
queryParamKey: 'month',
|
|
7167
|
+
},
|
|
7168
|
+
sortBy: {
|
|
7169
|
+
title: 'Sort by',
|
|
7170
|
+
queryParamKey: 'sortBy',
|
|
7171
|
+
},
|
|
7172
|
+
// what is included in the filter removal
|
|
7173
|
+
removeFiltersList: ['searchTerm', 'services', 'articleType', 'month', 'year'],
|
|
7166
7174
|
};
|
|
7167
7175
|
|
|
7168
7176
|
var CheckboxListFilter = function (_a) {
|
|
@@ -7190,7 +7198,7 @@ var CheckboxListFilter = function (_a) {
|
|
|
7190
7198
|
handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
|
|
7191
7199
|
};
|
|
7192
7200
|
var backupLabel = Math.random().toString(36).substring(7);
|
|
7193
|
-
return (React.createElement(Container$
|
|
7201
|
+
return (React.createElement(Container$1h, { "data-testid": "CheckboxListFilter" },
|
|
7194
7202
|
React.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
7195
7203
|
React.createElement(Legend$3, { "$labelHidden": labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
7196
7204
|
React.createElement(Hint$1, { id: hintId, "$hintHidden": hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -7199,6 +7207,10 @@ var CheckboxListFilter = function (_a) {
|
|
|
7199
7207
|
React.createElement(CheckboxLabel, { "$isChecked": option.checked, htmlFor: option.value }, option.title))); })))));
|
|
7200
7208
|
};
|
|
7201
7209
|
|
|
7210
|
+
const Container$1g = styled.div`
|
|
7211
|
+
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.small : 0)};
|
|
7212
|
+
`;
|
|
7213
|
+
|
|
7202
7214
|
const Container$1f = styled.div`
|
|
7203
7215
|
${(props) => props.theme.fontStyles};
|
|
7204
7216
|
`;
|
|
@@ -7271,13 +7283,14 @@ var DropDownSelect = function (_a) {
|
|
|
7271
7283
|
};
|
|
7272
7284
|
|
|
7273
7285
|
var DropDownFilter = function (_a) {
|
|
7274
|
-
var id = _a.id, label = _a.label, options = _a.options, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
|
|
7275
|
-
var
|
|
7286
|
+
var id = _a.id, label = _a.label, options = _a.options, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b, _c = _a.filterKey, filterKey = _c === void 0 ? 'services' : _c, _d = _a.hasMargin, hasMargin = _d === void 0 ? false : _d;
|
|
7287
|
+
var _e = useState(selected), value = _e[0], setValue = _e[1];
|
|
7276
7288
|
var optionPicked = function (e) {
|
|
7277
7289
|
setValue(e.target.value);
|
|
7278
|
-
handleParams('news', [{ key: NewsArticleFilterFields.
|
|
7290
|
+
handleParams('news', [{ key: NewsArticleFilterFields[filterKey].queryParamKey, value: e.target.value }], ['page']);
|
|
7279
7291
|
};
|
|
7280
|
-
return (React.createElement(
|
|
7292
|
+
return (React.createElement(Container$1g, { "$hasMargin": hasMargin },
|
|
7293
|
+
React.createElement(DropDownSelect, { id: id, label: label, options: options, onChange: optionPicked, selected: value, hideLabel: hideLabel })));
|
|
7281
7294
|
};
|
|
7282
7295
|
|
|
7283
7296
|
const oneColStyles = (props) => {
|
|
@@ -23344,8 +23357,22 @@ var ImageAndText = function (_a) {
|
|
|
23344
23357
|
React.createElement(Content$6, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
23345
23358
|
};
|
|
23346
23359
|
|
|
23360
|
+
var CaseAppointmentType;
|
|
23361
|
+
(function (CaseAppointmentType) {
|
|
23362
|
+
CaseAppointmentType["Hearing"] = "AP Inquest Hearing";
|
|
23363
|
+
CaseAppointmentType["Opening"] = "AP Inquest Opening";
|
|
23364
|
+
CaseAppointmentType["Writing"] = "AP Inquest In Writing";
|
|
23365
|
+
})(CaseAppointmentType || (CaseAppointmentType = {}));
|
|
23366
|
+
|
|
23347
23367
|
const Container$Q = styled.div`
|
|
23348
23368
|
display: block;
|
|
23369
|
+
box-sizing: border-box;
|
|
23370
|
+
`;
|
|
23371
|
+
|
|
23372
|
+
const GroupContainer = styled.div`
|
|
23373
|
+
display: flex;
|
|
23374
|
+
flex-direction: column;
|
|
23375
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
23349
23376
|
`;
|
|
23350
23377
|
|
|
23351
23378
|
const InquestContainer = styled.div`
|
|
@@ -23377,15 +23404,29 @@ const InquestDetails = styled.div`
|
|
|
23377
23404
|
*/
|
|
23378
23405
|
var InquestSchedule = function (_a) {
|
|
23379
23406
|
var caseAppointments = _a.caseAppointments, title = _a.title, _b = _a.error, error = _b === void 0 ? false : _b;
|
|
23380
|
-
var
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
return
|
|
23388
|
-
}
|
|
23407
|
+
var hearings = caseAppointments.filter(function (appointment) {
|
|
23408
|
+
return appointment.appointmentType === CaseAppointmentType.Hearing;
|
|
23409
|
+
});
|
|
23410
|
+
var openings = caseAppointments.filter(function (appointment) {
|
|
23411
|
+
return appointment.appointmentType === CaseAppointmentType.Opening;
|
|
23412
|
+
});
|
|
23413
|
+
var writings = caseAppointments.filter(function (appointment) {
|
|
23414
|
+
return appointment.appointmentType === CaseAppointmentType.Writing;
|
|
23415
|
+
});
|
|
23416
|
+
var groupHearingsByDay = function (appointments) {
|
|
23417
|
+
return appointments.reduce(function (acc, inquest) {
|
|
23418
|
+
var inquestDate = new Date(inquest.startDateTime);
|
|
23419
|
+
var inquestISODay = inquestDate.toISOString().substring(0, 10);
|
|
23420
|
+
if (!acc[inquestISODay]) {
|
|
23421
|
+
acc[inquestISODay] = [];
|
|
23422
|
+
}
|
|
23423
|
+
acc[inquestISODay].push(inquest);
|
|
23424
|
+
return acc;
|
|
23425
|
+
}, {});
|
|
23426
|
+
};
|
|
23427
|
+
var hearingDayGrouped = groupHearingsByDay(hearings);
|
|
23428
|
+
var openingDayGrouped = groupHearingsByDay(openings);
|
|
23429
|
+
var writingDayGrouped = groupHearingsByDay(writings);
|
|
23389
23430
|
var formatDate = function (inquestDay) {
|
|
23390
23431
|
return inquestDay
|
|
23391
23432
|
.toLocaleDateString('en-GB', {
|
|
@@ -23399,13 +23440,12 @@ var InquestSchedule = function (_a) {
|
|
|
23399
23440
|
var formatTime = function (inquestDate) {
|
|
23400
23441
|
return inquestDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
23401
23442
|
};
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
Object.keys(inquestDayGrouped).map(function (day) {
|
|
23443
|
+
var transformToSections = function (groupedData) {
|
|
23444
|
+
return Object.keys(groupedData).map(function (day) {
|
|
23405
23445
|
var inquestDayDate = new Date(day);
|
|
23406
|
-
return
|
|
23407
|
-
|
|
23408
|
-
React.createElement(Row$1, null,
|
|
23446
|
+
return {
|
|
23447
|
+
title: formatDate(inquestDayDate),
|
|
23448
|
+
content: (React.createElement(Row$1, null, groupedData[day]
|
|
23409
23449
|
.sort(function (a, b) {
|
|
23410
23450
|
return new Date(a.startDateTime).getTime() - new Date(b.startDateTime).getTime();
|
|
23411
23451
|
})
|
|
@@ -23441,8 +23481,20 @@ var InquestSchedule = function (_a) {
|
|
|
23441
23481
|
" ",
|
|
23442
23482
|
inquest.coroner,
|
|
23443
23483
|
"."))));
|
|
23444
|
-
})))
|
|
23445
|
-
|
|
23484
|
+
}))),
|
|
23485
|
+
};
|
|
23486
|
+
});
|
|
23487
|
+
};
|
|
23488
|
+
return (React.createElement(Container$Q, { "data-testid": "InquestSchedule" },
|
|
23489
|
+
Object.keys(hearingDayGrouped).length > 0 && (React.createElement(GroupContainer, null,
|
|
23490
|
+
React.createElement(Heading$1, { level: 2, text: title }),
|
|
23491
|
+
React.createElement(Accordion$1, { sections: transformToSections(hearingDayGrouped) }))),
|
|
23492
|
+
Object.keys(openingDayGrouped).length > 0 && (React.createElement(GroupContainer, null,
|
|
23493
|
+
React.createElement(Heading$1, { level: 2, text: "Inquest Openings" }),
|
|
23494
|
+
React.createElement(Accordion$1, { sections: transformToSections(openingDayGrouped) }))),
|
|
23495
|
+
Object.keys(writingDayGrouped).length > 0 && (React.createElement(GroupContainer, null,
|
|
23496
|
+
React.createElement(Heading$1, { level: 2, text: "Inquests in Writing" }),
|
|
23497
|
+
React.createElement(Accordion$1, { sections: transformToSections(writingDayGrouped) }))),
|
|
23446
23498
|
caseAppointments.length === 0 && (React.createElement("div", null,
|
|
23447
23499
|
React.createElement("p", null, "We can't find any results at the moment."),
|
|
23448
23500
|
error ? (React.createElement("p", null, " The information is currently unavailable.")) : (React.createElement("p", null, "There are no inquests scheduled for next month."))))));
|
|
@@ -24142,31 +24194,24 @@ var WebChat = function (_a) {
|
|
|
24142
24194
|
scrollToTop();
|
|
24143
24195
|
};
|
|
24144
24196
|
var onSubmit = function (data) {
|
|
24197
|
+
var _a, _b, _c, _d;
|
|
24145
24198
|
var params = [];
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
}
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
});
|
|
24163
|
-
}
|
|
24164
|
-
if (data.reference) {
|
|
24165
|
-
params.push({
|
|
24166
|
-
key: 'reference',
|
|
24167
|
-
value: data.reference,
|
|
24168
|
-
});
|
|
24169
|
-
}
|
|
24199
|
+
params.push({
|
|
24200
|
+
key: 'queue',
|
|
24201
|
+
value: (_a = data.enquiryType) !== null && _a !== void 0 ? _a : '',
|
|
24202
|
+
});
|
|
24203
|
+
params.push({
|
|
24204
|
+
key: 'email',
|
|
24205
|
+
value: (_b = data.email) !== null && _b !== void 0 ? _b : '',
|
|
24206
|
+
});
|
|
24207
|
+
params.push({
|
|
24208
|
+
key: 'telephone',
|
|
24209
|
+
value: (_c = data.telephone) !== null && _c !== void 0 ? _c : '',
|
|
24210
|
+
});
|
|
24211
|
+
params.push({
|
|
24212
|
+
key: 'reference',
|
|
24213
|
+
value: (_d = data.reference) !== null && _d !== void 0 ? _d : '',
|
|
24214
|
+
});
|
|
24170
24215
|
params.push({
|
|
24171
24216
|
key: 'im_name',
|
|
24172
24217
|
value: data.name,
|
|
@@ -25272,15 +25317,10 @@ const HomeLink = styled.a`
|
|
|
25272
25317
|
}
|
|
25273
25318
|
}
|
|
25274
25319
|
&:focus {
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
props.theme.cardinal_name === 'north'
|
|
25280
|
-
? props.theme.theme_vars.colours.black
|
|
25281
|
-
: props.theme.theme_vars.colours.focus}
|
|
25282
|
-
0 0 0 4px;
|
|
25283
|
-
transition: box-shadow 0.3s ease 0s;
|
|
25320
|
+
${(props) => props.theme.linkStylesFocus}
|
|
25321
|
+
}
|
|
25322
|
+
&:active {
|
|
25323
|
+
${(props) => props.theme.linkStylesActive}
|
|
25284
25324
|
}
|
|
25285
25325
|
`;
|
|
25286
25326
|
|
|
@@ -26808,13 +26848,17 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
26808
26848
|
var _c = useState([]), searchValue = _c[0], setSearchValue = _c[1];
|
|
26809
26849
|
var _d = useState([]), servicesValue = _d[0], setServices = _d[1];
|
|
26810
26850
|
var _e = useState([]), articleTypeValue = _e[0], setArticleTypes = _e[1];
|
|
26851
|
+
var _f = useState([]), years = _f[0], setYears = _f[1];
|
|
26852
|
+
var _g = useState([]), months = _g[0], setMonths = _g[1];
|
|
26811
26853
|
useEffect(function () {
|
|
26812
26854
|
setCount(countParams(NewsArticleFilterFields.removeFiltersList));
|
|
26813
26855
|
setSearchValue(getParamValue(NewsArticleFilterFields.search.queryParamKey));
|
|
26814
26856
|
setServices(getDropDownValues(NewsArticleFilterFields.services.queryParamKey));
|
|
26815
26857
|
setArticleTypes(getCheckboxValues(NewsArticleFilterFields.articleType.queryParamKey));
|
|
26858
|
+
setYears(getDropDownValues(NewsArticleFilterFields.year.queryParamKey));
|
|
26859
|
+
setMonths(getDropDownValues(NewsArticleFilterFields.month.queryParamKey));
|
|
26816
26860
|
}, []);
|
|
26817
|
-
var
|
|
26861
|
+
var _h = useState(false), isFullScreen = _h[0], setFullScreen = _h[1];
|
|
26818
26862
|
var showFullscreenFilters = function (e) {
|
|
26819
26863
|
setFullScreen(true);
|
|
26820
26864
|
document.body.style.overflow = 'hidden';
|
|
@@ -26838,6 +26882,12 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
26838
26882
|
else if (section.title === NewsArticleFilterFields.articleType.title && articleTypeValue.length > 0) {
|
|
26839
26883
|
section.isExpanded = true;
|
|
26840
26884
|
}
|
|
26885
|
+
else if (section.title === NewsArticleFilterFields.year.title && years.length > 0) {
|
|
26886
|
+
section.isExpanded = true;
|
|
26887
|
+
}
|
|
26888
|
+
else if (section.title === NewsArticleFilterFields.month.title && months.length > 0) {
|
|
26889
|
+
section.isExpanded = true;
|
|
26890
|
+
}
|
|
26841
26891
|
else {
|
|
26842
26892
|
section.isExpanded = false;
|
|
26843
26893
|
}
|
|
@@ -27729,6 +27779,23 @@ const FormContainer$1 = styled(Container$o)`
|
|
|
27729
27779
|
}
|
|
27730
27780
|
`;
|
|
27731
27781
|
|
|
27782
|
+
const PanelWrapper = styled.div`
|
|
27783
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27784
|
+
`;
|
|
27785
|
+
|
|
27786
|
+
const FormWrapper = styled.div`
|
|
27787
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27788
|
+
`;
|
|
27789
|
+
|
|
27790
|
+
const ShowQuestion = styled.div`
|
|
27791
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27792
|
+
`;
|
|
27793
|
+
|
|
27794
|
+
const ShowFullForm = styled.div`
|
|
27795
|
+
display: ${(props) => (props.$show ? 'flex' : 'none')};
|
|
27796
|
+
flex-direction: column;
|
|
27797
|
+
`;
|
|
27798
|
+
|
|
27732
27799
|
const Legend$2 = styled.legend`
|
|
27733
27800
|
margin-bottom: 5px;
|
|
27734
27801
|
font-weight: bold;
|
|
@@ -28092,147 +28159,150 @@ var RateThisPage = function (_a) {
|
|
|
28092
28159
|
setShowSubmit(true);
|
|
28093
28160
|
};
|
|
28094
28161
|
return (React.createElement(FormContainer$1, { as: "section", "data-testid": "RateThisPage", "aria-label": "Rate This Page" },
|
|
28095
|
-
|
|
28096
|
-
React.createElement(
|
|
28097
|
-
|
|
28098
|
-
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
React.createElement(Controller, { name: "IsHelpful", control: control, rules: { required: { value: true, message: 'The field is this information helpful is required.' } }, render: function (_a) {
|
|
28102
|
-
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28103
|
-
return (React.createElement(React.Fragment, null,
|
|
28104
|
-
errors.IsHelpful && (React.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
28105
|
-
React.createElement(Hidden, null, "Error:"),
|
|
28106
|
-
" ",
|
|
28107
|
-
errors.IsHelpful.message)),
|
|
28108
|
-
Object.entries(HelpfulEnum).map(function (_a) {
|
|
28109
|
-
var key = _a[0], enumValue = _a[1];
|
|
28110
|
-
return (React.createElement(RadioCheckboxInput, { key: key, value: enumValue, label: HelpfulEnum[key], checked: String(value) == enumValue, name: "IsHelpful", singleSelection: true, onChange: onChange, isErrored: errors.IsHelpful ? true : false }));
|
|
28111
|
-
})));
|
|
28112
|
-
} }))),
|
|
28113
|
-
showQuestion && (React.createElement(React.Fragment, null,
|
|
28114
|
-
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28115
|
-
React.createElement(QuestionContainer, null,
|
|
28116
|
-
React.createElement(QuestionTitle, null, "Content"),
|
|
28117
|
-
React.createElement("p", null, "You may have comments about the content on the webpage. For example:"),
|
|
28118
|
-
React.createElement("ul", null,
|
|
28119
|
-
React.createElement("li", null, "The information on this page is difficult to understand"),
|
|
28120
|
-
React.createElement("li", null, "This page isn't giving me the information I need"),
|
|
28121
|
-
React.createElement("li", null, "This page contains information that is wrong or out of date"),
|
|
28122
|
-
React.createElement("li", null, "This page could have been written or presented better")),
|
|
28123
|
-
React.createElement("p", null, "Your feedback will help us improve our website and the content we include."),
|
|
28124
|
-
React.createElement(QuestionButton, null,
|
|
28125
|
-
React.createElement(FormButton, { text: "I have feedback about the information on this page", type: "button", size: "medium", onClick: handleQuestionButton })))),
|
|
28126
|
-
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28127
|
-
React.createElement(QuestionContainer, null,
|
|
28128
|
-
React.createElement(QuestionTitle, null, "Service"),
|
|
28129
|
-
React.createElement("p", null, "You may have comments about the quality of the service that's been provided. For example:"),
|
|
28130
|
-
React.createElement("ul", null,
|
|
28131
|
-
React.createElement("li", null, "I have waited too long for something to happen"),
|
|
28132
|
-
React.createElement("li", null, "I'm struggling to contact the service"),
|
|
28133
|
-
React.createElement("li", null, "I don't think I have been treated fairly"),
|
|
28134
|
-
React.createElement("li", null, "I feel as if I have been misled")),
|
|
28135
|
-
React.createElement(QuestionButton, null,
|
|
28136
|
-
React.createElement(Button$4, { url: complaintsFormLink }, "I have a comment or complaint about this service")))))),
|
|
28137
|
-
showFullForm && (React.createElement(React.Fragment, null,
|
|
28162
|
+
React.createElement(PanelWrapper, { "$show": isSuccessful },
|
|
28163
|
+
React.createElement(Panel, { heading: "Thank you for your feedback." }, String(watchIsHelpful) === 'No' && React.createElement("p", null, "Your comments will help us improve the website."))),
|
|
28164
|
+
React.createElement(FormWrapper, { "$show": !isSuccessful },
|
|
28165
|
+
React.createElement("form", { onSubmit: executeCaptcha, ref: fullFormRef },
|
|
28166
|
+
React.createElement(Row$1, null,
|
|
28167
|
+
errors && Object.keys(errors).length > 0 && React.createElement(ErrorSummary, { errors: errors }),
|
|
28138
28168
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28139
|
-
React.createElement("fieldset", { "aria-describedby":
|
|
28140
|
-
React.createElement(Legend$2, { id: "
|
|
28141
|
-
React.createElement(
|
|
28142
|
-
React.createElement(Controller, { name: "HowEasyToFind", control: control, rules: {
|
|
28143
|
-
pattern: {
|
|
28144
|
-
value: /^[1-5]+$/i,
|
|
28145
|
-
message: 'The field how easy is it to find what you are looking for is invalid.',
|
|
28146
|
-
},
|
|
28147
|
-
required: {
|
|
28148
|
-
value: true,
|
|
28149
|
-
message: 'The field how easy is it to find what you are looking for is required.',
|
|
28150
|
-
},
|
|
28151
|
-
}, render: function (_a) {
|
|
28169
|
+
React.createElement("fieldset", { "aria-describedby": errors.IsHelpful ? 'IsHelpfulError' : 'IsHelpfulLegend' },
|
|
28170
|
+
React.createElement(Legend$2, { id: "IsHelpfulLegend" }, "Is this information helpful?"),
|
|
28171
|
+
React.createElement(Controller, { name: "IsHelpful", control: control, rules: { required: { value: true, message: 'The field is this information helpful is required.' } }, render: function (_a) {
|
|
28152
28172
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28153
28173
|
return (React.createElement(React.Fragment, null,
|
|
28154
|
-
errors.
|
|
28174
|
+
errors.IsHelpful && (React.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
28155
28175
|
React.createElement(Hidden, null, "Error:"),
|
|
28156
28176
|
" ",
|
|
28157
|
-
errors.
|
|
28158
|
-
|
|
28177
|
+
errors.IsHelpful.message)),
|
|
28178
|
+
Object.entries(HelpfulEnum).map(function (_a) {
|
|
28179
|
+
var key = _a[0], enumValue = _a[1];
|
|
28180
|
+
return (React.createElement(RadioCheckboxInput, { key: key, value: enumValue, label: HelpfulEnum[key], checked: String(value) == enumValue, name: "IsHelpful", singleSelection: true, onChange: onChange, isErrored: errors.IsHelpful ? true : false }));
|
|
28181
|
+
})));
|
|
28159
28182
|
} }))),
|
|
28160
|
-
React.createElement(
|
|
28161
|
-
React.createElement("
|
|
28162
|
-
React.createElement(
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28183
|
+
React.createElement(ShowQuestion, { "$show": showQuestion },
|
|
28184
|
+
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28185
|
+
React.createElement(QuestionContainer, null,
|
|
28186
|
+
React.createElement(QuestionTitle, null, "Content"),
|
|
28187
|
+
React.createElement("p", null, "You may have comments about the content on the webpage. For example:"),
|
|
28188
|
+
React.createElement("ul", null,
|
|
28189
|
+
React.createElement("li", null, "The information on this page is difficult to understand"),
|
|
28190
|
+
React.createElement("li", null, "This page isn't giving me the information I need"),
|
|
28191
|
+
React.createElement("li", null, "This page contains information that is wrong or out of date"),
|
|
28192
|
+
React.createElement("li", null, "This page could have been written or presented better")),
|
|
28193
|
+
React.createElement("p", null, "Your feedback will help us improve our website and the content we include."),
|
|
28194
|
+
React.createElement(QuestionButton, null,
|
|
28195
|
+
React.createElement(FormButton, { text: "I have feedback about the information on this page", type: "button", size: "medium", onClick: handleQuestionButton })))),
|
|
28196
|
+
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
28197
|
+
React.createElement(QuestionContainer, null,
|
|
28198
|
+
React.createElement(QuestionTitle, null, "Service"),
|
|
28199
|
+
React.createElement("p", null, "You may have comments about the quality of the service that's been provided. For example:"),
|
|
28200
|
+
React.createElement("ul", null,
|
|
28201
|
+
React.createElement("li", null, "I have waited too long for something to happen"),
|
|
28202
|
+
React.createElement("li", null, "I'm struggling to contact the service"),
|
|
28203
|
+
React.createElement("li", null, "I don't think I have been treated fairly"),
|
|
28204
|
+
React.createElement("li", null, "I feel as if I have been misled")),
|
|
28205
|
+
React.createElement(QuestionButton, null,
|
|
28206
|
+
React.createElement(Button$4, { url: complaintsFormLink }, "I have a comment or complaint about this service"))))),
|
|
28207
|
+
React.createElement(ShowFullForm, { "$show": showFullForm },
|
|
28208
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28209
|
+
React.createElement("fieldset", { "aria-describedby": "HowEasyToFindLegend" },
|
|
28210
|
+
React.createElement(Legend$2, { id: "HowEasyToFindLegend" }, "How easy was it to find what you were looking for?"),
|
|
28211
|
+
React.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
28212
|
+
React.createElement(Controller, { name: "HowEasyToFind", control: control, rules: {
|
|
28213
|
+
pattern: {
|
|
28214
|
+
value: /^[1-5]+$/i,
|
|
28215
|
+
message: 'The field how easy is it to find what you are looking for is invalid.',
|
|
28216
|
+
},
|
|
28217
|
+
required: {
|
|
28218
|
+
value: showFullForm,
|
|
28219
|
+
message: 'The field how easy is it to find what you are looking for is required.',
|
|
28220
|
+
},
|
|
28221
|
+
}, render: function (_a) {
|
|
28222
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28223
|
+
return (React.createElement(React.Fragment, null,
|
|
28224
|
+
errors.HowEasyToFind && (React.createElement(FormErrorText, { id: "HowEasyToFindError" },
|
|
28225
|
+
React.createElement(Hidden, null, "Error:"),
|
|
28226
|
+
" ",
|
|
28227
|
+
errors.HowEasyToFind.message)),
|
|
28228
|
+
RatingValues.map(function (ratingValue, index) { return (React.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 })); })));
|
|
28229
|
+
} }))),
|
|
28230
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28231
|
+
React.createElement("fieldset", { "aria-describedby": "HowEasyToUnderstandLegend" },
|
|
28232
|
+
React.createElement(Legend$2, { id: "HowEasyToUnderstandLegend" }, "How easy was this content to understand?"),
|
|
28233
|
+
React.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
28234
|
+
React.createElement(Controller, { name: "HowEasyToUnderstand", control: control, rules: {
|
|
28235
|
+
pattern: {
|
|
28236
|
+
value: /^[1-5]+$/i,
|
|
28237
|
+
message: 'The field how easy was this content to understand is invalid.',
|
|
28238
|
+
},
|
|
28239
|
+
required: {
|
|
28240
|
+
value: showFullForm,
|
|
28241
|
+
message: 'The field how easy was this content to understand is required.',
|
|
28242
|
+
},
|
|
28243
|
+
}, render: function (_a) {
|
|
28244
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28245
|
+
return (React.createElement(React.Fragment, null,
|
|
28246
|
+
errors.HowEasyToUnderstand && (React.createElement(FormErrorText, { id: "HowEasyToUnderstandError" },
|
|
28247
|
+
React.createElement(Hidden, null, "Error:"),
|
|
28248
|
+
" ",
|
|
28249
|
+
errors.HowEasyToUnderstand.message)),
|
|
28250
|
+
RatingValues.map(function (ratingValue, index) { return (React.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 })); })));
|
|
28251
|
+
} }))),
|
|
28252
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28253
|
+
React.createElement(Label$3, { htmlFor: "BarriersOrIssues" }, "Did you come across any barriers or issues with this webpage?"),
|
|
28254
|
+
React.createElement(Controller, { name: "BarriersOrIssues", control: control, rules: {
|
|
28255
|
+
maxLength: {
|
|
28256
|
+
value: 3000,
|
|
28257
|
+
message: 'The field did you come across any barriers or issues with this webpage must be less than 3000 characters.',
|
|
28168
28258
|
},
|
|
28169
28259
|
required: {
|
|
28170
|
-
value:
|
|
28171
|
-
message: 'The field
|
|
28260
|
+
value: showFullForm,
|
|
28261
|
+
message: 'The field did you come across any barriers or issues with this webpage is required.',
|
|
28172
28262
|
},
|
|
28173
28263
|
}, render: function (_a) {
|
|
28174
28264
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28175
28265
|
return (React.createElement(React.Fragment, null,
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28266
|
+
React.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 })));
|
|
28267
|
+
} })),
|
|
28268
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28269
|
+
React.createElement(Label$3, { htmlFor: "HowCanWeImprove" }, "How could this page be improved? (optional)"),
|
|
28270
|
+
React.createElement(Controller, { name: "HowCanWeImprove", control: control, rules: {
|
|
28271
|
+
maxLength: {
|
|
28272
|
+
value: 3000,
|
|
28273
|
+
message: 'The field how could this page be improved must be less than 3000 characters.',
|
|
28274
|
+
},
|
|
28275
|
+
}, render: function (_a) {
|
|
28276
|
+
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28277
|
+
return (React.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 }));
|
|
28278
|
+
} })),
|
|
28279
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28280
|
+
React.createElement(Label$3, { htmlFor: "Email" }, "Please leave your email below if you are happy for us to contact you further (optional)"),
|
|
28281
|
+
React.createElement(Controller, { name: "Email", control: control, rules: {
|
|
28282
|
+
maxLength: { value: 150, message: 'The email address must be less than 150 characters.' },
|
|
28283
|
+
pattern: {
|
|
28284
|
+
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,}))$/,
|
|
28285
|
+
message: 'Invalid email address.',
|
|
28286
|
+
},
|
|
28287
|
+
}, render: function (_a) {
|
|
28288
|
+
var _b = _a.field, onChange = _b.onChange; _b.onBlur; var value = _b.value; _b.ref;
|
|
28289
|
+
return (React.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 }));
|
|
28181
28290
|
} }))),
|
|
28182
28291
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28183
|
-
React.createElement(
|
|
28184
|
-
React.createElement(
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
} })),
|
|
28198
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28199
|
-
React.createElement(Label$3, { htmlFor: "HowCanWeImprove" }, "How could this page be improved? (optional)"),
|
|
28200
|
-
React.createElement(Controller, { name: "HowCanWeImprove", control: control, rules: {
|
|
28201
|
-
maxLength: {
|
|
28202
|
-
value: 3000,
|
|
28203
|
-
message: 'The field how could this page be improved must be less than 3000 characters.',
|
|
28204
|
-
},
|
|
28205
|
-
}, render: function (_a) {
|
|
28206
|
-
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
28207
|
-
return (React.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 }));
|
|
28208
|
-
} })),
|
|
28209
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28210
|
-
React.createElement(Label$3, { htmlFor: "Email" }, "Please leave your email below if you are happy for us to contact you further (optional)"),
|
|
28211
|
-
React.createElement(Controller, { name: "Email", control: control, rules: {
|
|
28212
|
-
maxLength: { value: 150, message: 'The email address must be less than 150 characters.' },
|
|
28213
|
-
pattern: {
|
|
28214
|
-
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,}))$/,
|
|
28215
|
-
message: 'Invalid email address.',
|
|
28216
|
-
},
|
|
28217
|
-
}, render: function (_a) {
|
|
28218
|
-
var _b = _a.field, onChange = _b.onChange; _b.onBlur; var value = _b.value; _b.ref;
|
|
28219
|
-
return (React.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 }));
|
|
28220
|
-
} })))),
|
|
28221
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28222
|
-
React.createElement("input", __assign$2({ type: "hidden" }, register('ReCaptcha'))),
|
|
28223
|
-
React.createElement(Terms, null,
|
|
28224
|
-
"This site is protected by reCAPTCHA and the Google",
|
|
28225
|
-
' ',
|
|
28226
|
-
React.createElement("a", { href: "https://policies.google.com/privacy" }, "Privacy Policy"),
|
|
28227
|
-
" and",
|
|
28228
|
-
' ',
|
|
28229
|
-
React.createElement("a", { href: "https://policies.google.com/terms" }, "Terms of Service"),
|
|
28230
|
-
" apply.")),
|
|
28231
|
-
showSubmit && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28232
|
-
React.createElement(React.Fragment, null, isLoading ? (React.createElement(LoadingSpinner, null)) : (React.createElement(FormButton, { text: "Submit", type: "submit", size: "large", isDisabled: !recaptchaLoaded }))))),
|
|
28233
|
-
isError && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28234
|
-
React.createElement(AlertBannerService, null,
|
|
28235
|
-
React.createElement("p", null, "An error has occurred."))))))),
|
|
28292
|
+
React.createElement("input", __assign$2({ type: "hidden" }, register('ReCaptcha'))),
|
|
28293
|
+
React.createElement(Terms, null,
|
|
28294
|
+
"This site is protected by reCAPTCHA and the Google",
|
|
28295
|
+
' ',
|
|
28296
|
+
React.createElement("a", { href: "https://policies.google.com/privacy" }, "Privacy Policy"),
|
|
28297
|
+
" and",
|
|
28298
|
+
' ',
|
|
28299
|
+
React.createElement("a", { href: "https://policies.google.com/terms" }, "Terms of Service"),
|
|
28300
|
+
" apply.")),
|
|
28301
|
+
showSubmit && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28302
|
+
React.createElement(React.Fragment, null, isLoading ? (React.createElement(LoadingSpinner, null)) : (React.createElement(FormButton, { text: "Submit", type: "submit", size: "large", isDisabled: !recaptchaLoaded }))))),
|
|
28303
|
+
isError && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
28304
|
+
React.createElement(AlertBannerService, null,
|
|
28305
|
+
React.createElement("p", null, "An error has occurred."))))))),
|
|
28236
28306
|
React.createElement("div", { id: recaptchaContainerId, className: "g-recaptcha" })));
|
|
28237
28307
|
};
|
|
28238
28308
|
|