PageSourceSearch

https://lacuna.pub/build/assets/waiting-list-table-BM7L4NXL.js

js lacuna.pub collected 2026-09-25 14:52:48 UTC 4,582 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./app-D2hV7Ye0.js";import{u as f,f as h,c as N,d as C,g as w,a as S}from"./index-CV5FxOSS.js";import{B as r}from"./button-CADYElwY.js";import{S as v,a as P,b,c as R,d as T}from"./select-4pNd00RO.js";import{T as I,a as y,b as m,c as M,d as V,e as u}from"./table-_kEihfAa.js";import k from"./chevrons-left-D8olLE4O.js";import D from"./chevron-left-_G-V3dRF.js";import H from"./chevron-right-Dfkx-Flj.js";import B from"./chevrons-right-BrntfxS7.js";import d from"./arrow-up-down-CmpWf3Wh.js";import{f as G}from"./format-BWbfOpZW.js";/* empty css            */import"./index-B5tBDOjF.js";import"./index-DhXnAMyA.js";import"./utils-DBwg5IJ2.js";import"./index-BNFNzlHy.js";import"./index-BdQq_4o_.js";import"./index-BmFr46Vn.js";import"./index-BL0FjItE.js";import"./index-Bo7Wje6-.js";import"./index-BtE-9Gto.js";import"./index-WoiXmNGs.js";import"./index-BZ_b4_7V.js";import"./index-BIFLPTiR.js";import"./index-DkL_iLkf.js";import"./index-B8rN2q8u.js";import"./index-BBkYbNbj.js";import"./chevron-down-BiqcCRgP.js";import"./createLucideIcon-Bv9QJfkE.js";import"./check-CmArdozu.js";import"./chevron-up-B3sU-l2r.js";import"./startOfWeek-CS6HIoNV.js";const g=N(),j=[g.accessor("id",{header:({column:s})=>e.jsxs(r,{onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),variant:"ghost",children:["ID",e.jsx(d,{className:"ml-2 h-4 w-4"})]}),cell:s=>s.getValue(),sortingFn:(s,c,i)=>{const n=Number(s.getValue(i)),l=Number(c.getValue(i));return n<l?-1:n>l?1:0}}),g.accessor("email",{header:({column:s})=>e.jsxs(r,{onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),variant:"ghost",children:["Email",e.jsx(d,{className:"ml-2 h-4 w-4"})]}),cell:s=>s.getValue()}),g.accessor("created_at",{header:({column:s})=>e.jsxs(r,{onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),variant:"ghost",children:["Date Joined",e.jsx(d,{className:"ml-2 h-4 w-4"})]}),cell:s=>G(new Date(s.getValue()),"PPP")})];function he({data:s}){var p;const[c,i]=x.useState([]),[n,l]=x.useState({pageIndex:0,pageSize:20}),t=f({data:s,columns:j,getCoreRowModel:S(),getSortedRowModel:w(),getPaginationRowModel:C(),onSortingChange:i,onPaginationChange:l,state:{sorting:c,pagination:n}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(I,{children:[e.jsx(y,{children:t.getHeaderGroups().map(a=>e.jsx(m,{children:a.headers.map(o=>e.jsx(M,{children:o.isPlaceholder?null:h(o.column.columnDef.header,o.getContext())},o.id))},a.id))}),e.jsx(V,{children:(p=t.getRowModel().rows)!=null&&p.length?t.getRowModel().rows.map(a=>e.jsx(m,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(o=>e.jsx(u,{children:h(o.column.columnDef.cell,o.getContext())},o.id))},a.id)):e.jsx(m,{children:e.jsx(u,{className:"h-24 text-center",colSpan:j.length,children:"No results."})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Rows per page"}),e.jsxs(v,{onValueChange:a=>{t.setPageSize(Number(a))},value:`${t.getState().pagination.pageSize}`,children:[e.jsx(P,{className:"h-8 w-[70px]",children:e.jsx(b,{placeholder:t.getState().pagination.pageSize})}),e.jsx(R,{side:"top",children:[10,20,30,40,50].map(a=>e.jsx(T,{value:`${a}`,children:a},a))})]})]}),e.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",t.getState().pagination.pageIndex+1," of ",t.getPageCount()]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(r,{className:"h-8 w-8 p-0",disabled:!t.getCanPreviousPage(),onClick:()=>t.setPageIndex(0),variant:"outline",children:[e.jsx("span",{className:"sr-only",children:"Go to first page"}),e.jsx(k,{className:"h-4 w-4"})]}),e.jsxs(r,{className:"h-8 w-8 p-0",disabled:!t.getCanPreviousPage(),onClick:()=>t.previousPage(),variant:"outline",children:[e.jsx("span",{className:"sr-only",children:"Go to previous page"}),e.jsx(D,{className:"h-4 w-4"})]}),e.jsxs(r,{className:"h-8 w-8 p-0",disabled:!t.getCanNextPage(),onClick:()=>t.nextPage(),variant:"outline",children:[e.jsx("span",{className:"sr-only",children:"Go to next page"}),e.jsx(H,{className:"h-4 w-4"})]}),e.jsxs(r,{className:"h-8 w-8 p-0",disabled:!t.getCanNextPage(),onClick:()=>t.setPageIndex(t.getPageCount()-1),variant:"outline",children:[e.jsx("span",{className:"sr-only",children:"Go to last page"}),e.jsx(B,{className:"h-4 w-4"})]})]})]})]})}export{he as WaitingListTable};

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.