@nnc-digital/nnc-design-system 0.4.3 → 0.4.6
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 +583 -426
- package/build/index.esm.js.map +1 -1
- package/build/index.js +584 -426
- package/build/index.js.map +1 -1
- package/build/library/components/BinCollection/BinCollection.d.ts +7 -0
- package/build/library/components/BinCollection/BinCollection.styles.d.ts +16 -0
- package/build/library/components/BinCollection/BinCollection.testdata.d.ts +34 -0
- package/build/library/components/BinCollection/BinCollection.types.d.ts +51 -0
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
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
|
+
import axios from 'axios';
|
|
3
4
|
import require$$0 from 'tty';
|
|
4
5
|
import require$$2 from 'path';
|
|
5
6
|
import require$$1$1 from 'url';
|
|
6
7
|
import require$$1 from 'fs';
|
|
7
8
|
import require$$1$2 from 'react-dom';
|
|
8
|
-
import axios from 'axios';
|
|
9
9
|
import { Wrapper as Wrapper$5 } from '@googlemaps/react-wrapper';
|
|
10
10
|
|
|
11
11
|
/******************************************************************************
|
|
@@ -92,6 +92,11 @@ function __spreadArray(to, from, pack) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function __makeTemplateObject(cooked, raw) {
|
|
98
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
99
|
+
return cooked;
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
const StyledInput = styled.input`
|
|
@@ -3835,7 +3840,7 @@ var Autocomplete = function (_a) {
|
|
|
3835
3840
|
})));
|
|
3836
3841
|
};
|
|
3837
3842
|
|
|
3838
|
-
const Container$
|
|
3843
|
+
const Container$18 = styled.div`
|
|
3839
3844
|
display: block;
|
|
3840
3845
|
`;
|
|
3841
3846
|
|
|
@@ -3920,7 +3925,7 @@ var BackToTop = function (_a) {
|
|
|
3920
3925
|
useEffect(function () {
|
|
3921
3926
|
window.addEventListener('scroll', toggleVisible);
|
|
3922
3927
|
});
|
|
3923
|
-
return (React.createElement(Container$
|
|
3928
|
+
return (React.createElement(Container$18, { "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" },
|
|
3924
3929
|
React.createElement(ChevronIcon, { colourFill: themeContext.theme_vars.colours.white, direction: "up" })))));
|
|
3925
3930
|
};
|
|
3926
3931
|
|
|
@@ -4022,6 +4027,418 @@ var Button$4 = function (_a) {
|
|
|
4022
4027
|
children));
|
|
4023
4028
|
};
|
|
4024
4029
|
|
|
4030
|
+
var Container$17 = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"])));
|
|
4031
|
+
styled.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n margin-bottom: 15px;\n"], ["\n display: block;\n margin-bottom: 15px;\n"])));
|
|
4032
|
+
var BinCollectionButtonStyles = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n button {\n margin: 10px 10px 36px 10px;\n }\n"], ["\n button {\n margin: 10px 10px 36px 10px;\n }\n"])));
|
|
4033
|
+
var FormContainer$1 = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n ", "\n"], ["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n ", "\n"])), function (props) {
|
|
4034
|
+
return props.isLoading && "\n opacity: 0.5; \n pointer-events: none;\n ";
|
|
4035
|
+
});
|
|
4036
|
+
var DropDownSelectContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding-bottom: 20px;\n"], ["\n padding-bottom: 20px;\n"])));
|
|
4037
|
+
var FormInnerContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"])));
|
|
4038
|
+
styled.label(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"], ["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), function (props) { return props.theme.theme_vars.spacingSizes.small; });
|
|
4039
|
+
var UPRNPageTitleRow = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n justify-content: center;\n margin-bottom: 1em;\n margin-top: 2em;\n width: 100%;\n"], ["\n justify-content: center;\n margin-bottom: 1em;\n margin-top: 2em;\n width: 100%;\n"])));
|
|
4040
|
+
var UPRNPageUPRNRow = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: left;\n margin-bottom: .5em;\n width: 100%;\n"], ["\n display: flex;\n justify-content: left;\n margin-bottom: .5em;\n width: 100%;\n"])));
|
|
4041
|
+
var UPRNPageSectionTitle = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: 2em;\n font-weight: 700;\n"], ["\n font-size: 2em;\n font-weight: 700;\n"])));
|
|
4042
|
+
var UPRNPageUPRNTitle = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: 1.5em;\n"], ["\n font-size: 1.5em;\n"])));
|
|
4043
|
+
styled.input(templateObject_12 || (templateObject_12 = __makeTemplateObject([""], [""])));
|
|
4044
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
|
|
4045
|
+
|
|
4046
|
+
const Container$16 = styled.div`
|
|
4047
|
+
display: flex;
|
|
4048
|
+
-webkit-flex-direction: row;
|
|
4049
|
+
-moz-flex-direction: row;
|
|
4050
|
+
-ms-flex-direction: row;
|
|
4051
|
+
flex-direction: row;
|
|
4052
|
+
align-items: flex-start;
|
|
4053
|
+
width: 100%;
|
|
4054
|
+
`;
|
|
4055
|
+
const Form = styled.form`
|
|
4056
|
+
padding-top: 10px;
|
|
4057
|
+
padding-bottom: 12px;
|
|
4058
|
+
padding-left: ${(props) => (props.hideLine ? '0' : '15px')};
|
|
4059
|
+
max-width: 100%;
|
|
4060
|
+
width: 100%;
|
|
4061
|
+
`;
|
|
4062
|
+
const Line$1 = styled.div`
|
|
4063
|
+
background: ${(props) => (props.isError ? props.theme.theme_vars.colours.negative : props.lineColour)};
|
|
4064
|
+
display: ${(props) => (props.hideLine ? 'none' : 'block')};
|
|
4065
|
+
width: 5px;
|
|
4066
|
+
border-radius: 2px;
|
|
4067
|
+
`;
|
|
4068
|
+
|
|
4069
|
+
const ErrorSummary = styled.div`
|
|
4070
|
+
color: ${(props) => props.theme.theme_vars.colours.negative};
|
|
4071
|
+
font-weight: bold;
|
|
4072
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
4073
|
+
border: 3px solid ${(props) => props.theme.theme_vars.colours.negative};
|
|
4074
|
+
margin-bottom: 15px;
|
|
4075
|
+
padding: 15px;
|
|
4076
|
+
`;
|
|
4077
|
+
|
|
4078
|
+
/**
|
|
4079
|
+
* Form element - a container with a line on the left
|
|
4080
|
+
*/
|
|
4081
|
+
var FormWithLine = function (_a) {
|
|
4082
|
+
var _b = _a.lineColour, lineColour = _b === void 0 ? '#C6C6C6' : _b, _c = _a.hideLine, hideLine = _c === void 0 ? false : _c, formRole = _a.formRole, formMethod = _a.formMethod, formURL = _a.formURL, _d = _a.isError, isError = _d === void 0 ? false : _d, errorSummary = _a.errorSummary, onSubmit = _a.onSubmit, children = _a.children;
|
|
4083
|
+
return (React.createElement(Container$16, null,
|
|
4084
|
+
React.createElement(Line$1, { lineColour: lineColour, hideLine: hideLine, isError: isError }),
|
|
4085
|
+
React.createElement(Form, { onSubmit: onSubmit, hideLine: hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
4086
|
+
errorSummary && React.createElement(ErrorSummary, null, errorSummary),
|
|
4087
|
+
children)));
|
|
4088
|
+
};
|
|
4089
|
+
|
|
4090
|
+
/**
|
|
4091
|
+
* Primary UI component for user interaction
|
|
4092
|
+
* If value is set then treat as controlled component
|
|
4093
|
+
*/
|
|
4094
|
+
var Input$6 = function (_a) {
|
|
4095
|
+
var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength, defaultValue = _a.defaultValue, onChange = _a.onChange, id = _a.id, value = _a.value;
|
|
4096
|
+
return (React.createElement(React.Fragment, null,
|
|
4097
|
+
errorText && React.createElement(ErrorText$1, null, errorText),
|
|
4098
|
+
typeof value !== 'undefined' ? (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength, value: value, id: id })) : (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id }))));
|
|
4099
|
+
};
|
|
4100
|
+
|
|
4101
|
+
const StyledButton = styled.button`
|
|
4102
|
+
font-weight: 700;
|
|
4103
|
+
border: none;
|
|
4104
|
+
cursor: pointer;
|
|
4105
|
+
display: inline-block;
|
|
4106
|
+
line-height: 1;
|
|
4107
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4108
|
+
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
4109
|
+
text-decoration: none;
|
|
4110
|
+
|
|
4111
|
+
&.button--primary {
|
|
4112
|
+
color: white;
|
|
4113
|
+
background-color: ${props => props.theme.theme_vars.colours.action};
|
|
4114
|
+
|
|
4115
|
+
&:hover {
|
|
4116
|
+
background-color: ${props => props.theme.theme_vars.colours.action_dark};
|
|
4117
|
+
}
|
|
4118
|
+
&:focus {
|
|
4119
|
+
outline: none;
|
|
4120
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
4121
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
4122
|
+
box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4123
|
+
-webkit-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4124
|
+
-moz-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4125
|
+
}
|
|
4126
|
+
&:active {
|
|
4127
|
+
transform: translateY(2px);
|
|
4128
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
4129
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
4130
|
+
box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4131
|
+
-webkit-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4132
|
+
-moz-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4133
|
+
}
|
|
4134
|
+
}
|
|
4135
|
+
&.button--secondary {
|
|
4136
|
+
color: ${props => props.theme.theme_vars.colours.action};
|
|
4137
|
+
background-color: transparent;
|
|
4138
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.action};
|
|
4139
|
+
|
|
4140
|
+
&:hover {
|
|
4141
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
4142
|
+
}
|
|
4143
|
+
&:focus {
|
|
4144
|
+
outline: none;
|
|
4145
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.focus};
|
|
4146
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
&.button--small {
|
|
4150
|
+
font-size: 12px;
|
|
4151
|
+
padding: 10px 16px;
|
|
4152
|
+
}
|
|
4153
|
+
&.button--medium {
|
|
4154
|
+
font-size: 14px;
|
|
4155
|
+
padding: 11px 20px;
|
|
4156
|
+
}
|
|
4157
|
+
&.button--large {
|
|
4158
|
+
font-size: 16px;
|
|
4159
|
+
padding: 12px 24px;
|
|
4160
|
+
}
|
|
4161
|
+
`;
|
|
4162
|
+
|
|
4163
|
+
/**
|
|
4164
|
+
* Primary UI component for user interaction
|
|
4165
|
+
*/
|
|
4166
|
+
var FormButton = function (_a) {
|
|
4167
|
+
var _b = _a.primary, primary = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, text = _a.text; _a.type; _a.isDisabled; var props = __rest(_a, ["primary", "size", "text", "type", "isDisabled"]);
|
|
4168
|
+
var mode = primary ? 'button--primary' : 'button--secondary';
|
|
4169
|
+
return (React.createElement(StyledButton, __assign$2({ className: ["button--".concat(size), mode].join(' ') }, props), text));
|
|
4170
|
+
};
|
|
4171
|
+
|
|
4172
|
+
const Container$15 = styled.div`
|
|
4173
|
+
${(props) => props.theme.fontStyles};
|
|
4174
|
+
`;
|
|
4175
|
+
|
|
4176
|
+
const hideLabel$1 = (props) => {
|
|
4177
|
+
if (props.hideLabel === true) {
|
|
4178
|
+
return VisuallyHidden$3;
|
|
4179
|
+
}
|
|
4180
|
+
};
|
|
4181
|
+
|
|
4182
|
+
const Label$4 = styled.label`
|
|
4183
|
+
display: block;
|
|
4184
|
+
margin-bottom: 5px;
|
|
4185
|
+
${hideLabel$1}
|
|
4186
|
+
`;
|
|
4187
|
+
|
|
4188
|
+
const Select = styled.select`
|
|
4189
|
+
${(props) => props.theme.fontStyles};
|
|
4190
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
4191
|
+
box-sizing: border-box;
|
|
4192
|
+
max-width: 100%;
|
|
4193
|
+
height: 40px;
|
|
4194
|
+
height: 2.5rem;
|
|
4195
|
+
padding: 5px;
|
|
4196
|
+
border: 2px solid ${(props) => props.theme.theme_vars.colours.black};
|
|
4197
|
+
|
|
4198
|
+
&:focus {
|
|
4199
|
+
outline: 2px transparent solid;
|
|
4200
|
+
box-shadow: ${(props) => props.theme.theme_vars.colours.focus} 0 0 0 2px,
|
|
4201
|
+
${(props) => props.theme.theme_vars.colours.black} 0 0 0 4px;
|
|
4202
|
+
transition: box-shadow 0.3s ease 0s;
|
|
4203
|
+
}
|
|
4204
|
+
`;
|
|
4205
|
+
|
|
4206
|
+
const Option = styled.option`
|
|
4207
|
+
:active,
|
|
4208
|
+
:checked,
|
|
4209
|
+
:focus::-ms-value {
|
|
4210
|
+
color: #fff;
|
|
4211
|
+
background-color: #1d70b8;
|
|
4212
|
+
}
|
|
4213
|
+
`;
|
|
4214
|
+
|
|
4215
|
+
var DropDownSelect = function (_a) {
|
|
4216
|
+
var id = _a.id, label = _a.label, options = _a.options, onChange = _a.onChange, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
|
|
4217
|
+
return (React.createElement(Container$15, null,
|
|
4218
|
+
React.createElement(Label$4, { htmlFor: id, hideLabel: hideLabel }, label),
|
|
4219
|
+
React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected }, options.map(function (option, i) {
|
|
4220
|
+
return React.createElement(Option, { key: i, value: option.value }, option.title);
|
|
4221
|
+
}))));
|
|
4222
|
+
};
|
|
4223
|
+
|
|
4224
|
+
const H1 = styled.h1`
|
|
4225
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4226
|
+
margin-left: 0;
|
|
4227
|
+
font-weight: 700;
|
|
4228
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4229
|
+
margin-bottom: 20px;
|
|
4230
|
+
|
|
4231
|
+
font-size: 32px;
|
|
4232
|
+
font-size: 2rem;
|
|
4233
|
+
line-height: 1.1;
|
|
4234
|
+
|
|
4235
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4236
|
+
font-size: 44px;
|
|
4237
|
+
font-size: 2.6rem;
|
|
4238
|
+
max-width: 960px;
|
|
4239
|
+
margin-bottom: 30px;
|
|
4240
|
+
}
|
|
4241
|
+
`;
|
|
4242
|
+
const H2 = styled.h2`
|
|
4243
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4244
|
+
font-weight: 700;
|
|
4245
|
+
line-height: 1;
|
|
4246
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4247
|
+
margin-top: 25px;
|
|
4248
|
+
margin-bottom: 15px;
|
|
4249
|
+
|
|
4250
|
+
font-size: 24px;
|
|
4251
|
+
font-size: 1.5rem;
|
|
4252
|
+
line-height: 1.25;
|
|
4253
|
+
|
|
4254
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4255
|
+
font-size: 36px;
|
|
4256
|
+
font-size: 1.75rem;
|
|
4257
|
+
max-width: 960px;
|
|
4258
|
+
}
|
|
4259
|
+
`;
|
|
4260
|
+
const H3 = styled.h3`
|
|
4261
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4262
|
+
font-weight: 600;
|
|
4263
|
+
line-height: 1;
|
|
4264
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4265
|
+
margin-top: 25px;
|
|
4266
|
+
margin-bottom: 15px;
|
|
4267
|
+
|
|
4268
|
+
font-size: 24px;
|
|
4269
|
+
font-size: 1.3rem;
|
|
4270
|
+
line-height: 1.25;
|
|
4271
|
+
|
|
4272
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4273
|
+
font-size: 36px;
|
|
4274
|
+
font-size: 1.5rem;
|
|
4275
|
+
max-width: 960px;
|
|
4276
|
+
}
|
|
4277
|
+
`;
|
|
4278
|
+
const H4 = styled.h4`
|
|
4279
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4280
|
+
line-height: 1;
|
|
4281
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4282
|
+
margin-top: 25px;
|
|
4283
|
+
margin-bottom: 15px;
|
|
4284
|
+
|
|
4285
|
+
font-weight: 600;
|
|
4286
|
+
line-height: 1;
|
|
4287
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4288
|
+
`;
|
|
4289
|
+
|
|
4290
|
+
/**
|
|
4291
|
+
* A heading of different levels
|
|
4292
|
+
*/
|
|
4293
|
+
var Heading = function (_a) {
|
|
4294
|
+
var _b = _a.level, level = _b === void 0 ? 2 : _b, text = _a.text, props = __rest(_a, ["level", "text"]);
|
|
4295
|
+
if (level === 1)
|
|
4296
|
+
return React.createElement(H1, __assign$2({}, props), text);
|
|
4297
|
+
if (level === 2)
|
|
4298
|
+
return React.createElement(H2, __assign$2({}, props), text);
|
|
4299
|
+
if (level === 3)
|
|
4300
|
+
return React.createElement(H3, __assign$2({}, props), text);
|
|
4301
|
+
if (level === 4)
|
|
4302
|
+
return React.createElement(H4, __assign$2({}, props), text);
|
|
4303
|
+
return null;
|
|
4304
|
+
};
|
|
4305
|
+
|
|
4306
|
+
/**
|
|
4307
|
+
* Returns the Bin Collection Checker form component to conduct search by postcode.
|
|
4308
|
+
*/
|
|
4309
|
+
var BinCollection = function (_a) {
|
|
4310
|
+
var _b = _a.formError, formError = _b === void 0 ? false : _b, _c = _a.baseUrl, baseUrl = _c === void 0 ? process.env.NEXT_PUBLIC_DRUPAL_APP_API_BASE_URL : _c;
|
|
4311
|
+
var BinCollectionApiUrl = "".concat(baseUrl, "bin-collection-search/premiselist/");
|
|
4312
|
+
var CalendarEventsApiUrl = "".concat(baseUrl, "bin-collection-search/calendarevents/");
|
|
4313
|
+
var themeContext = useContext(ThemeContext);
|
|
4314
|
+
var _d = useState(false), isLoading = _d[0], setIsLoading = _d[1];
|
|
4315
|
+
var _e = useState(formError), isError = _e[0], setError = _e[1];
|
|
4316
|
+
var _f = useState(''), errorText = _f[0], setErrorText = _f[1];
|
|
4317
|
+
var _g = useState([]), addressOptions = _g[0], setAddressOptions = _g[1];
|
|
4318
|
+
var handleSubmit = function (e) {
|
|
4319
|
+
e.preventDefault();
|
|
4320
|
+
var enteredPostcode = e.target.elements.postcode.value;
|
|
4321
|
+
if (enteredPostcode === '') {
|
|
4322
|
+
setError(true);
|
|
4323
|
+
setErrorText('You need to enter a postcode');
|
|
4324
|
+
}
|
|
4325
|
+
else {
|
|
4326
|
+
setIsLoading(true);
|
|
4327
|
+
fetchAddresses(enteredPostcode);
|
|
4328
|
+
}
|
|
4329
|
+
};
|
|
4330
|
+
/**
|
|
4331
|
+
* Returns an array of address options based on the entered postcode.
|
|
4332
|
+
*/
|
|
4333
|
+
var fetchAddresses = function (postcode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4334
|
+
return __generator(this, function (_a) {
|
|
4335
|
+
axios.get("".concat(BinCollectionApiUrl).concat(postcode))
|
|
4336
|
+
.then(function (response) {
|
|
4337
|
+
setIsLoading(false);
|
|
4338
|
+
// Transform the response data into the expected format
|
|
4339
|
+
var transformedAddresses = response.data.data.map(function (item) { return ({
|
|
4340
|
+
value: item.UPRN,
|
|
4341
|
+
title: "".concat(item.Address, ", ").concat(item.Locality, ", ").concat(item.Town)
|
|
4342
|
+
}); });
|
|
4343
|
+
setAddressOptions(transformedAddresses);
|
|
4344
|
+
})
|
|
4345
|
+
.catch(function (error) {
|
|
4346
|
+
setIsLoading(false);
|
|
4347
|
+
setError(true);
|
|
4348
|
+
console.error('API call error:', error);
|
|
4349
|
+
setErrorText('Error fetching addresses');
|
|
4350
|
+
});
|
|
4351
|
+
return [2 /*return*/];
|
|
4352
|
+
});
|
|
4353
|
+
}); };
|
|
4354
|
+
var getFormattedDate = function (daysToAdd) {
|
|
4355
|
+
if (daysToAdd === void 0) { daysToAdd = 0; }
|
|
4356
|
+
var date = new Date();
|
|
4357
|
+
date.setDate(date.getDate() + daysToAdd);
|
|
4358
|
+
return date.toISOString().split('T')[0];
|
|
4359
|
+
};
|
|
4360
|
+
var parseDate = function (dateString) {
|
|
4361
|
+
var timestamp = parseInt(dateString.match(/\d+/)[0], 10);
|
|
4362
|
+
return new Date(timestamp);
|
|
4363
|
+
};
|
|
4364
|
+
var groupByTitle = function (data) {
|
|
4365
|
+
var currentDate = new Date();
|
|
4366
|
+
return data.reduce(function (acc, item) {
|
|
4367
|
+
var eventDate = parseDate(item.start);
|
|
4368
|
+
if (eventDate >= currentDate) {
|
|
4369
|
+
if (!acc[item.title]) {
|
|
4370
|
+
acc[item.title] = [];
|
|
4371
|
+
}
|
|
4372
|
+
acc[item.title].push(eventDate);
|
|
4373
|
+
}
|
|
4374
|
+
return acc;
|
|
4375
|
+
}, {});
|
|
4376
|
+
};
|
|
4377
|
+
var _h = useState({}), calendarEvents = _h[0], setCalendarEvents = _h[1];
|
|
4378
|
+
/**
|
|
4379
|
+
* Returns an array of calendar events based on selected address for next 42 days.
|
|
4380
|
+
*/
|
|
4381
|
+
var handleAddressChange = function (e) {
|
|
4382
|
+
var selectedUPRN = e.target.value;
|
|
4383
|
+
if (selectedUPRN) {
|
|
4384
|
+
var startDate = getFormattedDate();
|
|
4385
|
+
var endDate = getFormattedDate(42);
|
|
4386
|
+
// Fetch calendar events for the selected UPRN
|
|
4387
|
+
axios.get("".concat(CalendarEventsApiUrl).concat(selectedUPRN, "/").concat(startDate, "/").concat(endDate))
|
|
4388
|
+
.then(function (response) {
|
|
4389
|
+
var groupedData = groupByTitle(response.data);
|
|
4390
|
+
setCalendarEvents(groupedData);
|
|
4391
|
+
})
|
|
4392
|
+
.catch(function (error) {
|
|
4393
|
+
console.error('API call error:', error);
|
|
4394
|
+
});
|
|
4395
|
+
}
|
|
4396
|
+
};
|
|
4397
|
+
var resetForm = function () {
|
|
4398
|
+
setAddressOptions([]);
|
|
4399
|
+
setCalendarEvents({});
|
|
4400
|
+
setError(false);
|
|
4401
|
+
setErrorText('');
|
|
4402
|
+
};
|
|
4403
|
+
var formatTitle = function (apiTitle) {
|
|
4404
|
+
var mappings = [
|
|
4405
|
+
{ keyword: 'Bin Refuse bin', replacement: 'Refuse bin' },
|
|
4406
|
+
{ keyword: 'Bin Recycling', replacement: 'Recycling bin' },
|
|
4407
|
+
{ keyword: 'Recycling Paper Box', replacement: 'Recycling Paper Box bin' },
|
|
4408
|
+
{ keyword: 'Garden', replacement: 'Garden bin' }
|
|
4409
|
+
];
|
|
4410
|
+
for (var _i = 0, mappings_1 = mappings; _i < mappings_1.length; _i++) {
|
|
4411
|
+
var mapping = mappings_1[_i];
|
|
4412
|
+
if (apiTitle.includes(mapping.keyword)) {
|
|
4413
|
+
return mapping.replacement;
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
return apiTitle;
|
|
4417
|
+
};
|
|
4418
|
+
return (React.createElement(Container$17, { "data-testid": "BinCollection" },
|
|
4419
|
+
React.createElement(FormWithLine, { onSubmit: handleSubmit, isError: isError, lineColour: themeContext.theme_vars.colours.grey_dark, hideLine: true },
|
|
4420
|
+
React.createElement(FormContainer$1, { isLoading: isLoading },
|
|
4421
|
+
React.createElement(Heading, { level: 2, text: "Bin Collection Checker" }),
|
|
4422
|
+
React.createElement(FormInnerContainer, null,
|
|
4423
|
+
React.createElement(Input$6, { type: "text", placeholder: "Enter a postcode", name: "postcode", errorText: errorText, isErrored: isError, maxLength: 10 }),
|
|
4424
|
+
React.createElement(BinCollectionButtonStyles, null,
|
|
4425
|
+
React.createElement(FormButton, { size: "large", type: "submit", "aria-label": "Submit", text: "Find" }))))),
|
|
4426
|
+
addressOptions.length > 0 && (React.createElement(DropDownSelectContainer, null,
|
|
4427
|
+
React.createElement(DropDownSelect, { onChange: handleAddressChange, id: "address", label: "Select your address", options: __spreadArray([{ title: 'Select an address', value: '' }], addressOptions, true) }))),
|
|
4428
|
+
React.createElement("div", null, Object.entries(calendarEvents).map(function (_a) {
|
|
4429
|
+
var apiTitle = _a[0], dates = _a[1];
|
|
4430
|
+
var title = formatTitle(apiTitle);
|
|
4431
|
+
return (React.createElement(React.Fragment, { key: title },
|
|
4432
|
+
React.createElement(UPRNPageTitleRow, null,
|
|
4433
|
+
React.createElement(UPRNPageSectionTitle, null, title)),
|
|
4434
|
+
dates
|
|
4435
|
+
.sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); })
|
|
4436
|
+
.map(function (date) { return (React.createElement(UPRNPageUPRNRow, { key: "".concat(title, "-").concat(date.toString()) },
|
|
4437
|
+
React.createElement(UPRNPageUPRNTitle, null, date.toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })))); })));
|
|
4438
|
+
})),
|
|
4439
|
+
Object.keys(calendarEvents).length > 0 && (React.createElement(FormButton, { size: "small", type: "button", "aria-label": "Reset", text: "Find a different address", onClick: resetForm }))));
|
|
4440
|
+
};
|
|
4441
|
+
|
|
4025
4442
|
const Icon$4 = styled.span`
|
|
4026
4443
|
vertical-align: middle;
|
|
4027
4444
|
width: 100%;
|
|
@@ -5873,88 +6290,6 @@ var DynamicIcon = function (_a) {
|
|
|
5873
6290
|
React.createElement(DynamicComponent, { name: icon, isHover: true }))))));
|
|
5874
6291
|
};
|
|
5875
6292
|
|
|
5876
|
-
const H1 = styled.h1`
|
|
5877
|
-
color: ${props => props.theme.theme_vars.colours.black};
|
|
5878
|
-
margin-left: 0;
|
|
5879
|
-
font-weight: 700;
|
|
5880
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
5881
|
-
margin-bottom: 20px;
|
|
5882
|
-
|
|
5883
|
-
font-size: 32px;
|
|
5884
|
-
font-size: 2rem;
|
|
5885
|
-
line-height: 1.1;
|
|
5886
|
-
|
|
5887
|
-
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
5888
|
-
font-size: 44px;
|
|
5889
|
-
font-size: 2.6rem;
|
|
5890
|
-
max-width: 960px;
|
|
5891
|
-
margin-bottom: 30px;
|
|
5892
|
-
}
|
|
5893
|
-
`;
|
|
5894
|
-
const H2 = styled.h2`
|
|
5895
|
-
color: ${props => props.theme.theme_vars.colours.black};
|
|
5896
|
-
font-weight: 700;
|
|
5897
|
-
line-height: 1;
|
|
5898
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
5899
|
-
margin-top: 25px;
|
|
5900
|
-
margin-bottom: 15px;
|
|
5901
|
-
|
|
5902
|
-
font-size: 24px;
|
|
5903
|
-
font-size: 1.5rem;
|
|
5904
|
-
line-height: 1.25;
|
|
5905
|
-
|
|
5906
|
-
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
5907
|
-
font-size: 36px;
|
|
5908
|
-
font-size: 1.75rem;
|
|
5909
|
-
max-width: 960px;
|
|
5910
|
-
}
|
|
5911
|
-
`;
|
|
5912
|
-
const H3 = styled.h3`
|
|
5913
|
-
color: ${props => props.theme.theme_vars.colours.black};
|
|
5914
|
-
font-weight: 600;
|
|
5915
|
-
line-height: 1;
|
|
5916
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
5917
|
-
margin-top: 25px;
|
|
5918
|
-
margin-bottom: 15px;
|
|
5919
|
-
|
|
5920
|
-
font-size: 24px;
|
|
5921
|
-
font-size: 1.3rem;
|
|
5922
|
-
line-height: 1.25;
|
|
5923
|
-
|
|
5924
|
-
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
5925
|
-
font-size: 36px;
|
|
5926
|
-
font-size: 1.5rem;
|
|
5927
|
-
max-width: 960px;
|
|
5928
|
-
}
|
|
5929
|
-
`;
|
|
5930
|
-
const H4 = styled.h4`
|
|
5931
|
-
color: ${props => props.theme.theme_vars.colours.black};
|
|
5932
|
-
line-height: 1;
|
|
5933
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
5934
|
-
margin-top: 25px;
|
|
5935
|
-
margin-bottom: 15px;
|
|
5936
|
-
|
|
5937
|
-
font-weight: 600;
|
|
5938
|
-
line-height: 1;
|
|
5939
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
5940
|
-
`;
|
|
5941
|
-
|
|
5942
|
-
/**
|
|
5943
|
-
* A heading of different levels
|
|
5944
|
-
*/
|
|
5945
|
-
var Heading = function (_a) {
|
|
5946
|
-
var _b = _a.level, level = _b === void 0 ? 2 : _b, text = _a.text, props = __rest(_a, ["level", "text"]);
|
|
5947
|
-
if (level === 1)
|
|
5948
|
-
return React.createElement(H1, __assign$2({}, props), text);
|
|
5949
|
-
if (level === 2)
|
|
5950
|
-
return React.createElement(H2, __assign$2({}, props), text);
|
|
5951
|
-
if (level === 3)
|
|
5952
|
-
return React.createElement(H3, __assign$2({}, props), text);
|
|
5953
|
-
if (level === 4)
|
|
5954
|
-
return React.createElement(H4, __assign$2({}, props), text);
|
|
5955
|
-
return null;
|
|
5956
|
-
};
|
|
5957
|
-
|
|
5958
6293
|
const HeadingWrapper = styled.div`
|
|
5959
6294
|
display: flex;
|
|
5960
6295
|
-webkit-flex-direction: row;
|
|
@@ -6002,7 +6337,7 @@ var HeadingWithIcon = function (_a) {
|
|
|
6002
6337
|
React.createElement(Heading, { text: text, level: level })));
|
|
6003
6338
|
};
|
|
6004
6339
|
|
|
6005
|
-
const Container$
|
|
6340
|
+
const Container$14 = styled.div`
|
|
6006
6341
|
display: flex;
|
|
6007
6342
|
width: 100%;
|
|
6008
6343
|
min-height: 400px;
|
|
@@ -6026,7 +6361,7 @@ var Map$1 = function (_a) {
|
|
|
6026
6361
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
6027
6362
|
}
|
|
6028
6363
|
}, [ref, map]);
|
|
6029
|
-
return (React.createElement(Container$
|
|
6364
|
+
return (React.createElement(Container$14, { "data-testid": "Map" },
|
|
6030
6365
|
React.createElement("div", { ref: ref }),
|
|
6031
6366
|
React.Children.map(children, function (child) {
|
|
6032
6367
|
if (React.isValidElement(child)) {
|
|
@@ -6083,7 +6418,7 @@ var MapMarker = function (options) {
|
|
|
6083
6418
|
return null;
|
|
6084
6419
|
};
|
|
6085
6420
|
|
|
6086
|
-
const Container$
|
|
6421
|
+
const Container$13 = styled.div`
|
|
6087
6422
|
${(props) => props.theme.fontStyles};
|
|
6088
6423
|
display: block;
|
|
6089
6424
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -6860,7 +7195,7 @@ var Pagination = function (_a) {
|
|
|
6860
7195
|
}
|
|
6861
7196
|
};
|
|
6862
7197
|
if (numbers.length > 1) {
|
|
6863
|
-
return (React.createElement(Container$
|
|
7198
|
+
return (React.createElement(Container$13, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
6864
7199
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
6865
7200
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
6866
7201
|
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
@@ -6872,7 +7207,7 @@ var Pagination = function (_a) {
|
|
|
6872
7207
|
return null;
|
|
6873
7208
|
};
|
|
6874
7209
|
|
|
6875
|
-
const Container$
|
|
7210
|
+
const Container$12 = styled.div`
|
|
6876
7211
|
${(props) => props.theme.fontStyles};
|
|
6877
7212
|
margin-bottom: 30px;
|
|
6878
7213
|
`;
|
|
@@ -6890,7 +7225,7 @@ const Fieldset$2 = styled.fieldset`
|
|
|
6890
7225
|
}
|
|
6891
7226
|
`;
|
|
6892
7227
|
|
|
6893
|
-
const hideLabel
|
|
7228
|
+
const hideLabel = (props) => {
|
|
6894
7229
|
if (props.labelHidden) {
|
|
6895
7230
|
return VisuallyHidden$3;
|
|
6896
7231
|
}
|
|
@@ -6905,7 +7240,7 @@ const Legend$2 = styled.legend`
|
|
|
6905
7240
|
margin-bottom: 10px;
|
|
6906
7241
|
padding: 0;
|
|
6907
7242
|
white-space: normal;
|
|
6908
|
-
${hideLabel
|
|
7243
|
+
${hideLabel}
|
|
6909
7244
|
`;
|
|
6910
7245
|
|
|
6911
7246
|
const hideHint = (props) => {
|
|
@@ -7043,7 +7378,7 @@ var CheckboxListFilter = function (_a) {
|
|
|
7043
7378
|
handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
|
|
7044
7379
|
};
|
|
7045
7380
|
var backupLabel = Math.random().toString(36).substring(7);
|
|
7046
|
-
return (React.createElement(Container$
|
|
7381
|
+
return (React.createElement(Container$12, { "data-testid": "CheckboxListFilter" },
|
|
7047
7382
|
React.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
7048
7383
|
React.createElement(Legend$2, { labelHidden: labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
7049
7384
|
React.createElement(Hint, { id: hintId, hintHidden: hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -7052,58 +7387,6 @@ var CheckboxListFilter = function (_a) {
|
|
|
7052
7387
|
React.createElement(CheckboxLabel, { isChecked: option.checked, htmlFor: option.value }, option.title))); })))));
|
|
7053
7388
|
};
|
|
7054
7389
|
|
|
7055
|
-
const Container$13 = styled.div`
|
|
7056
|
-
${(props) => props.theme.fontStyles};
|
|
7057
|
-
`;
|
|
7058
|
-
|
|
7059
|
-
const hideLabel = (props) => {
|
|
7060
|
-
if (props.hideLabel === true) {
|
|
7061
|
-
return VisuallyHidden$3;
|
|
7062
|
-
}
|
|
7063
|
-
};
|
|
7064
|
-
|
|
7065
|
-
const Label$4 = styled.label`
|
|
7066
|
-
display: block;
|
|
7067
|
-
margin-bottom: 5px;
|
|
7068
|
-
${hideLabel}
|
|
7069
|
-
`;
|
|
7070
|
-
|
|
7071
|
-
const Select = styled.select`
|
|
7072
|
-
${(props) => props.theme.fontStyles};
|
|
7073
|
-
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
7074
|
-
box-sizing: border-box;
|
|
7075
|
-
max-width: 100%;
|
|
7076
|
-
height: 40px;
|
|
7077
|
-
height: 2.5rem;
|
|
7078
|
-
padding: 5px;
|
|
7079
|
-
border: 2px solid ${(props) => props.theme.theme_vars.colours.black};
|
|
7080
|
-
|
|
7081
|
-
&:focus {
|
|
7082
|
-
outline: 2px transparent solid;
|
|
7083
|
-
box-shadow: ${(props) => props.theme.theme_vars.colours.focus} 0 0 0 2px,
|
|
7084
|
-
${(props) => props.theme.theme_vars.colours.black} 0 0 0 4px;
|
|
7085
|
-
transition: box-shadow 0.3s ease 0s;
|
|
7086
|
-
}
|
|
7087
|
-
`;
|
|
7088
|
-
|
|
7089
|
-
const Option = styled.option`
|
|
7090
|
-
:active,
|
|
7091
|
-
:checked,
|
|
7092
|
-
:focus::-ms-value {
|
|
7093
|
-
color: #fff;
|
|
7094
|
-
background-color: #1d70b8;
|
|
7095
|
-
}
|
|
7096
|
-
`;
|
|
7097
|
-
|
|
7098
|
-
var DropDownSelect = function (_a) {
|
|
7099
|
-
var id = _a.id, label = _a.label, options = _a.options, onChange = _a.onChange, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
|
|
7100
|
-
return (React.createElement(Container$13, null,
|
|
7101
|
-
React.createElement(Label$4, { htmlFor: id, hideLabel: hideLabel }, label),
|
|
7102
|
-
React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected }, options.map(function (option, i) {
|
|
7103
|
-
return React.createElement(Option, { key: i, value: option.value }, option.title);
|
|
7104
|
-
}))));
|
|
7105
|
-
};
|
|
7106
|
-
|
|
7107
7390
|
var DropDownFilter = function (_a) {
|
|
7108
7391
|
var id = _a.id, label = _a.label, options = _a.options, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
|
|
7109
7392
|
var _c = useState(selected), value = _c[0], setValue = _c[1];
|
|
@@ -7214,7 +7497,7 @@ const PromotedLink$1 = styled.a`
|
|
|
7214
7497
|
${oneColStyles}
|
|
7215
7498
|
`;
|
|
7216
7499
|
|
|
7217
|
-
const Container$
|
|
7500
|
+
const Container$11 = styled.div`
|
|
7218
7501
|
box-sizing: border-box;
|
|
7219
7502
|
display: flex;
|
|
7220
7503
|
flex-wrap: wrap;
|
|
@@ -7237,7 +7520,7 @@ const Container$12 = styled.div`
|
|
|
7237
7520
|
|
|
7238
7521
|
var Row$1 = function (_a) {
|
|
7239
7522
|
var _b = _a.hasBorder, hasBorder = _b === void 0 ? false : _b, _c = _a.isList, isList = _c === void 0 ? false : _c, _d = _a.hasWrap, hasWrap = _d === void 0 ? true : _d, children = _a.children;
|
|
7240
|
-
return (React.createElement(Container$
|
|
7523
|
+
return (React.createElement(Container$11, { "data-testid": "Row", hasBorder: hasBorder, hasWrap: hasWrap, as: isList ? 'ul' : 'div' }, children));
|
|
7241
7524
|
};
|
|
7242
7525
|
|
|
7243
7526
|
const calculateWidth = (size) => {
|
|
@@ -7287,7 +7570,7 @@ const widths = (props) => {
|
|
|
7287
7570
|
`;
|
|
7288
7571
|
};
|
|
7289
7572
|
|
|
7290
|
-
const Container$
|
|
7573
|
+
const Container$10 = styled.div`
|
|
7291
7574
|
box-sizing: border-box;
|
|
7292
7575
|
display: block;
|
|
7293
7576
|
padding: ${(props) => (props.hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -7298,7 +7581,7 @@ const Container$11 = styled.div`
|
|
|
7298
7581
|
|
|
7299
7582
|
var Column = function (_a) {
|
|
7300
7583
|
var _b = _a.small, small = _b === void 0 ? 'full' : _b, _c = _a.medium, medium = _c === void 0 ? 'one-half' : _c, _d = _a.large, large = _d === void 0 ? 'one-third' : _d, _e = _a.hasPadding, hasPadding = _e === void 0 ? true : _e, _f = _a.hasBorder, hasBorder = _f === void 0 ? false : _f, _g = _a.isList, isList = _g === void 0 ? false : _g, classes = _a.classes, children = _a.children;
|
|
7301
|
-
return (React.createElement(Container$
|
|
7584
|
+
return (React.createElement(Container$10, { "data-testid": "Column", small: small, medium: medium, large: large, hasPadding: hasPadding, hasBorder: hasBorder, as: isList ? 'li' : 'div', className: classes }, children));
|
|
7302
7585
|
};
|
|
7303
7586
|
|
|
7304
7587
|
var PromotedLinks = function (_a) {
|
|
@@ -7314,7 +7597,7 @@ var PromotedLinks = function (_a) {
|
|
|
7314
7597
|
}
|
|
7315
7598
|
};
|
|
7316
7599
|
|
|
7317
|
-
const Container
|
|
7600
|
+
const Container$$ = styled.div`
|
|
7318
7601
|
display: block;
|
|
7319
7602
|
`;
|
|
7320
7603
|
|
|
@@ -7343,7 +7626,7 @@ var StaticMap = function (_a) {
|
|
|
7343
7626
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
7344
7627
|
})
|
|
7345
7628
|
.join('');
|
|
7346
|
-
return (React.createElement(Container
|
|
7629
|
+
return (React.createElement(Container$$, { "data-testid": "StaticMap" },
|
|
7347
7630
|
React.createElement(Message, null,
|
|
7348
7631
|
React.createElement("span", null, "To interact with the map, you need to accept cookies.")),
|
|
7349
7632
|
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 })));
|
|
@@ -7361,7 +7644,7 @@ var TextInput = function (_a) {
|
|
|
7361
7644
|
|
|
7362
7645
|
// Accordion
|
|
7363
7646
|
|
|
7364
|
-
const Container
|
|
7647
|
+
const Container$_ = styled.div`
|
|
7365
7648
|
${(props) => props.theme.fontStyles}
|
|
7366
7649
|
margin-bottom: 20px;
|
|
7367
7650
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -7655,7 +7938,7 @@ var Accordion$1 = function (_a) {
|
|
|
7655
7938
|
setAccordionStates(newStatus);
|
|
7656
7939
|
};
|
|
7657
7940
|
var accordionId = "accordion".concat(uniqueID());
|
|
7658
|
-
return (React.createElement(Container
|
|
7941
|
+
return (React.createElement(Container$_, { "data-testid": "Accordion", id: accordionId },
|
|
7659
7942
|
showControls && sections.length > 1 && (React.createElement(AccordionControls$1, null,
|
|
7660
7943
|
React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
7661
7944
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -7706,7 +7989,7 @@ var BlockQuote = function (_a) {
|
|
|
7706
7989
|
citation && React.createElement(Citation, null, citation)));
|
|
7707
7990
|
};
|
|
7708
7991
|
|
|
7709
|
-
const Container$
|
|
7992
|
+
const Container$Z = styled.div`
|
|
7710
7993
|
margin-bottom: 30px;
|
|
7711
7994
|
display: block;
|
|
7712
7995
|
|
|
@@ -7721,11 +8004,11 @@ const Container$_ = styled.div`
|
|
|
7721
8004
|
*/
|
|
7722
8005
|
var CallToAction = function (_a) {
|
|
7723
8006
|
var primary = _a.primary; _a.size; var text = _a.text, url = _a.url, isExternal = _a.isExternal, isDisabled = _a.isDisabled; __rest(_a, ["primary", "size", "text", "url", "isExternal", "isDisabled"]);
|
|
7724
|
-
return (React.createElement(Container$
|
|
8007
|
+
return (React.createElement(Container$Z, null,
|
|
7725
8008
|
React.createElement(Button$4, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
7726
8009
|
};
|
|
7727
8010
|
|
|
7728
|
-
const Container$
|
|
8011
|
+
const Container$Y = styled.div`
|
|
7729
8012
|
display: block;
|
|
7730
8013
|
${(props) => props.theme.fontStyles}
|
|
7731
8014
|
`;
|
|
@@ -7901,7 +8184,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
7901
8184
|
});
|
|
7902
8185
|
return letterData;
|
|
7903
8186
|
});
|
|
7904
|
-
return (React.createElement(Container$
|
|
8187
|
+
return (React.createElement(Container$Y, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
7905
8188
|
React.createElement(React.Fragment, null,
|
|
7906
8189
|
parishes.length === 0 && (React.createElement(ErrorText, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
7907
8190
|
parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
|
|
@@ -7927,9 +8210,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
7927
8210
|
React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
7928
8211
|
};
|
|
7929
8212
|
|
|
7930
|
-
const Container$
|
|
8213
|
+
const Container$X = styled.div``;
|
|
7931
8214
|
|
|
7932
|
-
const Container$
|
|
8215
|
+
const Container$W = styled.div`
|
|
7933
8216
|
display: flex;
|
|
7934
8217
|
flex-direction: column;
|
|
7935
8218
|
justify-content: flex-start;
|
|
@@ -13010,10 +13293,10 @@ let pico$1 = picocolors.exports;
|
|
|
13010
13293
|
|
|
13011
13294
|
let tokenizer$1 = tokenize;
|
|
13012
13295
|
|
|
13013
|
-
let Input$
|
|
13296
|
+
let Input$5;
|
|
13014
13297
|
|
|
13015
13298
|
function registerInput(dependant) {
|
|
13016
|
-
Input$
|
|
13299
|
+
Input$5 = dependant;
|
|
13017
13300
|
}
|
|
13018
13301
|
|
|
13019
13302
|
const HIGHLIGHT_THEME = {
|
|
@@ -13054,7 +13337,7 @@ function getTokenType([type, value], processor) {
|
|
|
13054
13337
|
}
|
|
13055
13338
|
|
|
13056
13339
|
function terminalHighlight$2(css) {
|
|
13057
|
-
let processor = tokenizer$1(new Input$
|
|
13340
|
+
let processor = tokenizer$1(new Input$5(css), { ignoreErrors: true });
|
|
13058
13341
|
let result = '';
|
|
13059
13342
|
while (!processor.endOfFile()) {
|
|
13060
13343
|
let token = processor.nextToken();
|
|
@@ -17441,7 +17724,7 @@ let fromOffsetCache = Symbol('fromOffsetCache');
|
|
|
17441
17724
|
let sourceMapAvailable$1 = Boolean(SourceMapConsumer$1 && SourceMapGenerator$1);
|
|
17442
17725
|
let pathAvailable$1 = Boolean(resolve$1 && isAbsolute);
|
|
17443
17726
|
|
|
17444
|
-
class Input$
|
|
17727
|
+
class Input$4 {
|
|
17445
17728
|
constructor(css, opts = {}) {
|
|
17446
17729
|
if (
|
|
17447
17730
|
css === null ||
|
|
@@ -17667,18 +17950,18 @@ class Input$5 {
|
|
|
17667
17950
|
}
|
|
17668
17951
|
}
|
|
17669
17952
|
|
|
17670
|
-
var input = Input$
|
|
17671
|
-
Input$
|
|
17953
|
+
var input = Input$4;
|
|
17954
|
+
Input$4.default = Input$4;
|
|
17672
17955
|
|
|
17673
17956
|
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
17674
|
-
terminalHighlight.registerInput(Input$
|
|
17957
|
+
terminalHighlight.registerInput(Input$4);
|
|
17675
17958
|
}
|
|
17676
17959
|
|
|
17677
17960
|
let { SourceMapConsumer, SourceMapGenerator } = sourceMap;
|
|
17678
17961
|
let { dirname, resolve, relative, sep } = require$$2;
|
|
17679
17962
|
let { pathToFileURL } = require$$1$1;
|
|
17680
17963
|
|
|
17681
|
-
let Input$
|
|
17964
|
+
let Input$3 = input;
|
|
17682
17965
|
|
|
17683
17966
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
17684
17967
|
let pathAvailable = Boolean(dirname && resolve && relative && sep);
|
|
@@ -17713,7 +17996,7 @@ class MapGenerator$2 {
|
|
|
17713
17996
|
}
|
|
17714
17997
|
});
|
|
17715
17998
|
} else {
|
|
17716
|
-
let input = new Input$
|
|
17999
|
+
let input = new Input$3(this.css, this.opts);
|
|
17717
18000
|
if (input.map) this.previousMaps.push(input.map);
|
|
17718
18001
|
}
|
|
17719
18002
|
}
|
|
@@ -18047,7 +18330,7 @@ function markDirtyUp(node) {
|
|
|
18047
18330
|
}
|
|
18048
18331
|
}
|
|
18049
18332
|
|
|
18050
|
-
class Container$
|
|
18333
|
+
class Container$V extends Node$1 {
|
|
18051
18334
|
push(child) {
|
|
18052
18335
|
child.parent = this;
|
|
18053
18336
|
this.proxyOf.nodes.push(child);
|
|
@@ -18340,7 +18623,7 @@ class Container$W extends Node$1 {
|
|
|
18340
18623
|
|
|
18341
18624
|
let processed = nodes.map(i => {
|
|
18342
18625
|
/* c8 ignore next */
|
|
18343
|
-
if (!i[my$1]) Container$
|
|
18626
|
+
if (!i[my$1]) Container$V.rebuild(i);
|
|
18344
18627
|
i = i.proxyOf;
|
|
18345
18628
|
if (i.parent) i.parent.removeChild(i);
|
|
18346
18629
|
if (i[isClean$1]) markDirtyUp(i);
|
|
@@ -18418,27 +18701,27 @@ class Container$W extends Node$1 {
|
|
|
18418
18701
|
}
|
|
18419
18702
|
}
|
|
18420
18703
|
|
|
18421
|
-
Container$
|
|
18704
|
+
Container$V.registerParse = dependant => {
|
|
18422
18705
|
parse$4 = dependant;
|
|
18423
18706
|
};
|
|
18424
18707
|
|
|
18425
|
-
Container$
|
|
18708
|
+
Container$V.registerRule = dependant => {
|
|
18426
18709
|
Rule$4 = dependant;
|
|
18427
18710
|
};
|
|
18428
18711
|
|
|
18429
|
-
Container$
|
|
18712
|
+
Container$V.registerAtRule = dependant => {
|
|
18430
18713
|
AtRule$4 = dependant;
|
|
18431
18714
|
};
|
|
18432
18715
|
|
|
18433
|
-
Container$
|
|
18716
|
+
Container$V.registerRoot = dependant => {
|
|
18434
18717
|
Root$6 = dependant;
|
|
18435
18718
|
};
|
|
18436
18719
|
|
|
18437
|
-
var container = Container$
|
|
18438
|
-
Container$
|
|
18720
|
+
var container = Container$V;
|
|
18721
|
+
Container$V.default = Container$V;
|
|
18439
18722
|
|
|
18440
18723
|
/* c8 ignore start */
|
|
18441
|
-
Container$
|
|
18724
|
+
Container$V.rebuild = node => {
|
|
18442
18725
|
if (node.type === 'atrule') {
|
|
18443
18726
|
Object.setPrototypeOf(node, AtRule$4.prototype);
|
|
18444
18727
|
} else if (node.type === 'rule') {
|
|
@@ -18455,16 +18738,16 @@ Container$W.rebuild = node => {
|
|
|
18455
18738
|
|
|
18456
18739
|
if (node.nodes) {
|
|
18457
18740
|
node.nodes.forEach(child => {
|
|
18458
|
-
Container$
|
|
18741
|
+
Container$V.rebuild(child);
|
|
18459
18742
|
});
|
|
18460
18743
|
}
|
|
18461
18744
|
};
|
|
18462
18745
|
|
|
18463
|
-
let Container$
|
|
18746
|
+
let Container$U = container;
|
|
18464
18747
|
|
|
18465
18748
|
let LazyResult$4, Processor$3;
|
|
18466
18749
|
|
|
18467
|
-
class Document$3 extends Container$
|
|
18750
|
+
class Document$3 extends Container$U {
|
|
18468
18751
|
constructor(defaults) {
|
|
18469
18752
|
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
|
18470
18753
|
super({ type: 'document', ...defaults });
|
|
@@ -18582,9 +18865,9 @@ class Result$4 {
|
|
|
18582
18865
|
var result = Result$4;
|
|
18583
18866
|
Result$4.default = Result$4;
|
|
18584
18867
|
|
|
18585
|
-
let Container$
|
|
18868
|
+
let Container$T = container;
|
|
18586
18869
|
|
|
18587
|
-
class AtRule$3 extends Container$
|
|
18870
|
+
class AtRule$3 extends Container$T {
|
|
18588
18871
|
constructor(defaults) {
|
|
18589
18872
|
super(defaults);
|
|
18590
18873
|
this.type = 'atrule';
|
|
@@ -18604,13 +18887,13 @@ class AtRule$3 extends Container$U {
|
|
|
18604
18887
|
var atRule = AtRule$3;
|
|
18605
18888
|
AtRule$3.default = AtRule$3;
|
|
18606
18889
|
|
|
18607
|
-
Container$
|
|
18890
|
+
Container$T.registerAtRule(AtRule$3);
|
|
18608
18891
|
|
|
18609
|
-
let Container$
|
|
18892
|
+
let Container$S = container;
|
|
18610
18893
|
|
|
18611
18894
|
let LazyResult$3, Processor$2;
|
|
18612
18895
|
|
|
18613
|
-
class Root$5 extends Container$
|
|
18896
|
+
class Root$5 extends Container$S {
|
|
18614
18897
|
constructor(defaults) {
|
|
18615
18898
|
super(defaults);
|
|
18616
18899
|
this.type = 'root';
|
|
@@ -18664,7 +18947,7 @@ Root$5.registerProcessor = dependant => {
|
|
|
18664
18947
|
var root = Root$5;
|
|
18665
18948
|
Root$5.default = Root$5;
|
|
18666
18949
|
|
|
18667
|
-
Container$
|
|
18950
|
+
Container$S.registerRoot(Root$5);
|
|
18668
18951
|
|
|
18669
18952
|
let list$2 = {
|
|
18670
18953
|
split(string, separators, last) {
|
|
@@ -18723,10 +19006,10 @@ let list$2 = {
|
|
|
18723
19006
|
var list_1 = list$2;
|
|
18724
19007
|
list$2.default = list$2;
|
|
18725
19008
|
|
|
18726
|
-
let Container$
|
|
19009
|
+
let Container$R = container;
|
|
18727
19010
|
let list$1 = list_1;
|
|
18728
19011
|
|
|
18729
|
-
class Rule$3 extends Container$
|
|
19012
|
+
class Rule$3 extends Container$R {
|
|
18730
19013
|
constructor(defaults) {
|
|
18731
19014
|
super(defaults);
|
|
18732
19015
|
this.type = 'rule';
|
|
@@ -18747,7 +19030,7 @@ class Rule$3 extends Container$S {
|
|
|
18747
19030
|
var rule = Rule$3;
|
|
18748
19031
|
Rule$3.default = Rule$3;
|
|
18749
19032
|
|
|
18750
|
-
Container$
|
|
19033
|
+
Container$R.registerRule(Rule$3);
|
|
18751
19034
|
|
|
18752
19035
|
let Declaration$2 = declaration;
|
|
18753
19036
|
let tokenizer = tokenize;
|
|
@@ -19351,12 +19634,12 @@ class Parser$1 {
|
|
|
19351
19634
|
|
|
19352
19635
|
var parser = Parser$1;
|
|
19353
19636
|
|
|
19354
|
-
let Container$
|
|
19637
|
+
let Container$Q = container;
|
|
19355
19638
|
let Parser = parser;
|
|
19356
|
-
let Input$
|
|
19639
|
+
let Input$2 = input;
|
|
19357
19640
|
|
|
19358
19641
|
function parse$3(css, opts) {
|
|
19359
|
-
let input = new Input$
|
|
19642
|
+
let input = new Input$2(css, opts);
|
|
19360
19643
|
let parser = new Parser(input);
|
|
19361
19644
|
try {
|
|
19362
19645
|
parser.parse();
|
|
@@ -19390,12 +19673,12 @@ function parse$3(css, opts) {
|
|
|
19390
19673
|
var parse_1 = parse$3;
|
|
19391
19674
|
parse$3.default = parse$3;
|
|
19392
19675
|
|
|
19393
|
-
Container$
|
|
19676
|
+
Container$Q.registerParse(parse$3);
|
|
19394
19677
|
|
|
19395
19678
|
let { isClean, my } = symbols;
|
|
19396
19679
|
let MapGenerator$1 = mapGenerator;
|
|
19397
19680
|
let stringify$2 = stringify_1;
|
|
19398
|
-
let Container$
|
|
19681
|
+
let Container$P = container;
|
|
19399
19682
|
let Document$2 = document$1;
|
|
19400
19683
|
let warnOnce$1 = warnOnce$2;
|
|
19401
19684
|
let Result$3 = result;
|
|
@@ -19530,7 +19813,7 @@ class LazyResult$2 {
|
|
|
19530
19813
|
|
|
19531
19814
|
if (root && !root[my]) {
|
|
19532
19815
|
/* c8 ignore next 2 */
|
|
19533
|
-
Container$
|
|
19816
|
+
Container$P.rebuild(root);
|
|
19534
19817
|
}
|
|
19535
19818
|
}
|
|
19536
19819
|
|
|
@@ -20145,7 +20428,7 @@ let Declaration$1 = declaration;
|
|
|
20145
20428
|
let PreviousMap = previousMap;
|
|
20146
20429
|
let Comment$1 = comment;
|
|
20147
20430
|
let AtRule$1 = atRule;
|
|
20148
|
-
let Input$
|
|
20431
|
+
let Input$1 = input;
|
|
20149
20432
|
let Root$1 = root;
|
|
20150
20433
|
let Rule$1 = rule;
|
|
20151
20434
|
|
|
@@ -20156,7 +20439,7 @@ function fromJSON$1(json, inputs) {
|
|
|
20156
20439
|
if (ownInputs) {
|
|
20157
20440
|
inputs = [];
|
|
20158
20441
|
for (let input of ownInputs) {
|
|
20159
|
-
let inputHydrated = { ...input, __proto__: Input$
|
|
20442
|
+
let inputHydrated = { ...input, __proto__: Input$1.prototype };
|
|
20160
20443
|
if (inputHydrated.map) {
|
|
20161
20444
|
inputHydrated.map = {
|
|
20162
20445
|
...inputHydrated.map,
|
|
@@ -20197,7 +20480,7 @@ fromJSON$1.default = fromJSON$1;
|
|
|
20197
20480
|
let CssSyntaxError = cssSyntaxError;
|
|
20198
20481
|
let Declaration = declaration;
|
|
20199
20482
|
let LazyResult = lazyResult;
|
|
20200
|
-
let Container$
|
|
20483
|
+
let Container$O = container;
|
|
20201
20484
|
let Processor = processor;
|
|
20202
20485
|
let stringify = stringify_1;
|
|
20203
20486
|
let fromJSON = fromJSON_1;
|
|
@@ -20206,7 +20489,7 @@ let Warning = warning;
|
|
|
20206
20489
|
let Comment = comment;
|
|
20207
20490
|
let AtRule = atRule;
|
|
20208
20491
|
let Result$1 = result;
|
|
20209
|
-
let Input
|
|
20492
|
+
let Input = input;
|
|
20210
20493
|
let parse = parse_1;
|
|
20211
20494
|
let list = list_1;
|
|
20212
20495
|
let Rule = rule;
|
|
@@ -20277,14 +20560,14 @@ postcss.document = defaults => new Document(defaults);
|
|
|
20277
20560
|
|
|
20278
20561
|
postcss.CssSyntaxError = CssSyntaxError;
|
|
20279
20562
|
postcss.Declaration = Declaration;
|
|
20280
|
-
postcss.Container = Container$
|
|
20563
|
+
postcss.Container = Container$O;
|
|
20281
20564
|
postcss.Processor = Processor;
|
|
20282
20565
|
postcss.Document = Document;
|
|
20283
20566
|
postcss.Comment = Comment;
|
|
20284
20567
|
postcss.Warning = Warning;
|
|
20285
20568
|
postcss.AtRule = AtRule;
|
|
20286
20569
|
postcss.Result = Result$1;
|
|
20287
|
-
postcss.Input = Input
|
|
20570
|
+
postcss.Input = Input;
|
|
20288
20571
|
postcss.Rule = Rule;
|
|
20289
20572
|
postcss.Root = Root;
|
|
20290
20573
|
postcss.Node = Node;
|
|
@@ -21146,7 +21429,7 @@ var sanitizeHtml$1 = sanitizeHtml_1;
|
|
|
21146
21429
|
var Card = function (_a) {
|
|
21147
21430
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
21148
21431
|
var showContent = content || header;
|
|
21149
|
-
return (React.createElement(Container$
|
|
21432
|
+
return (React.createElement(Container$W, { "data-testid": "Card" },
|
|
21150
21433
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
21151
21434
|
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" })))),
|
|
21152
21435
|
showContent && (React.createElement(Content$6, null,
|
|
@@ -21162,12 +21445,12 @@ var Card = function (_a) {
|
|
|
21162
21445
|
*/
|
|
21163
21446
|
var Cards = function (_a) {
|
|
21164
21447
|
var cards = _a.cards;
|
|
21165
|
-
return (React.createElement(Container$
|
|
21448
|
+
return (React.createElement(Container$X, { "data-testid": "Cards" },
|
|
21166
21449
|
React.createElement(Row$1, null, cards.map(function (card, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
21167
21450
|
React.createElement(Card, __assign$2({}, card)))); }))));
|
|
21168
21451
|
};
|
|
21169
21452
|
|
|
21170
|
-
const Container$
|
|
21453
|
+
const Container$N = styled.div`
|
|
21171
21454
|
margin: 25px 0;
|
|
21172
21455
|
`;
|
|
21173
21456
|
|
|
@@ -21285,7 +21568,7 @@ var FileDownload = function (_a) {
|
|
|
21285
21568
|
|
|
21286
21569
|
var DownloadableFiles = function (_a) {
|
|
21287
21570
|
var files = _a.files;
|
|
21288
|
-
return (React.createElement(Container$
|
|
21571
|
+
return (React.createElement(Container$N, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
21289
21572
|
files.map(function (file) { return React.createElement(FileDownload, __assign$2({ key: file.title }, file)); })
|
|
21290
21573
|
:
|
|
21291
21574
|
React.createElement("i", null, "No file to show")));
|
|
@@ -21421,7 +21704,7 @@ const wereCookiesAccepted = (cookiesAcceptedOverride) => {
|
|
|
21421
21704
|
return false;
|
|
21422
21705
|
};
|
|
21423
21706
|
|
|
21424
|
-
const Container$
|
|
21707
|
+
const Container$M = styled.div`
|
|
21425
21708
|
border: solid 4px;
|
|
21426
21709
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
21427
21710
|
border-color: ${(props) =>
|
|
@@ -21475,7 +21758,7 @@ const InnerContainer$2 = styled.div`
|
|
|
21475
21758
|
*/
|
|
21476
21759
|
var AlertBannerService = function (_a) {
|
|
21477
21760
|
var title = _a.title, _b = _a.hasTopSpacing, hasTopSpacing = _b === void 0 ? false : _b, _c = _a.alertType, alertType = _c === void 0 ? 'alert' : _c, children = _a.children;
|
|
21478
|
-
return (React.createElement(Container$
|
|
21761
|
+
return (React.createElement(Container$M, { alertType: alertType, "data-testid": "AlertBannerService", hasTopSpacing: hasTopSpacing },
|
|
21479
21762
|
React.createElement(InnerContainer$2, { "data-testid": "AlertBannerServiceInner" },
|
|
21480
21763
|
(title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading, { text: title }),
|
|
21481
21764
|
children)));
|
|
@@ -21522,7 +21805,7 @@ var GoogleMap = function (_a) {
|
|
|
21522
21805
|
React.createElement(MapLink$1, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
|
|
21523
21806
|
};
|
|
21524
21807
|
|
|
21525
|
-
const Container$
|
|
21808
|
+
const Container$L = styled.figure`
|
|
21526
21809
|
display: block;
|
|
21527
21810
|
background: ${(props) =>
|
|
21528
21811
|
props.theme.cardinal_name === 'north'
|
|
@@ -22185,7 +22468,7 @@ var LazyImage = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
|
22185
22468
|
*/
|
|
22186
22469
|
var Image$2 = function (_a) {
|
|
22187
22470
|
var imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, _b = _a.ratio, ratio = _b === void 0 ? '4by3' : _b, caption = _a.caption, wrapText = _a.wrapText;
|
|
22188
|
-
return (React.createElement(Container$
|
|
22471
|
+
return (React.createElement(Container$L, { "data-testid": "Image", wrapText: wrapText },
|
|
22189
22472
|
React.createElement(ImageContainer$4, { "data-testid": "ImageContainer", ratio: ratio },
|
|
22190
22473
|
React.createElement(LazyImage, { placeholder: imageSmall, src: imageLarge, visibilitySensorProps: {
|
|
22191
22474
|
partialVisibility: true,
|
|
@@ -22193,7 +22476,7 @@ var Image$2 = function (_a) {
|
|
|
22193
22476
|
(caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
|
|
22194
22477
|
};
|
|
22195
22478
|
|
|
22196
|
-
const Container$
|
|
22479
|
+
const Container$K = styled.div`
|
|
22197
22480
|
display: block;
|
|
22198
22481
|
`;
|
|
22199
22482
|
|
|
@@ -22214,7 +22497,7 @@ const Content$5 = styled.div`
|
|
|
22214
22497
|
*/
|
|
22215
22498
|
var ImageAndText = function (_a) {
|
|
22216
22499
|
var heading = _a.heading, textContent = _a.textContent, image = _a.image;
|
|
22217
|
-
return (React.createElement(Container$
|
|
22500
|
+
return (React.createElement(Container$K, { "data-testid": "ImageAndText" },
|
|
22218
22501
|
React.createElement(Row$1, null,
|
|
22219
22502
|
heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
22220
22503
|
React.createElement(HeadingContainer, null,
|
|
@@ -22227,7 +22510,7 @@ var ImageAndText = function (_a) {
|
|
|
22227
22510
|
React.createElement(Content$5, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
22228
22511
|
};
|
|
22229
22512
|
|
|
22230
|
-
const Container$
|
|
22513
|
+
const Container$J = styled.div`
|
|
22231
22514
|
display: block;
|
|
22232
22515
|
`;
|
|
22233
22516
|
|
|
@@ -22236,7 +22519,7 @@ const Container$K = styled.div`
|
|
|
22236
22519
|
*/
|
|
22237
22520
|
var InquestSchedule = function (_a) {
|
|
22238
22521
|
var caseAppointments = _a.caseAppointments, title = _a.title, _b = _a.error, error = _b === void 0 ? false : _b;
|
|
22239
|
-
return (React.createElement(Container$
|
|
22522
|
+
return (React.createElement(Container$J, { "data-testid": "InquestSchedule" },
|
|
22240
22523
|
React.createElement("div", { className: "table-container" },
|
|
22241
22524
|
React.createElement("table", null,
|
|
22242
22525
|
React.createElement("caption", null, title),
|
|
@@ -22264,7 +22547,7 @@ var InquestSchedule = function (_a) {
|
|
|
22264
22547
|
error ? (React.createElement("p", null, " The information is currently unavailable.")) : (React.createElement("p", null, "There are no inquests scheduled for next month."))))))))));
|
|
22265
22548
|
};
|
|
22266
22549
|
|
|
22267
|
-
const Container$
|
|
22550
|
+
const Container$I = styled.div`
|
|
22268
22551
|
${(props) => props.theme.fontStyles};
|
|
22269
22552
|
overflow: hidden;
|
|
22270
22553
|
margin: 40px auto 5px auto;
|
|
@@ -22344,7 +22627,7 @@ const CTA = styled.a`
|
|
|
22344
22627
|
*/
|
|
22345
22628
|
var PromoBanner = function (_a) {
|
|
22346
22629
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
22347
|
-
return (React.createElement(Container$
|
|
22630
|
+
return (React.createElement(Container$I, null,
|
|
22348
22631
|
React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
|
|
22349
22632
|
partialVisibility: true,
|
|
22350
22633
|
} }, function (src) { return React.createElement(ImageLink, { img: src, href: ctaUrl, title: ctaText }); }),
|
|
@@ -22555,7 +22838,7 @@ var Promotions = function (_a) {
|
|
|
22555
22838
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
22556
22839
|
};
|
|
22557
22840
|
|
|
22558
|
-
const Container$
|
|
22841
|
+
const Container$H = styled.div`
|
|
22559
22842
|
padding: 0;
|
|
22560
22843
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
22561
22844
|
${(props) => props.theme.fontStyles}
|
|
@@ -22605,7 +22888,7 @@ const Inner = styled.div`
|
|
|
22605
22888
|
}
|
|
22606
22889
|
`;
|
|
22607
22890
|
|
|
22608
|
-
const Container$
|
|
22891
|
+
const Container$G = styled.div`
|
|
22609
22892
|
display: block;
|
|
22610
22893
|
|
|
22611
22894
|
input[type='text'] {
|
|
@@ -22673,28 +22956,17 @@ const SubmitButton = styled.input`
|
|
|
22673
22956
|
}
|
|
22674
22957
|
`;
|
|
22675
22958
|
|
|
22676
|
-
/**
|
|
22677
|
-
* Primary UI component for user interaction
|
|
22678
|
-
* If value is set then treat as controlled component
|
|
22679
|
-
*/
|
|
22680
|
-
var Input = function (_a) {
|
|
22681
|
-
var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength, defaultValue = _a.defaultValue, onChange = _a.onChange, id = _a.id, value = _a.value;
|
|
22682
|
-
return (React.createElement(React.Fragment, null,
|
|
22683
|
-
errorText && React.createElement(ErrorText$1, null, errorText),
|
|
22684
|
-
typeof value !== 'undefined' ? (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength, value: value, id: id })) : (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, isErrored: isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id }))));
|
|
22685
|
-
};
|
|
22686
|
-
|
|
22687
22959
|
var CustomSearch = function (_a) {
|
|
22688
22960
|
var method = _a.method, path = _a.path, label = _a.label, _b = _a.hasHiddenLabel, hasHiddenLabel = _b === void 0 ? true : _b, fieldName = _a.fieldName, placeholder = _a.placeholder, searchText = _a.searchText, id = _a.id;
|
|
22689
22961
|
if (!id) {
|
|
22690
22962
|
id = useId();
|
|
22691
22963
|
}
|
|
22692
|
-
return (React.createElement(Container$
|
|
22964
|
+
return (React.createElement(Container$G, { "data-testid": "CustomSearch" },
|
|
22693
22965
|
React.createElement("form", { method: method, action: path, "aria-label": label },
|
|
22694
22966
|
React.createElement("div", { role: "search" },
|
|
22695
22967
|
React.createElement(Label$3, { htmlFor: id, hasHiddenLabel: hasHiddenLabel }, label),
|
|
22696
22968
|
React.createElement(InputWrapper$1, null,
|
|
22697
|
-
React.createElement(Input, { name: fieldName, placeholder: placeholder, id: id }),
|
|
22969
|
+
React.createElement(Input$6, { name: fieldName, placeholder: placeholder, id: id }),
|
|
22698
22970
|
React.createElement(SubmitButton, { type: "submit", value: searchText }))))));
|
|
22699
22971
|
};
|
|
22700
22972
|
|
|
@@ -22712,8 +22984,8 @@ var SearchBox = function (_a) {
|
|
|
22712
22984
|
return (React.createElement(React.Fragment, null, imageLarge && imageSmall ? (React.createElement(React.Fragment, null,
|
|
22713
22985
|
React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
|
|
22714
22986
|
partialVisibility: true,
|
|
22715
|
-
} }, function (src) { return (React.createElement(Container$
|
|
22716
|
-
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$
|
|
22987
|
+
} }, function (src) { return (React.createElement(Container$H, { image: src, "data-testid": "SearchBox" }, searchInner)); }),
|
|
22988
|
+
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$H, { "data-testid": "SearchBox" }, searchInner))));
|
|
22717
22989
|
};
|
|
22718
22990
|
|
|
22719
22991
|
var VideoProvider;
|
|
@@ -22903,7 +23175,7 @@ var AccessibleLink = function (_a) {
|
|
|
22903
23175
|
})));
|
|
22904
23176
|
};
|
|
22905
23177
|
|
|
22906
|
-
const Container$
|
|
23178
|
+
const Container$F = styled.div`
|
|
22907
23179
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
22908
23180
|
background: ${(props) =>
|
|
22909
23181
|
props.alertType === 'alert'
|
|
@@ -23034,7 +23306,7 @@ const handleContainerPadding = (noBackground, noPadding) => {
|
|
|
23034
23306
|
}
|
|
23035
23307
|
};
|
|
23036
23308
|
|
|
23037
|
-
const Container$
|
|
23309
|
+
const Container$E = styled.div`
|
|
23038
23310
|
background: ${(props) =>
|
|
23039
23311
|
props.noBackground
|
|
23040
23312
|
? 'transparent'
|
|
@@ -23076,7 +23348,7 @@ const MaxWidth = styled.div`
|
|
|
23076
23348
|
*/
|
|
23077
23349
|
var MaxWidthContainer = function (_a) {
|
|
23078
23350
|
var children = _a.children, classes = _a.classes, _b = _a.noBackground, noBackground = _b === void 0 ? false : _b, _c = _a.noPadding, noPadding = _c === void 0 ? false : _c, _d = _a.overflowVisible, overflowVisible = _d === void 0 ? false : _d, props = __rest(_a, ["children", "classes", "noBackground", "noPadding", "overflowVisible"]);
|
|
23079
|
-
return (React.createElement(Container$
|
|
23351
|
+
return (React.createElement(Container$E, { noBackground: noBackground, noPadding: noPadding },
|
|
23080
23352
|
React.createElement(MaxWidth, __assign$2({ className: classes, overflowVisible: overflowVisible }, props), children)));
|
|
23081
23353
|
};
|
|
23082
23354
|
|
|
@@ -23147,7 +23419,7 @@ var AlertBanner = function (_a) {
|
|
|
23147
23419
|
setShowAlert(false);
|
|
23148
23420
|
};
|
|
23149
23421
|
return (showAlert &&
|
|
23150
|
-
notServer && (React.createElement(Container$
|
|
23422
|
+
notServer && (React.createElement(Container$F, { alertType: alertType, "data-testid": "AlertBanner" },
|
|
23151
23423
|
React.createElement(MaxWidthContainer, { noBackground: true },
|
|
23152
23424
|
React.createElement(InnerContainer$1, null,
|
|
23153
23425
|
React.createElement(BannerContentContainer, null,
|
|
@@ -23161,7 +23433,7 @@ var AlertBanner = function (_a) {
|
|
|
23161
23433
|
"Dismiss"))))));
|
|
23162
23434
|
};
|
|
23163
23435
|
|
|
23164
|
-
const Container$
|
|
23436
|
+
const Container$D = styled.a`
|
|
23165
23437
|
|
|
23166
23438
|
|
|
23167
23439
|
|
|
@@ -23219,10 +23491,10 @@ const Container$E = styled.a`
|
|
|
23219
23491
|
|
|
23220
23492
|
var BackLink = function (_a) {
|
|
23221
23493
|
var link = _a.link;
|
|
23222
|
-
return (React.createElement(Container$
|
|
23494
|
+
return (React.createElement(Container$D, { href: link, "data-testid": "BackLink" }, "Back"));
|
|
23223
23495
|
};
|
|
23224
23496
|
|
|
23225
|
-
const Container$
|
|
23497
|
+
const Container$C = styled.div`
|
|
23226
23498
|
padding-top: 20px;
|
|
23227
23499
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23228
23500
|
margin-bottom: ${(props) => (props.hasMargin ? props.theme.theme_vars.spacingSizes.large : 0)};
|
|
@@ -23289,14 +23561,14 @@ const BreadcrumbLink$1 = styled.a`
|
|
|
23289
23561
|
|
|
23290
23562
|
var Breadcrumbs = function (_a) {
|
|
23291
23563
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
23292
|
-
return (React.createElement(Container$
|
|
23564
|
+
return (React.createElement(Container$C, { hasMargin: hasMargin, "data-testid": "Breadcrumbs" },
|
|
23293
23565
|
React.createElement(List$2, null, breadcrumbsArray.map(function (crumb) { return (React.createElement(Crumb, { key: crumb.title }, React.createElement(React.Fragment, null,
|
|
23294
23566
|
React.createElement(BreadcrumbLink$1, { href: crumb.url, title: crumb.title }, crumb.title),
|
|
23295
23567
|
React.createElement(IconWrapper$4, null,
|
|
23296
23568
|
React.createElement(ChevronIcon, { direction: 'right', colourFill: "#C6C6C6" }))))); }))));
|
|
23297
23569
|
};
|
|
23298
23570
|
|
|
23299
|
-
const Container$
|
|
23571
|
+
const Container$B = styled.div`
|
|
23300
23572
|
display: block;
|
|
23301
23573
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
23302
23574
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -23344,12 +23616,12 @@ const CurrentPage = styled.span`
|
|
|
23344
23616
|
|
|
23345
23617
|
var Contents$1 = function (_a) {
|
|
23346
23618
|
var contents = _a.contents, _b = _a.currentPath, currentPath = _b === void 0 ? undefined : _b, _c = _a.title, title = _c === void 0 ? 'Contents' : _c;
|
|
23347
|
-
return (React.createElement(Container$
|
|
23619
|
+
return (React.createElement(Container$B, { "data-testid": "Contents" },
|
|
23348
23620
|
React.createElement(Heading, { text: title, level: 2 }),
|
|
23349
23621
|
React.createElement(List$1, null, contents.map(function (content, index) { return (React.createElement(ListItem$1, { key: index }, content.url === currentPath ? (React.createElement(CurrentPage, null, content.title)) : (React.createElement(Link$2, { href: content.url, active: content.url === currentPath }, content.title)))); }))));
|
|
23350
23622
|
};
|
|
23351
23623
|
|
|
23352
|
-
const Container$
|
|
23624
|
+
const Container$A = styled.div`
|
|
23353
23625
|
display: block;
|
|
23354
23626
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23355
23627
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -23399,7 +23671,7 @@ var ContentsNavigation = function (_a) {
|
|
|
23399
23671
|
};
|
|
23400
23672
|
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
23401
23673
|
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
23402
|
-
return (React.createElement(Container$
|
|
23674
|
+
return (React.createElement(Container$A, { "data-testid": "ContentsNavigation" },
|
|
23403
23675
|
previousPage && (React.createElement(NavigationLink, { href: previousPage.url },
|
|
23404
23676
|
React.createElement(Arrow, null, "\u2190"),
|
|
23405
23677
|
React.createElement(LinkText, null,
|
|
@@ -23414,7 +23686,7 @@ var ContentsNavigation = function (_a) {
|
|
|
23414
23686
|
React.createElement(PageTitle$1, null, nextPage.title))))));
|
|
23415
23687
|
};
|
|
23416
23688
|
|
|
23417
|
-
const Container$
|
|
23689
|
+
const Container$z = styled.div`
|
|
23418
23690
|
${props => props.theme.fontStyles}
|
|
23419
23691
|
background-color: ${props => props.theme.theme_vars.colours.grey_light};
|
|
23420
23692
|
padding: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -23525,77 +23797,6 @@ const ButtonsContainer = styled.div`
|
|
|
23525
23797
|
}
|
|
23526
23798
|
`;
|
|
23527
23799
|
|
|
23528
|
-
const StyledButton = styled.button`
|
|
23529
|
-
font-weight: 700;
|
|
23530
|
-
border: none;
|
|
23531
|
-
cursor: pointer;
|
|
23532
|
-
display: inline-block;
|
|
23533
|
-
line-height: 1;
|
|
23534
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
23535
|
-
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
23536
|
-
text-decoration: none;
|
|
23537
|
-
|
|
23538
|
-
&.button--primary {
|
|
23539
|
-
color: white;
|
|
23540
|
-
background-color: ${props => props.theme.theme_vars.colours.action};
|
|
23541
|
-
|
|
23542
|
-
&:hover {
|
|
23543
|
-
background-color: ${props => props.theme.theme_vars.colours.action_dark};
|
|
23544
|
-
}
|
|
23545
|
-
&:focus {
|
|
23546
|
-
outline: none;
|
|
23547
|
-
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
23548
|
-
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
23549
|
-
box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23550
|
-
-webkit-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23551
|
-
-moz-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23552
|
-
}
|
|
23553
|
-
&:active {
|
|
23554
|
-
transform: translateY(2px);
|
|
23555
|
-
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
23556
|
-
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
23557
|
-
box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23558
|
-
-webkit-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23559
|
-
-moz-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23560
|
-
}
|
|
23561
|
-
}
|
|
23562
|
-
&.button--secondary {
|
|
23563
|
-
color: ${props => props.theme.theme_vars.colours.action};
|
|
23564
|
-
background-color: transparent;
|
|
23565
|
-
border: 2px solid ${props => props.theme.theme_vars.colours.action};
|
|
23566
|
-
|
|
23567
|
-
&:hover {
|
|
23568
|
-
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
23569
|
-
}
|
|
23570
|
-
&:focus {
|
|
23571
|
-
outline: none;
|
|
23572
|
-
border: 2px solid ${props => props.theme.theme_vars.colours.focus};
|
|
23573
|
-
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
23574
|
-
}
|
|
23575
|
-
}
|
|
23576
|
-
&.button--small {
|
|
23577
|
-
font-size: 12px;
|
|
23578
|
-
padding: 10px 16px;
|
|
23579
|
-
}
|
|
23580
|
-
&.button--medium {
|
|
23581
|
-
font-size: 14px;
|
|
23582
|
-
padding: 11px 20px;
|
|
23583
|
-
}
|
|
23584
|
-
&.button--large {
|
|
23585
|
-
font-size: 16px;
|
|
23586
|
-
padding: 12px 24px;
|
|
23587
|
-
}
|
|
23588
|
-
`;
|
|
23589
|
-
|
|
23590
|
-
/**
|
|
23591
|
-
* Primary UI component for user interaction
|
|
23592
|
-
*/
|
|
23593
|
-
var FormButton = function (_a) {
|
|
23594
|
-
var _b = _a.primary, primary = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, text = _a.text; _a.type; _a.isDisabled; var props = __rest(_a, ["primary", "size", "text", "type", "isDisabled"]);
|
|
23595
|
-
var mode = primary ? 'button--primary' : 'button--secondary';
|
|
23596
|
-
return (React.createElement(StyledButton, __assign$2({ className: ["button--".concat(size), mode].join(' ') }, props), text));
|
|
23597
|
-
};
|
|
23598
|
-
|
|
23599
23800
|
var dayjs_min = {exports: {}};
|
|
23600
23801
|
|
|
23601
23802
|
(function (module, exports) {
|
|
@@ -23707,18 +23908,18 @@ var CookieBanner = function (_a) {
|
|
|
23707
23908
|
hideCookiesAcceptedConfirmationBanner();
|
|
23708
23909
|
};
|
|
23709
23910
|
return (React.createElement(React.Fragment, null,
|
|
23710
|
-
showCookieBanner && (React.createElement(Container$
|
|
23911
|
+
showCookieBanner && (React.createElement(Container$z, { "data-testid": "CookieBanner" },
|
|
23711
23912
|
React.createElement(CookieMessage, null,
|
|
23712
23913
|
React.createElement(CookieHeading, null, title),
|
|
23713
23914
|
React.createElement(CookieParagraph, null, paragraph),
|
|
23714
23915
|
React.createElement(ButtonsContainer, null,
|
|
23715
23916
|
React.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: true, onClick: acceptCookies }),
|
|
23716
23917
|
React.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: true, onClick: rejectCookies }))))),
|
|
23717
|
-
showCookiesRejectedBanner && (React.createElement(Container$
|
|
23918
|
+
showCookiesRejectedBanner && (React.createElement(Container$z, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
23718
23919
|
React.createElement(CookieMessage, { isInline: true },
|
|
23719
23920
|
React.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
23720
23921
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
23721
|
-
showCookiesAcceptedBanner && (React.createElement(Container$
|
|
23922
|
+
showCookiesAcceptedBanner && (React.createElement(Container$z, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
23722
23923
|
React.createElement(CookieMessage, { isInline: true },
|
|
23723
23924
|
React.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
23724
23925
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -23764,7 +23965,7 @@ var DisplayDate = function (_a) {
|
|
|
23764
23965
|
postText));
|
|
23765
23966
|
};
|
|
23766
23967
|
|
|
23767
|
-
const Container$
|
|
23968
|
+
const Container$y = styled.footer`
|
|
23768
23969
|
background-color: ${(props) => props.theme.theme_vars.colours.black};
|
|
23769
23970
|
padding: 25px 0;
|
|
23770
23971
|
`;
|
|
@@ -23939,7 +24140,7 @@ var ServiceIcon = function (_a) {
|
|
|
23939
24140
|
var Footer = function (_a) {
|
|
23940
24141
|
var _b = _a.footerLinksArray, footerLinksArray = _b === void 0 ? null : _b, _c = _a.year, year = _c === void 0 ? new Date().getFullYear() : _c;
|
|
23941
24142
|
var themeContext = useContext(ThemeContext);
|
|
23942
|
-
return (React.createElement(Container$
|
|
24143
|
+
return (React.createElement(Container$y, { "data-testid": "Footer" },
|
|
23943
24144
|
React.createElement(StyledMaxWidthContainer$3, { noBackground: true },
|
|
23944
24145
|
React.createElement(FooterAlignment, null,
|
|
23945
24146
|
React.createElement("div", null,
|
|
@@ -23972,7 +24173,7 @@ var Footer = function (_a) {
|
|
|
23972
24173
|
: '' }, themeContext.cardinal_name === 'north' ? (React.createElement(NorthWhiteLogo, null)) : themeContext.cardinal_name === 'west' ? (React.createElement(WestWhiteLogo, null)) : (React.createElement(GDSLogo, null)))))));
|
|
23973
24174
|
};
|
|
23974
24175
|
|
|
23975
|
-
const Container$
|
|
24176
|
+
const Container$x = styled.div`
|
|
23976
24177
|
background: ${(props) => (props.hasBackground ? props.theme.theme_vars.colours.grey_light : 'transparent')};
|
|
23977
24178
|
padding: ${(props) => (props.hasPadding ? '50px 0 20px' : '0')};
|
|
23978
24179
|
`;
|
|
@@ -23982,7 +24183,7 @@ const Container$y = styled.div`
|
|
|
23982
24183
|
*/
|
|
23983
24184
|
var FullWidthContainer = function (_a) {
|
|
23984
24185
|
var children = _a.children, _b = _a.hasBackground, hasBackground = _b === void 0 ? false : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? false : _c;
|
|
23985
|
-
return (React.createElement(Container$
|
|
24186
|
+
return (React.createElement(Container$x, { hasBackground: hasBackground, hasPadding: hasPadding, "data-testid": "FullWidthContainer" }, children));
|
|
23986
24187
|
};
|
|
23987
24188
|
|
|
23988
24189
|
/**
|
|
@@ -24014,7 +24215,7 @@ const headerThemeStyles = (props) => {
|
|
|
24014
24215
|
}
|
|
24015
24216
|
};
|
|
24016
24217
|
|
|
24017
|
-
const Container$
|
|
24218
|
+
const Container$w = styled.header`
|
|
24018
24219
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24019
24220
|
padding: 3px 0;
|
|
24020
24221
|
${headerThemeStyles}
|
|
@@ -24179,7 +24380,7 @@ var NorthColouredLogo = function () {
|
|
|
24179
24380
|
React.createElement("path", { fill: "#fff", d: "M0 0H974V327H0z" })))));
|
|
24180
24381
|
};
|
|
24181
24382
|
|
|
24182
|
-
const Container$
|
|
24383
|
+
const Container$v = styled.div`
|
|
24183
24384
|
${props => props.theme.fontStyles}
|
|
24184
24385
|
width: calc(100% - ${ props => props.isLarge ? "5rem" : "3rem"});
|
|
24185
24386
|
`;
|
|
@@ -24325,7 +24526,7 @@ var Searchbar = function (_a) {
|
|
|
24325
24526
|
/**
|
|
24326
24527
|
* Render the component
|
|
24327
24528
|
*/
|
|
24328
|
-
return (React.createElement(Container$
|
|
24529
|
+
return (React.createElement(Container$v, { "data-testid": "Searchbar", isLarge: isLarge },
|
|
24329
24530
|
React.createElement("form", { onSubmit: handleSubmit },
|
|
24330
24531
|
React.createElement("div", { role: "search" },
|
|
24331
24532
|
React.createElement(InputWrapper, null,
|
|
@@ -24380,7 +24581,7 @@ var Header = function (_a) {
|
|
|
24380
24581
|
}
|
|
24381
24582
|
};
|
|
24382
24583
|
return (React.createElement(React.Fragment, null,
|
|
24383
|
-
React.createElement(Container$
|
|
24584
|
+
React.createElement(Container$w, __assign$2({}, props, { "data-testid": "Header" }),
|
|
24384
24585
|
React.createElement(StyledMaxWidthContainer$2, { noBackground: true },
|
|
24385
24586
|
React.createElement(LogoWrapper, null,
|
|
24386
24587
|
React.createElement(HomeLink, { href: homeLink, title: "Home", id: "logo" }, themeLogos(themeContext.cardinal_name, themeContext.is_memorial))),
|
|
@@ -24400,7 +24601,7 @@ var Header = function (_a) {
|
|
|
24400
24601
|
* Hero image container with optional dark gradient for non-box mode
|
|
24401
24602
|
* Optimised for an image in 16:5 ratio on all but small width screens
|
|
24402
24603
|
*/
|
|
24403
|
-
const Container$
|
|
24604
|
+
const Container$u = styled.div`
|
|
24404
24605
|
background-image: ${(props) =>
|
|
24405
24606
|
!props.backgroundBox ? `linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)),` : ``}
|
|
24406
24607
|
url('${(props) => props.image}');
|
|
@@ -24564,7 +24765,7 @@ var HeroImage = function (_a) {
|
|
|
24564
24765
|
return (React.createElement(React.Fragment, null,
|
|
24565
24766
|
React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
|
|
24566
24767
|
partialVisibility: true,
|
|
24567
|
-
} }, function (src) { return (React.createElement(Container$
|
|
24768
|
+
} }, function (src) { return (React.createElement(Container$u, { image: src, backgroundBox: backgroundBox, "data-testid": "HeroImage" },
|
|
24568
24769
|
React.createElement(InnerContainer, null,
|
|
24569
24770
|
React.createElement(Overlay, { backgroundBox: backgroundBox, "data-testid": "HeroImageOverlay" },
|
|
24570
24771
|
breadcrumb && (React.createElement(BreadcrumbLink, { href: breadcrumb.url, backgroundBox: backgroundBox }, breadcrumb.title)),
|
|
@@ -24587,7 +24788,7 @@ const Wrapper$3 = styled.header`
|
|
|
24587
24788
|
: props.theme.theme_vars.colours.white};
|
|
24588
24789
|
`;
|
|
24589
24790
|
|
|
24590
|
-
const Container$
|
|
24791
|
+
const Container$t = styled.div`
|
|
24591
24792
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24592
24793
|
overflow: hidden;
|
|
24593
24794
|
background: ${(props) => props.theme.theme_vars.colours.action}5A;
|
|
@@ -24731,7 +24932,7 @@ var HomeHero = function (_a) {
|
|
|
24731
24932
|
React.createElement(Wrapper$3, null,
|
|
24732
24933
|
React.createElement(LazyImage, { src: random !== 999 && imagesArray[random].image1440x810 ? imagesArray[random].image1440x810 : '', placeholder: random !== 999 && imagesArray[random].image144x81 ? imagesArray[random].image144x81 : '', visibilitySensorProps: {
|
|
24733
24934
|
partialVisibility: true,
|
|
24734
|
-
} }, function (src) { return (React.createElement(Container$
|
|
24935
|
+
} }, function (src) { return (React.createElement(Container$t, { className: random !== 999 ? 'loaded' : 'loading', image: src, title: random !== 999 && imagesArray[random].imageAltText ? imagesArray[random].imageAltText : '' },
|
|
24735
24936
|
React.createElement(StyledMaxWidthContainer$1, null,
|
|
24736
24937
|
React.createElement(MainBox, null,
|
|
24737
24938
|
topline && React.createElement(Topline, null, topline),
|
|
@@ -24755,7 +24956,7 @@ const Wrapper$2 = styled.section`
|
|
|
24755
24956
|
padding-bottom: 0px;
|
|
24756
24957
|
`;
|
|
24757
24958
|
|
|
24758
|
-
const Container$
|
|
24959
|
+
const Container$s = styled.div`
|
|
24759
24960
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24760
24961
|
display: flex;
|
|
24761
24962
|
flex-wrap: wrap;
|
|
@@ -24895,7 +25096,7 @@ var MemorialHero = function (_a) {
|
|
|
24895
25096
|
React.createElement(HiddenH1, null,
|
|
24896
25097
|
themeContext.full_name,
|
|
24897
25098
|
" Council"),
|
|
24898
|
-
React.createElement(Container$
|
|
25099
|
+
React.createElement(Container$s, null,
|
|
24899
25100
|
React.createElement(Left, null,
|
|
24900
25101
|
children,
|
|
24901
25102
|
React.createElement(ThemeProvider, { theme: theme }, councilServices)),
|
|
@@ -24925,7 +25126,7 @@ var NewsArticleDate = function (_a) {
|
|
|
24925
25126
|
const imageHeightMobile = 150;
|
|
24926
25127
|
const imageHeightDesktop = 200;
|
|
24927
25128
|
|
|
24928
|
-
const Container$
|
|
25129
|
+
const Container$r = styled.div`
|
|
24929
25130
|
${(props) => props.theme.fontStyles};
|
|
24930
25131
|
padding: 15px 0;
|
|
24931
25132
|
|
|
@@ -25064,7 +25265,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
25064
25265
|
if (articles && articles.length > 0) {
|
|
25065
25266
|
return (React.createElement(React.Fragment, null,
|
|
25066
25267
|
!withoutTitle && React.createElement(Heading, { text: "News articles and press releases" }),
|
|
25067
|
-
React.createElement(Container$
|
|
25268
|
+
React.createElement(Container$r, null,
|
|
25068
25269
|
React.createElement(Row$1, { isList: true }, articles.map(function (article) { return (React.createElement(Column, { isList: true, small: "full", medium: "one-half", large: "one-third", key: article.id },
|
|
25069
25270
|
React.createElement(ArticleContainer$1, { href: article.url },
|
|
25070
25271
|
React.createElement(Row$1, null,
|
|
@@ -25085,7 +25286,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
25085
25286
|
}
|
|
25086
25287
|
};
|
|
25087
25288
|
|
|
25088
|
-
const Container$
|
|
25289
|
+
const Container$q = styled.div`
|
|
25089
25290
|
/* margin-top: 50px; */
|
|
25090
25291
|
/* border: 1px solid red; */
|
|
25091
25292
|
|
|
@@ -25187,7 +25388,7 @@ const FilterHeading = styled.h2`
|
|
|
25187
25388
|
// display: block;
|
|
25188
25389
|
// overflow: hidden;
|
|
25189
25390
|
|
|
25190
|
-
const Container$
|
|
25391
|
+
const Container$p = styled.a`
|
|
25191
25392
|
${props => props.theme.linkStyles}
|
|
25192
25393
|
color: ${props => props.theme.theme_vars.colours.negative} !important;
|
|
25193
25394
|
font-weight: normal;
|
|
@@ -25216,7 +25417,7 @@ var RemoveAllFilters = function (_a) {
|
|
|
25216
25417
|
e.preventDefault();
|
|
25217
25418
|
removeParams(__spreadArray(__spreadArray([], NewsArticleFilterFields.removeFiltersList, true), ['page'], false));
|
|
25218
25419
|
};
|
|
25219
|
-
return (React.createElement(Container$
|
|
25420
|
+
return (React.createElement(Container$p, { "data-testid": "RemoveAllFilters", href: "#", onClick: removeAllFilters },
|
|
25220
25421
|
"Clear ",
|
|
25221
25422
|
searchValue.length > 0 && 'search term and ',
|
|
25222
25423
|
"filters",
|
|
@@ -25263,7 +25464,7 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
25263
25464
|
section.isExpanded = false;
|
|
25264
25465
|
}
|
|
25265
25466
|
});
|
|
25266
|
-
return (React.createElement(Container$
|
|
25467
|
+
return (React.createElement(Container$q, { "data-testid": "NewsArticleFilterAccordion" },
|
|
25267
25468
|
React.createElement(ShowFiltersButton, { onClick: showFullscreenFilters, "aria-expanded": !!isFullScreen, "aria-controls": "PageFilters" },
|
|
25268
25469
|
"Show Search and filters",
|
|
25269
25470
|
count > 0 && " (".concat(count, ")")),
|
|
@@ -25330,7 +25531,7 @@ var NewsArticleImage = function (_a) {
|
|
|
25330
25531
|
})));
|
|
25331
25532
|
};
|
|
25332
25533
|
|
|
25333
|
-
const Container$
|
|
25534
|
+
const Container$o = styled.div`
|
|
25334
25535
|
${(props) => props.theme.fontStyles};
|
|
25335
25536
|
`;
|
|
25336
25537
|
|
|
@@ -25451,7 +25652,7 @@ var NewsArticleList = function (_a) {
|
|
|
25451
25652
|
var results = _a.results;
|
|
25452
25653
|
var extractLength = 140;
|
|
25453
25654
|
if (results && results.length > 0) {
|
|
25454
|
-
return (React.createElement(Container$
|
|
25655
|
+
return (React.createElement(Container$o, { "data-testid": "NewsArticleList" },
|
|
25455
25656
|
React.createElement(Row$1, { isList: true }, results.map(function (article) { return (React.createElement(Column, { isList: true, small: "full", medium: "full", large: "full", key: article.id },
|
|
25456
25657
|
React.createElement(ArticleContainer, { href: article.url, title: article.title },
|
|
25457
25658
|
article.image720x405 && (React.createElement(LazyImage, { src: article.image720x405, placeholder: article.image72x41, visibilitySensorProps: {
|
|
@@ -25466,12 +25667,12 @@ var NewsArticleList = function (_a) {
|
|
|
25466
25667
|
React.createElement(NewsArticleDate, { text: article.date.toString(), format: "X" })))))); }))));
|
|
25467
25668
|
}
|
|
25468
25669
|
else {
|
|
25469
|
-
return (React.createElement(Container$
|
|
25670
|
+
return (React.createElement(Container$o, { "data-testid": "NewsArticleList" },
|
|
25470
25671
|
React.createElement(ResultInfo$3, null, "No results found")));
|
|
25471
25672
|
}
|
|
25472
25673
|
};
|
|
25473
25674
|
|
|
25474
|
-
const Container$
|
|
25675
|
+
const Container$n = styled.div`
|
|
25475
25676
|
${props => props.theme.fontStyles};
|
|
25476
25677
|
padding-bottom: 20px;
|
|
25477
25678
|
border-bottom: 1px solid ${props => props.theme.theme_vars.colours.grey};
|
|
@@ -25545,7 +25746,7 @@ const Preposition = styled.div`
|
|
|
25545
25746
|
font-size: 80%;
|
|
25546
25747
|
`;
|
|
25547
25748
|
|
|
25548
|
-
const Container$
|
|
25749
|
+
const Container$m = styled.span`
|
|
25549
25750
|
margin: 0 5px;
|
|
25550
25751
|
display: inline-block;
|
|
25551
25752
|
position: relative;
|
|
@@ -25606,7 +25807,7 @@ var RemovableTag = function (_a) {
|
|
|
25606
25807
|
var index = _a.index, preposition = _a.preposition, label = _a.label; _a.value; _a.param; var clickHandler = _a.clickHandler;
|
|
25607
25808
|
return (React.createElement(Wrapper$1, { "data-testid": "RemovableTag" },
|
|
25608
25809
|
index > 0 && preposition && React.createElement(Preposition, null, preposition),
|
|
25609
|
-
React.createElement(Container$
|
|
25810
|
+
React.createElement(Container$m, null,
|
|
25610
25811
|
React.createElement(Text, null, label),
|
|
25611
25812
|
React.createElement(Button$2, { "aria-label": "Remove filter ".concat(label), onClick: clickHandler }, "x"))));
|
|
25612
25813
|
};
|
|
@@ -25626,7 +25827,7 @@ var NewsArticleListHeader = function (_a) {
|
|
|
25626
25827
|
var removeFilterValue = function (param, value) {
|
|
25627
25828
|
removeValueFromParam(param, value);
|
|
25628
25829
|
};
|
|
25629
|
-
return (React.createElement(Container$
|
|
25830
|
+
return (React.createElement(Container$n, { "data-testid": "NewsArticleListHeader" },
|
|
25630
25831
|
React.createElement(LeftCol, null,
|
|
25631
25832
|
totalResults,
|
|
25632
25833
|
" article",
|
|
@@ -25680,7 +25881,7 @@ var NewsArticleOldBanner = function (_a) {
|
|
|
25680
25881
|
React.createElement("strong", null, "1 year old")));
|
|
25681
25882
|
};
|
|
25682
25883
|
|
|
25683
|
-
const Container$
|
|
25884
|
+
const Container$l = styled.main`
|
|
25684
25885
|
padding-top: 30px;
|
|
25685
25886
|
|
|
25686
25887
|
a {
|
|
@@ -25793,10 +25994,10 @@ const Container$m = styled.main`
|
|
|
25793
25994
|
*/
|
|
25794
25995
|
var PageMain = function (_a) {
|
|
25795
25996
|
var children = _a.children, classes = _a.classes, _b = _a.fullWidthText, fullWidthText = _b === void 0 ? false : _b, props = __rest(_a, ["children", "classes", "fullWidthText"]);
|
|
25796
|
-
return (React.createElement(Container$
|
|
25997
|
+
return (React.createElement(Container$l, __assign$2({ id: "main", className: classes, fullWidthText: fullWidthText }, props, { "data-testid": "PageMain" }), children));
|
|
25797
25998
|
};
|
|
25798
25999
|
|
|
25799
|
-
const Container$
|
|
26000
|
+
const Container$k = styled.aside`
|
|
25800
26001
|
padding-top: 30px;
|
|
25801
26002
|
`;
|
|
25802
26003
|
|
|
@@ -25805,10 +26006,10 @@ const Container$l = styled.aside`
|
|
|
25805
26006
|
*/
|
|
25806
26007
|
var PageSidebar = function (_a) {
|
|
25807
26008
|
var children = _a.children;
|
|
25808
|
-
return (React.createElement(Container$
|
|
26009
|
+
return (React.createElement(Container$k, { className: "sidebar" }, children));
|
|
25809
26010
|
};
|
|
25810
26011
|
|
|
25811
|
-
const Container$
|
|
26012
|
+
const Container$j = styled.div`
|
|
25812
26013
|
padding-top: 30px;
|
|
25813
26014
|
|
|
25814
26015
|
h1 {
|
|
@@ -25821,10 +26022,10 @@ const Container$k = styled.div`
|
|
|
25821
26022
|
*/
|
|
25822
26023
|
var PageTitle = function (_a) {
|
|
25823
26024
|
var children = _a.children, classes = _a.classes, props = __rest(_a, ["children", "classes"]);
|
|
25824
|
-
return (React.createElement(Container$
|
|
26025
|
+
return (React.createElement(Container$j, __assign$2({ "data-testid": "title", className: classes }, props), children));
|
|
25825
26026
|
};
|
|
25826
26027
|
|
|
25827
|
-
const Container$
|
|
26028
|
+
const Container$i = styled.div`
|
|
25828
26029
|
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
25829
26030
|
display: flex;
|
|
25830
26031
|
flex-wrap: wrap;
|
|
@@ -25866,7 +26067,7 @@ const Container$j = styled.div`
|
|
|
25866
26067
|
*/
|
|
25867
26068
|
var PageWithSidebarContainer = function (_a) {
|
|
25868
26069
|
var _b = _a.sidebarLeft, sidebarLeft = _b === void 0 ? false : _b, children = _a.children;
|
|
25869
|
-
return (React.createElement(Container$
|
|
26070
|
+
return (React.createElement(Container$i, { sidebarLeft: sidebarLeft }, children));
|
|
25870
26071
|
};
|
|
25871
26072
|
|
|
25872
26073
|
const backgroundDecider = props => {
|
|
@@ -25885,14 +26086,14 @@ const backgroundDecider = props => {
|
|
|
25885
26086
|
};
|
|
25886
26087
|
|
|
25887
26088
|
|
|
25888
|
-
const Container$
|
|
26089
|
+
const Container$h = styled.div`
|
|
25889
26090
|
${backgroundDecider};
|
|
25890
26091
|
padding-top: 1.5em;
|
|
25891
26092
|
`;
|
|
25892
26093
|
|
|
25893
26094
|
var PageWrapper = function (_a) {
|
|
25894
26095
|
var colour = _a.colour, children = _a.children;
|
|
25895
|
-
return (React.createElement(Container$
|
|
26096
|
+
return (React.createElement(Container$h, { "data-testid": "PageWrapper", colour: colour }, children));
|
|
25896
26097
|
};
|
|
25897
26098
|
|
|
25898
26099
|
const Wrapper = styled.div`
|
|
@@ -25958,7 +26159,7 @@ var PhaseBanner = function (_a) {
|
|
|
25958
26159
|
React.createElement(PhaseText, null, "This site is new and we are improving it every day."))));
|
|
25959
26160
|
};
|
|
25960
26161
|
|
|
25961
|
-
const Container$
|
|
26162
|
+
const Container$g = styled.div`
|
|
25962
26163
|
${(props) => props.theme.fontStyles};
|
|
25963
26164
|
`;
|
|
25964
26165
|
|
|
@@ -26115,11 +26316,11 @@ var SearchResultsList = function (_a) {
|
|
|
26115
26316
|
var searchTerm = _a.searchTerm, results = _a.results, _b = _a.totalResults, totalResults = _b === void 0 ? 0 : _b, _c = _a.pageNumber, pageNumber = _c === void 0 ? 0 : _c;
|
|
26116
26317
|
var themeContext = useContext(ThemeContext);
|
|
26117
26318
|
if (totalResults === 0) {
|
|
26118
|
-
return (React.createElement(Container$
|
|
26319
|
+
return (React.createElement(Container$g, { "data-testid": "SearchResultsList" },
|
|
26119
26320
|
React.createElement(ResultInfo$2, null, "No results found")));
|
|
26120
26321
|
}
|
|
26121
26322
|
else {
|
|
26122
|
-
return (React.createElement(Container$
|
|
26323
|
+
return (React.createElement(Container$g, { "data-testid": "SearchResultsList" },
|
|
26123
26324
|
React.createElement(ResultInfo$2, null,
|
|
26124
26325
|
pageNumber > 1 && 'Page ' + pageNumber + ' of ',
|
|
26125
26326
|
totalResults,
|
|
@@ -26136,7 +26337,7 @@ var SearchResultsList = function (_a) {
|
|
|
26136
26337
|
}
|
|
26137
26338
|
};
|
|
26138
26339
|
|
|
26139
|
-
const Container$
|
|
26340
|
+
const Container$f = styled.div``;
|
|
26140
26341
|
|
|
26141
26342
|
const SectionTitle$1 = styled(Heading)`
|
|
26142
26343
|
background: ${(props) =>
|
|
@@ -26228,7 +26429,7 @@ styled.img`
|
|
|
26228
26429
|
*/
|
|
26229
26430
|
var SectionLinks = function (_a) {
|
|
26230
26431
|
var sectionTitle = _a.sectionTitle, _b = _a.displayTitle, displayTitle = _b === void 0 ? true : _b, sectionSlug = _a.sectionSlug, pageLinksArray = _a.pageLinksArray, _c = _a.hasImages, hasImages = _c === void 0 ? false : _c;
|
|
26231
|
-
return (React.createElement(Container$
|
|
26432
|
+
return (React.createElement(Container$f, { id: sectionSlug, "data-testid": "SectionLinks" },
|
|
26232
26433
|
displayTitle ? React.createElement(SectionTitle$1, { text: sectionTitle }) : React.createElement("br", null),
|
|
26233
26434
|
React.createElement(Row$1, { isList: true }, pageLinksArray.map(function (link, i) {
|
|
26234
26435
|
var _a;
|
|
@@ -26242,7 +26443,7 @@ var SectionLinks = function (_a) {
|
|
|
26242
26443
|
}))));
|
|
26243
26444
|
};
|
|
26244
26445
|
|
|
26245
|
-
const Container$
|
|
26446
|
+
const Container$e = styled.aside`
|
|
26246
26447
|
padding-top: 20px;
|
|
26247
26448
|
display: block;
|
|
26248
26449
|
|
|
@@ -26326,7 +26527,7 @@ const InlineLink = styled.a`
|
|
|
26326
26527
|
|
|
26327
26528
|
var SectionLinksMobileContents = function (_a) {
|
|
26328
26529
|
var sectionLinksArray = _a.sectionLinksArray;
|
|
26329
|
-
return (React.createElement(Container$
|
|
26530
|
+
return (React.createElement(Container$e, null,
|
|
26330
26531
|
React.createElement(Contents, null,
|
|
26331
26532
|
React.createElement(ContentsTitle, null, "Contents"),
|
|
26332
26533
|
React.createElement(ContentsList, null, sectionLinksArray.map(function (link) {
|
|
@@ -26335,7 +26536,7 @@ var SectionLinksMobileContents = function (_a) {
|
|
|
26335
26536
|
})))));
|
|
26336
26537
|
};
|
|
26337
26538
|
|
|
26338
|
-
const Container$
|
|
26539
|
+
const Container$d = styled.div`
|
|
26339
26540
|
${(props) => props.theme.fontStyles}
|
|
26340
26541
|
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
26341
26542
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -26486,7 +26687,7 @@ const ListItemLink = styled.a`
|
|
|
26486
26687
|
var SectionLinksSidebar = function (_a) {
|
|
26487
26688
|
var Title = _a.Title, Sections = _a.Sections;
|
|
26488
26689
|
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
|
26489
|
-
return (React.createElement(Container$
|
|
26690
|
+
return (React.createElement(Container$d, { "data-testid": "SectionLinksSidebar" },
|
|
26490
26691
|
React.createElement(MobileTitleButton, { onClick: function () { return (open ? setOpen(false) : setOpen(true)); } },
|
|
26491
26692
|
Title,
|
|
26492
26693
|
React.createElement(IconWrapper$2, null,
|
|
@@ -26498,7 +26699,7 @@ var SectionLinksSidebar = function (_a) {
|
|
|
26498
26699
|
React.createElement(ListItemLink, { href: link.url }, link.title))); })))); }))));
|
|
26499
26700
|
};
|
|
26500
26701
|
|
|
26501
|
-
const Container$
|
|
26702
|
+
const Container$c = styled.div`
|
|
26502
26703
|
position: relative;
|
|
26503
26704
|
`;
|
|
26504
26705
|
|
|
@@ -26650,7 +26851,7 @@ var ServiceLinksBoxed = function (_a) {
|
|
|
26650
26851
|
var _a;
|
|
26651
26852
|
return (_a = refs.current[index]) !== null && _a !== void 0 ? _a : React.createRef();
|
|
26652
26853
|
});
|
|
26653
|
-
return (React.createElement(Container$
|
|
26854
|
+
return (React.createElement(Container$c, { "data-testid": "ServiceLinksBoxed" },
|
|
26654
26855
|
React.createElement(Row$1, null, serviceLinksArray.map(function (serviceLink, index) {
|
|
26655
26856
|
var _a;
|
|
26656
26857
|
return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
@@ -26687,7 +26888,7 @@ const containerMaxHeight = (props) => {
|
|
|
26687
26888
|
}
|
|
26688
26889
|
};
|
|
26689
26890
|
|
|
26690
|
-
const Container$
|
|
26891
|
+
const Container$b = styled.div`
|
|
26691
26892
|
${(props) => props.theme.fontStyles}
|
|
26692
26893
|
${containerMaxHeight}
|
|
26693
26894
|
|
|
@@ -27102,7 +27303,7 @@ var ServicesLinksList = function (_a) {
|
|
|
27102
27303
|
}
|
|
27103
27304
|
}, [currentOrder]);
|
|
27104
27305
|
return (React.createElement(React.Fragment, null,
|
|
27105
|
-
React.createElement(Container$
|
|
27306
|
+
React.createElement(Container$b, { id: serviceId, className: open && 'open', hideHeader: hideHeader, isBoxed: isBoxed },
|
|
27106
27307
|
!hideHeader && (React.createElement(HomeTitle, { "data-testid": "servicesLinksListHeader" },
|
|
27107
27308
|
React.createElement(Heading, { text: "Council services" }),
|
|
27108
27309
|
React.createElement(ReorderControl, null,
|
|
@@ -27131,7 +27332,7 @@ var ServicesLinksList = function (_a) {
|
|
|
27131
27332
|
" services")))));
|
|
27132
27333
|
};
|
|
27133
27334
|
|
|
27134
|
-
const Container$
|
|
27335
|
+
const Container$a = styled.div`
|
|
27135
27336
|
${props => props.theme.fontStyles}
|
|
27136
27337
|
max-width: 500px;
|
|
27137
27338
|
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
@@ -27178,7 +27379,7 @@ const SingleButtonContainer = styled.div`
|
|
|
27178
27379
|
}
|
|
27179
27380
|
`;
|
|
27180
27381
|
|
|
27181
|
-
const Container$
|
|
27382
|
+
const Container$9 = styled.div`
|
|
27182
27383
|
strong {
|
|
27183
27384
|
font-weight: bold;
|
|
27184
27385
|
}
|
|
@@ -27254,7 +27455,7 @@ const PostcodeResult = styled.div`
|
|
|
27254
27455
|
max-width: calc(100% - 30px);
|
|
27255
27456
|
}
|
|
27256
27457
|
`;
|
|
27257
|
-
const Line
|
|
27458
|
+
const Line = styled.div`
|
|
27258
27459
|
background: ${(props) => props.theme.theme_vars.colours.grey_dark};
|
|
27259
27460
|
width: 5px;
|
|
27260
27461
|
border-radius: 2px;
|
|
@@ -27319,50 +27520,6 @@ var HintText = function (_a) {
|
|
|
27319
27520
|
return (React.createElement(HintText$1, null, text));
|
|
27320
27521
|
};
|
|
27321
27522
|
|
|
27322
|
-
const Container$9 = styled.div`
|
|
27323
|
-
display: flex;
|
|
27324
|
-
-webkit-flex-direction: row;
|
|
27325
|
-
-moz-flex-direction: row;
|
|
27326
|
-
-ms-flex-direction: row;
|
|
27327
|
-
flex-direction: row;
|
|
27328
|
-
align-items: flex-start;
|
|
27329
|
-
width: 100%;
|
|
27330
|
-
`;
|
|
27331
|
-
const Form = styled.form`
|
|
27332
|
-
padding-top: 10px;
|
|
27333
|
-
padding-bottom: 12px;
|
|
27334
|
-
padding-left: ${(props) => (props.hideLine ? '0' : '15px')};
|
|
27335
|
-
max-width: 100%;
|
|
27336
|
-
width: 100%;
|
|
27337
|
-
`;
|
|
27338
|
-
const Line = styled.div`
|
|
27339
|
-
background: ${(props) => (props.isError ? props.theme.theme_vars.colours.negative : props.lineColour)};
|
|
27340
|
-
display: ${(props) => (props.hideLine ? 'none' : 'block')};
|
|
27341
|
-
width: 5px;
|
|
27342
|
-
border-radius: 2px;
|
|
27343
|
-
`;
|
|
27344
|
-
|
|
27345
|
-
const ErrorSummary = styled.div`
|
|
27346
|
-
color: ${(props) => props.theme.theme_vars.colours.negative};
|
|
27347
|
-
font-weight: bold;
|
|
27348
|
-
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
27349
|
-
border: 3px solid ${(props) => props.theme.theme_vars.colours.negative};
|
|
27350
|
-
margin-bottom: 15px;
|
|
27351
|
-
padding: 15px;
|
|
27352
|
-
`;
|
|
27353
|
-
|
|
27354
|
-
/**
|
|
27355
|
-
* Form element - a container with a line on the left
|
|
27356
|
-
*/
|
|
27357
|
-
var FormWithLine = function (_a) {
|
|
27358
|
-
var _b = _a.lineColour, lineColour = _b === void 0 ? '#C6C6C6' : _b, _c = _a.hideLine, hideLine = _c === void 0 ? false : _c, formRole = _a.formRole, formMethod = _a.formMethod, formURL = _a.formURL, _d = _a.isError, isError = _d === void 0 ? false : _d, errorSummary = _a.errorSummary, onSubmit = _a.onSubmit, children = _a.children;
|
|
27359
|
-
return (React.createElement(Container$9, null,
|
|
27360
|
-
React.createElement(Line, { lineColour: lineColour, hideLine: hideLine, isError: isError }),
|
|
27361
|
-
React.createElement(Form, { onSubmit: onSubmit, hideLine: hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
27362
|
-
errorSummary && React.createElement(ErrorSummary, null, errorSummary),
|
|
27363
|
-
children)));
|
|
27364
|
-
};
|
|
27365
|
-
|
|
27366
27523
|
const Spinner = styled.div`
|
|
27367
27524
|
display: inline-block;
|
|
27368
27525
|
width: 80px;
|
|
@@ -27512,7 +27669,7 @@ var PostCodeSearch = function (_a) {
|
|
|
27512
27669
|
setCurrentPostcode(currentPostcode + ' (' + singleAddress.title + ')');
|
|
27513
27670
|
}
|
|
27514
27671
|
}
|
|
27515
|
-
return (React.createElement(Container$
|
|
27672
|
+
return (React.createElement(Container$9, { "data-testid": "PostCodeSearch" },
|
|
27516
27673
|
React.createElement(DropDownButton, { onClick: function () { return setOpen(open ? false : true); } },
|
|
27517
27674
|
React.createElement(IconWrapper, null,
|
|
27518
27675
|
React.createElement(ChevronIcon, { direction: open ? 'down' : 'right', colourFill: themeContext.theme_vars.colours.black })),
|
|
@@ -27527,9 +27684,9 @@ var PostCodeSearch = function (_a) {
|
|
|
27527
27684
|
React.createElement(Label$2, { htmlFor: "postcode" },
|
|
27528
27685
|
"Enter your postcode",
|
|
27529
27686
|
React.createElement(HintText, { text: themeContext.cardinal_name === 'north' ? 'For example NN16 0AP' : 'For example NN1 1DE' }),
|
|
27530
|
-
React.createElement(Input, { type: "text", placeholder: "Enter a postcode", name: "postcode", errorText: errorText, isErrored: isError, maxLength: 10 })),
|
|
27687
|
+
React.createElement(Input$6, { type: "text", placeholder: "Enter a postcode", name: "postcode", errorText: errorText, isErrored: isError, maxLength: 10 })),
|
|
27531
27688
|
React.createElement(FormButton, { type: "submit", "aria-label": "Submit", text: "Find" })))) : (React.createElement(PostcodeResult, null,
|
|
27532
|
-
React.createElement(Line
|
|
27689
|
+
React.createElement(Line, null),
|
|
27533
27690
|
isMultiple ? (React.createElement("div", { className: "result" },
|
|
27534
27691
|
React.createElement("p", null,
|
|
27535
27692
|
"This postcode ",
|
|
@@ -27587,7 +27744,7 @@ var SignpostLinks = function (_a) {
|
|
|
27587
27744
|
var themeContext = useContext(ThemeContext);
|
|
27588
27745
|
var councilLink = otherCouncilLink ? otherCouncilLink : themeContext.theme_vars.other_council_link;
|
|
27589
27746
|
return (React.createElement(React.Fragment, null, signpostLinksArray.length > 1 ?
|
|
27590
|
-
React.createElement(Container$
|
|
27747
|
+
React.createElement(Container$a, null,
|
|
27591
27748
|
React.createElement(Paragraph, null, TopLineText),
|
|
27592
27749
|
React.createElement(SignpostLinksList, { signpostLinksArray: signpostLinksArray }),
|
|
27593
27750
|
React.createElement(PostCodeSearch, { otherCouncilLink: councilLink, signPostLinks: signpostLinksArray }),
|
|
@@ -29843,13 +30000,13 @@ var DirectoryServiceList = function (_a) {
|
|
|
29843
30000
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29844
30001
|
React.createElement(Label$1, { htmlFor: "directorySearch" }, "What are you looking for?"),
|
|
29845
30002
|
React.createElement(HintText, { text: "Enter a search word or phrase" }),
|
|
29846
|
-
React.createElement(Input, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
30003
|
+
React.createElement(Input$6, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
29847
30004
|
setSearchTerm(e.target.value);
|
|
29848
30005
|
} })),
|
|
29849
30006
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29850
30007
|
React.createElement(Label$1, { htmlFor: "postcode" }, "Postcode (optional)"),
|
|
29851
30008
|
React.createElement(HintText, { text: "Enter a postcode" }),
|
|
29852
|
-
React.createElement(Input, { name: "postcode", type: "text", defaultValue: postcodeSearch, id: "postcode", onChange: function (e) { return setPostcodeSearch(e.target.value); } })),
|
|
30009
|
+
React.createElement(Input$6, { name: "postcode", type: "text", defaultValue: postcodeSearch, id: "postcode", onChange: function (e) { return setPostcodeSearch(e.target.value); } })),
|
|
29853
30010
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29854
30011
|
React.createElement(ButtonContainer$1, null,
|
|
29855
30012
|
React.createElement(Button$1, { onClick: submitSearch, type: "submit" },
|
|
@@ -29883,10 +30040,10 @@ var DirectoryServiceList = function (_a) {
|
|
|
29883
30040
|
React.createElement(Row$1, null,
|
|
29884
30041
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
29885
30042
|
React.createElement(Label$1, { htmlFor: "minimum_age" }, "From"),
|
|
29886
|
-
React.createElement(Input, { name: "minimum_age", onChange: function (e) { return handleAgeChange(e, 'minimumAge'); }, value: ageInMonths && typeof minimumAge === 'number' ? minimumAge / 12 : minimumAge, id: "minimum_age", type: "number" })),
|
|
30043
|
+
React.createElement(Input$6, { name: "minimum_age", onChange: function (e) { return handleAgeChange(e, 'minimumAge'); }, value: ageInMonths && typeof minimumAge === 'number' ? minimumAge / 12 : minimumAge, id: "minimum_age", type: "number" })),
|
|
29887
30044
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
29888
30045
|
React.createElement(Label$1, { htmlFor: "maximum_age" }, "To"),
|
|
29889
|
-
React.createElement(Input, { name: "maximum_age", onChange: function (e) { return handleAgeChange(e, 'maximumAge'); }, value: ageInMonths && typeof maximumAge === 'number' ? maximumAge / 12 : maximumAge, id: "maximum_age", type: "number" })))))), categories === null || categories === void 0 ? void 0 :
|
|
30046
|
+
React.createElement(Input$6, { name: "maximum_age", onChange: function (e) { return handleAgeChange(e, 'maximumAge'); }, value: ageInMonths && typeof maximumAge === 'number' ? maximumAge / 12 : maximumAge, id: "maximum_age", type: "number" })))))), categories === null || categories === void 0 ? void 0 :
|
|
29890
30047
|
categories.map(function (category, categoryIndex) { return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: category.label },
|
|
29891
30048
|
React.createElement(Fieldset$1, null,
|
|
29892
30049
|
React.createElement(Legend$1, null,
|
|
@@ -31619,7 +31776,7 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31619
31776
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
31620
31777
|
React.createElement(Label, { htmlFor: "directorySearch" }, "What are you looking for?"),
|
|
31621
31778
|
React.createElement(HintText, { text: "Enter a search word or phrase" }),
|
|
31622
|
-
React.createElement(Input, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
31779
|
+
React.createElement(Input$6, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
31623
31780
|
setSearchTerm(e.target.value);
|
|
31624
31781
|
} })),
|
|
31625
31782
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
@@ -31659,5 +31816,5 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31659
31816
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
31660
31817
|
};
|
|
31661
31818
|
|
|
31662
|
-
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BlockQuote, Breadcrumbs, Button$4 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, 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 };
|
|
31819
|
+
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinCollection, BlockQuote, Breadcrumbs, Button$4 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, 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 };
|
|
31663
31820
|
//# sourceMappingURL=index.esm.js.map
|