Plugin Directory

Changeset 3386349


Ignore:
Timestamp:
10/29/2025 10:48:54 AM (5 months ago)
Author:
maheshmuralip
Message:

Update to version 1.3.22 from GitHub

Location:
nhsblocks
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • nhsblocks/tags/1.3.22/build/index.asset.php

    r3373727 r3386349  
    1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-components'), 'version' => '7d59995be6989ad309ed');
     1<?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => 'd4cec148b032d467017e');
  • nhsblocks/tags/1.3.22/build/index.js

    r3373727 r3386349  
    1 (()=>{var e={574:()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:j,ColorPalette:v,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:y,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=y("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(N,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:o}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(j,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:o})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(v,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:L}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(L,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(L.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:I}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:I("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:I("Standard (Green)"),isDefault:!0},{name:"secondary",label:I("Secondary (Grey)")},{name:"reverse",label:I("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:I("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:M,PanelRow:W,RadioControl:G,clientId:z}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(M,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const re=window.wp.components,{__:oe}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:ce,RichText:he,InnerBlocks:de,MediaUpload:ue,InspectorControls:ke,useBlockProps:me}=wp.blockEditor;ie("nhsblocks/promo1",{title:oe("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:oe("Standard"),isDefault:!0},{name:"promo-small",label:oe("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"},showChevron:{type:"boolean",default:!1}},edit:e=>{const s=me(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(ke,{children:(0,k.jsx)(re.PanelBody,{title:oe("Promo Settings","nhsblocks"),initialOpen:!0,children:(0,k.jsx)(re.ToggleControl,{label:oe("Show Chevron Icon","nhsblocks"),checked:!!e.attributes.showChevron,onChange:e=>r({showChevron:e})})})},"inspector-controls"),(0,k.jsx)("ul",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(de,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(ce,{className:"nhsblocks-dropdown__input",label:oe("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(he,{placeholder:oe("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsxs)("div",{className:"nhsuk-card__description",children:[(0,k.jsx)(he,{...s,placeholder:oe("Promo Contents","nhsblocks"),onChange:e=>{var s;r({promoText:(s=e,s.replace(/<svg[\s\S]*?<\/svg>/gi,""))})},value:n}),e.attributes.showChevron&&(0,k.jsxs)("svg",{className:"nhsuk-icon",xmlns:"http://www.w3.org/2000/svg",width:"27",height:"27","aria-hidden":"true",focusable:"false",children:[(0,k.jsx)("circle",{cx:"13.333",cy:"13.333",r:"13.333",fill:""}),(0,k.jsxs)("g",{"data-name":"Group 1",fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2.667",children:[(0,k.jsx)("path",{d:"M15.438 13l-3.771 3.771"}),(0,k.jsx)("path",{"data-name":"Path",d:"M11.667 9.229L15.438 13"})]})]})]})]})]})},`promo-${e.clientId}`)},"promo-markup")]},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsx)("ul",{...s,className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-card__description",children:[(0,k.jsx)(he.Content,{value:n}),e.attributes.showChevron&&(0,k.jsxs)("svg",{className:"nhsuk-icon",xmlns:"http://www.w3.org/2000/svg",width:"27",height:"27","aria-hidden":"true",focusable:"false",children:[(0,k.jsx)("circle",{cx:"13.333",cy:"13.333",r:"13.333",fill:""}),(0,k.jsxs)("g",{"data-name":"Group 1",fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2.667",children:[(0,k.jsx)("path",{d:"M15.438 13l-3.771 3.771"}),(0,k.jsx)("path",{"data-name":"Path",d:"M11.667 9.229L15.438 13"})]})]})]})]})]})},`promo-${e.clientId}`)})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(he.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(de.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})},{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"},showChevron:{type:"boolean",default:!1}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsx)("ul",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})})})}}]});const{__:pe}=wp.i18n,be=[["nhsblocks/promo1"]],ge=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:pe("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:pe("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:pe("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:pe("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:pe("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:pe("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:xe}=wp.i18n,{registerBlockType:je,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:Ne,useSelect:ye}=wp.data;je("nhsblocks/promogroup",{title:xe("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Ne("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{template:ge})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(we,{variations:ge,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e.Content,{})})}}),je("nhsblocks/onehalfpro",{title:xe("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/onethirdpro",{title:xe("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/onequarterpro",{title:xe("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/twothirdspro",{title:xe("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/threequarterspro",{title:xe("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})});const{__:Te}=wp.i18n,{registerBlockType:fe}=wp.blocks,{RichText:Ce,useBlockProps:Be}=wp.blockEditor;fe("nhsblocks/quote1",{title:Te("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Te("Standard"),isDefault:!0},{name:"quote-reverse",label:Te("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Be(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(Ce,{...s,placeholder:Te("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(Ce,{placeholder:Te("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Be.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(Ce.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(Ce.Content,{value:t})})]})}});const{__:Le}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Ee,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Le("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Ae(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:o}=e;return[(0,k.jsx)(Se,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(De,{children:(0,k.jsx)(qe,{label:"Include an image?",checked:a,onChange:e=>o({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee,{placeholder:Le("Card Title","nhsblocks"),value:t,onChange:e=>{o({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Pe,{template:He}),(0,k.jsx)(Ee,{...s,placeholder:Le("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:n})]})]})]},save:e=>{const s=Ae.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Pe.Content,{}),(0,k.jsx)(Ee.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Ee.Content,{...Ae.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:Me,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:ze}=wp.blockEditor,{useDispatch:Fe,useSelect:Ye}=wp.data;Me("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Fe("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=Ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>We(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{template:Ve})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(ze,{variations:Ve,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge.Content,{})})})}}),Me("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(Ge.Content,{})})}});const{__:Je}=wp.i18n,{registerBlockType:Xe}=wp.blocks,{RichText:Ke,InspectorControls:Ze,ColorPalette:es,MediaUpload:ss,InnerBlocks:ts}=wp.blockEditor;Xe("nhsblocks/heroblock",{title:Je("Hero Block","nhsblocks"),description:Je("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ze,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(ss,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(es,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ts,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ts.Content,{})})})})})})}}),Xe("nhsblocks/heroinner",{title:Je("Hero Block Inner Text","nhsblocks"),description:Je("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ze,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(es,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ns}=wp.i18n,{registerBlockType:as}=wp.blocks,{InnerBlocks:ls}=wp.blockEditor;as("nhsblocks/stripesblock",{title:ns("Stripes Block","nhsblocks"),description:ns("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
     1(()=>{var e={574:()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
    22/* translators: example text. */
    3 content:ns("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
     3content:ts("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
    44/* translators: example text. */
    5 content:ns("Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.")}}]},{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
     5content:ts("Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.")}}]},{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
    66/* translators: example text. */
    7 content:ns("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
     7content:ts("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
    88/* translators: example text. */
    9 content:ns("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>(0,k.jsx)("div",{className:"nhsuk-striped-blocks",children:(0,k.jsx)(ls,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})}),save:e=>(0,k.jsx)(ls.Content,{})}),as("nhsblocks/stripeblock",{title:ns("Stripe Block","nhsblocks"),description:ns("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>{const s=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(ls,{allowedBlocks:s})})},save:e=>(0,k.jsx)("section",{className:"nhsuk-section",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(ls.Content,{})})})});const{__:rs}=wp.i18n,{registerBlockType:os}=wp.blocks,{RichText:is,URLInput:cs,InnerBlocks:hs}=wp.blockEditor,{Fragment:ds}=wp.element,{TextControl:us}=wp.components;os("nhsblocks/contentslist",{title:rs("Contents List","nhsblocks"),description:rs("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[rs("Contents List","nhsblocks"),rs("Navigation","nhsblocks"),rs("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:e=>{const{className:s,setAttributes:t,attributes:{title:n}}=e;return(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:rs("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(hs,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})})]})},save:e=>(0,k.jsxs)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:rs("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(hs.Content,{})})]})}),os("nhsblocks/contentslistitem",{title:rs("Contents List Item","nhsblocks"),description:rs("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{text:a,url:l}}=e;return(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:n?(0,k.jsxs)("div",{children:[(0,k.jsx)(us,{id:"example-input-field",label:(rs("Link Text"),"nhsblocks"),value:a,onChange:e=>t({text:e})}),(0,k.jsx)(cs,{className:"nhsuk-contents-list__link",value:l,onChange:e=>t({url:e}),placeholder:"Page Link (start typing to choose link)"})]}):(0,k.jsx)(ds,{children:l?(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"{ url }",children:a}):(0,k.jsx)("span",{className:"nhsuk-contents-list__current",children:a})})})},save:e=>{const{className:s,attributes:{text:t,url:n}}=e;return(0,k.jsx)(ds,{children:n?(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"pagename nhsuk-contents-list__link",href:n,children:t})}):(0,k.jsx)("li",{className:"nhsuk-contents-list__item","aria-current":"page",children:(0,k.jsx)("span",{className:"pagename nhsuk-contents-list__current",children:t})})})}});const{__:ks}=wp.i18n,{registerBlockType:ms}=wp.blocks,{RichText:ps,URLInput:bs,InnerBlocks:gs}=wp.blockEditor,{withSelect:xs,subscribe:js,select:vs}=wp.data,{Fragment:_s}=wp.element,{Button:ws,TextControl:Ns}=wp.components;ms("nhsblocks/contentslistpage",{title:ks("Contents List within a page","nhsblocks"),description:ks("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ks("Contents List Page","nhsblocks"),ks("Navigation","nhsblocks"),ks("Related sections on page","nhsblocks")],edit:xs((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:e,className:s,setAttributes:t,attributes:{h2titles:n}})=>{const a=[];let l=0;const r=e=>{if("core/heading"===e.name&&2===e.attributes.level){const s="nhs-block-anchor-"+l++,t=e.attributes.content.replace(/<[^>]+>/g,"");a.push({text:t,url:s,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(r)};e.map(r);const o=n.length==a.length&&n.every((function(e,s){return a[s].text===e.text&&a[s].url===e.url}));return(0,k.jsx)("div",{children:(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ks("Contents","nhsblocks")}),(0,k.jsxs)("ol",{className:"nhsuk-contents-list__list",children:[n?n.map((e=>(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"#"+e.url,children:e.text})},e.url))):(0,k.jsx)("p",{children:"Press the button below to make a table of contents for this page"}),(0,k.jsx)("p",{children:(0,k.jsx)(ws,{onClick:()=>{t({h2titles:a});for(let e=a.length-1;e>=0;e--)vs("core/block-editor").getBlock(a[e].id).attributes.anchor=a[e].url},className:"is-primary",disabled:o,children:"Update Heading Block"})})]})]})})})),save:e=>{const{attributes:{h2titles:s}}=e;return null}});const{__:ys}=wp.i18n,{registerBlockType:Ts}=wp.blocks,{format:fs}=wp.date,{RichText:Cs,InnerBlocks:Bs}=wp.blockEditor,{dispatch:Ls,subscribe:Is,select:Es,withSelect:Ps}=wp.data;Ts("nhsblocks/reviewdate",{title:ys("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:ys("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Ps((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:e,className:s,setAttributes:t,attributes:{lastSaved:n}})=>{if(e){const s=new Date(e),a=fs("d F Y",s);return n!==a&&(void 0===n?(t({lastSaved:a}),Ls("core/editor").savePost()):t({lastSaved:a})),(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:n})]})})}})),save:e=>{const{className:s,attributes:{lastSaved:t}}=e;return(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:t})]})})}}),t(574);const Ss={};Ss.left=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})}),Ss.right=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"})});const As=Ss,{__:qs}=wp.i18n,{registerBlockType:Rs}=wp.blocks,{RichText:Ds,InnerBlocks:Os}=wp.blockEditor,{Fragment:$s}=wp.element,{URLInput:Hs}=wp.blockEditor,{TextControl:Us}=wp.components;Rs("nhsblocks/pagination",{title:qs("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qs("Page Title"),nextText:qs("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:e=>{const{className:s,isSelected:t,setAttributes:n,attributes:{prevLink:a,nextLink:l,prevText:r,nextText:o}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsxs)("li",{className:"nhsuk-pagination-item--previous",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:r}),As.left]}),t?(0,k.jsxs)($s,{children:[(0,k.jsx)(Us,{label:(qs("Page Title"),"nhsblocks"),value:r,hideLabelFromVision:!0,onChange:e=>n({prevText:e})}),(0,k.jsx)(Hs,{className:"url",value:a,onChange:e=>n({prevLink:e})})]}):null]}),(0,k.jsxs)("li",{className:"nhsuk-pagination-item--next",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:o}),As.right]}),t?(0,k.jsxs)($s,{children:[(0,k.jsx)(Us,{label:(qs("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>n({nextText:e})}),(0,k.jsx)(Hs,{className:"url",value:l,onChange:e=>n({nextLink:e})})]}):null]})]})})},save:e=>{const{className:s,attributes:{prevLink:t,nextLink:n,prevText:a,nextText:l}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsx)("li",{className:"nhsuk-pagination-item--previous",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:t,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page prev-text",children:a}),As.left]})}),(0,k.jsx)("li",{className:"nhsuk-pagination-item--next",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:n,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page next-text",children:l}),As.right]})})]})})}});const Vs={};Vs.action=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})}),Vs.back=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"})});const Qs=Vs,{__:Ms}=wp.i18n,{registerBlockType:Ws}=wp.blocks,{URLInput:Gs}=wp.blockEditor,{Fragment:zs}=wp.element,{TextControl:Fs}=wp.components;Ws("nhsblocks/actionlink",{title:Ms("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qs.action,keywords:[Ms("signpost start","nhsblocks"),Ms("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:Ms("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qs.action}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{actionText:a,actionLink:l,arrowssvgs:r}}=e;return(0,k.jsxs)("div",{className:"nhsuk-action-link",children:[(0,k.jsxs)("a",{className:"nhsuk-action-link__link",children:[Qs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:a})]}),n?(0,k.jsxs)("div",{children:[(0,k.jsx)(Fs,{label:Ms(" ","nhsblocks"),placeholder:Ms("Call to Action","nhsblocks"),value:a,onChange:e=>t({actionText:e})}),(0,k.jsx)(Gs,{value:l,placeholder:Ms("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>t({actionLink:e})})]}):null]})},save:e=>{const{className:s,attributes:{actionText:t,actionLink:n,arrowssvgs:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-action-link",children:(0,k.jsxs)("a",{className:"nhsuk-action-link__link",href:n,children:[Qs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:t})]})})}});const{__:Ys}=wp.i18n,{registerBlockType:Js}=wp.blocks,{URLInput:Xs}=wp.blockEditor,{Fragment:Ks}=wp.element,{TextControl:Zs}=wp.components;Js("nhsblocks/backlink",{title:Ys("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qs.back,keywords:[Ys("Back Link previous question pages","nhsblocks"),Ys("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:Ys("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{backText:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-back-link",children:[(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",children:[Qs.back,a]}),n?(0,k.jsx)(Zs,{label:Ys("Action Link Text","nhsblocks"),value:a,onChange:e=>t({backText:e})}):null]})},save:e=>{const{attributes:{backText:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-back-link",children:(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#",children:[Qs.back,(0,k.jsx)("span",{children:s})]})})}})})()})();
     9content:ts("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>(0,k.jsx)("div",{className:"nhsuk-striped-blocks",children:(0,k.jsx)(as,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})}),save:e=>(0,k.jsx)(as.Content,{})}),ns("nhsblocks/stripeblock",{title:ts("Stripe Block","nhsblocks"),description:ts("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>{const s=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(as,{allowedBlocks:s})})},save:e=>(0,k.jsx)("section",{className:"nhsuk-section",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(as.Content,{})})})});const{__:ls}=wp.i18n,{registerBlockType:rs}=wp.blocks,{RichText:is,URLInput:os,InnerBlocks:cs}=wp.blockEditor,{Fragment:hs}=wp.element,{TextControl:ds}=wp.components;rs("nhsblocks/contentslist",{title:ls("Contents List","nhsblocks"),description:ls("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[ls("Contents List","nhsblocks"),ls("Navigation","nhsblocks"),ls("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:e=>{const{className:s,setAttributes:t,attributes:{title:n}}=e;return(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ls("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(cs,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})})]})},save:e=>(0,k.jsxs)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ls("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(cs.Content,{})})]})}),rs("nhsblocks/contentslistitem",{title:ls("Contents List Item","nhsblocks"),description:ls("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{text:a,url:l}}=e;return(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:n?(0,k.jsxs)("div",{children:[(0,k.jsx)(ds,{id:"example-input-field",label:(ls("Link Text"),"nhsblocks"),value:a,onChange:e=>t({text:e})}),(0,k.jsx)(os,{className:"nhsuk-contents-list__link",value:l,onChange:e=>t({url:e}),placeholder:"Page Link (start typing to choose link)"})]}):(0,k.jsx)(hs,{children:l?(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"{ url }",children:a}):(0,k.jsx)("span",{className:"nhsuk-contents-list__current",children:a})})})},save:e=>{const{className:s,attributes:{text:t,url:n}}=e;return(0,k.jsx)(hs,{children:n?(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"pagename nhsuk-contents-list__link",href:n,children:t})}):(0,k.jsx)("li",{className:"nhsuk-contents-list__item","aria-current":"page",children:(0,k.jsx)("span",{className:"pagename nhsuk-contents-list__current",children:t})})})}});const{__:us}=wp.i18n,{registerBlockType:ks}=wp.blocks,{RichText:ms,URLInput:ps,InnerBlocks:bs}=wp.blockEditor,{withSelect:gs,subscribe:xs,select:vs}=wp.data,{Fragment:js}=wp.element,{Button:_s,TextControl:ws}=wp.components;ks("nhsblocks/contentslistpage",{title:us("Contents List within a page","nhsblocks"),description:us("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[us("Contents List Page","nhsblocks"),us("Navigation","nhsblocks"),us("Related sections on page","nhsblocks")],edit:gs((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:e,className:s,setAttributes:t,attributes:{h2titles:n}})=>{const a=[];let l=0;const r=e=>{if("core/heading"===e.name&&2===e.attributes.level){const s="nhs-block-anchor-"+l++,t=e.attributes.content.replace(/<[^>]+>/g,"");a.push({text:t,url:s,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(r)};e.map(r);const i=n.length==a.length&&n.every((function(e,s){return a[s].text===e.text&&a[s].url===e.url}));return(0,k.jsx)("div",{children:(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:us("Contents","nhsblocks")}),(0,k.jsxs)("ol",{className:"nhsuk-contents-list__list",children:[n?n.map((e=>(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"#"+e.url,children:e.text})},e.url))):(0,k.jsx)("p",{children:"Press the button below to make a table of contents for this page"}),(0,k.jsx)("p",{children:(0,k.jsx)(_s,{onClick:()=>{t({h2titles:a});for(let e=a.length-1;e>=0;e--)vs("core/block-editor").getBlock(a[e].id).attributes.anchor=a[e].url},className:"is-primary",disabled:i,children:"Update Heading Block"})})]})]})})})),save:e=>{const{attributes:{h2titles:s}}=e;return null}});const{__:ys}=wp.i18n,{registerBlockType:Ns}=wp.blocks,{format:Ts}=wp.date,{RichText:fs,InnerBlocks:Cs}=wp.blockEditor,{dispatch:Bs,subscribe:Is,select:Ls,withSelect:Es}=wp.data;Ns("nhsblocks/reviewdate",{title:ys("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:ys("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Es((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:e,className:s,setAttributes:t,attributes:{lastSaved:n}})=>{if(e){const s=new Date(e),a=Ts("d F Y",s);return n!==a&&(void 0===n?(t({lastSaved:a}),Bs("core/editor").savePost()):t({lastSaved:a})),(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:n})]})})}})),save:e=>{const{className:s,attributes:{lastSaved:t}}=e;return(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:t})]})})}}),t(574);const Ps={};Ps.left=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})}),Ps.right=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"})});const Ss=Ps,{__:As}=wp.i18n,{registerBlockType:qs}=wp.blocks,{RichText:Rs,InnerBlocks:Ds}=wp.blockEditor,{Fragment:Os}=wp.element,{URLInput:$s}=wp.blockEditor,{TextControl:Hs}=wp.components;qs("nhsblocks/pagination",{title:As("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:As("Page Title"),nextText:As("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:e=>{const{className:s,isSelected:t,setAttributes:n,attributes:{prevLink:a,nextLink:l,prevText:r,nextText:i}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsxs)("li",{className:"nhsuk-pagination-item--previous",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:r}),Ss.left]}),t?(0,k.jsxs)(Os,{children:[(0,k.jsx)(Hs,{label:(As("Page Title"),"nhsblocks"),value:r,hideLabelFromVision:!0,onChange:e=>n({prevText:e})}),(0,k.jsx)($s,{className:"url",value:a,onChange:e=>n({prevLink:e})})]}):null]}),(0,k.jsxs)("li",{className:"nhsuk-pagination-item--next",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:i}),Ss.right]}),t?(0,k.jsxs)(Os,{children:[(0,k.jsx)(Hs,{label:(As("Page Title"),"nhsblocks"),value:i,hideLabelFromVision:!0,onChange:e=>n({nextText:e})}),(0,k.jsx)($s,{className:"url",value:l,onChange:e=>n({nextLink:e})})]}):null]})]})})},save:e=>{const{className:s,attributes:{prevLink:t,nextLink:n,prevText:a,nextText:l}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsx)("li",{className:"nhsuk-pagination-item--previous",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:t,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page prev-text",children:a}),Ss.left]})}),(0,k.jsx)("li",{className:"nhsuk-pagination-item--next",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:n,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page next-text",children:l}),Ss.right]})})]})})}});const Us={};Us.action=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})}),Us.back=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"})});const Vs=Us,{__:Qs}=wp.i18n,{registerBlockType:zs}=wp.blocks,{URLInput:Ws}=wp.blockEditor,{Fragment:Gs}=wp.element,{TextControl:Ms}=wp.components;zs("nhsblocks/actionlink",{title:Qs("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Vs.action,keywords:[Qs("signpost start","nhsblocks"),Qs("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:Qs("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Vs.action}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{actionText:a,actionLink:l,arrowssvgs:r}}=e;return(0,k.jsxs)("div",{className:"nhsuk-action-link",children:[(0,k.jsxs)("a",{className:"nhsuk-action-link__link",children:[Vs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:a})]}),n?(0,k.jsxs)("div",{children:[(0,k.jsx)(Ms,{label:Qs(" ","nhsblocks"),placeholder:Qs("Call to Action","nhsblocks"),value:a,onChange:e=>t({actionText:e})}),(0,k.jsx)(Ws,{value:l,placeholder:Qs("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>t({actionLink:e})})]}):null]})},save:e=>{const{className:s,attributes:{actionText:t,actionLink:n,arrowssvgs:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-action-link",children:(0,k.jsxs)("a",{className:"nhsuk-action-link__link",href:n,children:[Vs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:t})]})})}});const{__:Fs}=wp.i18n,{registerBlockType:Ys}=wp.blocks,{URLInput:Js}=wp.blockEditor,{Fragment:Xs}=wp.element,{TextControl:Ks}=wp.components;Ys("nhsblocks/backlink",{title:Fs("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Vs.back,keywords:[Fs("Back Link previous question pages","nhsblocks"),Fs("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:Fs("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{backText:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-back-link",children:[(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",children:[Vs.back,a]}),n?(0,k.jsx)(Ks,{label:Fs("Action Link Text","nhsblocks"),value:a,onChange:e=>t({backText:e})}):null]})},save:e=>{const{attributes:{backText:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-back-link",children:(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#",children:[Vs.back,(0,k.jsx)("span",{children:s})]})})}})})()})();
  • nhsblocks/tags/1.3.22/nhsblocks.php

    r3373727 r3386349  
    77 * License: GPL v3
    88 * Requires at least: 5.0
    9  * Tested up to: 6.5
    10  *
    11  * Version: 1.3.21
    12  * Stable tag: 1.3.21
     9 * Tested up to: 6.8.3
     10 *
     11 * Version: 1.3.22
     12 * Stable tag: 1.3.20
    1313 *
    1414 * @package nhsblocks
  • nhsblocks/tags/1.3.22/readme.txt

    r3373727 r3386349  
    55Plugin URI: https://digital.leadershipacademy.nhs.uk/digital-capabilities/websites/nhs-blocks-user-guide/
    66Requires at least: 5.3
    7 Tested up to: 6.7
    8 Stable tag: 1.3.21
     7Tested up to: 6.8.3
     8Stable tag: 1.3.22
    99Requires PHP: 5.6
    1010License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 1.3.22 =
     59  * Reverts code that caused a display issue when viewing Promo Region blocks inside Column blocks
    5760
    5861= 1.3.21 =
  • nhsblocks/tags/1.3.22/style.css

    r3373727 r3386349  
    99Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy
    1010Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone).
    11 Version: 1.3.21
     11Version: 1.3.22
    1212
    1313**********************************************************************************************/
  • nhsblocks/trunk/build/index.asset.php

    r3373727 r3386349  
    1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-components'), 'version' => '7d59995be6989ad309ed');
     1<?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => 'd4cec148b032d467017e');
  • nhsblocks/trunk/build/index.js

    r3373727 r3386349  
    1 (()=>{var e={574:()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:j,ColorPalette:v,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:y,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=y("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(N,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:o}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(j,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:o})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(v,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:L}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(L,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(L.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:I}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:I("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:I("Standard (Green)"),isDefault:!0},{name:"secondary",label:I("Secondary (Grey)")},{name:"reverse",label:I("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:I("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:M,PanelRow:W,RadioControl:G,clientId:z}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(M,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const re=window.wp.components,{__:oe}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:ce,RichText:he,InnerBlocks:de,MediaUpload:ue,InspectorControls:ke,useBlockProps:me}=wp.blockEditor;ie("nhsblocks/promo1",{title:oe("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:oe("Standard"),isDefault:!0},{name:"promo-small",label:oe("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"},showChevron:{type:"boolean",default:!1}},edit:e=>{const s=me(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(ke,{children:(0,k.jsx)(re.PanelBody,{title:oe("Promo Settings","nhsblocks"),initialOpen:!0,children:(0,k.jsx)(re.ToggleControl,{label:oe("Show Chevron Icon","nhsblocks"),checked:!!e.attributes.showChevron,onChange:e=>r({showChevron:e})})})},"inspector-controls"),(0,k.jsx)("ul",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(de,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(ce,{className:"nhsblocks-dropdown__input",label:oe("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(he,{placeholder:oe("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsxs)("div",{className:"nhsuk-card__description",children:[(0,k.jsx)(he,{...s,placeholder:oe("Promo Contents","nhsblocks"),onChange:e=>{var s;r({promoText:(s=e,s.replace(/<svg[\s\S]*?<\/svg>/gi,""))})},value:n}),e.attributes.showChevron&&(0,k.jsxs)("svg",{className:"nhsuk-icon",xmlns:"http://www.w3.org/2000/svg",width:"27",height:"27","aria-hidden":"true",focusable:"false",children:[(0,k.jsx)("circle",{cx:"13.333",cy:"13.333",r:"13.333",fill:""}),(0,k.jsxs)("g",{"data-name":"Group 1",fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2.667",children:[(0,k.jsx)("path",{d:"M15.438 13l-3.771 3.771"}),(0,k.jsx)("path",{"data-name":"Path",d:"M11.667 9.229L15.438 13"})]})]})]})]})]})},`promo-${e.clientId}`)},"promo-markup")]},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsx)("ul",{...s,className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-card__description",children:[(0,k.jsx)(he.Content,{value:n}),e.attributes.showChevron&&(0,k.jsxs)("svg",{className:"nhsuk-icon",xmlns:"http://www.w3.org/2000/svg",width:"27",height:"27","aria-hidden":"true",focusable:"false",children:[(0,k.jsx)("circle",{cx:"13.333",cy:"13.333",r:"13.333",fill:""}),(0,k.jsxs)("g",{"data-name":"Group 1",fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2.667",children:[(0,k.jsx)("path",{d:"M15.438 13l-3.771 3.771"}),(0,k.jsx)("path",{"data-name":"Path",d:"M11.667 9.229L15.438 13"})]})]})]})]})]})},`promo-${e.clientId}`)})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(he.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(de.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})},{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"},showChevron:{type:"boolean",default:!1}},save:e=>{const s=me.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsx)("ul",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)("li",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(de.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content nhsuk-card__content--primary",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(he.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(he.Content,{...s,value:n})})]})]})})})}}]});const{__:pe}=wp.i18n,be=[["nhsblocks/promo1"]],ge=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:pe("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:pe("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:pe("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:pe("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:pe("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:pe("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:xe}=wp.i18n,{registerBlockType:je,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:Ne,useSelect:ye}=wp.data;je("nhsblocks/promogroup",{title:xe("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Ne("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{template:ge})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(we,{variations:ge,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e.Content,{})})}}),je("nhsblocks/onehalfpro",{title:xe("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/onethirdpro",{title:xe("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/onequarterpro",{title:xe("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/twothirdspro",{title:xe("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})}),je("nhsblocks/threequarterspro",{title:xe("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(_e,{template:be,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(_e.Content,{})})});const{__:Te}=wp.i18n,{registerBlockType:fe}=wp.blocks,{RichText:Ce,useBlockProps:Be}=wp.blockEditor;fe("nhsblocks/quote1",{title:Te("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Te("Standard"),isDefault:!0},{name:"quote-reverse",label:Te("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Be(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(Ce,{...s,placeholder:Te("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(Ce,{placeholder:Te("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Be.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(Ce.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(Ce.Content,{value:t})})]})}});const{__:Le}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Ee,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Le("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Ae(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:o}=e;return[(0,k.jsx)(Se,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(De,{children:(0,k.jsx)(qe,{label:"Include an image?",checked:a,onChange:e=>o({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee,{placeholder:Le("Card Title","nhsblocks"),value:t,onChange:e=>{o({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Pe,{template:He}),(0,k.jsx)(Ee,{...s,placeholder:Le("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:n})]})]})]},save:e=>{const s=Ae.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Pe.Content,{}),(0,k.jsx)(Ee.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Ee.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Ee.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Ee.Content,{...Ae.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:Me,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:ze}=wp.blockEditor,{useDispatch:Fe,useSelect:Ye}=wp.data;Me("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Fe("core/block-editor"),{blockType:r,defaultVariation:o,hasInnerBlocks:i,variations:c}=Ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>We(e,s,h(t))));return i?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{template:Ve})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(ze,{variations:Ve,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge.Content,{})})})}}),Me("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(Ge.Content,{})})}}),Me("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(Ge,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(Ge.Content,{})})}});const{__:Je}=wp.i18n,{registerBlockType:Xe}=wp.blocks,{RichText:Ke,InspectorControls:Ze,ColorPalette:es,MediaUpload:ss,InnerBlocks:ts}=wp.blockEditor;Xe("nhsblocks/heroblock",{title:Je("Hero Block","nhsblocks"),description:Je("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ze,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(ss,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(es,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ts,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ts.Content,{})})})})})})}}),Xe("nhsblocks/heroinner",{title:Je("Hero Block Inner Text","nhsblocks"),description:Je("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ze,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(es,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ns}=wp.i18n,{registerBlockType:as}=wp.blocks,{InnerBlocks:ls}=wp.blockEditor;as("nhsblocks/stripesblock",{title:ns("Stripes Block","nhsblocks"),description:ns("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
     1(()=>{var e={574:()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
    22/* translators: example text. */
    3 content:ns("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
     3content:ts("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
    44/* translators: example text. */
    5 content:ns("Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.")}}]},{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
     5content:ts("Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.")}}]},{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{
    66/* translators: example text. */
    7 content:ns("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
     7content:ts("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
    88/* translators: example text. */
    9 content:ns("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>(0,k.jsx)("div",{className:"nhsuk-striped-blocks",children:(0,k.jsx)(ls,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})}),save:e=>(0,k.jsx)(ls.Content,{})}),as("nhsblocks/stripeblock",{title:ns("Stripe Block","nhsblocks"),description:ns("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>{const s=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(ls,{allowedBlocks:s})})},save:e=>(0,k.jsx)("section",{className:"nhsuk-section",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(ls.Content,{})})})});const{__:rs}=wp.i18n,{registerBlockType:os}=wp.blocks,{RichText:is,URLInput:cs,InnerBlocks:hs}=wp.blockEditor,{Fragment:ds}=wp.element,{TextControl:us}=wp.components;os("nhsblocks/contentslist",{title:rs("Contents List","nhsblocks"),description:rs("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[rs("Contents List","nhsblocks"),rs("Navigation","nhsblocks"),rs("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:e=>{const{className:s,setAttributes:t,attributes:{title:n}}=e;return(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:rs("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(hs,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})})]})},save:e=>(0,k.jsxs)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:rs("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(hs.Content,{})})]})}),os("nhsblocks/contentslistitem",{title:rs("Contents List Item","nhsblocks"),description:rs("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{text:a,url:l}}=e;return(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:n?(0,k.jsxs)("div",{children:[(0,k.jsx)(us,{id:"example-input-field",label:(rs("Link Text"),"nhsblocks"),value:a,onChange:e=>t({text:e})}),(0,k.jsx)(cs,{className:"nhsuk-contents-list__link",value:l,onChange:e=>t({url:e}),placeholder:"Page Link (start typing to choose link)"})]}):(0,k.jsx)(ds,{children:l?(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"{ url }",children:a}):(0,k.jsx)("span",{className:"nhsuk-contents-list__current",children:a})})})},save:e=>{const{className:s,attributes:{text:t,url:n}}=e;return(0,k.jsx)(ds,{children:n?(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"pagename nhsuk-contents-list__link",href:n,children:t})}):(0,k.jsx)("li",{className:"nhsuk-contents-list__item","aria-current":"page",children:(0,k.jsx)("span",{className:"pagename nhsuk-contents-list__current",children:t})})})}});const{__:ks}=wp.i18n,{registerBlockType:ms}=wp.blocks,{RichText:ps,URLInput:bs,InnerBlocks:gs}=wp.blockEditor,{withSelect:xs,subscribe:js,select:vs}=wp.data,{Fragment:_s}=wp.element,{Button:ws,TextControl:Ns}=wp.components;ms("nhsblocks/contentslistpage",{title:ks("Contents List within a page","nhsblocks"),description:ks("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ks("Contents List Page","nhsblocks"),ks("Navigation","nhsblocks"),ks("Related sections on page","nhsblocks")],edit:xs((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:e,className:s,setAttributes:t,attributes:{h2titles:n}})=>{const a=[];let l=0;const r=e=>{if("core/heading"===e.name&&2===e.attributes.level){const s="nhs-block-anchor-"+l++,t=e.attributes.content.replace(/<[^>]+>/g,"");a.push({text:t,url:s,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(r)};e.map(r);const o=n.length==a.length&&n.every((function(e,s){return a[s].text===e.text&&a[s].url===e.url}));return(0,k.jsx)("div",{children:(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ks("Contents","nhsblocks")}),(0,k.jsxs)("ol",{className:"nhsuk-contents-list__list",children:[n?n.map((e=>(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"#"+e.url,children:e.text})},e.url))):(0,k.jsx)("p",{children:"Press the button below to make a table of contents for this page"}),(0,k.jsx)("p",{children:(0,k.jsx)(ws,{onClick:()=>{t({h2titles:a});for(let e=a.length-1;e>=0;e--)vs("core/block-editor").getBlock(a[e].id).attributes.anchor=a[e].url},className:"is-primary",disabled:o,children:"Update Heading Block"})})]})]})})})),save:e=>{const{attributes:{h2titles:s}}=e;return null}});const{__:ys}=wp.i18n,{registerBlockType:Ts}=wp.blocks,{format:fs}=wp.date,{RichText:Cs,InnerBlocks:Bs}=wp.blockEditor,{dispatch:Ls,subscribe:Is,select:Es,withSelect:Ps}=wp.data;Ts("nhsblocks/reviewdate",{title:ys("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:ys("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Ps((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:e,className:s,setAttributes:t,attributes:{lastSaved:n}})=>{if(e){const s=new Date(e),a=fs("d F Y",s);return n!==a&&(void 0===n?(t({lastSaved:a}),Ls("core/editor").savePost()):t({lastSaved:a})),(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:n})]})})}})),save:e=>{const{className:s,attributes:{lastSaved:t}}=e;return(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:t})]})})}}),t(574);const Ss={};Ss.left=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})}),Ss.right=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"})});const As=Ss,{__:qs}=wp.i18n,{registerBlockType:Rs}=wp.blocks,{RichText:Ds,InnerBlocks:Os}=wp.blockEditor,{Fragment:$s}=wp.element,{URLInput:Hs}=wp.blockEditor,{TextControl:Us}=wp.components;Rs("nhsblocks/pagination",{title:qs("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qs("Page Title"),nextText:qs("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:e=>{const{className:s,isSelected:t,setAttributes:n,attributes:{prevLink:a,nextLink:l,prevText:r,nextText:o}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsxs)("li",{className:"nhsuk-pagination-item--previous",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:r}),As.left]}),t?(0,k.jsxs)($s,{children:[(0,k.jsx)(Us,{label:(qs("Page Title"),"nhsblocks"),value:r,hideLabelFromVision:!0,onChange:e=>n({prevText:e})}),(0,k.jsx)(Hs,{className:"url",value:a,onChange:e=>n({prevLink:e})})]}):null]}),(0,k.jsxs)("li",{className:"nhsuk-pagination-item--next",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:o}),As.right]}),t?(0,k.jsxs)($s,{children:[(0,k.jsx)(Us,{label:(qs("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>n({nextText:e})}),(0,k.jsx)(Hs,{className:"url",value:l,onChange:e=>n({nextLink:e})})]}):null]})]})})},save:e=>{const{className:s,attributes:{prevLink:t,nextLink:n,prevText:a,nextText:l}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsx)("li",{className:"nhsuk-pagination-item--previous",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:t,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page prev-text",children:a}),As.left]})}),(0,k.jsx)("li",{className:"nhsuk-pagination-item--next",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:n,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:qs("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page next-text",children:l}),As.right]})})]})})}});const Vs={};Vs.action=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})}),Vs.back=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"})});const Qs=Vs,{__:Ms}=wp.i18n,{registerBlockType:Ws}=wp.blocks,{URLInput:Gs}=wp.blockEditor,{Fragment:zs}=wp.element,{TextControl:Fs}=wp.components;Ws("nhsblocks/actionlink",{title:Ms("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qs.action,keywords:[Ms("signpost start","nhsblocks"),Ms("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:Ms("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qs.action}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{actionText:a,actionLink:l,arrowssvgs:r}}=e;return(0,k.jsxs)("div",{className:"nhsuk-action-link",children:[(0,k.jsxs)("a",{className:"nhsuk-action-link__link",children:[Qs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:a})]}),n?(0,k.jsxs)("div",{children:[(0,k.jsx)(Fs,{label:Ms(" ","nhsblocks"),placeholder:Ms("Call to Action","nhsblocks"),value:a,onChange:e=>t({actionText:e})}),(0,k.jsx)(Gs,{value:l,placeholder:Ms("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>t({actionLink:e})})]}):null]})},save:e=>{const{className:s,attributes:{actionText:t,actionLink:n,arrowssvgs:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-action-link",children:(0,k.jsxs)("a",{className:"nhsuk-action-link__link",href:n,children:[Qs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:t})]})})}});const{__:Ys}=wp.i18n,{registerBlockType:Js}=wp.blocks,{URLInput:Xs}=wp.blockEditor,{Fragment:Ks}=wp.element,{TextControl:Zs}=wp.components;Js("nhsblocks/backlink",{title:Ys("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qs.back,keywords:[Ys("Back Link previous question pages","nhsblocks"),Ys("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:Ys("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{backText:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-back-link",children:[(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",children:[Qs.back,a]}),n?(0,k.jsx)(Zs,{label:Ys("Action Link Text","nhsblocks"),value:a,onChange:e=>t({backText:e})}):null]})},save:e=>{const{attributes:{backText:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-back-link",children:(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#",children:[Qs.back,(0,k.jsx)("span",{children:s})]})})}})})()})();
     9content:ts("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>(0,k.jsx)("div",{className:"nhsuk-striped-blocks",children:(0,k.jsx)(as,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})}),save:e=>(0,k.jsx)(as.Content,{})}),ns("nhsblocks/stripeblock",{title:ts("Stripe Block","nhsblocks"),description:ts("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:e=>{const s=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(as,{allowedBlocks:s})})},save:e=>(0,k.jsx)("section",{className:"nhsuk-section",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)(as.Content,{})})})});const{__:ls}=wp.i18n,{registerBlockType:rs}=wp.blocks,{RichText:is,URLInput:os,InnerBlocks:cs}=wp.blockEditor,{Fragment:hs}=wp.element,{TextControl:ds}=wp.components;rs("nhsblocks/contentslist",{title:ls("Contents List","nhsblocks"),description:ls("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[ls("Contents List","nhsblocks"),ls("Navigation","nhsblocks"),ls("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:e=>{const{className:s,setAttributes:t,attributes:{title:n}}=e;return(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ls("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(cs,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})})]})},save:e=>(0,k.jsxs)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:ls("Contents","nhsblocks")}),(0,k.jsx)("ol",{className:"nhsuk-contents-list__list",children:(0,k.jsx)(cs.Content,{})})]})}),rs("nhsblocks/contentslistitem",{title:ls("Contents List Item","nhsblocks"),description:ls("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{text:a,url:l}}=e;return(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:n?(0,k.jsxs)("div",{children:[(0,k.jsx)(ds,{id:"example-input-field",label:(ls("Link Text"),"nhsblocks"),value:a,onChange:e=>t({text:e})}),(0,k.jsx)(os,{className:"nhsuk-contents-list__link",value:l,onChange:e=>t({url:e}),placeholder:"Page Link (start typing to choose link)"})]}):(0,k.jsx)(hs,{children:l?(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"{ url }",children:a}):(0,k.jsx)("span",{className:"nhsuk-contents-list__current",children:a})})})},save:e=>{const{className:s,attributes:{text:t,url:n}}=e;return(0,k.jsx)(hs,{children:n?(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"pagename nhsuk-contents-list__link",href:n,children:t})}):(0,k.jsx)("li",{className:"nhsuk-contents-list__item","aria-current":"page",children:(0,k.jsx)("span",{className:"pagename nhsuk-contents-list__current",children:t})})})}});const{__:us}=wp.i18n,{registerBlockType:ks}=wp.blocks,{RichText:ms,URLInput:ps,InnerBlocks:bs}=wp.blockEditor,{withSelect:gs,subscribe:xs,select:vs}=wp.data,{Fragment:js}=wp.element,{Button:_s,TextControl:ws}=wp.components;ks("nhsblocks/contentslistpage",{title:us("Contents List within a page","nhsblocks"),description:us("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[us("Contents List Page","nhsblocks"),us("Navigation","nhsblocks"),us("Related sections on page","nhsblocks")],edit:gs((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:e,className:s,setAttributes:t,attributes:{h2titles:n}})=>{const a=[];let l=0;const r=e=>{if("core/heading"===e.name&&2===e.attributes.level){const s="nhs-block-anchor-"+l++,t=e.attributes.content.replace(/<[^>]+>/g,"");a.push({text:t,url:s,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(r)};e.map(r);const i=n.length==a.length&&n.every((function(e,s){return a[s].text===e.text&&a[s].url===e.url}));return(0,k.jsx)("div",{children:(0,k.jsxs)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide",children:[(0,k.jsx)("h2",{className:"nhsuk-u-visually-hidden",children:us("Contents","nhsblocks")}),(0,k.jsxs)("ol",{className:"nhsuk-contents-list__list",children:[n?n.map((e=>(0,k.jsx)("li",{className:"nhsuk-contents-list__item",children:(0,k.jsx)("a",{className:"nhsuk-contents-list__link",href:"#"+e.url,children:e.text})},e.url))):(0,k.jsx)("p",{children:"Press the button below to make a table of contents for this page"}),(0,k.jsx)("p",{children:(0,k.jsx)(_s,{onClick:()=>{t({h2titles:a});for(let e=a.length-1;e>=0;e--)vs("core/block-editor").getBlock(a[e].id).attributes.anchor=a[e].url},className:"is-primary",disabled:i,children:"Update Heading Block"})})]})]})})})),save:e=>{const{attributes:{h2titles:s}}=e;return null}});const{__:ys}=wp.i18n,{registerBlockType:Ns}=wp.blocks,{format:Ts}=wp.date,{RichText:fs,InnerBlocks:Cs}=wp.blockEditor,{dispatch:Bs,subscribe:Is,select:Ls,withSelect:Es}=wp.data;Ns("nhsblocks/reviewdate",{title:ys("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:ys("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Es((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:e,className:s,setAttributes:t,attributes:{lastSaved:n}})=>{if(e){const s=new Date(e),a=Ts("d F Y",s);return n!==a&&(void 0===n?(t({lastSaved:a}),Bs("core/editor").savePost()):t({lastSaved:a})),(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:n})]})})}})),save:e=>{const{className:s,attributes:{lastSaved:t}}=e;return(0,k.jsx)("div",{className:"nhsuk-review-date",children:(0,k.jsxs)("p",{className:"nhsuk-body-s",children:["Page last reviewed:"," ",(0,k.jsx)("span",{className:"last-saved-date",children:t})]})})}}),t(574);const Ps={};Ps.left=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})}),Ps.right=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"})});const Ss=Ps,{__:As}=wp.i18n,{registerBlockType:qs}=wp.blocks,{RichText:Rs,InnerBlocks:Ds}=wp.blockEditor,{Fragment:Os}=wp.element,{URLInput:$s}=wp.blockEditor,{TextControl:Hs}=wp.components;qs("nhsblocks/pagination",{title:As("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:As("Page Title"),nextText:As("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:e=>{const{className:s,isSelected:t,setAttributes:n,attributes:{prevLink:a,nextLink:l,prevText:r,nextText:i}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsxs)("li",{className:"nhsuk-pagination-item--previous",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:r}),Ss.left]}),t?(0,k.jsxs)(Os,{children:[(0,k.jsx)(Hs,{label:(As("Page Title"),"nhsblocks"),value:r,hideLabelFromVision:!0,onChange:e=>n({prevText:e})}),(0,k.jsx)($s,{className:"url",value:a,onChange:e=>n({prevLink:e})})]}):null]}),(0,k.jsxs)("li",{className:"nhsuk-pagination-item--next",children:[(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page",children:i}),Ss.right]}),t?(0,k.jsxs)(Os,{children:[(0,k.jsx)(Hs,{label:(As("Page Title"),"nhsblocks"),value:i,hideLabelFromVision:!0,onChange:e=>n({nextText:e})}),(0,k.jsx)($s,{className:"url",value:l,onChange:e=>n({nextLink:e})})]}):null]})]})})},save:e=>{const{className:s,attributes:{prevLink:t,nextLink:n,prevText:a,nextText:l}}=e;return(0,k.jsx)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination",children:(0,k.jsxs)("ul",{className:"nhsuk-list nhsuk-pagination__list",children:[(0,k.jsx)("li",{className:"nhsuk-pagination-item--previous",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:t,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Previous","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page prev-text",children:a}),Ss.left]})}),(0,k.jsx)("li",{className:"nhsuk-pagination-item--next",children:(0,k.jsxs)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:n,children:[(0,k.jsx)("span",{className:"nhsuk-pagination__title",children:As("Next","nhsblocks")}),(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:":"}),(0,k.jsx)("span",{className:"nhsuk-pagination__page next-text",children:l}),Ss.right]})})]})})}});const Us={};Us.action=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})}),Us.back=(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"})});const Vs=Us,{__:Qs}=wp.i18n,{registerBlockType:zs}=wp.blocks,{URLInput:Ws}=wp.blockEditor,{Fragment:Gs}=wp.element,{TextControl:Ms}=wp.components;zs("nhsblocks/actionlink",{title:Qs("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Vs.action,keywords:[Qs("signpost start","nhsblocks"),Qs("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:Qs("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Vs.action}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{actionText:a,actionLink:l,arrowssvgs:r}}=e;return(0,k.jsxs)("div",{className:"nhsuk-action-link",children:[(0,k.jsxs)("a",{className:"nhsuk-action-link__link",children:[Vs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:a})]}),n?(0,k.jsxs)("div",{children:[(0,k.jsx)(Ms,{label:Qs(" ","nhsblocks"),placeholder:Qs("Call to Action","nhsblocks"),value:a,onChange:e=>t({actionText:e})}),(0,k.jsx)(Ws,{value:l,placeholder:Qs("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>t({actionLink:e})})]}):null]})},save:e=>{const{className:s,attributes:{actionText:t,actionLink:n,arrowssvgs:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-action-link",children:(0,k.jsxs)("a",{className:"nhsuk-action-link__link",href:n,children:[Vs.action,(0,k.jsx)("span",{className:"nhsuk-action-link__text",children:t})]})})}});const{__:Fs}=wp.i18n,{registerBlockType:Ys}=wp.blocks,{URLInput:Js}=wp.blockEditor,{Fragment:Xs}=wp.element,{TextControl:Ks}=wp.components;Ys("nhsblocks/backlink",{title:Fs("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Vs.back,keywords:[Fs("Back Link previous question pages","nhsblocks"),Fs("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:Fs("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:e=>{const{className:s,setAttributes:t,isSelected:n,attributes:{backText:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-back-link",children:[(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",children:[Vs.back,a]}),n?(0,k.jsx)(Ks,{label:Fs("Action Link Text","nhsblocks"),value:a,onChange:e=>t({backText:e})}):null]})},save:e=>{const{attributes:{backText:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-back-link",children:(0,k.jsxs)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#",children:[Vs.back,(0,k.jsx)("span",{children:s})]})})}})})()})();
  • nhsblocks/trunk/nhsblocks.php

    r3373727 r3386349  
    77 * License: GPL v3
    88 * Requires at least: 5.0
    9  * Tested up to: 6.5
    10  *
    11  * Version: 1.3.21
    12  * Stable tag: 1.3.21
     9 * Tested up to: 6.8.3
     10 *
     11 * Version: 1.3.22
     12 * Stable tag: 1.3.20
    1313 *
    1414 * @package nhsblocks
  • nhsblocks/trunk/readme.txt

    r3373727 r3386349  
    55Plugin URI: https://digital.leadershipacademy.nhs.uk/digital-capabilities/websites/nhs-blocks-user-guide/
    66Requires at least: 5.3
    7 Tested up to: 6.7
    8 Stable tag: 1.3.21
     7Tested up to: 6.8.3
     8Stable tag: 1.3.22
    99Requires PHP: 5.6
    1010License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 1.3.22 =
     59  * Reverts code that caused a display issue when viewing Promo Region blocks inside Column blocks
    5760
    5861= 1.3.21 =
  • nhsblocks/trunk/style.css

    r3373727 r3386349  
    99Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy
    1010Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone).
    11 Version: 1.3.21
     11Version: 1.3.22
    1212
    1313**********************************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.