PageSourceSearch

https://www.middelfartbibliotek.dk/libraries/dpl-react/menu.js?tm82g1

js middelfartbibliotek.dk collected 2026-10-02 12:49:06 UTC 6,952 bytes, 2 lines download raw bytes

1(globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react||=[]).push([[854],{49489(e,a,n){"use strict";var t=n(49271),l=n(71763),s=n(6544),i=n.n(s),o=n(22442),r=n(17124),d=n(1354),c=n(81738),m=n(22512),u=n(91987);const g=()=>{const e=(0,r.F)(),a=(0,o.Ik)(),n=a("menuLoginUrl"),t=a("menuSignUpUrl"),{userMenuAnonymous:l}=(0,m.c6)();return(0,u.jsx)(c.Ay,{classNames:"modal-right modal--no-padding",modalId:l,closeModalAriaLabelText:e("menuNotAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:e("menuNotAuthenticatedModalDescriptionText"),isSlider:!0,children:(0,u.jsxs)("div",{className:"modal-login modal-login--anonymous",children:[(0,u.jsx)(d.A,{href:n,className:"btn-primary btn-filled btn-large arrow__hover--right-small",children:e("menuLoginText")}),(0,u.jsx)(d.A,{href:t,className:"mt-32 link-tag color-secondary-gray modal-login__btn-create-profile",children:e("menuSignUpText")})]})})};var h=n(28742),x=n(48113);const p=(e,a)=>{document.body.innerHTML="",document.documentElement.style.visibility="hidden",a.clear(),sessionStorage.clear(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{window.location.replace(e.toString())})})},b=({loansCount:e,reservationCount:a,feeCount:n,menuNavigationItem:t,dataCy:l="menu-navigation-item"})=>{const s={1:e,2:a,4:n},{link:i,name:o,dataId:r}=t;return(0,u.jsx)("li",{"data-cy":`${l}-${o.toLowerCase()}`,className:"link-filters mb-16",children:(0,u.jsxs)("div",{className:"link-filters__tag-wrapper",children:[(0,u.jsx)("a",{href:i,className:"link-tag link-tag link-filters__tag","aria-label":`${o} ${s[r]||""}`,children:o}),0!==s[r]&&(0,u.jsx)("span",{className:"link-filters__counter","aria-hidden":"true",children:s[r]})]})})};var j=n(87533),v=n(53059),C=n(22769),_=n(90648),f=n(50575),N=n(63126),A=n(62892);const y=({pageSize:e})=>{const a=(0,r.F)(),n=(0,o.Ik)(),t=n("userProfileUrl"),s=n("logoutUrl"),c=(0,v.UK)(),m=(0,x.jE)(),g=(0,_.A)(),h=(0,f.A)(),{data:y}=(0,N.Ix)(),{data:k=[]}=(0,j.J2)({includepaid:!1,includenonpayable:!0}),L=c("menuNavigationDataConfig",{transformer:"jsonParse"}),[T,M]=(0,l.useState)(),[S,U]=(0,l.useState)(0);(0,l.useEffect)(()=>{M(y)},[y]),(0,l.useEffect)(()=>{k&&U(k.length)},[k]);const I=0!==h.all.overdue.length||0!==h.all.soonOverdue.length||0!==g.all.reservations.length;return(0,u.jsx)("div",{className:"modal-login modal-login--authenticated",children:(0,u.jsxs)("div",{className:"modal-login__container",children:[(0,u.jsxs)("div",{className:"modal-header",children:[(0,u.jsx)("div",{className:"modal-header__avatar",children:(0,u.jsx)("div",{className:"avatar bg-global-secondary",children:(0,u.jsx)("img",{src:i(),alt:""})})}),(0,u.jsx)("div",{className:"modal-header__name text-header-h4","data-cy":"menu-patron-name",children:T?.patron?.name}),(0,u.jsx)(d.A,{href:t,className:"link-tag modal-header__link color-secondary-gray",children:a("menuUserProfileUrlText")})]}),I&&(0,u.jsx)("div",{className:"modal-profile__container",children:(0,u.jsx)(C.A,{pageSize:e,columns:!1,loans:h,reservations:g})}),(0,u.jsx)("nav",{className:"modal-profile__container","aria-label":a("menuProfileLinksAriaLabelText"),children:(0,u.jsx)("ul",{className:"modal-profile__links",children:L.map(e=>(0,u.jsx)(b,{menuNavigationItem:e,loansCount:h.all.loans.length,reservationCount:g.all.reservations.length,feeCount:S},e.dataId))})}),(0,u.jsx)("div",{className:"modal-profile__btn-logout mx-32",children:(0,u.jsx)(A.$,{label:a("menuLogOutText"),buttonType:"none",size:"large",variant:"filled",collapsible:!1,onClick:()=>p(s,m),canOnlyBeClickedOnce:!0,dataCy:"menu-logout-button"})})]})})},k=({pageSize:e})=>{const{userMenuAuthenticated:a}=(0,m.c6)(),n=(0,r.F)();return(0,u.jsx)(c.Ay,{modalId:a,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:n("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:n("menuAuthenticatedModalDescriptionText"),isSlider:!0,children:(0,u.jsx)(y,{pageSize:e})})};var L=n(49641);const T=()=>{const e=(0,r.F)(),a=(0,o.Ik)()("logoutUrl"),n=(0,x.jE)();return(0,u.jsx)("div",{className:"modal-login modal-login--anonymous",children:(0,u.jsx)(A.$,{label:e("menuLogOutText"),buttonType:"none",size:"large",variant:"filled",collapsible:!1,onClick:()=>p(a,n)})})},M=()=>{const{userMenuUnregistered:e}=(0,m.c6)(),a=(0,r.F)();return(0,u.jsx)(c.Ay,{modalId:e,classNames:"modal-right modal--no-p
1adding",closeModalAriaLabelText:a("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:a("menuAuthenticatedModalDescriptionText"),isSlider:!0,children:(0,u.jsx)(T,{})})};var S=n(52661);const U=({pageSize:e})=>{const{open:a}=(0,c.XE)(),n=(0,r.F)(),{userMenuAuthenticated:t,userMenuAnonymous:l,userMenuUnregistered:s}=(0,m.c6)(),{isLoading:o,data:d}=(0,N.Ix)(),x={updateUrl:!1},p=()=>{(0,h.u7)()?a(s,x):(0,h.ok)()?a(l,x):a(t,x)};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("button",{className:"header__button header__button--left-border btn-ui","data-cy":"header-menu-profile-button",type:"button","aria-label":n(o?"searchHeaderLoginText":d?.patron?"menuUserIconAriaLabelText":"menuUserIconAriaLabelLoggedOutText"),onMouseUp:()=>p(),onKeyUp:e=>{(0,S.GC)(e.key)&&p()},tabIndex:0,children:[(0,u.jsx)("img",{src:i(),className:"header__button-icon",alt:""}),(0,u.jsx)("span",{className:"header__button-text",children:o?(0,u.jsx)(L.A,{width:50}):d?.patron?.name||n("searchHeaderLoginText")})]}),(0,u.jsx)(k,{pageSize:e}),(0,u.jsx)(M,{}),(0,u.jsx)(g,{})]})},I=(0,o.nU)((0,v.NV)((0,r.i)(({pageSizeDesktop:e,pageSizeMobile:a})=>{const n=(0,S.Ki)({desktop:e,mobile:a},"pageSizeLoanList");return(0,u.jsx)(U,{pageSize:n})})));(0,t.A)({appName:"menu",app:I})},6544(e){e.exports="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.32 12C16.5387 12 18.492 13.4621 19.1173 15.5908L19.8704 18.1545C20.3374 19.7442 19.4273 21.4114 17.8376 21.8784C17.563 21.959 17.2782 22 16.992 22H7.00806C5.3512 22 4.00806 20.6569 4.00806 19C4.00806 18.7138 4.04901 18.4291 4.12967 18.1545L4.88276 15.5908C5.50807 13.4621 7.46139 12 9.68006 12H14.32ZM14.32 13.5H9.68006C8.1917 13.5 6.87393 14.4399 6.38145 15.8298L6.32195 16.0136L5.56887 18.5772C5.52853 18.7145 5.50806 18.8569 5.50806 19C5.50806 19.7797 6.10295 20.4204 6.8636 20.4931L7.00806 20.5H16.992C17.1351 20.5 17.2775 20.4795 17.4148 20.4392C18.1629 20.2194 18.61 19.4681 18.4654 18.7178L18.4312 18.5772L17.6782 16.0136C17.2587 14.5855 15.9854 13.5861 14.5132 13.5053L14.32 13.5ZM12.0001 2.25C14.3473 2.25 16.2501 4.15279 16.2501 6.5C16.2501 8.84721 14.3473 10.75 12.0001 10.75C9.65284 10.75 7.75005 8.84721 7.75005 6.5C7.75005 4.15279 9.65284 2.25 12.0001 2.25ZM12.0001 3.75C10.4813 3.75 9.25005 4.98122 9.25005 6.5C9.25005 8.01878 10.4813 9.25 12.0001 9.25C13.5188 9.25 14.7501 8.01878 14.7501 6.5C14.7501 4.98122 13.5188 3.75 12.0001 3.75Z' fill='black'/%3e %3c/svg%3e"}},e=>{e.O(0,[23],()=>e(49489)),e.O()}]);
2//# sourceMappingURL=menu.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.