northants-design-system 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.esm.js +578 -518
- package/build/index.esm.js.map +1 -1
- package/build/index.js +578 -518
- package/build/index.js.map +1 -1
- package/build/library/contexts/DirectoryShortListProvider/DirectoryShortListProvider.types.d.ts +10 -1
- package/build/library/directory/DirectoryAddToShortList/DirectoryAddToShortList.types.d.ts +9 -0
- package/build/library/directory/DirectoryDocumentList/DirectoryDocumentList.types.d.ts +4 -0
- package/build/library/directory/DirectoryServiceList/DirectoryServiceList.types.d.ts +4 -0
- package/build/library/structure/CookieBanner/CookieBanner.d.ts +2 -0
- package/package.json +1 -1
- package/build/index.mjs.js +0 -29429
- package/build/index.mjs.js.map +0 -1
- package/build/library/helpers/UseDebounce.d.ts +0 -2
package/build/index.esm.js
CHANGED
|
@@ -7501,6 +7501,382 @@ const Message = styled.div`
|
|
|
7501
7501
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
7502
7502
|
`;
|
|
7503
7503
|
|
|
7504
|
+
const Cookies = styled.button`
|
|
7505
|
+
outline: none;
|
|
7506
|
+
background: transparent;
|
|
7507
|
+
border: none;
|
|
7508
|
+
margin: 0;
|
|
7509
|
+
padding: 0;
|
|
7510
|
+
cursor: pointer;
|
|
7511
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
7512
|
+
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
7513
|
+
text-decoration: underline;
|
|
7514
|
+
${(props) => props.theme.theme_vars.linkStyles}
|
|
7515
|
+
|
|
7516
|
+
&:hover {
|
|
7517
|
+
${(props) => props.theme.linkStylesHover}
|
|
7518
|
+
}
|
|
7519
|
+
&:focus {
|
|
7520
|
+
${(props) => props.theme.linkStylesFocus}
|
|
7521
|
+
}
|
|
7522
|
+
&:active {
|
|
7523
|
+
${(props) => props.theme.linkStylesActive}
|
|
7524
|
+
}
|
|
7525
|
+
`;
|
|
7526
|
+
|
|
7527
|
+
const Container$$ = styled.div`
|
|
7528
|
+
${props => props.theme.fontStyles}
|
|
7529
|
+
background-color: ${props => props.theme.theme_vars.colours.grey_light};
|
|
7530
|
+
padding: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
7531
|
+
padding-bottom: 25px;
|
|
7532
|
+
width: 100%;
|
|
7533
|
+
display: block;
|
|
7534
|
+
box-sizing: border-box;
|
|
7535
|
+
`;
|
|
7536
|
+
|
|
7537
|
+
const CookieHide = styled.button`
|
|
7538
|
+
border: 0;
|
|
7539
|
+
background: transparent;
|
|
7540
|
+
|
|
7541
|
+
${props => props.theme.fontStyles}
|
|
7542
|
+
${props => props.theme.linkStyles}
|
|
7543
|
+
&:hover{
|
|
7544
|
+
${props => props.theme.linkStylesHover}
|
|
7545
|
+
}
|
|
7546
|
+
&:focus{
|
|
7547
|
+
${props => props.theme.linkStylesFocus}
|
|
7548
|
+
}
|
|
7549
|
+
&:active{
|
|
7550
|
+
${props => props.theme.linkStylesActive}
|
|
7551
|
+
}
|
|
7552
|
+
`;
|
|
7553
|
+
|
|
7554
|
+
const CookieMessage = styled.div`
|
|
7555
|
+
display: ${props => props.isInline ? 'grid' : 'block'};
|
|
7556
|
+
grid-template-columns: 1fr auto;
|
|
7557
|
+
align-items: baseline;
|
|
7558
|
+
margin-right: 15px;
|
|
7559
|
+
margin-left: 15px;
|
|
7560
|
+
|
|
7561
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
7562
|
+
margin-right: 30px;
|
|
7563
|
+
margin-left: 30px;
|
|
7564
|
+
}
|
|
7565
|
+
|
|
7566
|
+
@media screen and (min-width: calc(${props => props.theme.theme_vars.breakpoints.l} + 60px)){
|
|
7567
|
+
margin-right: auto;
|
|
7568
|
+
margin-left: auto;
|
|
7569
|
+
max-width: ${props => props.theme.theme_vars.breakpoints.l};
|
|
7570
|
+
}
|
|
7571
|
+
`;
|
|
7572
|
+
|
|
7573
|
+
const CookieHeading = styled.p`
|
|
7574
|
+
${props => props.theme.theme_vars.h3}
|
|
7575
|
+
|
|
7576
|
+
`;
|
|
7577
|
+
|
|
7578
|
+
const CookieParagraph = styled.div`
|
|
7579
|
+
margin: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
7580
|
+
|
|
7581
|
+
a {
|
|
7582
|
+
${props => props.theme.linkStyles}
|
|
7583
|
+
&:hover{
|
|
7584
|
+
${props => props.theme.linkStylesHover}
|
|
7585
|
+
}
|
|
7586
|
+
&:focus{
|
|
7587
|
+
${props => props.theme.linkStylesFocus}
|
|
7588
|
+
}
|
|
7589
|
+
&:active{
|
|
7590
|
+
${props => props.theme.linkStylesActive}
|
|
7591
|
+
}
|
|
7592
|
+
}
|
|
7593
|
+
`;
|
|
7594
|
+
const ButtonsContainer = styled.div`
|
|
7595
|
+
display: flex;
|
|
7596
|
+
-webkit-flex-direction: row;
|
|
7597
|
+
-moz-flex-direction: row;
|
|
7598
|
+
-ms-flex-direction: row;
|
|
7599
|
+
flex-direction: row;
|
|
7600
|
+
align-items: flex-start;
|
|
7601
|
+
|
|
7602
|
+
.button--primary {
|
|
7603
|
+
margin-right: 10px;
|
|
7604
|
+
line-height: 1.3;
|
|
7605
|
+
width: 50%;
|
|
7606
|
+
|
|
7607
|
+
&:last-of-type {
|
|
7608
|
+
margin-right: 0;
|
|
7609
|
+
line-height: 1.3;
|
|
7610
|
+
}
|
|
7611
|
+
}
|
|
7612
|
+
|
|
7613
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.s}){
|
|
7614
|
+
display: block;
|
|
7615
|
+
|
|
7616
|
+
.button--primary {
|
|
7617
|
+
width: auto;
|
|
7618
|
+
&:last-of-type {
|
|
7619
|
+
line-height: 1.3;
|
|
7620
|
+
|
|
7621
|
+
}
|
|
7622
|
+
}
|
|
7623
|
+
}
|
|
7624
|
+
|
|
7625
|
+
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
7626
|
+
display: block;
|
|
7627
|
+
|
|
7628
|
+
.button--primary {
|
|
7629
|
+
width: auto;
|
|
7630
|
+
&:last-of-type {
|
|
7631
|
+
line-height: 1.3;
|
|
7632
|
+
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7635
|
+
}
|
|
7636
|
+
`;
|
|
7637
|
+
|
|
7638
|
+
const StyledButton = styled.button`
|
|
7639
|
+
font-weight: 700;
|
|
7640
|
+
border: none;
|
|
7641
|
+
cursor: pointer;
|
|
7642
|
+
display: inline-block;
|
|
7643
|
+
line-height: 1;
|
|
7644
|
+
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
7645
|
+
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
7646
|
+
text-decoration: none;
|
|
7647
|
+
|
|
7648
|
+
&.button--primary {
|
|
7649
|
+
color: white;
|
|
7650
|
+
background-color: ${props => props.theme.theme_vars.colours.action};
|
|
7651
|
+
|
|
7652
|
+
&:hover {
|
|
7653
|
+
background-color: ${props => props.theme.theme_vars.colours.action_dark};
|
|
7654
|
+
}
|
|
7655
|
+
&:focus {
|
|
7656
|
+
outline: none;
|
|
7657
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
7658
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
7659
|
+
box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7660
|
+
-webkit-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7661
|
+
-moz-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7662
|
+
}
|
|
7663
|
+
&:active {
|
|
7664
|
+
transform: translateY(2px);
|
|
7665
|
+
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
7666
|
+
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
7667
|
+
box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7668
|
+
-webkit-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7669
|
+
-moz-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
&.button--secondary {
|
|
7673
|
+
color: ${props => props.theme.theme_vars.colours.action};
|
|
7674
|
+
background-color: transparent;
|
|
7675
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.action};
|
|
7676
|
+
|
|
7677
|
+
&:hover {
|
|
7678
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
7679
|
+
}
|
|
7680
|
+
&:focus {
|
|
7681
|
+
outline: none;
|
|
7682
|
+
border: 2px solid ${props => props.theme.theme_vars.colours.focus};
|
|
7683
|
+
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
7684
|
+
}
|
|
7685
|
+
}
|
|
7686
|
+
&.button--small {
|
|
7687
|
+
font-size: 12px;
|
|
7688
|
+
padding: 10px 16px;
|
|
7689
|
+
}
|
|
7690
|
+
&.button--medium {
|
|
7691
|
+
font-size: 14px;
|
|
7692
|
+
padding: 11px 20px;
|
|
7693
|
+
}
|
|
7694
|
+
&.button--large {
|
|
7695
|
+
font-size: 16px;
|
|
7696
|
+
padding: 12px 24px;
|
|
7697
|
+
}
|
|
7698
|
+
`;
|
|
7699
|
+
|
|
7700
|
+
/**
|
|
7701
|
+
* Primary UI component for user interaction
|
|
7702
|
+
*/
|
|
7703
|
+
var FormButton = function (_a) {
|
|
7704
|
+
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"]);
|
|
7705
|
+
var mode = primary ? 'button--primary' : 'button--secondary';
|
|
7706
|
+
return (React.createElement(StyledButton, __assign$2({ className: ["button--".concat(size), mode].join(' ') }, props), text));
|
|
7707
|
+
};
|
|
7708
|
+
|
|
7709
|
+
const cookieName = 'fn-cookie';
|
|
7710
|
+
|
|
7711
|
+
const getCookie = (name) => {
|
|
7712
|
+
if (typeof document === 'undefined') return '';
|
|
7713
|
+
|
|
7714
|
+
let dc = document.cookie;
|
|
7715
|
+
let prefix = name + '=';
|
|
7716
|
+
|
|
7717
|
+
let begin = dc.indexOf(prefix);
|
|
7718
|
+
if (begin == -1) return null;
|
|
7719
|
+
var end = dc.indexOf(';', begin);
|
|
7720
|
+
if (end == -1) end = dc.length;
|
|
7721
|
+
|
|
7722
|
+
return decodeURI(dc.substring(begin + prefix.length, end));
|
|
7723
|
+
};
|
|
7724
|
+
|
|
7725
|
+
/**
|
|
7726
|
+
* Were cookies accepted by the user, or overridden by the passed param?
|
|
7727
|
+
*
|
|
7728
|
+
* @param cookiesAcceptedOverride boolean | null | undefined
|
|
7729
|
+
* @returns boolean
|
|
7730
|
+
*/
|
|
7731
|
+
const wereCookiesAccepted = (cookiesAcceptedOverride) => {
|
|
7732
|
+
if (typeof cookiesAcceptedOverride === 'boolean') {
|
|
7733
|
+
return cookiesAcceptedOverride;
|
|
7734
|
+
}
|
|
7735
|
+
|
|
7736
|
+
const myCookie = getCookie(cookieName);
|
|
7737
|
+
if (myCookie !== null) {
|
|
7738
|
+
return myCookie.includes('"cookiesAccepted":true');
|
|
7739
|
+
}
|
|
7740
|
+
|
|
7741
|
+
return false;
|
|
7742
|
+
};
|
|
7743
|
+
|
|
7744
|
+
var dayjs_min = {exports: {}};
|
|
7745
|
+
|
|
7746
|
+
(function (module, exports) {
|
|
7747
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
|
|
7748
|
+
} (dayjs_min));
|
|
7749
|
+
|
|
7750
|
+
var dayjs = dayjs_min.exports;
|
|
7751
|
+
|
|
7752
|
+
var utc$1 = {exports: {}};
|
|
7753
|
+
|
|
7754
|
+
(function (module, exports) {
|
|
7755
|
+
!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
7756
|
+
} (utc$1));
|
|
7757
|
+
|
|
7758
|
+
var utc = utc$1.exports;
|
|
7759
|
+
|
|
7760
|
+
var AcceptCookies = function () {
|
|
7761
|
+
var date = new Date();
|
|
7762
|
+
// Cookie is valid 1 year
|
|
7763
|
+
date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000);
|
|
7764
|
+
// NB cookie created is actually cookie expiry - safer to minus a year from the value in calculations than change it.
|
|
7765
|
+
var cookie = {
|
|
7766
|
+
bannerDismissed: true,
|
|
7767
|
+
cookiesAccepted: true,
|
|
7768
|
+
cookiesAcceptedConfirmationBanner: false,
|
|
7769
|
+
cookieCreated: date.toUTCString(),
|
|
7770
|
+
};
|
|
7771
|
+
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookie), ";expires=").concat(date.toUTCString(), ";path=/");
|
|
7772
|
+
location.reload(); // reload to load the updated cookies
|
|
7773
|
+
};
|
|
7774
|
+
var RejectCookies = function () {
|
|
7775
|
+
var date = new Date();
|
|
7776
|
+
// Cookie is valid 1 year
|
|
7777
|
+
date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000);
|
|
7778
|
+
var cookie = {
|
|
7779
|
+
bannerDismissed: true,
|
|
7780
|
+
cookiesAccepted: false,
|
|
7781
|
+
cookiesAcceptedConfirmationBanner: false,
|
|
7782
|
+
cookieCreated: date.toUTCString(),
|
|
7783
|
+
};
|
|
7784
|
+
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookie), ";expires=").concat(date.toUTCString(), ";path=/");
|
|
7785
|
+
};
|
|
7786
|
+
var CookieBanner = function (_a) {
|
|
7787
|
+
var title = _a.title, paragraph = _a.paragraph, acceptButtonText = _a.acceptButtonText, _b = _a.acceptConfirmationText, acceptConfirmationText = _b === void 0 ? "You've accepted all cookies." : _b, rejectButtonText = _a.rejectButtonText, _c = _a.rejectConfirmationText, rejectConfirmationText = _c === void 0 ? "You've rejected all cookies." : _c, acceptCallback = _a.acceptCallback;
|
|
7788
|
+
dayjs.extend(utc);
|
|
7789
|
+
// on page load - look for a cookie
|
|
7790
|
+
useEffect(function () {
|
|
7791
|
+
checkCookie();
|
|
7792
|
+
});
|
|
7793
|
+
var _d = useState(false), showCookieBanner = _d[0], setShowCookieBanner = _d[1];
|
|
7794
|
+
var _e = useState(false), showCookiesRejectedBanner = _e[0], setShowCookiesRejectedBanner = _e[1];
|
|
7795
|
+
var _f = useState(false), showCookiesAcceptedBanner = _f[0], setShowCookiesAcceptedBanner = _f[1];
|
|
7796
|
+
var checkCookie = function () {
|
|
7797
|
+
// on every page load run this.
|
|
7798
|
+
var myCookie = getCookie(cookieName);
|
|
7799
|
+
if (myCookie == null) {
|
|
7800
|
+
// no cookie - show banner
|
|
7801
|
+
setShowCookieBanner(true);
|
|
7802
|
+
}
|
|
7803
|
+
else {
|
|
7804
|
+
// we have cookie
|
|
7805
|
+
var cookiesAccepted = myCookie.includes('"cookiesAccepted":true');
|
|
7806
|
+
var bannerDismissed = myCookie.includes('"bannerDismissed":true');
|
|
7807
|
+
var cookiesAcceptedConfirmationBanner = myCookie.includes('"cookiesAcceptedConfirmationBanner":true');
|
|
7808
|
+
// banner already dismissed - hide the banner
|
|
7809
|
+
if (!bannerDismissed) {
|
|
7810
|
+
setShowCookieBanner(false);
|
|
7811
|
+
}
|
|
7812
|
+
// if we have accepted the cookies the page reloads, so we check acceptedConfirmationBannerDismissed
|
|
7813
|
+
if (cookiesAccepted && !cookiesAcceptedConfirmationBanner) {
|
|
7814
|
+
// if 1 minute has passed from setting of the cookie then dont show it on page reload
|
|
7815
|
+
var cookieVals = JSON.parse(myCookie);
|
|
7816
|
+
// subtracting a year because I'm a plum and didn't notice a bug below - but its safer to minus a year than to fix it!
|
|
7817
|
+
var cookieWasActuallyCreated = dayjs(cookieVals.cookieCreated).utc().subtract(1, 'year');
|
|
7818
|
+
var currentDateTime = dayjs().utc();
|
|
7819
|
+
var timeBetweenNowAndCreated = currentDateTime.diff(cookieWasActuallyCreated, 'milliseconds');
|
|
7820
|
+
if (timeBetweenNowAndCreated <= 60000) {
|
|
7821
|
+
setShowCookiesAcceptedBanner(true);
|
|
7822
|
+
}
|
|
7823
|
+
else {
|
|
7824
|
+
hideCookiesAcceptedConfirmationBanner();
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
if (cookiesAccepted) {
|
|
7828
|
+
// we've accepted cookies so load all the things
|
|
7829
|
+
acceptCallback();
|
|
7830
|
+
}
|
|
7831
|
+
}
|
|
7832
|
+
};
|
|
7833
|
+
var toggleCookie = function (accepted) {
|
|
7834
|
+
if (accepted === true) {
|
|
7835
|
+
AcceptCookies();
|
|
7836
|
+
}
|
|
7837
|
+
else {
|
|
7838
|
+
RejectCookies();
|
|
7839
|
+
setShowCookieBanner(false);
|
|
7840
|
+
setShowCookiesRejectedBanner(true);
|
|
7841
|
+
}
|
|
7842
|
+
};
|
|
7843
|
+
// on reject
|
|
7844
|
+
var rejectCookies = function (e) {
|
|
7845
|
+
toggleCookie(false);
|
|
7846
|
+
};
|
|
7847
|
+
// on accept
|
|
7848
|
+
var acceptCookies = function (e) {
|
|
7849
|
+
toggleCookie(true);
|
|
7850
|
+
};
|
|
7851
|
+
var hideCookiesAcceptedConfirmationBanner = function () {
|
|
7852
|
+
setShowCookiesAcceptedBanner(false);
|
|
7853
|
+
var myCookie = getCookie(cookieName);
|
|
7854
|
+
var cookieVals = JSON.parse(myCookie);
|
|
7855
|
+
cookieVals.cookiesAcceptedConfirmationBanner = true;
|
|
7856
|
+
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookieVals), ";expires=").concat(cookieVals.cookieCreated, ";path=/");
|
|
7857
|
+
};
|
|
7858
|
+
var hideCookiesConfirmationBanner = function (e) {
|
|
7859
|
+
setShowCookiesRejectedBanner(false);
|
|
7860
|
+
hideCookiesAcceptedConfirmationBanner();
|
|
7861
|
+
};
|
|
7862
|
+
return (React.createElement(React.Fragment, null,
|
|
7863
|
+
showCookieBanner && (React.createElement(Container$$, { "data-testid": "CookieBanner" },
|
|
7864
|
+
React.createElement(CookieMessage, null,
|
|
7865
|
+
React.createElement(CookieHeading, null, title),
|
|
7866
|
+
React.createElement(CookieParagraph, null, paragraph),
|
|
7867
|
+
React.createElement(ButtonsContainer, null,
|
|
7868
|
+
React.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: true, onClick: acceptCookies }),
|
|
7869
|
+
React.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: true, onClick: rejectCookies }))))),
|
|
7870
|
+
showCookiesRejectedBanner && (React.createElement(Container$$, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
7871
|
+
React.createElement(CookieMessage, { isInline: true },
|
|
7872
|
+
React.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
7873
|
+
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
7874
|
+
showCookiesAcceptedBanner && (React.createElement(Container$$, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
7875
|
+
React.createElement(CookieMessage, { isInline: true },
|
|
7876
|
+
React.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
7877
|
+
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
7878
|
+
};
|
|
7879
|
+
|
|
7504
7880
|
/**
|
|
7505
7881
|
* A static Google map with optional markers
|
|
7506
7882
|
*/
|
|
@@ -7519,7 +7895,10 @@ var StaticMap = function (_a) {
|
|
|
7519
7895
|
.join('');
|
|
7520
7896
|
return (React.createElement(Container$10, { "data-testid": "StaticMap" },
|
|
7521
7897
|
React.createElement(Message, null,
|
|
7522
|
-
React.createElement("span", null,
|
|
7898
|
+
React.createElement("span", null,
|
|
7899
|
+
"To interact with the map, you need to ",
|
|
7900
|
+
React.createElement(Cookies, { onClick: AcceptCookies }, "accept cookies"),
|
|
7901
|
+
".")),
|
|
7523
7902
|
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 })));
|
|
7524
7903
|
};
|
|
7525
7904
|
|
|
@@ -7535,7 +7914,7 @@ var TextInput = function (_a) {
|
|
|
7535
7914
|
|
|
7536
7915
|
// Accordion
|
|
7537
7916
|
|
|
7538
|
-
const Container
|
|
7917
|
+
const Container$_ = styled.div`
|
|
7539
7918
|
${(props) => props.theme.fontStyles}
|
|
7540
7919
|
margin-bottom: 20px;
|
|
7541
7920
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -7829,7 +8208,7 @@ var Accordion$1 = function (_a) {
|
|
|
7829
8208
|
setAccordionStates(newStatus);
|
|
7830
8209
|
};
|
|
7831
8210
|
var accordionId = "accordion".concat(uniqueID());
|
|
7832
|
-
return (React.createElement(Container
|
|
8211
|
+
return (React.createElement(Container$_, { "data-testid": "Accordion", id: accordionId },
|
|
7833
8212
|
showControls && sections.length > 1 && (React.createElement(AccordionControls$1, null,
|
|
7834
8213
|
React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
7835
8214
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -7880,7 +8259,7 @@ var BlockQuote = function (_a) {
|
|
|
7880
8259
|
citation && React.createElement(Citation, null, citation)));
|
|
7881
8260
|
};
|
|
7882
8261
|
|
|
7883
|
-
const Container$
|
|
8262
|
+
const Container$Z = styled.div`
|
|
7884
8263
|
margin-bottom: 30px;
|
|
7885
8264
|
display: block;
|
|
7886
8265
|
|
|
@@ -7895,11 +8274,11 @@ const Container$_ = styled.div`
|
|
|
7895
8274
|
*/
|
|
7896
8275
|
var CallToAction = function (_a) {
|
|
7897
8276
|
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"]);
|
|
7898
|
-
return (React.createElement(Container$
|
|
8277
|
+
return (React.createElement(Container$Z, null,
|
|
7899
8278
|
React.createElement(Button$4, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
7900
8279
|
};
|
|
7901
8280
|
|
|
7902
|
-
const Container$
|
|
8281
|
+
const Container$Y = styled.div`
|
|
7903
8282
|
display: block;
|
|
7904
8283
|
${(props) => props.theme.fontStyles}
|
|
7905
8284
|
`;
|
|
@@ -8075,7 +8454,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
8075
8454
|
});
|
|
8076
8455
|
return letterData;
|
|
8077
8456
|
});
|
|
8078
|
-
return (React.createElement(Container$
|
|
8457
|
+
return (React.createElement(Container$Y, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
8079
8458
|
React.createElement(React.Fragment, null,
|
|
8080
8459
|
parishes.length === 0 && (React.createElement(ErrorText, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
8081
8460
|
parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
|
|
@@ -8101,9 +8480,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
8101
8480
|
React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
8102
8481
|
};
|
|
8103
8482
|
|
|
8104
|
-
const Container$
|
|
8483
|
+
const Container$X = styled.div``;
|
|
8105
8484
|
|
|
8106
|
-
const Container$
|
|
8485
|
+
const Container$W = styled.div`
|
|
8107
8486
|
display: flex;
|
|
8108
8487
|
flex-direction: column;
|
|
8109
8488
|
justify-content: flex-start;
|
|
@@ -18221,7 +18600,7 @@ function markDirtyUp(node) {
|
|
|
18221
18600
|
}
|
|
18222
18601
|
}
|
|
18223
18602
|
|
|
18224
|
-
class Container$
|
|
18603
|
+
class Container$V extends Node$1 {
|
|
18225
18604
|
push(child) {
|
|
18226
18605
|
child.parent = this;
|
|
18227
18606
|
this.proxyOf.nodes.push(child);
|
|
@@ -18514,7 +18893,7 @@ class Container$W extends Node$1 {
|
|
|
18514
18893
|
|
|
18515
18894
|
let processed = nodes.map(i => {
|
|
18516
18895
|
/* c8 ignore next */
|
|
18517
|
-
if (!i[my$1]) Container$
|
|
18896
|
+
if (!i[my$1]) Container$V.rebuild(i);
|
|
18518
18897
|
i = i.proxyOf;
|
|
18519
18898
|
if (i.parent) i.parent.removeChild(i);
|
|
18520
18899
|
if (i[isClean$1]) markDirtyUp(i);
|
|
@@ -18592,27 +18971,27 @@ class Container$W extends Node$1 {
|
|
|
18592
18971
|
}
|
|
18593
18972
|
}
|
|
18594
18973
|
|
|
18595
|
-
Container$
|
|
18974
|
+
Container$V.registerParse = dependant => {
|
|
18596
18975
|
parse$4 = dependant;
|
|
18597
18976
|
};
|
|
18598
18977
|
|
|
18599
|
-
Container$
|
|
18978
|
+
Container$V.registerRule = dependant => {
|
|
18600
18979
|
Rule$4 = dependant;
|
|
18601
18980
|
};
|
|
18602
18981
|
|
|
18603
|
-
Container$
|
|
18982
|
+
Container$V.registerAtRule = dependant => {
|
|
18604
18983
|
AtRule$4 = dependant;
|
|
18605
18984
|
};
|
|
18606
18985
|
|
|
18607
|
-
Container$
|
|
18986
|
+
Container$V.registerRoot = dependant => {
|
|
18608
18987
|
Root$6 = dependant;
|
|
18609
18988
|
};
|
|
18610
18989
|
|
|
18611
|
-
var container = Container$
|
|
18612
|
-
Container$
|
|
18990
|
+
var container = Container$V;
|
|
18991
|
+
Container$V.default = Container$V;
|
|
18613
18992
|
|
|
18614
18993
|
/* c8 ignore start */
|
|
18615
|
-
Container$
|
|
18994
|
+
Container$V.rebuild = node => {
|
|
18616
18995
|
if (node.type === 'atrule') {
|
|
18617
18996
|
Object.setPrototypeOf(node, AtRule$4.prototype);
|
|
18618
18997
|
} else if (node.type === 'rule') {
|
|
@@ -18629,16 +19008,16 @@ Container$W.rebuild = node => {
|
|
|
18629
19008
|
|
|
18630
19009
|
if (node.nodes) {
|
|
18631
19010
|
node.nodes.forEach(child => {
|
|
18632
|
-
Container$
|
|
19011
|
+
Container$V.rebuild(child);
|
|
18633
19012
|
});
|
|
18634
19013
|
}
|
|
18635
19014
|
};
|
|
18636
19015
|
|
|
18637
|
-
let Container$
|
|
19016
|
+
let Container$U = container;
|
|
18638
19017
|
|
|
18639
19018
|
let LazyResult$4, Processor$3;
|
|
18640
19019
|
|
|
18641
|
-
class Document$3 extends Container$
|
|
19020
|
+
class Document$3 extends Container$U {
|
|
18642
19021
|
constructor(defaults) {
|
|
18643
19022
|
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
|
18644
19023
|
super({ type: 'document', ...defaults });
|
|
@@ -18756,9 +19135,9 @@ class Result$4 {
|
|
|
18756
19135
|
var result = Result$4;
|
|
18757
19136
|
Result$4.default = Result$4;
|
|
18758
19137
|
|
|
18759
|
-
let Container$
|
|
19138
|
+
let Container$T = container;
|
|
18760
19139
|
|
|
18761
|
-
class AtRule$3 extends Container$
|
|
19140
|
+
class AtRule$3 extends Container$T {
|
|
18762
19141
|
constructor(defaults) {
|
|
18763
19142
|
super(defaults);
|
|
18764
19143
|
this.type = 'atrule';
|
|
@@ -18778,13 +19157,13 @@ class AtRule$3 extends Container$U {
|
|
|
18778
19157
|
var atRule = AtRule$3;
|
|
18779
19158
|
AtRule$3.default = AtRule$3;
|
|
18780
19159
|
|
|
18781
|
-
Container$
|
|
19160
|
+
Container$T.registerAtRule(AtRule$3);
|
|
18782
19161
|
|
|
18783
|
-
let Container$
|
|
19162
|
+
let Container$S = container;
|
|
18784
19163
|
|
|
18785
19164
|
let LazyResult$3, Processor$2;
|
|
18786
19165
|
|
|
18787
|
-
class Root$5 extends Container$
|
|
19166
|
+
class Root$5 extends Container$S {
|
|
18788
19167
|
constructor(defaults) {
|
|
18789
19168
|
super(defaults);
|
|
18790
19169
|
this.type = 'root';
|
|
@@ -18838,7 +19217,7 @@ Root$5.registerProcessor = dependant => {
|
|
|
18838
19217
|
var root = Root$5;
|
|
18839
19218
|
Root$5.default = Root$5;
|
|
18840
19219
|
|
|
18841
|
-
Container$
|
|
19220
|
+
Container$S.registerRoot(Root$5);
|
|
18842
19221
|
|
|
18843
19222
|
let list$2 = {
|
|
18844
19223
|
split(string, separators, last) {
|
|
@@ -18897,10 +19276,10 @@ let list$2 = {
|
|
|
18897
19276
|
var list_1 = list$2;
|
|
18898
19277
|
list$2.default = list$2;
|
|
18899
19278
|
|
|
18900
|
-
let Container$
|
|
19279
|
+
let Container$R = container;
|
|
18901
19280
|
let list$1 = list_1;
|
|
18902
19281
|
|
|
18903
|
-
class Rule$3 extends Container$
|
|
19282
|
+
class Rule$3 extends Container$R {
|
|
18904
19283
|
constructor(defaults) {
|
|
18905
19284
|
super(defaults);
|
|
18906
19285
|
this.type = 'rule';
|
|
@@ -18921,7 +19300,7 @@ class Rule$3 extends Container$S {
|
|
|
18921
19300
|
var rule = Rule$3;
|
|
18922
19301
|
Rule$3.default = Rule$3;
|
|
18923
19302
|
|
|
18924
|
-
Container$
|
|
19303
|
+
Container$R.registerRule(Rule$3);
|
|
18925
19304
|
|
|
18926
19305
|
let Declaration$2 = declaration;
|
|
18927
19306
|
let tokenizer = tokenize;
|
|
@@ -19525,7 +19904,7 @@ class Parser$1 {
|
|
|
19525
19904
|
|
|
19526
19905
|
var parser = Parser$1;
|
|
19527
19906
|
|
|
19528
|
-
let Container$
|
|
19907
|
+
let Container$Q = container;
|
|
19529
19908
|
let Parser = parser;
|
|
19530
19909
|
let Input$3 = input;
|
|
19531
19910
|
|
|
@@ -19564,12 +19943,12 @@ function parse$3(css, opts) {
|
|
|
19564
19943
|
var parse_1 = parse$3;
|
|
19565
19944
|
parse$3.default = parse$3;
|
|
19566
19945
|
|
|
19567
|
-
Container$
|
|
19946
|
+
Container$Q.registerParse(parse$3);
|
|
19568
19947
|
|
|
19569
19948
|
let { isClean, my } = symbols;
|
|
19570
19949
|
let MapGenerator$1 = mapGenerator;
|
|
19571
19950
|
let stringify$2 = stringify_1;
|
|
19572
|
-
let Container$
|
|
19951
|
+
let Container$P = container;
|
|
19573
19952
|
let Document$2 = document$1;
|
|
19574
19953
|
let warnOnce$1 = warnOnce$2;
|
|
19575
19954
|
let Result$3 = result;
|
|
@@ -19704,7 +20083,7 @@ class LazyResult$2 {
|
|
|
19704
20083
|
|
|
19705
20084
|
if (root && !root[my]) {
|
|
19706
20085
|
/* c8 ignore next 2 */
|
|
19707
|
-
Container$
|
|
20086
|
+
Container$P.rebuild(root);
|
|
19708
20087
|
}
|
|
19709
20088
|
}
|
|
19710
20089
|
|
|
@@ -20371,7 +20750,7 @@ fromJSON$1.default = fromJSON$1;
|
|
|
20371
20750
|
let CssSyntaxError = cssSyntaxError;
|
|
20372
20751
|
let Declaration = declaration;
|
|
20373
20752
|
let LazyResult = lazyResult;
|
|
20374
|
-
let Container$
|
|
20753
|
+
let Container$O = container;
|
|
20375
20754
|
let Processor = processor;
|
|
20376
20755
|
let stringify = stringify_1;
|
|
20377
20756
|
let fromJSON = fromJSON_1;
|
|
@@ -20451,7 +20830,7 @@ postcss.document = defaults => new Document(defaults);
|
|
|
20451
20830
|
|
|
20452
20831
|
postcss.CssSyntaxError = CssSyntaxError;
|
|
20453
20832
|
postcss.Declaration = Declaration;
|
|
20454
|
-
postcss.Container = Container$
|
|
20833
|
+
postcss.Container = Container$O;
|
|
20455
20834
|
postcss.Processor = Processor;
|
|
20456
20835
|
postcss.Document = Document;
|
|
20457
20836
|
postcss.Comment = Comment;
|
|
@@ -21320,7 +21699,7 @@ var sanitizeHtml$1 = sanitizeHtml_1;
|
|
|
21320
21699
|
var Card = function (_a) {
|
|
21321
21700
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
21322
21701
|
var showContent = content || header;
|
|
21323
|
-
return (React.createElement(Container$
|
|
21702
|
+
return (React.createElement(Container$W, { "data-testid": "Card" },
|
|
21324
21703
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
21325
21704
|
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" })))),
|
|
21326
21705
|
showContent && (React.createElement(Content$6, null,
|
|
@@ -21336,12 +21715,12 @@ var Card = function (_a) {
|
|
|
21336
21715
|
*/
|
|
21337
21716
|
var Cards = function (_a) {
|
|
21338
21717
|
var cards = _a.cards;
|
|
21339
|
-
return (React.createElement(Container$
|
|
21718
|
+
return (React.createElement(Container$X, { "data-testid": "Cards" },
|
|
21340
21719
|
React.createElement(Row$1, null, cards.map(function (card, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
21341
21720
|
React.createElement(Card, __assign$2({}, card)))); }))));
|
|
21342
21721
|
};
|
|
21343
21722
|
|
|
21344
|
-
const Container$
|
|
21723
|
+
const Container$N = styled.div`
|
|
21345
21724
|
margin: 25px 0;
|
|
21346
21725
|
`;
|
|
21347
21726
|
|
|
@@ -21459,7 +21838,7 @@ var FileDownload = function (_a) {
|
|
|
21459
21838
|
|
|
21460
21839
|
var DownloadableFiles = function (_a) {
|
|
21461
21840
|
var files = _a.files;
|
|
21462
|
-
return (React.createElement(Container$
|
|
21841
|
+
return (React.createElement(Container$N, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
21463
21842
|
files.map(function (file) { return React.createElement(FileDownload, __assign$2({ key: file.title }, file)); })
|
|
21464
21843
|
:
|
|
21465
21844
|
React.createElement("i", null, "No file to show")));
|
|
@@ -21560,42 +21939,7 @@ const AccessibleMapLink = styled(MapLink$1)`
|
|
|
21560
21939
|
${(props) => props.theme.visuallyHidden};
|
|
21561
21940
|
`;
|
|
21562
21941
|
|
|
21563
|
-
const
|
|
21564
|
-
|
|
21565
|
-
const getCookie = (name) => {
|
|
21566
|
-
if (typeof document === 'undefined') return '';
|
|
21567
|
-
|
|
21568
|
-
let dc = document.cookie;
|
|
21569
|
-
let prefix = name + '=';
|
|
21570
|
-
|
|
21571
|
-
let begin = dc.indexOf(prefix);
|
|
21572
|
-
if (begin == -1) return null;
|
|
21573
|
-
var end = dc.indexOf(';', begin);
|
|
21574
|
-
if (end == -1) end = dc.length;
|
|
21575
|
-
|
|
21576
|
-
return decodeURI(dc.substring(begin + prefix.length, end));
|
|
21577
|
-
};
|
|
21578
|
-
|
|
21579
|
-
/**
|
|
21580
|
-
* Were cookies accepted by the user, or overridden by the passed param?
|
|
21581
|
-
*
|
|
21582
|
-
* @param cookiesAcceptedOverride boolean | null | undefined
|
|
21583
|
-
* @returns boolean
|
|
21584
|
-
*/
|
|
21585
|
-
const wereCookiesAccepted = (cookiesAcceptedOverride) => {
|
|
21586
|
-
if (typeof cookiesAcceptedOverride === 'boolean') {
|
|
21587
|
-
return cookiesAcceptedOverride;
|
|
21588
|
-
}
|
|
21589
|
-
|
|
21590
|
-
const myCookie = getCookie(cookieName);
|
|
21591
|
-
if (myCookie !== null) {
|
|
21592
|
-
return myCookie.includes('"cookiesAccepted":true');
|
|
21593
|
-
}
|
|
21594
|
-
|
|
21595
|
-
return false;
|
|
21596
|
-
};
|
|
21597
|
-
|
|
21598
|
-
const Container$N = styled.div`
|
|
21942
|
+
const Container$M = styled.div`
|
|
21599
21943
|
border: solid 4px;
|
|
21600
21944
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
21601
21945
|
border-color: ${(props) =>
|
|
@@ -21649,7 +21993,7 @@ const InnerContainer$2 = styled.div`
|
|
|
21649
21993
|
*/
|
|
21650
21994
|
var AlertBannerService = function (_a) {
|
|
21651
21995
|
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;
|
|
21652
|
-
return (React.createElement(Container$
|
|
21996
|
+
return (React.createElement(Container$M, { alertType: alertType, "data-testid": "AlertBannerService", hasTopSpacing: hasTopSpacing },
|
|
21653
21997
|
React.createElement(InnerContainer$2, { "data-testid": "AlertBannerServiceInner" },
|
|
21654
21998
|
(title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading, { text: title }),
|
|
21655
21999
|
children)));
|
|
@@ -21696,13 +22040,12 @@ var GoogleMap = function (_a) {
|
|
|
21696
22040
|
React.createElement(MapLink$1, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
|
|
21697
22041
|
};
|
|
21698
22042
|
|
|
21699
|
-
const Container$
|
|
22043
|
+
const Container$L = styled.figure`
|
|
21700
22044
|
display: block;
|
|
21701
22045
|
background: ${(props) =>
|
|
21702
22046
|
props.theme.cardinal_name === 'north'
|
|
21703
22047
|
? props.theme.theme_vars.colours.white
|
|
21704
22048
|
: props.theme.theme_vars.colours.grey_light};
|
|
21705
|
-
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
21706
22049
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
21707
22050
|
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
21708
22051
|
float: none;
|
|
@@ -21757,6 +22100,7 @@ const Caption = styled.figcaption`
|
|
|
21757
22100
|
font-size: 0.9rem !important;
|
|
21758
22101
|
color: ${(props) => props.theme.theme_vars.colours.black};
|
|
21759
22102
|
padding: 15px;
|
|
22103
|
+
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
21760
22104
|
`;
|
|
21761
22105
|
|
|
21762
22106
|
var lib$1 = {};
|
|
@@ -22359,7 +22703,7 @@ var LazyImage = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
|
22359
22703
|
*/
|
|
22360
22704
|
var Image$2 = function (_a) {
|
|
22361
22705
|
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;
|
|
22362
|
-
return (React.createElement(Container$
|
|
22706
|
+
return (React.createElement(Container$L, { "data-testid": "Image", wrapText: wrapText },
|
|
22363
22707
|
React.createElement(ImageContainer$4, { "data-testid": "ImageContainer", ratio: ratio },
|
|
22364
22708
|
React.createElement(LazyImage, { placeholder: imageSmall, src: imageLarge, visibilitySensorProps: {
|
|
22365
22709
|
partialVisibility: true,
|
|
@@ -22367,7 +22711,7 @@ var Image$2 = function (_a) {
|
|
|
22367
22711
|
(caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
|
|
22368
22712
|
};
|
|
22369
22713
|
|
|
22370
|
-
const Container$
|
|
22714
|
+
const Container$K = styled.div`
|
|
22371
22715
|
display: block;
|
|
22372
22716
|
`;
|
|
22373
22717
|
|
|
@@ -22388,7 +22732,7 @@ const Content$5 = styled.div`
|
|
|
22388
22732
|
*/
|
|
22389
22733
|
var ImageAndText = function (_a) {
|
|
22390
22734
|
var heading = _a.heading, textContent = _a.textContent, image = _a.image;
|
|
22391
|
-
return (React.createElement(Container$
|
|
22735
|
+
return (React.createElement(Container$K, { "data-testid": "ImageAndText" },
|
|
22392
22736
|
React.createElement(Row$1, null,
|
|
22393
22737
|
heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
22394
22738
|
React.createElement(HeadingContainer, null,
|
|
@@ -22401,7 +22745,7 @@ var ImageAndText = function (_a) {
|
|
|
22401
22745
|
React.createElement(Content$5, { dangerouslySetInnerHTML: { __html: sanitizeHtml$1(textContent) } }))))));
|
|
22402
22746
|
};
|
|
22403
22747
|
|
|
22404
|
-
const Container$
|
|
22748
|
+
const Container$J = styled.div`
|
|
22405
22749
|
display: block;
|
|
22406
22750
|
`;
|
|
22407
22751
|
|
|
@@ -22410,7 +22754,7 @@ const Container$K = styled.div`
|
|
|
22410
22754
|
*/
|
|
22411
22755
|
var InquestSchedule = function (_a) {
|
|
22412
22756
|
var caseAppointments = _a.caseAppointments, title = _a.title, _b = _a.error, error = _b === void 0 ? false : _b;
|
|
22413
|
-
return (React.createElement(Container$
|
|
22757
|
+
return (React.createElement(Container$J, { "data-testid": "InquestSchedule" },
|
|
22414
22758
|
React.createElement("div", { className: "table-container" },
|
|
22415
22759
|
React.createElement("table", null,
|
|
22416
22760
|
React.createElement("caption", null, title),
|
|
@@ -22438,7 +22782,7 @@ var InquestSchedule = function (_a) {
|
|
|
22438
22782
|
error ? (React.createElement("p", null, " The information is currently unavailable.")) : (React.createElement("p", null, "There are no inquests scheduled for next month."))))))))));
|
|
22439
22783
|
};
|
|
22440
22784
|
|
|
22441
|
-
const Container$
|
|
22785
|
+
const Container$I = styled.div`
|
|
22442
22786
|
${(props) => props.theme.fontStyles};
|
|
22443
22787
|
overflow: hidden;
|
|
22444
22788
|
margin: 40px auto 5px auto;
|
|
@@ -22518,7 +22862,7 @@ const CTA = styled.a`
|
|
|
22518
22862
|
*/
|
|
22519
22863
|
var PromoBanner = function (_a) {
|
|
22520
22864
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
22521
|
-
return (React.createElement(Container$
|
|
22865
|
+
return (React.createElement(Container$I, null,
|
|
22522
22866
|
React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
|
|
22523
22867
|
partialVisibility: true,
|
|
22524
22868
|
} }, function (src) { return React.createElement(ImageLink, { img: src, href: ctaUrl, title: ctaText }); }),
|
|
@@ -22729,7 +23073,7 @@ var Promotions = function (_a) {
|
|
|
22729
23073
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
22730
23074
|
};
|
|
22731
23075
|
|
|
22732
|
-
const Container$
|
|
23076
|
+
const Container$H = styled.div`
|
|
22733
23077
|
padding: 0;
|
|
22734
23078
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
22735
23079
|
${(props) => props.theme.fontStyles}
|
|
@@ -22779,7 +23123,7 @@ const Inner = styled.div`
|
|
|
22779
23123
|
}
|
|
22780
23124
|
`;
|
|
22781
23125
|
|
|
22782
|
-
const Container$
|
|
23126
|
+
const Container$G = styled.div`
|
|
22783
23127
|
display: block;
|
|
22784
23128
|
|
|
22785
23129
|
input[type='text'] {
|
|
@@ -22863,7 +23207,7 @@ var CustomSearch = function (_a) {
|
|
|
22863
23207
|
if (!id) {
|
|
22864
23208
|
id = useId();
|
|
22865
23209
|
}
|
|
22866
|
-
return (React.createElement(Container$
|
|
23210
|
+
return (React.createElement(Container$G, { "data-testid": "CustomSearch" },
|
|
22867
23211
|
React.createElement("form", { method: method, action: path, "aria-label": label },
|
|
22868
23212
|
React.createElement("div", { role: "search" },
|
|
22869
23213
|
React.createElement(Label$3, { htmlFor: id, hasHiddenLabel: hasHiddenLabel }, label),
|
|
@@ -22886,8 +23230,8 @@ var SearchBox = function (_a) {
|
|
|
22886
23230
|
return (React.createElement(React.Fragment, null, imageLarge && imageSmall ? (React.createElement(React.Fragment, null,
|
|
22887
23231
|
React.createElement(LazyImage, { src: imageLarge, placeholder: imageSmall, visibilitySensorProps: {
|
|
22888
23232
|
partialVisibility: true,
|
|
22889
|
-
} }, function (src) { return (React.createElement(Container$
|
|
22890
|
-
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$
|
|
23233
|
+
} }, function (src) { return (React.createElement(Container$H, { image: src, "data-testid": "SearchBox" }, searchInner)); }),
|
|
23234
|
+
imageAltText && React.createElement("span", { role: "img", "aria-label": imageAltText }))) : (React.createElement(Container$H, { "data-testid": "SearchBox" }, searchInner))));
|
|
22891
23235
|
};
|
|
22892
23236
|
|
|
22893
23237
|
var VideoProvider;
|
|
@@ -23077,7 +23421,7 @@ var AccessibleLink = function (_a) {
|
|
|
23077
23421
|
})));
|
|
23078
23422
|
};
|
|
23079
23423
|
|
|
23080
|
-
const Container$
|
|
23424
|
+
const Container$F = styled.div`
|
|
23081
23425
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23082
23426
|
background: ${(props) =>
|
|
23083
23427
|
props.alertType === 'alert'
|
|
@@ -23208,7 +23552,7 @@ const handleContainerPadding = (noBackground, noPadding) => {
|
|
|
23208
23552
|
}
|
|
23209
23553
|
};
|
|
23210
23554
|
|
|
23211
|
-
const Container$
|
|
23555
|
+
const Container$E = styled.div`
|
|
23212
23556
|
background: ${(props) =>
|
|
23213
23557
|
props.noBackground
|
|
23214
23558
|
? 'transparent'
|
|
@@ -23250,7 +23594,7 @@ const MaxWidth = styled.div`
|
|
|
23250
23594
|
*/
|
|
23251
23595
|
var MaxWidthContainer = function (_a) {
|
|
23252
23596
|
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"]);
|
|
23253
|
-
return (React.createElement(Container$
|
|
23597
|
+
return (React.createElement(Container$E, { noBackground: noBackground, noPadding: noPadding },
|
|
23254
23598
|
React.createElement(MaxWidth, __assign$2({ className: classes, overflowVisible: overflowVisible }, props), children)));
|
|
23255
23599
|
};
|
|
23256
23600
|
|
|
@@ -23321,7 +23665,7 @@ var AlertBanner = function (_a) {
|
|
|
23321
23665
|
setShowAlert(false);
|
|
23322
23666
|
};
|
|
23323
23667
|
return (showAlert &&
|
|
23324
|
-
notServer && (React.createElement(Container$
|
|
23668
|
+
notServer && (React.createElement(Container$F, { alertType: alertType, "data-testid": "AlertBanner" },
|
|
23325
23669
|
React.createElement(MaxWidthContainer, { noBackground: true },
|
|
23326
23670
|
React.createElement(InnerContainer$1, null,
|
|
23327
23671
|
React.createElement(BannerContentContainer, null,
|
|
@@ -23335,7 +23679,7 @@ var AlertBanner = function (_a) {
|
|
|
23335
23679
|
"Dismiss"))))));
|
|
23336
23680
|
};
|
|
23337
23681
|
|
|
23338
|
-
const Container$
|
|
23682
|
+
const Container$D = styled.a`
|
|
23339
23683
|
display: inline-block;
|
|
23340
23684
|
position: relative;
|
|
23341
23685
|
margin-top: 15px;
|
|
@@ -23394,10 +23738,10 @@ const Container$E = styled.a`
|
|
|
23394
23738
|
*/
|
|
23395
23739
|
var BackLink = function (_a) {
|
|
23396
23740
|
var link = _a.link, _b = _a.useHistory, useHistory = _b === void 0 ? false : _b;
|
|
23397
|
-
return (React.createElement(React.Fragment, null, useHistory ? (React.createElement(Container$
|
|
23741
|
+
return (React.createElement(React.Fragment, null, useHistory ? (React.createElement(Container$D, { onClick: function () { return history.back(); }, "data-testid": "BackLink", as: "button" }, "Back")) : (React.createElement(Container$D, { href: link, "data-testid": "BackLink" }, "Back"))));
|
|
23398
23742
|
};
|
|
23399
23743
|
|
|
23400
|
-
const Container$
|
|
23744
|
+
const Container$C = styled.div`
|
|
23401
23745
|
padding-top: 20px;
|
|
23402
23746
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23403
23747
|
margin-bottom: ${(props) => (props.hasMargin ? props.theme.theme_vars.spacingSizes.large : 0)};
|
|
@@ -23464,14 +23808,14 @@ const BreadcrumbLink$1 = styled.a`
|
|
|
23464
23808
|
|
|
23465
23809
|
var Breadcrumbs = function (_a) {
|
|
23466
23810
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
23467
|
-
return (React.createElement(Container$
|
|
23811
|
+
return (React.createElement(Container$C, { hasMargin: hasMargin, "data-testid": "Breadcrumbs" },
|
|
23468
23812
|
React.createElement(List$2, null, breadcrumbsArray.map(function (crumb) { return (React.createElement(Crumb, { key: crumb.title }, React.createElement(React.Fragment, null,
|
|
23469
23813
|
React.createElement(BreadcrumbLink$1, { href: crumb.url, title: crumb.title }, crumb.title),
|
|
23470
23814
|
React.createElement(IconWrapper$4, null,
|
|
23471
23815
|
React.createElement(ChevronIcon, { direction: 'right', colourFill: "#C6C6C6" }))))); }))));
|
|
23472
23816
|
};
|
|
23473
23817
|
|
|
23474
|
-
const Container$
|
|
23818
|
+
const Container$B = styled.div`
|
|
23475
23819
|
display: block;
|
|
23476
23820
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
23477
23821
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -23497,406 +23841,96 @@ const ListItem$1 = styled.li`
|
|
|
23497
23841
|
const Link$2 = styled.a`
|
|
23498
23842
|
${(props) => props.theme.fontStyles};
|
|
23499
23843
|
${(props) => props.theme.linkStyles};
|
|
23500
|
-
margin-left: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23501
|
-
|
|
23502
|
-
&:hover {
|
|
23503
|
-
${(props) => props.theme.linkStylesHover};
|
|
23504
|
-
}
|
|
23505
|
-
|
|
23506
|
-
&:focus {
|
|
23507
|
-
${(props) => props.theme.linkStylesFocus};
|
|
23508
|
-
}
|
|
23509
|
-
|
|
23510
|
-
&:active {
|
|
23511
|
-
${(props) => props.theme.linkStylesActive};
|
|
23512
|
-
}
|
|
23513
|
-
`;
|
|
23514
|
-
|
|
23515
|
-
const CurrentPage = styled.span`
|
|
23516
|
-
${(props) => props.theme.fontStyles};
|
|
23517
|
-
margin-left: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23518
|
-
`;
|
|
23519
|
-
|
|
23520
|
-
var Contents$1 = function (_a) {
|
|
23521
|
-
var contents = _a.contents, _b = _a.currentPath, currentPath = _b === void 0 ? undefined : _b, _c = _a.title, title = _c === void 0 ? 'Contents' : _c;
|
|
23522
|
-
return (React.createElement(Container$C, { "data-testid": "Contents" },
|
|
23523
|
-
React.createElement(Heading, { text: title, level: 2 }),
|
|
23524
|
-
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)))); }))));
|
|
23525
|
-
};
|
|
23526
|
-
|
|
23527
|
-
const Container$B = styled.div`
|
|
23528
|
-
display: block;
|
|
23529
|
-
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23530
|
-
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23531
|
-
`;
|
|
23532
|
-
|
|
23533
|
-
const NavigationLink = styled.a`
|
|
23534
|
-
display: flex;
|
|
23535
|
-
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23536
|
-
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23537
|
-
${(props) => props.theme.fontStyles};
|
|
23538
|
-
${(props) => props.theme.linkStyles};
|
|
23539
|
-
text-decoration: none !important;
|
|
23540
|
-
|
|
23541
|
-
&:hover {
|
|
23542
|
-
${(props) => props.theme.linkStylesHover};
|
|
23543
|
-
text-decoration: underline !important;
|
|
23544
|
-
text-decoration-style: dashed !important;
|
|
23545
|
-
}
|
|
23546
|
-
|
|
23547
|
-
&:focus {
|
|
23548
|
-
${(props) => props.theme.linkStylesFocus};
|
|
23549
|
-
}
|
|
23550
|
-
|
|
23551
|
-
&:active {
|
|
23552
|
-
${(props) => props.theme.linkStylesActive};
|
|
23553
|
-
}
|
|
23554
|
-
`;
|
|
23555
|
-
|
|
23556
|
-
const PageTitle$1 = styled.span`
|
|
23557
|
-
font-size: 0.9rem;
|
|
23558
|
-
text-decoration: underline;
|
|
23559
|
-
`;
|
|
23560
|
-
|
|
23561
|
-
const Arrow = styled.div`
|
|
23562
|
-
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23563
|
-
text-decoration: none;
|
|
23564
|
-
`;
|
|
23565
|
-
|
|
23566
|
-
const LinkText = styled.div`
|
|
23567
|
-
flex-grow: 1;
|
|
23568
|
-
`;
|
|
23569
|
-
|
|
23570
|
-
var ContentsNavigation = function (_a) {
|
|
23571
|
-
var contents = _a.contents, currentPath = _a.currentPath;
|
|
23572
|
-
var currentPage = function () {
|
|
23573
|
-
return contents.findIndex(function (item) { return item.url === currentPath; });
|
|
23574
|
-
};
|
|
23575
|
-
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
23576
|
-
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
23577
|
-
return (React.createElement(Container$B, { "data-testid": "ContentsNavigation" },
|
|
23578
|
-
previousPage && (React.createElement(NavigationLink, { href: previousPage.url },
|
|
23579
|
-
React.createElement(Arrow, null, "\u2190"),
|
|
23580
|
-
React.createElement(LinkText, null,
|
|
23581
|
-
"Previous",
|
|
23582
|
-
React.createElement("br", null),
|
|
23583
|
-
React.createElement(PageTitle$1, null, previousPage.title)))),
|
|
23584
|
-
nextPage && (React.createElement(NavigationLink, { href: nextPage.url },
|
|
23585
|
-
React.createElement(Arrow, null, "\u2192"),
|
|
23586
|
-
React.createElement(LinkText, null,
|
|
23587
|
-
"Next",
|
|
23588
|
-
React.createElement("br", null),
|
|
23589
|
-
React.createElement(PageTitle$1, null, nextPage.title))))));
|
|
23590
|
-
};
|
|
23591
|
-
|
|
23592
|
-
const Container$A = styled.div`
|
|
23593
|
-
${props => props.theme.fontStyles}
|
|
23594
|
-
background-color: ${props => props.theme.theme_vars.colours.grey_light};
|
|
23595
|
-
padding: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23596
|
-
padding-bottom: 25px;
|
|
23597
|
-
width: 100%;
|
|
23598
|
-
display: block;
|
|
23599
|
-
box-sizing: border-box;
|
|
23600
|
-
`;
|
|
23601
|
-
|
|
23602
|
-
const CookieHide = styled.button`
|
|
23603
|
-
border: 0;
|
|
23604
|
-
background: transparent;
|
|
23605
|
-
|
|
23606
|
-
${props => props.theme.fontStyles}
|
|
23607
|
-
${props => props.theme.linkStyles}
|
|
23608
|
-
&:hover{
|
|
23609
|
-
${props => props.theme.linkStylesHover}
|
|
23610
|
-
}
|
|
23611
|
-
&:focus{
|
|
23612
|
-
${props => props.theme.linkStylesFocus}
|
|
23613
|
-
}
|
|
23614
|
-
&:active{
|
|
23615
|
-
${props => props.theme.linkStylesActive}
|
|
23616
|
-
}
|
|
23617
|
-
`;
|
|
23618
|
-
|
|
23619
|
-
const CookieMessage = styled.div`
|
|
23620
|
-
display: ${props => props.isInline ? 'grid' : 'block'};
|
|
23621
|
-
grid-template-columns: 1fr auto;
|
|
23622
|
-
align-items: baseline;
|
|
23623
|
-
margin-right: 15px;
|
|
23624
|
-
margin-left: 15px;
|
|
23625
|
-
|
|
23626
|
-
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.m}){
|
|
23627
|
-
margin-right: 30px;
|
|
23628
|
-
margin-left: 30px;
|
|
23629
|
-
}
|
|
23630
|
-
|
|
23631
|
-
@media screen and (min-width: calc(${props => props.theme.theme_vars.breakpoints.l} + 60px)){
|
|
23632
|
-
margin-right: auto;
|
|
23633
|
-
margin-left: auto;
|
|
23634
|
-
max-width: ${props => props.theme.theme_vars.breakpoints.l};
|
|
23635
|
-
}
|
|
23636
|
-
`;
|
|
23637
|
-
|
|
23638
|
-
const CookieHeading = styled.p`
|
|
23639
|
-
${props => props.theme.theme_vars.h3}
|
|
23640
|
-
|
|
23641
|
-
`;
|
|
23642
|
-
|
|
23643
|
-
const CookieParagraph = styled.div`
|
|
23644
|
-
margin: ${props => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23645
|
-
|
|
23646
|
-
a {
|
|
23647
|
-
${props => props.theme.linkStyles}
|
|
23648
|
-
&:hover{
|
|
23649
|
-
${props => props.theme.linkStylesHover}
|
|
23650
|
-
}
|
|
23651
|
-
&:focus{
|
|
23652
|
-
${props => props.theme.linkStylesFocus}
|
|
23653
|
-
}
|
|
23654
|
-
&:active{
|
|
23655
|
-
${props => props.theme.linkStylesActive}
|
|
23656
|
-
}
|
|
23657
|
-
}
|
|
23658
|
-
`;
|
|
23659
|
-
const ButtonsContainer = styled.div`
|
|
23660
|
-
display: flex;
|
|
23661
|
-
-webkit-flex-direction: row;
|
|
23662
|
-
-moz-flex-direction: row;
|
|
23663
|
-
-ms-flex-direction: row;
|
|
23664
|
-
flex-direction: row;
|
|
23665
|
-
align-items: flex-start;
|
|
23666
|
-
|
|
23667
|
-
.button--primary {
|
|
23668
|
-
margin-right: 10px;
|
|
23669
|
-
line-height: 1.3;
|
|
23670
|
-
width: 50%;
|
|
23671
|
-
|
|
23672
|
-
&:last-of-type {
|
|
23673
|
-
margin-right: 0;
|
|
23674
|
-
line-height: 1.3;
|
|
23675
|
-
}
|
|
23676
|
-
}
|
|
23677
|
-
|
|
23678
|
-
@media screen and (min-width: ${props => props.theme.theme_vars.breakpoints.s}){
|
|
23679
|
-
display: block;
|
|
23680
|
-
|
|
23681
|
-
.button--primary {
|
|
23682
|
-
width: auto;
|
|
23683
|
-
&:last-of-type {
|
|
23684
|
-
line-height: 1.3;
|
|
23844
|
+
margin-left: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23685
23845
|
|
|
23686
|
-
|
|
23687
|
-
}
|
|
23846
|
+
&:hover {
|
|
23847
|
+
${(props) => props.theme.linkStylesHover};
|
|
23688
23848
|
}
|
|
23689
23849
|
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
.button--primary {
|
|
23694
|
-
width: auto;
|
|
23695
|
-
&:last-of-type {
|
|
23696
|
-
line-height: 1.3;
|
|
23850
|
+
&:focus {
|
|
23851
|
+
${(props) => props.theme.linkStylesFocus};
|
|
23852
|
+
}
|
|
23697
23853
|
|
|
23698
|
-
|
|
23699
|
-
}
|
|
23854
|
+
&:active {
|
|
23855
|
+
${(props) => props.theme.linkStylesActive};
|
|
23700
23856
|
}
|
|
23701
23857
|
`;
|
|
23702
23858
|
|
|
23703
|
-
const
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
display: inline-block;
|
|
23708
|
-
line-height: 1;
|
|
23709
|
-
font-family: ${props => props.theme.theme_vars.fontstack};
|
|
23710
|
-
border-radius: ${props => props.theme.theme_vars.border_radius};
|
|
23711
|
-
text-decoration: none;
|
|
23712
|
-
|
|
23713
|
-
&.button--primary {
|
|
23714
|
-
color: white;
|
|
23715
|
-
background-color: ${props => props.theme.theme_vars.colours.action};
|
|
23859
|
+
const CurrentPage = styled.span`
|
|
23860
|
+
${(props) => props.theme.fontStyles};
|
|
23861
|
+
margin-left: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23862
|
+
`;
|
|
23716
23863
|
|
|
23717
|
-
|
|
23718
|
-
|
|
23719
|
-
|
|
23720
|
-
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
23724
|
-
box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23725
|
-
-webkit-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23726
|
-
-moz-box-shadow: 0px -3px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23727
|
-
}
|
|
23728
|
-
&:active {
|
|
23729
|
-
transform: translateY(2px);
|
|
23730
|
-
color: ${props => props.theme.theme_vars.colours.black} !important;
|
|
23731
|
-
background-color: ${props => props.theme.theme_vars.colours.focus};
|
|
23732
|
-
box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23733
|
-
-webkit-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23734
|
-
-moz-box-shadow: 0px -1px 0px 0px ${props => props.theme.theme_vars.colours.black} inset;
|
|
23735
|
-
}
|
|
23736
|
-
}
|
|
23737
|
-
&.button--secondary {
|
|
23738
|
-
color: ${props => props.theme.theme_vars.colours.action};
|
|
23739
|
-
background-color: transparent;
|
|
23740
|
-
border: 2px solid ${props => props.theme.theme_vars.colours.action};
|
|
23864
|
+
var Contents$1 = function (_a) {
|
|
23865
|
+
var contents = _a.contents, _b = _a.currentPath, currentPath = _b === void 0 ? undefined : _b, _c = _a.title, title = _c === void 0 ? 'Contents' : _c;
|
|
23866
|
+
return (React.createElement(Container$B, { "data-testid": "Contents" },
|
|
23867
|
+
React.createElement(Heading, { text: title, level: 2 }),
|
|
23868
|
+
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)))); }))));
|
|
23869
|
+
};
|
|
23741
23870
|
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23746
|
-
outline: none;
|
|
23747
|
-
border: 2px solid ${props => props.theme.theme_vars.colours.focus};
|
|
23748
|
-
background-color: ${props => props.theme.theme_vars.colours.action}1A;
|
|
23749
|
-
}
|
|
23750
|
-
}
|
|
23751
|
-
&.button--small {
|
|
23752
|
-
font-size: 12px;
|
|
23753
|
-
padding: 10px 16px;
|
|
23754
|
-
}
|
|
23755
|
-
&.button--medium {
|
|
23756
|
-
font-size: 14px;
|
|
23757
|
-
padding: 11px 20px;
|
|
23758
|
-
}
|
|
23759
|
-
&.button--large {
|
|
23760
|
-
font-size: 16px;
|
|
23761
|
-
padding: 12px 24px;
|
|
23762
|
-
}
|
|
23871
|
+
const Container$A = styled.div`
|
|
23872
|
+
display: block;
|
|
23873
|
+
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23874
|
+
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23763
23875
|
`;
|
|
23764
23876
|
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
};
|
|
23877
|
+
const NavigationLink = styled.a`
|
|
23878
|
+
display: flex;
|
|
23879
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
23880
|
+
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
23881
|
+
${(props) => props.theme.fontStyles};
|
|
23882
|
+
${(props) => props.theme.linkStyles};
|
|
23883
|
+
text-decoration: none !important;
|
|
23773
23884
|
|
|
23774
|
-
|
|
23885
|
+
&:hover {
|
|
23886
|
+
${(props) => props.theme.linkStylesHover};
|
|
23887
|
+
text-decoration: underline !important;
|
|
23888
|
+
text-decoration-style: dashed !important;
|
|
23889
|
+
}
|
|
23775
23890
|
|
|
23776
|
-
|
|
23777
|
-
|
|
23778
|
-
}
|
|
23891
|
+
&:focus {
|
|
23892
|
+
${(props) => props.theme.linkStylesFocus};
|
|
23893
|
+
}
|
|
23779
23894
|
|
|
23780
|
-
|
|
23895
|
+
&:active {
|
|
23896
|
+
${(props) => props.theme.linkStylesActive};
|
|
23897
|
+
}
|
|
23898
|
+
`;
|
|
23781
23899
|
|
|
23782
|
-
|
|
23900
|
+
const PageTitle$1 = styled.span`
|
|
23901
|
+
font-size: 0.9rem;
|
|
23902
|
+
text-decoration: underline;
|
|
23903
|
+
`;
|
|
23783
23904
|
|
|
23784
|
-
|
|
23785
|
-
|
|
23786
|
-
|
|
23905
|
+
const Arrow = styled.div`
|
|
23906
|
+
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
23907
|
+
text-decoration: none;
|
|
23908
|
+
`;
|
|
23787
23909
|
|
|
23788
|
-
|
|
23910
|
+
const LinkText = styled.div`
|
|
23911
|
+
flex-grow: 1;
|
|
23912
|
+
`;
|
|
23789
23913
|
|
|
23790
|
-
var
|
|
23791
|
-
var
|
|
23792
|
-
|
|
23793
|
-
|
|
23794
|
-
useEffect(function () {
|
|
23795
|
-
checkCookie();
|
|
23796
|
-
});
|
|
23797
|
-
var _d = useState(false), showCookieBanner = _d[0], setShowCookieBanner = _d[1];
|
|
23798
|
-
var _e = useState(false), showCookiesRejectedBanner = _e[0], setShowCookiesRejectedBanner = _e[1];
|
|
23799
|
-
var _f = useState(false), showCookiesAcceptedBanner = _f[0], setShowCookiesAcceptedBanner = _f[1];
|
|
23800
|
-
var checkCookie = function () {
|
|
23801
|
-
// on every page load run this.
|
|
23802
|
-
var myCookie = getCookie(cookieName);
|
|
23803
|
-
if (myCookie == null) {
|
|
23804
|
-
// no cookie - show banner
|
|
23805
|
-
setShowCookieBanner(true);
|
|
23806
|
-
}
|
|
23807
|
-
else {
|
|
23808
|
-
// we have cookie
|
|
23809
|
-
var cookiesAccepted = myCookie.includes('"cookiesAccepted":true');
|
|
23810
|
-
var bannerDismissed = myCookie.includes('"bannerDismissed":true');
|
|
23811
|
-
var cookiesAcceptedConfirmationBanner = myCookie.includes('"cookiesAcceptedConfirmationBanner":true');
|
|
23812
|
-
// banner already dismissed - hide the banner
|
|
23813
|
-
if (!bannerDismissed) {
|
|
23814
|
-
setShowCookieBanner(false);
|
|
23815
|
-
}
|
|
23816
|
-
// if we have accepted the cookies the page reloads, so we check acceptedConfirmationBannerDismissed
|
|
23817
|
-
if (cookiesAccepted && !cookiesAcceptedConfirmationBanner) {
|
|
23818
|
-
// if 1 minute has passed from setting of the cookie then dont show it on page reload
|
|
23819
|
-
var cookieVals = JSON.parse(myCookie);
|
|
23820
|
-
// subtracting a year because I'm a plum and didn't notice a bug below - but its safer to minus a year than to fix it!
|
|
23821
|
-
var cookieWasActuallyCreated = dayjs(cookieVals.cookieCreated).utc().subtract(1, 'year');
|
|
23822
|
-
var currentDateTime = dayjs().utc();
|
|
23823
|
-
var timeBetweenNowAndCreated = currentDateTime.diff(cookieWasActuallyCreated, 'milliseconds');
|
|
23824
|
-
if (timeBetweenNowAndCreated <= 60000) {
|
|
23825
|
-
setShowCookiesAcceptedBanner(true);
|
|
23826
|
-
}
|
|
23827
|
-
else {
|
|
23828
|
-
hideCookiesAcceptedConfirmationBanner();
|
|
23829
|
-
}
|
|
23830
|
-
}
|
|
23831
|
-
if (cookiesAccepted) {
|
|
23832
|
-
// we've accepted cookies so load all the things
|
|
23833
|
-
acceptCallback();
|
|
23834
|
-
}
|
|
23835
|
-
}
|
|
23836
|
-
};
|
|
23837
|
-
var toggleCookie = function (accepted) {
|
|
23838
|
-
var cookie = {};
|
|
23839
|
-
var date = new Date();
|
|
23840
|
-
// Cookie is valid 1 year
|
|
23841
|
-
date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000);
|
|
23842
|
-
if (accepted === true) {
|
|
23843
|
-
// NB cookie created is actually cookie expiry - safer to minus a year from the value in calculations than change it.
|
|
23844
|
-
cookie = {
|
|
23845
|
-
bannerDismissed: true,
|
|
23846
|
-
cookiesAccepted: true,
|
|
23847
|
-
cookiesAcceptedConfirmationBanner: false,
|
|
23848
|
-
cookieCreated: date.toUTCString(),
|
|
23849
|
-
};
|
|
23850
|
-
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookie), ";expires=").concat(date.toUTCString(), ";path=/");
|
|
23851
|
-
location.reload(); // reload to load the cookiesss
|
|
23852
|
-
}
|
|
23853
|
-
else {
|
|
23854
|
-
cookie = {
|
|
23855
|
-
bannerDismissed: true,
|
|
23856
|
-
cookiesAccepted: false,
|
|
23857
|
-
cookiesAcceptedConfirmationBanner: false,
|
|
23858
|
-
cookieCreated: date.toUTCString(),
|
|
23859
|
-
};
|
|
23860
|
-
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookie), ";expires=").concat(date.toUTCString(), ";path=/");
|
|
23861
|
-
setShowCookieBanner(false);
|
|
23862
|
-
setShowCookiesRejectedBanner(true);
|
|
23863
|
-
}
|
|
23864
|
-
};
|
|
23865
|
-
// on reject
|
|
23866
|
-
var rejectCookies = function (e) {
|
|
23867
|
-
toggleCookie(false);
|
|
23868
|
-
};
|
|
23869
|
-
// on accept
|
|
23870
|
-
var acceptCookies = function (e) {
|
|
23871
|
-
toggleCookie(true);
|
|
23872
|
-
};
|
|
23873
|
-
var hideCookiesAcceptedConfirmationBanner = function () {
|
|
23874
|
-
setShowCookiesAcceptedBanner(false);
|
|
23875
|
-
var myCookie = getCookie(cookieName);
|
|
23876
|
-
var cookieVals = JSON.parse(myCookie);
|
|
23877
|
-
cookieVals.cookiesAcceptedConfirmationBanner = true;
|
|
23878
|
-
document.cookie = "".concat(cookieName, "=").concat(JSON.stringify(cookieVals), ";expires=").concat(cookieVals.cookieCreated, ";path=/");
|
|
23879
|
-
};
|
|
23880
|
-
var hideCookiesConfirmationBanner = function (e) {
|
|
23881
|
-
setShowCookiesRejectedBanner(false);
|
|
23882
|
-
hideCookiesAcceptedConfirmationBanner();
|
|
23914
|
+
var ContentsNavigation = function (_a) {
|
|
23915
|
+
var contents = _a.contents, currentPath = _a.currentPath;
|
|
23916
|
+
var currentPage = function () {
|
|
23917
|
+
return contents.findIndex(function (item) { return item.url === currentPath; });
|
|
23883
23918
|
};
|
|
23884
|
-
|
|
23885
|
-
|
|
23886
|
-
|
|
23887
|
-
|
|
23888
|
-
|
|
23889
|
-
|
|
23890
|
-
|
|
23891
|
-
|
|
23892
|
-
|
|
23893
|
-
|
|
23894
|
-
|
|
23895
|
-
|
|
23896
|
-
|
|
23897
|
-
|
|
23898
|
-
React.createElement(
|
|
23899
|
-
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
23919
|
+
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
23920
|
+
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
23921
|
+
return (React.createElement(Container$A, { "data-testid": "ContentsNavigation" },
|
|
23922
|
+
previousPage && (React.createElement(NavigationLink, { href: previousPage.url },
|
|
23923
|
+
React.createElement(Arrow, null, "\u2190"),
|
|
23924
|
+
React.createElement(LinkText, null,
|
|
23925
|
+
"Previous",
|
|
23926
|
+
React.createElement("br", null),
|
|
23927
|
+
React.createElement(PageTitle$1, null, previousPage.title)))),
|
|
23928
|
+
nextPage && (React.createElement(NavigationLink, { href: nextPage.url },
|
|
23929
|
+
React.createElement(Arrow, null, "\u2192"),
|
|
23930
|
+
React.createElement(LinkText, null,
|
|
23931
|
+
"Next",
|
|
23932
|
+
React.createElement("br", null),
|
|
23933
|
+
React.createElement(PageTitle$1, null, nextPage.title))))));
|
|
23900
23934
|
};
|
|
23901
23935
|
|
|
23902
23936
|
var customParseFormat$1 = {exports: {}};
|
|
@@ -29191,7 +29225,7 @@ var DirectoryShortListContext = createContext({});
|
|
|
29191
29225
|
var DirectoryShortListProvider = function (_a) {
|
|
29192
29226
|
var _b = _a.shortlistKey, shortlistKey = _b === void 0 ? 'DirectoryShort' : _b, children = _a.children;
|
|
29193
29227
|
var _c = useLocalStorage(shortlistKey, []), favourites = _c[0], setFavourites = _c[1];
|
|
29194
|
-
var toggleFavourites = function (id, name, snippet, email, website, phone) {
|
|
29228
|
+
var toggleFavourites = function (id, name, snippet, email, website, phone, addresses, fees) {
|
|
29195
29229
|
var updatedFavourites = __spreadArray([], favourites, true);
|
|
29196
29230
|
if (isFavourite(id)) {
|
|
29197
29231
|
var favouriteToRemove = updatedFavourites.find(function (favourite) { return favourite.id === id; });
|
|
@@ -29205,6 +29239,8 @@ var DirectoryShortListProvider = function (_a) {
|
|
|
29205
29239
|
email: email,
|
|
29206
29240
|
website: website,
|
|
29207
29241
|
phone: phone,
|
|
29242
|
+
addresses: addresses,
|
|
29243
|
+
fees: fees,
|
|
29208
29244
|
});
|
|
29209
29245
|
}
|
|
29210
29246
|
setFavourites(updatedFavourites);
|
|
@@ -29236,11 +29272,11 @@ var HeartIcon = function (_a) {
|
|
|
29236
29272
|
};
|
|
29237
29273
|
|
|
29238
29274
|
var DirectoryAddToShortList = function (_a) {
|
|
29239
|
-
var id = _a.id, name = _a.name, snippet = _a.snippet, email = _a.email, website = _a.website, phone = _a.phone;
|
|
29275
|
+
var id = _a.id, name = _a.name, snippet = _a.snippet, email = _a.email, website = _a.website, phone = _a.phone, addresses = _a.addresses, fees = _a.fees;
|
|
29240
29276
|
var _b = useDirectoryShortListContext(), toggleFavourites = _b.toggleFavourites, isFavourite = _b.isFavourite;
|
|
29241
29277
|
var themeContext = useContext(ThemeContext);
|
|
29242
29278
|
var favourite = isFavourite(id);
|
|
29243
|
-
return (React.createElement(AddToShortlist, { onClick: function (e) { return toggleFavourites(id, name, snippet, email, website, phone); }, "data-testid": "DirectoryAddToShortList", favourite: favourite },
|
|
29279
|
+
return (React.createElement(AddToShortlist, { onClick: function (e) { return toggleFavourites(id, name, snippet, email, website, phone, addresses, fees); }, "data-testid": "DirectoryAddToShortList", favourite: favourite },
|
|
29244
29280
|
favourite ? (React.createElement(IconDownload$1, { colourFill: themeContext.theme_vars.colours.negative })) : (React.createElement(HeartIcon, { colourFill: themeContext.theme_vars.colours.action })),
|
|
29245
29281
|
favourite ? React.createElement(React.Fragment, null, "Remove from shortlist") : React.createElement(React.Fragment, null, "Add to shortlist")));
|
|
29246
29282
|
};
|
|
@@ -29333,7 +29369,9 @@ var DirectoryService = function (_a) {
|
|
|
29333
29369
|
" Shortlist (",
|
|
29334
29370
|
favourites.length,
|
|
29335
29371
|
")")),
|
|
29336
|
-
React.createElement(DirectoryAddToShortList, { id: id, name: name, snippet: transformSnippet(description, 350), email: email, website: url, phone: (_c = (_b = contacts === null || contacts === void 0 ? void 0 : contacts[0]) === null || _b === void 0 ? void 0 : _b.phones) === null || _c === void 0 ? void 0 : _c.flatMap(function (phone) { return phone.number; }).join(', ')
|
|
29372
|
+
React.createElement(DirectoryAddToShortList, { id: id, name: name, snippet: transformSnippet(description, 350), email: email, website: url, phone: (_c = (_b = contacts === null || contacts === void 0 ? void 0 : contacts[0]) === null || _b === void 0 ? void 0 : _b.phones) === null || _c === void 0 ? void 0 : _c.flatMap(function (phone) { return phone.number; }).join(', '), addresses: service_at_locations.flatMap(function (location) {
|
|
29373
|
+
return location.physical_addresses;
|
|
29374
|
+
}), fees: fees })))))),
|
|
29337
29375
|
service_at_locations.filter(function (location) {
|
|
29338
29376
|
return location.is_visitable != false;
|
|
29339
29377
|
}).length > 0 && (React.createElement(Column, { small: "full", medium: "full", large: "full", classes: "striped-column" },
|
|
@@ -29893,17 +29931,17 @@ var RadioCheckboxInput = function (_a) {
|
|
|
29893
29931
|
};
|
|
29894
29932
|
|
|
29895
29933
|
var DirectoryServiceList = function (_a) {
|
|
29896
|
-
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.postcode, postcode = _c === void 0 ? '' : _c, setPostcode = _a.setPostcode, _d = _a.totalResults, totalResults = _d === void 0 ? 0 : _d, _e = _a.pageNumber, pageNumber = _e === void 0 ? 1 : _e, setPageNumber = _a.setPageNumber, _f = _a.perPage, perPage = _f === void 0 ? 5 : _f, _g = _a.extractLength, extractLength = _g === void 0 ? 300 : _g, _h = _a.categories, categories = _h === void 0 ? [] : _h, setCategories = _a.setCategories, _j = _a.minimumAge, minimumAge = _j === void 0 ? undefined : _j, setMinimumAge = _a.setMinimumAge, _k = _a.maximumAge, maximumAge = _k === void 0 ? undefined : _k, setMaximumAge = _a.setMaximumAge, _l = _a.mapCenter, mapCenter = _l === void 0 ? '52.23555414368587,-0.8957390701320571' : _l, _m = _a.mapZoom, mapZoom = _m === void 0 ? 9 : _m, _o = _a.isLoading, isLoading = _o === void 0 ? false : _o, _p = _a.ageInMonths, ageInMonths = _p === void 0 ? false : _p, _q = _a.hasDocuments, hasDocuments = _q === void 0 ? false : _q;
|
|
29897
|
-
var
|
|
29898
|
-
var
|
|
29899
|
-
var
|
|
29900
|
-
var
|
|
29901
|
-
var
|
|
29902
|
-
var
|
|
29903
|
-
var
|
|
29904
|
-
var
|
|
29934
|
+
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.postcode, postcode = _c === void 0 ? '' : _c, setPostcode = _a.setPostcode, _d = _a.totalResults, totalResults = _d === void 0 ? 0 : _d, _e = _a.pageNumber, pageNumber = _e === void 0 ? 1 : _e, setPageNumber = _a.setPageNumber, _f = _a.perPage, perPage = _f === void 0 ? 5 : _f, _g = _a.extractLength, extractLength = _g === void 0 ? 300 : _g, _h = _a.categories, categories = _h === void 0 ? [] : _h, setCategories = _a.setCategories, _j = _a.minimumAge, minimumAge = _j === void 0 ? undefined : _j, setMinimumAge = _a.setMinimumAge, _k = _a.maximumAge, maximumAge = _k === void 0 ? undefined : _k, setMaximumAge = _a.setMaximumAge, _l = _a.mapCenter, mapCenter = _l === void 0 ? '52.23555414368587,-0.8957390701320571' : _l, _m = _a.mapZoom, mapZoom = _m === void 0 ? 9 : _m, _o = _a.isLoading, isLoading = _o === void 0 ? false : _o, _p = _a.ageInMonths, ageInMonths = _p === void 0 ? false : _p, _q = _a.hasDocuments, hasDocuments = _q === void 0 ? false : _q, _r = _a.isError, isError = _r === void 0 ? false : _r;
|
|
29935
|
+
var _s = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion"), []), accordions = _s[0], setAccordions = _s[1];
|
|
29936
|
+
var _t = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion-all"), true), openAll = _t[0], setOpenAll = _t[1];
|
|
29937
|
+
var _u = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-show-map"), false), showMap = _u[0], setShowMap = _u[1];
|
|
29938
|
+
var _v = useState(false), showFilters = _v[0], setShowFilters = _v[1];
|
|
29939
|
+
var _w = useDirectoryShortListContext(), _x = _w.favourites, favourites = _x.favourites; _x.setFavourites; _w.toggleFavourites; _w.isFavourite;
|
|
29940
|
+
var _y = useState(false), notServer = _y[0], setNotServer = _y[1];
|
|
29941
|
+
var _z = useState(search), searchTerm = _z[0], setSearchTerm = _z[1];
|
|
29942
|
+
var _0 = useState(postcode), postcodeSearch = _0[0], setPostcodeSearch = _0[1];
|
|
29905
29943
|
var themeContext = useContext(ThemeContext);
|
|
29906
|
-
var
|
|
29944
|
+
var _1 = useState(false), filtersActive = _1[0], setFiltersActive = _1[1];
|
|
29907
29945
|
useEffect(function () {
|
|
29908
29946
|
setNotServer(true);
|
|
29909
29947
|
setFiltersActive(hasActiveFilters());
|
|
@@ -30027,7 +30065,7 @@ var DirectoryServiceList = function (_a) {
|
|
|
30027
30065
|
} })),
|
|
30028
30066
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
30029
30067
|
React.createElement(Label$1, { htmlFor: "postcode" }, "Postcode (optional)"),
|
|
30030
|
-
React.createElement(HintText, { text: "Enter a postcode" }),
|
|
30068
|
+
React.createElement(HintText, { text: "Enter a postcode to see results within 2 miles" }),
|
|
30031
30069
|
React.createElement(Input, { name: "postcode", type: "text", defaultValue: postcodeSearch, id: "postcode", onChange: function (e) { return setPostcodeSearch(e.target.value); } })),
|
|
30032
30070
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-third" },
|
|
30033
30071
|
React.createElement(ButtonContainer$1, null,
|
|
@@ -30078,7 +30116,9 @@ var DirectoryServiceList = function (_a) {
|
|
|
30078
30116
|
category.options.map(function (taxonomy) { return (React.createElement(Category$2, { key: taxonomy.id },
|
|
30079
30117
|
React.createElement(RadioCheckboxInput, { name: taxonomy.vocabulary, value: taxonomy.id, label: taxonomy.name, singleSelection: category.singleSelection, checked: taxonomy.checked, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); } }))); }))))); })))))),
|
|
30080
30118
|
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
30081
|
-
React.createElement(Row$1, null,
|
|
30119
|
+
React.createElement(Row$1, null, isError ? (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30120
|
+
React.createElement(AlertBannerService, null,
|
|
30121
|
+
React.createElement("p", null, "Sorry, there was a problem fetching results. Please try again later.")))) : isLoading ? (React.createElement(LoadingContainer$1, null,
|
|
30082
30122
|
React.createElement(LoadingSpinner, null),
|
|
30083
30123
|
React.createElement("p", null, "Loading"))) : (React.createElement(React.Fragment, null,
|
|
30084
30124
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
@@ -30100,7 +30140,7 @@ var DirectoryServiceList = function (_a) {
|
|
|
30100
30140
|
React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber })),
|
|
30101
30141
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, notServer && React.createElement(React.Fragment, null, (services === null || services === void 0 ? void 0 : services.length) > 0 && showMap && React.createElement(DirectoryMap, { mapProps: mapProps }))),
|
|
30102
30142
|
services.map(function (service, index) {
|
|
30103
|
-
var _a, _b, _c, _d, _e, _f;
|
|
30143
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
30104
30144
|
var snippet = transformSnippet(service.description, extractLength);
|
|
30105
30145
|
return (React.createElement(Column, { small: "full", medium: "full", large: "full", key: service.id },
|
|
30106
30146
|
React.createElement(ServiceContainer, { resultNumber: index },
|
|
@@ -30123,7 +30163,9 @@ var DirectoryServiceList = function (_a) {
|
|
|
30123
30163
|
' ',
|
|
30124
30164
|
transformAge(eligibility.maximum_age, ageInMonths))); })))),
|
|
30125
30165
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30126
|
-
React.createElement(DirectoryAddToShortList, { id: service.id, name: service.name, snippet: snippet, email: service.email, website: service.url, phone: (_f = (_e = (_d = service.contacts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.phones) === null || _f === void 0 ? void 0 : _f.flatMap(function (phone) { return phone.number; }).join(', ')
|
|
30166
|
+
React.createElement(DirectoryAddToShortList, { id: service.id, name: service.name, snippet: snippet, email: service.email, website: service.url, phone: (_f = (_e = (_d = service.contacts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.phones) === null || _f === void 0 ? void 0 : _f.flatMap(function (phone) { return phone.number; }).join(', '), addresses: (_g = service.service_at_locations) === null || _g === void 0 ? void 0 : _g.flatMap(function (location) {
|
|
30167
|
+
return location.physical_addresses;
|
|
30168
|
+
}), fees: service.fees }))))));
|
|
30127
30169
|
}),
|
|
30128
30170
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30129
30171
|
React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber })))))))));
|
|
@@ -30238,6 +30280,11 @@ const AddContainer = styled.div`
|
|
|
30238
30280
|
}
|
|
30239
30281
|
`;
|
|
30240
30282
|
|
|
30283
|
+
const SubTitle = styled.p`
|
|
30284
|
+
font-weight: bold;
|
|
30285
|
+
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
30286
|
+
`;
|
|
30287
|
+
|
|
30241
30288
|
var lib = {};
|
|
30242
30289
|
|
|
30243
30290
|
var mode$1 = {
|
|
@@ -31607,22 +31654,33 @@ var DirectoryShortList = function (_a) {
|
|
|
31607
31654
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31608
31655
|
React.createElement(PrintContainer, null,
|
|
31609
31656
|
React.createElement(PrintButton, { onClick: function () { return window.print(); } }, "Print Shortlist"))),
|
|
31610
|
-
favourites.map(function (favourite) {
|
|
31611
|
-
|
|
31612
|
-
|
|
31613
|
-
|
|
31614
|
-
|
|
31615
|
-
|
|
31616
|
-
|
|
31617
|
-
|
|
31618
|
-
React.createElement(
|
|
31619
|
-
|
|
31620
|
-
|
|
31621
|
-
|
|
31622
|
-
|
|
31623
|
-
|
|
31624
|
-
|
|
31625
|
-
|
|
31657
|
+
favourites.map(function (favourite) {
|
|
31658
|
+
var _a, _b;
|
|
31659
|
+
return (React.createElement(Column, { key: favourite.id, small: "full", medium: "full", large: "full" },
|
|
31660
|
+
React.createElement(FavouriteContainer, null,
|
|
31661
|
+
React.createElement(Row$1, null,
|
|
31662
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31663
|
+
React.createElement(QRCodeContainer, null,
|
|
31664
|
+
React.createElement(_default, { value: "".concat(directoryPath, "/").concat(favourite.id), size: 256, style: { height: 'auto', maxWidth: '100%', width: '100%' }, viewBox: "0 0 256 256" })),
|
|
31665
|
+
React.createElement(ServiceLink, { href: "".concat(directoryPath, "/").concat(favourite.id) }, favourite.name),
|
|
31666
|
+
React.createElement(PrintLink, null,
|
|
31667
|
+
React.createElement("p", null, "".concat(directoryPath, "/").concat(favourite.id)))),
|
|
31668
|
+
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
31669
|
+
React.createElement("div", null, favourite.snippet),
|
|
31670
|
+
((_a = favourite.addresses) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", null,
|
|
31671
|
+
React.createElement(SubTitle, null, "Address"),
|
|
31672
|
+
((_b = favourite.addresses) === null || _b === void 0 ? void 0 : _b.length) === 1 ? (React.createElement("p", null, Object.values(favourite.addresses[0])
|
|
31673
|
+
.filter(function (item) { return item !== '' && item !== favourite.addresses[0].id; })
|
|
31674
|
+
.join(', '))) : (React.createElement("ul", null, favourite.addresses.map(function (address) { return (React.createElement("li", { key: address.id }, Object.values(address)
|
|
31675
|
+
.filter(function (item) { return item !== '' && item !== address.id; })
|
|
31676
|
+
.join(', '))); })))))),
|
|
31677
|
+
React.createElement(Column, { small: "full", medium: "full", large: "one-half" },
|
|
31678
|
+
React.createElement(SummaryList, { terms: transformService(favourite.email, favourite.website, favourite.phone), hasMargin: false }),
|
|
31679
|
+
favourite.fees && (React.createElement(SummaryList, { terms: [{ term: 'Cost', detail: favourite.fees }], hasMargin: false }))),
|
|
31680
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31681
|
+
React.createElement(AddContainer, null,
|
|
31682
|
+
React.createElement(DirectoryAddToShortList, { id: favourite.id, name: favourite.name, snippet: favourite.snippet, email: favourite.email, website: favourite.website, phone: favourite.phone, addresses: favourite.addresses })))))));
|
|
31683
|
+
}))) : (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31626
31684
|
React.createElement(FavouriteContainer, null,
|
|
31627
31685
|
React.createElement("p", null, "No items in the shortlist"))))))));
|
|
31628
31686
|
};
|
|
@@ -31757,8 +31815,8 @@ const LoadingContainer = styled.div`
|
|
|
31757
31815
|
`;
|
|
31758
31816
|
|
|
31759
31817
|
var DirectoryDocumentList = function (_a) {
|
|
31760
|
-
var directoryPath = _a.directoryPath, documents = _a.documents, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, _d = _a.pageNumber, pageNumber = _d === void 0 ? 1 : _d, setPageNumber = _a.setPageNumber, _e = _a.perPage, perPage = _e === void 0 ? 10 : _e, categories = _a.categories, setCategories = _a.setCategories, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f;
|
|
31761
|
-
var
|
|
31818
|
+
var directoryPath = _a.directoryPath, documents = _a.documents, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, _d = _a.pageNumber, pageNumber = _d === void 0 ? 1 : _d, setPageNumber = _a.setPageNumber, _e = _a.perPage, perPage = _e === void 0 ? 10 : _e, categories = _a.categories, setCategories = _a.setCategories, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isError, isError = _g === void 0 ? false : _g;
|
|
31819
|
+
var _h = useState(search), searchTerm = _h[0], setSearchTerm = _h[1];
|
|
31762
31820
|
var submitSearch = function (e) {
|
|
31763
31821
|
e.preventDefault();
|
|
31764
31822
|
setSearch(searchTerm);
|
|
@@ -31821,7 +31879,9 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31821
31879
|
React.createElement(RadioCheckboxInput, { name: taxonomy.vocabulary, value: taxonomy.id, label: taxonomy.name, singleSelection: category.singleSelection, checked: taxonomy.checked, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); } }))); })))); }))),
|
|
31822
31880
|
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
31823
31881
|
React.createElement(Row$1, null,
|
|
31824
|
-
|
|
31882
|
+
isError ? (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31883
|
+
React.createElement(AlertBannerService, null,
|
|
31884
|
+
React.createElement("p", null, "Sorry, there was a problem fetching results. Please try again later.")))) : isLoading ? (React.createElement(LoadingContainer, null,
|
|
31825
31885
|
React.createElement(LoadingSpinner, null),
|
|
31826
31886
|
React.createElement("p", null, "Loading"))) : (React.createElement(React.Fragment, null,
|
|
31827
31887
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, (documents === null || documents === void 0 ? void 0 : documents.length) > 0 ? (React.createElement(ResultInfo, null,
|