northants-design-system 0.4.0-alpha.13 → 0.4.0-alpha.15
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.d.ts +2 -1
- package/build/index.esm.js +199 -48
- package/build/index.esm.js.map +1 -1
- package/build/index.js +198 -46
- package/build/index.js.map +1 -1
- package/build/library/components/BackToTop/BackToTop.d.ts +4 -0
- package/build/library/components/BackToTop/BackToTop.types.d.ts +6 -0
- package/build/library/directory/DirectoryService/DirectoryService.storydata.d.ts +1 -0
- package/build/library/directory/DirectoryService/DirectoryService.types.d.ts +13 -0
- package/build/library/directory/DirectoryService/DirectoryServiceTransform.d.ts +2 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Autocomplete from './library/components/Autocomplete/Autocomplete';
|
|
2
|
+
import BackToTop from './library/components/BackToTop/BackToTop';
|
|
2
3
|
import Button from './library/components/Button/Button';
|
|
3
4
|
import DynamicIcon from './library/components/DynamicIcon/DynamicIcon';
|
|
4
5
|
import Heading from './library/components/Heading/Heading';
|
|
@@ -11,7 +12,7 @@ import DropDownFilter from './library/components/DropDownFilter/DropDownFilter';
|
|
|
11
12
|
import PromotedLinks from './library/components/PromotedLinks/PromotedLinks';
|
|
12
13
|
import StaticMap from './library/components/StaticMap/StaticMap';
|
|
13
14
|
import TextInput from './library/components/TextInput/TextInput';
|
|
14
|
-
export { Autocomplete, Button, DynamicIcon, Heading, HeadingWithIcon, Map, MapMarker, Pagination, CheckboxListFilter, DropDownFilter, PromotedLinks, StaticMap, TextInput, };
|
|
15
|
+
export { Autocomplete, BackToTop, Button, DynamicIcon, Heading, HeadingWithIcon, Map, MapMarker, Pagination, CheckboxListFilter, DropDownFilter, PromotedLinks, StaticMap, TextInput, };
|
|
15
16
|
import Accordion from './library/slices/Accordion/Accordion';
|
|
16
17
|
import BlockQuote from './library/slices/BlockQuote/BlockQuote';
|
|
17
18
|
import CallToAction from './library/slices/CallToAction/CallToAction';
|
package/build/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Component, cloneElement, useState, useContext,
|
|
1
|
+
import React, { Component, cloneElement, useState, useContext, useEffect, useId, useRef, createContext } from 'react';
|
|
2
2
|
import styled, { css, ThemeContext, ThemeProvider, createGlobalStyle } from 'styled-components';
|
|
3
3
|
import require$$0 from 'tty';
|
|
4
4
|
import require$$2 from 'path';
|
|
@@ -3835,6 +3835,100 @@ var Autocomplete = function (_a) {
|
|
|
3835
3835
|
})));
|
|
3836
3836
|
};
|
|
3837
3837
|
|
|
3838
|
+
const Container$15 = styled.div`
|
|
3839
|
+
display: block;
|
|
3840
|
+
`;
|
|
3841
|
+
|
|
3842
|
+
const BackToTopButton = styled.button`
|
|
3843
|
+
display: ${(props) => (props.visible ? 'inline-block' : 'none')};
|
|
3844
|
+
position: fixed;
|
|
3845
|
+
bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
3846
|
+
right: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
3847
|
+
z-index: 2;
|
|
3848
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
3849
|
+
color: ${(props) => props.theme.theme_vars.white};
|
|
3850
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
3851
|
+
font-weight: 700;
|
|
3852
|
+
border: 0;
|
|
3853
|
+
cursor: pointer;
|
|
3854
|
+
line-height: 1;
|
|
3855
|
+
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
3856
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
3857
|
+
text-decoration: none !important;
|
|
3858
|
+
|
|
3859
|
+
/* When larger than xl position button to be just outside the container */
|
|
3860
|
+
@media screen and (min-width: calc(${(props) => props.theme.theme_vars.breakpoints.xl} + ${(props) =>
|
|
3861
|
+
props.theme.theme_vars.spacingSizes.medium})) {
|
|
3862
|
+
right: calc((100% - ${(props) => props.theme.theme_vars.breakpoints.xl}) / 2);
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3865
|
+
&:hover {
|
|
3866
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
3867
|
+
}
|
|
3868
|
+
&:focus {
|
|
3869
|
+
outline: none;
|
|
3870
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
3871
|
+
background-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
3872
|
+
box-shadow: 0px -3px 0px 0px ${(props) => props.theme.theme_vars.colours.black} inset;
|
|
3873
|
+
}
|
|
3874
|
+
&:active {
|
|
3875
|
+
transform: translateY(2px);
|
|
3876
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
3877
|
+
background-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
3878
|
+
box-shadow: 0px -1px 0px 0px ${(props) => props.theme.theme_vars.colours.black} inset;
|
|
3879
|
+
}
|
|
3880
|
+
`;
|
|
3881
|
+
|
|
3882
|
+
const StyledSVG$1 = styled.svg`
|
|
3883
|
+
-webkit-transition: transform 0.2s ease-in-out;
|
|
3884
|
+
-moz-transition: transform 0.2s ease-in-out;
|
|
3885
|
+
-o-transition: transform 0.2s ease-in-out;
|
|
3886
|
+
transition: transform 0.2s ease-in-out;
|
|
3887
|
+
|
|
3888
|
+
&.icon-direction-down {
|
|
3889
|
+
transform: rotate(90deg);
|
|
3890
|
+
}
|
|
3891
|
+
&.icon-direction-up {
|
|
3892
|
+
transform: rotate(-90deg);
|
|
3893
|
+
}
|
|
3894
|
+
&.icon-direction-left {
|
|
3895
|
+
transform: rotate(180deg);
|
|
3896
|
+
}
|
|
3897
|
+
`;
|
|
3898
|
+
|
|
3899
|
+
var ChevronIcon$3 = function (_a) {
|
|
3900
|
+
var _b = _a.colourFill, colourFill = _b === void 0 ? "" : _b, _c = _a.direction, direction = _c === void 0 ? "right" : _c;
|
|
3901
|
+
return (React.createElement(StyledSVG$1, { width: "7", height: "13", viewBox: "0 0 7 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "icon-direction-" + direction },
|
|
3902
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.265759 10.6362C-0.0886068 10.9905 -0.0886069 11.5651 0.265758 11.9194C0.620124 12.2738 1.19466 12.2738 1.54903 11.9194L6.73423 6.73424C7.08859 6.37988 7.08859 5.80534 6.73423 5.45097L1.54903 0.265774C1.19466 -0.0885916 0.620124 -0.0885917 0.265759 0.265774C-0.0886064 0.620139 -0.0886064 1.19468 0.265759 1.54904L4.8118 6.09509L0.265759 10.6362Z", fill: colourFill })));
|
|
3903
|
+
};
|
|
3904
|
+
|
|
3905
|
+
var BackToTop = function (_a) {
|
|
3906
|
+
var _b = _a.isActive, isActive = _b === void 0 ? false : _b;
|
|
3907
|
+
var themeContext = useContext(ThemeContext);
|
|
3908
|
+
var _c = useState(false), visible = _c[0], setVisible = _c[1];
|
|
3909
|
+
var toggleVisible = function () {
|
|
3910
|
+
var scrolled = document.documentElement.scrollTop;
|
|
3911
|
+
if (scrolled > 300) {
|
|
3912
|
+
setVisible(true);
|
|
3913
|
+
}
|
|
3914
|
+
else if (scrolled <= 300) {
|
|
3915
|
+
setVisible(false);
|
|
3916
|
+
}
|
|
3917
|
+
};
|
|
3918
|
+
var scrollToTop = function (event) {
|
|
3919
|
+
event.preventDefault();
|
|
3920
|
+
window.scrollTo({
|
|
3921
|
+
top: 0,
|
|
3922
|
+
behavior: 'smooth',
|
|
3923
|
+
});
|
|
3924
|
+
};
|
|
3925
|
+
useEffect(function () {
|
|
3926
|
+
window.addEventListener('scroll', toggleVisible);
|
|
3927
|
+
});
|
|
3928
|
+
return (React.createElement(Container$15, { "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" },
|
|
3929
|
+
React.createElement(ChevronIcon$3, { colourFill: themeContext.theme_vars.colours.white, direction: "up" })))));
|
|
3930
|
+
};
|
|
3931
|
+
|
|
3838
3932
|
const StyledButton$1 = styled.a`
|
|
3839
3933
|
font-weight: 700;
|
|
3840
3934
|
border: 0;
|
|
@@ -7233,6 +7327,11 @@ const MapImage = styled.img`
|
|
|
7233
7327
|
max-width: 100%;
|
|
7234
7328
|
`;
|
|
7235
7329
|
|
|
7330
|
+
const Message = styled.div`
|
|
7331
|
+
background-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
7332
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
7333
|
+
`;
|
|
7334
|
+
|
|
7236
7335
|
/**
|
|
7237
7336
|
* A static Google map with optional markers
|
|
7238
7337
|
*/
|
|
@@ -7250,6 +7349,8 @@ var StaticMap = function (_a) {
|
|
|
7250
7349
|
})
|
|
7251
7350
|
.join('');
|
|
7252
7351
|
return (React.createElement(Container$_, { "data-testid": "StaticMap" },
|
|
7352
|
+
React.createElement(Message, null,
|
|
7353
|
+
React.createElement("span", null, "To interact with the map, you need to accept cookies.")),
|
|
7253
7354
|
React.createElement(MapImage, { src: "https://maps.googleapis.com/maps/api/staticmap?center=".concat(centre, "&size=").concat(size, "&zoom=").concat(zoom, "&maptype=").concat(mapType).concat(markerPath, "&key=").concat(apiKey), alt: imageAltText })));
|
|
7254
7355
|
};
|
|
7255
7356
|
|
|
@@ -7507,12 +7608,24 @@ var AccordionSection = function (_a) {
|
|
|
7507
7608
|
};
|
|
7508
7609
|
|
|
7509
7610
|
const uniqueID = () => {
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7611
|
+
// Math.random should be unique because of its seeding algorithm.
|
|
7612
|
+
// Convert it to base 36 (numbers + letters), and grab the first 9 characters
|
|
7613
|
+
// after the decimal.
|
|
7614
|
+
return '_' + Math.random().toString(36).substr(2, 9);
|
|
7514
7615
|
};
|
|
7515
7616
|
|
|
7617
|
+
/**
|
|
7618
|
+
* Group an array of items by the key
|
|
7619
|
+
*/
|
|
7620
|
+
const groupBy = (items, key) =>
|
|
7621
|
+
items.reduce(
|
|
7622
|
+
(result, item) => ({
|
|
7623
|
+
...result,
|
|
7624
|
+
[item[key]]: [...(result[item[key]] || []), item],
|
|
7625
|
+
}),
|
|
7626
|
+
{}
|
|
7627
|
+
);
|
|
7628
|
+
|
|
7516
7629
|
var Accordion$1 = function (_a) {
|
|
7517
7630
|
var sections = _a.sections, _b = _a.isFilter, isFilter = _b === void 0 ? false : _b, _c = _a.withReadMore, withReadMore = _c === void 0 ? false : _c;
|
|
7518
7631
|
sections.map(function (section, i) {
|
|
@@ -23178,29 +23291,6 @@ const BreadcrumbLink$1 = styled.a`
|
|
|
23178
23291
|
}
|
|
23179
23292
|
`;
|
|
23180
23293
|
|
|
23181
|
-
const StyledSVG$1 = styled.svg`
|
|
23182
|
-
-webkit-transition: transform 0.2s ease-in-out;
|
|
23183
|
-
-moz-transition: transform 0.2s ease-in-out;
|
|
23184
|
-
-o-transition: transform 0.2s ease-in-out;
|
|
23185
|
-
transition: transform 0.2s ease-in-out;
|
|
23186
|
-
|
|
23187
|
-
&.icon-direction-down {
|
|
23188
|
-
transform: rotate(90deg);
|
|
23189
|
-
}
|
|
23190
|
-
&.icon-direction-up {
|
|
23191
|
-
transform: rotate(-90deg);
|
|
23192
|
-
}
|
|
23193
|
-
&.icon-direction-left {
|
|
23194
|
-
transform: rotate(180deg);
|
|
23195
|
-
}
|
|
23196
|
-
`;
|
|
23197
|
-
|
|
23198
|
-
var ChevronIcon$3 = function (_a) {
|
|
23199
|
-
var _b = _a.colourFill, colourFill = _b === void 0 ? "" : _b, _c = _a.direction, direction = _c === void 0 ? "right" : _c;
|
|
23200
|
-
return (React.createElement(StyledSVG$1, { width: "7", height: "13", viewBox: "0 0 7 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "icon-direction-" + direction },
|
|
23201
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.265759 10.6362C-0.0886068 10.9905 -0.0886069 11.5651 0.265758 11.9194C0.620124 12.2738 1.19466 12.2738 1.54903 11.9194L6.73423 6.73424C7.08859 6.37988 7.08859 5.80534 6.73423 5.45097L1.54903 0.265774C1.19466 -0.0885916 0.620124 -0.0885917 0.265759 0.265774C-0.0886064 0.620139 -0.0886064 1.19468 0.265759 1.54904L4.8118 6.09509L0.265759 10.6362Z", fill: colourFill })));
|
|
23202
|
-
};
|
|
23203
|
-
|
|
23204
23294
|
var Breadcrumbs = function (_a) {
|
|
23205
23295
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
23206
23296
|
return (React.createElement(Container$B, { hasMargin: hasMargin, "data-testid": "Breadcrumbs" },
|
|
@@ -28771,21 +28861,25 @@ var transformDescriptionDetails = function (accreditations, fees, service_areas,
|
|
|
28771
28861
|
if ((service_areas === null || service_areas === void 0 ? void 0 : service_areas.length) > 0) {
|
|
28772
28862
|
details.push({
|
|
28773
28863
|
term: 'Service Areas',
|
|
28774
|
-
detail:
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28864
|
+
detail: '<ul>' +
|
|
28865
|
+
service_areas
|
|
28866
|
+
.map(function (service_area) {
|
|
28867
|
+
return "<li>".concat(service_area.service_area, "</li>");
|
|
28868
|
+
})
|
|
28869
|
+
.join('') +
|
|
28870
|
+
'</ul>',
|
|
28779
28871
|
});
|
|
28780
28872
|
}
|
|
28781
28873
|
if ((languages === null || languages === void 0 ? void 0 : languages.length) > 0) {
|
|
28782
28874
|
details.push({
|
|
28783
28875
|
term: 'Additional languages',
|
|
28784
|
-
detail:
|
|
28785
|
-
|
|
28786
|
-
|
|
28787
|
-
|
|
28788
|
-
|
|
28876
|
+
detail: '<ul>' +
|
|
28877
|
+
languages
|
|
28878
|
+
.map(function (language) {
|
|
28879
|
+
return "<li>".concat(language.language, "</li>");
|
|
28880
|
+
})
|
|
28881
|
+
.join('') +
|
|
28882
|
+
'</ul>',
|
|
28789
28883
|
});
|
|
28790
28884
|
}
|
|
28791
28885
|
return details;
|
|
@@ -28796,6 +28890,26 @@ var transformSnippet = function (description, extractLength) {
|
|
|
28796
28890
|
allowedTags: [],
|
|
28797
28891
|
allowedAttributes: {},
|
|
28798
28892
|
}).substr(0, extractLength) + String.fromCharCode(8230));
|
|
28893
|
+
};
|
|
28894
|
+
var transformTaxonomies = function (service_taxonomys, taxonomiesToShow) {
|
|
28895
|
+
if (taxonomiesToShow === void 0) { taxonomiesToShow = []; }
|
|
28896
|
+
var details = [];
|
|
28897
|
+
var groupedTaxonomies = groupBy(service_taxonomys, 'vocabulary');
|
|
28898
|
+
taxonomiesToShow.forEach(function (taxonomy, taxonomyIndex) {
|
|
28899
|
+
if (groupedTaxonomies.hasOwnProperty(taxonomy.vocabulary)) {
|
|
28900
|
+
details.push({
|
|
28901
|
+
term: taxonomy.label,
|
|
28902
|
+
detail: '<ul>' +
|
|
28903
|
+
groupedTaxonomies[taxonomy.vocabulary]
|
|
28904
|
+
.map(function (item) {
|
|
28905
|
+
return "<li>".concat(item.name, "</li>");
|
|
28906
|
+
})
|
|
28907
|
+
.join('') +
|
|
28908
|
+
'</ul>',
|
|
28909
|
+
});
|
|
28910
|
+
}
|
|
28911
|
+
});
|
|
28912
|
+
return details;
|
|
28799
28913
|
};
|
|
28800
28914
|
|
|
28801
28915
|
const Container$3 = styled.div`
|
|
@@ -28975,7 +29089,7 @@ var getIcon = function (profile) {
|
|
|
28975
29089
|
|
|
28976
29090
|
var DirectoryService = function (_a) {
|
|
28977
29091
|
var _b, _c, _d, _e;
|
|
28978
|
-
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, organization = _a.organization, regular_schedules = _a.regular_schedules, contacts = _a.contacts, service_areas = _a.service_areas, service_at_locations = _a.service_at_locations, service_social_profiles = _a.service_social_profiles, url = _a.url, uploads = _a.uploads, shortListPath = _a.shortListPath;
|
|
29092
|
+
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, organization = _a.organization, regular_schedules = _a.regular_schedules, contacts = _a.contacts, service_areas = _a.service_areas, service_at_locations = _a.service_at_locations, service_social_profiles = _a.service_social_profiles, service_taxonomys = _a.service_taxonomys, taxonomiesToShow = _a.taxonomiesToShow, url = _a.url, uploads = _a.uploads, shortListPath = _a.shortListPath;
|
|
28979
29093
|
var labelLetters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'];
|
|
28980
29094
|
var _f = useState(false), notServer = _f[0], setNotServer = _f[1];
|
|
28981
29095
|
var themeContext = useContext(ThemeContext);
|
|
@@ -29000,9 +29114,13 @@ var DirectoryService = function (_a) {
|
|
|
29000
29114
|
favourites.length,
|
|
29001
29115
|
")")),
|
|
29002
29116
|
React.createElement(DirectoryAddToShortList, { id: id, name: name, snippet: transformSnippet(description, 350), email: email, website: url, phone: (_c = (_b = contacts === null || contacts === void 0 ? void 0 : contacts[0]) === null || _b === void 0 ? void 0 : _b.phones) === null || _c === void 0 ? void 0 : _c.flatMap(function (phone) { return phone.number; }).join(', ') })))))),
|
|
29003
|
-
service_at_locations.
|
|
29117
|
+
service_at_locations.filter(function (location) {
|
|
29118
|
+
return location.is_visitable != false;
|
|
29119
|
+
}).length > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full", classes: "striped-column" },
|
|
29004
29120
|
React.createElement(Row$1, null,
|
|
29005
|
-
React.createElement(Column, { small: "full", medium: "full", large: "one-third" }, service_at_locations === null || service_at_locations === void 0 ? void 0 : service_at_locations.
|
|
29121
|
+
React.createElement(Column, { small: "full", medium: "full", large: "one-third" }, service_at_locations === null || service_at_locations === void 0 ? void 0 : service_at_locations.filter(function (location) {
|
|
29122
|
+
return location.is_visitable != false;
|
|
29123
|
+
}).map(function (location) { return (React.createElement("div", { key: location.id },
|
|
29006
29124
|
React.createElement(Heading, { level: 2, text: location.name }),
|
|
29007
29125
|
location.physical_addresses.map(function (address) { return (React.createElement(PhysicalAddress, { key: address.id },
|
|
29008
29126
|
React.createElement("p", { key: address.id, dangerouslySetInnerHTML: {
|
|
@@ -29012,9 +29130,13 @@ var DirectoryService = function (_a) {
|
|
|
29012
29130
|
} }),
|
|
29013
29131
|
React.createElement(Button$3, { url: "https://google.com/maps/dir//".concat(location.latitude, ",").concat(location.longitude), text: "Get directions" }))); }),
|
|
29014
29132
|
(location === null || location === void 0 ? void 0 : location.accessibility_for_disabilities.length) > 0 && (React.createElement(React.Fragment, null,
|
|
29015
|
-
React.createElement(Heading, { level: 3, text: "
|
|
29133
|
+
React.createElement(Heading, { level: 3, text: "Other facilities on site" }),
|
|
29016
29134
|
React.createElement("ul", null, location.accessibility_for_disabilities.map(function (accessibility) { return (React.createElement("li", { key: accessibility.id }, accessibility.accessibility)); })))))); })),
|
|
29017
|
-
React.createElement(Column, { small: "full", medium: "full", large: "two-thirds" },
|
|
29135
|
+
React.createElement(Column, { small: "full", medium: "full", large: "two-thirds" }, service_at_locations.filter(function (location) {
|
|
29136
|
+
return location.is_visitable != false;
|
|
29137
|
+
}).length > 0 &&
|
|
29138
|
+
((_d = service_at_locations[0]) === null || _d === void 0 ? void 0 : _d.latitude) &&
|
|
29139
|
+
((_e = service_at_locations[0]) === null || _e === void 0 ? void 0 : _e.longitude) && (React.createElement(React.Fragment, null,
|
|
29018
29140
|
notServer && (React.createElement(DirectoryMap, { mapProps: {
|
|
29019
29141
|
centre: "".concat(service_at_locations[0].latitude, ",").concat(service_at_locations[0].longitude),
|
|
29020
29142
|
imageAltText: "".concat(service_at_locations[0].name, " shown on a map"),
|
|
@@ -29022,7 +29144,9 @@ var DirectoryService = function (_a) {
|
|
|
29022
29144
|
size: '640x320',
|
|
29023
29145
|
mapMarkers: service_at_locations
|
|
29024
29146
|
.filter(function (location) {
|
|
29025
|
-
return location.latitude != null &&
|
|
29147
|
+
return (location.latitude != null &&
|
|
29148
|
+
location.longitude != null &&
|
|
29149
|
+
location.is_visitable != false);
|
|
29026
29150
|
})
|
|
29027
29151
|
.map(function (location, locationIndex) {
|
|
29028
29152
|
return {
|
|
@@ -29041,7 +29165,8 @@ var DirectoryService = function (_a) {
|
|
|
29041
29165
|
React.createElement(Heading, { level: 2, text: "How this service can help" }),
|
|
29042
29166
|
React.createElement("div", null,
|
|
29043
29167
|
React.createElement(React.Fragment, null, descriptionElement)),
|
|
29044
|
-
React.createElement(SummaryList, { terms: transformDescriptionDetails(accreditations, fees, service_areas, languages) })
|
|
29168
|
+
React.createElement(SummaryList, { terms: transformDescriptionDetails(accreditations, fees, service_areas, languages), hasMargin: false }),
|
|
29169
|
+
React.createElement(SummaryList, { terms: transformTaxonomies(service_taxonomys, taxonomiesToShow), hasMargin: false })),
|
|
29045
29170
|
regular_schedules.length > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full", classes: "striped-column" },
|
|
29046
29171
|
React.createElement(Heading, { level: 2, text: "Service hours" }),
|
|
29047
29172
|
React.createElement("div", { className: "table-container" },
|
|
@@ -29060,7 +29185,28 @@ var DirectoryService = function (_a) {
|
|
|
29060
29185
|
React.createElement(DownloadableFiles, { files: uploads }))),
|
|
29061
29186
|
(service_social_profiles === null || service_social_profiles === void 0 ? void 0 : service_social_profiles.length) > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full", classes: "striped-column" },
|
|
29062
29187
|
React.createElement(Heading, { level: 2, text: "Follow this service" }),
|
|
29063
|
-
React.createElement(ServiceSocialLinks, { profiles: service_social_profiles })))
|
|
29188
|
+
React.createElement(ServiceSocialLinks, { profiles: service_social_profiles }))),
|
|
29189
|
+
service_at_locations.filter(function (location) {
|
|
29190
|
+
return location.is_visitable == false;
|
|
29191
|
+
}).length > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full", classes: "striped-column" }, service_at_locations
|
|
29192
|
+
.filter(function (location) {
|
|
29193
|
+
return location.is_visitable == false;
|
|
29194
|
+
})
|
|
29195
|
+
.map(function (location) { return (React.createElement(Row$1, null,
|
|
29196
|
+
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: location.id },
|
|
29197
|
+
React.createElement(Heading, { level: 2, text: location.name }),
|
|
29198
|
+
location.physical_addresses.map(function (address) { return (React.createElement(PhysicalAddress, { key: address.id },
|
|
29199
|
+
React.createElement("p", { key: address.id, dangerouslySetInnerHTML: {
|
|
29200
|
+
__html: Object.values(address)
|
|
29201
|
+
.filter(function (item) { return item !== '' && item !== address.id; })
|
|
29202
|
+
.join(' <br />'),
|
|
29203
|
+
} }))); }),
|
|
29204
|
+
(location === null || location === void 0 ? void 0 : location.accessibility_for_disabilities.length) > 0 && (React.createElement(React.Fragment, null,
|
|
29205
|
+
React.createElement(Heading, { level: 3, text: "Other facilities on site" }),
|
|
29206
|
+
React.createElement("ul", null, location.accessibility_for_disabilities.map(function (accessibility) { return (React.createElement("li", { key: accessibility.id }, accessibility.accessibility)); }))))),
|
|
29207
|
+
React.createElement(Column, { small: "full", medium: "one-half", large: "two-thirds" },
|
|
29208
|
+
React.createElement(WarningText, { title: "Please note", isWarning: true },
|
|
29209
|
+
React.createElement("p", null, "This address is not open to visitors."))))); }))))));
|
|
29064
29210
|
};
|
|
29065
29211
|
|
|
29066
29212
|
const Container$1 = styled.div`
|
|
@@ -29576,7 +29722,12 @@ var DirectoryServiceList = function (_a) {
|
|
|
29576
29722
|
zoom: mapZoom,
|
|
29577
29723
|
size: '640x320',
|
|
29578
29724
|
imageAltText: 'Directory search results displayed on a map',
|
|
29579
|
-
mapMarkers: services
|
|
29725
|
+
mapMarkers: services
|
|
29726
|
+
.filter(function (service) {
|
|
29727
|
+
var _a;
|
|
29728
|
+
return ((_a = service.service_at_locations[0]) === null || _a === void 0 ? void 0 : _a.is_visitable) != false;
|
|
29729
|
+
})
|
|
29730
|
+
.map(function (service, index) {
|
|
29580
29731
|
var _a, _b;
|
|
29581
29732
|
return {
|
|
29582
29733
|
lat: parseFloat((_a = service.service_at_locations[0]) === null || _a === void 0 ? void 0 : _a.latitude),
|
|
@@ -31224,5 +31375,5 @@ var DirectoryShortList = function (_a) {
|
|
|
31224
31375
|
React.createElement("p", null, "No items in the shortlist"))))))));
|
|
31225
31376
|
};
|
|
31226
31377
|
|
|
31227
|
-
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, 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, InquestSchedule, 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 };
|
|
31378
|
+
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, 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, InquestSchedule, 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 };
|
|
31228
31379
|
//# sourceMappingURL=index.esm.js.map
|