Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@assaabloy/gw-group-nav-header

Package Overview
Dependencies
Maintainers
9
Versions
437
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assaabloy/gw-group-nav-header - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

2

navHeader.js

@@ -1,1 +0,1 @@

!function(e){function n(n){for(var a,o,l=n[0],c=n[1],u=n[2],d=0,p=[];d<l.length;d++)o=l[d],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&p.push(r[o][0]),r[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(n);p.length;)p.shift()();return i.push.apply(i,u||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],a=!0,l=1;l<t.length;l++){var c=t[l];0!==r[c]&&(a=!1)}a&&(i.splice(n--,1),e=o(o.s=t[0]))}return e}var a={},r={12:0},i=[];function o(n){if(a[n])return a[n].exports;var t=a[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=e,o.c=a,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)o.d(t,a,function(n){return e[n]}.bind(null,a));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/";var l=this["webpackJsonpgw-group-web-components"]=this["webpackJsonpgw-group-web-components"]||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;i.push([144,0]),t()}({0:function(e,n){e.exports=React},11:function(e,n,t){"use strict";t.d(n,"a",(function(){return i}));var a=t(0),r=t.n(a),i=function(e){var n=null;switch(e.icon){case"externalLink.svg":n=r.a.createElement("svg",{className:e.className,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M13 8.90237V13.2176C13 13.8679 12.4706 14.3999 11.8235 14.3999H2.17647C1.52941 14.3999 1 13.8679 1 13.2176V3.58217C1 2.93192 1.52941 2.3999 2.17647 2.3999H5.70588",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1L6.82141 8.17857",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1H8.6759",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1V6.32411",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}));break;case"cross.svg":n=r.a.createElement("svg",{className:e.className,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M8.75 1.125L1 8.875",stroke:"#1A1A1A",strokeWidth:"1.62",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M1 1.125L8.75 8.875",stroke:"#1A1A1A",strokeWidth:"1.62",strokeLinecap:"round",strokeLinejoin:"round"}));break;case"arrow.svg":n=r.a.createElement("svg",{className:e.className,width:"13",height:"56",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M2 2L10 10L2 18",stroke:"white",strokeWidth:"3"}));break;case"document.svg":n=r.a.createElement("svg",{className:e.className,width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M14 2.93408H6C5.46957 2.93408 4.96086 3.13967 4.58579 3.50563C4.21071 3.87159 4 4.36793 4 4.88547V20.4966C4 21.0141 4.21071 21.5105 4.58579 21.8764C4.96086 22.2424 5.46957 22.448 6 22.448H18C18.5304 22.448 19.0391 22.2424 19.4142 21.8764C19.7893 21.5105 20 21.0141 20 20.4966V8.78825L14 2.93408Z",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M14 2.93408V8.78825H20",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M16 13.6667H8",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M16 17.5695H8",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M10 9.76392H9H8",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));break;case"arrow2.svg":n=r.a.createElement("svg",{className:e.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M7.23629 15.1542C7.70242 15.6206 8.45899 15.6188 8.92284 15.1501L14.6074 9.40694C15.3788 8.62759 15.3788 7.37241 14.6074 6.59306L8.92661 0.85369C8.46102 0.383294 7.70132 0.38237 7.23458 0.851632C6.77271 1.316 6.7721 2.06605 7.23322 2.53116L11.4367 6.77113H1.22887C0.550182 6.77113 0 7.32132 0 8C0 8.67868 0.550182 9.22887 1.22887 9.22887H11.4367L7.2322 13.4767C6.77187 13.9418 6.7737 14.6914 7.23629 15.1542Z",fill:"#1A1A1A"}));break;case"chevron.svg":n=r.a.createElement("svg",{className:e.className,width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M5.76471 7.52942L9.52942 3.76471",stroke:"black",strokeWidth:"1.6",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M5.76471 7.52942L2 3.76471",stroke:"black",strokeWidth:"1.6",strokeMiterlimit:"10",strokeLinecap:"round"}));break;default:n=r.a.createElement("svg",{className:e.className,width:"16",height:"24",viewBox:"0 0 16 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M8.08163 20L16 12L8.08163 4L6.4 5.69072L11.4367 10.7711H0V13.2289H11.4367L6.4 18.3175L8.08163 20Z",fill:"#1A1A1A"}))}return n}},119:function(e,n,t){"use strict";t.r(n);var a=t(20),r=t(44);n.default=a.a.create({component:r.a,configuration:{tagname:"gw-group-nav-header",useShadow:!1},plugins:[]})},24:function(e,n,t){"use strict";t.d(n,"a",(function(){return o}));var a=t(2),r=t(0),i=t(4);function o(){var e=Object(r.useState)({width:void 0,height:void 0}),n=Object(a.a)(e,2),t=n[0],o=n[1];return Object(r.useEffect)((function(){var e=Object(i.b)((function(){o({width:window.innerWidth,height:window.innerHeight})}),500);return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),t}},27:function(e,n){e.exports=ReactDOM},4:function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"j",(function(){return i})),t.d(n,"c",(function(){return o})),t.d(n,"d",(function(){return l})),t.d(n,"g",(function(){return c})),t.d(n,"h",(function(){return u})),t.d(n,"f",(function(){return s})),t.d(n,"i",(function(){return d})),t.d(n,"b",(function(){return p})),t.d(n,"e",(function(){return m}));var a=t(2),r=function(e){try{return JSON.parse(decodeURIComponent(escape(atob(e))))}catch(n){return console.warn("Failed decoding Base64 -> UTF8. Base64 string: ",e),null}},i=function(e){return btoa(unescape(encodeURIComponent(e)))},o=function(e){return"Invalid Date"!==new Date(e).toString()?new Date(e).toISOString().slice(0,10):e},l=function(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},c=function(e){return e.sort((function(e,n){return e.created>n.created?-1:e.created<n.created?1:0}))},u=function(e){return e.sort((function(e,n){return e.created<n.created?-1:e.created>n.created?1:0}))},s=function(e){return e.sort((function(e,n){return e.title<n.title?-1:e.title>n.title?1:0}))},d=function(e){return e.sort((function(e,n){return e.title>n.title?-1:e.title<n.title?1:0}))};function p(e,n){var t,a=arguments,r=this;return function(i){clearTimeout(t),t=setTimeout((function(n){t=null,e.apply(r,a)}),n)}}var m=function(e,n){if(!n.length)return e;var t=Object(a.a)(n,1)[0];return/^\d+$/.test(e)?"".concat(e).concat(t):"string"===typeof e&&n.some((function(n){return e.endsWith(n)}))?e:"string"===typeof e&&"".concat(e.trim().replace(/\D/g,"")||"0").concat(t)}},44:function(e,n,t){"use strict";t.d(n,"a",(function(){return ue}));var a=t(0),r=t.n(a),i=t(2),o=t(5),l=t.n(o),c=t(11),u=t(3),s=t(1);function d(){var e=Object(u.a)([""]);return d=function(){return e},e}function p(){var e=Object(u.a)(["\n overflow: scroll;\n height: 100%;\n padding-top: 15px !important;\n margin-bottom: 15px;\n margin-top: 0;\n background: transparent;\n width: 100%;\n position: absolute;\n flex-shrink: 0;\n left: ",";\n transition: left 0.2s ease-in-out;\n\n > li {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n > a {\n display: flex;\n flex-grow: 1;\n padding: 15px 0;\n }\n\n > button {\n display: flex;\n flex-grow: 0;\n padding: 0;\n height: 46px;\n width: 46px;\n align-items: center;\n justify-content: center;\n }\n }\n"]);return p=function(){return e},e}function m(){var e=Object(u.a)(["\n display: flex;\n height: 100%;\n position: relative;\n\n button {\n background: none;\n border: none;\n }\n\n #level1-menu > li {\n margin: 0 32px;\n background: transparent;\n margin: 0 17px 0 var(--spacing-medium);\n\n a {\n font-size: var(--font-size-4);\n font-weight: var(--font-weight-semi-bold);\n line-height: var(--line-height-size-4);\n }\n }\n"]);return m=function(){return e},e}var f=s.default.div(m()),v=s.default.ul(p(),(function(e){return e.isOpen?"0%":"-100%"})),g=s.default.li(d()),h=[{id:"",label:"",url:"",description:"",links:[]}],b={label:"",url:"",meta:"",links:[]};function x(){var e=Object(u.a)(["\n width: 13px;\n height: auto;\n transform: ",";\n transition: transform 0.16s ease-in-out;\n"]);return x=function(){return e},e}function w(){var e=Object(u.a)(["\n flex-wrap: wrap;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 17px 0 var(--spacing-medium);\n\n & > svg {\n display: ",";\n transform: rotate(-90deg);\n width: auto;\n height: 10px;\n }\n\n & > a {\n display: flex;\n flex-grow: 1;\n padding: var(--spacing-small);\n padding-left: ",";\n font-size: var(--font-size-4);\n font-weight: "," !important; // TODO: remove !important\n }\n\n & > button {\n display: flex;\n flex-grow: 0;\n height: 46px;\n width: 46px;\n align-items: center;\n justify-content: center;\n }\n"]);return w=function(){return e},e}function k(){var e=Object(u.a)(["\n margin: 0;\n overflow: scroll;\n"]);return k=function(){return e},e}function y(){var e=Object(u.a)(["\n display: flex;\n align-items: center;\n padding: 15px 15px 15px 0;\n margin-left: var(--spacing-medium);\n svg {\n height: 13px;\n width: 13px;\n transform: rotate(180deg);\n }\n span {\n font-weight: var(--font-weight-semi-bold);\n font-size: var(--font-size-4);\n padding-left: var(--spacing-mini-3);\n line-height: normal;\n }\n"]);return y=function(){return e},e}function E(){var e=Object(u.a)(["\n background: transparent;\n position: absolute;\n width: 100%;\n flex-shrink: 0;\n left: ",";\n transition: left 0.2s ease-in-out;\n display: flex;\n flex-direction: column;\n height: 100%;\n"]);return E=function(){return e},e}var j=s.default.div(E(),(function(e){return e.isOpen?"0%":"100%"})),L=s.default.button(y()),O=s.default.ul(k()),C=s.default.li(w(),(function(e){return e.currentUrl?"block":"none"}),(function(e){return e.currentUrl?"var(--spacing-mini-2)":0}),(function(e){return e.currentUrl?"var(--font-weight-bold)":"var(--font-weight-regular)"})),N=Object(s.default)(c.a)(x(),(function(e){return e.rotate?"rotate(180deg)":"rotate(0deg)"}));function I(){var e=Object(u.a)(["\n padding: var(--spacing-small);\n margin: 0;\n & > a {\n display: flex;\n align-items: center;\n\n svg {\n display: none;\n height: 10px;\n width: auto;\n transform: rotate(-90deg);\n display: ",";\n }\n\n span {\n font-weight: ",";\n font-size: var(--font-size-3);\n padding-left: ",";\n }\n }\n"]);return I=function(){return e},e}function z(){var e=Object(u.a)(["\n flex-basis: 100%;\n border-left: 3px solid var(--assa-abloy-blue);\n"]);return z=function(){return e},e}var M=s.default.ul(z()),_=s.default.li(I(),(function(e){return e.currentUrl?"block":"none"}),(function(e){return e.currentUrl?"var(--font-weight-bold)":"var(--font-weight-regular)"}),(function(e){return e.currentUrl?"var(--spacing-mini-2)":0})),S=function(e){var n=l()({},b,e.menuItem),t=Array.isArray(n.links)?n.links:[];return r.a.createElement(M,{id:"level3-menu"},t.map((function(e,n){return r.a.createElement(_,{key:"menu-item-".concat(n),currentUrl:!1},r.a.createElement("a",{href:e.url},r.a.createElement(c.a,{icon:"chevron.svg"}),r.a.createElement("span",null,e.label)))})))},T=function(e){var n=Object(a.useState)(""),t=Object(i.a)(n,2),o=t[0],u=t[1],s=!!e.menuItem,d=l()({},b,e.menuItem),p=Array.isArray(d.links)?d.links:[],m=function(e){u(o?"":e.currentTarget.dataset.level2ItemLabel||"")};return r.a.createElement(j,{id:"level2-menu",isOpen:s},r.a.createElement(L,{onClick:function(){e.onClickBackButton()}},r.a.createElement(c.a,{icon:"arrow2.svg"}),r.a.createElement("span",null,"Back")),r.a.createElement(O,null,p.map((function(e,n){var t;return r.a.createElement(C,{key:"menu-item-".concat(n),currentUrl:!1},r.a.createElement(c.a,{icon:"chevron.svg"}),r.a.createElement("a",{href:e.url},e.label),(null===(t=e.links)||void 0===t?void 0:t.length)>0?r.a.createElement("button",{onClick:m,"data-level2-item-label":e.label},r.a.createElement(N,{icon:"chevron.svg",rotate:e.label===o})):null,e.label===o?r.a.createElement(S,{menuItem:p.find((function(e){return e.label===o}))}):null)}))))},H=function(e){var n=Object(a.useState)(""),t=Object(i.a)(n,2),o=t[0],l=t[1],u=e.menuItems.find((function(e){return e.label===o})),s=!u,d=function(e){var n=e.currentTarget.dataset.menuItemLabel||"";l(n)};return r.a.createElement(f,null,r.a.createElement(v,{id:"level1-menu",isOpen:s},e.menuItems.map((function(e,n){var t;return r.a.createElement(g,{key:"menu-item-".concat(n)},r.a.createElement("a",{href:e.url},e.label),(null===(t=e.links)||void 0===t?void 0:t.length)>0?r.a.createElement("button",{onClick:d,"data-menu-item-label":e.label},r.a.createElement(c.a,{icon:"arrow2.svg"})):null)}))),r.a.createElement(T,{menuItem:u,onClickBackButton:function(){l("")}}))};H.defaultProps={menuItems:[]};var W=H,A=t(6);function D(){var e=Object(u.a)(["\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n min-height: 550px;\n box-shadow: 0px 100px 80px rgba(0, 0, 0, 0.02),\n 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0143771),\n 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0119221),\n 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.01),\n 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.00807786),\n 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.00562291);\n\n & .meta-description {\n color: var(--grey-80);\n font-size: var(--font-size-2);\n\n margin-top: 18px;\n margin-bottom: 0px;\n }\n"]);return D=function(){return e},e}var B=s.default.div(D()),P=s.default.li.withConfig({displayName:"styles__View",componentId:"sc-1h5xuwo-0"})(["margin-left:",";.sub-menu{font-size:16px;font-size:var(--font-size-2);line-height:var(--line-height-size-2);}.main-menu{font-size:var(--font-size-3);line-height:var(--line-height-size-3);padding:14px 18px;font-weight:700 !important;}&.active{background-color:",";}&:hover{cursor:pointer;border-left:2px solid var(--navigation-border-color);background-color:",";}"],(function(e){var n=e.navigationLevel;if(2===n||3===n)return"18px;"}),(function(e){var n=e.navigationLevel;return 1===n?"var(--section-background-alt-2)":2===n?"var(--navigation-background-alt-1)":3===n?"var(--navigation-background-alt-2)":void 0}),(function(e){var n=e.navigationLevel;return 1===n?"var(--section-background-alt-2)":2===n?"var(--navigation-background-alt-1)":3===n?"var(--navigation-background-alt-2)":void 0})),U=s.default.a.withConfig({displayName:"styles__DirectLink",componentId:"sc-1h5xuwo-1"})(["padding:6px 18px;display:block;font-weight:400 !important;&:hover{text-decoration:none !important;}"]),V=s.default.button.withConfig({displayName:"styles__MenuLink",componentId:"sc-1h5xuwo-2"})(["text-align:left;border:none;width:100%;background-color:transparent;outline:0;padding:6px 18px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;svg{width:10px;height:10px;}"]),R=function(e){var n=e.linkType,t=void 0===n?"direct":n,o=e.handleClick,l=e.className,u=void 0===l?"link":l,s=e.link,d=e.navigationLevel,p=e.activeID,m=Object(a.useState)(""),f=Object(i.a)(m,2),v=f[0],g=f[1],h=Object(a.useRef)(null);return Object(a.useEffect)((function(){s.id===p?g("active"):g("")}),[p,s.id]),"direct"===t?r.a.createElement(P,{className:"".concat(v),navigationLevel:d,linkType:t},r.a.createElement(U,{navigationLevel:d,linkType:t,className:"direct-link ".concat(u," ").concat(v),href:s.url},s.label)):r.a.createElement(P,{navigationLevel:d,className:"".concat(v),linkType:t},r.a.createElement(V,{ref:h,navigationLevel:d,linkType:t,className:"menu-link ".concat(u),onClick:function(){o&&o(s)}},s.label,r.a.createElement(c.a,{icon:"arrow2.svg"})))},F={id:"",label:"",links:[],metaDescription:"",url:"/#"};function J(){var e=Object(u.a)(["\n padding: 36px 36px 0 36px;\n font-size: 16px;\n display: block;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n p {\n color: var(--grey-80);\n font-weight: 400;\n margin: 0;\n margin-top: 18px;\n margin-bottom: 18px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden !important;\n }\n"]);return J=function(){return e},e}function Z(){var e=Object(u.a)(["\n margin: 0;\n\n li {\n padding: 3px 0;\n margin: 0 0 0 14px !important;\n cursor: pointer;\n border-left: 2px solid transparent;\n border-left: ",";\n }\n\n &.active li {\n border-left: 2px solid transparent;\n\n &.active {\n border-left: 2px solid var(--navigation-border-color);\n }\n }\n"]);return Z=function(){return e},e}function X(){var e=Object(u.a)(["\n height: 550px;\n overflow: scroll;\n padding-bottom: 80px;\n padding-top: ",";\n background-color: ",";\n width: ",";\n\n @media (min-width: 980px) {\n width: ",";\n }\n\n @media (min-width: 1240px) {\n width: ",";\n }\n"]);return X=function(){return e},e}var Y=s.default.section(X(),(function(e){return 1===e.navigationLevel&&"36px"}),(function(e){var n=e.theme,t=e.navigationLevel;return"main-menu"===n?"var(--navigation-background-alt-1)":"sub-menu"===n&&2===t?"var(--navigation-background-alt-2)":"sub-menu"===n&&3===t?"var(--navigation-background-alt-1)":void 0}),(function(e){return 1===e.navigationLevel?"280px":"calc(50vw - 9.75rem)"}),(function(e){return 1===e.navigationLevel?"320px":"calc(50vw - 11rem)"}),(function(e){return 1===e.navigationLevel?"320px":"440px"})),$=s.default.ul(Z(),(function(e){return 1!==e.navigationLevel&&"2px solid var(--navigation-border-color);"})),q=s.default.a(J()),G=function(e){var n,t=Object(A.a)(Object(A.a)({},e),{},{links:l()([],F,e.content)}),o=Object(a.useState)(""),c=Object(i.a)(o,2),u=c[0],s=c[1];return Object(a.useEffect)((function(){var n;(null===(n=t.content.links)||void 0===n?void 0:n.filter((function(n){return n.id===e.activeID}))).length>0?s("active"):s("not-active")}),[e.activeID,t.content.links]),r.a.createElement(Y,{theme:e.linkType,navigationLevel:e.navigationLevel},1!==e.navigationLevel&&r.a.createElement(q,{href:t.content.url},r.a.createElement("h5",null,t.content.label),r.a.createElement("p",null,t.content.description)),r.a.createElement($,{className:u,navigationLevel:e.navigationLevel},null===(n=t.content.links)||void 0===n?void 0:n.map((function(e){return r.a.createElement(R,{key:e.id,activeID:t.activeID,className:t.linkType,navigationLevel:t.navigationLevel,linkType:e.links?"undirect":"direct",handleClick:t.handleClick,link:e})}))))},K=function(e){var n=e.menuItems,t=Object(a.useState)({level1:"",level2:""}),o=Object(i.a)(t,2),l=o[0],c=o[1],u=Object(a.useState)({level1:n,level2:{},level3:{}}),s=Object(i.a)(u,2),d=s[0],p=s[1],m=d.level1,f=d.level2,v=d.level3;return r.a.createElement(B,null,r.a.createElement(G,{linkType:"main-menu",navigationLevel:1,content:m,handleClick:function(e){p(Object(A.a)(Object(A.a)({},d),{},{level2:e,level3:{}})),c(Object(A.a)(Object(A.a)({},l),{},{level1:e.id,level2:""}))},activeID:l.level1}),f.links&&r.a.createElement(G,{linkType:"sub-menu",navigationLevel:2,content:f,handleClick:function(e){p(Object(A.a)(Object(A.a)({},d),{},{level3:e})),c(Object(A.a)(Object(A.a)({},l),{},{level2:e.id}))},activeID:l.level2}),v.links&&r.a.createElement(G,{linkType:"sub-menu",navigationLevel:3,content:v}))};K.defaultProps={};var Q=K,ee=t(24),ne=s.default.div.withConfig({displayName:"styles__View",componentId:"zbj9ay-0"})(["position:relative;background-color:transparent;height:100%;font-size:var(--font-size-3);a{text-decoration:none;font-weight:700;color:var(--grey);}ul{padding:0;li{list-style:none;}}"]),te=s.default.div.withConfig({displayName:"styles__Nav",componentId:"zbj9ay-1"})(["display:flex;align-items:center;height:100%;min-height:72px;display:flex;align-items:center;nav{display:none;ul{display:flex;align-items:flex-start;flex-wrap:wrap;height:24px;overflow:hidden;li{height:24px;}a{margin-right:var(--spacing-medium-1);&:hover{text-decoration:underline;}}}}&.open{a{opacity:0;pointer-events:none;}}&.closed{a{opacity:1;}}@media only screen and (min-width:980px){nav{display:initial;}}"]),ae=s.default.button.withConfig({displayName:"styles__Hamburger",componentId:"zbj9ay-2"})(["display:flex;align-items:center;flex-direction:column;cursor:pointer;border:none;background:none;position:relative;margin-left:var(--spacing-small-1);margin-right:var(--spacing-small-1);span{background-color:var(--grey);width:22px;height:2px;margin:2px 0;display:block;transform-origin:0 0;}&.open span:nth-child(1){transform:rotate(45deg) translate(1px,-2px);width:18px;}&.open span:nth-child(2){transform:scaleX(0);}&.open span:nth-child(3){transform:rotate(-45deg);width:19px;}&:hover{cursor:pointer;}@media only screen and (min-width:768px){margin-left:var(--spacing-medium-1);margin-right:var(--spacing-medium-1);}"]),re=s.default.div.withConfig({displayName:"styles__HamburgerNav",componentId:"zbj9ay-3"})(["overflow:hidden;display:flex;opacity:0;flex-direction:column;justify-content:space-between;position:absolute;top:72px;left:0;border-radius:0 0 var(--border-radius) var(--border-radius);width:100vw;height:calc(100vh - 72px);min-height:550px;background-color:#fff;box-shadow:inset 0px 100px 80px rgba(0,0,0,0.02),0px 41.7776px 33.4221px rgba(0,0,0,0.0143771),0px 22.3363px 17.869px rgba(0,0,0,0.0119221),0px 12.5216px 10.0172px rgba(0,0,0,0.01),0px 6.6501px 5.32008px rgba(0,0,0,0.00807786),0px 2.76826px 2.21381px rgba(0,0,0,0.00562291);nav{display:flex;flex-direction:column;flex-grow:1;li{a:hover{text-decoration:underline;}}}&.initial{pointer-events:none;}&.closed{opacity:0;pointer-events:none;visibility:hidden;a{opacity:0;}}&.open{opacity:1;pointer-events:unset;visibility:visible;a{opacity:1;}}@media only screen and (min-width:767px){overflow:unset;max-width:280px;nav li{margin:var(--spacing-medium) var(--spacing-medium) var(--spacing-medium) var(--spacing-medium-1);}height:auto;}@media only screen and (min-width:980px){max-width:320px;}"]),ie=(s.default.div.withConfig({displayName:"styles__LanguageSwitcher",componentId:"zbj9ay-4"})(["padding:var(--spacing-small-1) 0;.dropdown{@media screen and (min-width:767px){display:none;}display:flex;flex-direction:column-reverse;> div{bottom:56px;}}"]),s.default.div.withConfig({displayName:"styles__Current",componentId:"zbj9ay-5"})(["background-color:var(--grey-80);padding:var(--spacing-small);color:var(--white);z-index:99;p{font-weight:var(--font-weight-medium);margin:0;}span{font-weight:var(--font-weight-light);display:block;}@media (min-width:767px){position:absolute;bottom:0;width:100%;left:0;}"])),oe=function(e){var n={links:l()([],h,e.menuItems)},t=e.currentPage.name,o=Object(a.useState)("initial"),c=Object(i.a)(o,2),u=c[0],s=c[1],d=Object(ee.a)().width||window.innerWidth;return r.a.createElement(ne,{className:"aem-nav-bar__navigation"},r.a.createElement(te,{className:"".concat(u)},r.a.createElement(ae,{onClick:function(){"initial"===u?s("open"):"open"===u?s("closed"):"closed"===u&&s("open")},className:"".concat(u)},r.a.createElement("span",null),r.a.createElement("span",null),r.a.createElement("span",null)),r.a.createElement("nav",null,r.a.createElement("ul",null,e.menuItems.map((function(e,n){return r.a.createElement("li",{key:"menu-item-".concat(n)},r.a.createElement("a",{href:e.url},e.label))}))))),r.a.createElement(re,{className:"".concat(u)},r.a.createElement("nav",null,d>=767?r.a.createElement(Q,{menuItems:n}):r.a.createElement(W,{menuItems:e.menuItems})),r.a.createElement(ie,null,r.a.createElement("span",null,"You are visiting"),r.a.createElement("p",null,t))))};oe.defaultProps={menuItems:[],currentPage:{name:""},languageSwitcher:void 0};var le=oe,ce=t(4),ue=function(e){var n=Object(ce.a)(e.content).navigationData;return r.a.createElement(r.a.Fragment,null,r.a.createElement(le,n),r.a.createElement("div",{className:"aem-nav-bar__options"}))};ue.defaultProps={content:""}}});
!function(e){function n(n){for(var a,o,l=n[0],c=n[1],u=n[2],d=0,p=[];d<l.length;d++)o=l[d],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&p.push(r[o][0]),r[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(n);p.length;)p.shift()();return i.push.apply(i,u||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],a=!0,l=1;l<t.length;l++){var c=t[l];0!==r[c]&&(a=!1)}a&&(i.splice(n--,1),e=o(o.s=t[0]))}return e}var a={},r={12:0},i=[];function o(n){if(a[n])return a[n].exports;var t=a[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=e,o.c=a,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)o.d(t,a,function(n){return e[n]}.bind(null,a));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/";var l=this["webpackJsonpgw-group-web-components"]=this["webpackJsonpgw-group-web-components"]||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;i.push([143,0]),t()}({0:function(e,n){e.exports=React},11:function(e,n,t){"use strict";t.d(n,"a",(function(){return i}));var a=t(0),r=t.n(a),i=function(e){var n=null;switch(e.icon){case"externalLink.svg":n=r.a.createElement("svg",{className:e.className,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M13 8.90237V13.2176C13 13.8679 12.4706 14.3999 11.8235 14.3999H2.17647C1.52941 14.3999 1 13.8679 1 13.2176V3.58217C1 2.93192 1.52941 2.3999 2.17647 2.3999H5.70588",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1L6.82141 8.17857",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1H8.6759",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M14 1V6.32411",stroke:"black",strokeWidth:"1.2",strokeMiterlimit:"10",strokeLinecap:"round"}));break;case"cross.svg":n=r.a.createElement("svg",{className:e.className,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M8.75 1.125L1 8.875",stroke:"#1A1A1A",strokeWidth:"1.62",strokeLinecap:"round",strokeLinejoin:"round"}),r.a.createElement("path",{d:"M1 1.125L8.75 8.875",stroke:"#1A1A1A",strokeWidth:"1.62",strokeLinecap:"round",strokeLinejoin:"round"}));break;case"arrow.svg":n=r.a.createElement("svg",{className:e.className,width:"13",height:"56",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M2 2L10 10L2 18",stroke:"white",strokeWidth:"3"}));break;case"document.svg":n=r.a.createElement("svg",{className:e.className,width:"16px ",viewBox:"0 0 23.88 29.55",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("g",{id:"Layer_2","data-name":"Layer 2"},r.a.createElement("g",{id:"icons"},r.a.createElement("path",{d:"M23.67,5.83,18.05.2a.61.61,0,0,0-.44-.2H2.87A2.88,2.88,0,0,0,0,2.87V26.68a2.88,2.88,0,0,0,2.87,2.87H21a2.88,2.88,0,0,0,2.87-2.87V6.27A.56.56,0,0,0,23.67,5.83ZM18.21,2.06l3.61,3.61H19.88A1.67,1.67,0,0,1,18.21,4ZM21,28.35H2.87A1.67,1.67,0,0,1,1.2,26.68V2.87A1.67,1.67,0,0,1,2.87,1.2H17V4a2.87,2.87,0,0,0,2.87,2.87h2.8V26.68A1.67,1.67,0,0,1,21,28.35Z"}),r.a.createElement("path",{d:"M14.77,17H3.43a.6.6,0,0,0,0,1.2H14.77a.6.6,0,0,0,0-1.2Z"}),r.a.createElement("path",{d:"M17.61,11.34H3.43a.6.6,0,0,0,0,1.2H17.61a.6.6,0,1,0,0-1.2Z"}),r.a.createElement("path",{d:"M3.43,6.87H9.1a.6.6,0,0,0,0-1.2H3.43a.6.6,0,1,0,0,1.2Z"}))));break;case"arrow2.svg":n=r.a.createElement("svg",{className:e.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M7.23629 15.1542C7.70242 15.6206 8.45899 15.6188 8.92284 15.1501L14.6074 9.40694C15.3788 8.62759 15.3788 7.37241 14.6074 6.59306L8.92661 0.85369C8.46102 0.383294 7.70132 0.38237 7.23458 0.851632C6.77271 1.316 6.7721 2.06605 7.23322 2.53116L11.4367 6.77113H1.22887C0.550182 6.77113 0 7.32132 0 8C0 8.67868 0.550182 9.22887 1.22887 9.22887H11.4367L7.2322 13.4767C6.77187 13.9418 6.7737 14.6914 7.23629 15.1542Z",fill:"#1A1A1A"}));break;case"chevron.svg":n=r.a.createElement("svg",{className:e.className,width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M5.76471 7.52942L9.52942 3.76471",stroke:"black",strokeWidth:"1.6",strokeMiterlimit:"10",strokeLinecap:"round"}),r.a.createElement("path",{d:"M5.76471 7.52942L2 3.76471",stroke:"black",strokeWidth:"1.6",strokeMiterlimit:"10",strokeLinecap:"round"}));break;default:n=r.a.createElement("svg",{className:e.className,width:"16",height:"24",viewBox:"0 0 16 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M8.08163 20L16 12L8.08163 4L6.4 5.69072L11.4367 10.7711H0V13.2289H11.4367L6.4 18.3175L8.08163 20Z",fill:"#1A1A1A"}))}return n}},118:function(e,n,t){"use strict";t.r(n);var a=t(20),r=t(44);n.default=a.a.create({component:r.a,configuration:{tagname:"gw-group-nav-header",useShadow:!1},plugins:[]})},24:function(e,n,t){"use strict";t.d(n,"a",(function(){return o}));var a=t(2),r=t(0),i=t(4);function o(){var e=Object(r.useState)({width:void 0,height:void 0}),n=Object(a.a)(e,2),t=n[0],o=n[1];return Object(r.useEffect)((function(){var e=Object(i.b)((function(){o({width:window.innerWidth,height:window.innerHeight})}),500);return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),t}},27:function(e,n){e.exports=ReactDOM},4:function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"j",(function(){return i})),t.d(n,"c",(function(){return o})),t.d(n,"d",(function(){return l})),t.d(n,"g",(function(){return c})),t.d(n,"h",(function(){return u})),t.d(n,"f",(function(){return s})),t.d(n,"i",(function(){return d})),t.d(n,"b",(function(){return p})),t.d(n,"e",(function(){return m}));var a=t(2),r=function(e){try{return JSON.parse(decodeURIComponent(escape(atob(e))))}catch(n){return console.warn("Failed decoding Base64 -> UTF8. Base64 string: ",e),null}},i=function(e){return btoa(unescape(encodeURIComponent(e)))},o=function(e){return"Invalid Date"!==new Date(e).toString()?new Date(e).toISOString().slice(0,10):e},l=function(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},c=function(e){return e.sort((function(e,n){return e.created>n.created?-1:e.created<n.created?1:0}))},u=function(e){return e.sort((function(e,n){return e.created<n.created?-1:e.created>n.created?1:0}))},s=function(e){return e.sort((function(e,n){return e.title<n.title?-1:e.title>n.title?1:0}))},d=function(e){return e.sort((function(e,n){return e.title>n.title?-1:e.title<n.title?1:0}))};function p(e,n){var t,a=arguments,r=this;return function(i){clearTimeout(t),t=setTimeout((function(n){t=null,e.apply(r,a)}),n)}}var m=function(e,n){if(!n.length)return e;var t=Object(a.a)(n,1)[0];return/^\d+$/.test(e)?"".concat(e).concat(t):"string"===typeof e&&n.some((function(n){return e.endsWith(n)}))?e:"string"===typeof e&&"".concat(e.trim().replace(/\D/g,"")||"0").concat(t)}},44:function(e,n,t){"use strict";t.d(n,"a",(function(){return ue}));var a=t(0),r=t.n(a),i=t(2),o=t(5),l=t.n(o),c=t(11),u=t(3),s=t(1);function d(){var e=Object(u.a)([""]);return d=function(){return e},e}function p(){var e=Object(u.a)(["\n overflow: scroll;\n height: 100%;\n padding-top: 15px !important;\n margin-bottom: 15px;\n margin-top: 0;\n background: transparent;\n width: 100%;\n position: absolute;\n flex-shrink: 0;\n left: ",";\n transition: left 0.2s ease-in-out;\n\n > li {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n > a {\n display: flex;\n flex-grow: 1;\n padding: 15px 0;\n }\n\n > button {\n display: flex;\n flex-grow: 0;\n padding: 0;\n height: 46px;\n width: 46px;\n align-items: center;\n justify-content: center;\n }\n }\n"]);return p=function(){return e},e}function m(){var e=Object(u.a)(["\n display: flex;\n height: 100%;\n position: relative;\n\n button {\n background: none;\n border: none;\n }\n\n #level1-menu > li {\n margin: 0 32px;\n background: transparent;\n margin: 0 17px 0 var(--spacing-medium);\n\n a {\n font-size: var(--font-size-4);\n font-weight: var(--font-weight-semi-bold);\n line-height: var(--line-height-size-4);\n }\n }\n"]);return m=function(){return e},e}var f=s.default.div(m()),v=s.default.ul(p(),(function(e){return e.isOpen?"0%":"-100%"})),g=s.default.li(d()),h=[{id:"",label:"",url:"",description:"",links:[]}],b={label:"",url:"",meta:"",links:[]};function x(){var e=Object(u.a)(["\n width: 13px;\n height: auto;\n transform: ",";\n transition: transform 0.16s ease-in-out;\n"]);return x=function(){return e},e}function w(){var e=Object(u.a)(["\n flex-wrap: wrap;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 17px 0 var(--spacing-medium);\n\n & > svg {\n display: ",";\n transform: rotate(-90deg);\n width: auto;\n height: 10px;\n }\n\n & > a {\n display: flex;\n flex-grow: 1;\n padding: var(--spacing-small);\n padding-left: ",";\n font-size: var(--font-size-4);\n font-weight: "," !important; // TODO: remove !important\n }\n\n & > button {\n display: flex;\n flex-grow: 0;\n height: 46px;\n width: 46px;\n align-items: center;\n justify-content: center;\n }\n"]);return w=function(){return e},e}function k(){var e=Object(u.a)(["\n margin: 0;\n overflow: scroll;\n"]);return k=function(){return e},e}function y(){var e=Object(u.a)(["\n display: flex;\n align-items: center;\n padding: 15px 15px 15px 0;\n margin-left: var(--spacing-medium);\n svg {\n height: 13px;\n width: 13px;\n transform: rotate(180deg);\n }\n span {\n font-weight: var(--font-weight-semi-bold);\n font-size: var(--font-size-4);\n padding-left: var(--spacing-mini-3);\n line-height: normal;\n }\n"]);return y=function(){return e},e}function E(){var e=Object(u.a)(["\n background: transparent;\n position: absolute;\n width: 100%;\n flex-shrink: 0;\n left: ",";\n transition: left 0.2s ease-in-out;\n display: flex;\n flex-direction: column;\n height: 100%;\n"]);return E=function(){return e},e}var j=s.default.div(E(),(function(e){return e.isOpen?"0%":"100%"})),O=s.default.button(y()),L=s.default.ul(k()),N=s.default.li(w(),(function(e){return e.currentUrl?"block":"none"}),(function(e){return e.currentUrl?"var(--spacing-mini-2)":0}),(function(e){return e.currentUrl?"var(--font-weight-bold)":"var(--font-weight-regular)"})),I=Object(s.default)(c.a)(x(),(function(e){return e.rotate?"rotate(180deg)":"rotate(0deg)"}));function C(){var e=Object(u.a)(["\n padding: var(--spacing-small);\n margin: 0;\n & > a {\n display: flex;\n align-items: center;\n\n svg {\n display: none;\n height: 10px;\n width: auto;\n transform: rotate(-90deg);\n display: ",";\n }\n\n span {\n font-weight: ",";\n font-size: var(--font-size-3);\n padding-left: ",";\n }\n }\n"]);return C=function(){return e},e}function z(){var e=Object(u.a)(["\n flex-basis: 100%;\n border-left: 3px solid var(--assa-abloy-blue);\n"]);return z=function(){return e},e}var M=s.default.ul(z()),_=s.default.li(C(),(function(e){return e.currentUrl?"block":"none"}),(function(e){return e.currentUrl?"var(--font-weight-bold)":"var(--font-weight-regular)"}),(function(e){return e.currentUrl?"var(--spacing-mini-2)":0})),A=function(e){var n=l()({},b,e.menuItem),t=Array.isArray(n.links)?n.links:[];return r.a.createElement(M,{id:"level3-menu"},t.map((function(e,n){return r.a.createElement(_,{key:"menu-item-".concat(n),currentUrl:!1},r.a.createElement("a",{href:e.url},r.a.createElement(c.a,{icon:"chevron.svg"}),r.a.createElement("span",null,e.label)))})))},H=function(e){var n=Object(a.useState)(""),t=Object(i.a)(n,2),o=t[0],u=t[1],s=!!e.menuItem,d=l()({},b,e.menuItem),p=Array.isArray(d.links)?d.links:[],m=function(e){u(o?"":e.currentTarget.dataset.level2ItemLabel||"")};return r.a.createElement(j,{id:"level2-menu",isOpen:s},r.a.createElement(O,{onClick:function(){e.onClickBackButton()}},r.a.createElement(c.a,{icon:"arrow2.svg"}),r.a.createElement("span",null,"Back")),r.a.createElement(L,null,p.map((function(e,n){var t;return r.a.createElement(N,{key:"menu-item-".concat(n),currentUrl:!1},r.a.createElement(c.a,{icon:"chevron.svg"}),r.a.createElement("a",{href:e.url},e.label),(null===(t=e.links)||void 0===t?void 0:t.length)>0?r.a.createElement("button",{onClick:m,"data-level2-item-label":e.label},r.a.createElement(I,{icon:"chevron.svg",rotate:e.label===o})):null,e.label===o?r.a.createElement(A,{menuItem:p.find((function(e){return e.label===o}))}):null)}))))},S=function(e){var n=Object(a.useState)(""),t=Object(i.a)(n,2),o=t[0],l=t[1],u=e.menuItems.find((function(e){return e.label===o})),s=!u,d=function(e){var n=e.currentTarget.dataset.menuItemLabel||"";l(n)};return r.a.createElement(f,null,r.a.createElement(v,{id:"level1-menu",isOpen:s},e.menuItems.map((function(e,n){var t;return r.a.createElement(g,{key:"menu-item-".concat(n)},r.a.createElement("a",{href:e.url},e.label),(null===(t=e.links)||void 0===t?void 0:t.length)>0?r.a.createElement("button",{onClick:d,"data-menu-item-label":e.label},r.a.createElement(c.a,{icon:"arrow2.svg"})):null)}))),r.a.createElement(H,{menuItem:u,onClickBackButton:function(){l("")}}))};S.defaultProps={menuItems:[]};var T=S,D=t(6);function B(){var e=Object(u.a)(["\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n min-height: 550px;\n box-shadow: 0px 100px 80px rgba(0, 0, 0, 0.02),\n 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0143771),\n 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0119221),\n 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.01),\n 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.00807786),\n 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.00562291);\n\n & .meta-description {\n color: var(--grey-80);\n font-size: var(--font-size-2);\n\n margin-top: 18px;\n margin-bottom: 0px;\n }\n"]);return B=function(){return e},e}var P=s.default.div(B()),W=s.default.li.withConfig({displayName:"styles__View",componentId:"sc-1h5xuwo-0"})(["margin-left:",";.sub-menu{font-size:16px;font-size:var(--font-size-2);line-height:var(--line-height-size-2);}.main-menu{font-size:var(--font-size-3);line-height:var(--line-height-size-3);padding:14px 18px;font-weight:700 !important;}&.active{background-color:",";}&:hover{cursor:pointer;border-left:2px solid var(--navigation-border-color);background-color:",";}"],(function(e){var n=e.navigationLevel;if(2===n||3===n)return"18px;"}),(function(e){var n=e.navigationLevel;return 1===n?"var(--section-background-alt-2)":2===n?"var(--navigation-background-alt-1)":3===n?"var(--navigation-background-alt-2)":void 0}),(function(e){var n=e.navigationLevel;return 1===n?"var(--section-background-alt-2)":2===n?"var(--navigation-background-alt-1)":3===n?"var(--navigation-background-alt-2)":void 0})),U=s.default.a.withConfig({displayName:"styles__DirectLink",componentId:"sc-1h5xuwo-1"})(["padding:6px 18px;display:block;font-weight:400 !important;&:hover{text-decoration:none !important;}"]),V=s.default.button.withConfig({displayName:"styles__MenuLink",componentId:"sc-1h5xuwo-2"})(["text-align:left;border:none;width:100%;background-color:transparent;outline:0;padding:6px 18px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;svg{width:10px;height:10px;}"]),Z=function(e){var n=e.linkType,t=void 0===n?"direct":n,o=e.handleClick,l=e.className,u=void 0===l?"link":l,s=e.link,d=e.navigationLevel,p=e.activeID,m=Object(a.useState)(""),f=Object(i.a)(m,2),v=f[0],g=f[1],h=Object(a.useRef)(null);return Object(a.useEffect)((function(){s.id===p?g("active"):g("")}),[p,s.id]),"direct"===t?r.a.createElement(W,{className:"".concat(v),navigationLevel:d,linkType:t},r.a.createElement(U,{navigationLevel:d,linkType:t,className:"direct-link ".concat(u," ").concat(v),href:s.url},s.label)):r.a.createElement(W,{navigationLevel:d,className:"".concat(v),linkType:t},r.a.createElement(V,{ref:h,navigationLevel:d,linkType:t,className:"menu-link ".concat(u),onClick:function(){o&&o(s)}},s.label,r.a.createElement(c.a,{icon:"arrow2.svg"})))},R={id:"",label:"",links:[],metaDescription:"",url:"/#"};function F(){var e=Object(u.a)(["\n padding: 36px 36px 0 36px;\n font-size: 16px;\n display: block;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n p {\n color: var(--grey-80);\n font-weight: 400;\n margin: 0;\n margin-top: 18px;\n margin-bottom: 18px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden !important;\n }\n"]);return F=function(){return e},e}function J(){var e=Object(u.a)(["\n margin: 0;\n\n li {\n padding: 3px 0;\n margin: 0 0 0 14px !important;\n cursor: pointer;\n border-left: 2px solid transparent;\n border-left: ",";\n }\n\n &.active li {\n border-left: 2px solid transparent;\n\n &.active {\n border-left: 2px solid var(--navigation-border-color);\n }\n }\n"]);return J=function(){return e},e}function X(){var e=Object(u.a)(["\n height: 550px;\n overflow: scroll;\n padding-bottom: 80px;\n padding-top: ",";\n background-color: ",";\n width: ",";\n\n @media (min-width: 980px) {\n width: ",";\n }\n\n @media (min-width: 1240px) {\n width: ",";\n }\n"]);return X=function(){return e},e}var Y=s.default.section(X(),(function(e){return 1===e.navigationLevel&&"36px"}),(function(e){var n=e.theme,t=e.navigationLevel;return"main-menu"===n?"var(--navigation-background-alt-1)":"sub-menu"===n&&2===t?"var(--navigation-background-alt-2)":"sub-menu"===n&&3===t?"var(--navigation-background-alt-1)":void 0}),(function(e){return 1===e.navigationLevel?"280px":"calc(50vw - 9.75rem)"}),(function(e){return 1===e.navigationLevel?"320px":"calc(50vw - 11rem)"}),(function(e){return 1===e.navigationLevel?"320px":"440px"})),$=s.default.ul(J(),(function(e){return 1!==e.navigationLevel&&"2px solid var(--navigation-border-color);"})),q=s.default.a(F()),G=function(e){var n,t=Object(D.a)(Object(D.a)({},e),{},{links:l()([],R,e.content)}),o=Object(a.useState)(""),c=Object(i.a)(o,2),u=c[0],s=c[1];return Object(a.useEffect)((function(){var n;(null===(n=t.content.links)||void 0===n?void 0:n.filter((function(n){return n.id===e.activeID}))).length>0?s("active"):s("not-active")}),[e.activeID,t.content.links]),r.a.createElement(Y,{theme:e.linkType,navigationLevel:e.navigationLevel},1!==e.navigationLevel&&r.a.createElement(q,{href:t.content.url},r.a.createElement("h5",null,t.content.label),r.a.createElement("p",null,t.content.description)),r.a.createElement($,{className:u,navigationLevel:e.navigationLevel},null===(n=t.content.links)||void 0===n?void 0:n.map((function(e){return r.a.createElement(Z,{key:e.id,activeID:t.activeID,className:t.linkType,navigationLevel:t.navigationLevel,linkType:e.links?"undirect":"direct",handleClick:t.handleClick,link:e})}))))},K=function(e){var n=e.menuItems,t=Object(a.useState)({level1:"",level2:""}),o=Object(i.a)(t,2),l=o[0],c=o[1],u=Object(a.useState)({level1:n,level2:{},level3:{}}),s=Object(i.a)(u,2),d=s[0],p=s[1],m=d.level1,f=d.level2,v=d.level3;return r.a.createElement(P,null,r.a.createElement(G,{linkType:"main-menu",navigationLevel:1,content:m,handleClick:function(e){p(Object(D.a)(Object(D.a)({},d),{},{level2:e,level3:{}})),c(Object(D.a)(Object(D.a)({},l),{},{level1:e.id,level2:""}))},activeID:l.level1}),f.links&&r.a.createElement(G,{linkType:"sub-menu",navigationLevel:2,content:f,handleClick:function(e){p(Object(D.a)(Object(D.a)({},d),{},{level3:e})),c(Object(D.a)(Object(D.a)({},l),{},{level2:e.id}))},activeID:l.level2}),v.links&&r.a.createElement(G,{linkType:"sub-menu",navigationLevel:3,content:v}))};K.defaultProps={};var Q=K,ee=t(24),ne=s.default.div.withConfig({displayName:"styles__View",componentId:"zbj9ay-0"})(["position:relative;background-color:transparent;height:100%;font-size:var(--font-size-3);a{text-decoration:none;font-weight:700;color:var(--grey);}ul{padding:0;li{list-style:none;}}"]),te=s.default.div.withConfig({displayName:"styles__Nav",componentId:"zbj9ay-1"})(["display:flex;align-items:center;height:100%;min-height:72px;display:flex;align-items:center;nav{display:none;ul{display:flex;align-items:flex-start;flex-wrap:wrap;height:24px;overflow:hidden;li{height:24px;}a{color:var(--white);margin-right:var(--spacing-medium-1);&:hover{text-decoration:underline;}}}}&.open{a{opacity:0;pointer-events:none;}}&.closed{a{opacity:1;}}@media only screen and (min-width:980px){nav{display:initial;}}"]),ae=s.default.button.withConfig({displayName:"styles__Hamburger",componentId:"zbj9ay-2"})(["display:flex;align-items:center;flex-direction:column;cursor:pointer;border:none;background:none;position:relative;margin-left:var(--spacing-small-1);margin-right:var(--spacing-small-1);span{background-color:var(--white);width:22px;height:2px;margin:2px 0;display:block;transform-origin:0 0;}&.open span:nth-child(1){transform:rotate(45deg) translate(1px,-2px);width:18px;}&.open span:nth-child(2){transform:scaleX(0);}&.open span:nth-child(3){transform:rotate(-45deg);width:19px;}&:hover{cursor:pointer;}@media only screen and (min-width:768px){margin-left:var(--spacing-medium-1);margin-right:var(--spacing-medium-1);}"]),re=s.default.div.withConfig({displayName:"styles__HamburgerNav",componentId:"zbj9ay-3"})(["overflow:hidden;display:flex;opacity:0;flex-direction:column;justify-content:space-between;position:absolute;top:72px;left:0;border-radius:0 0 var(--border-radius) var(--border-radius);width:100vw;height:calc(100vh - 72px);min-height:550px;background-color:#fff;box-shadow:inset 0px 100px 80px rgba(0,0,0,0.02),0px 41.7776px 33.4221px rgba(0,0,0,0.0143771),0px 22.3363px 17.869px rgba(0,0,0,0.0119221),0px 12.5216px 10.0172px rgba(0,0,0,0.01),0px 6.6501px 5.32008px rgba(0,0,0,0.00807786),0px 2.76826px 2.21381px rgba(0,0,0,0.00562291);nav{display:flex;flex-direction:column;flex-grow:1;li{a:hover{text-decoration:underline;}}}&.initial{pointer-events:none;}&.closed{opacity:0;pointer-events:none;visibility:hidden;a{opacity:0;}}&.open{opacity:1;pointer-events:unset;visibility:visible;a{opacity:1;}}@media only screen and (min-width:767px){overflow:unset;max-width:280px;nav li{margin:var(--spacing-medium) var(--spacing-medium) var(--spacing-medium) var(--spacing-medium-1);}height:auto;}@media only screen and (min-width:980px){max-width:320px;}"]),ie=(s.default.div.withConfig({displayName:"styles__LanguageSwitcher",componentId:"zbj9ay-4"})(["padding:var(--spacing-small-1) 0;.dropdown{@media screen and (min-width:767px){display:none;}display:flex;flex-direction:column-reverse;> div{bottom:56px;}}"]),s.default.div.withConfig({displayName:"styles__Current",componentId:"zbj9ay-5"})(["background-color:var(--grey-80);padding:var(--spacing-small);color:var(--white);z-index:99;p{font-weight:var(--font-weight-medium);margin:0;}span{font-weight:var(--font-weight-light);display:block;}@media (min-width:767px){position:absolute;bottom:0;width:100%;left:0;}"])),oe=function(e){var n={links:l()([],h,e.menuItems)},t=e.currentPage.name,o=Object(a.useState)("initial"),c=Object(i.a)(o,2),u=c[0],s=c[1],d=Object(ee.a)().width||window.innerWidth;return r.a.createElement(ne,{className:"aem-nav-bar__navigation"},r.a.createElement(te,{className:"".concat(u)},r.a.createElement(ae,{onClick:function(){"initial"===u?s("open"):"open"===u?s("closed"):"closed"===u&&s("open")},className:"".concat(u)},r.a.createElement("span",null),r.a.createElement("span",null),r.a.createElement("span",null)),r.a.createElement("nav",null,r.a.createElement("ul",null,e.menuItems.map((function(e,n){return r.a.createElement("li",{key:"menu-item-".concat(n)},r.a.createElement("a",{href:e.url},e.label))}))))),r.a.createElement(re,{className:"".concat(u)},r.a.createElement("nav",null,d>=767?r.a.createElement(Q,{menuItems:n}):r.a.createElement(T,{menuItems:e.menuItems})),r.a.createElement(ie,null,r.a.createElement("span",null,"You are visiting"),r.a.createElement("p",null,t))))};oe.defaultProps={menuItems:[],currentPage:{name:""},languageSwitcher:void 0};var le=oe,ce=t(4),ue=function(e){var n=Object(ce.a)(e.content).navigationData;return r.a.createElement(r.a.Fragment,null,r.a.createElement(le,n),r.a.createElement("div",{className:"aem-nav-bar__options"}))};ue.defaultProps={content:""}}});
{
"name": "@assaabloy/gw-group-nav-header",
"version": "3.0.0",
"version": "4.0.0",
"description": "Web component - Header navigation",

@@ -17,3 +17,3 @@ "type": "module",

},
"gitHead": "4d4c09a04786213242a03137365900dd4e9e91a6"
"gitHead": "85b7c4eb432ddcfa7bf4e34d7fbf1ab5494547e4"
}

@@ -8,3 +8,3 @@ ![ASSA ABLOY](https://upload.wikimedia.org/wikipedia/commons/e/e8/Assa-Abloy-Logo.svg)

```html
<gw-group-nav-header headerData=""></nav-header>
<gw-group-nav-header content=""></nav-header>
```

@@ -15,3 +15,3 @@

| ------------- | --------- | ----------------------------- |
| headerData | Object | base64 encoded |
| content | Object | base64 encoded |

@@ -28,20 +28,22 @@

{
"label": "Open positions",
"url": "#open-positions"
},
{
"label": "Diversity & inclusion",
"url": "#diversity-inclusion"
},
{
"label": "Students",
"url": "#students"
},
{
"label": "Life at ASSA Abloy",
"url": "#life-at-assa-abloy"
},
{
"label": "Contact",
"url": "#contact"
"links": [
{
"links": [
{
"id": "983d0512",
"label": "Auditor",
"url": "/content/assa-abloy/com/group/en/about-us/corporate-governance/auditor.html",
"description": ""
}
],
"id": "4fedf5fc",
"label": "Corporate governance",
"url": "/content/assa-abloy/com/group/en/about-us/corporate-governance.html",
"description": ""
}
],
"id": "737b589c",
"label": "About us",
"url": "/content/assa-abloy/com/group/en/about-us.html",
"description": "About us description"
}

@@ -68,3 +70,2 @@ ]

}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc