northants-design-system 0.4.0-alpha.3 → 0.4.0-alpha.5
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 +310 -259
- package/build/index.esm.js.map +1 -1
- package/build/index.js +310 -259
- package/build/index.js.map +1 -1
- package/build/library/components/Button/Button.types.d.ts +5 -0
- package/build/library/components/Column/Column.types.d.ts +5 -0
- package/build/library/components/DropDownSelect/DropDownSelect.types.d.ts +5 -6
- package/build/library/components/FormButton/FormButton.types.d.ts +1 -1
- package/build/library/components/FormWithLine/FormWithLine.types.d.ts +6 -2
- package/build/library/components/Input/Input.types.d.ts +1 -1
- package/build/library/components/Map/Map.types.d.ts +5 -0
- package/build/library/components/Pagination/Pagination.types.d.ts +5 -0
- package/build/library/components/Row/Row.types.d.ts +5 -0
- package/build/library/directory/DirectoryService/DirectoryService.d.ts +1 -0
- package/build/library/directory/DirectoryServiceList/DirectoryServiceList.types.d.ts +31 -6
- package/build/library/pages/Home/HomePage.types.d.ts +2 -2
- package/build/library/pages/MemorialPage/MemorialPage.types.d.ts +2 -2
- package/build/library/slices/WarningText/WarningText.types.d.ts +5 -0
- package/build/library/structure/FullWidthContainer/FullWidthContainer.types.d.ts +5 -0
- package/build/library/structure/Header/Header.types.d.ts +5 -0
- package/build/library/structure/MaxWidthContainer/MaxWidthContainer.types.d.ts +5 -0
- package/build/library/structure/PageMain/PageMain.types.d.ts +5 -0
- package/build/library/structure/PageTitle/PageTitle.types.d.ts +5 -0
- package/build/library/structure/Summary/Summary.types.d.ts +5 -0
- package/package.json +23 -22
- package/build/icons/flytip.svg +0 -24
- package/build/index.css +0 -36
- package/build/library/components/CheckboxesInput/CheckboxesInput.d.ts +0 -4
- package/build/library/components/CheckboxesInput/CheckboxesInput.storydata.d.ts +0 -3
- package/build/library/components/CheckboxesInput/CheckboxesInput.types.d.ts +0 -37
- package/build/library/components/CouncilTaxAlphabeticalDirectory/CouncilTaxAlphabeticalDirectory.d.ts +0 -4
- package/build/library/components/GoogleMap/GoogleMap.d.ts +0 -4
- package/build/library/components/GoogleMap/GoogleMap.types.d.ts +0 -11
- package/build/library/components/GoogleMapMarker/GoogleMapMarker.d.ts +0 -4
- package/build/library/components/MapMarker/MapMarker.types.d.ts +0 -6
- package/build/library/components/PostCodeSearchApollo/PostCodeSearchApollo.d.ts +0 -4
- package/build/library/components/PostCodeSearchApollo/PostCodeSearchApollo.types.d.ts +0 -6
- package/build/library/components/icons/services/AccessibleParkingHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AddressChangeIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AddressChangeIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AddressIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AddressIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AdultsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/AdultsIcon/IconHover.d.ts +0 -4
- package/build/library/components/icons/services/AdultsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BenefitsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BenefitsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BinDayHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BinsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BinsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BirthsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BirthsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BollardHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BusIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BusIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BusPassHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BusinessIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/BusinessIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CareersIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CareersIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CashIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CashIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CharityHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ChildrenIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ChildrenIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CondolenceBookIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CondolenceBookIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CookingIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CookingIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CouncilIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CouncilIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CouncilTaxIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CouncilTaxIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CovidIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CovidIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureNorthIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureNorthIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureWestIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/CultureWestIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/DOLSIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/DOLSIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/DemocracyIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/DemocracyIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/EditIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/EditIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/EnvironmentIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/EnvironmentIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/FinanceIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/FinanceIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/FlowerHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/FlyTipHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/FoodWasteHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/GovUKIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/GovUKIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/HighwayHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/HouseMoneyIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/HouseMoneyIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/HousingIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/HousingIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/IndependenceIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/IndependenceIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/LibrariesIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/LibrariesIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/MapPinHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/MissedBinHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/NewIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/NewIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/OccupationalTherapyIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/OccupationalTherapyIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ParkEventHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ParkingHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ParkingTicketHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PayIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PayIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PhonePayIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PhonePayIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PlanningIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PlanningIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/PotholeHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ProtectIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ProtectIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RatePayIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RatePayIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ReportHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RestrictIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RestrictIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RoadWorksHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RoadsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RoadsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RoyalWebsiteIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/RoyalWebsiteIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SafetyIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SafetyIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SchoolsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SchoolsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SinglePersonIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SinglePersonIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SportsIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/SportsIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ValuationIcon/Icon.d.ts +0 -4
- package/build/library/components/icons/services/ValuationIconHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/WasteChecklistHover/Icon.d.ts +0 -4
- package/build/library/components/icons/services/WasteSortingHover/Icon.d.ts +0 -4
- package/build/library/contexts/DirectoryFavouritesProvider/DirectoryFavouritesProvider.d.ts +0 -4
- package/build/library/contexts/DirectoryFavouritesProvider/DirectoryFavouritesProvider.types.d.ts +0 -14
- package/build/library/pages/PromotionPage/PromotionPageExample.d.ts +0 -3
- package/build/library/pages/PromotionPage/PromotionPageExample.storydata.d.ts +0 -20
- package/build/library/pages/PromotionPage/PromotionPageExample.types.d.ts +0 -42
- package/build/library/structure/HomeUnitarySection/HomeUnitarySection.d.ts +0 -4
- package/build/library/structure/HomeUnitarySection/HomeUnitarySection.types.d.ts +0 -22
- package/build/library/structure/HomeUnitarySection/assets/map.d.ts +0 -3
package/build/index.esm.js
CHANGED
|
@@ -6595,7 +6595,7 @@ var Uri = Uri$1.exports;
|
|
|
6595
6595
|
};
|
|
6596
6596
|
|
|
6597
6597
|
var Pagination = function (_a) {
|
|
6598
|
-
var currentPage = _a.currentPage, totalResults = _a.totalResults, resultsPerPage = _a.resultsPerPage, _b = _a.postTo, postTo = _b === void 0 ? 'search' : _b;
|
|
6598
|
+
var currentPage = _a.currentPage, totalResults = _a.totalResults, resultsPerPage = _a.resultsPerPage, _b = _a.postTo, postTo = _b === void 0 ? 'search' : _b, buttonClickOverride = _a.buttonClickOverride;
|
|
6599
6599
|
// given current page number and max page number, return list of numbers to display with ... to reduce range visible
|
|
6600
6600
|
var pagination = function (currentPage, maxPage) {
|
|
6601
6601
|
var current = currentPage;
|
|
@@ -6638,13 +6638,18 @@ var Pagination = function (_a) {
|
|
|
6638
6638
|
}
|
|
6639
6639
|
var numbers = pagination(currentPage, numberOfNumbers);
|
|
6640
6640
|
var buttonClick = function (pageNo) {
|
|
6641
|
-
|
|
6641
|
+
if (buttonClickOverride) {
|
|
6642
|
+
buttonClickOverride(pageNo);
|
|
6643
|
+
}
|
|
6644
|
+
else {
|
|
6645
|
+
handleParams(postTo, [{ key: 'page', value: pageNo }]);
|
|
6646
|
+
}
|
|
6642
6647
|
};
|
|
6643
6648
|
if (numbers.length > 1) {
|
|
6644
6649
|
return (React.createElement(Container$10, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
6645
6650
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
6646
6651
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
6647
|
-
v === '...' &&
|
|
6652
|
+
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
6648
6653
|
v !== '...' && (React.createElement(Number$1, { onClick: function () { return buttonClick(v); }, isCurrent: currentPage === v, title: currentPage === v ? 'This is the current page' : 'Go to page ' + v },
|
|
6649
6654
|
React.createElement(VisuallyHidden$1, null, "Page "),
|
|
6650
6655
|
v)))); })),
|
|
@@ -7099,7 +7104,9 @@ const Container$X = styled.div`
|
|
|
7099
7104
|
display: block;
|
|
7100
7105
|
`;
|
|
7101
7106
|
|
|
7102
|
-
const MapImage = styled.img
|
|
7107
|
+
const MapImage = styled.img`
|
|
7108
|
+
max-width: 100%;
|
|
7109
|
+
`;
|
|
7103
7110
|
|
|
7104
7111
|
/**
|
|
7105
7112
|
* A static Google map with optional markers
|
|
@@ -7722,7 +7729,7 @@ const ImageLink$1 = styled.a`
|
|
|
7722
7729
|
}
|
|
7723
7730
|
`;
|
|
7724
7731
|
|
|
7725
|
-
const Header$
|
|
7732
|
+
const Header$2 = styled.div`
|
|
7726
7733
|
h3 {
|
|
7727
7734
|
margin-top: 0;
|
|
7728
7735
|
}
|
|
@@ -20139,6 +20146,9 @@ function sanitizeHtml(html, options, _recursing) {
|
|
|
20139
20146
|
if (html == null) {
|
|
20140
20147
|
return '';
|
|
20141
20148
|
}
|
|
20149
|
+
if (typeof html === 'number') {
|
|
20150
|
+
html = html.toString();
|
|
20151
|
+
}
|
|
20142
20152
|
|
|
20143
20153
|
let result = '';
|
|
20144
20154
|
// Used for hot swapping the result variable with an empty string in order to "capture" the text written to it.
|
|
@@ -20895,6 +20905,8 @@ sanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge) {
|
|
|
20895
20905
|
};
|
|
20896
20906
|
};
|
|
20897
20907
|
|
|
20908
|
+
var sanitizeHtml$1 = sanitizeHtml_1;
|
|
20909
|
+
|
|
20898
20910
|
/**
|
|
20899
20911
|
* A card component with header, footer and content
|
|
20900
20912
|
*/
|
|
@@ -20905,9 +20917,9 @@ var Card = function (_a) {
|
|
|
20905
20917
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
20906
20918
|
React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" }))) : (React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" })))),
|
|
20907
20919
|
showContent && (React.createElement(Content$4, null,
|
|
20908
|
-
header && (React.createElement(Header$
|
|
20920
|
+
header && (React.createElement(Header$2, null,
|
|
20909
20921
|
React.createElement(Heading, { text: header, level: 3 }))),
|
|
20910
|
-
React.createElement("div", { dangerouslySetInnerHTML: { __html:
|
|
20922
|
+
React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(content) } }))),
|
|
20911
20923
|
footerLink && (React.createElement(Footer$1, null,
|
|
20912
20924
|
React.createElement(FooterLink$1, { href: footerLink.url }, footerLink.title)))));
|
|
20913
20925
|
};
|
|
@@ -21257,7 +21269,7 @@ var GoogleMap = function (_a) {
|
|
|
21257
21269
|
React.createElement(ProtectiveContainer, null,
|
|
21258
21270
|
title && React.createElement(Heading, { level: 3, text: title }),
|
|
21259
21271
|
description && (React.createElement(MapDescription, { dangerouslySetInnerHTML: {
|
|
21260
|
-
__html:
|
|
21272
|
+
__html: sanitizeHtml$1(description),
|
|
21261
21273
|
} })),
|
|
21262
21274
|
(!link_url || !embed_url) && (React.createElement(AlertBannerService, { alertType: 'warning', title: 'Invalid map' },
|
|
21263
21275
|
"Embedded map contains invalid ",
|
|
@@ -21956,8 +21968,8 @@ var ImageAndText = function (_a) {
|
|
|
21956
21968
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
21957
21969
|
React.createElement(Image$2, __assign$2({}, image))),
|
|
21958
21970
|
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
21959
|
-
React.createElement(Content$3, { dangerouslySetInnerHTML: { __html:
|
|
21960
|
-
React.createElement(Content$3, { dangerouslySetInnerHTML: { __html:
|
|
21971
|
+
React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } })))) : (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
21972
|
+
React.createElement(Content$3, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
21961
21973
|
};
|
|
21962
21974
|
|
|
21963
21975
|
const Container$F = styled.div`
|
|
@@ -22231,7 +22243,7 @@ var PromoBlock = function (_a) {
|
|
|
22231
22243
|
React.createElement(PromoText, null,
|
|
22232
22244
|
React.createElement(PromoHeadline, { level: 3, text: promo.title }),
|
|
22233
22245
|
React.createElement(PromoContent, { dangerouslySetInnerHTML: {
|
|
22234
|
-
__html:
|
|
22246
|
+
__html: sanitizeHtml$1(promo.content),
|
|
22235
22247
|
} }),
|
|
22236
22248
|
React.createElement(PromoCallToAction, null, promo.callToActionText))))); }),
|
|
22237
22249
|
promos.length === 1 && React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" }))))));
|
|
@@ -22246,7 +22258,7 @@ var Promotions = function (_a) {
|
|
|
22246
22258
|
return (React.createElement(React.Fragment, null,
|
|
22247
22259
|
numberOfPromos > 0 && (React.createElement(PromoBanner, { title: promos[0].title, ctaUrl: promos[0].callToActionURL, ctaText: promos[0].callToActionText, image1440x810: promos[0].imageMedium, image144x81: promos[0].imageMedium },
|
|
22248
22260
|
React.createElement(PromoContent, { dangerouslySetInnerHTML: {
|
|
22249
|
-
__html:
|
|
22261
|
+
__html: sanitizeHtml$1(promos[0].content),
|
|
22250
22262
|
} }))),
|
|
22251
22263
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
22252
22264
|
};
|
|
@@ -22820,10 +22832,15 @@ var AlertBanner = function (_a) {
|
|
|
22820
22832
|
var themeContext = useContext(ThemeContext);
|
|
22821
22833
|
var elementRef = useRef(null);
|
|
22822
22834
|
var _c = useLocalStorage('alert_' + uid, true), showAlert = _c[0], setShowAlert = _c[1];
|
|
22835
|
+
var _d = useState(false), notServer = _d[0], setNotServer = _d[1];
|
|
22823
22836
|
useEffect(function () {
|
|
22824
22837
|
var _a;
|
|
22825
22838
|
(_a = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', embeddedLinkCLickHandler);
|
|
22826
22839
|
}, [elementRef]);
|
|
22840
|
+
/* Stop flash of banner on page load when previously dismissed */
|
|
22841
|
+
useEffect(function () {
|
|
22842
|
+
setNotServer(true);
|
|
22843
|
+
}, []);
|
|
22827
22844
|
/* A click on any link within the alert text dismisses the banner too */
|
|
22828
22845
|
var embeddedLinkCLickHandler = function (event) {
|
|
22829
22846
|
var _a;
|
|
@@ -22834,8 +22851,6 @@ var AlertBanner = function (_a) {
|
|
|
22834
22851
|
var hideClickHandler = function () {
|
|
22835
22852
|
setShowAlert(false);
|
|
22836
22853
|
};
|
|
22837
|
-
/* Stop flash of banner on page load when previously dismissed */
|
|
22838
|
-
var notServer = typeof window !== 'undefined';
|
|
22839
22854
|
return (showAlert &&
|
|
22840
22855
|
notServer && (React.createElement(Container$C, { alertType: alertType, "data-testid": "AlertBanner" },
|
|
22841
22856
|
React.createElement(MaxWidthContainer, { noBackground: true },
|
|
@@ -23977,7 +23992,7 @@ var Searchbar = function (_a) {
|
|
|
23977
23992
|
/**
|
|
23978
23993
|
* The header that should appear at the top of every page.
|
|
23979
23994
|
*/
|
|
23980
|
-
var Header = function (_a) {
|
|
23995
|
+
var Header$1 = function (_a) {
|
|
23981
23996
|
_a.children; var _b = _a.hideSearchBar, hideSearchBar = _b === void 0 ? false : _b, _c = _a.homeLink, homeLink = _c === void 0 ? '/' : _c, _d = _a.hasNewsLink, hasNewsLink = _d === void 0 ? false : _d, _e = _a.allServicesLink, allServicesLink = _e === void 0 ? '/' : _e, _f = _a.isHomepage, isHomepage = _f === void 0 ? false : _f, _g = _a.searchSuggestions, searchSuggestions = _g === void 0 ? [] : _g, props = __rest(_a, ["children", "hideSearchBar", "homeLink", "hasNewsLink", "allServicesLink", "isHomepage", "searchSuggestions"]);
|
|
23982
23997
|
var themeContext = useContext(ThemeContext);
|
|
23983
23998
|
/*
|
|
@@ -24208,7 +24223,7 @@ var HeroImage = function (_a) {
|
|
|
24208
24223
|
React.createElement(Overlay, { backgroundBox: backgroundBox, "data-testid": "HeroImageOverlay" },
|
|
24209
24224
|
breadcrumb && (React.createElement(BreadcrumbLink, { href: breadcrumb.url, backgroundBox: backgroundBox }, breadcrumb.title)),
|
|
24210
24225
|
headline && React.createElement(Headline, { level: 1, text: headline, backgroundBox: backgroundBox }),
|
|
24211
|
-
content && React.createElement(Content, { dangerouslySetInnerHTML: { __html:
|
|
24226
|
+
content && React.createElement(Content, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(content) } }),
|
|
24212
24227
|
customSearch && (React.createElement(Search, null,
|
|
24213
24228
|
React.createElement(CustomSearch, __assign$2({}, customSearch)))),
|
|
24214
24229
|
callToActionURL && backgroundBox && (React.createElement(CallToAction, { url: callToActionURL, text: callToActionText, primary: callToActionIsPrimary })),
|
|
@@ -32993,7 +33008,7 @@ const StartAgain = styled.button`
|
|
|
32993
33008
|
}
|
|
32994
33009
|
`;
|
|
32995
33010
|
|
|
32996
|
-
const LoadingContainer = styled.div`
|
|
33011
|
+
const LoadingContainer$1 = styled.div`
|
|
32997
33012
|
padding-left: 30px;
|
|
32998
33013
|
`;
|
|
32999
33014
|
|
|
@@ -33225,7 +33240,7 @@ var PostCodeSearch = function (_a) {
|
|
|
33225
33240
|
open && (React.createElement(DropDownContent, null, responseData.unitaries.length === 0 ? (React.createElement(FormWithLine, { onSubmit: function (e) {
|
|
33226
33241
|
handleSubmit(e);
|
|
33227
33242
|
}, isError: isError, lineColour: themeContext.theme_vars.colours.grey_dark },
|
|
33228
|
-
isLoading && (React.createElement(LoadingContainer, null,
|
|
33243
|
+
isLoading && (React.createElement(LoadingContainer$1, null,
|
|
33229
33244
|
React.createElement(LoadingSpinner, null),
|
|
33230
33245
|
React.createElement("p", null, "Loading..."))),
|
|
33231
33246
|
React.createElement(FormContainer, { isLoading: isLoading },
|
|
@@ -34223,6 +34238,20 @@ const Container$4 = styled.div`
|
|
|
34223
34238
|
display: block;
|
|
34224
34239
|
`;
|
|
34225
34240
|
|
|
34241
|
+
const Header = styled.div`
|
|
34242
|
+
display: flex;
|
|
34243
|
+
align-items: flex-start;
|
|
34244
|
+
flex-wrap: wrap;
|
|
34245
|
+
|
|
34246
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
34247
|
+
flex-wrap: nowrap;
|
|
34248
|
+
}
|
|
34249
|
+
|
|
34250
|
+
h1 {
|
|
34251
|
+
flex-grow: 1;
|
|
34252
|
+
}
|
|
34253
|
+
`;
|
|
34254
|
+
|
|
34226
34255
|
styled.div`
|
|
34227
34256
|
position: relative;
|
|
34228
34257
|
padding-top: 50%;
|
|
@@ -34291,7 +34320,7 @@ var SummaryList = function (_a) {
|
|
|
34291
34320
|
var terms = _a.terms, _b = _a.hasMargin, hasMargin = _b === void 0 ? true : _b;
|
|
34292
34321
|
return (React.createElement(SummaryList$1, { "data-testid": "SummaryList", hasMargin: hasMargin }, terms.map(function (summaryRow, summaryIndex) { return (React.createElement(SummaryRow, { key: summaryIndex },
|
|
34293
34322
|
React.createElement(SummaryTerm, null, summaryRow.term),
|
|
34294
|
-
React.createElement(SummaryDetail, { dangerouslySetInnerHTML: { __html:
|
|
34323
|
+
React.createElement(SummaryDetail, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(summaryRow.detail) } }))); })));
|
|
34295
34324
|
};
|
|
34296
34325
|
|
|
34297
34326
|
var ServiceContact = function (_a) {
|
|
@@ -34388,19 +34417,108 @@ var DirectoryMap = function (_a) {
|
|
|
34388
34417
|
};
|
|
34389
34418
|
return (React.createElement(Container$2, { "data-testid": "DirectoryMap" }, cookiesAccepted ? (React.createElement(React.Fragment, null,
|
|
34390
34419
|
React.createElement(Wrapper$5, { apiKey: apiKey },
|
|
34391
|
-
React.createElement(Map$1, { center: center, zoom: (_c = mapProps.zoom) !== null && _c !== void 0 ? _c : 14 }, mapProps.mapMarkers.map(function (marker) {
|
|
34420
|
+
React.createElement(Map$1, { center: center, zoom: (_c = mapProps.zoom) !== null && _c !== void 0 ? _c : 14 }, mapProps.mapMarkers.map(function (marker, index) {
|
|
34392
34421
|
var _a;
|
|
34393
|
-
return (React.createElement(MapMarker, { position: { lat: marker.lat, lng: marker.lng }, label: marker.label, title: (_a = marker.title) !== null && _a !== void 0 ? _a : '' }));
|
|
34422
|
+
return (React.createElement(MapMarker, { position: { lat: marker.lat, lng: marker.lng }, label: marker.label, title: (_a = marker.title) !== null && _a !== void 0 ? _a : '', key: index }));
|
|
34394
34423
|
}))))) : (React.createElement(StaticMap, __assign$2({}, mapProps)))));
|
|
34395
34424
|
};
|
|
34396
34425
|
|
|
34426
|
+
const AddToShortlist = styled.button`
|
|
34427
|
+
border: 2px solid ${(props) => props.theme.theme_vars.colours.action};
|
|
34428
|
+
background: ${(props) => props.theme.theme_vars.colours.white};
|
|
34429
|
+
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
34430
|
+
cursor: pointer;
|
|
34431
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34432
|
+
font-weight: bold;
|
|
34433
|
+
display: flex;
|
|
34434
|
+
flex-direction: row;
|
|
34435
|
+
justify-content: flex-start;
|
|
34436
|
+
align-items: center;
|
|
34437
|
+
&:hover {
|
|
34438
|
+
${(props) => props.theme.linkStylesHover}
|
|
34439
|
+
background: ${(props) => props.theme.theme_vars.colours.action_light}
|
|
34440
|
+
}
|
|
34441
|
+
&:focus {
|
|
34442
|
+
${(props) => props.theme.linkStylesFocus}
|
|
34443
|
+
}
|
|
34444
|
+
&:active {
|
|
34445
|
+
${(props) => props.theme.linkStylesActive}
|
|
34446
|
+
}
|
|
34447
|
+
|
|
34448
|
+
svg {
|
|
34449
|
+
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34450
|
+
}
|
|
34451
|
+
|
|
34452
|
+
@media print {
|
|
34453
|
+
display: none;
|
|
34454
|
+
}
|
|
34455
|
+
`;
|
|
34456
|
+
|
|
34457
|
+
var DirectoryShortListContext = createContext({});
|
|
34458
|
+
var DirectoryShortListProvider = function (_a) {
|
|
34459
|
+
var children = _a.children;
|
|
34460
|
+
var _b = useLocalStorage('DirectoryShort', []), favourites = _b[0], setFavourites = _b[1];
|
|
34461
|
+
var toggleFavourites = function (id, name, snippet) {
|
|
34462
|
+
var updatedFavourites = __spreadArray([], favourites, true);
|
|
34463
|
+
if (isFavourite(id)) {
|
|
34464
|
+
var favouriteToRemove = updatedFavourites.find(function (favourite) { return favourite.id === id; });
|
|
34465
|
+
updatedFavourites.splice(updatedFavourites.indexOf(favouriteToRemove), 1);
|
|
34466
|
+
}
|
|
34467
|
+
else {
|
|
34468
|
+
updatedFavourites.push({
|
|
34469
|
+
id: id,
|
|
34470
|
+
name: name,
|
|
34471
|
+
snippet: snippet,
|
|
34472
|
+
});
|
|
34473
|
+
}
|
|
34474
|
+
setFavourites(updatedFavourites);
|
|
34475
|
+
};
|
|
34476
|
+
var isFavourite = function (id) {
|
|
34477
|
+
return typeof favourites.find(function (favourite) { return favourite.id === id; }) !== 'undefined';
|
|
34478
|
+
};
|
|
34479
|
+
var value = {
|
|
34480
|
+
favourites: {
|
|
34481
|
+
favourites: favourites,
|
|
34482
|
+
setFavourites: setFavourites,
|
|
34483
|
+
},
|
|
34484
|
+
toggleFavourites: toggleFavourites,
|
|
34485
|
+
isFavourite: isFavourite,
|
|
34486
|
+
};
|
|
34487
|
+
return React.createElement(DirectoryShortListContext.Provider, { value: value }, children);
|
|
34488
|
+
};
|
|
34489
|
+
var useDirectoryShortListContext = function () {
|
|
34490
|
+
return useContext(DirectoryShortListContext);
|
|
34491
|
+
};
|
|
34492
|
+
|
|
34493
|
+
var DirectoryAddToShortList = function (_a) {
|
|
34494
|
+
var id = _a.id, name = _a.name, snippet = _a.snippet;
|
|
34495
|
+
var _b = useDirectoryShortListContext(), toggleFavourites = _b.toggleFavourites, isFavourite = _b.isFavourite;
|
|
34496
|
+
return (React.createElement(AddToShortlist, { onClick: function (e) { return toggleFavourites(id, name, snippet); }, "data-testid": "DirectoryAddToShortList" },
|
|
34497
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", width: "15px", height: "15px" },
|
|
34498
|
+
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" })),
|
|
34499
|
+
isFavourite(id) ? React.createElement(React.Fragment, null, "Remove from shortlist") : React.createElement(React.Fragment, null, "Add to shortlist")));
|
|
34500
|
+
};
|
|
34501
|
+
|
|
34502
|
+
var getSnippet = function (description, extractLength) {
|
|
34503
|
+
if (extractLength === void 0) { extractLength = 190; }
|
|
34504
|
+
return sanitizeHtml$1(description, {
|
|
34505
|
+
allowedTags: [],
|
|
34506
|
+
allowedAttributes: {},
|
|
34507
|
+
}).substr(0, extractLength) + String.fromCharCode(8230);
|
|
34508
|
+
};
|
|
34397
34509
|
var DirectoryService = function (_a) {
|
|
34398
|
-
var name = _a.name, accreditations = _a.accreditations, descriptionElement = _a.descriptionElement, email = _a.email, fees = _a.fees, languages = _a.languages, regular_schedules = _a.regular_schedules, contacts = _a.contacts, service_areas = _a.service_areas, service_at_locations = _a.service_at_locations, url = _a.url;
|
|
34510
|
+
var id = _a.id, name = _a.name, accreditations = _a.accreditations, description = _a.description, descriptionElement = _a.descriptionElement, email = _a.email, fees = _a.fees, languages = _a.languages, regular_schedules = _a.regular_schedules, contacts = _a.contacts, service_areas = _a.service_areas, service_at_locations = _a.service_at_locations, url = _a.url;
|
|
34399
34511
|
var labelLetters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'];
|
|
34512
|
+
var _b = useState(false), notServer = _b[0], setNotServer = _b[1];
|
|
34513
|
+
useEffect(function () {
|
|
34514
|
+
setNotServer(true);
|
|
34515
|
+
}, []);
|
|
34400
34516
|
return (React.createElement(Container$4, { "data-testid": "DirectoryService" },
|
|
34401
34517
|
React.createElement(Row$1, null,
|
|
34402
34518
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
34403
|
-
React.createElement(
|
|
34519
|
+
React.createElement(Header, null,
|
|
34520
|
+
React.createElement(Heading, { level: 1, text: name }),
|
|
34521
|
+
React.createElement(DirectoryAddToShortList, { id: id, name: name, snippet: getSnippet(description, 190) }))),
|
|
34404
34522
|
service_at_locations.length > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
34405
34523
|
React.createElement(Heading, { level: 2, text: "Location" }), service_at_locations === null || service_at_locations === void 0 ? void 0 :
|
|
34406
34524
|
service_at_locations.map(function (location, locationIndex) { return (React.createElement(Row$1, { key: locationIndex },
|
|
@@ -34414,7 +34532,7 @@ var DirectoryService = function (_a) {
|
|
|
34414
34532
|
React.createElement(Heading, { level: 3, text: "Facilities" }),
|
|
34415
34533
|
React.createElement("ul", null, location.accessibility_for_disabilities.map(function (accessibility) { return (React.createElement("li", { key: accessibility.id }, accessibility.accessibility)); }))))),
|
|
34416
34534
|
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
34417
|
-
React.createElement(DirectoryMap, { mapProps: {
|
|
34535
|
+
notServer && (React.createElement(DirectoryMap, { mapProps: {
|
|
34418
34536
|
centre: "".concat(location.latitude, ",").concat(location.longitude),
|
|
34419
34537
|
imageAltText: "".concat(location.name, " shown on a map"),
|
|
34420
34538
|
zoom: 14,
|
|
@@ -34427,7 +34545,7 @@ var DirectoryService = function (_a) {
|
|
|
34427
34545
|
title: location.name,
|
|
34428
34546
|
},
|
|
34429
34547
|
],
|
|
34430
|
-
} }),
|
|
34548
|
+
} })),
|
|
34431
34549
|
React.createElement(MapLink, { href: "https://www.google.com/maps/search/?api=1&query=".concat(location.latitude, "%2C").concat(location.longitude) }, "View in Google Maps")))); }))),
|
|
34432
34550
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
34433
34551
|
React.createElement(Heading, { level: 2, text: "About this service" }),
|
|
@@ -34541,6 +34659,38 @@ styled.span`
|
|
|
34541
34659
|
word-wrap: break-word;
|
|
34542
34660
|
`;
|
|
34543
34661
|
|
|
34662
|
+
const FilterContainer = styled.div`
|
|
34663
|
+
display: ${(props) => (props.showFilters ? 'flex' : 'none')};
|
|
34664
|
+
|
|
34665
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
34666
|
+
display: flex;
|
|
34667
|
+
}
|
|
34668
|
+
`;
|
|
34669
|
+
|
|
34670
|
+
const FilterToggle = styled.button`
|
|
34671
|
+
cursor: pointer;
|
|
34672
|
+
width: 100%;
|
|
34673
|
+
border: none;
|
|
34674
|
+
background: none;
|
|
34675
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34676
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34677
|
+
${(props) => props.theme.theme_vars.h4}
|
|
34678
|
+
${(props) => props.theme.linkStyles}
|
|
34679
|
+
&:hover {
|
|
34680
|
+
${(props) => props.theme.linkStylesHover}
|
|
34681
|
+
}
|
|
34682
|
+
&:focus {
|
|
34683
|
+
${(props) => props.theme.linkStylesFocus}
|
|
34684
|
+
}
|
|
34685
|
+
&:active {
|
|
34686
|
+
${(props) => props.theme.linkStylesActive}
|
|
34687
|
+
}
|
|
34688
|
+
|
|
34689
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
34690
|
+
display: none;
|
|
34691
|
+
}
|
|
34692
|
+
`;
|
|
34693
|
+
|
|
34544
34694
|
const Fieldset = styled.fieldset`
|
|
34545
34695
|
display: block;
|
|
34546
34696
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -34558,6 +34708,7 @@ const Legend = styled.legend`
|
|
|
34558
34708
|
`;
|
|
34559
34709
|
|
|
34560
34710
|
const LegendButton = styled.button`
|
|
34711
|
+
position: relative;
|
|
34561
34712
|
background: none;
|
|
34562
34713
|
border: none;
|
|
34563
34714
|
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
@@ -34708,11 +34859,44 @@ const Accordion = styled.div`
|
|
|
34708
34859
|
display: ${(props) => (props.isOpen ? 'block' : 'none')};
|
|
34709
34860
|
`;
|
|
34710
34861
|
|
|
34862
|
+
const FavouritesContainer = styled.div`
|
|
34863
|
+
display: flex;
|
|
34864
|
+
flex-direction: row;
|
|
34865
|
+
justify-content: space-between;
|
|
34866
|
+
align-items: center;
|
|
34867
|
+
padding-top: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34868
|
+
`;
|
|
34869
|
+
|
|
34870
|
+
const MapToggle = styled.button`
|
|
34871
|
+
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
34872
|
+
border: 2px solid ${(props) => props.theme.theme_vars.colours.action};
|
|
34873
|
+
background: ${(props) => props.theme.theme_vars.colours.white};
|
|
34874
|
+
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
34875
|
+
cursor: pointer;
|
|
34876
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34877
|
+
font-weight: bold;
|
|
34878
|
+
display: flex;
|
|
34879
|
+
flex-direction: row;
|
|
34880
|
+
justify-content: flex-start;
|
|
34881
|
+
align-items: center;
|
|
34882
|
+
&:hover {
|
|
34883
|
+
${(props) => props.theme.linkStylesHover}
|
|
34884
|
+
background: ${(props) => props.theme.theme_vars.colours.action_light}
|
|
34885
|
+
}
|
|
34886
|
+
&:focus {
|
|
34887
|
+
${(props) => props.theme.linkStylesFocus}
|
|
34888
|
+
}
|
|
34889
|
+
&:active {
|
|
34890
|
+
${(props) => props.theme.linkStylesActive}
|
|
34891
|
+
}
|
|
34892
|
+
`;
|
|
34893
|
+
|
|
34711
34894
|
const Favourites = styled.a`
|
|
34712
34895
|
display: flex;
|
|
34713
34896
|
flex-direction: row;
|
|
34714
34897
|
justify-content: flex-end;
|
|
34715
34898
|
align-items: center;
|
|
34899
|
+
flex-grow: 1;
|
|
34716
34900
|
cursor: pointer;
|
|
34717
34901
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small} 0;
|
|
34718
34902
|
&:hover {
|
|
@@ -34774,92 +34958,23 @@ const MarkerContainer = styled.div`
|
|
|
34774
34958
|
}
|
|
34775
34959
|
`;
|
|
34776
34960
|
|
|
34777
|
-
|
|
34778
|
-
var DirectoryShortListProvider = function (_a) {
|
|
34779
|
-
var children = _a.children;
|
|
34780
|
-
var _b = useLocalStorage('DirectoryShort', []), favourites = _b[0], setFavourites = _b[1];
|
|
34781
|
-
var toggleFavourites = function (id, name, snippet) {
|
|
34782
|
-
var updatedFavourites = __spreadArray([], favourites, true);
|
|
34783
|
-
if (isFavourite(id)) {
|
|
34784
|
-
var favouriteToRemove = updatedFavourites.find(function (favourite) { return favourite.id === id; });
|
|
34785
|
-
updatedFavourites.splice(updatedFavourites.indexOf(favouriteToRemove), 1);
|
|
34786
|
-
}
|
|
34787
|
-
else {
|
|
34788
|
-
updatedFavourites.push({
|
|
34789
|
-
id: id,
|
|
34790
|
-
name: name,
|
|
34791
|
-
snippet: snippet,
|
|
34792
|
-
});
|
|
34793
|
-
}
|
|
34794
|
-
setFavourites(updatedFavourites);
|
|
34795
|
-
};
|
|
34796
|
-
var isFavourite = function (id) {
|
|
34797
|
-
return typeof favourites.find(function (favourite) { return favourite.id === id; }) !== 'undefined';
|
|
34798
|
-
};
|
|
34799
|
-
var value = {
|
|
34800
|
-
favourites: {
|
|
34801
|
-
favourites: favourites,
|
|
34802
|
-
setFavourites: setFavourites,
|
|
34803
|
-
},
|
|
34804
|
-
toggleFavourites: toggleFavourites,
|
|
34805
|
-
isFavourite: isFavourite,
|
|
34806
|
-
};
|
|
34807
|
-
return React.createElement(DirectoryShortListContext.Provider, { value: value }, children);
|
|
34808
|
-
};
|
|
34809
|
-
var useDirectoryShortListContext = function () {
|
|
34810
|
-
return useContext(DirectoryShortListContext);
|
|
34811
|
-
};
|
|
34812
|
-
|
|
34813
|
-
const AddToShortlist = styled.button`
|
|
34814
|
-
border: 2px solid ${(props) => props.theme.theme_vars.colours.action};
|
|
34815
|
-
background: ${(props) => props.theme.theme_vars.colours.white};
|
|
34816
|
-
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
34817
|
-
cursor: pointer;
|
|
34818
|
-
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34819
|
-
font-weight: bold;
|
|
34961
|
+
const LoadingContainer = styled.div`
|
|
34820
34962
|
display: flex;
|
|
34821
|
-
|
|
34822
|
-
justify-content: flex-start;
|
|
34963
|
+
justify-content: center;
|
|
34823
34964
|
align-items: center;
|
|
34824
|
-
|
|
34825
|
-
${(props) => props.theme.linkStylesHover}
|
|
34826
|
-
background: ${(props) => props.theme.theme_vars.colours.action_light}
|
|
34827
|
-
}
|
|
34828
|
-
&:focus {
|
|
34829
|
-
${(props) => props.theme.linkStylesFocus}
|
|
34830
|
-
}
|
|
34831
|
-
&:active {
|
|
34832
|
-
${(props) => props.theme.linkStylesActive}
|
|
34833
|
-
}
|
|
34834
|
-
|
|
34835
|
-
svg {
|
|
34836
|
-
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34837
|
-
}
|
|
34838
|
-
|
|
34839
|
-
@media print {
|
|
34840
|
-
display: none;
|
|
34841
|
-
}
|
|
34965
|
+
width: 100%;
|
|
34842
34966
|
`;
|
|
34843
34967
|
|
|
34844
|
-
var DirectoryAddToShortList = function (_a) {
|
|
34845
|
-
var id = _a.id, name = _a.name, snippet = _a.snippet;
|
|
34846
|
-
var _b = useDirectoryShortListContext(), toggleFavourites = _b.toggleFavourites, isFavourite = _b.isFavourite;
|
|
34847
|
-
return (React.createElement(AddToShortlist, { onClick: function (e) { return toggleFavourites(id, name, snippet); }, "data-testid": "DirectoryAddToShortList" },
|
|
34848
|
-
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", width: "15px", height: "15px" },
|
|
34849
|
-
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" })),
|
|
34850
|
-
isFavourite(id) ? React.createElement(React.Fragment, null, "Remove from shortlist") : React.createElement(React.Fragment, null, "Add to shortlist")));
|
|
34851
|
-
};
|
|
34852
|
-
|
|
34853
34968
|
var DirectoryServiceList = function (_a) {
|
|
34854
|
-
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.
|
|
34855
|
-
var _p =
|
|
34856
|
-
var _q =
|
|
34857
|
-
var _r = useState(
|
|
34858
|
-
var _s =
|
|
34859
|
-
var
|
|
34860
|
-
|
|
34861
|
-
|
|
34862
|
-
|
|
34969
|
+
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.postcode, postcode = _c === void 0 ? '' : _c, setPostcode = _a.setPostcode, _d = _a.totalResults, totalResults = _d === void 0 ? 0 : _d, _e = _a.pageNumber, pageNumber = _e === void 0 ? 1 : _e, setPageNumber = _a.setPageNumber, _f = _a.perPage, perPage = _f === void 0 ? 5 : _f, _g = _a.extractLength, extractLength = _g === void 0 ? 190 : _g, _h = _a.categories, categories = _h === void 0 ? [] : _h, setCategories = _a.setCategories, _j = _a.minimumAge, minimumAge = _j === void 0 ? '' : _j, setMinimumAge = _a.setMinimumAge, _k = _a.maximumAge, maximumAge = _k === void 0 ? '' : _k, setMaximumAge = _a.setMaximumAge, _l = _a.mapCenter, mapCenter = _l === void 0 ? '52.23555414368587,-0.8957390701320571' : _l, _m = _a.mapZoom, mapZoom = _m === void 0 ? 9 : _m, _o = _a.isLoading, isLoading = _o === void 0 ? false : _o;
|
|
34970
|
+
var _p = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion"), []), accordions = _p[0], setAccordions = _p[1];
|
|
34971
|
+
var _q = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-show-map"), false), showMap = _q[0], setShowMap = _q[1];
|
|
34972
|
+
var _r = useState(false), showFilters = _r[0], setShowFilters = _r[1];
|
|
34973
|
+
var _s = useDirectoryShortListContext(), _t = _s.favourites, favourites = _t.favourites; _t.setFavourites; _s.toggleFavourites; _s.isFavourite;
|
|
34974
|
+
var _u = useState(false), notServer = _u[0], setNotServer = _u[1];
|
|
34975
|
+
useEffect(function () {
|
|
34976
|
+
setNotServer(true);
|
|
34977
|
+
}, []);
|
|
34863
34978
|
if (accordions.length === 0) {
|
|
34864
34979
|
var tempAccordions_1 = [];
|
|
34865
34980
|
categories === null || categories === void 0 ? void 0 : categories.forEach(function () {
|
|
@@ -34868,84 +34983,19 @@ var DirectoryServiceList = function (_a) {
|
|
|
34868
34983
|
tempAccordions_1.push(false);
|
|
34869
34984
|
setAccordions(tempAccordions_1);
|
|
34870
34985
|
}
|
|
34871
|
-
useEffect(function () {
|
|
34872
|
-
if (!submit)
|
|
34873
|
-
return;
|
|
34874
|
-
var params = [];
|
|
34875
|
-
if (search !== '') {
|
|
34876
|
-
params.push({
|
|
34877
|
-
key: 'search',
|
|
34878
|
-
value: search,
|
|
34879
|
-
});
|
|
34880
|
-
}
|
|
34881
|
-
if (postcode !== '') {
|
|
34882
|
-
params.push({
|
|
34883
|
-
key: 'postcode',
|
|
34884
|
-
value: postcode,
|
|
34885
|
-
});
|
|
34886
|
-
}
|
|
34887
|
-
if (minimumAge && typeof minimumAge === 'number') {
|
|
34888
|
-
params.push({
|
|
34889
|
-
key: 'minimum_age',
|
|
34890
|
-
value: minimumAge,
|
|
34891
|
-
});
|
|
34892
|
-
}
|
|
34893
|
-
if (maximumAge && typeof maximumAge === 'number') {
|
|
34894
|
-
params.push({
|
|
34895
|
-
key: 'maximum_age',
|
|
34896
|
-
value: maximumAge,
|
|
34897
|
-
});
|
|
34898
|
-
}
|
|
34899
|
-
checkboxState === null || checkboxState === void 0 ? void 0 : checkboxState.forEach(function (category) {
|
|
34900
|
-
if (customTaxonomyFilters.includes(category.vocabulary)) {
|
|
34901
|
-
category.options.forEach(function (taxonomy) {
|
|
34902
|
-
if (taxonomy.checked) {
|
|
34903
|
-
params.push({
|
|
34904
|
-
key: category.vocabulary,
|
|
34905
|
-
value: taxonomy.id,
|
|
34906
|
-
});
|
|
34907
|
-
}
|
|
34908
|
-
});
|
|
34909
|
-
}
|
|
34910
|
-
else {
|
|
34911
|
-
category.options.forEach(function (taxonomy) {
|
|
34912
|
-
if (taxonomy.checked) {
|
|
34913
|
-
params.push({
|
|
34914
|
-
key: 'taxonomy_id',
|
|
34915
|
-
value: taxonomy.id,
|
|
34916
|
-
});
|
|
34917
|
-
}
|
|
34918
|
-
});
|
|
34919
|
-
}
|
|
34920
|
-
});
|
|
34921
|
-
setSubmit(false);
|
|
34922
|
-
var query = params
|
|
34923
|
-
.map(function (param) {
|
|
34924
|
-
return "".concat(param.key, "=").concat(param.value);
|
|
34925
|
-
})
|
|
34926
|
-
.join('&');
|
|
34927
|
-
window.location.href = directoryPath + '?' + query;
|
|
34928
|
-
}, [submit]);
|
|
34929
|
-
var handleSubmit = function (e) {
|
|
34930
|
-
e.preventDefault();
|
|
34931
|
-
setSearch(e.target.directorySearch.value);
|
|
34932
|
-
setPostcode(e.target.postcode.value);
|
|
34933
|
-
setSubmit(true);
|
|
34934
|
-
};
|
|
34935
34986
|
var optionChecked = function (e, categoryIndex, singleSelection) {
|
|
34936
|
-
var
|
|
34987
|
+
var newCategories = __spreadArray([], categories, true);
|
|
34937
34988
|
if (singleSelection) {
|
|
34938
|
-
|
|
34989
|
+
newCategories[categoryIndex].options.forEach(function (option) {
|
|
34939
34990
|
option.checked = false;
|
|
34940
34991
|
});
|
|
34941
34992
|
}
|
|
34942
|
-
|
|
34993
|
+
newCategories[categoryIndex].options.find(function (option) {
|
|
34943
34994
|
if (option.id === e.target.value) {
|
|
34944
34995
|
option.checked = !option.checked;
|
|
34945
34996
|
}
|
|
34946
34997
|
});
|
|
34947
|
-
|
|
34948
|
-
setSubmit(true);
|
|
34998
|
+
setCategories(newCategories);
|
|
34949
34999
|
};
|
|
34950
35000
|
var from = pageNumber * perPage - (perPage - 1);
|
|
34951
35001
|
var to = from + ((services === null || services === void 0 ? void 0 : services.length) ? services.length - 1 : 0);
|
|
@@ -34957,8 +35007,8 @@ var DirectoryServiceList = function (_a) {
|
|
|
34957
35007
|
updatedAccordions[index] = !updatedAccordions[index];
|
|
34958
35008
|
setAccordions(updatedAccordions);
|
|
34959
35009
|
};
|
|
34960
|
-
var
|
|
34961
|
-
var labelLetters =
|
|
35010
|
+
var letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
35011
|
+
var labelLetters = letters.split('');
|
|
34962
35012
|
var mapProps = {
|
|
34963
35013
|
centre: mapCenter,
|
|
34964
35014
|
zoom: mapZoom,
|
|
@@ -34978,103 +35028,101 @@ var DirectoryServiceList = function (_a) {
|
|
|
34978
35028
|
React.createElement(Row$1, null,
|
|
34979
35029
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
34980
35030
|
React.createElement(SearchHeader, null,
|
|
34981
|
-
React.createElement(FormWithLine, { hideLine: true, onSubmit: function (
|
|
34982
|
-
handleSubmit(e);
|
|
34983
|
-
} },
|
|
35031
|
+
React.createElement(FormWithLine, { hideLine: true, onSubmit: function () { } },
|
|
34984
35032
|
React.createElement(Row$1, null,
|
|
34985
35033
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
34986
35034
|
React.createElement(Label, { htmlFor: "directorySearch" }, "What are you looking for?"),
|
|
34987
35035
|
React.createElement(HintText, { text: "Enter a search word or phrase" }),
|
|
34988
|
-
React.createElement(Input, { name: "directorySearch", type: "text", defaultValue:
|
|
35036
|
+
React.createElement(Input, { name: "directorySearch", type: "text", defaultValue: search, id: "directorySearch", onChange: function (e) {
|
|
35037
|
+
setSearch(e.target.value);
|
|
35038
|
+
} })),
|
|
34989
35039
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
34990
35040
|
React.createElement(Label, { htmlFor: "postcode" }, "Postcode"),
|
|
34991
35041
|
React.createElement(HintText, { text: "Enter a postcode" }),
|
|
34992
|
-
React.createElement(Input, { name: "postcode", type: "text", defaultValue: postcode,
|
|
35042
|
+
React.createElement(Input, { name: "postcode", type: "text", defaultValue: postcode, id: "postcode", onChange: function (e) { return setPostcode(e.target.value); } })),
|
|
34993
35043
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
34994
35044
|
React.createElement(ButtonContainer, null,
|
|
34995
|
-
React.createElement(Button, null,
|
|
34996
|
-
React.createElement(ButtonText, null, "Search"),
|
|
34997
|
-
React.createElement(IconDownload, { colourFill: "#fff" })),
|
|
34998
35045
|
React.createElement(Button, { onClick: clearSearch, type: "button" },
|
|
34999
35046
|
React.createElement(ButtonText, null, "Clear"),
|
|
35000
35047
|
React.createElement(IconDownload$1, { colourFill: "#fff" })))))))),
|
|
35001
35048
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
35049
|
+
React.createElement(FilterToggle, { type: "button", onClick: function (e) { return setShowFilters(!showFilters); } }, showFilters ? "Hide Filters" : "Show Filters"),
|
|
35050
|
+
React.createElement(FilterContainer, { showFilters: showFilters },
|
|
35051
|
+
React.createElement(Row$1, null,
|
|
35052
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35053
|
+
React.createElement(ResultInfo, null, "Refine your search")),
|
|
35054
|
+
notServer && (React.createElement(React.Fragment, null, categories === null || categories === void 0 ? void 0 :
|
|
35055
|
+
categories.map(function (category, categoryIndex) { return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: category.label },
|
|
35056
|
+
React.createElement(Fieldset, null,
|
|
35057
|
+
React.createElement(Legend, null,
|
|
35058
|
+
React.createElement(LegendButton, { onClick: function (e) { return toggleAccordion(categoryIndex); }, type: "button" },
|
|
35059
|
+
category.label,
|
|
35060
|
+
React.createElement(AccordionIcon, { isOpen: accordions[categoryIndex] }))),
|
|
35061
|
+
React.createElement(Accordion, { isOpen: accordions[categoryIndex] }, category.options.map(function (taxonomy) { return (React.createElement(Category, { key: taxonomy.id },
|
|
35062
|
+
React.createElement(CategoryInput, { type: category.singleSelection ? 'radio' : 'checkbox', value: taxonomy.id, id: taxonomy.id.replace(' ', ''), name: taxonomy.vocabulary, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); }, checked: taxonomy.checked }),
|
|
35063
|
+
React.createElement(CategoryInputLabel, { isChecked: taxonomy.checked, htmlFor: taxonomy.id.replace(' ', ''), singleSelection: category.singleSelection }, taxonomy.name))); }))))); }),
|
|
35064
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35065
|
+
React.createElement(Fieldset, null,
|
|
35066
|
+
React.createElement(Legend, { onClick: function (e) { return toggleAccordion(categories.length); } },
|
|
35067
|
+
React.createElement(LegendButton, { onClick: function (e) { return toggleAccordion(categories.length); }, type: "button" },
|
|
35068
|
+
"Select age group (years)",
|
|
35069
|
+
React.createElement(AccordionIcon, { isOpen: accordions[categories.length] }))),
|
|
35070
|
+
React.createElement(Accordion, { isOpen: accordions[categories.length] },
|
|
35071
|
+
React.createElement(Row$1, null,
|
|
35072
|
+
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
35073
|
+
React.createElement(Label, { htmlFor: "minimum_age" }, "From"),
|
|
35074
|
+
React.createElement(Input, { name: "minimum_age", onChange: function (e) { var _a; return setMinimumAge((_a = e.target.value) !== null && _a !== void 0 ? _a : ''); }, defaultValue: minimumAge, id: "minimum_age" })),
|
|
35075
|
+
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
35076
|
+
React.createElement(Label, { htmlFor: "maximum_age" }, "To"),
|
|
35077
|
+
React.createElement(Input, { name: "maximum_age", onChange: function (e) { var _a; return setMaximumAge((_a = e.target.value) !== null && _a !== void 0 ? _a : ''); }, defaultValue: maximumAge, id: "maximum_age" }))))))))))),
|
|
35078
|
+
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
35002
35079
|
React.createElement(Row$1, null,
|
|
35003
|
-
React.createElement(
|
|
35004
|
-
React.createElement(
|
|
35005
|
-
|
|
35006
|
-
checkboxState.map(function (category, categoryIndex) { return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: category.label },
|
|
35007
|
-
React.createElement(Fieldset, null,
|
|
35008
|
-
React.createElement(Legend, null,
|
|
35009
|
-
React.createElement(LegendButton, { onClick: function (e) { return toggleAccordion(categoryIndex); }, type: "button" },
|
|
35010
|
-
category.label,
|
|
35011
|
-
React.createElement(AccordionIcon, { isOpen: accordions[categoryIndex] }))),
|
|
35012
|
-
React.createElement(Accordion, { isOpen: accordions[categoryIndex] }, category.options.map(function (taxonomy) { return (React.createElement(Category, { key: taxonomy.id },
|
|
35013
|
-
React.createElement(CategoryInput, { type: category.singleSelection ? 'radio' : 'checkbox', value: taxonomy.id, id: taxonomy.id.replace(' ', ''), name: taxonomy.vocabulary, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); }, checked: taxonomy.checked }),
|
|
35014
|
-
React.createElement(CategoryInputLabel, { isChecked: taxonomy.checked, htmlFor: taxonomy.id.replace(' ', ''), singleSelection: category.singleSelection }, taxonomy.name))); }))))); }),
|
|
35080
|
+
isLoading ? (React.createElement(LoadingContainer, null,
|
|
35081
|
+
React.createElement(LoadingSpinner, null),
|
|
35082
|
+
React.createElement("p", null, "Loading"))) : (React.createElement(React.Fragment, null,
|
|
35015
35083
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35016
|
-
React.createElement(
|
|
35017
|
-
|
|
35018
|
-
|
|
35019
|
-
|
|
35020
|
-
|
|
35021
|
-
|
|
35084
|
+
(services === null || services === void 0 ? void 0 : services.length) > 0 ? (React.createElement(ResultInfo, null,
|
|
35085
|
+
"Showing ",
|
|
35086
|
+
from,
|
|
35087
|
+
" to ",
|
|
35088
|
+
to,
|
|
35089
|
+
" out of ",
|
|
35090
|
+
totalResults.toLocaleString())) : (React.createElement(ResultInfo, null, "No results found")),
|
|
35091
|
+
React.createElement(FavouritesContainer, null,
|
|
35092
|
+
(services === null || services === void 0 ? void 0 : services.length) > 0 && (React.createElement(MapToggle, { type: "button", onClick: function (e) { return setShowMap(!showMap); } }, showMap ? "Hide Map" : "Show Map")),
|
|
35093
|
+
React.createElement(Favourites, { href: shortListPath },
|
|
35094
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", width: "15px", height: "15px" },
|
|
35095
|
+
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" })),
|
|
35096
|
+
' ',
|
|
35097
|
+
"Shortlist (",
|
|
35098
|
+
favourites.length,
|
|
35099
|
+
")"))),
|
|
35100
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" }, notServer && React.createElement(React.Fragment, null, (services === null || services === void 0 ? void 0 : services.length) > 0 && showMap && React.createElement(DirectoryMap, { mapProps: mapProps }))),
|
|
35101
|
+
services.map(function (service, index) {
|
|
35102
|
+
var snippet = sanitizeHtml$1(service.description, {
|
|
35103
|
+
allowedTags: [],
|
|
35104
|
+
allowedAttributes: {},
|
|
35105
|
+
}).substr(0, extractLength) + String.fromCharCode(8230);
|
|
35106
|
+
return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: service.id },
|
|
35107
|
+
React.createElement(ServiceContainer, { resultNumber: index },
|
|
35022
35108
|
React.createElement(Row$1, null,
|
|
35023
|
-
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
35024
|
-
React.createElement(Label, { htmlFor: "minimum_age" }, "From"),
|
|
35025
|
-
React.createElement(Input, { name: "minimum_age", onChange: function (e) { var _a; return setMinimumAge((_a = parseInt(e.target.value)) !== null && _a !== void 0 ? _a : ''); }, defaultValue: minimumAge, id: "minimum_age" })),
|
|
35026
|
-
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
35027
|
-
React.createElement(Label, { htmlFor: "maximum_age" }, "To"),
|
|
35028
|
-
React.createElement(Input, { name: "maximum_age", onChange: function (e) { var _a; return setMaximumAge((_a = parseInt(e.target.value)) !== null && _a !== void 0 ? _a : ''); }, defaultValue: maximumAge, id: "maximum_age" })),
|
|
35029
35109
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35030
|
-
React.createElement(
|
|
35031
|
-
React.createElement(
|
|
35032
|
-
React.createElement(
|
|
35033
|
-
|
|
35034
|
-
|
|
35035
|
-
|
|
35036
|
-
|
|
35037
|
-
|
|
35038
|
-
|
|
35039
|
-
|
|
35040
|
-
|
|
35041
|
-
|
|
35042
|
-
|
|
35043
|
-
|
|
35044
|
-
|
|
35045
|
-
|
|
35046
|
-
' ',
|
|
35047
|
-
"Shortlist (",
|
|
35048
|
-
favourites.length,
|
|
35049
|
-
")")),
|
|
35050
|
-
(services === null || services === void 0 ? void 0 : services.length) > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35051
|
-
React.createElement(DirectoryMap, { mapProps: mapProps }))),
|
|
35052
|
-
services.map(function (service, index) {
|
|
35053
|
-
var snippet = sanitizeHtml_1(service.description, {
|
|
35054
|
-
allowedTags: [],
|
|
35055
|
-
allowedAttributes: {},
|
|
35056
|
-
}).substr(0, extractLength) + String.fromCharCode(8230);
|
|
35057
|
-
return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: service.id },
|
|
35058
|
-
React.createElement(ServiceContainer, { resultNumber: index },
|
|
35059
|
-
React.createElement(Row$1, null,
|
|
35060
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35061
|
-
React.createElement(ServiceHeader, null,
|
|
35062
|
-
React.createElement(ServiceLink$1, { href: "".concat(directoryPath, "/").concat(service.id) }, service.name),
|
|
35063
|
-
React.createElement(MarkerContainer, null,
|
|
35064
|
-
React.createElement("span", null, labelLetters[index]),
|
|
35065
|
-
React.createElement("svg", { version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 42.4 59.1", stroke: "currentColor" },
|
|
35066
|
-
React.createElement("path", { d: "M19.7,5.6c-0.1,0-0.5,0.1-0.9,0.1c-3.3,0.4-6.5,2-8.9,4.4c-2.6,2.6-4.2,5.9-4.6,9.6c-0.1,1,0,3.1,0.1,4.1c0.3,2.1,1.1,4.2,2.3,6.6c0.9,1.6,1.6,2.9,4.2,7c0.9,1.4,1.9,3.1,2.6,4.2c2.3,3.9,4.1,7.9,5.4,11.9c0.2,0.6,0.3,0.8,0.6,0.9c0.5,0.2,1.1,0.1,1.4-0.3c0.1-0.1,0.2-0.5,0.4-0.9c1.1-3.3,2.5-6.5,4.2-9.5c1.2-2.2,2-3.6,4.4-7.4c1.7-2.7,2.3-3.6,2.9-4.8c1.6-2.9,2.5-5.3,2.9-7.8c0.2-1,0.2-3.1,0.1-4.1c-0.2-1.5-0.5-3-1-4.2c-2.1-5.2-6.8-8.9-12.4-9.8C22.9,5.6,20.2,5.5,19.7,5.6z", fill: "currentColor" })))),
|
|
35067
|
-
React.createElement("div", null, snippet),
|
|
35068
|
-
service.eligibilitys && (React.createElement(React.Fragment, null, service.eligibilitys.map(function (eligibility) { return (React.createElement(Age, { key: eligibility.id },
|
|
35069
|
-
"Suitable for ages from ",
|
|
35070
|
-
eligibility.minimum_age,
|
|
35071
|
-
" to ",
|
|
35072
|
-
eligibility.maximum_age)); })))),
|
|
35073
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35074
|
-
React.createElement(DirectoryAddToShortList, { id: service.id, name: service.name, snippet: snippet }))))));
|
|
35075
|
-
}),
|
|
35076
|
-
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35077
|
-
React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath })))))));
|
|
35110
|
+
React.createElement(ServiceHeader, null,
|
|
35111
|
+
React.createElement(ServiceLink$1, { href: "".concat(directoryPath, "/").concat(service.id) }, service.name),
|
|
35112
|
+
React.createElement(MarkerContainer, null,
|
|
35113
|
+
React.createElement("span", null, labelLetters[index]),
|
|
35114
|
+
React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 42.4 59.1" },
|
|
35115
|
+
React.createElement("path", { d: "M19.7,5.6c-0.1,0-0.5,0.1-0.9,0.1c-3.3,0.4-6.5,2-8.9,4.4c-2.6,2.6-4.2,5.9-4.6,9.6c-0.1,1,0,3.1,0.1,4.1c0.3,2.1,1.1,4.2,2.3,6.6c0.9,1.6,1.6,2.9,4.2,7c0.9,1.4,1.9,3.1,2.6,4.2c2.3,3.9,4.1,7.9,5.4,11.9c0.2,0.6,0.3,0.8,0.6,0.9c0.5,0.2,1.1,0.1,1.4-0.3c0.1-0.1,0.2-0.5,0.4-0.9c1.1-3.3,2.5-6.5,4.2-9.5c1.2-2.2,2-3.6,4.4-7.4c1.7-2.7,2.3-3.6,2.9-4.8c1.6-2.9,2.5-5.3,2.9-7.8c0.2-1,0.2-3.1,0.1-4.1c-0.2-1.5-0.5-3-1-4.2c-2.1-5.2-6.8-8.9-12.4-9.8C22.9,5.6,20.2,5.5,19.7,5.6z", fill: "currentColor" })))),
|
|
35116
|
+
React.createElement("div", null, snippet),
|
|
35117
|
+
service.eligibilitys && (React.createElement(React.Fragment, null, service.eligibilitys.map(function (eligibility) { return (React.createElement(Age, { key: eligibility.id },
|
|
35118
|
+
"Suitable for ages from ",
|
|
35119
|
+
eligibility.minimum_age,
|
|
35120
|
+
" to ",
|
|
35121
|
+
eligibility.maximum_age)); })))),
|
|
35122
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
35123
|
+
React.createElement(DirectoryAddToShortList, { id: service.id, name: service.name, snippet: snippet }))))));
|
|
35124
|
+
}))),
|
|
35125
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
35078
35126
|
};
|
|
35079
35127
|
|
|
35080
35128
|
const Container = styled.div`
|
|
@@ -35169,7 +35217,10 @@ const PrintButton = styled.button`
|
|
|
35169
35217
|
var DirectoryShortList = function (_a) {
|
|
35170
35218
|
var directoryPath = _a.directoryPath;
|
|
35171
35219
|
var _b = useDirectoryShortListContext(), _c = _b.favourites, favourites = _c.favourites; _c.setFavourites; _b.toggleFavourites; _b.isFavourite;
|
|
35172
|
-
var notServer =
|
|
35220
|
+
var _d = useState(false), notServer = _d[0], setNotServer = _d[1];
|
|
35221
|
+
useEffect(function () {
|
|
35222
|
+
setNotServer(true);
|
|
35223
|
+
}, []);
|
|
35173
35224
|
return (React.createElement(Container, { "data-testid": "DirectoryShortList" }, notServer && (React.createElement(DirectoryShortListProvider, null,
|
|
35174
35225
|
React.createElement(Row$1, null, favourites.length > 0 ? (React.createElement(React.Fragment, null,
|
|
35175
35226
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
@@ -35189,5 +35240,5 @@ var DirectoryShortList = function (_a) {
|
|
|
35189
35240
|
React.createElement("p", null, "No items in the shortlist")))))))));
|
|
35190
35241
|
};
|
|
35191
35242
|
|
|
35192
|
-
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BlockQuote, Breadcrumbs, Button$3 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as Image, ImageAndText, Map$1 as Map, MapMarker, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromotedLinks, Promotions, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
35243
|
+
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BlockQuote, Breadcrumbs, Button$3 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header$1 as Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as Image, ImageAndText, Map$1 as Map, MapMarker, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromotedLinks, Promotions, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
35193
35244
|
//# sourceMappingURL=index.esm.js.map
|