@nnc-digital/nnc-design-system 0.4.4 → 0.4.7
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 +594 -426
- package/build/index.esm.js.map +1 -1
- package/build/index.js +595 -426
- package/build/index.js.map +1 -1
- package/build/library/components/BinCollection/BinCollection.styles.d.ts +1 -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,429 @@ 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 ErrorTextWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n width: 100%;\n"], ["\n display: block;\n width: 100%;\n"])));
|
|
4037
|
+
var DropDownSelectContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding-bottom: 20px;\n"], ["\n padding-bottom: 20px;\n"])));
|
|
4038
|
+
var FormInnerContainer = styled.div(templateObject_7 || (templateObject_7 = __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"])));
|
|
4039
|
+
styled.label(templateObject_8 || (templateObject_8 = __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; });
|
|
4040
|
+
var UPRNPageTitleRow = styled.div(templateObject_9 || (templateObject_9 = __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"])));
|
|
4041
|
+
var UPRNPageUPRNRow = styled.div(templateObject_10 || (templateObject_10 = __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"])));
|
|
4042
|
+
var UPRNPageSectionTitle = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: 2em;\n font-weight: 700;\n"], ["\n font-size: 2em;\n font-weight: 700;\n"])));
|
|
4043
|
+
var UPRNPageUPRNTitle = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: 1.5em;\n"], ["\n font-size: 1.5em;\n"])));
|
|
4044
|
+
styled.input(templateObject_13 || (templateObject_13 = __makeTemplateObject([""], [""])));
|
|
4045
|
+
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, templateObject_13;
|
|
4046
|
+
|
|
4047
|
+
const Container$16 = styled.div`
|
|
4048
|
+
display: flex;
|
|
4049
|
+
-webkit-flex-direction: row;
|
|
4050
|
+
-moz-flex-direction: row;
|
|
4051
|
+
-ms-flex-direction: row;
|
|
4052
|
+
flex-direction: row;
|
|
4053
|
+
align-items: flex-start;
|
|
4054
|
+
width: 100%;
|
|
4055
|
+
`;
|
|
4056
|
+
const Form = styled.form`
|
|
4057
|
+
padding-top: 10px;
|
|
4058
|
+
padding-bottom: 12px;
|
|
4059
|
+
padding-left: ${(props) => (props.hideLine ? '0' : '15px')};
|
|
4060
|
+
max-width: 100%;
|
|
4061
|
+
width: 100%;
|
|
4062
|
+
`;
|
|
4063
|
+
const Line$1 = styled.div`
|
|
4064
|
+
background: ${(props) => (props.isError ? props.theme.theme_vars.colours.negative : props.lineColour)};
|
|
4065
|
+
display: ${(props) => (props.hideLine ? 'none' : 'block')};
|
|
4066
|
+
width: 5px;
|
|
4067
|
+
border-radius: 2px;
|
|
4068
|
+
`;
|
|
4069
|
+
|
|
4070
|
+
const ErrorSummary = styled.div`
|
|
4071
|
+
color: ${(props) => props.theme.theme_vars.colours.negative};
|
|
4072
|
+
font-weight: bold;
|
|
4073
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
4074
|
+
border: 3px solid ${(props) => props.theme.theme_vars.colours.negative};
|
|
4075
|
+
margin-bottom: 15px;
|
|
4076
|
+
padding: 15px;
|
|
4077
|
+
`;
|
|
4078
|
+
|
|
4079
|
+
/**
|
|
4080
|
+
* Form element - a container with a line on the left
|
|
4081
|
+
*/
|
|
4082
|
+
var FormWithLine = function (_a) {
|
|
4083
|
+
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;
|
|
4084
|
+
return (React.createElement(Container$16, null,
|
|
4085
|
+
React.createElement(Line$1, { lineColour: lineColour, hideLine: hideLine, isError: isError }),
|
|
4086
|
+
React.createElement(Form, { onSubmit: onSubmit, hideLine: hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
4087
|
+
errorSummary && React.createElement(ErrorSummary, null, errorSummary),
|
|
4088
|
+
children)));
|
|
4089
|
+
};
|
|
4090
|
+
|
|
4091
|
+
/**
|
|
4092
|
+
* Primary UI component for user interaction
|
|
4093
|
+
* If value is set then treat as controlled component
|
|
4094
|
+
*/
|
|
4095
|
+
var Input$6 = function (_a) {
|
|
4096
|
+
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;
|
|
4097
|
+
return (React.createElement(React.Fragment, null,
|
|
4098
|
+
errorText && React.createElement(ErrorText$1, null, errorText),
|
|
4099
|
+
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 }))));
|
|
4100
|
+
};
|
|
4101
|
+
|
|
4102
|
+
const StyledButton = styled.button`
|
|
4103
|
+
font-weight: 700;
|
|
4104
|
+
border: none;
|
|
4105
|
+
cursor: pointer;
|
|
4106
|
+
display: inline-block;
|
|
4107
|
+
line-height: 1;
|
|
4108
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4109
|
+
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
4110
|
+
text-decoration: none;
|
|
4111
|
+
|
|
4112
|
+
&.button--primary {
|
|
4113
|
+
color: white;
|
|
4114
|
+
background-color: ${props => props.theme.theme_vars.colours.action};
|
|
4115
|
+
|
|
4116
|
+
&:hover {
|
|
4117
|
+
background-color: ${props => props.theme.theme_vars.colours.action_dark};
|
|
4118
|
+
}
|
|
4119
|
+
&:focus {
|
|
4120
|
+
outline: none;
|
|
4121
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
4122
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
4123
|
+
box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4124
|
+
-webkit-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4125
|
+
-moz-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4126
|
+
}
|
|
4127
|
+
&:active {
|
|
4128
|
+
transform: translateY(2px);
|
|
4129
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
4130
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
4131
|
+
box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4132
|
+
-webkit-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4133
|
+
-moz-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
&.button--secondary {
|
|
4137
|
+
color: ${props => props.theme.theme_vars.colours.action};
|
|
4138
|
+
background-color: transparent;
|
|
4139
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.action};
|
|
4140
|
+
|
|
4141
|
+
&:hover {
|
|
4142
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
4143
|
+
}
|
|
4144
|
+
&:focus {
|
|
4145
|
+
outline: none;
|
|
4146
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.focus};
|
|
4147
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
4150
|
+
&.button--small {
|
|
4151
|
+
font-size: 12px;
|
|
4152
|
+
padding: 10px 16px;
|
|
4153
|
+
}
|
|
4154
|
+
&.button--medium {
|
|
4155
|
+
font-size: 14px;
|
|
4156
|
+
padding: 11px 20px;
|
|
4157
|
+
}
|
|
4158
|
+
&.button--large {
|
|
4159
|
+
font-size: 16px;
|
|
4160
|
+
padding: 12px 24px;
|
|
4161
|
+
}
|
|
4162
|
+
`;
|
|
4163
|
+
|
|
4164
|
+
/**
|
|
4165
|
+
* Primary UI component for user interaction
|
|
4166
|
+
*/
|
|
4167
|
+
var FormButton = function (_a) {
|
|
4168
|
+
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"]);
|
|
4169
|
+
var mode = primary ? 'button--primary' : 'button--secondary';
|
|
4170
|
+
return (React.createElement(StyledButton, __assign$2({ className: ["button--".concat(size), mode].join(' ') }, props), text));
|
|
4171
|
+
};
|
|
4172
|
+
|
|
4173
|
+
const Container$15 = styled.div`
|
|
4174
|
+
${(props) => props.theme.fontStyles};
|
|
4175
|
+
`;
|
|
4176
|
+
|
|
4177
|
+
const hideLabel$1 = (props) => {
|
|
4178
|
+
if (props.hideLabel === true) {
|
|
4179
|
+
return VisuallyHidden$3;
|
|
4180
|
+
}
|
|
4181
|
+
};
|
|
4182
|
+
|
|
4183
|
+
const Label$4 = styled.label`
|
|
4184
|
+
display: block;
|
|
4185
|
+
margin-bottom: 5px;
|
|
4186
|
+
${hideLabel$1}
|
|
4187
|
+
`;
|
|
4188
|
+
|
|
4189
|
+
const Select = styled.select`
|
|
4190
|
+
${(props) => props.theme.fontStyles};
|
|
4191
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
4192
|
+
box-sizing: border-box;
|
|
4193
|
+
max-width: 100%;
|
|
4194
|
+
height: 40px;
|
|
4195
|
+
height: 2.5rem;
|
|
4196
|
+
padding: 5px;
|
|
4197
|
+
border: 2px solid ${(props) => props.theme.theme_vars.colours.black};
|
|
4198
|
+
|
|
4199
|
+
&:focus {
|
|
4200
|
+
outline: 2px transparent solid;
|
|
4201
|
+
box-shadow: ${(props) => props.theme.theme_vars.colours.focus} 0 0 0 2px,
|
|
4202
|
+
${(props) => props.theme.theme_vars.colours.black} 0 0 0 4px;
|
|
4203
|
+
transition: box-shadow 0.3s ease 0s;
|
|
4204
|
+
}
|
|
4205
|
+
`;
|
|
4206
|
+
|
|
4207
|
+
const Option = styled.option`
|
|
4208
|
+
:active,
|
|
4209
|
+
:checked,
|
|
4210
|
+
:focus::-ms-value {
|
|
4211
|
+
color: #fff;
|
|
4212
|
+
background-color: #1d70b8;
|
|
4213
|
+
}
|
|
4214
|
+
`;
|
|
4215
|
+
|
|
4216
|
+
var DropDownSelect = function (_a) {
|
|
4217
|
+
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;
|
|
4218
|
+
return (React.createElement(Container$15, null,
|
|
4219
|
+
React.createElement(Label$4, { htmlFor: id, hideLabel: hideLabel }, label),
|
|
4220
|
+
React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected }, options.map(function (option, i) {
|
|
4221
|
+
return React.createElement(Option, { key: i, value: option.value }, option.title);
|
|
4222
|
+
}))));
|
|
4223
|
+
};
|
|
4224
|
+
|
|
4225
|
+
const H1 = styled.h1`
|
|
4226
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4227
|
+
margin-left: 0;
|
|
4228
|
+
font-weight: 700;
|
|
4229
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4230
|
+
margin-bottom: 20px;
|
|
4231
|
+
|
|
4232
|
+
font-size: 32px;
|
|
4233
|
+
font-size: 2rem;
|
|
4234
|
+
line-height: 1.1;
|
|
4235
|
+
|
|
4236
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4237
|
+
font-size: 44px;
|
|
4238
|
+
font-size: 2.6rem;
|
|
4239
|
+
max-width: 960px;
|
|
4240
|
+
margin-bottom: 30px;
|
|
4241
|
+
}
|
|
4242
|
+
`;
|
|
4243
|
+
const H2 = styled.h2`
|
|
4244
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4245
|
+
font-weight: 700;
|
|
4246
|
+
line-height: 1;
|
|
4247
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4248
|
+
margin-top: 25px;
|
|
4249
|
+
margin-bottom: 15px;
|
|
4250
|
+
|
|
4251
|
+
font-size: 24px;
|
|
4252
|
+
font-size: 1.5rem;
|
|
4253
|
+
line-height: 1.25;
|
|
4254
|
+
|
|
4255
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4256
|
+
font-size: 36px;
|
|
4257
|
+
font-size: 1.75rem;
|
|
4258
|
+
max-width: 960px;
|
|
4259
|
+
}
|
|
4260
|
+
`;
|
|
4261
|
+
const H3 = styled.h3`
|
|
4262
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4263
|
+
font-weight: 600;
|
|
4264
|
+
line-height: 1;
|
|
4265
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4266
|
+
margin-top: 25px;
|
|
4267
|
+
margin-bottom: 15px;
|
|
4268
|
+
|
|
4269
|
+
font-size: 24px;
|
|
4270
|
+
font-size: 1.3rem;
|
|
4271
|
+
line-height: 1.25;
|
|
4272
|
+
|
|
4273
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
4274
|
+
font-size: 36px;
|
|
4275
|
+
font-size: 1.5rem;
|
|
4276
|
+
max-width: 960px;
|
|
4277
|
+
}
|
|
4278
|
+
`;
|
|
4279
|
+
const H4 = styled.h4`
|
|
4280
|
+
color: ${props => props.theme.theme_vars.colours.black};
|
|
4281
|
+
line-height: 1;
|
|
4282
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4283
|
+
margin-top: 25px;
|
|
4284
|
+
margin-bottom: 15px;
|
|
4285
|
+
|
|
4286
|
+
font-weight: 600;
|
|
4287
|
+
line-height: 1;
|
|
4288
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
4289
|
+
`;
|
|
4290
|
+
|
|
4291
|
+
/**
|
|
4292
|
+
* A heading of different levels
|
|
4293
|
+
*/
|
|
4294
|
+
var Heading = function (_a) {
|
|
4295
|
+
var _b = _a.level, level = _b === void 0 ? 2 : _b, text = _a.text, props = __rest(_a, ["level", "text"]);
|
|
4296
|
+
if (level === 1)
|
|
4297
|
+
return React.createElement(H1, __assign$2({}, props), text);
|
|
4298
|
+
if (level === 2)
|
|
4299
|
+
return React.createElement(H2, __assign$2({}, props), text);
|
|
4300
|
+
if (level === 3)
|
|
4301
|
+
return React.createElement(H3, __assign$2({}, props), text);
|
|
4302
|
+
if (level === 4)
|
|
4303
|
+
return React.createElement(H4, __assign$2({}, props), text);
|
|
4304
|
+
return null;
|
|
4305
|
+
};
|
|
4306
|
+
|
|
4307
|
+
/**
|
|
4308
|
+
* Returns the Bin Collection Checker form component to conduct search by postcode.
|
|
4309
|
+
*/
|
|
4310
|
+
var BinCollection = function (_a) {
|
|
4311
|
+
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;
|
|
4312
|
+
var BinCollectionApiUrl = "".concat(baseUrl, "bin-collection-search/premiselist/");
|
|
4313
|
+
var CalendarEventsApiUrl = "".concat(baseUrl, "bin-collection-search/calendarevents/");
|
|
4314
|
+
var themeContext = useContext(ThemeContext);
|
|
4315
|
+
var _d = useState(false), isLoading = _d[0], setIsLoading = _d[1];
|
|
4316
|
+
var _e = useState(formError), isError = _e[0], setError = _e[1];
|
|
4317
|
+
var _f = useState(''), errorText = _f[0], setErrorText = _f[1];
|
|
4318
|
+
var _g = useState([]), addressOptions = _g[0], setAddressOptions = _g[1];
|
|
4319
|
+
var handleSubmit = function (e) {
|
|
4320
|
+
e.preventDefault();
|
|
4321
|
+
var enteredPostcode = e.target.elements.postcode.value;
|
|
4322
|
+
if (enteredPostcode === '') {
|
|
4323
|
+
setError(true);
|
|
4324
|
+
setErrorText('You need to enter a postcode');
|
|
4325
|
+
}
|
|
4326
|
+
else {
|
|
4327
|
+
setIsLoading(true);
|
|
4328
|
+
fetchAddresses(enteredPostcode);
|
|
4329
|
+
}
|
|
4330
|
+
};
|
|
4331
|
+
/**
|
|
4332
|
+
* Returns an array of address options based on the entered postcode.
|
|
4333
|
+
*/
|
|
4334
|
+
var fetchAddresses = function (postcode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4335
|
+
return __generator(this, function (_a) {
|
|
4336
|
+
setError(false);
|
|
4337
|
+
setErrorText('');
|
|
4338
|
+
setIsLoading(true);
|
|
4339
|
+
axios.get("".concat(BinCollectionApiUrl).concat(postcode))
|
|
4340
|
+
.then(function (response) {
|
|
4341
|
+
setIsLoading(false);
|
|
4342
|
+
// Check if there are any addresses returned
|
|
4343
|
+
if (response.data.data.length === 0) {
|
|
4344
|
+
setError(true);
|
|
4345
|
+
setErrorText('No addresses found for the provided postcode.');
|
|
4346
|
+
return;
|
|
4347
|
+
}
|
|
4348
|
+
// Transform the response data into the expected format
|
|
4349
|
+
var transformedAddresses = response.data.data.map(function (item) { return ({
|
|
4350
|
+
value: item.UPRN,
|
|
4351
|
+
title: "".concat(item.Address)
|
|
4352
|
+
}); });
|
|
4353
|
+
setAddressOptions(transformedAddresses);
|
|
4354
|
+
})
|
|
4355
|
+
.catch(function (error) {
|
|
4356
|
+
setIsLoading(false);
|
|
4357
|
+
setError(true);
|
|
4358
|
+
console.error('API call error:', error);
|
|
4359
|
+
setErrorText('Error fetching addresses');
|
|
4360
|
+
});
|
|
4361
|
+
return [2 /*return*/];
|
|
4362
|
+
});
|
|
4363
|
+
}); };
|
|
4364
|
+
var getFormattedDate = function (daysToAdd) {
|
|
4365
|
+
if (daysToAdd === void 0) { daysToAdd = 0; }
|
|
4366
|
+
var date = new Date();
|
|
4367
|
+
date.setDate(date.getDate() + daysToAdd);
|
|
4368
|
+
return date.toISOString().split('T')[0];
|
|
4369
|
+
};
|
|
4370
|
+
var parseDate = function (dateString) {
|
|
4371
|
+
var timestamp = parseInt(dateString.match(/\d+/)[0], 10);
|
|
4372
|
+
return new Date(timestamp);
|
|
4373
|
+
};
|
|
4374
|
+
var groupByTitle = function (data) {
|
|
4375
|
+
var currentDate = new Date();
|
|
4376
|
+
return data.reduce(function (acc, item) {
|
|
4377
|
+
var eventDate = parseDate(item.start);
|
|
4378
|
+
if (eventDate >= currentDate) {
|
|
4379
|
+
if (!acc[item.title]) {
|
|
4380
|
+
acc[item.title] = [];
|
|
4381
|
+
}
|
|
4382
|
+
acc[item.title].push(eventDate);
|
|
4383
|
+
}
|
|
4384
|
+
return acc;
|
|
4385
|
+
}, {});
|
|
4386
|
+
};
|
|
4387
|
+
var _h = useState({}), calendarEvents = _h[0], setCalendarEvents = _h[1];
|
|
4388
|
+
/**
|
|
4389
|
+
* Returns an array of calendar events based on selected address for next 42 days.
|
|
4390
|
+
*/
|
|
4391
|
+
var handleAddressChange = function (e) {
|
|
4392
|
+
var selectedUPRN = e.target.value;
|
|
4393
|
+
if (selectedUPRN) {
|
|
4394
|
+
var startDate = getFormattedDate();
|
|
4395
|
+
var endDate = getFormattedDate(42);
|
|
4396
|
+
// Fetch calendar events for the selected UPRN
|
|
4397
|
+
axios.get("".concat(CalendarEventsApiUrl).concat(selectedUPRN, "/").concat(startDate, "/").concat(endDate))
|
|
4398
|
+
.then(function (response) {
|
|
4399
|
+
var groupedData = groupByTitle(response.data);
|
|
4400
|
+
setCalendarEvents(groupedData);
|
|
4401
|
+
})
|
|
4402
|
+
.catch(function (error) {
|
|
4403
|
+
console.error('API call error:', error);
|
|
4404
|
+
});
|
|
4405
|
+
}
|
|
4406
|
+
};
|
|
4407
|
+
var resetForm = function () {
|
|
4408
|
+
setAddressOptions([]);
|
|
4409
|
+
setCalendarEvents({});
|
|
4410
|
+
setError(false);
|
|
4411
|
+
setErrorText('');
|
|
4412
|
+
};
|
|
4413
|
+
var formatTitle = function (apiTitle) {
|
|
4414
|
+
var mappings = [
|
|
4415
|
+
{ keyword: 'Bin Refuse bin', replacement: 'Refuse bin' },
|
|
4416
|
+
{ keyword: 'Bin Recycling', replacement: 'Recycling bin' },
|
|
4417
|
+
{ keyword: 'Recycling Paper Box', replacement: 'Recycling Paper Box bin' },
|
|
4418
|
+
{ keyword: 'Garden', replacement: 'Garden bin' }
|
|
4419
|
+
];
|
|
4420
|
+
for (var _i = 0, mappings_1 = mappings; _i < mappings_1.length; _i++) {
|
|
4421
|
+
var mapping = mappings_1[_i];
|
|
4422
|
+
if (apiTitle.includes(mapping.keyword)) {
|
|
4423
|
+
return mapping.replacement;
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
return apiTitle;
|
|
4427
|
+
};
|
|
4428
|
+
return (React.createElement(Container$17, { "data-testid": "BinCollection" },
|
|
4429
|
+
React.createElement(FormWithLine, { onSubmit: handleSubmit, isError: isError, lineColour: themeContext.theme_vars.colours.grey_dark, hideLine: true },
|
|
4430
|
+
React.createElement(FormContainer$1, { isLoading: isLoading },
|
|
4431
|
+
React.createElement(Heading, { level: 2, text: "Bin Collection Checker" }),
|
|
4432
|
+
React.createElement(ErrorTextWrapper, null, errorText && React.createElement(ErrorText$1, null, errorText)),
|
|
4433
|
+
React.createElement(FormInnerContainer, null,
|
|
4434
|
+
React.createElement(Input$6, { type: "text", placeholder: "Enter a postcode", name: "postcode", isErrored: isError, maxLength: 10 }),
|
|
4435
|
+
React.createElement(BinCollectionButtonStyles, null,
|
|
4436
|
+
React.createElement(FormButton, { size: "large", type: "submit", "aria-label": "Submit", text: "Find" }))))),
|
|
4437
|
+
addressOptions.length > 0 && (React.createElement(DropDownSelectContainer, null,
|
|
4438
|
+
React.createElement(DropDownSelect, { onChange: handleAddressChange, id: "address", label: "Select your address", options: __spreadArray([{ title: 'Select an address', value: '' }], addressOptions, true) }))),
|
|
4439
|
+
React.createElement("div", null, Object.entries(calendarEvents).map(function (_a) {
|
|
4440
|
+
var apiTitle = _a[0], dates = _a[1];
|
|
4441
|
+
var title = formatTitle(apiTitle);
|
|
4442
|
+
return (React.createElement(React.Fragment, { key: title },
|
|
4443
|
+
React.createElement(UPRNPageTitleRow, null,
|
|
4444
|
+
React.createElement(UPRNPageSectionTitle, null, title)),
|
|
4445
|
+
dates
|
|
4446
|
+
.sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); })
|
|
4447
|
+
.map(function (date) { return (React.createElement(UPRNPageUPRNRow, { key: "".concat(title, "-").concat(date.toString()) },
|
|
4448
|
+
React.createElement(UPRNPageUPRNTitle, null, date.toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })))); })));
|
|
4449
|
+
})),
|
|
4450
|
+
Object.keys(calendarEvents).length > 0 && (React.createElement(FormButton, { size: "small", type: "button", "aria-label": "Reset", text: "Find a different address", onClick: resetForm }))));
|
|
4451
|
+
};
|
|
4452
|
+
|
|
4025
4453
|
const Icon$4 = styled.span`
|
|
4026
4454
|
vertical-align: middle;
|
|
4027
4455
|
width: 100%;
|
|
@@ -5873,88 +6301,6 @@ var DynamicIcon = function (_a) {
|
|
|
5873
6301
|
React.createElement(DynamicComponent, { name: icon, isHover: true }))))));
|
|
5874
6302
|
};
|
|
5875
6303
|
|
|
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
6304
|
const HeadingWrapper = styled.div`
|
|
5959
6305
|
display: flex;
|
|
5960
6306
|
-webkit-flex-direction: row;
|
|
@@ -6002,7 +6348,7 @@ var HeadingWithIcon = function (_a) {
|
|
|
6002
6348
|
React.createElement(Heading, { text: text, level: level })));
|
|
6003
6349
|
};
|
|
6004
6350
|
|
|
6005
|
-
const Container$
|
|
6351
|
+
const Container$14 = styled.div`
|
|
6006
6352
|
display: flex;
|
|
6007
6353
|
width: 100%;
|
|
6008
6354
|
min-height: 400px;
|
|
@@ -6026,7 +6372,7 @@ var Map$1 = function (_a) {
|
|
|
6026
6372
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
6027
6373
|
}
|
|
6028
6374
|
}, [ref, map]);
|
|
6029
|
-
return (React.createElement(Container$
|
|
6375
|
+
return (React.createElement(Container$14, { "data-testid": "Map" },
|
|
6030
6376
|
React.createElement("div", { ref: ref }),
|
|
6031
6377
|
React.Children.map(children, function (child) {
|
|
6032
6378
|
if (React.isValidElement(child)) {
|
|
@@ -6083,7 +6429,7 @@ var MapMarker = function (options) {
|
|
|
6083
6429
|
return null;
|
|
6084
6430
|
};
|
|
6085
6431
|
|
|
6086
|
-
const Container$
|
|
6432
|
+
const Container$13 = styled.div`
|
|
6087
6433
|
${(props) => props.theme.fontStyles};
|
|
6088
6434
|
display: block;
|
|
6089
6435
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -6860,7 +7206,7 @@ var Pagination = function (_a) {
|
|
|
6860
7206
|
}
|
|
6861
7207
|
};
|
|
6862
7208
|
if (numbers.length > 1) {
|
|
6863
|
-
return (React.createElement(Container$
|
|
7209
|
+
return (React.createElement(Container$13, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
6864
7210
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
6865
7211
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
6866
7212
|
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
@@ -6872,7 +7218,7 @@ var Pagination = function (_a) {
|
|
|
6872
7218
|
return null;
|
|
6873
7219
|
};
|
|
6874
7220
|
|
|
6875
|
-
const Container$
|
|
7221
|
+
const Container$12 = styled.div`
|
|
6876
7222
|
${(props) => props.theme.fontStyles};
|
|
6877
7223
|
margin-bottom: 30px;
|
|
6878
7224
|
`;
|
|
@@ -6890,7 +7236,7 @@ const Fieldset$2 = styled.fieldset`
|
|
|
6890
7236
|
}
|
|
6891
7237
|
`;
|
|
6892
7238
|
|
|
6893
|
-
const hideLabel
|
|
7239
|
+
const hideLabel = (props) => {
|
|
6894
7240
|
if (props.labelHidden) {
|
|
6895
7241
|
return VisuallyHidden$3;
|
|
6896
7242
|
}
|
|
@@ -6905,7 +7251,7 @@ const Legend$2 = styled.legend`
|
|
|
6905
7251
|
margin-bottom: 10px;
|
|
6906
7252
|
padding: 0;
|
|
6907
7253
|
white-space: normal;
|
|
6908
|
-
${hideLabel
|
|
7254
|
+
${hideLabel}
|
|
6909
7255
|
`;
|
|
6910
7256
|
|
|
6911
7257
|
const hideHint = (props) => {
|
|
@@ -7043,7 +7389,7 @@ var CheckboxListFilter = function (_a) {
|
|
|
7043
7389
|
handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
|
|
7044
7390
|
};
|
|
7045
7391
|
var backupLabel = Math.random().toString(36).substring(7);
|
|
7046
|
-
return (React.createElement(Container$
|
|
7392
|
+
return (React.createElement(Container$12, { "data-testid": "CheckboxListFilter" },
|
|
7047
7393
|
React.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
7048
7394
|
React.createElement(Legend$2, { labelHidden: labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
7049
7395
|
React.createElement(Hint, { id: hintId, hintHidden: hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -7052,58 +7398,6 @@ var CheckboxListFilter = function (_a) {
|
|
|
7052
7398
|
React.createElement(CheckboxLabel, { isChecked: option.checked, htmlFor: option.value }, option.title))); })))));
|
|
7053
7399
|
};
|
|
7054
7400
|
|
|
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
7401
|
var DropDownFilter = function (_a) {
|
|
7108
7402
|
var id = _a.id, label = _a.label, options = _a.options, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b;
|
|
7109
7403
|
var _c = useState(selected), value = _c[0], setValue = _c[1];
|
|
@@ -7214,7 +7508,7 @@ const PromotedLink$1 = styled.a`
|
|
|
7214
7508
|
${oneColStyles}
|
|
7215
7509
|
`;
|
|
7216
7510
|
|
|
7217
|
-
const Container$
|
|
7511
|
+
const Container$11 = styled.div`
|
|
7218
7512
|
box-sizing: border-box;
|
|
7219
7513
|
display: flex;
|
|
7220
7514
|
flex-wrap: wrap;
|
|
@@ -7237,7 +7531,7 @@ const Container$12 = styled.div`
|
|
|
7237
7531
|
|
|
7238
7532
|
var Row$1 = function (_a) {
|
|
7239
7533
|
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$
|
|
7534
|
+
return (React.createElement(Container$11, { "data-testid": "Row", hasBorder: hasBorder, hasWrap: hasWrap, as: isList ? 'ul' : 'div' }, children));
|
|
7241
7535
|
};
|
|
7242
7536
|
|
|
7243
7537
|
const calculateWidth = (size) => {
|
|
@@ -7287,7 +7581,7 @@ const widths = (props) => {
|
|
|
7287
7581
|
`;
|
|
7288
7582
|
};
|
|
7289
7583
|
|
|
7290
|
-
const Container$
|
|
7584
|
+
const Container$10 = styled.div`
|
|
7291
7585
|
box-sizing: border-box;
|
|
7292
7586
|
display: block;
|
|
7293
7587
|
padding: ${(props) => (props.hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -7298,7 +7592,7 @@ const Container$11 = styled.div`
|
|
|
7298
7592
|
|
|
7299
7593
|
var Column = function (_a) {
|
|
7300
7594
|
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$
|
|
7595
|
+
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
7596
|
};
|
|
7303
7597
|
|
|
7304
7598
|
var PromotedLinks = function (_a) {
|
|
@@ -7314,7 +7608,7 @@ var PromotedLinks = function (_a) {
|
|
|
7314
7608
|
}
|
|
7315
7609
|
};
|
|
7316
7610
|
|
|
7317
|
-
const Container
|
|
7611
|
+
const Container$$ = styled.div`
|
|
7318
7612
|
display: block;
|
|
7319
7613
|
`;
|
|
7320
7614
|
|
|
@@ -7343,7 +7637,7 @@ var StaticMap = function (_a) {
|
|
|
7343
7637
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
7344
7638
|
})
|
|
7345
7639
|
.join('');
|
|
7346
|
-
return (React.createElement(Container
|
|
7640
|
+
return (React.createElement(Container$$, { "data-testid": "StaticMap" },
|
|
7347
7641
|
React.createElement(Message, null,
|
|
7348
7642
|
React.createElement("span", null, "To interact with the map, you need to accept cookies.")),
|
|
7349
7643
|
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 +7655,7 @@ var TextInput = function (_a) {
|
|
|
7361
7655
|
|
|
7362
7656
|
// Accordion
|
|
7363
7657
|
|
|
7364
|
-
const Container
|
|
7658
|
+
const Container$_ = styled.div`
|
|
7365
7659
|
${(props) => props.theme.fontStyles}
|
|
7366
7660
|
margin-bottom: 20px;
|
|
7367
7661
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -7655,7 +7949,7 @@ var Accordion$1 = function (_a) {
|
|
|
7655
7949
|
setAccordionStates(newStatus);
|
|
7656
7950
|
};
|
|
7657
7951
|
var accordionId = "accordion".concat(uniqueID());
|
|
7658
|
-
return (React.createElement(Container
|
|
7952
|
+
return (React.createElement(Container$_, { "data-testid": "Accordion", id: accordionId },
|
|
7659
7953
|
showControls && sections.length > 1 && (React.createElement(AccordionControls$1, null,
|
|
7660
7954
|
React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
7661
7955
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -7706,7 +8000,7 @@ var BlockQuote = function (_a) {
|
|
|
7706
8000
|
citation && React.createElement(Citation, null, citation)));
|
|
7707
8001
|
};
|
|
7708
8002
|
|
|
7709
|
-
const Container$
|
|
8003
|
+
const Container$Z = styled.div`
|
|
7710
8004
|
margin-bottom: 30px;
|
|
7711
8005
|
display: block;
|
|
7712
8006
|
|
|
@@ -7721,11 +8015,11 @@ const Container$_ = styled.div`
|
|
|
7721
8015
|
*/
|
|
7722
8016
|
var CallToAction = function (_a) {
|
|
7723
8017
|
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$
|
|
8018
|
+
return (React.createElement(Container$Z, null,
|
|
7725
8019
|
React.createElement(Button$4, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
7726
8020
|
};
|
|
7727
8021
|
|
|
7728
|
-
const Container$
|
|
8022
|
+
const Container$Y = styled.div`
|
|
7729
8023
|
display: block;
|
|
7730
8024
|
${(props) => props.theme.fontStyles}
|
|
7731
8025
|
`;
|
|
@@ -7901,7 +8195,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
7901
8195
|
});
|
|
7902
8196
|
return letterData;
|
|
7903
8197
|
});
|
|
7904
|
-
return (React.createElement(Container$
|
|
8198
|
+
return (React.createElement(Container$Y, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
7905
8199
|
React.createElement(React.Fragment, null,
|
|
7906
8200
|
parishes.length === 0 && (React.createElement(ErrorText, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
7907
8201
|
parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
|
|
@@ -7927,9 +8221,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
7927
8221
|
React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
7928
8222
|
};
|
|
7929
8223
|
|
|
7930
|
-
const Container$
|
|
8224
|
+
const Container$X = styled.div``;
|
|
7931
8225
|
|
|
7932
|
-
const Container$
|
|
8226
|
+
const Container$W = styled.div`
|
|
7933
8227
|
display: flex;
|
|
7934
8228
|
flex-direction: column;
|
|
7935
8229
|
justify-content: flex-start;
|
|
@@ -13010,10 +13304,10 @@ let pico$1 = picocolors.exports;
|
|
|
13010
13304
|
|
|
13011
13305
|
let tokenizer$1 = tokenize;
|
|
13012
13306
|
|
|
13013
|
-
let Input$
|
|
13307
|
+
let Input$5;
|
|
13014
13308
|
|
|
13015
13309
|
function registerInput(dependant) {
|
|
13016
|
-
Input$
|
|
13310
|
+
Input$5 = dependant;
|
|
13017
13311
|
}
|
|
13018
13312
|
|
|
13019
13313
|
const HIGHLIGHT_THEME = {
|
|
@@ -13054,7 +13348,7 @@ function getTokenType([type, value], processor) {
|
|
|
13054
13348
|
}
|
|
13055
13349
|
|
|
13056
13350
|
function terminalHighlight$2(css) {
|
|
13057
|
-
let processor = tokenizer$1(new Input$
|
|
13351
|
+
let processor = tokenizer$1(new Input$5(css), { ignoreErrors: true });
|
|
13058
13352
|
let result = '';
|
|
13059
13353
|
while (!processor.endOfFile()) {
|
|
13060
13354
|
let token = processor.nextToken();
|
|
@@ -17441,7 +17735,7 @@ let fromOffsetCache = Symbol('fromOffsetCache');
|
|
|
17441
17735
|
let sourceMapAvailable$1 = Boolean(SourceMapConsumer$1 && SourceMapGenerator$1);
|
|
17442
17736
|
let pathAvailable$1 = Boolean(resolve$1 && isAbsolute);
|
|
17443
17737
|
|
|
17444
|
-
class Input$
|
|
17738
|
+
class Input$4 {
|
|
17445
17739
|
constructor(css, opts = {}) {
|
|
17446
17740
|
if (
|
|
17447
17741
|
css === null ||
|
|
@@ -17667,18 +17961,18 @@ class Input$5 {
|
|
|
17667
17961
|
}
|
|
17668
17962
|
}
|
|
17669
17963
|
|
|
17670
|
-
var input = Input$
|
|
17671
|
-
Input$
|
|
17964
|
+
var input = Input$4;
|
|
17965
|
+
Input$4.default = Input$4;
|
|
17672
17966
|
|
|
17673
17967
|
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
17674
|
-
terminalHighlight.registerInput(Input$
|
|
17968
|
+
terminalHighlight.registerInput(Input$4);
|
|
17675
17969
|
}
|
|
17676
17970
|
|
|
17677
17971
|
let { SourceMapConsumer, SourceMapGenerator } = sourceMap;
|
|
17678
17972
|
let { dirname, resolve, relative, sep } = require$$2;
|
|
17679
17973
|
let { pathToFileURL } = require$$1$1;
|
|
17680
17974
|
|
|
17681
|
-
let Input$
|
|
17975
|
+
let Input$3 = input;
|
|
17682
17976
|
|
|
17683
17977
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
17684
17978
|
let pathAvailable = Boolean(dirname && resolve && relative && sep);
|
|
@@ -17713,7 +18007,7 @@ class MapGenerator$2 {
|
|
|
17713
18007
|
}
|
|
17714
18008
|
});
|
|
17715
18009
|
} else {
|
|
17716
|
-
let input = new Input$
|
|
18010
|
+
let input = new Input$3(this.css, this.opts);
|
|
17717
18011
|
if (input.map) this.previousMaps.push(input.map);
|
|
17718
18012
|
}
|
|
17719
18013
|
}
|
|
@@ -18047,7 +18341,7 @@ function markDirtyUp(node) {
|
|
|
18047
18341
|
}
|
|
18048
18342
|
}
|
|
18049
18343
|
|
|
18050
|
-
class Container$
|
|
18344
|
+
class Container$V extends Node$1 {
|
|
18051
18345
|
push(child) {
|
|
18052
18346
|
child.parent = this;
|
|
18053
18347
|
this.proxyOf.nodes.push(child);
|
|
@@ -18340,7 +18634,7 @@ class Container$W extends Node$1 {
|
|
|
18340
18634
|
|
|
18341
18635
|
let processed = nodes.map(i => {
|
|
18342
18636
|
/* c8 ignore next */
|
|
18343
|
-
if (!i[my$1]) Container$
|
|
18637
|
+
if (!i[my$1]) Container$V.rebuild(i);
|
|
18344
18638
|
i = i.proxyOf;
|
|
18345
18639
|
if (i.parent) i.parent.removeChild(i);
|
|
18346
18640
|
if (i[isClean$1]) markDirtyUp(i);
|
|
@@ -18418,27 +18712,27 @@ class Container$W extends Node$1 {
|
|
|
18418
18712
|
}
|
|
18419
18713
|
}
|
|
18420
18714
|
|
|
18421
|
-
Container$
|
|
18715
|
+
Container$V.registerParse = dependant => {
|
|
18422
18716
|
parse$4 = dependant;
|
|
18423
18717
|
};
|
|
18424
18718
|
|
|
18425
|
-
Container$
|
|
18719
|
+
Container$V.registerRule = dependant => {
|
|
18426
18720
|
Rule$4 = dependant;
|
|
18427
18721
|
};
|
|
18428
18722
|
|
|
18429
|
-
Container$
|
|
18723
|
+
Container$V.registerAtRule = dependant => {
|
|
18430
18724
|
AtRule$4 = dependant;
|
|
18431
18725
|
};
|
|
18432
18726
|
|
|
18433
|
-
Container$
|
|
18727
|
+
Container$V.registerRoot = dependant => {
|
|
18434
18728
|
Root$6 = dependant;
|
|
18435
18729
|
};
|
|
18436
18730
|
|
|
18437
|
-
var container = Container$
|
|
18438
|
-
Container$
|
|
18731
|
+
var container = Container$V;
|
|
18732
|
+
Container$V.default = Container$V;
|
|
18439
18733
|
|
|
18440
18734
|
/* c8 ignore start */
|
|
18441
|
-
Container$
|
|
18735
|
+
Container$V.rebuild = node => {
|
|
18442
18736
|
if (node.type === 'atrule') {
|
|
18443
18737
|
Object.setPrototypeOf(node, AtRule$4.prototype);
|
|
18444
18738
|
} else if (node.type === 'rule') {
|
|
@@ -18455,16 +18749,16 @@ Container$W.rebuild = node => {
|
|
|
18455
18749
|
|
|
18456
18750
|
if (node.nodes) {
|
|
18457
18751
|
node.nodes.forEach(child => {
|
|
18458
|
-
Container$
|
|
18752
|
+
Container$V.rebuild(child);
|
|
18459
18753
|
});
|
|
18460
18754
|
}
|
|
18461
18755
|
};
|
|
18462
18756
|
|
|
18463
|
-
let Container$
|
|
18757
|
+
let Container$U = container;
|
|
18464
18758
|
|
|
18465
18759
|
let LazyResult$4, Processor$3;
|
|
18466
18760
|
|
|
18467
|
-
class Document$3 extends Container$
|
|
18761
|
+
class Document$3 extends Container$U {
|
|
18468
18762
|
constructor(defaults) {
|
|
18469
18763
|
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
|
18470
18764
|
super({ type: 'document', ...defaults });
|
|
@@ -18582,9 +18876,9 @@ class Result$4 {
|
|
|
18582
18876
|
var result = Result$4;
|
|
18583
18877
|
Result$4.default = Result$4;
|
|
18584
18878
|
|
|
18585
|
-
let Container$
|
|
18879
|
+
let Container$T = container;
|
|
18586
18880
|
|
|
18587
|
-
class AtRule$3 extends Container$
|
|
18881
|
+
class AtRule$3 extends Container$T {
|
|
18588
18882
|
constructor(defaults) {
|
|
18589
18883
|
super(defaults);
|
|
18590
18884
|
this.type = 'atrule';
|
|
@@ -18604,13 +18898,13 @@ class AtRule$3 extends Container$U {
|
|
|
18604
18898
|
var atRule = AtRule$3;
|
|
18605
18899
|
AtRule$3.default = AtRule$3;
|
|
18606
18900
|
|
|
18607
|
-
Container$
|
|
18901
|
+
Container$T.registerAtRule(AtRule$3);
|
|
18608
18902
|
|
|
18609
|
-
let Container$
|
|
18903
|
+
let Container$S = container;
|
|
18610
18904
|
|
|
18611
18905
|
let LazyResult$3, Processor$2;
|
|
18612
18906
|
|
|
18613
|
-
class Root$5 extends Container$
|
|
18907
|
+
class Root$5 extends Container$S {
|
|
18614
18908
|
constructor(defaults) {
|
|
18615
18909
|
super(defaults);
|
|
18616
18910
|
this.type = 'root';
|
|
@@ -18664,7 +18958,7 @@ Root$5.registerProcessor = dependant => {
|
|
|
18664
18958
|
var root = Root$5;
|
|
18665
18959
|
Root$5.default = Root$5;
|
|
18666
18960
|
|
|
18667
|
-
Container$
|
|
18961
|
+
Container$S.registerRoot(Root$5);
|
|
18668
18962
|
|
|
18669
18963
|
let list$2 = {
|
|
18670
18964
|
split(string, separators, last) {
|
|
@@ -18723,10 +19017,10 @@ let list$2 = {
|
|
|
18723
19017
|
var list_1 = list$2;
|
|
18724
19018
|
list$2.default = list$2;
|
|
18725
19019
|
|
|
18726
|
-
let Container$
|
|
19020
|
+
let Container$R = container;
|
|
18727
19021
|
let list$1 = list_1;
|
|
18728
19022
|
|
|
18729
|
-
class Rule$3 extends Container$
|
|
19023
|
+
class Rule$3 extends Container$R {
|
|
18730
19024
|
constructor(defaults) {
|
|
18731
19025
|
super(defaults);
|
|
18732
19026
|
this.type = 'rule';
|
|
@@ -18747,7 +19041,7 @@ class Rule$3 extends Container$S {
|
|
|
18747
19041
|
var rule = Rule$3;
|
|
18748
19042
|
Rule$3.default = Rule$3;
|
|
18749
19043
|
|
|
18750
|
-
Container$
|
|
19044
|
+
Container$R.registerRule(Rule$3);
|
|
18751
19045
|
|
|
18752
19046
|
let Declaration$2 = declaration;
|
|
18753
19047
|
let tokenizer = tokenize;
|
|
@@ -19351,12 +19645,12 @@ class Parser$1 {
|
|
|
19351
19645
|
|
|
19352
19646
|
var parser = Parser$1;
|
|
19353
19647
|
|
|
19354
|
-
let Container$
|
|
19648
|
+
let Container$Q = container;
|
|
19355
19649
|
let Parser = parser;
|
|
19356
|
-
let Input$
|
|
19650
|
+
let Input$2 = input;
|
|
19357
19651
|
|
|
19358
19652
|
function parse$3(css, opts) {
|
|
19359
|
-
let input = new Input$
|
|
19653
|
+
let input = new Input$2(css, opts);
|
|
19360
19654
|
let parser = new Parser(input);
|
|
19361
19655
|
try {
|
|
19362
19656
|
parser.parse();
|
|
@@ -19390,12 +19684,12 @@ function parse$3(css, opts) {
|
|
|
19390
19684
|
var parse_1 = parse$3;
|
|
19391
19685
|
parse$3.default = parse$3;
|
|
19392
19686
|
|
|
19393
|
-
Container$
|
|
19687
|
+
Container$Q.registerParse(parse$3);
|
|
19394
19688
|
|
|
19395
19689
|
let { isClean, my } = symbols;
|
|
19396
19690
|
let MapGenerator$1 = mapGenerator;
|
|
19397
19691
|
let stringify$2 = stringify_1;
|
|
19398
|
-
let Container$
|
|
19692
|
+
let Container$P = container;
|
|
19399
19693
|
let Document$2 = document$1;
|
|
19400
19694
|
let warnOnce$1 = warnOnce$2;
|
|
19401
19695
|
let Result$3 = result;
|
|
@@ -19530,7 +19824,7 @@ class LazyResult$2 {
|
|
|
19530
19824
|
|
|
19531
19825
|
if (root && !root[my]) {
|
|
19532
19826
|
/* c8 ignore next 2 */
|
|
19533
|
-
Container$
|
|
19827
|
+
Container$P.rebuild(root);
|
|
19534
19828
|
}
|
|
19535
19829
|
}
|
|
19536
19830
|
|
|
@@ -20145,7 +20439,7 @@ let Declaration$1 = declaration;
|
|
|
20145
20439
|
let PreviousMap = previousMap;
|
|
20146
20440
|
let Comment$1 = comment;
|
|
20147
20441
|
let AtRule$1 = atRule;
|
|
20148
|
-
let Input$
|
|
20442
|
+
let Input$1 = input;
|
|
20149
20443
|
let Root$1 = root;
|
|
20150
20444
|
let Rule$1 = rule;
|
|
20151
20445
|
|
|
@@ -20156,7 +20450,7 @@ function fromJSON$1(json, inputs) {
|
|
|
20156
20450
|
if (ownInputs) {
|
|
20157
20451
|
inputs = [];
|
|
20158
20452
|
for (let input of ownInputs) {
|
|
20159
|
-
let inputHydrated = { ...input, __proto__: Input$
|
|
20453
|
+
let inputHydrated = { ...input, __proto__: Input$1.prototype };
|
|
20160
20454
|
if (inputHydrated.map) {
|
|
20161
20455
|
inputHydrated.map = {
|
|
20162
20456
|
...inputHydrated.map,
|
|
@@ -20197,7 +20491,7 @@ fromJSON$1.default = fromJSON$1;
|
|
|
20197
20491
|
let CssSyntaxError = cssSyntaxError;
|
|
20198
20492
|
let Declaration = declaration;
|
|
20199
20493
|
let LazyResult = lazyResult;
|
|
20200
|
-
let Container$
|
|
20494
|
+
let Container$O = container;
|
|
20201
20495
|
let Processor = processor;
|
|
20202
20496
|
let stringify = stringify_1;
|
|
20203
20497
|
let fromJSON = fromJSON_1;
|
|
@@ -20206,7 +20500,7 @@ let Warning = warning;
|
|
|
20206
20500
|
let Comment = comment;
|
|
20207
20501
|
let AtRule = atRule;
|
|
20208
20502
|
let Result$1 = result;
|
|
20209
|
-
let Input
|
|
20503
|
+
let Input = input;
|
|
20210
20504
|
let parse = parse_1;
|
|
20211
20505
|
let list = list_1;
|
|
20212
20506
|
let Rule = rule;
|
|
@@ -20277,14 +20571,14 @@ postcss.document = defaults => new Document(defaults);
|
|
|
20277
20571
|
|
|
20278
20572
|
postcss.CssSyntaxError = CssSyntaxError;
|
|
20279
20573
|
postcss.Declaration = Declaration;
|
|
20280
|
-
postcss.Container = Container$
|
|
20574
|
+
postcss.Container = Container$O;
|
|
20281
20575
|
postcss.Processor = Processor;
|
|
20282
20576
|
postcss.Document = Document;
|
|
20283
20577
|
postcss.Comment = Comment;
|
|
20284
20578
|
postcss.Warning = Warning;
|
|
20285
20579
|
postcss.AtRule = AtRule;
|
|
20286
20580
|
postcss.Result = Result$1;
|
|
20287
|
-
postcss.Input = Input
|
|
20581
|
+
postcss.Input = Input;
|
|
20288
20582
|
postcss.Rule = Rule;
|
|
20289
20583
|
postcss.Root = Root;
|
|
20290
20584
|
postcss.Node = Node;
|
|
@@ -21146,7 +21440,7 @@ var sanitizeHtml$1 = sanitizeHtml_1;
|
|
|
21146
21440
|
var Card = function (_a) {
|
|
21147
21441
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
21148
21442
|
var showContent = content || header;
|
|
21149
|
-
return (React.createElement(Container$
|
|
21443
|
+
return (React.createElement(Container$W, { "data-testid": "Card" },
|
|
21150
21444
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
21151
21445
|
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
21446
|
showContent && (React.createElement(Content$6, null,
|
|
@@ -21162,12 +21456,12 @@ var Card = function (_a) {
|
|
|
21162
21456
|
*/
|
|
21163
21457
|
var Cards = function (_a) {
|
|
21164
21458
|
var cards = _a.cards;
|
|
21165
|
-
return (React.createElement(Container$
|
|
21459
|
+
return (React.createElement(Container$X, { "data-testid": "Cards" },
|
|
21166
21460
|
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
21461
|
React.createElement(Card, __assign$2({}, card)))); }))));
|
|
21168
21462
|
};
|
|
21169
21463
|
|
|
21170
|
-
const Container$
|
|
21464
|
+
const Container$N = styled.div`
|
|
21171
21465
|
margin: 25px 0;
|
|
21172
21466
|
`;
|
|
21173
21467
|
|
|
@@ -21285,7 +21579,7 @@ var FileDownload = function (_a) {
|
|
|
21285
21579
|
|
|
21286
21580
|
var DownloadableFiles = function (_a) {
|
|
21287
21581
|
var files = _a.files;
|
|
21288
|
-
return (React.createElement(Container$
|
|
21582
|
+
return (React.createElement(Container$N, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
21289
21583
|
files.map(function (file) { return React.createElement(FileDownload, __assign$2({ key: file.title }, file)); })
|
|
21290
21584
|
:
|
|
21291
21585
|
React.createElement("i", null, "No file to show")));
|
|
@@ -21421,7 +21715,7 @@ const wereCookiesAccepted = (cookiesAcceptedOverride) => {
|
|
|
21421
21715
|
return false;
|
|
21422
21716
|
};
|
|
21423
21717
|
|
|
21424
|
-
const Container$
|
|
21718
|
+
const Container$M = styled.div`
|
|
21425
21719
|
border: solid 4px;
|
|
21426
21720
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
21427
21721
|
border-color: ${(props) =>
|
|
@@ -21475,7 +21769,7 @@ const InnerContainer$2 = styled.div`
|
|
|
21475
21769
|
*/
|
|
21476
21770
|
var AlertBannerService = function (_a) {
|
|
21477
21771
|
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$
|
|
21772
|
+
return (React.createElement(Container$M, { alertType: alertType, "data-testid": "AlertBannerService", hasTopSpacing: hasTopSpacing },
|
|
21479
21773
|
React.createElement(InnerContainer$2, { "data-testid": "AlertBannerServiceInner" },
|
|
21480
21774
|
(title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading, { text: title }),
|
|
21481
21775
|
children)));
|
|
@@ -21522,7 +21816,7 @@ var GoogleMap = function (_a) {
|
|
|
21522
21816
|
React.createElement(MapLink$1, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
|
|
21523
21817
|
};
|
|
21524
21818
|
|
|
21525
|
-
const Container$
|
|
21819
|
+
const Container$L = styled.figure`
|
|
21526
21820
|
display: block;
|
|
21527
21821
|
background: ${(props) =>
|
|
21528
21822
|
props.theme.cardinal_name === 'north'
|
|
@@ -22185,7 +22479,7 @@ var LazyImage = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
|
22185
22479
|
*/
|
|
22186
22480
|
var Image$2 = function (_a) {
|
|
22187
22481
|
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$
|
|
22482
|
+
return (React.createElement(Container$L, { "data-testid": "Image", wrapText: wrapText },
|
|
22189
22483
|
React.createElement(ImageContainer$4, { "data-testid": "ImageContainer", ratio: ratio },
|
|
22190
22484
|
React.createElement(LazyImage, { placeholder: imageSmall, src: imageLarge, visibilitySensorProps: {
|
|
22191
22485
|
partialVisibility: true,
|
|
@@ -22193,7 +22487,7 @@ var Image$2 = function (_a) {
|
|
|
22193
22487
|
(caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
|
|
22194
22488
|
};
|
|
22195
22489
|
|
|
22196
|
-
const Container$
|
|
22490
|
+
const Container$K = styled.div`
|
|
22197
22491
|
display: block;
|
|
22198
22492
|
`;
|
|
22199
22493
|
|
|
@@ -22214,7 +22508,7 @@ const Content$5 = styled.div`
|
|
|
22214
22508
|
*/
|
|
22215
22509
|
var ImageAndText = function (_a) {
|
|
22216
22510
|
var heading = _a.heading, textContent = _a.textContent, image = _a.image;
|
|
22217
|
-
return (React.createElement(Container$
|
|
22511
|
+
return (React.createElement(Container$K, { "data-testid": "ImageAndText" },
|
|
22218
22512
|
React.createElement(Row$1, null,
|
|
22219
22513
|
heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
22220
22514
|
React.createElement(HeadingContainer, null,
|
|
@@ -22227,7 +22521,7 @@ var ImageAndText = function (_a) {
|
|
|
22227
22521
|
React.createElement(Content$5, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
22228
22522
|
};
|
|
22229
22523
|
|
|
22230
|
-
const Container$
|
|
22524
|
+
const Container$J = styled.div`
|
|
22231
22525
|
display: block;
|
|
22232
22526
|
`;
|
|
22233
22527
|
|
|
@@ -22236,7 +22530,7 @@ const Container$K = styled.div`
|
|
|
22236
22530
|
*/
|
|
22237
22531
|
var InquestSchedule = function (_a) {
|
|
22238
22532
|
var caseAppointments = _a.caseAppointments, title = _a.title, _b = _a.error, error = _b === void 0 ? false : _b;
|
|
22239
|
-
return (React.createElement(Container$
|
|
22533
|
+
return (React.createElement(Container$J, { "data-testid": "InquestSchedule" },
|
|
22240
22534
|
React.createElement("div", { className: "table-container" },
|
|
22241
22535
|
React.createElement("table", null,
|
|
22242
22536
|
React.createElement("caption", null, title),
|
|
@@ -22264,7 +22558,7 @@ var InquestSchedule = function (_a) {
|
|
|
22264
22558
|
error ? (React.createElement("p", null, " The information is currently unavailable.")) : (React.createElement("p", null, "There are no inquests scheduled for next month."))))))))));
|
|
22265
22559
|
};
|
|
22266
22560
|
|
|
22267
|
-
const Container$
|
|
22561
|
+
const Container$I = styled.div`
|
|
22268
22562
|
${(props) => props.theme.fontStyles};
|
|
22269
22563
|
overflow: hidden;
|
|
22270
22564
|
margin: 40px auto 5px auto;
|
|
@@ -22344,7 +22638,7 @@ const CTA = styled.a`
|
|
|
22344
22638
|
*/
|
|
22345
22639
|
var PromoBanner = function (_a) {
|
|
22346
22640
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
22347
|
-
return (React.createElement(Container$
|
|
22641
|
+
return (React.createElement(Container$I, null,
|
|
22348
22642
|
React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
|
|
22349
22643
|
partialVisibility: true,
|
|
22350
22644
|
} }, function (src) { return React.createElement(ImageLink, { img: src, href: ctaUrl, title: ctaText }); }),
|
|
@@ -22555,7 +22849,7 @@ var Promotions = function (_a) {
|
|
|
22555
22849
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
22556
22850
|
};
|
|
22557
22851
|
|
|
22558
|
-
const Container$
|
|
22852
|
+
const Container$H = styled.div`
|
|
22559
22853
|
padding: 0;
|
|
22560
22854
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
22561
22855
|
${(props) => props.theme.fontStyles}
|
|
@@ -22605,7 +22899,7 @@ const Inner = styled.div`
|
|
|
22605
22899
|
}
|
|
22606
22900
|
`;
|
|
22607
22901
|
|
|
22608
|
-
const Container$
|
|
22902
|
+
const Container$G = styled.div`
|
|
22609
22903
|
display: block;
|
|
22610
22904
|
|
|
22611
22905
|
input[type='text'] {
|
|
@@ -22673,28 +22967,17 @@ const SubmitButton = styled.input`
|
|
|
22673
22967
|
}
|
|
22674
22968
|
`;
|
|
22675
22969
|
|
|
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
22970
|
var CustomSearch = function (_a) {
|
|
22688
22971
|
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
22972
|
if (!id) {
|
|
22690
22973
|
id = useId();
|
|
22691
22974
|
}
|
|
22692
|
-
return (React.createElement(Container$
|
|
22975
|
+
return (React.createElement(Container$G, { "data-testid": "CustomSearch" },
|
|
22693
22976
|
React.createElement("form", { method: method, action: path, "aria-label": label },
|
|
22694
22977
|
React.createElement("div", { role: "search" },
|
|
22695
22978
|
React.createElement(Label$3, { htmlFor: id, hasHiddenLabel: hasHiddenLabel }, label),
|
|
22696
22979
|
React.createElement(InputWrapper$1, null,
|
|
22697
|
-
React.createElement(Input, { name: fieldName, placeholder: placeholder, id: id }),
|
|
22980
|
+
React.createElement(Input$6, { name: fieldName, placeholder: placeholder, id: id }),
|
|
22698
22981
|
React.createElement(SubmitButton, { type: "submit", value: searchText }))))));
|
|
22699
22982
|
};
|
|
22700
22983
|
|
|
@@ -22712,8 +22995,8 @@ var SearchBox = function (_a) {
|
|
|
22712
22995
|
return (React.createElement(React.Fragment, null, imageLarge && imageSmall ? (React.createElement(React.Fragment, null,
|
|
22713
22996
|
React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
|
|
22714
22997
|
partialVisibility: true,
|
|
22715
|
-
} }, function (src) { return (React.createElement(Container$
|
|
22716
|
-
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$
|
|
22998
|
+
} }, function (src) { return (React.createElement(Container$H, { image: src, "data-testid": "SearchBox" }, searchInner)); }),
|
|
22999
|
+
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$H, { "data-testid": "SearchBox" }, searchInner))));
|
|
22717
23000
|
};
|
|
22718
23001
|
|
|
22719
23002
|
var VideoProvider;
|
|
@@ -22903,7 +23186,7 @@ var AccessibleLink = function (_a) {
|
|
|
22903
23186
|
})));
|
|
22904
23187
|
};
|
|
22905
23188
|
|
|
22906
|
-
const Container$
|
|
23189
|
+
const Container$F = styled.div`
|
|
22907
23190
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
22908
23191
|
background: ${(props) =>
|
|
22909
23192
|
props.alertType === 'alert'
|
|
@@ -23034,7 +23317,7 @@ const handleContainerPadding = (noBackground, noPadding) => {
|
|
|
23034
23317
|
}
|
|
23035
23318
|
};
|
|
23036
23319
|
|
|
23037
|
-
const Container$
|
|
23320
|
+
const Container$E = styled.div`
|
|
23038
23321
|
background: ${(props) =>
|
|
23039
23322
|
props.noBackground
|
|
23040
23323
|
? 'transparent'
|
|
@@ -23076,7 +23359,7 @@ const MaxWidth = styled.div`
|
|
|
23076
23359
|
*/
|
|
23077
23360
|
var MaxWidthContainer = function (_a) {
|
|
23078
23361
|
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$
|
|
23362
|
+
return (React.createElement(Container$E, { noBackground: noBackground, noPadding: noPadding },
|
|
23080
23363
|
React.createElement(MaxWidth, __assign$2({ className: classes, overflowVisible: overflowVisible }, props), children)));
|
|
23081
23364
|
};
|
|
23082
23365
|
|
|
@@ -23147,7 +23430,7 @@ var AlertBanner = function (_a) {
|
|
|
23147
23430
|
setShowAlert(false);
|
|
23148
23431
|
};
|
|
23149
23432
|
return (showAlert &&
|
|
23150
|
-
notServer && (React.createElement(Container$
|
|
23433
|
+
notServer && (React.createElement(Container$F, { alertType: alertType, "data-testid": "AlertBanner" },
|
|
23151
23434
|
React.createElement(MaxWidthContainer, { noBackground: true },
|
|
23152
23435
|
React.createElement(InnerContainer$1, null,
|
|
23153
23436
|
React.createElement(BannerContentContainer, null,
|
|
@@ -23161,7 +23444,7 @@ var AlertBanner = function (_a) {
|
|
|
23161
23444
|
"Dismiss"))))));
|
|
23162
23445
|
};
|
|
23163
23446
|
|
|
23164
|
-
const Container$
|
|
23447
|
+
const Container$D = styled.a`
|
|
23165
23448
|
|
|
23166
23449
|
|
|
23167
23450
|
|
|
@@ -23219,10 +23502,10 @@ const Container$E = styled.a`
|
|
|
23219
23502
|
|
|
23220
23503
|
var BackLink = function (_a) {
|
|
23221
23504
|
var link = _a.link;
|
|
23222
|
-
return (React.createElement(Container$
|
|
23505
|
+
return (React.createElement(Container$D, { href: link, "data-testid": "BackLink" }, "Back"));
|
|
23223
23506
|
};
|
|
23224
23507
|
|
|
23225
|
-
const Container$
|
|
23508
|
+
const Container$C = styled.div`
|
|
23226
23509
|
padding-top: 20px;
|
|
23227
23510
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23228
23511
|
margin-bottom: ${(props) => (props.hasMargin ? props.theme.theme_vars.spacingSizes.large : 0)};
|
|
@@ -23289,14 +23572,14 @@ const BreadcrumbLink$1 = styled.a`
|
|
|
23289
23572
|
|
|
23290
23573
|
var Breadcrumbs = function (_a) {
|
|
23291
23574
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
23292
|
-
return (React.createElement(Container$
|
|
23575
|
+
return (React.createElement(Container$C, { hasMargin: hasMargin, "data-testid": "Breadcrumbs" },
|
|
23293
23576
|
React.createElement(List$2, null, breadcrumbsArray.map(function (crumb) { return (React.createElement(Crumb, { key: crumb.title }, React.createElement(React.Fragment, null,
|
|
23294
23577
|
React.createElement(BreadcrumbLink$1, { href: crumb.url, title: crumb.title }, crumb.title),
|
|
23295
23578
|
React.createElement(IconWrapper$4, null,
|
|
23296
23579
|
React.createElement(ChevronIcon, { direction: 'right', colourFill: "#C6C6C6" }))))); }))));
|
|
23297
23580
|
};
|
|
23298
23581
|
|
|
23299
|
-
const Container$
|
|
23582
|
+
const Container$B = styled.div`
|
|
23300
23583
|
display: block;
|
|
23301
23584
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
23302
23585
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -23344,12 +23627,12 @@ const CurrentPage = styled.span`
|
|
|
23344
23627
|
|
|
23345
23628
|
var Contents$1 = function (_a) {
|
|
23346
23629
|
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$
|
|
23630
|
+
return (React.createElement(Container$B, { "data-testid": "Contents" },
|
|
23348
23631
|
React.createElement(Heading, { text: title, level: 2 }),
|
|
23349
23632
|
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
23633
|
};
|
|
23351
23634
|
|
|
23352
|
-
const Container$
|
|
23635
|
+
const Container$A = styled.div`
|
|
23353
23636
|
display: block;
|
|
23354
23637
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23355
23638
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -23399,7 +23682,7 @@ var ContentsNavigation = function (_a) {
|
|
|
23399
23682
|
};
|
|
23400
23683
|
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
23401
23684
|
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
23402
|
-
return (React.createElement(Container$
|
|
23685
|
+
return (React.createElement(Container$A, { "data-testid": "ContentsNavigation" },
|
|
23403
23686
|
previousPage && (React.createElement(NavigationLink, { href: previousPage.url },
|
|
23404
23687
|
React.createElement(Arrow, null, "\u2190"),
|
|
23405
23688
|
React.createElement(LinkText, null,
|
|
@@ -23414,7 +23697,7 @@ var ContentsNavigation = function (_a) {
|
|
|
23414
23697
|
React.createElement(PageTitle$1, null, nextPage.title))))));
|
|
23415
23698
|
};
|
|
23416
23699
|
|
|
23417
|
-
const Container$
|
|
23700
|
+
const Container$z = styled.div`
|
|
23418
23701
|
${props => props.theme.fontStyles}
|
|
23419
23702
|
background-color: ${props => props.theme.theme_vars.colours.grey_light};
|
|
23420
23703
|
padding: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -23525,77 +23808,6 @@ const ButtonsContainer = styled.div`
|
|
|
23525
23808
|
}
|
|
23526
23809
|
`;
|
|
23527
23810
|
|
|
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
23811
|
var dayjs_min = {exports: {}};
|
|
23600
23812
|
|
|
23601
23813
|
(function (module, exports) {
|
|
@@ -23707,18 +23919,18 @@ var CookieBanner = function (_a) {
|
|
|
23707
23919
|
hideCookiesAcceptedConfirmationBanner();
|
|
23708
23920
|
};
|
|
23709
23921
|
return (React.createElement(React.Fragment, null,
|
|
23710
|
-
showCookieBanner && (React.createElement(Container$
|
|
23922
|
+
showCookieBanner && (React.createElement(Container$z, { "data-testid": "CookieBanner" },
|
|
23711
23923
|
React.createElement(CookieMessage, null,
|
|
23712
23924
|
React.createElement(CookieHeading, null, title),
|
|
23713
23925
|
React.createElement(CookieParagraph, null, paragraph),
|
|
23714
23926
|
React.createElement(ButtonsContainer, null,
|
|
23715
23927
|
React.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: true, onClick: acceptCookies }),
|
|
23716
23928
|
React.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: true, onClick: rejectCookies }))))),
|
|
23717
|
-
showCookiesRejectedBanner && (React.createElement(Container$
|
|
23929
|
+
showCookiesRejectedBanner && (React.createElement(Container$z, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
23718
23930
|
React.createElement(CookieMessage, { isInline: true },
|
|
23719
23931
|
React.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
23720
23932
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
23721
|
-
showCookiesAcceptedBanner && (React.createElement(Container$
|
|
23933
|
+
showCookiesAcceptedBanner && (React.createElement(Container$z, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
23722
23934
|
React.createElement(CookieMessage, { isInline: true },
|
|
23723
23935
|
React.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
23724
23936
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -23764,7 +23976,7 @@ var DisplayDate = function (_a) {
|
|
|
23764
23976
|
postText));
|
|
23765
23977
|
};
|
|
23766
23978
|
|
|
23767
|
-
const Container$
|
|
23979
|
+
const Container$y = styled.footer`
|
|
23768
23980
|
background-color: ${(props) => props.theme.theme_vars.colours.black};
|
|
23769
23981
|
padding: 25px 0;
|
|
23770
23982
|
`;
|
|
@@ -23939,7 +24151,7 @@ var ServiceIcon = function (_a) {
|
|
|
23939
24151
|
var Footer = function (_a) {
|
|
23940
24152
|
var _b = _a.footerLinksArray, footerLinksArray = _b === void 0 ? null : _b, _c = _a.year, year = _c === void 0 ? new Date().getFullYear() : _c;
|
|
23941
24153
|
var themeContext = useContext(ThemeContext);
|
|
23942
|
-
return (React.createElement(Container$
|
|
24154
|
+
return (React.createElement(Container$y, { "data-testid": "Footer" },
|
|
23943
24155
|
React.createElement(StyledMaxWidthContainer$3, { noBackground: true },
|
|
23944
24156
|
React.createElement(FooterAlignment, null,
|
|
23945
24157
|
React.createElement("div", null,
|
|
@@ -23972,7 +24184,7 @@ var Footer = function (_a) {
|
|
|
23972
24184
|
: '' }, themeContext.cardinal_name === 'north' ? (React.createElement(NorthWhiteLogo, null)) : themeContext.cardinal_name === 'west' ? (React.createElement(WestWhiteLogo, null)) : (React.createElement(GDSLogo, null)))))));
|
|
23973
24185
|
};
|
|
23974
24186
|
|
|
23975
|
-
const Container$
|
|
24187
|
+
const Container$x = styled.div`
|
|
23976
24188
|
background: ${(props) => (props.hasBackground ? props.theme.theme_vars.colours.grey_light : 'transparent')};
|
|
23977
24189
|
padding: ${(props) => (props.hasPadding ? '50px 0 20px' : '0')};
|
|
23978
24190
|
`;
|
|
@@ -23982,7 +24194,7 @@ const Container$y = styled.div`
|
|
|
23982
24194
|
*/
|
|
23983
24195
|
var FullWidthContainer = function (_a) {
|
|
23984
24196
|
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$
|
|
24197
|
+
return (React.createElement(Container$x, { hasBackground: hasBackground, hasPadding: hasPadding, "data-testid": "FullWidthContainer" }, children));
|
|
23986
24198
|
};
|
|
23987
24199
|
|
|
23988
24200
|
/**
|
|
@@ -24014,7 +24226,7 @@ const headerThemeStyles = (props) => {
|
|
|
24014
24226
|
}
|
|
24015
24227
|
};
|
|
24016
24228
|
|
|
24017
|
-
const Container$
|
|
24229
|
+
const Container$w = styled.header`
|
|
24018
24230
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24019
24231
|
padding: 3px 0;
|
|
24020
24232
|
${headerThemeStyles}
|
|
@@ -24179,7 +24391,7 @@ var NorthColouredLogo = function () {
|
|
|
24179
24391
|
React.createElement("path", { fill: "#fff", d: "M0 0H974V327H0z" })))));
|
|
24180
24392
|
};
|
|
24181
24393
|
|
|
24182
|
-
const Container$
|
|
24394
|
+
const Container$v = styled.div`
|
|
24183
24395
|
${props => props.theme.fontStyles}
|
|
24184
24396
|
width: calc(100% - ${ props => props.isLarge ? "5rem" : "3rem"});
|
|
24185
24397
|
`;
|
|
@@ -24325,7 +24537,7 @@ var Searchbar = function (_a) {
|
|
|
24325
24537
|
/**
|
|
24326
24538
|
* Render the component
|
|
24327
24539
|
*/
|
|
24328
|
-
return (React.createElement(Container$
|
|
24540
|
+
return (React.createElement(Container$v, { "data-testid": "Searchbar", isLarge: isLarge },
|
|
24329
24541
|
React.createElement("form", { onSubmit: handleSubmit },
|
|
24330
24542
|
React.createElement("div", { role: "search" },
|
|
24331
24543
|
React.createElement(InputWrapper, null,
|
|
@@ -24380,7 +24592,7 @@ var Header = function (_a) {
|
|
|
24380
24592
|
}
|
|
24381
24593
|
};
|
|
24382
24594
|
return (React.createElement(React.Fragment, null,
|
|
24383
|
-
React.createElement(Container$
|
|
24595
|
+
React.createElement(Container$w, __assign$2({}, props, { "data-testid": "Header" }),
|
|
24384
24596
|
React.createElement(StyledMaxWidthContainer$2, { noBackground: true },
|
|
24385
24597
|
React.createElement(LogoWrapper, null,
|
|
24386
24598
|
React.createElement(HomeLink, { href: homeLink, title: "Home", id: "logo" }, themeLogos(themeContext.cardinal_name, themeContext.is_memorial))),
|
|
@@ -24400,7 +24612,7 @@ var Header = function (_a) {
|
|
|
24400
24612
|
* Hero image container with optional dark gradient for non-box mode
|
|
24401
24613
|
* Optimised for an image in 16:5 ratio on all but small width screens
|
|
24402
24614
|
*/
|
|
24403
|
-
const Container$
|
|
24615
|
+
const Container$u = styled.div`
|
|
24404
24616
|
background-image: ${(props) =>
|
|
24405
24617
|
!props.backgroundBox ? `linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)),` : ``}
|
|
24406
24618
|
url('${(props) => props.image}');
|
|
@@ -24564,7 +24776,7 @@ var HeroImage = function (_a) {
|
|
|
24564
24776
|
return (React.createElement(React.Fragment, null,
|
|
24565
24777
|
React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
|
|
24566
24778
|
partialVisibility: true,
|
|
24567
|
-
} }, function (src) { return (React.createElement(Container$
|
|
24779
|
+
} }, function (src) { return (React.createElement(Container$u, { image: src, backgroundBox: backgroundBox, "data-testid": "HeroImage" },
|
|
24568
24780
|
React.createElement(InnerContainer, null,
|
|
24569
24781
|
React.createElement(Overlay, { backgroundBox: backgroundBox, "data-testid": "HeroImageOverlay" },
|
|
24570
24782
|
breadcrumb && (React.createElement(BreadcrumbLink, { href: breadcrumb.url, backgroundBox: backgroundBox }, breadcrumb.title)),
|
|
@@ -24587,7 +24799,7 @@ const Wrapper$3 = styled.header`
|
|
|
24587
24799
|
: props.theme.theme_vars.colours.white};
|
|
24588
24800
|
`;
|
|
24589
24801
|
|
|
24590
|
-
const Container$
|
|
24802
|
+
const Container$t = styled.div`
|
|
24591
24803
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24592
24804
|
overflow: hidden;
|
|
24593
24805
|
background: ${(props) => props.theme.theme_vars.colours.action}5A;
|
|
@@ -24731,7 +24943,7 @@ var HomeHero = function (_a) {
|
|
|
24731
24943
|
React.createElement(Wrapper$3, null,
|
|
24732
24944
|
React.createElement(LazyImage, { src: random !== 999 && imagesArray[random].image1440x810 ? imagesArray[random].image1440x810 : '', placeholder: random !== 999 && imagesArray[random].image144x81 ? imagesArray[random].image144x81 : '', visibilitySensorProps: {
|
|
24733
24945
|
partialVisibility: true,
|
|
24734
|
-
} }, function (src) { return (React.createElement(Container$
|
|
24946
|
+
} }, function (src) { return (React.createElement(Container$t, { className: random !== 999 ? 'loaded' : 'loading', image: src, title: random !== 999 && imagesArray[random].imageAltText ? imagesArray[random].imageAltText : '' },
|
|
24735
24947
|
React.createElement(StyledMaxWidthContainer$1, null,
|
|
24736
24948
|
React.createElement(MainBox, null,
|
|
24737
24949
|
topline && React.createElement(Topline, null, topline),
|
|
@@ -24755,7 +24967,7 @@ const Wrapper$2 = styled.section`
|
|
|
24755
24967
|
padding-bottom: 0px;
|
|
24756
24968
|
`;
|
|
24757
24969
|
|
|
24758
|
-
const Container$
|
|
24970
|
+
const Container$s = styled.div`
|
|
24759
24971
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
24760
24972
|
display: flex;
|
|
24761
24973
|
flex-wrap: wrap;
|
|
@@ -24895,7 +25107,7 @@ var MemorialHero = function (_a) {
|
|
|
24895
25107
|
React.createElement(HiddenH1, null,
|
|
24896
25108
|
themeContext.full_name,
|
|
24897
25109
|
" Council"),
|
|
24898
|
-
React.createElement(Container$
|
|
25110
|
+
React.createElement(Container$s, null,
|
|
24899
25111
|
React.createElement(Left, null,
|
|
24900
25112
|
children,
|
|
24901
25113
|
React.createElement(ThemeProvider, { theme: theme }, councilServices)),
|
|
@@ -24925,7 +25137,7 @@ var NewsArticleDate = function (_a) {
|
|
|
24925
25137
|
const imageHeightMobile = 150;
|
|
24926
25138
|
const imageHeightDesktop = 200;
|
|
24927
25139
|
|
|
24928
|
-
const Container$
|
|
25140
|
+
const Container$r = styled.div`
|
|
24929
25141
|
${(props) => props.theme.fontStyles};
|
|
24930
25142
|
padding: 15px 0;
|
|
24931
25143
|
|
|
@@ -25064,7 +25276,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
25064
25276
|
if (articles && articles.length > 0) {
|
|
25065
25277
|
return (React.createElement(React.Fragment, null,
|
|
25066
25278
|
!withoutTitle && React.createElement(Heading, { text: "News articles and press releases" }),
|
|
25067
|
-
React.createElement(Container$
|
|
25279
|
+
React.createElement(Container$r, null,
|
|
25068
25280
|
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
25281
|
React.createElement(ArticleContainer$1, { href: article.url },
|
|
25070
25282
|
React.createElement(Row$1, null,
|
|
@@ -25085,7 +25297,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
25085
25297
|
}
|
|
25086
25298
|
};
|
|
25087
25299
|
|
|
25088
|
-
const Container$
|
|
25300
|
+
const Container$q = styled.div`
|
|
25089
25301
|
/* margin-top: 50px; */
|
|
25090
25302
|
/* border: 1px solid red; */
|
|
25091
25303
|
|
|
@@ -25187,7 +25399,7 @@ const FilterHeading = styled.h2`
|
|
|
25187
25399
|
// display: block;
|
|
25188
25400
|
// overflow: hidden;
|
|
25189
25401
|
|
|
25190
|
-
const Container$
|
|
25402
|
+
const Container$p = styled.a`
|
|
25191
25403
|
${props => props.theme.linkStyles}
|
|
25192
25404
|
color: ${props => props.theme.theme_vars.colours.negative} !important;
|
|
25193
25405
|
font-weight: normal;
|
|
@@ -25216,7 +25428,7 @@ var RemoveAllFilters = function (_a) {
|
|
|
25216
25428
|
e.preventDefault();
|
|
25217
25429
|
removeParams(__spreadArray(__spreadArray([], NewsArticleFilterFields.removeFiltersList, true), ['page'], false));
|
|
25218
25430
|
};
|
|
25219
|
-
return (React.createElement(Container$
|
|
25431
|
+
return (React.createElement(Container$p, { "data-testid": "RemoveAllFilters", href: "#", onClick: removeAllFilters },
|
|
25220
25432
|
"Clear ",
|
|
25221
25433
|
searchValue.length > 0 && 'search term and ',
|
|
25222
25434
|
"filters",
|
|
@@ -25263,7 +25475,7 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
25263
25475
|
section.isExpanded = false;
|
|
25264
25476
|
}
|
|
25265
25477
|
});
|
|
25266
|
-
return (React.createElement(Container$
|
|
25478
|
+
return (React.createElement(Container$q, { "data-testid": "NewsArticleFilterAccordion" },
|
|
25267
25479
|
React.createElement(ShowFiltersButton, { onClick: showFullscreenFilters, "aria-expanded": !!isFullScreen, "aria-controls": "PageFilters" },
|
|
25268
25480
|
"Show Search and filters",
|
|
25269
25481
|
count > 0 && " (".concat(count, ")")),
|
|
@@ -25330,7 +25542,7 @@ var NewsArticleImage = function (_a) {
|
|
|
25330
25542
|
})));
|
|
25331
25543
|
};
|
|
25332
25544
|
|
|
25333
|
-
const Container$
|
|
25545
|
+
const Container$o = styled.div`
|
|
25334
25546
|
${(props) => props.theme.fontStyles};
|
|
25335
25547
|
`;
|
|
25336
25548
|
|
|
@@ -25451,7 +25663,7 @@ var NewsArticleList = function (_a) {
|
|
|
25451
25663
|
var results = _a.results;
|
|
25452
25664
|
var extractLength = 140;
|
|
25453
25665
|
if (results && results.length > 0) {
|
|
25454
|
-
return (React.createElement(Container$
|
|
25666
|
+
return (React.createElement(Container$o, { "data-testid": "NewsArticleList" },
|
|
25455
25667
|
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
25668
|
React.createElement(ArticleContainer, { href: article.url, title: article.title },
|
|
25457
25669
|
article.image720x405 && (React.createElement(LazyImage, { src: article.image720x405, placeholder: article.image72x41, visibilitySensorProps: {
|
|
@@ -25466,12 +25678,12 @@ var NewsArticleList = function (_a) {
|
|
|
25466
25678
|
React.createElement(NewsArticleDate, { text: article.date.toString(), format: "X" })))))); }))));
|
|
25467
25679
|
}
|
|
25468
25680
|
else {
|
|
25469
|
-
return (React.createElement(Container$
|
|
25681
|
+
return (React.createElement(Container$o, { "data-testid": "NewsArticleList" },
|
|
25470
25682
|
React.createElement(ResultInfo$3, null, "No results found")));
|
|
25471
25683
|
}
|
|
25472
25684
|
};
|
|
25473
25685
|
|
|
25474
|
-
const Container$
|
|
25686
|
+
const Container$n = styled.div`
|
|
25475
25687
|
${props => props.theme.fontStyles};
|
|
25476
25688
|
padding-bottom: 20px;
|
|
25477
25689
|
border-bottom: 1px solid ${props => props.theme.theme_vars.colours.grey};
|
|
@@ -25545,7 +25757,7 @@ const Preposition = styled.div`
|
|
|
25545
25757
|
font-size: 80%;
|
|
25546
25758
|
`;
|
|
25547
25759
|
|
|
25548
|
-
const Container$
|
|
25760
|
+
const Container$m = styled.span`
|
|
25549
25761
|
margin: 0 5px;
|
|
25550
25762
|
display: inline-block;
|
|
25551
25763
|
position: relative;
|
|
@@ -25606,7 +25818,7 @@ var RemovableTag = function (_a) {
|
|
|
25606
25818
|
var index = _a.index, preposition = _a.preposition, label = _a.label; _a.value; _a.param; var clickHandler = _a.clickHandler;
|
|
25607
25819
|
return (React.createElement(Wrapper$1, { "data-testid": "RemovableTag" },
|
|
25608
25820
|
index > 0 && preposition && React.createElement(Preposition, null, preposition),
|
|
25609
|
-
React.createElement(Container$
|
|
25821
|
+
React.createElement(Container$m, null,
|
|
25610
25822
|
React.createElement(Text, null, label),
|
|
25611
25823
|
React.createElement(Button$2, { "aria-label": "Remove filter ".concat(label), onClick: clickHandler }, "x"))));
|
|
25612
25824
|
};
|
|
@@ -25626,7 +25838,7 @@ var NewsArticleListHeader = function (_a) {
|
|
|
25626
25838
|
var removeFilterValue = function (param, value) {
|
|
25627
25839
|
removeValueFromParam(param, value);
|
|
25628
25840
|
};
|
|
25629
|
-
return (React.createElement(Container$
|
|
25841
|
+
return (React.createElement(Container$n, { "data-testid": "NewsArticleListHeader" },
|
|
25630
25842
|
React.createElement(LeftCol, null,
|
|
25631
25843
|
totalResults,
|
|
25632
25844
|
" article",
|
|
@@ -25680,7 +25892,7 @@ var NewsArticleOldBanner = function (_a) {
|
|
|
25680
25892
|
React.createElement("strong", null, "1 year old")));
|
|
25681
25893
|
};
|
|
25682
25894
|
|
|
25683
|
-
const Container$
|
|
25895
|
+
const Container$l = styled.main`
|
|
25684
25896
|
padding-top: 30px;
|
|
25685
25897
|
|
|
25686
25898
|
a {
|
|
@@ -25793,10 +26005,10 @@ const Container$m = styled.main`
|
|
|
25793
26005
|
*/
|
|
25794
26006
|
var PageMain = function (_a) {
|
|
25795
26007
|
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$
|
|
26008
|
+
return (React.createElement(Container$l, __assign$2({ id: "main", className: classes, fullWidthText: fullWidthText }, props, { "data-testid": "PageMain" }), children));
|
|
25797
26009
|
};
|
|
25798
26010
|
|
|
25799
|
-
const Container$
|
|
26011
|
+
const Container$k = styled.aside`
|
|
25800
26012
|
padding-top: 30px;
|
|
25801
26013
|
`;
|
|
25802
26014
|
|
|
@@ -25805,10 +26017,10 @@ const Container$l = styled.aside`
|
|
|
25805
26017
|
*/
|
|
25806
26018
|
var PageSidebar = function (_a) {
|
|
25807
26019
|
var children = _a.children;
|
|
25808
|
-
return (React.createElement(Container$
|
|
26020
|
+
return (React.createElement(Container$k, { className: "sidebar" }, children));
|
|
25809
26021
|
};
|
|
25810
26022
|
|
|
25811
|
-
const Container$
|
|
26023
|
+
const Container$j = styled.div`
|
|
25812
26024
|
padding-top: 30px;
|
|
25813
26025
|
|
|
25814
26026
|
h1 {
|
|
@@ -25821,10 +26033,10 @@ const Container$k = styled.div`
|
|
|
25821
26033
|
*/
|
|
25822
26034
|
var PageTitle = function (_a) {
|
|
25823
26035
|
var children = _a.children, classes = _a.classes, props = __rest(_a, ["children", "classes"]);
|
|
25824
|
-
return (React.createElement(Container$
|
|
26036
|
+
return (React.createElement(Container$j, __assign$2({ "data-testid": "title", className: classes }, props), children));
|
|
25825
26037
|
};
|
|
25826
26038
|
|
|
25827
|
-
const Container$
|
|
26039
|
+
const Container$i = styled.div`
|
|
25828
26040
|
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
25829
26041
|
display: flex;
|
|
25830
26042
|
flex-wrap: wrap;
|
|
@@ -25866,7 +26078,7 @@ const Container$j = styled.div`
|
|
|
25866
26078
|
*/
|
|
25867
26079
|
var PageWithSidebarContainer = function (_a) {
|
|
25868
26080
|
var _b = _a.sidebarLeft, sidebarLeft = _b === void 0 ? false : _b, children = _a.children;
|
|
25869
|
-
return (React.createElement(Container$
|
|
26081
|
+
return (React.createElement(Container$i, { sidebarLeft: sidebarLeft }, children));
|
|
25870
26082
|
};
|
|
25871
26083
|
|
|
25872
26084
|
const backgroundDecider = props => {
|
|
@@ -25885,14 +26097,14 @@ const backgroundDecider = props => {
|
|
|
25885
26097
|
};
|
|
25886
26098
|
|
|
25887
26099
|
|
|
25888
|
-
const Container$
|
|
26100
|
+
const Container$h = styled.div`
|
|
25889
26101
|
${backgroundDecider};
|
|
25890
26102
|
padding-top: 1.5em;
|
|
25891
26103
|
`;
|
|
25892
26104
|
|
|
25893
26105
|
var PageWrapper = function (_a) {
|
|
25894
26106
|
var colour = _a.colour, children = _a.children;
|
|
25895
|
-
return (React.createElement(Container$
|
|
26107
|
+
return (React.createElement(Container$h, { "data-testid": "PageWrapper", colour: colour }, children));
|
|
25896
26108
|
};
|
|
25897
26109
|
|
|
25898
26110
|
const Wrapper = styled.div`
|
|
@@ -25958,7 +26170,7 @@ var PhaseBanner = function (_a) {
|
|
|
25958
26170
|
React.createElement(PhaseText, null, "This site is new and we are improving it every day."))));
|
|
25959
26171
|
};
|
|
25960
26172
|
|
|
25961
|
-
const Container$
|
|
26173
|
+
const Container$g = styled.div`
|
|
25962
26174
|
${(props) => props.theme.fontStyles};
|
|
25963
26175
|
`;
|
|
25964
26176
|
|
|
@@ -26115,11 +26327,11 @@ var SearchResultsList = function (_a) {
|
|
|
26115
26327
|
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
26328
|
var themeContext = useContext(ThemeContext);
|
|
26117
26329
|
if (totalResults === 0) {
|
|
26118
|
-
return (React.createElement(Container$
|
|
26330
|
+
return (React.createElement(Container$g, { "data-testid": "SearchResultsList" },
|
|
26119
26331
|
React.createElement(ResultInfo$2, null, "No results found")));
|
|
26120
26332
|
}
|
|
26121
26333
|
else {
|
|
26122
|
-
return (React.createElement(Container$
|
|
26334
|
+
return (React.createElement(Container$g, { "data-testid": "SearchResultsList" },
|
|
26123
26335
|
React.createElement(ResultInfo$2, null,
|
|
26124
26336
|
pageNumber > 1 && 'Page ' + pageNumber + ' of ',
|
|
26125
26337
|
totalResults,
|
|
@@ -26136,7 +26348,7 @@ var SearchResultsList = function (_a) {
|
|
|
26136
26348
|
}
|
|
26137
26349
|
};
|
|
26138
26350
|
|
|
26139
|
-
const Container$
|
|
26351
|
+
const Container$f = styled.div``;
|
|
26140
26352
|
|
|
26141
26353
|
const SectionTitle$1 = styled(Heading)`
|
|
26142
26354
|
background: ${(props) =>
|
|
@@ -26228,7 +26440,7 @@ styled.img`
|
|
|
26228
26440
|
*/
|
|
26229
26441
|
var SectionLinks = function (_a) {
|
|
26230
26442
|
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$
|
|
26443
|
+
return (React.createElement(Container$f, { id: sectionSlug, "data-testid": "SectionLinks" },
|
|
26232
26444
|
displayTitle ? React.createElement(SectionTitle$1, { text: sectionTitle }) : React.createElement("br", null),
|
|
26233
26445
|
React.createElement(Row$1, { isList: true }, pageLinksArray.map(function (link, i) {
|
|
26234
26446
|
var _a;
|
|
@@ -26242,7 +26454,7 @@ var SectionLinks = function (_a) {
|
|
|
26242
26454
|
}))));
|
|
26243
26455
|
};
|
|
26244
26456
|
|
|
26245
|
-
const Container$
|
|
26457
|
+
const Container$e = styled.aside`
|
|
26246
26458
|
padding-top: 20px;
|
|
26247
26459
|
display: block;
|
|
26248
26460
|
|
|
@@ -26326,7 +26538,7 @@ const InlineLink = styled.a`
|
|
|
26326
26538
|
|
|
26327
26539
|
var SectionLinksMobileContents = function (_a) {
|
|
26328
26540
|
var sectionLinksArray = _a.sectionLinksArray;
|
|
26329
|
-
return (React.createElement(Container$
|
|
26541
|
+
return (React.createElement(Container$e, null,
|
|
26330
26542
|
React.createElement(Contents, null,
|
|
26331
26543
|
React.createElement(ContentsTitle, null, "Contents"),
|
|
26332
26544
|
React.createElement(ContentsList, null, sectionLinksArray.map(function (link) {
|
|
@@ -26335,7 +26547,7 @@ var SectionLinksMobileContents = function (_a) {
|
|
|
26335
26547
|
})))));
|
|
26336
26548
|
};
|
|
26337
26549
|
|
|
26338
|
-
const Container$
|
|
26550
|
+
const Container$d = styled.div`
|
|
26339
26551
|
${(props) => props.theme.fontStyles}
|
|
26340
26552
|
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
26341
26553
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -26486,7 +26698,7 @@ const ListItemLink = styled.a`
|
|
|
26486
26698
|
var SectionLinksSidebar = function (_a) {
|
|
26487
26699
|
var Title = _a.Title, Sections = _a.Sections;
|
|
26488
26700
|
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
|
26489
|
-
return (React.createElement(Container$
|
|
26701
|
+
return (React.createElement(Container$d, { "data-testid": "SectionLinksSidebar" },
|
|
26490
26702
|
React.createElement(MobileTitleButton, { onClick: function () { return (open ? setOpen(false) : setOpen(true)); } },
|
|
26491
26703
|
Title,
|
|
26492
26704
|
React.createElement(IconWrapper$2, null,
|
|
@@ -26498,7 +26710,7 @@ var SectionLinksSidebar = function (_a) {
|
|
|
26498
26710
|
React.createElement(ListItemLink, { href: link.url }, link.title))); })))); }))));
|
|
26499
26711
|
};
|
|
26500
26712
|
|
|
26501
|
-
const Container$
|
|
26713
|
+
const Container$c = styled.div`
|
|
26502
26714
|
position: relative;
|
|
26503
26715
|
`;
|
|
26504
26716
|
|
|
@@ -26650,7 +26862,7 @@ var ServiceLinksBoxed = function (_a) {
|
|
|
26650
26862
|
var _a;
|
|
26651
26863
|
return (_a = refs.current[index]) !== null && _a !== void 0 ? _a : React.createRef();
|
|
26652
26864
|
});
|
|
26653
|
-
return (React.createElement(Container$
|
|
26865
|
+
return (React.createElement(Container$c, { "data-testid": "ServiceLinksBoxed" },
|
|
26654
26866
|
React.createElement(Row$1, null, serviceLinksArray.map(function (serviceLink, index) {
|
|
26655
26867
|
var _a;
|
|
26656
26868
|
return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
@@ -26687,7 +26899,7 @@ const containerMaxHeight = (props) => {
|
|
|
26687
26899
|
}
|
|
26688
26900
|
};
|
|
26689
26901
|
|
|
26690
|
-
const Container$
|
|
26902
|
+
const Container$b = styled.div`
|
|
26691
26903
|
${(props) => props.theme.fontStyles}
|
|
26692
26904
|
${containerMaxHeight}
|
|
26693
26905
|
|
|
@@ -27102,7 +27314,7 @@ var ServicesLinksList = function (_a) {
|
|
|
27102
27314
|
}
|
|
27103
27315
|
}, [currentOrder]);
|
|
27104
27316
|
return (React.createElement(React.Fragment, null,
|
|
27105
|
-
React.createElement(Container$
|
|
27317
|
+
React.createElement(Container$b, { id: serviceId, className: open && 'open', hideHeader: hideHeader, isBoxed: isBoxed },
|
|
27106
27318
|
!hideHeader && (React.createElement(HomeTitle, { "data-testid": "servicesLinksListHeader" },
|
|
27107
27319
|
React.createElement(Heading, { text: "Council services" }),
|
|
27108
27320
|
React.createElement(ReorderControl, null,
|
|
@@ -27131,7 +27343,7 @@ var ServicesLinksList = function (_a) {
|
|
|
27131
27343
|
" services")))));
|
|
27132
27344
|
};
|
|
27133
27345
|
|
|
27134
|
-
const Container$
|
|
27346
|
+
const Container$a = styled.div`
|
|
27135
27347
|
${props => props.theme.fontStyles}
|
|
27136
27348
|
max-width: 500px;
|
|
27137
27349
|
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
@@ -27178,7 +27390,7 @@ const SingleButtonContainer = styled.div`
|
|
|
27178
27390
|
}
|
|
27179
27391
|
`;
|
|
27180
27392
|
|
|
27181
|
-
const Container$
|
|
27393
|
+
const Container$9 = styled.div`
|
|
27182
27394
|
strong {
|
|
27183
27395
|
font-weight: bold;
|
|
27184
27396
|
}
|
|
@@ -27254,7 +27466,7 @@ const PostcodeResult = styled.div`
|
|
|
27254
27466
|
max-width: calc(100% - 30px);
|
|
27255
27467
|
}
|
|
27256
27468
|
`;
|
|
27257
|
-
const Line
|
|
27469
|
+
const Line = styled.div`
|
|
27258
27470
|
background: ${(props) => props.theme.theme_vars.colours.grey_dark};
|
|
27259
27471
|
width: 5px;
|
|
27260
27472
|
border-radius: 2px;
|
|
@@ -27319,50 +27531,6 @@ var HintText = function (_a) {
|
|
|
27319
27531
|
return (React.createElement(HintText$1, null, text));
|
|
27320
27532
|
};
|
|
27321
27533
|
|
|
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
27534
|
const Spinner = styled.div`
|
|
27367
27535
|
display: inline-block;
|
|
27368
27536
|
width: 80px;
|
|
@@ -27512,7 +27680,7 @@ var PostCodeSearch = function (_a) {
|
|
|
27512
27680
|
setCurrentPostcode(currentPostcode + ' (' + singleAddress.title + ')');
|
|
27513
27681
|
}
|
|
27514
27682
|
}
|
|
27515
|
-
return (React.createElement(Container$
|
|
27683
|
+
return (React.createElement(Container$9, { "data-testid": "PostCodeSearch" },
|
|
27516
27684
|
React.createElement(DropDownButton, { onClick: function () { return setOpen(open ? false : true); } },
|
|
27517
27685
|
React.createElement(IconWrapper, null,
|
|
27518
27686
|
React.createElement(ChevronIcon, { direction: open ? 'down' : 'right', colourFill: themeContext.theme_vars.colours.black })),
|
|
@@ -27527,9 +27695,9 @@ var PostCodeSearch = function (_a) {
|
|
|
27527
27695
|
React.createElement(Label$2, { htmlFor: "postcode" },
|
|
27528
27696
|
"Enter your postcode",
|
|
27529
27697
|
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 })),
|
|
27698
|
+
React.createElement(Input$6, { type: "text", placeholder: "Enter a postcode", name: "postcode", errorText: errorText, isErrored: isError, maxLength: 10 })),
|
|
27531
27699
|
React.createElement(FormButton, { type: "submit", "aria-label": "Submit", text: "Find" })))) : (React.createElement(PostcodeResult, null,
|
|
27532
|
-
React.createElement(Line
|
|
27700
|
+
React.createElement(Line, null),
|
|
27533
27701
|
isMultiple ? (React.createElement("div", { className: "result" },
|
|
27534
27702
|
React.createElement("p", null,
|
|
27535
27703
|
"This postcode ",
|
|
@@ -27587,7 +27755,7 @@ var SignpostLinks = function (_a) {
|
|
|
27587
27755
|
var themeContext = useContext(ThemeContext);
|
|
27588
27756
|
var councilLink = otherCouncilLink ? otherCouncilLink : themeContext.theme_vars.other_council_link;
|
|
27589
27757
|
return (React.createElement(React.Fragment, null, signpostLinksArray.length > 1 ?
|
|
27590
|
-
React.createElement(Container$
|
|
27758
|
+
React.createElement(Container$a, null,
|
|
27591
27759
|
React.createElement(Paragraph, null, TopLineText),
|
|
27592
27760
|
React.createElement(SignpostLinksList, { signpostLinksArray: signpostLinksArray }),
|
|
27593
27761
|
React.createElement(PostCodeSearch, { otherCouncilLink: councilLink, signPostLinks: signpostLinksArray }),
|
|
@@ -29843,13 +30011,13 @@ var DirectoryServiceList = function (_a) {
|
|
|
29843
30011
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29844
30012
|
React.createElement(Label$1, { htmlFor: "directorySearch" }, "What are you looking for?"),
|
|
29845
30013
|
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) {
|
|
30014
|
+
React.createElement(Input$6, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
29847
30015
|
setSearchTerm(e.target.value);
|
|
29848
30016
|
} })),
|
|
29849
30017
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29850
30018
|
React.createElement(Label$1, { htmlFor: "postcode" }, "Postcode (optional)"),
|
|
29851
30019
|
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); } })),
|
|
30020
|
+
React.createElement(Input$6, { name: "postcode", type: "text", defaultValue: postcodeSearch, id: "postcode", onChange: function (e) { return setPostcodeSearch(e.target.value); } })),
|
|
29853
30021
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
29854
30022
|
React.createElement(ButtonContainer$1, null,
|
|
29855
30023
|
React.createElement(Button$1, { onClick: submitSearch, type: "submit" },
|
|
@@ -29883,10 +30051,10 @@ var DirectoryServiceList = function (_a) {
|
|
|
29883
30051
|
React.createElement(Row$1, null,
|
|
29884
30052
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
29885
30053
|
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" })),
|
|
30054
|
+
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
30055
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
29888
30056
|
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 :
|
|
30057
|
+
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
30058
|
categories.map(function (category, categoryIndex) { return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: category.label },
|
|
29891
30059
|
React.createElement(Fieldset$1, null,
|
|
29892
30060
|
React.createElement(Legend$1, null,
|
|
@@ -31619,7 +31787,7 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31619
31787
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
31620
31788
|
React.createElement(Label, { htmlFor: "directorySearch" }, "What are you looking for?"),
|
|
31621
31789
|
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) {
|
|
31790
|
+
React.createElement(Input$6, { name: "directorySearch", type: "text", defaultValue: searchTerm, id: "directorySearch", onChange: function (e) {
|
|
31623
31791
|
setSearchTerm(e.target.value);
|
|
31624
31792
|
} })),
|
|
31625
31793
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
@@ -31659,5 +31827,5 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31659
31827
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
31660
31828
|
};
|
|
31661
31829
|
|
|
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 };
|
|
31830
|
+
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
31831
|
//# sourceMappingURL=index.esm.js.map
|