PageSourceSearch

https://stroseoflimacatholicacademy.org/build/_route-Bvohj67-.js

js stroseoflimacatholicacademy.org collected 2026-09-26 16:41:00 UTC 4,286 bytes, 26 lines download raw bytes

1import{d as t,j as e,p as k,F as x}from"./index-yjs0jCN1.js";import{c as v}from"./index-Cll4-HYu.js";import{m as f}from"./main-BcECSJOR.js";import{A as N}from"./layout-CjNw_1vT.js";import{u as $,N as g,g as u}from"./gql-BXUds3tn.js";import{u as S}from"./utils-B9bFpkA1.js";import{u as h}from"./useMutation-D1nG7fOt.js";import"./ApolloContext-MQGfuinR.js";import"./index-CYkanOlq.js";const b=t.globalCss({":root":{backgroundColor:"$groupedBackground"},a:{all:"unset"}}),j=t.styled(v.motion.div,t.Card,{cursor:"pointer",userSelect:"none",position:"relative",variants:{skeleton:{true:{backgroundColor:"$gray5"}}}});function C({item:n}){const{title:d,description:r,id:c,contextMenu:s}=n.value??{},i=k();return e.jsx(j,{initial:{opacity:0,scale:.6,filter:"blur(20px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.6,filter:"blur(20px)"},style:{transformOrigin:"top center"},layoutScroll:!0,layout:!0,layoutId:c.toString(),elevation:"1",border:!0,hoverElevation:"2",onClick:()=>{var a,l;return((l=(a=n.props)==null?void 0:a.onClick)==null?void 0:l.call(a,n))??i(c.toString())},children:e.jsxs(t.HStack,{align:"center",css:{height:"$16",padding:"$4 $6"},children:[e.jsxs(t.VStack,{space:"small",children:[e.jsx(t.Text,{children:d}),r&&e.jsx(t.Text,{css:{color:"$gray1"},size:"caption2",children:r})]}),e.jsx(t.Box,{css:{color:"$gray2",marginLeft:"auto"},children:s!=null&&s.length?e.jsx(t.MenuButton,{icon:t.MoreHorizontalIcon,items:s,appearance:"minimal",round:!0,placement:"bottom-end",css:{marginRight:"-$3"}}):e.jsx(t.ChevronRightIcon,{size:"$3"})})]})})}function I(){return e.jsx(e.Fragment,{children:[1,2,3,4].map(n=>e.jsx(j,{skeleton:!0,border:!0,children:e.jsx(t.HStack,{align:"center",css:{height:"$16",padding:"$4 $6"}})},n))})}function M({title:n,loading:d,onCreateNew:r,items:c=[]}){b();const s=f.useTreeState({items:c,children:i=>e.jsx(f.Item,{title:i.title,textValue:i.title,children:i.title,...i.props},i.id)});return e.jsxs(N,{children:[e.jsxs(t.HStack,{justify:"between",align:"center",children:[e.jsx(t.Heading,{children:n}),r&&e.jsx(t.Button,{appearance:"outline",icon:t.AddIcon,onPress:r,children:"New"})]}),e.jsx(t.Spacer,{}),e.jsx(t.VStack,{space:"small",children:d?e.jsx(I,{}):s.collection.size<=0?e.jsx(t.VStack,{css:{paddingBlock:"$10"},children:e.jsx(t.EmptyState,{action:{title:"New",to:"new"}})}):e.jsx(v.AnimatePresence,{initial:!1,children:[...s.collection].map(i=>e.jsx(C,{item:i},i.key))})})]})}const w=u(`
2	query NavsQuery {
3		navs {
4			navs {
5				id
6				identifier
7				title
8				schemaValues
9			}
10		}
11	}
12`),A=u(`
13	mutation CreateNavMutation($nav: NavAttributes!) {
14		createNav(nav: $nav) {
15			id
16			title
17			schemaValues
18		}
19	}
20`),H=u(`
21	mutation DeleteNavMutation($id: ID!) {
22		deleteNav(id: $id) {
23			id
24		}
25	}
26`);function q(){var m,p;const{data:n,loading:d}=$(w),{isNestedSite:r}=S(),[c]=h(A),[s]=h(H,{refetchQueries:[g]}),i=t.useConfirm();async function a({title:o,...y}={}){await c({variables:{nav:{title:o||"New Menu",...y}},refetchQueries:[g]})}const l=(n==null?void 0:n.navs.navs.map(o=>({id:o.id,title:o.title,contextMenu:[!["main","footer"].includes(o.identifier)&&{key:"delete",title:"Delete",icon:t.TrashIcon,intent:"danger",onAction:()=>i({title:"Are you sure you want to delete this nav?",message:"This action cannot be undone.",intent:"danger"}).then(()=>s({variables:{id:o.id}}))}].filter(Boolean),description:!o.schemaValues&&e.jsxs(t.HStack,{align:"center",space:"extraSmall",css:{color:"$warning"},children:[e.jsx(t.AlertTriangleBoldIcon,{size:"$2"}),e.jsx(t.Text,{size:"caption2",children:"Needs to be updated"})]})})))??[];return!r&&!((m=n==null?void 0:n.navs)!=null&&m.navs.some(o=>o.identifier==="footer"))&&l.unshift({id:"footer",title:"Footer",description:e.jsx(x,{id:"navs.create.footer",defaultMessage:"You don't have a footer menu yet. Create one now."}),props:{skeleton:!0,onClick:()=>a({identifier:"footer",title:"Footer"})}}),(p=n==null?void 0:n.navs)!=null&&p.navs.some(o=>o.identifier==="main")||l.unshift({id:"main",title:"Header",description:e.jsx(x,{id:"navs.create.main",defaultMessage:"You don't have a header menu yet. Create one now."}),props:{skeleton:!0,onClick:()=>a({identifier:"main",title:"Header"})}}),e.jsx(M,{loading:d,title:"Menus",items:l,onCreateNew:()=>a()})}
26export{q as default};

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.