@nnc-digital/nnc-design-system 0.4.22 → 0.4.24
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/build/index.esm.js
CHANGED
|
@@ -4399,12 +4399,18 @@ var BinCollection = function (_a) {
|
|
|
4399
4399
|
var handleAddressChange = function (e) {
|
|
4400
4400
|
var selectedUPRN = e.target.value;
|
|
4401
4401
|
if (selectedUPRN) {
|
|
4402
|
-
var
|
|
4403
|
-
var
|
|
4402
|
+
var startDate_1 = getFormattedDate();
|
|
4403
|
+
var endDate_1 = getFormattedDate(28);
|
|
4404
4404
|
// Fetch calendar events for the selected UPRN
|
|
4405
|
-
axios.get("".concat(CalendarEventsApiUrl).concat(selectedUPRN, "/").concat(
|
|
4405
|
+
axios.get("".concat(CalendarEventsApiUrl).concat(selectedUPRN, "/").concat(startDate_1, "/").concat(endDate_1))
|
|
4406
4406
|
.then(function (response) {
|
|
4407
|
-
|
|
4407
|
+
// Filter the data based on the date range
|
|
4408
|
+
var filteredData = response.data.filter(function (event) {
|
|
4409
|
+
var eventDate = parseDate(event.start);
|
|
4410
|
+
var eventDateString = eventDate.toISOString().split('T')[0];
|
|
4411
|
+
return eventDateString >= startDate_1 && eventDateString <= endDate_1;
|
|
4412
|
+
});
|
|
4413
|
+
var groupedData = groupByTitle(filteredData);
|
|
4408
4414
|
if (Object.keys(groupedData).length === 0) {
|
|
4409
4415
|
setNoResultsFound(true);
|
|
4410
4416
|
}
|
|
@@ -23251,12 +23257,79 @@ const AccessibleLinks = styled.a`
|
|
|
23251
23257
|
|
|
23252
23258
|
`;
|
|
23253
23259
|
|
|
23260
|
+
const SkipToMainContent$1 = styled.a`
|
|
23261
|
+
${props => props.theme.fontStyles}
|
|
23262
|
+
|
|
23263
|
+
position: absolute;
|
|
23264
|
+
width: 1px;
|
|
23265
|
+
height: 1px;
|
|
23266
|
+
margin: 0;
|
|
23267
|
+
overflow: hidden;
|
|
23268
|
+
clip: rect(0 0 0 0);
|
|
23269
|
+
clip-path: inset(50%);
|
|
23270
|
+
white-space: nowrap;
|
|
23271
|
+
display: block;
|
|
23272
|
+
padding: 10px 15px;
|
|
23273
|
+
|
|
23274
|
+
&:active,
|
|
23275
|
+
&:focus {
|
|
23276
|
+
position: static;
|
|
23277
|
+
width: auto;
|
|
23278
|
+
height: auto;
|
|
23279
|
+
margin: inherit;
|
|
23280
|
+
overflow: visible;
|
|
23281
|
+
clip: auto;
|
|
23282
|
+
-webkit-clip-path: none;
|
|
23283
|
+
clip-path: none;
|
|
23284
|
+
white-space: inherit
|
|
23285
|
+
}
|
|
23286
|
+
|
|
23287
|
+
&:link,
|
|
23288
|
+
&:visited,
|
|
23289
|
+
&:hover,
|
|
23290
|
+
&:active,
|
|
23291
|
+
&:focus {
|
|
23292
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
23293
|
+
}
|
|
23294
|
+
|
|
23295
|
+
|
|
23296
|
+
|
|
23297
|
+
@media (min-width: 40.0625em) {
|
|
23298
|
+
font-size: 16px;
|
|
23299
|
+
font-size: 1rem;
|
|
23300
|
+
line-height: 1.25
|
|
23301
|
+
}
|
|
23302
|
+
|
|
23303
|
+
|
|
23304
|
+
|
|
23305
|
+
&:focus {
|
|
23306
|
+
outline: 3px solid ${props => props.theme.theme_vars.colours.focus};
|
|
23307
|
+
outline-offset: 0;
|
|
23308
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
23309
|
+
}
|
|
23310
|
+
|
|
23311
|
+
|
|
23312
|
+
|
|
23313
|
+
|
|
23314
|
+
`;
|
|
23315
|
+
|
|
23316
|
+
var SkipToMainContent = function () { return (React.createElement(SkipToMainContent$1, { "data-testid": "SkipToMainContent", href: "#main" }, "Skip to main content")); };
|
|
23317
|
+
|
|
23254
23318
|
var AccessibleLink = function (_a) {
|
|
23255
|
-
var _b = _a.AccessibleLinksArray, AccessibleLinksArray = _b === void 0 ? null : _b;
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
|
|
23259
|
-
}
|
|
23319
|
+
var _b = _a.AccessibleLinksArray, AccessibleLinksArray = _b === void 0 ? null : _b, _c = _a.includeSkipToMainContent, includeSkipToMainContent = _c === void 0 ? false : _c, _d = _a.listItem, listItem = _d === void 0 ? true : _d;
|
|
23320
|
+
var ListItemWrapper = function (_a) {
|
|
23321
|
+
var children = _a.children;
|
|
23322
|
+
return listItem ? React.createElement(AccessibleListItem, null, children) : React.createElement(React.Fragment, null, children);
|
|
23323
|
+
};
|
|
23324
|
+
var ListWrapper = function (_a) {
|
|
23325
|
+
var children = _a.children;
|
|
23326
|
+
return listItem ? React.createElement(AccessibleList, null, children) : React.createElement(React.Fragment, null, children);
|
|
23327
|
+
};
|
|
23328
|
+
return (React.createElement(ListWrapper, null,
|
|
23329
|
+
includeSkipToMainContent && (React.createElement(ListItemWrapper, null,
|
|
23330
|
+
React.createElement(SkipToMainContent, null))),
|
|
23331
|
+
AccessibleLinksArray && AccessibleLinksArray.map(function (link, i) { return (React.createElement(ListItemWrapper, { key: 'accessible-link-li-' + i },
|
|
23332
|
+
React.createElement(AccessibleLinks, { key: 'accessible-link-' + i, href: link.url }, link.title))); })));
|
|
23260
23333
|
};
|
|
23261
23334
|
|
|
23262
23335
|
const Container$F = styled.div`
|
|
@@ -27848,64 +27921,6 @@ var SignpostLinks = function (_a) {
|
|
|
27848
27921
|
signpostLinksArray[0].areaName))));
|
|
27849
27922
|
};
|
|
27850
27923
|
|
|
27851
|
-
const SkipToMainContent$1 = styled.a`
|
|
27852
|
-
${props => props.theme.fontStyles}
|
|
27853
|
-
|
|
27854
|
-
position: absolute;
|
|
27855
|
-
width: 1px;
|
|
27856
|
-
height: 1px;
|
|
27857
|
-
margin: 0;
|
|
27858
|
-
overflow: hidden;
|
|
27859
|
-
clip: rect(0 0 0 0);
|
|
27860
|
-
clip-path: inset(50%);
|
|
27861
|
-
white-space: nowrap;
|
|
27862
|
-
display: block;
|
|
27863
|
-
padding: 10px 15px;
|
|
27864
|
-
|
|
27865
|
-
&:active,
|
|
27866
|
-
&:focus {
|
|
27867
|
-
position: static;
|
|
27868
|
-
width: auto;
|
|
27869
|
-
height: auto;
|
|
27870
|
-
margin: inherit;
|
|
27871
|
-
overflow: visible;
|
|
27872
|
-
clip: auto;
|
|
27873
|
-
-webkit-clip-path: none;
|
|
27874
|
-
clip-path: none;
|
|
27875
|
-
white-space: inherit
|
|
27876
|
-
}
|
|
27877
|
-
|
|
27878
|
-
&:link,
|
|
27879
|
-
&:visited,
|
|
27880
|
-
&:hover,
|
|
27881
|
-
&:active,
|
|
27882
|
-
&:focus {
|
|
27883
|
-
color: ${props => props.theme.theme_vars.colours.black};
|
|
27884
|
-
}
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
27888
|
-
@media (min-width: 40.0625em) {
|
|
27889
|
-
font-size: 16px;
|
|
27890
|
-
font-size: 1rem;
|
|
27891
|
-
line-height: 1.25
|
|
27892
|
-
}
|
|
27893
|
-
|
|
27894
|
-
|
|
27895
|
-
|
|
27896
|
-
&:focus {
|
|
27897
|
-
outline: 3px solid ${props => props.theme.theme_vars.colours.focus};
|
|
27898
|
-
outline-offset: 0;
|
|
27899
|
-
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
27900
|
-
}
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
`;
|
|
27906
|
-
|
|
27907
|
-
var SkipToMainContent = function () { return (React.createElement(SkipToMainContent$1, { "data-testid": "SkipToMainContent", href: "#main" }, "Skip to main content")); };
|
|
27908
|
-
|
|
27909
27924
|
const summaryStyles = (props) => {
|
|
27910
27925
|
if (props.theme.is_memorial === true) {
|
|
27911
27926
|
return css`
|