PageSourceSearch

https://kreutalm.de/static/js/271.e18252bf.chunk.js

js kreutalm.de collected 2026-10-07 04:00:16 UTC 5,003 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkwannado=self.webpackChunkwannado||[]).push([[271],{9271:(e,n,i)=>{i.r(n),i.d(n,{CMSNavigationEditor:()=>S,default:()=>w});var t=i(2791),a=i(2968),l=i(4261),s=i(6967),o=i(6330),c=i(591),u=i(912),r=i(5570),d=i(1151),v=i(5185),h=i(966),g=i(7262),m=i(715),x=i(2861),p=i(2945),j=i(2099),k=i(4716),C=i(8754),b=i(6105),y=i(9434),f=i(3626),N=i(7583),L=i(184);const U=e=>{const[n,i]=(0,t.useState)(""),a=(0,t.useContext)(N.y),o=(0,y.v9)(f.P),c=e.navigation.content.find((e=>e.uuid===n)),r=(n,i)=>{void 0!==c&&e.onChange(e.navigation.content.map((e=>{if(e.uuid===c.uuid){const t={...e,[n]:i};if("pageUuid"===n&&"Neuer Link"===t.linkName){const e=o.find((e=>e.uuid===i));void 0!==e&&(t.linkName=e.name)}return t}return e})))},d=e.navigation.content.map((e=>{const n=[e.linkName];"login"===e.visibility&&n.push((0,L.jsx)(C.J,{name:"eye-slash"},"icon"));return{...e,content:(0,L.jsx)(u.g,{children:n})}}));return(0,L.jsx)(g.W,{label:"Inhalt",children:(0,L.jsxs)(j.M,{children:[(0,L.jsx)(x.L,{onCreateElement:(n,i)=>{const t={nsLeft:0,nsRight:1,nsDepth:0,linkName:"Neuer Link",type:"cms",pageUuid:"",uuid:(0,l.Z)(),visibility:"public"};"root"===i||"root"===n?e.onChange([t]):((0,p.pv)([t],n.nsLeft,i,e.navigation.content),e.onChange([...e.navigation.content]))},elements:d,selectedUuids:[n],onClick:(e,n)=>i(n),onDeleteElement:n=>{(0,p.Rr)(e.navigation.content,n),e.onChange([...e.navigation.content])},onMoveElement:(n,i,t)=>{(0,p.u5)(n,i,t,e.navigation.content),e.onChange([...e.navigation.content])}}),(0,L.jsx)(g.W,{children:(()=>{var e,n;if(void 0===c)return null;const i=[{value:"cms",name:"Interne Seite"},{value:"external",name:"Externer Link"},{value:"text",name:"Nicht verlinkter Text"}];
1(null!==(e=a.customNavigationEntries)&&void 0!==e?e:[]).forEach((e=>{i.push({value:e.type,name:e.name})}));const t=(0,L.jsx)(m.Z,{label:"Angezeigter Linkname",value:c.linkName,onChange:e=>r("linkName",e)}),l=(0,L.jsx)(k.L,{label:"Sichtbarkeit",value:c.visibility,onChange:e=>r("visibility",e),items:[{value:"public",name:"\xd6ffentlich"},{value:"login",name:"Nur eingeloggt"}]}),o=(0,L.jsx)(k.L,{label:"Link Typ",value:c.type,onChange:e=>r("type",e),items:i});switch(c.type){case"custom1":case"custom2":case"custom3":case"custom4":case"custom5":return(0,L.jsxs)(s.y,{children:[l,o]});case"text":return(0,L.jsxs)(s.y,{children:[l,o,t]});case"cms":return(0,L.jsxs)(s.y,{children:[l,o,(0,L.jsx)(b.T,{value:c.pageUuid,onChange:e=>r("pageUuid",e)}),t]});case"external":return(0,L.jsxs)(s.y,{children:[l,o,(0,L.jsx)(m.Z,{label:"Zieladresse",value:null!==(n=c.url)&&void 0!==n?n:"",onChange:e=>r("url",e)}),t]})}})()})]})})};var Z=i(675),E=i(6979);const S=()=>{const[e,n]=(0,t.useState)([]),[i,x]=(0,t.useState)(!1),[p,j]=(0,t.useState)(""),[k,C]=(0,t.useState)([]),[b,f]=(0,t.useState)(""),N=(0,v.F)(),S=(0,y.I0)(),w=(0,r.r)("/api/core/cms/navigation/write"),W=(0,r.r)("/api/core/cms/navigation/read"),A=(0,r.r)("/api/core/cms/navigation/delete");(0,t.useEffect)((()=>{D()}),[N]);const D=()=>{N&&W().then((e=>{n(e.navigations),x(!0)})).catch(f)},I=()=>{const i=(0,l.Z)();n([...e,{uuid:(0,l.Z)(),title:"Neue Navigation",parentUuid:i,content:[]}]),C([...k,i])},J=()=>{const n=e.filter((e=>k.includes(e.parentUuid)));w({navigations:n}).then((()=>{C([]),S((0,Z.J)())})).catch(f)},M=e.find((e=>e.uuid===p)),R=(i,t)=>{void 0!==M&&(n(e.map((e=>e.uuid===M.uuid?{...e,[i]:t}:e))),C([...k,M.parentUuid]))};return(0,L.jsx)(a.w,{leftWidth:250,left:i?(0,L.jsxs)(s.y,{children:[k.length>0?(0,L.jsx)(o.Z,{icon:"save",label:"\xc4nderungen speichern",onClick:J,rank:1}):null,(0,L.jsx)(u.g,{children:(0,L.jsx)(o.Z,{icon:"plus",label:"Erstellen",onClick:I,rank:2})}),(0,L.jsx)(c.i,{selectedUuids:[p],onClick:j,elements:e.map((e=>({uuid:e.uuid,content:e.title})))})]}):(0,L.jsx)("div",{children:"Lade ..."}),children:""!==b?(0,L.jsx)(d.Z,{message:b}):void 0===M?null:(0,L.jsx)(g.W,{children:(0,L.jsxs)(s.y,{children:[(0,L.jsxs)(h.s,{rank:3,children:["Navigation bearbeiten: ",M.title]}),(0,L.jsx)(m.Z,{label:"Name (nur intern)",value:M.title,onChange:e=>R("title",e)}),(0,L.jsx)(U,{navigation:M,onChange:e=>R("content",e)}),(0,L.jsx)(E.$,{onClick:()=>{A({uuid:M.parentUuid}).then((()=>{S((0,Z.J)()),D()}))},label:M.title+" l\xf6schen"})]})})})},w=S},591:(e,n,i)=>{i.d(n,{i:()=>c,m:()=>u});i(2791);const t={item:"ListSelectable_item__9RYl9"};var a=i(6383),l=i(6330),s=i(6967),o=i(184);const c=e=>u(e),u=e=>{const n=(0,a.F)();return(0,o.jsxs)(s.y,{className:t.wrapper,children:[(()=>{var n;if(void 0!==e.onAdd)return(0,o.jsx)(l.Z,{label:null!==(n=e.addLabel)&&void 0!==n?n:"Erstellen",rank:2,icon:"plus",onClick:e.onAdd})})(),(0,o.jsx)("div",{children:e.elements.map((i=>{var a;const l=null===(a=e.selectedUuids)||void 0===a?void 0:a.includes(i.uuid),s=[t.item,n.backgroundColorGreyDarkenOnHover,l?n.backgroundColorPrimaryOpacity20:null];return(0,o.jsx)("div",{className:s.join(" "),onClick:()=>{e.onClick&&e.onClick(i.uuid,i)},children:i.content},i.uuid)}))})]})}}}]);
2//# sourceMappingURL=271.e18252bf.chunk.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.